6 |
6 |
7 theory DC |
7 theory DC |
8 imports AC_Equiv Hartog Cardinal_aux |
8 imports AC_Equiv Hartog Cardinal_aux |
9 begin |
9 begin |
10 |
10 |
11 lemma RepFun_lepoll: "Ord(a) ==> {P(b). b \<in> a} \<lesssim> a" |
11 lemma RepFun_lepoll: "Ord(a) \<Longrightarrow> {P(b). b \<in> a} \<lesssim> a" |
12 apply (unfold lepoll_def) |
12 apply (unfold lepoll_def) |
13 apply (rule_tac x = "\<lambda>z \<in> RepFun (a,P) . \<mu> i. z=P (i) " in exI) |
13 apply (rule_tac x = "\<lambda>z \<in> RepFun (a,P) . \<mu> i. z=P (i) " in exI) |
14 apply (rule_tac d="%z. P (z)" in lam_injective) |
14 apply (rule_tac d="%z. P (z)" in lam_injective) |
15 apply (fast intro!: Least_in_Ord) |
15 apply (fast intro!: Least_in_Ord) |
16 apply (rule sym) |
16 apply (rule sym) |
17 apply (fast intro: LeastI Ord_in_Ord) |
17 apply (fast intro: LeastI Ord_in_Ord) |
18 done |
18 done |
19 |
19 |
20 text\<open>Trivial in the presence of AC, but here we need a wellordering of X\<close> |
20 text\<open>Trivial in the presence of AC, but here we need a wellordering of X\<close> |
21 lemma image_Ord_lepoll: "[| f \<in> X->Y; Ord(X) |] ==> f``X \<lesssim> X" |
21 lemma image_Ord_lepoll: "\<lbrakk>f \<in> X->Y; Ord(X)\<rbrakk> \<Longrightarrow> f``X \<lesssim> X" |
22 apply (unfold lepoll_def) |
22 apply (unfold lepoll_def) |
23 apply (rule_tac x = "\<lambda>x \<in> f``X. \<mu> y. f`y = x" in exI) |
23 apply (rule_tac x = "\<lambda>x \<in> f``X. \<mu> y. f`y = x" in exI) |
24 apply (rule_tac d = "%z. f`z" in lam_injective) |
24 apply (rule_tac d = "%z. f`z" in lam_injective) |
25 apply (fast intro!: Least_in_Ord apply_equality, clarify) |
25 apply (fast intro!: Least_in_Ord apply_equality, clarify) |
26 apply (rule LeastI) |
26 apply (rule LeastI) |
27 apply (erule apply_equality, assumption+) |
27 apply (erule apply_equality, assumption+) |
28 apply (blast intro: Ord_in_Ord) |
28 apply (blast intro: Ord_in_Ord) |
29 done |
29 done |
30 |
30 |
31 lemma range_subset_domain: |
31 lemma range_subset_domain: |
32 "[| R \<subseteq> X*X; !!g. g \<in> X ==> \<exists>u. <g,u> \<in> R |] |
32 "\<lbrakk>R \<subseteq> X*X; \<And>g. g \<in> X \<Longrightarrow> \<exists>u. <g,u> \<in> R\<rbrakk> |
33 ==> range(R) \<subseteq> domain(R)" |
33 \<Longrightarrow> range(R) \<subseteq> domain(R)" |
34 by blast |
34 by blast |
35 |
35 |
36 lemma cons_fun_type: "g \<in> n->X ==> cons(<n,x>, g) \<in> succ(n) -> cons(x, X)" |
36 lemma cons_fun_type: "g \<in> n->X \<Longrightarrow> cons(<n,x>, g) \<in> succ(n) -> cons(x, X)" |
37 apply (unfold succ_def) |
37 apply (unfold succ_def) |
38 apply (fast intro!: fun_extend elim!: mem_irrefl) |
38 apply (fast intro!: fun_extend elim!: mem_irrefl) |
39 done |
39 done |
40 |
40 |
41 lemma cons_fun_type2: |
41 lemma cons_fun_type2: |
42 "[| g \<in> n->X; x \<in> X |] ==> cons(<n,x>, g) \<in> succ(n) -> X" |
42 "\<lbrakk>g \<in> n->X; x \<in> X\<rbrakk> \<Longrightarrow> cons(<n,x>, g) \<in> succ(n) -> X" |
43 by (erule cons_absorb [THEN subst], erule cons_fun_type) |
43 by (erule cons_absorb [THEN subst], erule cons_fun_type) |
44 |
44 |
45 lemma cons_image_n: "n \<in> nat ==> cons(<n,x>, g)``n = g``n" |
45 lemma cons_image_n: "n \<in> nat \<Longrightarrow> cons(<n,x>, g)``n = g``n" |
46 by (fast elim!: mem_irrefl) |
46 by (fast elim!: mem_irrefl) |
47 |
47 |
48 lemma cons_val_n: "g \<in> n->X ==> cons(<n,x>, g)`n = x" |
48 lemma cons_val_n: "g \<in> n->X \<Longrightarrow> cons(<n,x>, g)`n = x" |
49 by (fast intro!: apply_equality elim!: cons_fun_type) |
49 by (fast intro!: apply_equality elim!: cons_fun_type) |
50 |
50 |
51 lemma cons_image_k: "k \<in> n ==> cons(<n,x>, g)``k = g``k" |
51 lemma cons_image_k: "k \<in> n \<Longrightarrow> cons(<n,x>, g)``k = g``k" |
52 by (fast elim: mem_asym) |
52 by (fast elim: mem_asym) |
53 |
53 |
54 lemma cons_val_k: "[| k \<in> n; g \<in> n->X |] ==> cons(<n,x>, g)`k = g`k" |
54 lemma cons_val_k: "\<lbrakk>k \<in> n; g \<in> n->X\<rbrakk> \<Longrightarrow> cons(<n,x>, g)`k = g`k" |
55 by (fast intro!: apply_equality consI2 elim!: cons_fun_type apply_Pair) |
55 by (fast intro!: apply_equality consI2 elim!: cons_fun_type apply_Pair) |
56 |
56 |
57 lemma domain_cons_eq_succ: "domain(f)=x ==> domain(cons(<x,y>, f)) = succ(x)" |
57 lemma domain_cons_eq_succ: "domain(f)=x \<Longrightarrow> domain(cons(<x,y>, f)) = succ(x)" |
58 by (simp add: domain_cons succ_def) |
58 by (simp add: domain_cons succ_def) |
59 |
59 |
60 lemma restrict_cons_eq: "g \<in> n->X ==> restrict(cons(<n,x>, g), n) = g" |
60 lemma restrict_cons_eq: "g \<in> n->X \<Longrightarrow> restrict(cons(<n,x>, g), n) = g" |
61 apply (simp add: restrict_def Pi_iff) |
61 apply (simp add: restrict_def Pi_iff) |
62 apply (blast intro: elim: mem_irrefl) |
62 apply (blast intro: elim: mem_irrefl) |
63 done |
63 done |
64 |
64 |
65 lemma succ_in_succ: "[| Ord(k); i \<in> k |] ==> succ(i) \<in> succ(k)" |
65 lemma succ_in_succ: "\<lbrakk>Ord(k); i \<in> k\<rbrakk> \<Longrightarrow> succ(i) \<in> succ(k)" |
66 apply (rule Ord_linear [of "succ(i)" "succ(k)", THEN disjE]) |
66 apply (rule Ord_linear [of "succ(i)" "succ(k)", THEN disjE]) |
67 apply (fast elim: Ord_in_Ord mem_irrefl mem_asym)+ |
67 apply (fast elim: Ord_in_Ord mem_irrefl mem_asym)+ |
68 done |
68 done |
69 |
69 |
70 lemma restrict_eq_imp_val_eq: |
70 lemma restrict_eq_imp_val_eq: |
71 "[|restrict(f, domain(g)) = g; x \<in> domain(g)|] |
71 "\<lbrakk>restrict(f, domain(g)) = g; x \<in> domain(g)\<rbrakk> |
72 ==> f`x = g`x" |
72 \<Longrightarrow> f`x = g`x" |
73 by (erule subst, simp add: restrict) |
73 by (erule subst, simp add: restrict) |
74 |
74 |
75 lemma domain_eq_imp_fun_type: "[| domain(f)=A; f \<in> B->C |] ==> f \<in> A->C" |
75 lemma domain_eq_imp_fun_type: "\<lbrakk>domain(f)=A; f \<in> B->C\<rbrakk> \<Longrightarrow> f \<in> A->C" |
76 by (frule domain_of_fun, fast) |
76 by (frule domain_of_fun, fast) |
77 |
77 |
78 lemma ex_in_domain: "[| R \<subseteq> A * B; R \<noteq> 0 |] ==> \<exists>x. x \<in> domain(R)" |
78 lemma ex_in_domain: "\<lbrakk>R \<subseteq> A * B; R \<noteq> 0\<rbrakk> \<Longrightarrow> \<exists>x. x \<in> domain(R)" |
79 by (fast elim!: not_emptyE) |
79 by (fast elim!: not_emptyE) |
80 |
80 |
81 |
81 |
82 definition |
82 definition |
83 DC :: "i => o" where |
83 DC :: "i => o" where |
84 "DC(a) == \<forall>X R. R \<subseteq> Pow(X)*X & |
84 "DC(a) \<equiv> \<forall>X R. R \<subseteq> Pow(X)*X & |
85 (\<forall>Y \<in> Pow(X). Y \<prec> a \<longrightarrow> (\<exists>x \<in> X. <Y,x> \<in> R)) |
85 (\<forall>Y \<in> Pow(X). Y \<prec> a \<longrightarrow> (\<exists>x \<in> X. <Y,x> \<in> R)) |
86 \<longrightarrow> (\<exists>f \<in> a->X. \<forall>b<a. <f``b,f`b> \<in> R)" |
86 \<longrightarrow> (\<exists>f \<in> a->X. \<forall>b<a. <f``b,f`b> \<in> R)" |
87 |
87 |
88 definition |
88 definition |
89 DC0 :: o where |
89 DC0 :: o where |
90 "DC0 == \<forall>A B R. R \<subseteq> A*B & R\<noteq>0 & range(R) \<subseteq> domain(R) |
90 "DC0 \<equiv> \<forall>A B R. R \<subseteq> A*B & R\<noteq>0 & range(R) \<subseteq> domain(R) |
91 \<longrightarrow> (\<exists>f \<in> nat->domain(R). \<forall>n \<in> nat. <f`n,f`succ(n)>:R)" |
91 \<longrightarrow> (\<exists>f \<in> nat->domain(R). \<forall>n \<in> nat. <f`n,f`succ(n)>:R)" |
92 |
92 |
93 definition |
93 definition |
94 ff :: "[i, i, i, i] => i" where |
94 ff :: "[i, i, i, i] => i" where |
95 "ff(b, X, Q, R) == |
95 "ff(b, X, Q, R) \<equiv> |
96 transrec(b, %c r. THE x. first(x, {x \<in> X. <r``c, x> \<in> R}, Q))" |
96 transrec(b, %c r. THE x. first(x, {x \<in> X. <r``c, x> \<in> R}, Q))" |
97 |
97 |
98 |
98 |
99 locale DC0_imp = |
99 locale DC0_imp = |
100 fixes XX and RR and X and R |
100 fixes XX and RR and X and R |
101 |
101 |
102 assumes all_ex: "\<forall>Y \<in> Pow(X). Y \<prec> nat \<longrightarrow> (\<exists>x \<in> X. <Y, x> \<in> R)" |
102 assumes all_ex: "\<forall>Y \<in> Pow(X). Y \<prec> nat \<longrightarrow> (\<exists>x \<in> X. <Y, x> \<in> R)" |
103 |
103 |
104 defines XX_def: "XX == (\<Union>n \<in> nat. {f \<in> n->X. \<forall>k \<in> n. <f``k, f`k> \<in> R})" |
104 defines XX_def: "XX \<equiv> (\<Union>n \<in> nat. {f \<in> n->X. \<forall>k \<in> n. <f``k, f`k> \<in> R})" |
105 and RR_def: "RR == {<z1,z2>:XX*XX. domain(z2)=succ(domain(z1)) |
105 and RR_def: "RR \<equiv> {<z1,z2>:XX*XX. domain(z2)=succ(domain(z1)) |
106 & restrict(z2, domain(z1)) = z1}" |
106 & restrict(z2, domain(z1)) = z1}" |
107 begin |
107 begin |
108 |
108 |
109 (* ********************************************************************** *) |
109 (* ********************************************************************** *) |
110 (* DC ==> DC(omega) *) |
110 (* DC \<Longrightarrow> DC(omega) *) |
111 (* *) |
111 (* *) |
112 (* The scheme of the proof: *) |
112 (* The scheme of the proof: *) |
113 (* *) |
113 (* *) |
114 (* Assume DC. Let R and X satisfy the premise of DC(omega). *) |
114 (* Assume DC. Let R and X satisfy the premise of DC(omega). *) |
115 (* *) |
115 (* *) |
285 is the desired function. |
285 is the desired function. |
286 |
286 |
287 ************************************************************************* *) |
287 ************************************************************************* *) |
288 |
288 |
289 lemma singleton_in_funs: |
289 lemma singleton_in_funs: |
290 "x \<in> X ==> {<0,x>} \<in> |
290 "x \<in> X \<Longrightarrow> {<0,x>} \<in> |
291 (\<Union>n \<in> nat. {f \<in> succ(n)->X. \<forall>k \<in> n. <f`k, f`succ(k)> \<in> R})" |
291 (\<Union>n \<in> nat. {f \<in> succ(n)->X. \<forall>k \<in> n. <f`k, f`succ(k)> \<in> R})" |
292 apply (rule nat_0I [THEN UN_I]) |
292 apply (rule nat_0I [THEN UN_I]) |
293 apply (force simp add: singleton_0 [symmetric] |
293 apply (force simp add: singleton_0 [symmetric] |
294 intro!: singleton_fun [THEN Pi_type]) |
294 intro!: singleton_fun [THEN Pi_type]) |
295 done |
295 done |
296 |
296 |
297 |
297 |
298 locale imp_DC0 = |
298 locale imp_DC0 = |
299 fixes XX and RR and x and R and f and allRR |
299 fixes XX and RR and x and R and f and allRR |
300 defines XX_def: "XX == (\<Union>n \<in> nat. |
300 defines XX_def: "XX \<equiv> (\<Union>n \<in> nat. |
301 {f \<in> succ(n)->domain(R). \<forall>k \<in> n. <f`k, f`succ(k)> \<in> R})" |
301 {f \<in> succ(n)->domain(R). \<forall>k \<in> n. <f`k, f`succ(k)> \<in> R})" |
302 and RR_def: |
302 and RR_def: |
303 "RR == {<z1,z2>:Fin(XX)*XX. |
303 "RR \<equiv> {<z1,z2>:Fin(XX)*XX. |
304 (domain(z2)=succ(\<Union>f \<in> z1. domain(f)) |
304 (domain(z2)=succ(\<Union>f \<in> z1. domain(f)) |
305 & (\<forall>f \<in> z1. restrict(z2, domain(f)) = f)) |
305 & (\<forall>f \<in> z1. restrict(z2, domain(f)) = f)) |
306 | (~ (\<exists>g \<in> XX. domain(g)=succ(\<Union>f \<in> z1. domain(f)) |
306 | (\<not> (\<exists>g \<in> XX. domain(g)=succ(\<Union>f \<in> z1. domain(f)) |
307 & (\<forall>f \<in> z1. restrict(g, domain(f)) = f)) & z2={<0,x>})}" |
307 & (\<forall>f \<in> z1. restrict(g, domain(f)) = f)) & z2={<0,x>})}" |
308 and allRR_def: |
308 and allRR_def: |
309 "allRR == \<forall>b<nat. |
309 "allRR \<equiv> \<forall>b<nat. |
310 <f``b, f`b> \<in> |
310 <f``b, f`b> \<in> |
311 {<z1,z2>\<in>Fin(XX)*XX. (domain(z2)=succ(\<Union>f \<in> z1. domain(f)) |
311 {<z1,z2>\<in>Fin(XX)*XX. (domain(z2)=succ(\<Union>f \<in> z1. domain(f)) |
312 & (\<Union>f \<in> z1. domain(f)) = b |
312 & (\<Union>f \<in> z1. domain(f)) = b |
313 & (\<forall>f \<in> z1. restrict(z2,domain(f)) = f))}" |
313 & (\<forall>f \<in> z1. restrict(z2,domain(f)) = f))}" |
314 begin |
314 begin |
315 |
315 |
316 lemma lemma4: |
316 lemma lemma4: |
317 "[| range(R) \<subseteq> domain(R); x \<in> domain(R) |] |
317 "\<lbrakk>range(R) \<subseteq> domain(R); x \<in> domain(R)\<rbrakk> |
318 ==> RR \<subseteq> Pow(XX)*XX & |
318 \<Longrightarrow> RR \<subseteq> Pow(XX)*XX & |
319 (\<forall>Y \<in> Pow(XX). Y \<prec> nat \<longrightarrow> (\<exists>x \<in> XX. <Y,x>:RR))" |
319 (\<forall>Y \<in> Pow(XX). Y \<prec> nat \<longrightarrow> (\<exists>x \<in> XX. <Y,x>:RR))" |
320 apply (rule conjI) |
320 apply (rule conjI) |
321 apply (force dest!: FinD [THEN PowI] simp add: RR_def) |
321 apply (force dest!: FinD [THEN PowI] simp add: RR_def) |
322 apply (rule impI [THEN ballI]) |
322 apply (rule impI [THEN ballI]) |
323 apply (drule Finite_Fin [OF lesspoll_nat_is_Finite PowD], assumption) |
323 apply (drule Finite_Fin [OF lesspoll_nat_is_Finite PowD], assumption) |
330 apply (rule rev_bexI, erule singleton_in_funs) |
330 apply (rule rev_bexI, erule singleton_in_funs) |
331 apply (simp add: nat_0I [THEN rev_bexI] cons_fun_type2) |
331 apply (simp add: nat_0I [THEN rev_bexI] cons_fun_type2) |
332 done |
332 done |
333 |
333 |
334 lemma UN_image_succ_eq: |
334 lemma UN_image_succ_eq: |
335 "[| f \<in> nat->X; n \<in> nat |] |
335 "\<lbrakk>f \<in> nat->X; n \<in> nat\<rbrakk> |
336 ==> (\<Union>x \<in> f``succ(n). P(x)) = P(f`n) \<union> (\<Union>x \<in> f``n. P(x))" |
336 \<Longrightarrow> (\<Union>x \<in> f``succ(n). P(x)) = P(f`n) \<union> (\<Union>x \<in> f``n. P(x))" |
337 by (simp add: image_fun OrdmemD) |
337 by (simp add: image_fun OrdmemD) |
338 |
338 |
339 lemma UN_image_succ_eq_succ: |
339 lemma UN_image_succ_eq_succ: |
340 "[| (\<Union>x \<in> f``n. P(x)) = y; P(f`n) = succ(y); |
340 "\<lbrakk>(\<Union>x \<in> f``n. P(x)) = y; P(f`n) = succ(y); |
341 f \<in> nat -> X; n \<in> nat |] ==> (\<Union>x \<in> f``succ(n). P(x)) = succ(y)" |
341 f \<in> nat -> X; n \<in> nat\<rbrakk> \<Longrightarrow> (\<Union>x \<in> f``succ(n). P(x)) = succ(y)" |
342 by (simp add: UN_image_succ_eq, blast) |
342 by (simp add: UN_image_succ_eq, blast) |
343 |
343 |
344 lemma apply_domain_type: |
344 lemma apply_domain_type: |
345 "[| h \<in> succ(n) -> D; n \<in> nat; domain(h)=succ(y) |] ==> h`y \<in> D" |
345 "\<lbrakk>h \<in> succ(n) -> D; n \<in> nat; domain(h)=succ(y)\<rbrakk> \<Longrightarrow> h`y \<in> D" |
346 by (fast elim: apply_type dest!: trans [OF sym domain_of_fun]) |
346 by (fast elim: apply_type dest!: trans [OF sym domain_of_fun]) |
347 |
347 |
348 lemma image_fun_succ: |
348 lemma image_fun_succ: |
349 "[| h \<in> nat -> X; n \<in> nat |] ==> h``succ(n) = cons(h`n, h``n)" |
349 "\<lbrakk>h \<in> nat -> X; n \<in> nat\<rbrakk> \<Longrightarrow> h``succ(n) = cons(h`n, h``n)" |
350 by (simp add: image_fun OrdmemD) |
350 by (simp add: image_fun OrdmemD) |
351 |
351 |
352 lemma f_n_type: |
352 lemma f_n_type: |
353 "[| domain(f`n) = succ(k); f \<in> nat -> XX; n \<in> nat |] |
353 "\<lbrakk>domain(f`n) = succ(k); f \<in> nat -> XX; n \<in> nat\<rbrakk> |
354 ==> f`n \<in> succ(k) -> domain(R)" |
354 \<Longrightarrow> f`n \<in> succ(k) -> domain(R)" |
355 apply (unfold XX_def) |
355 apply (unfold XX_def) |
356 apply (drule apply_type, assumption) |
356 apply (drule apply_type, assumption) |
357 apply (fast elim: domain_eq_imp_fun_type) |
357 apply (fast elim: domain_eq_imp_fun_type) |
358 done |
358 done |
359 |
359 |
360 lemma f_n_pairs_in_R [rule_format]: |
360 lemma f_n_pairs_in_R [rule_format]: |
361 "[| h \<in> nat -> XX; domain(h`n) = succ(k); n \<in> nat |] |
361 "\<lbrakk>h \<in> nat -> XX; domain(h`n) = succ(k); n \<in> nat\<rbrakk> |
362 ==> \<forall>i \<in> k. <h`n`i, h`n`succ(i)> \<in> R" |
362 \<Longrightarrow> \<forall>i \<in> k. <h`n`i, h`n`succ(i)> \<in> R" |
363 apply (unfold XX_def) |
363 apply (unfold XX_def) |
364 apply (drule apply_type, assumption) |
364 apply (drule apply_type, assumption) |
365 apply (elim UN_E CollectE) |
365 apply (elim UN_E CollectE) |
366 apply (drule domain_of_fun [symmetric, THEN trans], assumption, simp) |
366 apply (drule domain_of_fun [symmetric, THEN trans], assumption, simp) |
367 done |
367 done |
368 |
368 |
369 lemma restrict_cons_eq_restrict: |
369 lemma restrict_cons_eq_restrict: |
370 "[| restrict(h, domain(u))=u; h \<in> n->X; domain(u) \<subseteq> n |] |
370 "\<lbrakk>restrict(h, domain(u))=u; h \<in> n->X; domain(u) \<subseteq> n\<rbrakk> |
371 ==> restrict(cons(<n, y>, h), domain(u)) = u" |
371 \<Longrightarrow> restrict(cons(<n, y>, h), domain(u)) = u" |
372 apply (unfold restrict_def) |
372 apply (unfold restrict_def) |
373 apply (simp add: restrict_def Pi_iff) |
373 apply (simp add: restrict_def Pi_iff) |
374 apply (erule sym [THEN trans, symmetric]) |
374 apply (erule sym [THEN trans, symmetric]) |
375 apply (blast elim: mem_irrefl) |
375 apply (blast elim: mem_irrefl) |
376 done |
376 done |
377 |
377 |
378 lemma all_in_image_restrict_eq: |
378 lemma all_in_image_restrict_eq: |
379 "[| \<forall>x \<in> f``n. restrict(f`n, domain(x))=x; |
379 "\<lbrakk>\<forall>x \<in> f``n. restrict(f`n, domain(x))=x; |
380 f \<in> nat -> XX; |
380 f \<in> nat -> XX; |
381 n \<in> nat; domain(f`n) = succ(n); |
381 n \<in> nat; domain(f`n) = succ(n); |
382 (\<Union>x \<in> f``n. domain(x)) \<subseteq> n |] |
382 (\<Union>x \<in> f``n. domain(x)) \<subseteq> n\<rbrakk> |
383 ==> \<forall>x \<in> f``succ(n). restrict(cons(<succ(n),y>, f`n), domain(x)) = x" |
383 \<Longrightarrow> \<forall>x \<in> f``succ(n). restrict(cons(<succ(n),y>, f`n), domain(x)) = x" |
384 apply (rule ballI) |
384 apply (rule ballI) |
385 apply (simp add: image_fun_succ) |
385 apply (simp add: image_fun_succ) |
386 apply (drule f_n_type, assumption+) |
386 apply (drule f_n_type, assumption+) |
387 apply (erule disjE) |
387 apply (erule disjE) |
388 apply (simp add: domain_of_fun restrict_cons_eq) |
388 apply (simp add: domain_of_fun restrict_cons_eq) |
389 apply (blast intro!: restrict_cons_eq_restrict) |
389 apply (blast intro!: restrict_cons_eq_restrict) |
390 done |
390 done |
391 |
391 |
392 lemma simplify_recursion: |
392 lemma simplify_recursion: |
393 "[| \<forall>b<nat. <f``b, f`b> \<in> RR; |
393 "\<lbrakk>\<forall>b<nat. <f``b, f`b> \<in> RR; |
394 f \<in> nat -> XX; range(R) \<subseteq> domain(R); x \<in> domain(R)|] |
394 f \<in> nat -> XX; range(R) \<subseteq> domain(R); x \<in> domain(R)\<rbrakk> |
395 ==> allRR" |
395 \<Longrightarrow> allRR" |
396 apply (unfold RR_def allRR_def) |
396 apply (unfold RR_def allRR_def) |
397 apply (rule oallI, drule ltD) |
397 apply (rule oallI, drule ltD) |
398 apply (erule nat_induct) |
398 apply (erule nat_induct) |
399 apply (drule_tac x=0 in ospec, blast intro: Limit_has_0) |
399 apply (drule_tac x=0 in ospec, blast intro: Limit_has_0) |
400 apply (force simp add: singleton_fun [THEN domain_of_fun] singleton_in_funs) |
400 apply (force simp add: singleton_fun [THEN domain_of_fun] singleton_in_funs) |
401 (*induction step*) (** LEVEL 5 **) |
401 (*induction step*) (** LEVEL 5 **) |
402 (*prevent simplification of ~\<exists> to \<forall>~ *) |
402 (*prevent simplification of \<not>\<exists> to \<forall>\<not> *) |
403 apply (simp only: separation split) |
403 apply (simp only: separation split) |
404 apply (drule_tac x="succ(xa)" in ospec, blast intro: ltI) |
404 apply (drule_tac x="succ(xa)" in ospec, blast intro: ltI) |
405 apply (elim conjE disjE) |
405 apply (elim conjE disjE) |
406 apply (force elim!: trans subst_context |
406 apply (force elim!: trans subst_context |
407 intro!: UN_image_succ_eq_succ) |
407 intro!: UN_image_succ_eq_succ) |
477 (assumption|erule nat_succI)+) |
477 (assumption|erule nat_succI)+) |
478 apply (drule imp_DC0.lemma3, auto) |
478 apply (drule imp_DC0.lemma3, auto) |
479 done |
479 done |
480 |
480 |
481 (* ********************************************************************** *) |
481 (* ********************************************************************** *) |
482 (* \<forall>K. Card(K) \<longrightarrow> DC(K) ==> WO3 *) |
482 (* \<forall>K. Card(K) \<longrightarrow> DC(K) \<Longrightarrow> WO3 *) |
483 (* ********************************************************************** *) |
483 (* ********************************************************************** *) |
484 |
484 |
485 lemma fun_Ord_inj: |
485 lemma fun_Ord_inj: |
486 "[| f \<in> a->X; Ord(a); |
486 "\<lbrakk>f \<in> a->X; Ord(a); |
487 !!b c. [| b<c; c \<in> a |] ==> f`b\<noteq>f`c |] |
487 \<And>b c. \<lbrakk>b<c; c \<in> a\<rbrakk> \<Longrightarrow> f`b\<noteq>f`c\<rbrakk> |
488 ==> f \<in> inj(a, X)" |
488 \<Longrightarrow> f \<in> inj(a, X)" |
489 apply (unfold inj_def, simp) |
489 apply (unfold inj_def, simp) |
490 apply (intro ballI impI) |
490 apply (intro ballI impI) |
491 apply (rule_tac j=x in Ord_in_Ord [THEN Ord_linear_lt], assumption+) |
491 apply (rule_tac j=x in Ord_in_Ord [THEN Ord_linear_lt], assumption+) |
492 apply (blast intro: Ord_in_Ord, auto) |
492 apply (blast intro: Ord_in_Ord, auto) |
493 apply (atomize, blast dest: not_sym) |
493 apply (atomize, blast dest: not_sym) |
494 done |
494 done |
495 |
495 |
496 lemma value_in_image: "[| f \<in> X->Y; A \<subseteq> X; a \<in> A |] ==> f`a \<in> f``A" |
496 lemma value_in_image: "\<lbrakk>f \<in> X->Y; A \<subseteq> X; a \<in> A\<rbrakk> \<Longrightarrow> f`a \<in> f``A" |
497 by (fast elim!: image_fun [THEN ssubst]) |
497 by (fast elim!: image_fun [THEN ssubst]) |
498 |
498 |
499 lemma lesspoll_lemma: "[| ~ A \<prec> B; C \<prec> B |] ==> A - C \<noteq> 0" |
499 lemma lesspoll_lemma: "\<lbrakk>\<not> A \<prec> B; C \<prec> B\<rbrakk> \<Longrightarrow> A - C \<noteq> 0" |
500 apply (unfold lesspoll_def) |
500 apply (unfold lesspoll_def) |
501 apply (fast dest!: Diff_eq_0_iff [THEN iffD1, THEN subset_imp_lepoll] |
501 apply (fast dest!: Diff_eq_0_iff [THEN iffD1, THEN subset_imp_lepoll] |
502 intro!: eqpollI elim: notE |
502 intro!: eqpollI elim: notE |
503 elim!: eqpollE lepoll_trans) |
503 elim!: eqpollE lepoll_trans) |
504 done |
504 done |
505 |
505 |
506 theorem DC_WO3: "(\<forall>K. Card(K) \<longrightarrow> DC(K)) ==> WO3" |
506 theorem DC_WO3: "(\<forall>K. Card(K) \<longrightarrow> DC(K)) \<Longrightarrow> WO3" |
507 apply (unfold DC_def WO3_def) |
507 apply (unfold DC_def WO3_def) |
508 apply (rule allI) |
508 apply (rule allI) |
509 apply (case_tac "A \<prec> Hartog (A)") |
509 apply (case_tac "A \<prec> Hartog (A)") |
510 apply (fast dest!: lesspoll_imp_ex_lt_eqpoll |
510 apply (fast dest!: lesspoll_imp_ex_lt_eqpoll |
511 intro!: Ord_Hartog leI [THEN le_imp_subset]) |
511 intro!: Ord_Hartog leI [THEN le_imp_subset]) |
547 |
547 |
548 lemma lam_type_RepFun: "(\<lambda>b \<in> a. h(b)) \<in> a -> {h(b). b \<in> a}" |
548 lemma lam_type_RepFun: "(\<lambda>b \<in> a. h(b)) \<in> a -> {h(b). b \<in> a}" |
549 by (fast intro!: lam_type RepFunI) |
549 by (fast intro!: lam_type RepFunI) |
550 |
550 |
551 lemma lemmaX: |
551 lemma lemmaX: |
552 "[| \<forall>Y \<in> Pow(X). Y \<prec> K \<longrightarrow> (\<exists>x \<in> X. <Y, x> \<in> R); |
552 "\<lbrakk>\<forall>Y \<in> Pow(X). Y \<prec> K \<longrightarrow> (\<exists>x \<in> X. <Y, x> \<in> R); |
553 b \<in> K; Z \<in> Pow(X); Z \<prec> K |] |
553 b \<in> K; Z \<in> Pow(X); Z \<prec> K\<rbrakk> |
554 ==> {x \<in> X. <Z,x> \<in> R} \<noteq> 0" |
554 \<Longrightarrow> {x \<in> X. <Z,x> \<in> R} \<noteq> 0" |
555 by blast |
555 by blast |
556 |
556 |
557 |
557 |
558 lemma WO1_DC_lemma: |
558 lemma WO1_DC_lemma: |
559 "[| Card(K); well_ord(X,Q); |
559 "\<lbrakk>Card(K); well_ord(X,Q); |
560 \<forall>Y \<in> Pow(X). Y \<prec> K \<longrightarrow> (\<exists>x \<in> X. <Y, x> \<in> R); b \<in> K |] |
560 \<forall>Y \<in> Pow(X). Y \<prec> K \<longrightarrow> (\<exists>x \<in> X. <Y, x> \<in> R); b \<in> K\<rbrakk> |
561 ==> ff(b, X, Q, R) \<in> {x \<in> X. <(\<lambda>c \<in> b. ff(c, X, Q, R))``b, x> \<in> R}" |
561 \<Longrightarrow> ff(b, X, Q, R) \<in> {x \<in> X. <(\<lambda>c \<in> b. ff(c, X, Q, R))``b, x> \<in> R}" |
562 apply (rule_tac P = "b \<in> K" in impE, (erule_tac [2] asm_rl)+) |
562 apply (rule_tac P = "b \<in> K" in impE, (erule_tac [2] asm_rl)+) |
563 apply (rule_tac i=b in Card_is_Ord [THEN Ord_in_Ord, THEN trans_induct], |
563 apply (rule_tac i=b in Card_is_Ord [THEN Ord_in_Ord, THEN trans_induct], |
564 assumption+) |
564 assumption+) |
565 apply (rule impI) |
565 apply (rule impI) |
566 apply (rule ff_def [THEN def_transrec, THEN ssubst]) |
566 apply (rule ff_def [THEN def_transrec, THEN ssubst]) |