forked from UniMath/UniMath
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wtypes #1
Closed
Closed
Wtypes #1
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Derivation of the propositional computation rule 'beta' for the ground term algebra. In doing so I also reformalized the propositional introduction and elimination principles. The idea beneath the proof is to take the already proved results in 'Terms.v' for the ground algebra and translate them in the appropriate context. These are 'build_gterm', 'term_ind' and 'term_ind_step' and I translated them respectively in 'sup' 'ind' and 'beta'. The "translation" is just the image of the terms above via some equivalences. Those equivalences are obtained by combining together the following basic equivalences via 'weqonsec' and its variations: - 'gtweq_sec' which translate the "subterms' vector" to the function "selecting the subtree"; - 'lower_predicate' which "forgets" the sort's parameter of terms, which is always 'tt' in this case; - 'ind_HP_Hypo' which translates the vector of the inductive hypothesis on subterm in the function of the inductive hypothesis on subtrees. Making this equivalence compute propperly and understanding the relation between 'h2map' and the relevant lambda term in 'beta' was the main challenge. This also required various lemmas about 'vec_fill' in 'Vectors.v' and 'Hvectors.v'. A smart trick seemed to first prove 'beta' changing its variables with the corresponding variables in the preimages of their translation, thus making explicit in the goal the translation equivalences. Finally the correct statement is proved via weqonsecbase in a bit cluncky but straightforward way. - Some improvements in 'Vectors.v' and 'Hvectors.v' made for completeness or needed for the proof above.
3d4d406
to
cc80340
Compare
Commits imported off-line. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The ground term algebra is a W-type.
Derivation of the propositional computation rule 'beta' for the ground term algebra. In doing so I also reformalized the propositional introduction and elimination principles.
The idea beneath the proof is to take the already proved results in
Terms.v
for the ground algebra and translate them in the appropriate context. These arebuild_gterm
,term_ind
andterm_ind_step
and I translated them respectively insup
,ind
andbeta
. The "translation" is just the image of the terms above via some equivalences. Those equivalences are obtained by combining together the following basic equivalences viaweqonsec
and its variations:gtweq_sec
which translate the "subterms' vector" to the function "selecting the subtree";lower_predicate
which "forgets" the sort's parameter of terms, which is alwaystt
in this case;ind_HP_Hypo
which translates the vector of the inductive hypothesis on subterm in the function of the inductive hypothesis on subtrees. Making this equivalence compute propperly and understanding the relation betweenh2map
and the relevant lambda term inbeta
was the main challenge. This also required various lemmas aboutvec_fill
inVectors.v
andHvectors.v
.A smart trick seemed to first prove
beta
changing its variables with the corresponding variables in the preimages of their translation, thus making explicit in the goal the translation equivalences. Finally the correct statement is proved viaweqonsecbase
in a bit clunky but straightforward way.Some improvements in
Vectors.v
andHvectors.v
made for completeness or needed for the proof above.