Commit 72bfb1ea authored by Robbert Krebbers's avatar Robbert Krebbers

More coPset deciders.

parent 6dbe0c27
...@@ -159,7 +159,6 @@ Instance coPset_difference : Difference coPset := λ X Y, ...@@ -159,7 +159,6 @@ Instance coPset_difference : Difference coPset := λ X Y,
let (t1,Ht1) := X in let (t2,Ht2) := Y in let (t1,Ht1) := X in let (t2,Ht2) := Y in
(t1 coPset_opp_raw t2) coPset_intersection_wf _ _ Ht1 (coPset_opp_wf _). (t1 coPset_opp_raw t2) coPset_intersection_wf _ _ Ht1 (coPset_opp_wf _).
Instance coPset_elem_of_dec (p : positive) (X : coPset) : Decision (p X) := _.
Instance coPset_collection : Collection positive coPset. Instance coPset_collection : Collection positive coPset.
Proof. Proof.
split; [split| |]. split; [split| |].
...@@ -173,12 +172,28 @@ Proof. ...@@ -173,12 +172,28 @@ Proof.
by rewrite elem_to_Pset_intersection, by rewrite elem_to_Pset_intersection,
elem_to_Pset_opp, andb_True, negb_True. elem_to_Pset_opp, andb_True, negb_True.
Qed. Qed.
Instance coPset_leibniz : LeibnizEquiv coPset. Instance coPset_leibniz : LeibnizEquiv coPset.
Proof. Proof.
intros X Y; rewrite elem_of_equiv; intros HXY. intros X Y; rewrite elem_of_equiv; intros HXY.
apply (sig_eq_pi _), coPset_eq; try apply proj2_sig. apply (sig_eq_pi _), coPset_eq; try apply proj2_sig.
intros p; apply eq_bool_prop_intro, (HXY p). intros p; apply eq_bool_prop_intro, (HXY p).
Qed. Qed.
Instance coPset_elem_of_dec (p : positive) (X : coPset) : Decision (p X) := _.
Instance coPset_equiv_dec (X Y : coPset) : Decision (X Y).
Proof. refine (cast_if (decide (X = Y))); abstract (by fold_leibniz). Defined.
Instance mapset_disjoint_dec (X Y : coPset) : Decision (X Y).
Proof.
refine (cast_if (decide (X Y = )));
abstract (by rewrite disjoint_intersection_L).
Defined.
Instance mapset_subseteq_dec (X Y : coPset) : Decision (X Y).
Proof.
refine (cast_if (decide (X Y = Y))); abstract (by rewrite subseteq_union_L).
Defined.
(** * Top *)
Lemma coPset_top_subseteq (X : coPset) : X . Lemma coPset_top_subseteq (X : coPset) : X .
Proof. done. Qed. Proof. done. Qed.
Hint Resolve coPset_top_subseteq. Hint Resolve coPset_top_subseteq.
......
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