-
Notifications
You must be signed in to change notification settings - Fork 67
Adapt to rocq#21180 #907
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
Adapt to rocq#21180 #907
Conversation
This is a bit weird because the point of the eta-expansion is to make an evar instantiation succeed by making another evar forget one of its arguments. Yet, once the arguments make it into the second evar's context, the algorithm stops complaining about them and leaves them be. It would be best to detect this and make the instantiation work without absorbing the arguments, but I am not sure if there is a way to do this. |
I had the impression Rocq's evars had a filter on the context to implement pruning without having to assign them (to a lambda ignoring the argument). |
If I understand correctly, that is for the arguments that are already in the context of the evar, not those that the evar is applied to. |
Yes. Oh, I think I misread the test. I think it should be IMO the old test had a mistake. Fixing that still requires the call to unify-eq? |
You need |
tests-stdlib/test_quotation.v
Outdated
std.assert-ok! (coq.elaborate-skeleton T _ T1) "does not typecheck", | ||
T1 = {{ fun u => SubType _ _ _ _ (lp:K u) _ }}, | ||
T1 = {{ fun u => SubType _ _ _ _ lp:(X u) _ }}, | ||
(@pi-decl _ {{ nat }} u\ coq.unify-eq (X u) {{ lp:K lp:u }} ok), |
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 think I see now what you are doing. Maybe
(pi u\ X u = app[global GR,u]) % Rocq <= 9.1
;
(pi u\ X u = app[(fun _ _ _\ app[global GR,u]),_]) % Rocq > 9.1
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.
Anyway, the test checks that the "magic record constructor" of mathcomp infers Ord
. If now it infers something different, it may have consequences in MC as well.
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.
That also works.
In one of the tests, rocq-prover/rocq#21180 encounters a non-pattern fragment unification problem and produces an eta-expansion that breaks Rocq-Elpi's unifier.