Skip to content
Snippets Groups Projects
Commit 00daaf86 authored by Matthieu Sozeau's avatar Matthieu Sozeau Committed by Robbert Krebbers
Browse files

Set the priority of the rewrite relation for equiv to not take precedence over...

parent f23a05c3
No related branches found
No related tags found
No related merge requests found
...@@ -252,10 +252,13 @@ Global Hint Mode Equiv ! : typeclass_instances. *) ...@@ -252,10 +252,13 @@ Global Hint Mode Equiv ! : typeclass_instances. *)
(** We instruct setoid rewriting to infer [equiv] as a relation on (** We instruct setoid rewriting to infer [equiv] as a relation on
type [A] when needed. This allows setoid_rewrite to solve constraints type [A] when needed. This allows setoid_rewrite to solve constraints
of shape [Proper (eq ==> ?R) f] using [Proper (eq ==> (equiv (A:=A))) f] of shape [Proper (eq ==> ?R) f] using [Proper (eq ==> (equiv (A:=A))) f]
when an equivalence relation is available on type [A]. *) when an equivalence relation is available on type [A]. We put this instance
at level 150 so it does not take precedence over Coq's stdlib instances,
favoring inference of [eq] (all Coq functions are automatically morphisms
for [eq]). *)
Global Instance equiv_rewrite_relation `{Equiv A} : Global Instance equiv_rewrite_relation `{Equiv A} :
RewriteRelation (@equiv A _) := {}. RewriteRelation (@equiv A _) | 150 := {}.
Infix "≡" := equiv (at level 70, no associativity) : stdpp_scope. Infix "≡" := equiv (at level 70, no associativity) : stdpp_scope.
Infix "≡@{ A }" := (@equiv A _) Infix "≡@{ A }" := (@equiv A _)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment