-
Notifications
You must be signed in to change notification settings - Fork 9
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
Auto-instantiate proof of adjunction alongside section and retraction (cf., #57) #68
Conversation
A proof later in the module relies on definitional equalities of the initially generated retraction proof not shared by the adjunction-augmented version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exciting! A few comments. Please also add tests for adjunction inside of Test.v, and make sure that you run all of them and that it works correctly.
Linking to #39 also |
All requests for changes have been addressed, with the exception of the naming scheme and a line in the example script; I asked follow-up questions in reply to those comments. All tests pass. |
Ah, it seems that I've let this linger too long, and there are now merge conflicts. They're pretty innocuous, so I'll leave them be for now, in case you'd like to inspect. |
Yeah, don't bother trying the merge, I'll do it once everything is addressed |
All done with requested changes! After switching the initial retraction name back to |
LGTM, I will take over and try the merge. |
Thanks for the great work!! |
This PR pulls in Jasper's HoTT module for adjointifying equivalences and applies its generic lemmas when equivalence-proving is enabled. The module is placed at
theories/Adjoint.v
.For an ornament named
${ornament}
, this feature instantiates Jasper'sfg_id'
(to adjointify retraction) as${ornament}_retraction
andf_adjoint
(to prove adjunction) as${ornament}_adjunction
.The initial retraction proof (which is an input to the previous two lemmas) is now generated as
${ornament}_retraction0
to prevent a name collision. To actually benefit from the adjunction theorem, rewritings need to use the adjointified retraction lemma, hence the preferential naming scheme.The test script (
test.sh
) passes successfully.Some potential design concerns:
Adjoint.v
module translated to use Ltac proof scripts instead of terms?refold_retraction
inExample.v
does not hold, though a different proof could plausibly work).If satisfactory, this feature would resolve issue #57.