Skip to content
Snippets Groups Projects
Unverified Commit f2098383 authored by Marijn van Wezel's avatar Marijn van Wezel
Browse files

Rewrite injectivity lemma to instance of Inj

parent e7405db5
No related branches found
No related tags found
1 merge request!577Add `gmultiset_map` and associated lemmas
......@@ -821,15 +821,13 @@ Section map.
- rewrite gmultiset_map_disj_union, gmultiset_map_singleton, !multiplicity_disj_union.
destruct (bool_decide (x = x')); multiset_solver.
Qed.
Lemma gmultiset_map_eq_iff f X Y :
Inj (=) (=) f gmultiset_map f X = gmultiset_map f Y X = Y.
Global Instance gmultiset_map_inj f : Inj (=) (=) f Inj (=) (=) (gmultiset_map f).
Proof.
intros Hinj. split; intros Heq.
- apply gmultiset_leibniz; intros x.
rewrite <- !multiplicity_gmultiset_map with f _ _; [|done|done].
by rewrite Heq.
- by subst.
intros Hinj. intros X Y Heq.
apply gmultiset_leibniz; intros x.
rewrite <- !multiplicity_gmultiset_map with f _ _; [|done|done].
by rewrite Heq.
Qed.
Global Instance set_unfold_gmultiset_map f X (P : A Prop) y :
......
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