Stage work on the lambda example (BT_subterm_thm, etc.) #1257
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 PR contains some stage progress for the lambda calculus example, in particular, the relationship between the two accessors (
ltree_el
andltree_lookup
) of BT (Böhm tree), and subterms. This is basically the first time we actually deal with Böhm trees (previously the focus was mainly on subterms).In the
ltreeTheory
, the relationship betweenltree_el
(returns only the tree node at the end of certain path) andltree_lookup
(returns the entire subtree after passing certain path) is now established with help of monad syntax:Recall that, a "subterm X M p" is the children term of the generation process of Böhm tree (after passing the path
p
) at the head normal formLAMl vs (VAR y) @* args
(EL n args
is the subterm, assuming the last number in the listp
isn
). Previously, the relationship betweensubterm
andltree_lookup
has been established by the following (renamed) lemma: (i.e. the BT of subterm is the subtree of BT of the original term)Now, with help of the above
[ltree_el_alt_ltree_lookup]
, I can directly prove the following (dirty) connecting theorem (betweenltree_el
andsubterm
) without doing induction:The above theorem will play a key role in proving the following "agree_upto" lemma (still in progress):
This PR contains also some more properties about the lambda permutator for their head reductions in different situations, used by the in-progress proofs.
The
head_reductionScript.sml
was cleaned up and updated withloose equality
removed. Since the total changes involve many files, I think it's better to get the current stage work reviewed before the next major stage.--Chun