Commit 0a55fc55 authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

`Inj` instances for set and multiset singletons.

parent 47b6bcc0
Pipeline #45386 passed with stage
in 9 minutes and 14 seconds
......@@ -380,6 +380,12 @@ Section more_lemmas.
Proof. multiset_solver. Qed.
(** Misc *)
Global Instance gmultiset_singleton_inj : Inj (=) (=@{gmultiset A}) singletonMS.
intros x1 x2 Hx. rewrite gmultiset_eq in Hx. specialize (Hx x1).
rewrite multiplicity_singleton, multiplicity_singleton' in Hx.
case_decide; [done|lia].
Lemma gmultiset_non_empty_singleton x : {[+ x +]} @{gmultiset A} .
Proof. multiset_solver. Qed.
......@@ -364,6 +364,10 @@ Section semi_set.
Proof. set_solver. Qed.
Lemma set_equiv_subseteq X Y : X Y X Y Y X.
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 *)
Global Instance set_subseteq_antisymm: AntiSymm () (@{C}).
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