aboutsummaryrefslogtreecommitdiff
path: root/theories/FSets/FMapFacts.v
diff options
context:
space:
mode:
Diffstat (limited to 'theories/FSets/FMapFacts.v')
-rw-r--r--theories/FSets/FMapFacts.v12
1 files changed, 12 insertions, 0 deletions
diff --git a/theories/FSets/FMapFacts.v b/theories/FSets/FMapFacts.v
index 720bdd4af5..f696ff0754 100644
--- a/theories/FSets/FMapFacts.v
+++ b/theories/FSets/FMapFacts.v
@@ -810,6 +810,18 @@ Module Properties (M: S).
apply H0; constructor; red; auto.
Qed.
+ Lemma cardinal_inv_2b :
+ forall m, cardinal m <> 0 -> { p : key*elt | MapsTo (fst p) (snd p) m }.
+ Proof.
+ intros; unfold cardinal in *.
+ generalize (elements_2 (m:=m)).
+ destruct (elements m).
+ simpl in H; elim H; auto.
+ exists p; auto.
+ destruct p; simpl; auto.
+ apply H0; constructor; red; auto.
+ Qed.
+
Lemma cardinal_1 : forall (m:t elt), Empty m -> cardinal m = 0.
Proof.
intros; rewrite <- cardinal_Empty; auto.