Skip to content
Snippets Groups Projects
Commit 0a55fc55 authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

`Inj` instances for set and multiset singletons.

parent 47b6bcc0
No related branches found
No related tags found
No related merge requests found
...@@ -380,6 +380,12 @@ Section more_lemmas. ...@@ -380,6 +380,12 @@ Section more_lemmas.
Proof. multiset_solver. Qed. Proof. multiset_solver. Qed.
(** Misc *) (** Misc *)
Global Instance gmultiset_singleton_inj : Inj (=) (=@{gmultiset A}) singletonMS.
Proof.
intros x1 x2 Hx. rewrite gmultiset_eq in Hx. specialize (Hx x1).
rewrite multiplicity_singleton, multiplicity_singleton' in Hx.
case_decide; [done|lia].
Qed.
Lemma gmultiset_non_empty_singleton x : {[+ x +]} ≠@{gmultiset A} ∅. Lemma gmultiset_non_empty_singleton x : {[+ x +]} ≠@{gmultiset A} ∅.
Proof. multiset_solver. Qed. Proof. multiset_solver. Qed.
......
...@@ -364,6 +364,10 @@ Section semi_set. ...@@ -364,6 +364,10 @@ Section semi_set.
Proof. set_solver. Qed. Proof. set_solver. Qed.
Lemma set_equiv_subseteq X Y : X Y X Y Y X. Lemma set_equiv_subseteq X Y : X Y X Y Y X.
Proof. set_solver. Qed. Proof. set_solver. Qed.
Global Instance singleton_equiv_inj : Inj (=) (≡@{C}) singleton.
Proof. unfold Inj. set_solver. Qed.
Global Instance singleton_inj `{!LeibnizEquiv C} : Inj (=) (=@{C}) singleton.
Proof. unfold Inj. set_solver. Qed.
(** Subset relation *) (** Subset relation *)
Global Instance set_subseteq_antisymm: AntiSymm () (⊆@{C}). Global Instance set_subseteq_antisymm: AntiSymm () (⊆@{C}).
......
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