-
Notifications
You must be signed in to change notification settings - Fork 7
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
le is not a Rewriteable Relation #65
Comments
Comment author: @gares In ssreflect we use Rewrite.is_applied_rewrite_relation to detects if a relation symbol can be handled by the setoid rewrite machinery. Such API tries to resolve a TC instance for (RewriteRelation le) and fails. Declaring the instance by hand solves the problem. I'd add the declaration myself, but I'm not sure if:
Best |
Comment author: @robbertkrebbers The situation became considerable worse in 8.6. Example: (** BEGIN **)
Require Import mathcomp.ssreflect.ssreflect.
Require Import Setoid.
Class Comm {A} (R : relation A) (f : A -> A -> A) :=
comm : forall x y, R (f x y) (f y x).
Instance plus_comm : Comm eq plus. Admitted.
Lemma foo x y : x + y = y + x.
Proof.
Fail rewrite comm.
(* Error: not a rewritable relation: (_ (_ _ _) (_ _ _))
in rule comm *)
rewrite ->comm.
(* works *)
Restart.
(* Removing the following hint makes it work *)
Remove Hints RewriteRelation_instance_2 : typeclass_instances.
rewrite comm.
(* works *)
(** END *) My analysis of the problem:
RewriteRelation R
RewriteRelation ?R
where ?R is an evar.
|
@mattam82 is this issue still a current? |
I believe so |
Note: the issue was created automatically with bugzilla2github tool
Original bug ID: BZ#4549
From: @gares
Reported version: 8.5
CC: @robbertkrebbers, @mattam82, @RalfJung
The text was updated successfully, but these errors were encountered: