Skip to content
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
wants to merge 20 commits into from
Closed

Wtypes #1

wants to merge 20 commits into from

Conversation

CalosciMatteo
Copy link
Collaborator

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 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 clunky but straightforward way.

  • Some improvements in Vectors.v and Hvectors.v made for completeness or needed for the proof above.

amato-gianluca and others added 20 commits April 13, 2023 17:58
- 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.
@amato-gianluca amato-gianluca force-pushed the wtypes branch 5 times, most recently from 3d4d406 to cc80340 Compare January 29, 2024 16:39
@amato-gianluca
Copy link
Owner

Commits imported off-line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants