aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/FSets/FSetEqProperties.v
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2007-06-07 17:24:03 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2007-06-07 17:24:03 +0000
commitcb25f49dc87eb4a25cbc0a08fdc90c02d4bae373 (patch)
tree98a065ea49f71205c74945c92ee30a07f6641656 /theories/FSets/FSetEqProperties.v
parent1d1d034f68116426508b53ecaaeab49bf2c9eb82 (diff)
* For uniformity, FSetAVL uses Implicit Arguments (a bit)
* Some additionnal properties: - two more induction principles on sets - some results about union, filter, etc - Subset is declared to be a Setoid Relation git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9882 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/FSets/FSetEqProperties.v')
-rw-r--r--theories/FSets/FSetEqProperties.v17
1 files changed, 17 insertions, 0 deletions
diff --git a/theories/FSets/FSetEqProperties.v b/theories/FSets/FSetEqProperties.v
index 4645a6bbc..a970c092d 100644
--- a/theories/FSets/FSetEqProperties.v
+++ b/theories/FSets/FSetEqProperties.v
@@ -665,6 +665,23 @@ Proof.
auto.
Qed.
+Lemma filter_add_1 : forall s x, f x = true ->
+ filter f (add x s) [=] add x (filter f s).
+Proof.
+red; intros; set_iff; do 2 (rewrite filter_iff; auto); set_iff.
+intuition.
+rewrite <- H; apply Comp; auto.
+Qed.
+
+Lemma filter_add_2 : forall s x, f x = false ->
+ filter f (add x s) [=] filter f s.
+Proof.
+red; intros; do 2 (rewrite filter_iff; auto); set_iff.
+intuition.
+assert (f x = f a) by (apply Comp; auto).
+rewrite H in H1; rewrite H2 in H1; discriminate.
+Qed.
+
Lemma add_filter_1 : forall s s' x,
f x=true -> (Add x s s') -> (Add x (filter f s) (filter f s')).
Proof.