Skip to content

Commit b6810d5

Browse files
authored
Merge pull request #137 from arthuraa/imfset_eq_fsinjectiveP
Add another equivalence lemma for fsinjectiveb.
2 parents 120e8f9 + 835804b commit b6810d5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

finmap.v

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4166,10 +4166,24 @@ Lemma fsinjectivebP f :
41664166
(fsinjectiveb f).
41674167
Proof. by apply/(iffP (fsinjectiveP _)) => /(fsinjP 0 2). Qed.
41684168

4169+
Lemma imfset_eq_fsinjectiveP f :
4170+
reflect (f @` finsupp f = finsupp f) (fsinjectiveb f).
4171+
Proof.
4172+
apply: (equivP (fsinjectiveP _)); apply: (iff_trans (fsinjP 0 1)) => /=.
4173+
split=> [[f_inj supp_clos]|e_supp].
4174+
- apply/eqP; rewrite -fsubset_leqif_cards ?(introT (card_in_imfsetP _ _)) //.
4175+
apply/fsubsetP=> _ /imfsetP [] /= x x_in ->.
4176+
exact: (supp_clos (Sub x x_in)).
4177+
- split; first by apply/card_in_imfsetP; rewrite e_supp.
4178+
move=> x; rewrite -{2}e_supp; apply/imfsetP.
4179+
by exists (\val x); rewrite // (valP x).
4180+
Qed.
4181+
41694182
End FsfunIdTheory.
41704183

41714184
Arguments fsinjP {K f}.
41724185
Arguments fsinjectiveP {K f}.
41734186
Arguments fsinjectivebP {K f}.
4187+
Arguments imfset_eq_fsinjectiveP {K f}.
41744188

41754189
Definition inE := inE.

0 commit comments

Comments
 (0)