32 *} |
32 *} |
33 |
33 |
34 |
34 |
35 (** Lemmas for showing that <a,b> uniquely determines a and b **) |
35 (** Lemmas for showing that <a,b> uniquely determines a and b **) |
36 |
36 |
37 lemma singleton_eq_iff [iff]: "{a} = {b} <-> a=b" |
37 lemma singleton_eq_iff [iff]: "{a} = {b} \<longleftrightarrow> a=b" |
38 by (rule extension [THEN iff_trans], blast) |
38 by (rule extension [THEN iff_trans], blast) |
39 |
39 |
40 lemma doubleton_eq_iff: "{a,b} = {c,d} <-> (a=c & b=d) | (a=d & b=c)" |
40 lemma doubleton_eq_iff: "{a,b} = {c,d} \<longleftrightarrow> (a=c & b=d) | (a=d & b=c)" |
41 by (rule extension [THEN iff_trans], blast) |
41 by (rule extension [THEN iff_trans], blast) |
42 |
42 |
43 lemma Pair_iff [simp]: "<a,b> = <c,d> <-> a=c & b=d" |
43 lemma Pair_iff [simp]: "<a,b> = <c,d> \<longleftrightarrow> a=c & b=d" |
44 by (simp add: Pair_def doubleton_eq_iff, blast) |
44 by (simp add: Pair_def doubleton_eq_iff, blast) |
45 |
45 |
46 lemmas Pair_inject = Pair_iff [THEN iffD1, THEN conjE, elim!] |
46 lemmas Pair_inject = Pair_iff [THEN iffD1, THEN conjE, elim!] |
47 |
47 |
48 lemmas Pair_inject1 = Pair_iff [THEN iffD1, THEN conjunct1] |
48 lemmas Pair_inject1 = Pair_iff [THEN iffD1, THEN conjunct1] |
74 |
74 |
75 subsection{*Sigma: Disjoint Union of a Family of Sets*} |
75 subsection{*Sigma: Disjoint Union of a Family of Sets*} |
76 |
76 |
77 text{*Generalizes Cartesian product*} |
77 text{*Generalizes Cartesian product*} |
78 |
78 |
79 lemma Sigma_iff [simp]: "<a,b>: Sigma(A,B) <-> a:A & b:B(a)" |
79 lemma Sigma_iff [simp]: "<a,b>: Sigma(A,B) \<longleftrightarrow> a:A & b:B(a)" |
80 by (simp add: Sigma_def) |
80 by (simp add: Sigma_def) |
81 |
81 |
82 lemma SigmaI [TC,intro!]: "[| a:A; b:B(a) |] ==> <a,b> \<in> Sigma(A,B)" |
82 lemma SigmaI [TC,intro!]: "[| a:A; b:B(a) |] ==> <a,b> \<in> Sigma(A,B)" |
83 by simp |
83 by simp |
84 |
84 |
148 apply (erule SigmaE, auto) |
148 apply (erule SigmaE, auto) |
149 done |
149 done |
150 |
150 |
151 lemma expand_split: |
151 lemma expand_split: |
152 "u: A*B ==> |
152 "u: A*B ==> |
153 R(split(c,u)) <-> (\<forall>x\<in>A. \<forall>y\<in>B. u = <x,y> \<longrightarrow> R(c(x,y)))" |
153 R(split(c,u)) \<longleftrightarrow> (\<forall>x\<in>A. \<forall>y\<in>B. u = <x,y> \<longrightarrow> R(c(x,y)))" |
154 apply (simp add: split_def) |
154 apply (simp add: split_def) |
155 apply auto |
155 apply auto |
156 done |
156 done |
157 |
157 |
158 |
158 |
175 text {* |
175 text {* |
176 \bigskip Complex rules for Sigma. |
176 \bigskip Complex rules for Sigma. |
177 *} |
177 *} |
178 |
178 |
179 lemma split_paired_Bex_Sigma [simp]: |
179 lemma split_paired_Bex_Sigma [simp]: |
180 "(\<exists>z \<in> Sigma(A,B). P(z)) <-> (\<exists>x \<in> A. \<exists>y \<in> B(x). P(<x,y>))" |
180 "(\<exists>z \<in> Sigma(A,B). P(z)) \<longleftrightarrow> (\<exists>x \<in> A. \<exists>y \<in> B(x). P(<x,y>))" |
181 by blast |
181 by blast |
182 |
182 |
183 lemma split_paired_Ball_Sigma [simp]: |
183 lemma split_paired_Ball_Sigma [simp]: |
184 "(\<forall>z \<in> Sigma(A,B). P(z)) <-> (\<forall>x \<in> A. \<forall>y \<in> B(x). P(<x,y>))" |
184 "(\<forall>z \<in> Sigma(A,B). P(z)) \<longleftrightarrow> (\<forall>x \<in> A. \<forall>y \<in> B(x). P(<x,y>))" |
185 by blast |
185 by blast |
186 |
186 |
187 end |
187 end |
188 |
188 |
189 |
189 |