Stage work on λ-calculus (Böhm transform and head original terms) #1169
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
This is the last piece of (easy) work on λ-calculus mechanisation, before Böhm trees are first involved.
If a head normal form (hnf) is given by
M := LAMl vs (VAR y @* Ns)
, then:LENGTH vs = 0
(orvs = []
), or just~is_abs M
y
is not free in any hnf children term, i.e.!N. MEM N Ns ==> y # N
,Due to α-conversions, without using dB encodings the concept
head_original
has to be defined in the following complicated way, by callingprinciple_hnf
once to remove the potential outer abstractions of input term: (NOTE:hnf_headvar M1
is an overload toTHE_VAR (hnf_head M1)
, whereTHE_VAR (VAR y) = y
is currently put inchap2Theory
)while the definition
is_ready
is relatively easy and straightforward:But then, I managed to eliminate
head_original
and prove the following easier "equivalent definition" ofis_ready
:With the above definitions, the following stage lemma (Lemma 10.3.6 (i), page 247 of [Barengredt 1984]) is proved, saying for any λ-term there exists a Böhm transform π such that π(M) is ready.
P. S. The next lemma, Lemma 10.3.6 (ii) will show that, for any λ-term M, there exists a Böhm transform π to access any node (at path α) of the Böhm tree BT(M), the resulting term is a substitution instance of the actual tree node, and is ready.
--Chun