Principle head normal forms (principle_hnf) #1162
Merged
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 adds the definition and some basic properties and lemmas about principle head normal forms (
priciple_hnf
). A term may have several hnf's, e.g. if any of its hnf can still do beta reductions, then after such reductions the resulting term is still an hnf by definition. The (unique) terminating term of head reduction path is called "principle" hnf: (Definition 8.3.20 [1, p.177])Given that the above definition immediately follows solvable terms in the book, all developments are in
solvableTheory
of the lambda examples.Obviously,
principle_hnf M
is specified only ifhas_hnf M
orsolvable M
, because otherwisehead_reduction_path M
is infinite and there's no last element at all. Below are some basic properties of principle hnf:principle_hnf
reduces to just one:normal_form
inchap3Theory
can be used)principle_hnf
can be used to do one-step beta reduction if the inner term is already a hnf:The last theorem is a generalization of the above one, showing that
principle_hnf
can be used to eliminate the outer abstractions of hnf in explicit form, when applied to a list of fresh variables, and the result is a nicetpm
of inner term:Regards,
Chun TIAN
[1] Barendregt, H.P.: The Lambda Calculus, Its Syntax and Semantics.
College Publications, London (1984).