Commit 80b3d10e authored by Robbert Krebbers's avatar Robbert Krebbers

Use `Typeclasses Opaque` for all operational type classes in `base`.

parent 7e77bf8d
This diff is collapsed.
...@@ -191,7 +191,7 @@ Proof. ...@@ -191,7 +191,7 @@ Proof.
Qed. Qed.
Instance coPset_elem_of_dec : RelDecision (@{coPset}). Instance coPset_elem_of_dec : RelDecision (@{coPset}).
Proof. solve_decision. Defined. Proof. unfold elem_of. solve_decision. Defined.
Instance coPset_equiv_dec : RelDecision (@{coPset}). Instance coPset_equiv_dec : RelDecision (@{coPset}).
Proof. refine (λ X Y, cast_if (decide (X = Y))); abstract (by fold_leibniz). Defined. Proof. refine (λ X Y, cast_if (decide (X = Y))); abstract (by fold_leibniz). Defined.
Instance mapset_disjoint_dec : RelDecision (##@{coPset}). Instance mapset_disjoint_dec : RelDecision (##@{coPset}).
......
...@@ -233,7 +233,7 @@ Proof. ...@@ -233,7 +233,7 @@ Proof.
Qed. Qed.
Global Instance map_subseteq_po : PartialOrder (@{M A}). Global Instance map_subseteq_po : PartialOrder (@{M A}).
Proof. Proof.
split; [apply _|]. split; [apply map_included_preorder, _|].
intros m1 m2; rewrite !map_subseteq_spec. intros m1 m2; rewrite !map_subseteq_spec.
intros; apply map_eq; intros i; apply option_eq; naive_solver. intros; apply map_eq; intros i; apply option_eq; naive_solver.
Qed. Qed.
...@@ -1534,8 +1534,10 @@ Qed. ...@@ -1534,8 +1534,10 @@ Qed.
End union_with. End union_with.
(** ** Properties of the [union] operation *) (** ** Properties of the [union] operation *)
Global Instance: LeftId (=@{M A}) () := _. Global Instance: LeftId (=@{M A}) ().
Global Instance: RightId (=@{M A}) () := _. Proof. unfold union; apply _. Qed.
Global Instance: RightId (=@{M A}) ().
Proof. unfold union; apply _. Qed.
Global Instance: Assoc (=@{M A}) (). Global Instance: Assoc (=@{M A}) ().
Proof. Proof.
intros A m1 m2 m3. unfold union, map_union, union_with, map_union_with. intros A m1 m2 m3. unfold union, map_union, union_with, map_union_with.
......
...@@ -122,7 +122,7 @@ Section setoids. ...@@ -122,7 +122,7 @@ Section setoids.
Global Instance option_equivalence : Global Instance option_equivalence :
Equivalence (@{A}) Equivalence (@{option A}). Equivalence (@{A}) Equivalence (@{option A}).
Proof. apply _. Qed. Proof. apply option_Forall2_equiv. Qed.
Global Instance Some_proper : Proper (() ==> (@{option A})) Some. Global Instance Some_proper : Proper (() ==> (@{option A})) Some.
Proof. by constructor. Qed. Proof. by constructor. Qed.
Global Instance Some_equiv_inj : Inj () (@{option A}) Some. Global Instance Some_equiv_inj : Inj () (@{option A}) Some.
......
...@@ -40,9 +40,9 @@ Lemma scons_equiv s1 s2 : shead s1 = shead s2 → stail s1 ≡ stail s2 → s1 ...@@ -40,9 +40,9 @@ Lemma scons_equiv s1 s2 : shead s1 = shead s2 → stail s1 ≡ stail s2 → s1
Proof. by constructor. Qed. Proof. by constructor. Qed.
Global Instance equal_equivalence : Equivalence (@{stream A}). Global Instance equal_equivalence : Equivalence (@{stream A}).
Proof. Proof.
split. unfold equiv, stream_equiv. split.
- now cofix FIX; intros [??]; constructor. - cofix FIX; intros [??]; by constructor.
- now cofix FIX; intros ?? [??]; constructor. - cofix FIX; intros ?? [??]; by constructor.
- cofix FIX; intros ??? [??] [??]; constructor; etrans; eauto. - cofix FIX; intros ??? [??] [??]; constructor; etrans; eauto.
Qed. Qed.
Global Instance scons_proper x : Proper (() ==> ()) (scons x). Global Instance scons_proper x : Proper (() ==> ()) (scons x).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment