author | wenzelm |
Mon, 03 Nov 1997 12:24:13 +0100 | |
changeset 4091 | 771b1f6422a8 |
parent 3894 | 8b9f0bc6dc1a |
child 4152 | 451104c223e2 |
permissions | -rw-r--r-- |
1461 | 1 |
(* Title: ZF/Cardinal.ML |
435 | 2 |
ID: $Id$ |
1461 | 3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
435 | 4 |
Copyright 1994 University of Cambridge |
5 |
||
6 |
Cardinals in Zermelo-Fraenkel Set Theory |
|
7 |
||
8 |
This theory does NOT assume the Axiom of Choice |
|
9 |
*) |
|
10 |
||
11 |
open Cardinal; |
|
12 |
||
13 |
(*** The Schroeder-Bernstein Theorem -- see Davey & Priestly, page 106 ***) |
|
14 |
||
15 |
(** Lemma: Banach's Decomposition Theorem **) |
|
16 |
||
17 |
goal Cardinal.thy "bnd_mono(X, %W. X - g``(Y - f``W))"; |
|
18 |
by (rtac bnd_monoI 1); |
|
19 |
by (REPEAT (ares_tac [Diff_subset, subset_refl, Diff_mono, image_mono] 1)); |
|
760 | 20 |
qed "decomp_bnd_mono"; |
435 | 21 |
|
22 |
val [gfun] = goal Cardinal.thy |
|
1461 | 23 |
"g: Y->X ==> \ |
24 |
\ g``(Y - f`` lfp(X, %W. X - g``(Y - f``W))) = \ |
|
435 | 25 |
\ X - lfp(X, %W. X - g``(Y - f``W)) "; |
26 |
by (res_inst_tac [("P", "%u. ?v = X-u")] |
|
27 |
(decomp_bnd_mono RS lfp_Tarski RS ssubst) 1); |
|
4091 | 28 |
by (simp_tac (simpset() addsimps [subset_refl, double_complement, |
1461 | 29 |
gfun RS fun_is_rel RS image_subset]) 1); |
760 | 30 |
qed "Banach_last_equation"; |
435 | 31 |
|
32 |
val prems = goal Cardinal.thy |
|
33 |
"[| f: X->Y; g: Y->X |] ==> \ |
|
34 |
\ EX XA XB YA YB. (XA Int XB = 0) & (XA Un XB = X) & \ |
|
35 |
\ (YA Int YB = 0) & (YA Un YB = Y) & \ |
|
36 |
\ f``XA=YA & g``YB=XB"; |
|
37 |
by (REPEAT |
|
38 |
(FIRSTGOAL |
|
39 |
(resolve_tac [refl, exI, conjI, Diff_disjoint, Diff_partition]))); |
|
40 |
by (rtac Banach_last_equation 3); |
|
41 |
by (REPEAT (resolve_tac (prems@[fun_is_rel, image_subset, lfp_subset]) 1)); |
|
760 | 42 |
qed "decomposition"; |
435 | 43 |
|
44 |
val prems = goal Cardinal.thy |
|
45 |
"[| f: inj(X,Y); g: inj(Y,X) |] ==> EX h. h: bij(X,Y)"; |
|
46 |
by (cut_facts_tac prems 1); |
|
47 |
by (cut_facts_tac [(prems RL [inj_is_fun]) MRS decomposition] 1); |
|
4091 | 48 |
by (blast_tac (claset() addSIs [restrict_bij,bij_disjoint_Un] |
435 | 49 |
addIs [bij_converse_bij]) 1); |
50 |
(* The instantiation of exI to "restrict(f,XA) Un converse(restrict(g,YB))" |
|
51 |
is forced by the context!! *) |
|
760 | 52 |
qed "schroeder_bernstein"; |
435 | 53 |
|
54 |
||
55 |
(** Equipollence is an equivalence relation **) |
|
56 |
||
845
825e96b87ef7
Added Krzysztof's theorem LeastI2. Proof of sum_eqpoll_cong
lcp
parents:
833
diff
changeset
|
57 |
goalw Cardinal.thy [eqpoll_def] "!!f A B. f: bij(A,B) ==> A eqpoll B"; |
825e96b87ef7
Added Krzysztof's theorem LeastI2. Proof of sum_eqpoll_cong
lcp
parents:
833
diff
changeset
|
58 |
by (etac exI 1); |
825e96b87ef7
Added Krzysztof's theorem LeastI2. Proof of sum_eqpoll_cong
lcp
parents:
833
diff
changeset
|
59 |
qed "bij_imp_eqpoll"; |
825e96b87ef7
Added Krzysztof's theorem LeastI2. Proof of sum_eqpoll_cong
lcp
parents:
833
diff
changeset
|
60 |
|
825e96b87ef7
Added Krzysztof's theorem LeastI2. Proof of sum_eqpoll_cong
lcp
parents:
833
diff
changeset
|
61 |
(*A eqpoll A*) |
825e96b87ef7
Added Krzysztof's theorem LeastI2. Proof of sum_eqpoll_cong
lcp
parents:
833
diff
changeset
|
62 |
bind_thm ("eqpoll_refl", id_bij RS bij_imp_eqpoll); |
435 | 63 |
|
64 |
goalw Cardinal.thy [eqpoll_def] "!!X Y. X eqpoll Y ==> Y eqpoll X"; |
|
4091 | 65 |
by (blast_tac (claset() addIs [bij_converse_bij]) 1); |
760 | 66 |
qed "eqpoll_sym"; |
435 | 67 |
|
68 |
goalw Cardinal.thy [eqpoll_def] |
|
69 |
"!!X Y. [| X eqpoll Y; Y eqpoll Z |] ==> X eqpoll Z"; |
|
4091 | 70 |
by (blast_tac (claset() addIs [comp_bij]) 1); |
760 | 71 |
qed "eqpoll_trans"; |
435 | 72 |
|
73 |
(** Le-pollence is a partial ordering **) |
|
74 |
||
75 |
goalw Cardinal.thy [lepoll_def] "!!X Y. X<=Y ==> X lepoll Y"; |
|
437 | 76 |
by (rtac exI 1); |
77 |
by (etac id_subset_inj 1); |
|
760 | 78 |
qed "subset_imp_lepoll"; |
435 | 79 |
|
1609 | 80 |
bind_thm ("lepoll_refl", subset_refl RS subset_imp_lepoll); |
81 |
||
82 |
bind_thm ("le_imp_lepoll", le_imp_subset RS subset_imp_lepoll); |
|
435 | 83 |
|
84 |
goalw Cardinal.thy [eqpoll_def, bij_def, lepoll_def] |
|
85 |
"!!X Y. X eqpoll Y ==> X lepoll Y"; |
|
2875 | 86 |
by (Blast_tac 1); |
760 | 87 |
qed "eqpoll_imp_lepoll"; |
435 | 88 |
|
89 |
goalw Cardinal.thy [lepoll_def] |
|
90 |
"!!X Y. [| X lepoll Y; Y lepoll Z |] ==> X lepoll Z"; |
|
4091 | 91 |
by (blast_tac (claset() addIs [comp_inj]) 1); |
760 | 92 |
qed "lepoll_trans"; |
435 | 93 |
|
94 |
(*Asymmetry law*) |
|
95 |
goalw Cardinal.thy [lepoll_def,eqpoll_def] |
|
96 |
"!!X Y. [| X lepoll Y; Y lepoll X |] ==> X eqpoll Y"; |
|
97 |
by (REPEAT (etac exE 1)); |
|
98 |
by (rtac schroeder_bernstein 1); |
|
99 |
by (REPEAT (assume_tac 1)); |
|
760 | 100 |
qed "eqpollI"; |
435 | 101 |
|
102 |
val [major,minor] = goal Cardinal.thy |
|
103 |
"[| X eqpoll Y; [| X lepoll Y; Y lepoll X |] ==> P |] ==> P"; |
|
437 | 104 |
by (rtac minor 1); |
435 | 105 |
by (REPEAT (resolve_tac [major, eqpoll_imp_lepoll, eqpoll_sym] 1)); |
760 | 106 |
qed "eqpollE"; |
435 | 107 |
|
108 |
goal Cardinal.thy "X eqpoll Y <-> X lepoll Y & Y lepoll X"; |
|
4091 | 109 |
by (blast_tac (claset() addIs [eqpollI] addSEs [eqpollE]) 1); |
760 | 110 |
qed "eqpoll_iff"; |
435 | 111 |
|
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
112 |
goalw Cardinal.thy [lepoll_def, inj_def] "!!A. A lepoll 0 ==> A = 0"; |
4091 | 113 |
by (blast_tac (claset() addDs [apply_type]) 1); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
114 |
qed "lepoll_0_is_0"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
115 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
116 |
(*0 lepoll Y*) |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
117 |
bind_thm ("empty_lepollI", empty_subsetI RS subset_imp_lepoll); |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
118 |
|
1609 | 119 |
goal Cardinal.thy "A lepoll 0 <-> A=0"; |
4091 | 120 |
by (blast_tac (claset() addIs [lepoll_0_is_0, lepoll_refl]) 1); |
1609 | 121 |
qed "lepoll_0_iff"; |
122 |
||
1709 | 123 |
goalw Cardinal.thy [lepoll_def] |
124 |
"!!A. [| A lepoll B; C lepoll D; B Int D = 0 |] ==> A Un C lepoll B Un D"; |
|
4091 | 125 |
by (blast_tac (claset() addIs [inj_disjoint_Un]) 1); |
1709 | 126 |
qed "Un_lepoll_Un"; |
127 |
||
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
128 |
(*A eqpoll 0 ==> A=0*) |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
129 |
bind_thm ("eqpoll_0_is_0", eqpoll_imp_lepoll RS lepoll_0_is_0); |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
130 |
|
1609 | 131 |
goal Cardinal.thy "A eqpoll 0 <-> A=0"; |
4091 | 132 |
by (blast_tac (claset() addIs [eqpoll_0_is_0, eqpoll_refl]) 1); |
1609 | 133 |
qed "eqpoll_0_iff"; |
134 |
||
135 |
goalw Cardinal.thy [eqpoll_def] |
|
136 |
"!!A. [| A eqpoll B; C eqpoll D; A Int C = 0; B Int D = 0 |] ==> \ |
|
137 |
\ A Un C eqpoll B Un D"; |
|
4091 | 138 |
by (blast_tac (claset() addIs [bij_disjoint_Un]) 1); |
1609 | 139 |
qed "eqpoll_disjoint_Un"; |
140 |
||
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
141 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
142 |
(*** lesspoll: contributions by Krzysztof Grabczewski ***) |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
143 |
|
1609 | 144 |
goalw Cardinal.thy [lesspoll_def] "!!A. A lesspoll B ==> A lepoll B"; |
2875 | 145 |
by (Blast_tac 1); |
1609 | 146 |
qed "lesspoll_imp_lepoll"; |
147 |
||
148 |
goalw Cardinal.thy [lepoll_def] |
|
149 |
"!!A. [| A lepoll B; well_ord(B,r) |] ==> EX s. well_ord(A,s)"; |
|
4091 | 150 |
by (blast_tac (claset() addIs [well_ord_rvimage]) 1); |
1609 | 151 |
qed "lepoll_well_ord"; |
152 |
||
153 |
goalw Cardinal.thy [lesspoll_def] "A lepoll B <-> A lesspoll B | A eqpoll B"; |
|
4091 | 154 |
by (blast_tac (claset() addSIs [eqpollI] addSEs [eqpollE]) 1); |
1609 | 155 |
qed "lepoll_iff_leqpoll"; |
156 |
||
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
157 |
goalw Cardinal.thy [inj_def, surj_def] |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
158 |
"!!f. [| f : inj(A, succ(m)); f ~: surj(A, succ(m)) |] ==> EX f. f:inj(A,m)"; |
4091 | 159 |
by (safe_tac (claset_of ZF.thy)); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
160 |
by (swap_res_tac [exI] 1); |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
161 |
by (res_inst_tac [("a", "lam z:A. if(f`z=m, y, f`z)")] CollectI 1); |
4091 | 162 |
by (best_tac (claset() addSIs [if_type RS lam_type] |
3016 | 163 |
addEs [apply_funtype RS succE]) 1); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
164 |
(*Proving it's injective*) |
4091 | 165 |
by (asm_simp_tac (simpset() setloop split_tac [expand_if]) 1); |
166 |
by (blast_tac (claset() delrules [equalityI]) 1); |
|
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
167 |
qed "inj_not_surj_succ"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
168 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
169 |
(** Variations on transitivity **) |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
170 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
171 |
goalw Cardinal.thy [lesspoll_def] |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
172 |
"!!X. [| X lesspoll Y; Y lesspoll Z |] ==> X lesspoll Z"; |
4091 | 173 |
by (blast_tac (claset() addSEs [eqpollE] addIs [eqpollI, lepoll_trans]) 1); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
174 |
qed "lesspoll_trans"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
175 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
176 |
goalw Cardinal.thy [lesspoll_def] |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
177 |
"!!X. [| X lesspoll Y; Y lepoll Z |] ==> X lesspoll Z"; |
4091 | 178 |
by (blast_tac (claset() addSEs [eqpollE] addIs [eqpollI, lepoll_trans]) 1); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
179 |
qed "lesspoll_lepoll_lesspoll"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
180 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
181 |
goalw Cardinal.thy [lesspoll_def] |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
182 |
"!!X. [| X lesspoll Y; Z lepoll X |] ==> Z lesspoll Y"; |
4091 | 183 |
by (blast_tac (claset() addSEs [eqpollE] addIs [eqpollI, lepoll_trans]) 1); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
184 |
qed "lepoll_lesspoll_lesspoll"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
185 |
|
435 | 186 |
|
187 |
(** LEAST -- the least number operator [from HOL/Univ.ML] **) |
|
188 |
||
189 |
val [premP,premOrd,premNot] = goalw Cardinal.thy [Least_def] |
|
3840 | 190 |
"[| P(i); Ord(i); !!x. x<i ==> ~P(x) |] ==> (LEAST x. P(x)) = i"; |
435 | 191 |
by (rtac the_equality 1); |
4091 | 192 |
by (blast_tac (claset() addSIs [premP,premOrd,premNot]) 1); |
435 | 193 |
by (REPEAT (etac conjE 1)); |
437 | 194 |
by (etac (premOrd RS Ord_linear_lt) 1); |
4091 | 195 |
by (ALLGOALS (blast_tac (claset() addSIs [premP] addSDs [premNot]))); |
760 | 196 |
qed "Least_equality"; |
435 | 197 |
|
3840 | 198 |
goal Cardinal.thy "!!i. [| P(i); Ord(i) |] ==> P(LEAST x. P(x))"; |
435 | 199 |
by (etac rev_mp 1); |
200 |
by (trans_ind_tac "i" [] 1); |
|
201 |
by (rtac impI 1); |
|
202 |
by (rtac classical 1); |
|
2033 | 203 |
by (EVERY1 [stac Least_equality, assume_tac, assume_tac]); |
435 | 204 |
by (assume_tac 2); |
4091 | 205 |
by (blast_tac (claset() addSEs [ltE]) 1); |
760 | 206 |
qed "LeastI"; |
435 | 207 |
|
208 |
(*Proof is almost identical to the one above!*) |
|
3840 | 209 |
goal Cardinal.thy "!!i. [| P(i); Ord(i) |] ==> (LEAST x. P(x)) le i"; |
435 | 210 |
by (etac rev_mp 1); |
211 |
by (trans_ind_tac "i" [] 1); |
|
212 |
by (rtac impI 1); |
|
213 |
by (rtac classical 1); |
|
2033 | 214 |
by (EVERY1 [stac Least_equality, assume_tac, assume_tac]); |
435 | 215 |
by (etac le_refl 2); |
4091 | 216 |
by (blast_tac (claset() addEs [ltE] addIs [leI, ltI, lt_trans1]) 1); |
760 | 217 |
qed "Least_le"; |
435 | 218 |
|
219 |
(*LEAST really is the smallest*) |
|
3840 | 220 |
goal Cardinal.thy "!!i. [| P(i); i < (LEAST x. P(x)) |] ==> Q"; |
437 | 221 |
by (rtac (Least_le RSN (2,lt_trans2) RS lt_irrefl) 1); |
435 | 222 |
by (REPEAT (eresolve_tac [asm_rl, ltE] 1)); |
760 | 223 |
qed "less_LeastE"; |
435 | 224 |
|
1031 | 225 |
(*Easier to apply than LeastI: conclusion has only one occurrence of P*) |
845
825e96b87ef7
Added Krzysztof's theorem LeastI2. Proof of sum_eqpoll_cong
lcp
parents:
833
diff
changeset
|
226 |
qed_goal "LeastI2" Cardinal.thy |
825e96b87ef7
Added Krzysztof's theorem LeastI2. Proof of sum_eqpoll_cong
lcp
parents:
833
diff
changeset
|
227 |
"[| P(i); Ord(i); !!j. P(j) ==> Q(j) |] ==> Q(LEAST j. P(j))" |
825e96b87ef7
Added Krzysztof's theorem LeastI2. Proof of sum_eqpoll_cong
lcp
parents:
833
diff
changeset
|
228 |
(fn prems => [ resolve_tac prems 1, |
1461 | 229 |
rtac LeastI 1, |
230 |
resolve_tac prems 1, |
|
231 |
resolve_tac prems 1 ]); |
|
845
825e96b87ef7
Added Krzysztof's theorem LeastI2. Proof of sum_eqpoll_cong
lcp
parents:
833
diff
changeset
|
232 |
|
437 | 233 |
(*If there is no such P then LEAST is vacuously 0*) |
234 |
goalw Cardinal.thy [Least_def] |
|
3840 | 235 |
"!!P. [| ~ (EX i. Ord(i) & P(i)) |] ==> (LEAST x. P(x)) = 0"; |
437 | 236 |
by (rtac the_0 1); |
2875 | 237 |
by (Blast_tac 1); |
760 | 238 |
qed "Least_0"; |
437 | 239 |
|
3840 | 240 |
goal Cardinal.thy "Ord(LEAST x. P(x))"; |
437 | 241 |
by (excluded_middle_tac "EX i. Ord(i) & P(i)" 1); |
4091 | 242 |
by (safe_tac (claset())); |
437 | 243 |
by (rtac (Least_le RS ltE) 2); |
435 | 244 |
by (REPEAT_SOME assume_tac); |
437 | 245 |
by (etac (Least_0 RS ssubst) 1); |
246 |
by (rtac Ord_0 1); |
|
760 | 247 |
qed "Ord_Least"; |
435 | 248 |
|
249 |
||
250 |
(** Basic properties of cardinals **) |
|
251 |
||
252 |
(*Not needed for simplification, but helpful below*) |
|
253 |
val prems = goal Cardinal.thy |
|
3840 | 254 |
"[| !!y. P(y) <-> Q(y) |] ==> (LEAST x. P(x)) = (LEAST x. Q(x))"; |
4091 | 255 |
by (simp_tac (simpset() addsimps prems) 1); |
760 | 256 |
qed "Least_cong"; |
435 | 257 |
|
1609 | 258 |
(*Need AC to get X lepoll Y ==> |X| le |Y|; see well_ord_lepoll_imp_Card_le |
259 |
Converse also requires AC, but see well_ord_cardinal_eqE*) |
|
435 | 260 |
goalw Cardinal.thy [eqpoll_def,cardinal_def] "!!X Y. X eqpoll Y ==> |X| = |Y|"; |
437 | 261 |
by (rtac Least_cong 1); |
4091 | 262 |
by (blast_tac (claset() addIs [comp_bij, bij_converse_bij]) 1); |
760 | 263 |
qed "cardinal_cong"; |
435 | 264 |
|
265 |
(*Under AC, the premise becomes trivial; one consequence is ||A|| = |A|*) |
|
845
825e96b87ef7
Added Krzysztof's theorem LeastI2. Proof of sum_eqpoll_cong
lcp
parents:
833
diff
changeset
|
266 |
goalw Cardinal.thy [cardinal_def] |
435 | 267 |
"!!A. well_ord(A,r) ==> |A| eqpoll A"; |
437 | 268 |
by (rtac LeastI 1); |
269 |
by (etac Ord_ordertype 2); |
|
845
825e96b87ef7
Added Krzysztof's theorem LeastI2. Proof of sum_eqpoll_cong
lcp
parents:
833
diff
changeset
|
270 |
by (etac (ordermap_bij RS bij_converse_bij RS bij_imp_eqpoll) 1); |
760 | 271 |
qed "well_ord_cardinal_eqpoll"; |
435 | 272 |
|
1609 | 273 |
(* Ord(A) ==> |A| eqpoll A *) |
803
4c8333ab3eae
changed useless "qed" calls for lemmas back to uses of "result",
lcp
parents:
792
diff
changeset
|
274 |
bind_thm ("Ord_cardinal_eqpoll", well_ord_Memrel RS well_ord_cardinal_eqpoll); |
435 | 275 |
|
276 |
goal Cardinal.thy |
|
277 |
"!!X Y. [| well_ord(X,r); well_ord(Y,s); |X| = |Y| |] ==> X eqpoll Y"; |
|
437 | 278 |
by (rtac (eqpoll_sym RS eqpoll_trans) 1); |
279 |
by (etac well_ord_cardinal_eqpoll 1); |
|
4091 | 280 |
by (asm_simp_tac (simpset() addsimps [well_ord_cardinal_eqpoll]) 1); |
760 | 281 |
qed "well_ord_cardinal_eqE"; |
435 | 282 |
|
1609 | 283 |
goal Cardinal.thy |
284 |
"!!X Y. [| well_ord(X,r); well_ord(Y,s) |] ==> |X| = |Y| <-> X eqpoll Y"; |
|
4091 | 285 |
by (blast_tac (claset() addIs [cardinal_cong, well_ord_cardinal_eqE]) 1); |
1609 | 286 |
qed "well_ord_cardinal_eqpoll_iff"; |
287 |
||
435 | 288 |
|
289 |
(** Observations from Kunen, page 28 **) |
|
290 |
||
291 |
goalw Cardinal.thy [cardinal_def] "!!i. Ord(i) ==> |i| le i"; |
|
437 | 292 |
by (etac (eqpoll_refl RS Least_le) 1); |
760 | 293 |
qed "Ord_cardinal_le"; |
435 | 294 |
|
484 | 295 |
goalw Cardinal.thy [Card_def] "!!K. Card(K) ==> |K| = K"; |
437 | 296 |
by (etac sym 1); |
760 | 297 |
qed "Card_cardinal_eq"; |
435 | 298 |
|
845
825e96b87ef7
Added Krzysztof's theorem LeastI2. Proof of sum_eqpoll_cong
lcp
parents:
833
diff
changeset
|
299 |
(* Could replace the ~(j eqpoll i) by ~(i lepoll j) *) |
435 | 300 |
val prems = goalw Cardinal.thy [Card_def,cardinal_def] |
301 |
"[| Ord(i); !!j. j<i ==> ~(j eqpoll i) |] ==> Card(i)"; |
|
2033 | 302 |
by (stac Least_equality 1); |
435 | 303 |
by (REPEAT (ares_tac ([refl,eqpoll_refl]@prems) 1)); |
760 | 304 |
qed "CardI"; |
435 | 305 |
|
306 |
goalw Cardinal.thy [Card_def, cardinal_def] "!!i. Card(i) ==> Ord(i)"; |
|
437 | 307 |
by (etac ssubst 1); |
308 |
by (rtac Ord_Least 1); |
|
760 | 309 |
qed "Card_is_Ord"; |
435 | 310 |
|
765 | 311 |
goal Cardinal.thy "!!K. Card(K) ==> K le |K|"; |
4091 | 312 |
by (asm_simp_tac (simpset() addsimps [le_refl, Card_is_Ord, Card_cardinal_eq]) 1); |
782
200a16083201
added bind_thm for theorems defined by "standard ..."
clasohm
parents:
765
diff
changeset
|
313 |
qed "Card_cardinal_le"; |
765 | 314 |
|
484 | 315 |
goalw Cardinal.thy [cardinal_def] "Ord(|A|)"; |
437 | 316 |
by (rtac Ord_Least 1); |
760 | 317 |
qed "Ord_cardinal"; |
435 | 318 |
|
845
825e96b87ef7
Added Krzysztof's theorem LeastI2. Proof of sum_eqpoll_cong
lcp
parents:
833
diff
changeset
|
319 |
(*The cardinals are the initial ordinals*) |
825e96b87ef7
Added Krzysztof's theorem LeastI2. Proof of sum_eqpoll_cong
lcp
parents:
833
diff
changeset
|
320 |
goal Cardinal.thy "Card(K) <-> Ord(K) & (ALL j. j<K --> ~ j eqpoll K)"; |
4091 | 321 |
by (safe_tac (claset() addSIs [CardI, Card_is_Ord])); |
2875 | 322 |
by (Blast_tac 2); |
845
825e96b87ef7
Added Krzysztof's theorem LeastI2. Proof of sum_eqpoll_cong
lcp
parents:
833
diff
changeset
|
323 |
by (rewrite_goals_tac [Card_def, cardinal_def]); |
1461 | 324 |
by (rtac less_LeastE 1); |
325 |
by (etac subst 2); |
|
845
825e96b87ef7
Added Krzysztof's theorem LeastI2. Proof of sum_eqpoll_cong
lcp
parents:
833
diff
changeset
|
326 |
by (ALLGOALS assume_tac); |
825e96b87ef7
Added Krzysztof's theorem LeastI2. Proof of sum_eqpoll_cong
lcp
parents:
833
diff
changeset
|
327 |
qed "Card_iff_initial"; |
825e96b87ef7
Added Krzysztof's theorem LeastI2. Proof of sum_eqpoll_cong
lcp
parents:
833
diff
changeset
|
328 |
|
1609 | 329 |
goalw Cardinal.thy [lesspoll_def] "!!a. [| Card(a); i<a |] ==> i lesspoll a"; |
330 |
by (dresolve_tac [Card_iff_initial RS iffD1] 1); |
|
4091 | 331 |
by (blast_tac (claset() addSIs [leI RS le_imp_lepoll]) 1); |
1609 | 332 |
qed "lt_Card_imp_lesspoll"; |
333 |
||
437 | 334 |
goal Cardinal.thy "Card(0)"; |
335 |
by (rtac (Ord_0 RS CardI) 1); |
|
4091 | 336 |
by (blast_tac (claset() addSEs [ltE]) 1); |
760 | 337 |
qed "Card_0"; |
437 | 338 |
|
522 | 339 |
val [premK,premL] = goal Cardinal.thy |
340 |
"[| Card(K); Card(L) |] ==> Card(K Un L)"; |
|
341 |
by (rtac ([premK RS Card_is_Ord, premL RS Card_is_Ord] MRS Ord_linear_le) 1); |
|
342 |
by (asm_simp_tac |
|
4091 | 343 |
(simpset() addsimps [premL, le_imp_subset, subset_Un_iff RS iffD1]) 1); |
522 | 344 |
by (asm_simp_tac |
4091 | 345 |
(simpset() addsimps [premK, le_imp_subset, subset_Un_iff2 RS iffD1]) 1); |
760 | 346 |
qed "Card_Un"; |
522 | 347 |
|
348 |
(*Infinite unions of cardinals? See Devlin, Lemma 6.7, page 98*) |
|
349 |
||
484 | 350 |
goalw Cardinal.thy [cardinal_def] "Card(|A|)"; |
437 | 351 |
by (excluded_middle_tac "EX i. Ord(i) & i eqpoll A" 1); |
352 |
by (etac (Least_0 RS ssubst) 1 THEN rtac Card_0 1); |
|
353 |
by (rtac (Ord_Least RS CardI) 1); |
|
4091 | 354 |
by (safe_tac (claset())); |
437 | 355 |
by (rtac less_LeastE 1); |
356 |
by (assume_tac 2); |
|
357 |
by (etac eqpoll_trans 1); |
|
358 |
by (REPEAT (ares_tac [LeastI] 1)); |
|
760 | 359 |
qed "Card_cardinal"; |
437 | 360 |
|
435 | 361 |
(*Kunen's Lemma 10.5*) |
362 |
goal Cardinal.thy "!!i j. [| |i| le j; j le i |] ==> |j| = |i|"; |
|
437 | 363 |
by (rtac (eqpollI RS cardinal_cong) 1); |
1609 | 364 |
by (etac le_imp_lepoll 1); |
437 | 365 |
by (rtac lepoll_trans 1); |
1609 | 366 |
by (etac le_imp_lepoll 2); |
437 | 367 |
by (rtac (eqpoll_sym RS eqpoll_imp_lepoll) 1); |
368 |
by (rtac Ord_cardinal_eqpoll 1); |
|
435 | 369 |
by (REPEAT (eresolve_tac [ltE, Ord_succD] 1)); |
760 | 370 |
qed "cardinal_eq_lemma"; |
435 | 371 |
|
372 |
goal Cardinal.thy "!!i j. i le j ==> |i| le |j|"; |
|
373 |
by (res_inst_tac [("i","|i|"),("j","|j|")] Ord_linear_le 1); |
|
374 |
by (REPEAT_FIRST (ares_tac [Ord_cardinal, le_eqI])); |
|
437 | 375 |
by (rtac cardinal_eq_lemma 1); |
376 |
by (assume_tac 2); |
|
377 |
by (etac le_trans 1); |
|
378 |
by (etac ltE 1); |
|
379 |
by (etac Ord_cardinal_le 1); |
|
760 | 380 |
qed "cardinal_mono"; |
435 | 381 |
|
382 |
(*Since we have |succ(nat)| le |nat|, the converse of cardinal_mono fails!*) |
|
383 |
goal Cardinal.thy "!!i j. [| |i| < |j|; Ord(i); Ord(j) |] ==> i < j"; |
|
437 | 384 |
by (rtac Ord_linear2 1); |
435 | 385 |
by (REPEAT_SOME assume_tac); |
437 | 386 |
by (etac (lt_trans2 RS lt_irrefl) 1); |
387 |
by (etac cardinal_mono 1); |
|
760 | 388 |
qed "cardinal_lt_imp_lt"; |
435 | 389 |
|
484 | 390 |
goal Cardinal.thy "!!i j. [| |i| < K; Ord(i); Card(K) |] ==> i < K"; |
4091 | 391 |
by (asm_simp_tac (simpset() addsimps |
1461 | 392 |
[cardinal_lt_imp_lt, Card_is_Ord, Card_cardinal_eq]) 1); |
760 | 393 |
qed "Card_lt_imp_lt"; |
435 | 394 |
|
484 | 395 |
goal Cardinal.thy "!!i j. [| Ord(i); Card(K) |] ==> (|i| < K) <-> (i < K)"; |
4091 | 396 |
by (blast_tac (claset() addIs [Card_lt_imp_lt, Ord_cardinal_le RS lt_trans1]) 1); |
760 | 397 |
qed "Card_lt_iff"; |
484 | 398 |
|
399 |
goal Cardinal.thy "!!i j. [| Ord(i); Card(K) |] ==> (K le |i|) <-> (K le i)"; |
|
4091 | 400 |
by (asm_simp_tac (simpset() addsimps |
1461 | 401 |
[Card_lt_iff, Card_is_Ord, Ord_cardinal, |
402 |
not_lt_iff_le RS iff_sym]) 1); |
|
760 | 403 |
qed "Card_le_iff"; |
484 | 404 |
|
1609 | 405 |
(*Can use AC or finiteness to discharge first premise*) |
406 |
goal Cardinal.thy |
|
407 |
"!!A B. [| well_ord(B,r); A lepoll B |] ==> |A| le |B|"; |
|
408 |
by (res_inst_tac [("i","|A|"),("j","|B|")] Ord_linear_le 1); |
|
409 |
by (REPEAT_FIRST (ares_tac [Ord_cardinal, le_eqI])); |
|
410 |
by (rtac (eqpollI RS cardinal_cong) 1 THEN assume_tac 1); |
|
411 |
by (rtac lepoll_trans 1); |
|
412 |
by (rtac (well_ord_cardinal_eqpoll RS eqpoll_sym RS eqpoll_imp_lepoll) 1); |
|
413 |
by (assume_tac 1); |
|
414 |
by (etac (le_imp_lepoll RS lepoll_trans) 1); |
|
415 |
by (rtac eqpoll_imp_lepoll 1); |
|
416 |
by (rewtac lepoll_def); |
|
417 |
by (etac exE 1); |
|
418 |
by (rtac well_ord_cardinal_eqpoll 1); |
|
419 |
by (etac well_ord_rvimage 1); |
|
420 |
by (assume_tac 1); |
|
421 |
qed "well_ord_lepoll_imp_Card_le"; |
|
422 |
||
423 |
||
424 |
goal Cardinal.thy "!!A. [| A lepoll i; Ord(i) |] ==> |A| le i"; |
|
1623 | 425 |
by (rtac le_trans 1); |
426 |
by (etac (well_ord_Memrel RS well_ord_lepoll_imp_Card_le) 1); |
|
427 |
by (assume_tac 1); |
|
428 |
by (etac Ord_cardinal_le 1); |
|
1609 | 429 |
qed "lepoll_cardinal_le"; |
430 |
||
435 | 431 |
|
432 |
(*** The finite cardinals ***) |
|
433 |
||
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
434 |
goalw Cardinal.thy [lepoll_def, inj_def] |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
435 |
"!!A B. [| cons(u,A) lepoll cons(v,B); u~:A; v~:B |] ==> A lepoll B"; |
4091 | 436 |
by (safe_tac (claset())); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
437 |
by (res_inst_tac [("x", "lam x:A. if(f`x=v, f`u, f`x)")] exI 1); |
437 | 438 |
by (rtac CollectI 1); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
439 |
(*Proving it's in the function space A->B*) |
437 | 440 |
by (rtac (if_type RS lam_type) 1); |
4091 | 441 |
by (blast_tac (claset() addEs [apply_funtype RS consE]) 1); |
442 |
by (blast_tac (claset() addSEs [mem_irrefl] addEs [apply_funtype RS consE]) 1); |
|
435 | 443 |
(*Proving it's injective*) |
4091 | 444 |
by (asm_simp_tac (simpset() setloop split_tac [expand_if]) 1); |
2875 | 445 |
by (Blast_tac 1); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
446 |
qed "cons_lepoll_consD"; |
435 | 447 |
|
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
448 |
goal Cardinal.thy |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
449 |
"!!A B. [| cons(u,A) eqpoll cons(v,B); u~:A; v~:B |] ==> A eqpoll B"; |
4091 | 450 |
by (asm_full_simp_tac (simpset() addsimps [eqpoll_iff]) 1); |
451 |
by (blast_tac (claset() addIs [cons_lepoll_consD]) 1); |
|
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
452 |
qed "cons_eqpoll_consD"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
453 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
454 |
(*Lemma suggested by Mike Fourman*) |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
455 |
goalw Cardinal.thy [succ_def] "!!m n. succ(m) lepoll succ(n) ==> m lepoll n"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
456 |
by (etac cons_lepoll_consD 1); |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
457 |
by (REPEAT (rtac mem_not_refl 1)); |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
458 |
qed "succ_lepoll_succD"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
459 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
460 |
val [prem] = goal Cardinal.thy |
435 | 461 |
"m:nat ==> ALL n: nat. m lepoll n --> m le n"; |
462 |
by (nat_ind_tac "m" [prem] 1); |
|
4091 | 463 |
by (blast_tac (claset() addSIs [nat_0_le]) 1); |
437 | 464 |
by (rtac ballI 1); |
435 | 465 |
by (eres_inst_tac [("n","n")] natE 1); |
4091 | 466 |
by (asm_simp_tac (simpset() addsimps [lepoll_def, inj_def, |
1461 | 467 |
succI1 RS Pi_empty2]) 1); |
4091 | 468 |
by (blast_tac (claset() addSIs [succ_leI] addSDs [succ_lepoll_succD]) 1); |
1609 | 469 |
qed "nat_lepoll_imp_le_lemma"; |
803
4c8333ab3eae
changed useless "qed" calls for lemmas back to uses of "result",
lcp
parents:
792
diff
changeset
|
470 |
|
4c8333ab3eae
changed useless "qed" calls for lemmas back to uses of "result",
lcp
parents:
792
diff
changeset
|
471 |
bind_thm ("nat_lepoll_imp_le", nat_lepoll_imp_le_lemma RS bspec RS mp); |
435 | 472 |
|
473 |
goal Cardinal.thy |
|
474 |
"!!m n. [| m:nat; n: nat |] ==> m eqpoll n <-> m = n"; |
|
437 | 475 |
by (rtac iffI 1); |
4091 | 476 |
by (asm_simp_tac (simpset() addsimps [eqpoll_refl]) 2); |
477 |
by (blast_tac (claset() addIs [nat_lepoll_imp_le, le_anti_sym] |
|
437 | 478 |
addSEs [eqpollE]) 1); |
760 | 479 |
qed "nat_eqpoll_iff"; |
435 | 480 |
|
1609 | 481 |
(*The object of all this work: every natural number is a (finite) cardinal*) |
435 | 482 |
goalw Cardinal.thy [Card_def,cardinal_def] |
483 |
"!!n. n: nat ==> Card(n)"; |
|
2033 | 484 |
by (stac Least_equality 1); |
435 | 485 |
by (REPEAT_FIRST (ares_tac [eqpoll_refl, nat_into_Ord, refl])); |
4091 | 486 |
by (asm_simp_tac (simpset() addsimps [lt_nat_in_nat RS nat_eqpoll_iff]) 1); |
487 |
by (blast_tac (claset() addSEs [lt_irrefl]) 1); |
|
760 | 488 |
qed "nat_into_Card"; |
435 | 489 |
|
490 |
(*Part of Kunen's Lemma 10.6*) |
|
491 |
goal Cardinal.thy "!!n. [| succ(n) lepoll n; n:nat |] ==> P"; |
|
437 | 492 |
by (rtac (nat_lepoll_imp_le RS lt_irrefl) 1); |
435 | 493 |
by (REPEAT (ares_tac [nat_succI] 1)); |
760 | 494 |
qed "succ_lepoll_natE"; |
435 | 495 |
|
496 |
||
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
497 |
(** lepoll, lesspoll and natural numbers **) |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
498 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
499 |
goalw Cardinal.thy [lesspoll_def] |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
500 |
"!!m. [| A lepoll m; m:nat |] ==> A lesspoll succ(m)"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
501 |
by (rtac conjI 1); |
4091 | 502 |
by (blast_tac (claset() addIs [subset_imp_lepoll RSN (2,lepoll_trans)]) 1); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
503 |
by (rtac notI 1); |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
504 |
by (dresolve_tac [eqpoll_sym RS eqpoll_imp_lepoll] 1); |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
505 |
by (dtac lepoll_trans 1 THEN assume_tac 1); |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
506 |
by (etac succ_lepoll_natE 1 THEN assume_tac 1); |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
507 |
qed "lepoll_imp_lesspoll_succ"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
508 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
509 |
goalw Cardinal.thy [lesspoll_def, lepoll_def, eqpoll_def, bij_def] |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
510 |
"!!m. [| A lesspoll succ(m); m:nat |] ==> A lepoll m"; |
3736
39ee3d31cfbc
Much tidying including step_tac -> clarify_tac or safe_tac; sometimes
paulson
parents:
3016
diff
changeset
|
511 |
by (Clarify_tac 1); |
4091 | 512 |
by (blast_tac (claset() addSIs [inj_not_surj_succ]) 1); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
513 |
qed "lesspoll_succ_imp_lepoll"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
514 |
|
1031 | 515 |
goal Cardinal.thy "!!m. m:nat ==> A lesspoll succ(m) <-> A lepoll m"; |
4091 | 516 |
by (blast_tac (claset() addSIs [lepoll_imp_lesspoll_succ, |
1461 | 517 |
lesspoll_succ_imp_lepoll]) 1); |
1031 | 518 |
qed "lesspoll_succ_iff"; |
519 |
||
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
520 |
goal Cardinal.thy "!!A m. [| A lepoll succ(m); m:nat |] ==> \ |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
521 |
\ A lepoll m | A eqpoll succ(m)"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
522 |
by (rtac disjCI 1); |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
523 |
by (rtac lesspoll_succ_imp_lepoll 1); |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
524 |
by (assume_tac 2); |
4091 | 525 |
by (asm_simp_tac (simpset() addsimps [lesspoll_def]) 1); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
526 |
qed "lepoll_succ_disj"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
527 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
528 |
|
435 | 529 |
(*** The first infinite cardinal: Omega, or nat ***) |
530 |
||
531 |
(*This implies Kunen's Lemma 10.6*) |
|
532 |
goal Cardinal.thy "!!n. [| n<i; n:nat |] ==> ~ i lepoll n"; |
|
437 | 533 |
by (rtac notI 1); |
435 | 534 |
by (rtac succ_lepoll_natE 1 THEN assume_tac 2); |
535 |
by (rtac lepoll_trans 1 THEN assume_tac 2); |
|
437 | 536 |
by (etac ltE 1); |
435 | 537 |
by (REPEAT (ares_tac [Ord_succ_subsetI RS subset_imp_lepoll] 1)); |
760 | 538 |
qed "lt_not_lepoll"; |
435 | 539 |
|
540 |
goal Cardinal.thy "!!i n. [| Ord(i); n:nat |] ==> i eqpoll n <-> i=n"; |
|
437 | 541 |
by (rtac iffI 1); |
4091 | 542 |
by (asm_simp_tac (simpset() addsimps [eqpoll_refl]) 2); |
435 | 543 |
by (rtac Ord_linear_lt 1); |
544 |
by (REPEAT_SOME (eresolve_tac [asm_rl, nat_into_Ord])); |
|
545 |
by (etac (lt_nat_in_nat RS nat_eqpoll_iff RS iffD1) 1 THEN |
|
546 |
REPEAT (assume_tac 1)); |
|
547 |
by (rtac (lt_not_lepoll RS notE) 1 THEN (REPEAT (assume_tac 1))); |
|
437 | 548 |
by (etac eqpoll_imp_lepoll 1); |
760 | 549 |
qed "Ord_nat_eqpoll_iff"; |
435 | 550 |
|
437 | 551 |
goalw Cardinal.thy [Card_def,cardinal_def] "Card(nat)"; |
2033 | 552 |
by (stac Least_equality 1); |
437 | 553 |
by (REPEAT_FIRST (ares_tac [eqpoll_refl, Ord_nat, refl])); |
554 |
by (etac ltE 1); |
|
4091 | 555 |
by (asm_simp_tac (simpset() addsimps [eqpoll_iff, lt_not_lepoll, ltI]) 1); |
760 | 556 |
qed "Card_nat"; |
435 | 557 |
|
437 | 558 |
(*Allows showing that |i| is a limit cardinal*) |
559 |
goal Cardinal.thy "!!i. nat le i ==> nat le |i|"; |
|
560 |
by (rtac (Card_nat RS Card_cardinal_eq RS subst) 1); |
|
561 |
by (etac cardinal_mono 1); |
|
760 | 562 |
qed "nat_le_cardinal"; |
437 | 563 |
|
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
564 |
|
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
565 |
(*** Towards Cardinal Arithmetic ***) |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
566 |
(** Congruence laws for successor, cardinal addition and multiplication **) |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
567 |
|
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
568 |
(*Congruence law for cons under equipollence*) |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
569 |
goalw Cardinal.thy [lepoll_def] |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
570 |
"!!A B. [| A lepoll B; b ~: B |] ==> cons(a,A) lepoll cons(b,B)"; |
4091 | 571 |
by (safe_tac (claset())); |
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
572 |
by (res_inst_tac [("x", "lam y: cons(a,A).if(y=a, b, f`y)")] exI 1); |
3840 | 573 |
by (res_inst_tac [("d","%z. if(z:B, converse(f)`z, a)")] |
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
574 |
lam_injective 1); |
4091 | 575 |
by (asm_simp_tac (simpset() addsimps [inj_is_fun RS apply_type, cons_iff] |
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
576 |
setloop etac consE') 1); |
4091 | 577 |
by (asm_simp_tac (simpset() addsimps [inj_is_fun RS apply_type, left_inverse] |
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
578 |
setloop etac consE') 1); |
760 | 579 |
qed "cons_lepoll_cong"; |
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
580 |
|
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
581 |
goal Cardinal.thy |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
582 |
"!!A B. [| A eqpoll B; a ~: A; b ~: B |] ==> cons(a,A) eqpoll cons(b,B)"; |
4091 | 583 |
by (asm_full_simp_tac (simpset() addsimps [eqpoll_iff, cons_lepoll_cong]) 1); |
760 | 584 |
qed "cons_eqpoll_cong"; |
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
585 |
|
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
586 |
goal Cardinal.thy |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
587 |
"!!A B. [| a ~: A; b ~: B |] ==> \ |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
588 |
\ cons(a,A) lepoll cons(b,B) <-> A lepoll B"; |
4091 | 589 |
by (blast_tac (claset() addIs [cons_lepoll_cong, cons_lepoll_consD]) 1); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
590 |
qed "cons_lepoll_cons_iff"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
591 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
592 |
goal Cardinal.thy |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
593 |
"!!A B. [| a ~: A; b ~: B |] ==> \ |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
594 |
\ cons(a,A) eqpoll cons(b,B) <-> A eqpoll B"; |
4091 | 595 |
by (blast_tac (claset() addIs [cons_eqpoll_cong, cons_eqpoll_consD]) 1); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
596 |
qed "cons_eqpoll_cons_iff"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
597 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
598 |
goalw Cardinal.thy [succ_def] "{a} eqpoll 1"; |
4091 | 599 |
by (blast_tac (claset() addSIs [eqpoll_refl RS cons_eqpoll_cong]) 1); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
600 |
qed "singleton_eqpoll_1"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
601 |
|
1609 | 602 |
goal Cardinal.thy "|{a}| = 1"; |
603 |
by (resolve_tac [singleton_eqpoll_1 RS cardinal_cong RS trans] 1); |
|
4091 | 604 |
by (simp_tac (simpset() addsimps [nat_into_Card RS Card_cardinal_eq]) 1); |
1609 | 605 |
qed "cardinal_singleton"; |
606 |
||
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
607 |
(*Congruence law for succ under equipollence*) |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
608 |
goalw Cardinal.thy [succ_def] |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
609 |
"!!A B. A eqpoll B ==> succ(A) eqpoll succ(B)"; |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
610 |
by (REPEAT (ares_tac [cons_eqpoll_cong, mem_not_refl] 1)); |
760 | 611 |
qed "succ_eqpoll_cong"; |
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
612 |
|
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
613 |
(*Congruence law for + under equipollence*) |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
614 |
goalw Cardinal.thy [eqpoll_def] |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
615 |
"!!A B C D. [| A eqpoll C; B eqpoll D |] ==> A+B eqpoll C+D"; |
4091 | 616 |
by (blast_tac (claset() addSIs [sum_bij]) 1); |
760 | 617 |
qed "sum_eqpoll_cong"; |
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
618 |
|
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
619 |
(*Congruence law for * under equipollence*) |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
620 |
goalw Cardinal.thy [eqpoll_def] |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
621 |
"!!A B C D. [| A eqpoll C; B eqpoll D |] ==> A*B eqpoll C*D"; |
4091 | 622 |
by (blast_tac (claset() addSIs [prod_bij]) 1); |
760 | 623 |
qed "prod_eqpoll_cong"; |
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
624 |
|
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
625 |
goalw Cardinal.thy [eqpoll_def] |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
626 |
"!!f. [| f: inj(A,B); A Int B = 0 |] ==> A Un (B - range(f)) eqpoll B"; |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
627 |
by (rtac exI 1); |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
628 |
by (res_inst_tac [("c", "%x. if(x:A, f`x, x)"), |
1461 | 629 |
("d", "%y. if(y: range(f), converse(f)`y, y)")] |
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
630 |
lam_bijective 1); |
4091 | 631 |
by (blast_tac (claset() addSIs [if_type, inj_is_fun RS apply_type]) 1); |
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
632 |
by (asm_simp_tac |
4091 | 633 |
(simpset() addsimps [inj_converse_fun RS apply_funtype] |
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
634 |
setloop split_tac [expand_if]) 1); |
4091 | 635 |
by (asm_simp_tac (simpset() addsimps [inj_is_fun RS apply_rangeI, left_inverse] |
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
636 |
setloop etac UnE') 1); |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
637 |
by (asm_simp_tac |
4091 | 638 |
(simpset() addsimps [inj_converse_fun RS apply_funtype, right_inverse] |
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
522
diff
changeset
|
639 |
setloop split_tac [expand_if]) 1); |
4091 | 640 |
by (blast_tac (claset() addEs [equals0D]) 1); |
760 | 641 |
qed "inj_disjoint_eqpoll"; |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
642 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
643 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
644 |
(*** Lemmas by Krzysztof Grabczewski. New proofs using cons_lepoll_cons. |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
645 |
Could easily generalise from succ to cons. ***) |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
646 |
|
1055
67f5344605b7
Renamed diff_sing_lepoll, lepoll_diff_sing and diff_sing_eqpoll
lcp
parents:
1031
diff
changeset
|
647 |
(*If A has at most n+1 elements and a:A then A-{a} has at most n.*) |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
648 |
goalw Cardinal.thy [succ_def] |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
649 |
"!!A a n. [| a:A; A lepoll succ(n) |] ==> A - {a} lepoll n"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
650 |
by (rtac cons_lepoll_consD 1); |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
651 |
by (rtac mem_not_refl 3); |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
652 |
by (eresolve_tac [cons_Diff RS ssubst] 1); |
4091 | 653 |
by (safe_tac (claset())); |
1055
67f5344605b7
Renamed diff_sing_lepoll, lepoll_diff_sing and diff_sing_eqpoll
lcp
parents:
1031
diff
changeset
|
654 |
qed "Diff_sing_lepoll"; |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
655 |
|
1055
67f5344605b7
Renamed diff_sing_lepoll, lepoll_diff_sing and diff_sing_eqpoll
lcp
parents:
1031
diff
changeset
|
656 |
(*If A has at least n+1 elements then A-{a} has at least n.*) |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
657 |
goalw Cardinal.thy [succ_def] |
1055
67f5344605b7
Renamed diff_sing_lepoll, lepoll_diff_sing and diff_sing_eqpoll
lcp
parents:
1031
diff
changeset
|
658 |
"!!A a n. [| succ(n) lepoll A |] ==> n lepoll A - {a}"; |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
659 |
by (rtac cons_lepoll_consD 1); |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
660 |
by (rtac mem_not_refl 2); |
2875 | 661 |
by (Blast_tac 2); |
4091 | 662 |
by (blast_tac (claset() addIs [subset_imp_lepoll RSN (2, lepoll_trans)]) 1); |
1055
67f5344605b7
Renamed diff_sing_lepoll, lepoll_diff_sing and diff_sing_eqpoll
lcp
parents:
1031
diff
changeset
|
663 |
qed "lepoll_Diff_sing"; |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
664 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
665 |
goal Cardinal.thy "!!A a n. [| a:A; A eqpoll succ(n) |] ==> A - {a} eqpoll n"; |
4091 | 666 |
by (blast_tac (claset() addSIs [eqpollI] addSEs [eqpollE] |
1055
67f5344605b7
Renamed diff_sing_lepoll, lepoll_diff_sing and diff_sing_eqpoll
lcp
parents:
1031
diff
changeset
|
667 |
addIs [Diff_sing_lepoll,lepoll_Diff_sing]) 1); |
67f5344605b7
Renamed diff_sing_lepoll, lepoll_diff_sing and diff_sing_eqpoll
lcp
parents:
1031
diff
changeset
|
668 |
qed "Diff_sing_eqpoll"; |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
669 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
670 |
goal Cardinal.thy "!!A. [| A lepoll 1; a:A |] ==> A = {a}"; |
1055
67f5344605b7
Renamed diff_sing_lepoll, lepoll_diff_sing and diff_sing_eqpoll
lcp
parents:
1031
diff
changeset
|
671 |
by (forward_tac [Diff_sing_lepoll] 1); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
672 |
by (assume_tac 1); |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
673 |
by (dtac lepoll_0_is_0 1); |
4091 | 674 |
by (blast_tac (claset() addEs [equalityE]) 1); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
675 |
qed "lepoll_1_is_sing"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
676 |
|
1609 | 677 |
goalw Cardinal.thy [lepoll_def] "A Un B lepoll A+B"; |
678 |
by (res_inst_tac [("x","lam x: A Un B. if (x:A,Inl(x),Inr(x))")] exI 1); |
|
679 |
by (res_inst_tac [("d","%z. snd(z)")] lam_injective 1); |
|
680 |
by (split_tac [expand_if] 1); |
|
4091 | 681 |
by (blast_tac (claset() addSIs [InlI, InrI]) 1); |
682 |
by (asm_full_simp_tac (simpset() addsimps [Inl_def, Inr_def] |
|
1623 | 683 |
setloop split_tac [expand_if]) 1); |
1609 | 684 |
qed "Un_lepoll_sum"; |
685 |
||
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
686 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
687 |
(*** Finite and infinite sets ***) |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
688 |
|
1609 | 689 |
goalw Cardinal.thy [Finite_def] "Finite(0)"; |
4091 | 690 |
by (blast_tac (claset() addSIs [eqpoll_refl, nat_0I]) 1); |
1609 | 691 |
qed "Finite_0"; |
692 |
||
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
693 |
goalw Cardinal.thy [Finite_def] |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
694 |
"!!A. [| A lepoll n; n:nat |] ==> Finite(A)"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
695 |
by (etac rev_mp 1); |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
696 |
by (etac nat_induct 1); |
4091 | 697 |
by (blast_tac (claset() addSDs [lepoll_0_is_0] addSIs [eqpoll_refl,nat_0I]) 1); |
698 |
by (blast_tac (claset() addSDs [lepoll_succ_disj] addSIs [nat_succI]) 1); |
|
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
699 |
qed "lepoll_nat_imp_Finite"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
700 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
701 |
goalw Cardinal.thy [Finite_def] |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
702 |
"!!X. [| Y lepoll X; Finite(X) |] ==> Finite(Y)"; |
3016 | 703 |
by (blast_tac |
4091 | 704 |
(claset() addSEs [eqpollE] |
3016 | 705 |
addIs [lepoll_trans RS |
706 |
rewrite_rule [Finite_def] lepoll_nat_imp_Finite]) 1); |
|
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
707 |
qed "lepoll_Finite"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
708 |
|
1623 | 709 |
bind_thm ("subset_Finite", subset_imp_lepoll RS lepoll_Finite); |
710 |
||
711 |
bind_thm ("Finite_Diff", Diff_subset RS subset_Finite); |
|
1609 | 712 |
|
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
713 |
goalw Cardinal.thy [Finite_def] "!!x. Finite(x) ==> Finite(cons(y,x))"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
714 |
by (excluded_middle_tac "y:x" 1); |
4091 | 715 |
by (asm_simp_tac (simpset() addsimps [cons_absorb]) 2); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
716 |
by (etac bexE 1); |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
717 |
by (rtac bexI 1); |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
718 |
by (etac nat_succI 2); |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
719 |
by (asm_simp_tac |
4091 | 720 |
(simpset() addsimps [succ_def, cons_eqpoll_cong, mem_not_refl]) 1); |
1609 | 721 |
qed "Finite_cons"; |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
722 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
723 |
goalw Cardinal.thy [succ_def] "!!x. Finite(x) ==> Finite(succ(x))"; |
1609 | 724 |
by (etac Finite_cons 1); |
725 |
qed "Finite_succ"; |
|
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
726 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
727 |
goalw Cardinal.thy [Finite_def] |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
728 |
"!!i. [| Ord(i); ~ Finite(i) |] ==> nat le i"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
729 |
by (eresolve_tac [Ord_nat RSN (2,Ord_linear2)] 1); |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
730 |
by (assume_tac 2); |
4091 | 731 |
by (blast_tac (claset() addSIs [eqpoll_refl] addSEs [ltE]) 1); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
732 |
qed "nat_le_infinite_Ord"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
733 |
|
1609 | 734 |
goalw Cardinal.thy [Finite_def, eqpoll_def] |
735 |
"!!A. Finite(A) ==> EX r. well_ord(A,r)"; |
|
4091 | 736 |
by (blast_tac (claset() addIs [well_ord_rvimage, bij_is_inj, well_ord_Memrel, |
3016 | 737 |
nat_into_Ord]) 1); |
1609 | 738 |
qed "Finite_imp_well_ord"; |
739 |
||
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
740 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
741 |
(*Krzysztof Grabczewski's proof that the converse of a finite, well-ordered |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
742 |
set is well-ordered. Proofs simplified by lcp. *) |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
743 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
744 |
goal Nat.thy "!!n. n:nat ==> wf[n](converse(Memrel(n)))"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
745 |
by (etac nat_induct 1); |
4091 | 746 |
by (blast_tac (claset() addIs [wf_onI]) 1); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
747 |
by (rtac wf_onI 1); |
4091 | 748 |
by (asm_full_simp_tac (simpset() addsimps [wf_on_def, wf_def, Memrel_iff]) 1); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
749 |
by (excluded_middle_tac "x:Z" 1); |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
750 |
by (dres_inst_tac [("x", "x")] bspec 2 THEN assume_tac 2); |
4091 | 751 |
by (blast_tac (claset() addEs [mem_irrefl, mem_asym]) 2); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
752 |
by (dres_inst_tac [("x", "Z")] spec 1); |
4091 | 753 |
by (Blast.depth_tac (claset()) 4 1); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
754 |
qed "nat_wf_on_converse_Memrel"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
755 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
756 |
goal Cardinal.thy "!!n. n:nat ==> well_ord(n,converse(Memrel(n)))"; |
3894 | 757 |
by (forward_tac [transfer thy Ord_nat RS Ord_in_Ord RS well_ord_Memrel] 1); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
758 |
by (rewtac well_ord_def); |
4091 | 759 |
by (blast_tac (claset() addSIs [tot_ord_converse, |
3016 | 760 |
nat_wf_on_converse_Memrel]) 1); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
761 |
qed "nat_well_ord_converse_Memrel"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
762 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
763 |
goal Cardinal.thy |
1461 | 764 |
"!!A. [| well_ord(A,r); \ |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
765 |
\ well_ord(ordertype(A,r), converse(Memrel(ordertype(A, r)))) \ |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
766 |
\ |] ==> well_ord(A,converse(r))"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
767 |
by (resolve_tac [well_ord_Int_iff RS iffD1] 1); |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
768 |
by (forward_tac [ordermap_bij RS bij_is_inj RS well_ord_rvimage] 1); |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
769 |
by (assume_tac 1); |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
770 |
by (asm_full_simp_tac |
4091 | 771 |
(simpset() addsimps [rvimage_converse, converse_Int, converse_prod, |
1461 | 772 |
ordertype_ord_iso RS ord_iso_rvimage_eq]) 1); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
773 |
qed "well_ord_converse"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
774 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
775 |
goal Cardinal.thy |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
776 |
"!!A. [| well_ord(A,r); A eqpoll n; n:nat |] ==> ordertype(A,r)=n"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
777 |
by (rtac (Ord_ordertype RS Ord_nat_eqpoll_iff RS iffD1) 1 THEN |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
778 |
REPEAT (assume_tac 1)); |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
779 |
by (rtac eqpoll_trans 1 THEN assume_tac 2); |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
780 |
by (rewtac eqpoll_def); |
4091 | 781 |
by (blast_tac (claset() addSIs [ordermap_bij RS bij_converse_bij]) 1); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
782 |
qed "ordertype_eq_n"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
783 |
|
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
784 |
goalw Cardinal.thy [Finite_def] |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
785 |
"!!A. [| Finite(A); well_ord(A,r) |] ==> well_ord(A,converse(r))"; |
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
786 |
by (rtac well_ord_converse 1 THEN assume_tac 1); |
4091 | 787 |
by (blast_tac (claset() addDs [ordertype_eq_n] |
3016 | 788 |
addSIs [nat_well_ord_converse_Memrel]) 1); |
833
ba386650df2c
Proved cons_lepoll_consD, succ_lepoll_succD, cons_eqpoll_consD,
lcp
parents:
803
diff
changeset
|
789 |
qed "Finite_well_ord_converse"; |