-
Notifications
You must be signed in to change notification settings - Fork 632
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
over tactic fails after rewrite #11118
Comments
CC @erikmd |
Dear @mrhaandi, thanks for the question. Indeed, the issue you observe comes from the fact
So to fix you proof script, I'll suggest you just do
or more succinctly:
|
I see, thank you @erikmd .
Since |
Erik, I don't get why the evar that was touched by rewrite cannot be instantiated. Isn't it a weakness of reflexivity (unification)? |
I don't mind hardwiring in the pattern selection algorithm a blacklist for the last argument of under_eq, I think it is a feature of more general interest, but I want to understand what fails precisely. |
In the meantime I suggest you use the pattern, you can also do as for LHS, see bigop.v, to define a shorthand. If you are consistent then porting your scripts to a fixed version of SSR can be done with a simple search/replace. |
Yes, and BTW
No, this occurs precisely because the lemma that is rewritten here falls in the following corner case:
Sounds a good idea 👍 (I don't see other solutions apart from that and the use of an occurrence selector / contextual pattern) |
Hi @gares
IINM that blacklisting for can you have a look in the upcoming days? (I'd be willing to help if need be, but I am not familiar with the pattern selection algo implemented in that file; (reminder: |
I'm sorry but I'm a bit busy. What I had in mind is to have in ssrmatching.v a transparent polymorphic identity function called coq/plugins/ssrmatching/ssrmatching.ml Line 548 in 2184cdb
coq/plugins/ssrmatching/ssrmatching.ml Line 592 in 2184cdb
coq/plugins/ssrmatching/ssrmatching.ml Line 757 in 2184cdb
There we look at the head constant of a subterm of the goal, and do stuff. If that f is the special identity, then we should skip things accordingly.
Then under generates the goal |
This is to deal with the corner case |
FTR, this feature should be documented next to |
Thanks @gares for your comments! A question on a detail:
you seem to suggest here to add the |
Sure, I think I'd be fine with a |
Description of the problem
Reading the documentation of the under/over tactics, the following Lemmas
works
andfails
should be equivalent. However, afterunder
, a rewrite causesover
to fail saying "No applicable tactic.".Maybe, the rewrite also changes something that is supposed to be hidden behind the scenes.
Coq Version
8.10.1
The text was updated successfully, but these errors were encountered: