-
Notifications
You must be signed in to change notification settings - Fork 701
Add parsing and interpretation of elimination constraints #21195
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
base: master
Are you sure you want to change the base?
Conversation
|
@coqbot run full ci |
ef9e78a to
69e04cb
Compare
69e04cb to
419734b
Compare
|
something strange is going on in stdlib_test, the message from https://github.com/rocq-prover/stdlib/blob/e343c58314f5a902e08ec6a211f4e1b5812a8c89/test-suite/output/Fixpoint.v#L123 changed to say |
770ece2 to
12d1e20
Compare
|
@coqbot run full ci |
…ntextSet in PConstraints)
2e9e71c to
27104aa
Compare
…ntextSet in PConstraints)
27104aa to
877688b
Compare
mattam82
left a comment
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.
I only have minor comments, I think we will need to play with this code and have a few iterations anyway to ensure its correctness. Just one thing, we don't touch the "broken" transitivity closure issue found by @tabareau here, right? If not I think this can be merged.
| | Irrelevant -> Sorts.sprop | ||
| | Relevant when Universe.is_type0 u -> Sorts.set | ||
| | Relevant -> Sorts.make Sorts.Quality.qtype u | ||
| | Relevant -> Sorts.prop |
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.
The comment above the code becomes misleading if you don't change it. I think the solution is fine, but the comment should reflect it.
| Polymorphic Definition sort'@{s | u |} := Type@{s|u}. | ||
| To help the parser, both `|` in the :n:`@univ_decl` are required. | ||
| To help the parser, both `|` in the :n:`@sort_poly_decl` are required. |
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.
Isn't this outdated? We have @{s;u} already in this branch no?
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.
this is a note about the old syntax (which is still parsed)
I think it is being handled by the changes in |
|
Great! |
Fix refman fix refman more
877688b to
dcbdcb9
Compare
This PR adds the parsing of elimination constraints as defined in the RFC rocq-prover/rfcs#111.
In particular, it adds the possibility to have sort-level constraints in definitions:
Definition foo@{s s'; | s -> s'} ...and for global sorts.
Sort s s'. Constraint s -> s'.make doc_gram_rsts.Overlays (to be merged in sync with the upstream PR)