-
Notifications
You must be signed in to change notification settings - Fork 84
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
Add PCUIC versions of tmQuote
and related template monad definitions
#776
Conversation
3723202
to
36d10a1
Compare
I'm not sure I understand the goal of having the template monad in PCUIC. PCUIC does not have a runtime so what is it supposed to be? To my mind, PCUIC should be plainly about the theory / specification, and Template should be about the implementation. In that respect, having the type checker in PCUIC is wrong but well… |
I guess calling it "a PCUIC version of the template monad" is perhaps a bit misleading or over-general; the thing I actually need here is "a PCUIC version of tmQuote". I have written a Gallina function Said another way, I'm trying to prove Löb's theorem about the theory. This is a lot nicer if I can leverage notations and tactics to to quotation for me rather than having to do it all by hand. |
tmQuote
and related template monad definitions
Well, typing also exists for Template: https://github.com/MetaCoq/metacoq/blob/coq-8.16/template-coq/theories/Typing.v#L741 and the translations between Template and PCUIC are both shown to be type preserving I think. |
Ah, neat, thank you! How much of the theory is present for typing derivations in Template? (Is there a fueled axiom-free reflective typechecker for typing deriviations, for example?) |
e01490c
to
5e202e8
Compare
1481cac
to
71a4cc0
Compare
I guess once we get the trailing whitespace one we can revisit this. Having a monad that works on the PCUIC presentation does not sound bad to me, it's a lot easier to program in Coq on PCUIC terms without having to worry about well-formendness than on "template" ones. |
71a4cc0
to
a3238c7
Compare
f3a8649
to
e42648c
Compare
1c04a7e
to
a6bb058
Compare
This will allow easier creation of developments that reason about doubly-quoted terms and judgments.
454e942
to
651aa9f
Compare
The updated version of MetaCoq#789 managed to define `trans_mutual_inductive_entry`
Dependencies have been merged, this should finally be ready for review and hopefully merging. I've added some tests to the test-suite as well. |
LGTM ! |
On top of #774
This will allow easier creation of developments that reason about doubly-quoted terms and judgments. (In particular, I'm trying to prove Löb's theorem.)
This PR should compile, and I think it's basically ready, but I'm not terribly happy with the names, and it currently uses a hack to get a fixpoint combinator in the template monad. Please suggest better names, better organization, better implementations, etc.
Note that I needed
Local Unset Universe Minimization ToSet.
in a couple places to avoid universe inconsistencies.