diff -r 0c18df79b1c8 -r a642599ffdea src/ZF/AC/DC.thy --- a/src/ZF/AC/DC.thy Tue Sep 27 17:03:23 2022 +0100 +++ b/src/ZF/AC/DC.thy Tue Sep 27 17:46:52 2022 +0100 @@ -11,7 +11,7 @@ lemma RepFun_lepoll: "Ord(a) \ {P(b). b \ a} \ a" apply (unfold lepoll_def) apply (rule_tac x = "\z \ RepFun (a,P) . \ i. z=P (i) " in exI) -apply (rule_tac d="%z. P (z)" in lam_injective) +apply (rule_tac d="\z. P (z)" in lam_injective) apply (fast intro!: Least_in_Ord) apply (rule sym) apply (fast intro: LeastI Ord_in_Ord) @@ -21,7 +21,7 @@ lemma image_Ord_lepoll: "\f \ X->Y; Ord(X)\ \ f``X \ X" apply (unfold lepoll_def) apply (rule_tac x = "\x \ f``X. \ y. f`y = x" in exI) -apply (rule_tac d = "%z. f`z" in lam_injective) +apply (rule_tac d = "\z. f`z" in lam_injective) apply (fast intro!: Least_in_Ord apply_equality, clarify) apply (rule LeastI) apply (erule apply_equality, assumption+) @@ -29,35 +29,35 @@ done lemma range_subset_domain: - "\R \ X*X; \g. g \ X \ \u. \ R\ + "\R \ X*X; \g. g \ X \ \u. \g,u\ \ R\ \ range(R) \ domain(R)" by blast -lemma cons_fun_type: "g \ n->X \ cons(, g) \ succ(n) -> cons(x, X)" +lemma cons_fun_type: "g \ n->X \ cons(\n,x\, g) \ succ(n) -> cons(x, X)" apply (unfold succ_def) apply (fast intro!: fun_extend elim!: mem_irrefl) done lemma cons_fun_type2: - "\g \ n->X; x \ X\ \ cons(, g) \ succ(n) -> X" + "\g \ n->X; x \ X\ \ cons(\n,x\, g) \ succ(n) -> X" by (erule cons_absorb [THEN subst], erule cons_fun_type) -lemma cons_image_n: "n \ nat \ cons(, g)``n = g``n" +lemma cons_image_n: "n \ nat \ cons(\n,x\, g)``n = g``n" by (fast elim!: mem_irrefl) -lemma cons_val_n: "g \ n->X \ cons(, g)`n = x" +lemma cons_val_n: "g \ n->X \ cons(\n,x\, g)`n = x" by (fast intro!: apply_equality elim!: cons_fun_type) -lemma cons_image_k: "k \ n \ cons(, g)``k = g``k" +lemma cons_image_k: "k \ n \ cons(\n,x\, g)``k = g``k" by (fast elim: mem_asym) -lemma cons_val_k: "\k \ n; g \ n->X\ \ cons(, g)`k = g`k" +lemma cons_val_k: "\k \ n; g \ n->X\ \ cons(\n,x\, g)`k = g`k" by (fast intro!: apply_equality consI2 elim!: cons_fun_type apply_Pair) -lemma domain_cons_eq_succ: "domain(f)=x \ domain(cons(, f)) = succ(x)" +lemma domain_cons_eq_succ: "domain(f)=x \ domain(cons(\x,y\, f)) = succ(x)" by (simp add: domain_cons succ_def) -lemma restrict_cons_eq: "g \ n->X \ restrict(cons(, g), n) = g" +lemma restrict_cons_eq: "g \ n->X \ restrict(cons(\n,x\, g), n) = g" apply (simp add: restrict_def Pi_iff) apply (blast intro: elim: mem_irrefl) done @@ -80,9 +80,9 @@ definition - DC :: "i => o" where + DC :: "i \ o" where "DC(a) \ \X R. R \ Pow(X)*X \ - (\Y \ Pow(X). Y \ a \ (\x \ X. \ R)) + (\Y \ Pow(X). Y \ a \ (\x \ X. \Y,x\ \ R)) \ (\f \ a->X. \b \ R)" definition @@ -91,18 +91,18 @@ \ (\f \ nat->domain(R). \n \ nat. :R)" definition - ff :: "[i, i, i, i] => i" where + ff :: "[i, i, i, i] \ i" where "ff(b, X, Q, R) \ - transrec(b, %c r. THE x. first(x, {x \ X. \ R}, Q))" + transrec(b, \c r. THE x. first(x, {x \ X. \ R}, Q))" locale DC0_imp = fixes XX and RR and X and R - assumes all_ex: "\Y \ Pow(X). Y \ nat \ (\x \ X. \ R)" + assumes all_ex: "\Y \ Pow(X). Y \ nat \ (\x \ X. \Y, x\ \ R)" defines XX_def: "XX \ (\n \ nat. {f \ n->X. \k \ n. \ R})" - and RR_def: "RR \ {:XX*XX. domain(z2)=succ(domain(z1)) + and RR_def: "RR \ {\z1,z2\:XX*XX. domain(z2)=succ(domain(z1)) \ restrict(z2, domain(z1)) = z1}" begin @@ -141,7 +141,7 @@ apply (erule_tac [2] notE [OF _ empty_subsetI [THEN PowI]]) apply (erule_tac impE [OF _ nat_0I [THEN n_lesspoll_nat]]) apply (erule bexE) -apply (rule_tac a = "<0, {<0, x>}>" in not_emptyI) +apply (rule_tac a = "<0, {\0, x\}>" in not_emptyI) apply (rule CollectI) apply (rule SigmaI) apply (rule nat_0I [THEN UN_I]) @@ -161,7 +161,7 @@ [OF _ nat_into_Ord] n_lesspoll_nat]], assumption+) apply (erule bexE) -apply (rule_tac x = "cons (, g) " in exI) +apply (rule_tac x = "cons (\n,x\, g) " in exI) apply (rule CollectI) apply (force elim!: cons_fun_type2 simp add: cons_image_n cons_val_n cons_image_k cons_val_k) @@ -266,12 +266,12 @@ XX = (\n \ nat. {f \ succ(n)->domain(R). \k \ n. \ R}) - RR = {:Fin(XX)*XX. + RR = {\z1,z2\:Fin(XX)*XX. (domain(z2)=succ(\f \ z1. domain(f)) \ (\f \ z1. restrict(z2, domain(f)) = f)) | (\ (\g \ XX. domain(g)=succ(\f \ z1. domain(f)) \ (\f \ z1. restrict(g, domain(f)) = f)) \ - z2={<0,x>})} + z2={\0,x\})} Then XX and RR satisfy the hypotheses of DC(omega). So applying DC: @@ -287,7 +287,7 @@ ************************************************************************* *) lemma singleton_in_funs: - "x \ X \ {<0,x>} \ + "x \ X \ {\0,x\} \ (\n \ nat. {f \ succ(n)->X. \k \ n. \ R})" apply (rule nat_0I [THEN UN_I]) apply (force simp add: singleton_0 [symmetric] @@ -300,15 +300,15 @@ defines XX_def: "XX \ (\n \ nat. {f \ succ(n)->domain(R). \k \ n. \ R})" and RR_def: - "RR \ {:Fin(XX)*XX. + "RR \ {\z1,z2\:Fin(XX)*XX. (domain(z2)=succ(\f \ z1. domain(f)) \ (\f \ z1. restrict(z2, domain(f)) = f)) | (\ (\g \ XX. domain(g)=succ(\f \ z1. domain(f)) - \ (\f \ z1. restrict(g, domain(f)) = f)) \ z2={<0,x>})}" + \ (\f \ z1. restrict(g, domain(f)) = f)) \ z2={\0,x\})}" and allRR_def: "allRR \ \b \ - {\Fin(XX)*XX. (domain(z2)=succ(\f \ z1. domain(f)) + {\z1,z2\\Fin(XX)*XX. (domain(z2)=succ(\f \ z1. domain(f)) \ (\f \ z1. domain(f)) = b \ (\f \ z1. restrict(z2,domain(f)) = f))}" begin @@ -316,7 +316,7 @@ lemma lemma4: "\range(R) \ domain(R); x \ domain(R)\ \ RR \ Pow(XX)*XX \ - (\Y \ Pow(XX). Y \ nat \ (\x \ XX. :RR))" + (\Y \ Pow(XX). Y \ nat \ (\x \ XX. \Y,x\:RR))" apply (rule conjI) apply (force dest!: FinD [THEN PowI] simp add: RR_def) apply (rule impI [THEN ballI]) @@ -368,7 +368,7 @@ lemma restrict_cons_eq_restrict: "\restrict(h, domain(u))=u; h \ n->X; domain(u) \ n\ - \ restrict(cons(, h), domain(u)) = u" + \ restrict(cons(\n, y\, h), domain(u)) = u" apply (unfold restrict_def) apply (simp add: restrict_def Pi_iff) apply (erule sym [THEN trans, symmetric]) @@ -512,7 +512,7 @@ apply (erule allE impE)+ apply (rule Card_Hartog) apply (erule_tac x = A in allE) -apply (erule_tac x = "{ \ Pow (A) *A . z1 \ Hartog (A) \ z2 \ z1}" +apply (erule_tac x = "{\z1,z2\ \ Pow (A) *A . z1 \ Hartog (A) \ z2 \ z1}" in allE) apply simp apply (erule impE, fast elim: lesspoll_lemma [THEN not_emptyE]) @@ -549,15 +549,15 @@ by (fast intro!: lam_type RepFunI) lemma lemmaX: - "\\Y \ Pow(X). Y \ K \ (\x \ X. \ R); + "\\Y \ Pow(X). Y \ K \ (\x \ X. \Y, x\ \ R); b \ K; Z \ Pow(X); Z \ K\ - \ {x \ X. \ R} \ 0" + \ {x \ X. \Z,x\ \ R} \ 0" by blast lemma WO1_DC_lemma: "\Card(K); well_ord(X,Q); - \Y \ Pow(X). Y \ K \ (\x \ X. \ R); b \ K\ + \Y \ Pow(X). Y \ K \ (\x \ X. \Y, x\ \ R); b \ K\ \ ff(b, X, Q, R) \ {x \ X. <(\c \ b. ff(c, X, Q, R))``b, x> \ R}" apply (rule_tac P = "b \ K" in impE, (erule_tac [2] asm_rl)+) apply (rule_tac i=b in Card_is_Ord [THEN Ord_in_Ord, THEN trans_induct],