Skip to content
Snippets Groups Projects
Commit abba5b45 authored by Matthieu Sozeau's avatar Matthieu Sozeau
Browse files

Backward compatible fix for Coq PR#7916

parent e1eaa456
Branches coq-13969
No related tags found
No related merge requests found
Pipeline #48003 passed
...@@ -13,6 +13,8 @@ Set Primitive Projections. ...@@ -13,6 +13,8 @@ Set Primitive Projections.
(** Unbundled version *) (** Unbundled version *)
Class Dist A := dist : nat relation A. Class Dist A := dist : nat relation A.
Global Instance dist_rewrite {A} (d : Dist A) x : RewriteRelation (dist x) := {}.
Global Hint Mode RewriteRelation - - : typeclass_instances.
Global Instance: Params (@dist) 3 := {}. Global Instance: Params (@dist) 3 := {}.
Notation "x ≡{ n }≡ y" := (dist n x y) Notation "x ≡{ n }≡ y" := (dist n x y)
(at level 70, n at next level, format "x ≡{ n }≡ y"). (at level 70, n at next level, format "x ≡{ n }≡ y").
...@@ -653,9 +655,9 @@ End empty. ...@@ -653,9 +655,9 @@ End empty.
Section product. Section product.
Context {A B : ofe}. Context {A B : ofe}.
Typeclasses Transparent dist.
Local Instance prod_dist : Dist (A * B) := λ n, prod_relation (dist n) (dist n). Local Instance prod_dist : Dist (A * B) := λ n, prod_relation (dist n) (dist n).
Global Instance pair_ne : Global Instance pair_ne : NonExpansive2 (@pair A B) := _.
NonExpansive2 (@pair A B) := _.
Global Instance fst_ne : NonExpansive (@fst A B) := _. Global Instance fst_ne : NonExpansive (@fst A B) := _.
Global Instance snd_ne : NonExpansive (@snd A B) := _. Global Instance snd_ne : NonExpansive (@snd A B) := _.
Definition prod_ofe_mixin : OfeMixin (A * B). Definition prod_ofe_mixin : OfeMixin (A * B).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment