# HG changeset patch # User paulson # Date 1664297660 -3600 # Node ID 9fc34f76b4e85939fe6c910790aaadde2f3a828c # Parent a642599ffdea7b0df43f7b210c08e6f62b58378e getting rid of apply (unfold ...) diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/AC/AC15_WO6.thy --- a/src/ZF/AC/AC15_WO6.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/AC/AC15_WO6.thy Tue Sep 27 17:54:20 2022 +0100 @@ -32,7 +32,7 @@ (* ********************************************************************** *) lemma lepoll_Sigma: "A\0 \ B \ A*B" -apply (unfold lepoll_def) + unfolding lepoll_def apply (erule not_emptyE) apply (rule_tac x = "\z \ B. \x,z\" in exI) apply (fast intro!: snd_conv lam_injective) @@ -58,14 +58,14 @@ sets_of_size_between(f`B, 2, n) \ \(f`B)=B \ \B \ A. \! u. u \ f`cons(0, B*nat) \ u \ cons(0, B*nat) \ 0 \ u \ 2 \ u \ u \ n" -apply (unfold sets_of_size_between_def) + unfolding sets_of_size_between_def apply (rule ballI) apply (erule_tac x="cons(0, B*nat)" in ballE) apply (blast dest: lemma1 intro!: lemma2, blast) done lemma lemma4: "\A \ i; Ord(i)\ \ {P(a). a \ A} \ i" -apply (unfold lepoll_def) + unfolding lepoll_def apply (erule exE) apply (rule_tac x = "\x \ RepFun(A,P). \ j. \a\A. x=P(a) \ f`a=j" in exI) @@ -227,7 +227,7 @@ (* ********************************************************************** *) lemma AC13_mono: "\m\n; AC13(m)\ \ AC13(n)" -apply (unfold AC13_def) + unfolding AC13_def apply (drule le_imp_lepoll) apply (fast elim!: lepoll_trans) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/AC/AC16_WO4.thy --- a/src/ZF/AC/AC16_WO4.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/AC/AC16_WO4.thy Tue Sep 27 17:54:20 2022 +0100 @@ -18,7 +18,7 @@ "\Finite(A); 0 nat\ \ \a f. Ord(a) \ domain(f) = a \ (\b (\b m)" -apply (unfold Finite_def) + unfolding Finite_def apply (erule bexE) apply (drule eqpoll_sym [THEN eqpoll_def [THEN def_imp_iff, THEN iffD1]]) apply (erule exE) @@ -345,7 +345,7 @@ "\z \ xa \ (x - {u}); l \ a; a \ y; u \ x\ \ \! w. w \ t_n \ cons(z, cons(u, a)) \ w" apply (rule all_ex [THEN bspec]) -apply (unfold k_def) + unfolding k_def apply (fast intro!: cons_eqpoll_succ elim: eqpoll_sym) done @@ -442,12 +442,12 @@ lemma the_in_MM_subset: "v \ LL \ (THE x. x \ MM \ v \ x) \ x \ y" apply (drule unique_superset1) -apply (unfold MM_def) + unfolding MM_def apply (fast dest!: unique_superset1 "includes" [THEN subsetD]) done lemma GG_subset: "v \ LL \ GG ` v \ x" -apply (unfold GG_def) + unfolding GG_def apply (frule the_in_MM_subset) apply (frule in_LL_eq_Int) apply (force elim: equalityE) @@ -473,7 +473,7 @@ apply (rule ccontr) apply (subgoal_tac "\v \ s (u) . k \ v \ y") prefer 2 apply (simp add: s_def, blast intro: succ_not_lepoll_imp_eqpoll) -apply (unfold k_def) + unfolding k_def apply (insert all_ex "includes" lnat) apply (rule ex_subset_eqpoll_n [THEN exE], assumption) apply (rule noLepoll [THEN notE]) @@ -489,7 +489,7 @@ apply (rule exists_in_MM [THEN bexE], assumption) apply (rule bexI) apply (erule_tac [2] Int_in_LL) -apply (unfold GG_def) + unfolding GG_def apply (simp add: Int_in_LL) apply (subst unique_superset_in_MM [THEN the_equality2]) apply (fast elim!: Int_in_LL)+ @@ -516,7 +516,7 @@ (* ********************************************************************** *) lemma in_MM_eqpoll_n: "w \ MM \ w \ succ(k #+ m)" -apply (unfold MM_def) + unfolding MM_def apply (fast dest: "includes" [THEN subsetD]) done @@ -529,7 +529,7 @@ lemma all_in_lepoll_m: "well_ord(LL,S) \ \b m" -apply (unfold GG_def) + unfolding GG_def apply (rule oallI) apply (simp add: ltD ordermap_bij [THEN bij_converse_bij, THEN bij_is_fun, THEN apply_type]) apply (insert "includes") diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/AC/AC16_lemmas.thy --- a/src/ZF/AC/AC16_lemmas.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/AC/AC16_lemmas.thy Tue Sep 27 17:54:20 2022 +0100 @@ -12,7 +12,7 @@ by fast lemma nat_1_lepoll_iff: "1\X \ (\x. x \ X)" -apply (unfold lepoll_def) + unfolding lepoll_def apply (rule iffI) apply (fast intro: inj_is_fun [THEN apply_type]) apply (erule exE) @@ -29,7 +29,7 @@ done lemma cons_eqpoll_succ: "\x\n; y\x\ \ cons(y,x)\succ(n)" -apply (unfold succ_def) + unfolding succ_def apply (fast elim!: cons_eqpoll_cong mem_irrefl) done @@ -71,7 +71,7 @@ lemma subsets_lepoll_lemma1: "\InfCard(x); n \ nat\ \ {y \ Pow(x). y\succ(succ(n))} \ x*{y \ Pow(x). y\succ(n)}" -apply (unfold lepoll_def) + unfolding lepoll_def apply (rule_tac x = "\y \ {y \ Pow(x) . y\succ (succ (n))}. <\ i. i \ y, y-{\ i. i \ y}>" in exI) apply (rule_tac d = "\z. cons (fst(z), snd(z))" in lam_injective) @@ -144,7 +144,7 @@ lemma succ_lepoll_succ_succ: "\InfCard(x); n \ nat\ \ {y \ Pow(x). y\succ(n)} \ {y \ Pow(x). y\succ(succ(n))}" -apply (unfold lepoll_def) + unfolding lepoll_def apply (rule_tac x = "\z \ {y\Pow(x). y\succ(n)}. cons(succ(\(z)), z)" in exI) apply (rule_tac d = "\z. z-{\(z) }" in lam_injective) @@ -173,7 +173,7 @@ lemma image_vimage_eq: "\f \ surj(A,B); y \ B\ \ f``(converse(f)``y) = y" -apply (unfold surj_def) + unfolding surj_def apply (fast dest: apply_equality2 elim: apply_iff [THEN iffD2]) done @@ -182,7 +182,7 @@ lemma subsets_eqpoll: "A\B \ {Y \ Pow(A). Y\n}\{Y \ Pow(B). Y\n}" -apply (unfold eqpoll_def) + unfolding eqpoll_def apply (erule exE) apply (rule_tac x = "\X \ {Y \ Pow (A) . \f. f \ bij (Y, n) }. f``X" in exI) apply (rule_tac d = "\Z. converse (f) ``Z" in lam_bijective) @@ -197,7 +197,7 @@ done lemma WO2_imp_ex_Card: "WO2 \ \a. Card(a) \ X\a" -apply (unfold WO2_def) + unfolding WO2_def apply (drule spec [of _ X]) apply (blast intro: Card_cardinal eqpoll_trans well_ord_Memrel [THEN well_ord_cardinal_eqpoll, THEN eqpoll_sym]) @@ -207,7 +207,7 @@ by (blast intro: lepoll_Finite) lemma infinite_Card_is_InfCard: "\\Finite(X); Card(X)\ \ InfCard(X)" -apply (unfold InfCard_def) + unfolding InfCard_def apply (fast elim!: Card_is_Ord [THEN nat_le_infinite_Ord]) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/AC/AC17_AC1.thy --- a/src/ZF/AC/AC17_AC1.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/AC/AC17_AC1.thy Tue Sep 27 17:54:20 2022 +0100 @@ -71,7 +71,7 @@ lemma not_AC1_imp_ex: "\AC1 \ \A. \f \ Pow(A)-{0} -> A. \u \ Pow(A)-{0}. f`u \ u" -apply (unfold AC1_def) + unfolding AC1_def apply (erule swap) apply (rule allI) apply (erule swap) @@ -112,7 +112,7 @@ by simp lemma AC17_AC1: "AC17 \ AC1" -apply (unfold AC17_def) + unfolding AC17_def apply (rule classical) apply (erule not_AC1_imp_ex [THEN exE]) apply (case_tac diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/AC/AC18_AC19.thy --- a/src/ZF/AC/AC18_AC19.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/AC/AC18_AC19.thy Tue Sep 27 17:54:20 2022 +0100 @@ -36,7 +36,7 @@ done lemma AC1_AC18: "AC1 \ PROP AC18" -apply (unfold AC1_def) + unfolding AC1_def apply (rule AC18.intro) apply (fast elim!: lemma_AC18 apply_type intro!: equalityI INT_I UN_I) done @@ -46,7 +46,7 @@ (* ********************************************************************** *) theorem (in AC18) AC19 -apply (unfold AC19_def) + unfolding AC19_def apply (intro allI impI) apply (rule AC18 [of _ "\x. x", THEN mp], blast) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/AC/AC7_AC9.thy --- a/src/ZF/AC/AC7_AC9.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/AC/AC7_AC9.thy Tue Sep 27 17:54:20 2022 +0100 @@ -22,7 +22,7 @@ "C \ A \ (\g \ (nat->\(A))*C. (\n \ nat. if(n=0, snd(g), fst(g)`(n #- 1)))) \ inj((nat->\(A))*C, (nat->\(A)) ) " -apply (unfold inj_def) + unfolding inj_def apply (rule CollectI) apply (fast intro!: lam_type if_type apply_type fst_type snd_type, auto) apply (rule fun_extension, assumption+) diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/AC/AC_Equiv.thy --- a/src/ZF/AC/AC_Equiv.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/AC/AC_Equiv.thy Tue Sep 27 17:54:20 2022 +0100 @@ -138,7 +138,7 @@ (* lemma for ordertype_Int *) lemma rvimage_id: "rvimage(A,id(A),r) = r \ A*A" -apply (unfold rvimage_def) + unfolding rvimage_def apply (rule equalityI, safe) apply (drule_tac P = "\a. :r" in id_conv [THEN subst], assumption) @@ -194,7 +194,7 @@ (*Using AC we could trivially prove, for all u, domain(u) \ u*) lemma lepoll_m_imp_domain_lepoll_m: "\m \ nat; u \ m\ \ domain(u) \ m" -apply (unfold lepoll_def) + unfolding lepoll_def apply (erule exE) apply (rule_tac x = "\x \ domain(u). \ i. \y. \x,y\ \ u \ f`\x,y\ = i" in exI) diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/AC/Cardinal_aux.thy --- a/src/ZF/AC/Cardinal_aux.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/AC/Cardinal_aux.thy Tue Sep 27 17:54:20 2022 +0100 @@ -99,7 +99,7 @@ by blast lemma UN_sing_lepoll: "Ord(a) \ (\x \ a. {P(x)}) \ a" -apply (unfold lepoll_def) + unfolding lepoll_def apply (rule_tac x = "\z \ (\x \ a. {P (x) }) . (\ i. P (i) =z) " in exI) apply (rule_tac d = "\z. P (z) " in lam_injective) apply (fast intro!: Least_in_Ord) diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/AC/DC.thy --- a/src/ZF/AC/DC.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/AC/DC.thy Tue Sep 27 17:54:20 2022 +0100 @@ -9,7 +9,7 @@ begin lemma RepFun_lepoll: "Ord(a) \ {P(b). b \ a} \ a" -apply (unfold lepoll_def) + unfolding 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 (fast intro!: Least_in_Ord) @@ -19,7 +19,7 @@ text\Trivial in the presence of AC, but here we need a wellordering of X\ lemma image_Ord_lepoll: "\f \ X->Y; Ord(X)\ \ f``X \ X" -apply (unfold lepoll_def) + unfolding 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 (fast intro!: Least_in_Ord apply_equality, clarify) @@ -34,7 +34,7 @@ by blast lemma cons_fun_type: "g \ n->X \ cons(\n,x\, g) \ succ(n) -> cons(x, X)" -apply (unfold succ_def) + unfolding succ_def apply (fast intro!: fun_extend elim!: mem_irrefl) done @@ -352,7 +352,7 @@ lemma f_n_type: "\domain(f`n) = succ(k); f \ nat -> XX; n \ nat\ \ f`n \ succ(k) -> domain(R)" -apply (unfold XX_def) + unfolding XX_def apply (drule apply_type, assumption) apply (fast elim: domain_eq_imp_fun_type) done @@ -360,7 +360,7 @@ lemma f_n_pairs_in_R [rule_format]: "\h \ nat -> XX; domain(h`n) = succ(k); n \ nat\ \ \i \ k. \ R" -apply (unfold XX_def) + unfolding XX_def apply (drule apply_type, assumption) apply (elim UN_E CollectE) apply (drule domain_of_fun [symmetric, THEN trans], assumption, simp) @@ -369,7 +369,7 @@ lemma restrict_cons_eq_restrict: "\restrict(h, domain(u))=u; h \ n->X; domain(u) \ n\ \ restrict(cons(\n, y\, h), domain(u)) = u" -apply (unfold restrict_def) + unfolding restrict_def apply (simp add: restrict_def Pi_iff) apply (erule sym [THEN trans, symmetric]) apply (blast elim: mem_irrefl) @@ -437,13 +437,13 @@ lemma lemma2: "\allRR; f \ nat->XX; range(R) \ domain(R); x \ domain(R); n \ nat\ \ f`n \ succ(n) -> domain(R) \ (\i \ n. :R)" -apply (unfold allRR_def) + unfolding allRR_def apply (drule ospec) apply (erule ltI [OF _ Ord_nat]) apply (erule CollectE, simp) apply (rule conjI) prefer 2 apply (fast elim!: f_n_pairs_in_R trans subst_context) -apply (unfold XX_def) + unfolding XX_def apply (fast elim!: trans [THEN domain_eq_imp_fun_type] subst_context) done @@ -451,7 +451,7 @@ "\allRR; f \ nat->XX; n\nat; range(R) \ domain(R); x \ domain(R)\ \ f`n`n = f`succ(n)`n" apply (frule lemma2 [THEN conjunct1, THEN domain_of_fun], assumption+) -apply (unfold allRR_def) + unfolding allRR_def apply (drule ospec) apply (drule ltI [OF nat_succI Ord_nat], assumption, simp) apply (elim conjE ballE) @@ -497,7 +497,7 @@ by (fast elim!: image_fun [THEN ssubst]) lemma lesspoll_lemma: "\\ A \ B; C \ B\ \ A - C \ 0" -apply (unfold lesspoll_def) + unfolding lesspoll_def apply (fast dest!: Diff_eq_0_iff [THEN iffD1, THEN subset_imp_lepoll] intro!: eqpollI elim: notE elim!: eqpollE lepoll_trans) diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/AC/HH.thy --- a/src/ZF/AC/HH.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/AC/HH.thy Tue Sep 27 17:54:20 2022 +0100 @@ -196,7 +196,7 @@ f \ (Pow(x)-{0}) -> {{z}. z \ x}\ \ (\a \ (\ i. HH(f,x,i)={x}). HH(f,x,a)) \ bij(\ i. HH(f,x,i)={x}, {{y}. y \ x})" -apply (unfold bij_def) + unfolding bij_def apply (fast intro!: lam_Least_HH_inj lam_surj_sing f_sing_imp_HH_sing) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/AC/Hartog.thy --- a/src/ZF/AC/Hartog.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/AC/Hartog.thy Tue Sep 27 17:54:20 2022 +0100 @@ -20,7 +20,7 @@ lemma Ord_lepoll_imp_ex_well_ord: "\Ord(a); a \ X\ \ \Y. Y \ X \ (\R. well_ord(Y,R) \ ordertype(Y,R)=a)" -apply (unfold lepoll_def) + unfolding lepoll_def apply (erule exE) apply (intro exI conjI) apply (erule inj_is_fun [THEN fun_is_rel, THEN image_subset]) @@ -60,7 +60,7 @@ done lemma not_Hartog_lepoll_self: "\ Hartog(A) \ A" -apply (unfold Hartog_def) + unfolding Hartog_def apply (rule ex_Ord_not_lepoll [THEN exE]) apply (rule LeastI, auto) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/AC/WO1_AC.thy --- a/src/ZF/AC/WO1_AC.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/AC/WO1_AC.thy Tue Sep 27 17:54:20 2022 +0100 @@ -40,7 +40,7 @@ (* ********************************************************************** *) lemma lemma1: "\WO1; \B \ A. \C \ D(B). P(C,B)\ \ \f. \B \ A. P(f`B,B)" -apply (unfold WO1_def) + unfolding WO1_def apply (erule_tac x = "\({{C \ D (B) . P (C,B) }. B \ A}) " in allE) apply (erule exE, drule ex_choice_fun, fast) apply (erule exE) @@ -49,7 +49,7 @@ done lemma lemma2_1: "\\Finite(B); WO1\ \ |B| + |B| \ B" -apply (unfold WO1_def) + unfolding WO1_def apply (rule eqpoll_trans) prefer 2 apply (fast elim!: well_ord_cardinal_eqpoll) apply (rule eqpoll_sym [THEN eqpoll_trans]) @@ -67,7 +67,7 @@ lemma lemma2_3: "f \ bij(D+D, B) \ pairwise_disjoint({{f`Inl(i), f`Inr(i)}. i \ D})" -apply (unfold pairwise_disjoint_def) + unfolding pairwise_disjoint_def apply (blast dest: bij_is_inj [THEN inj_apply_equality]) done @@ -98,7 +98,7 @@ done theorem WO1_AC10: "\WO1; 1\n\ \ AC10(n)" -apply (unfold AC10_def) + unfolding AC10_def apply (fast intro!: lemma1 elim!: lemma2) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/AC/WO1_WO7.thy --- a/src/ZF/AC/WO1_WO7.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/AC/WO1_WO7.thy Tue Sep 27 17:54:20 2022 +0100 @@ -57,7 +57,7 @@ lemma converse_Memrel_not_well_ord: "\Ord(a); \Finite(a)\ \ \well_ord(a,converse(Memrel(a)))" -apply (unfold well_ord_def) + unfolding well_ord_def apply (blast dest: converse_Memrel_not_wf_on) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/AC/WO2_AC16.thy --- a/src/ZF/AC/WO2_AC16.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/AC/WO2_AC16.thy Tue Sep 27 17:54:20 2022 +0100 @@ -76,7 +76,7 @@ lemma recfunAC16_mono: "i\j \ recfunAC16(f, g, i, a) \ recfunAC16(f, g, j, a)" -apply (unfold recfunAC16_def) + unfolding recfunAC16_def apply (rule transrec2_mono, auto) done @@ -167,10 +167,10 @@ lemma Finite_lesspoll_infinite_Ord: "\Finite(X); \Finite(a); Ord(a)\ \ X\a" -apply (unfold lesspoll_def) + unfolding lesspoll_def apply (rule conjI) apply (drule nat_le_infinite_Ord [THEN le_imp_lepoll], assumption) -apply (unfold Finite_def) + unfolding Finite_def apply (blast intro: leI [THEN le_imp_subset, THEN subset_imp_lepoll] ltI eqpoll_imp_lepoll lepoll_trans) apply (blast intro: eqpoll_sym [THEN eqpoll_trans]) @@ -256,7 +256,7 @@ \ (\x a" apply (rule lepoll_def [THEN def_imp_iff [THEN iffD2]]) apply (rule_tac x = "\z \ (\x i. z \ F (i) " in exI) -apply (unfold inj_def) + unfolding inj_def apply (rule CollectI) apply (rule lam_type) apply (erule OUN_E) @@ -547,7 +547,7 @@ (* ********************************************************************** *) theorem WO2_AC16: "\WO2; 0 nat; m \ nat\ \ AC16(k #+ m,k)" -apply (unfold AC16_def) + unfolding AC16_def apply (rule allI) apply (rule impI) apply (frule WO2_infinite_subsets_eqpoll_X, assumption+) diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/AC/WO6_WO1.thy --- a/src/ZF/AC/WO6_WO1.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/AC/WO6_WO1.thy Tue Sep 27 17:54:20 2022 +0100 @@ -86,7 +86,7 @@ by (fast intro!: lam_type apply_type) lemma surj_imp_eq': "f \ surj(A,B) \ (\a \ A. {f`a}) = B" -apply (unfold surj_def) + unfolding surj_def apply (fast elim!: apply_type) done @@ -109,7 +109,7 @@ (* ********************************************************************** *) lemma WO4_mono: "\m\n; WO4(m)\ \ WO4(n)" -apply (unfold WO4_def) + unfolding WO4_def apply (blast dest!: spec intro: lepoll_trans [OF _ le_imp_lepoll]) done @@ -175,7 +175,7 @@ (\gd 0 \ u(f,b,g,d) \ m)) | (\b 0 \ (\gd 0 \ u(f,b,g,d) \ m))" -apply (unfold lesspoll_def) + unfolding lesspoll_def apply (blast del: equalityI) done @@ -330,7 +330,7 @@ \b succ(m); y*y \ y; (\b nat; s \ f`b; b \ (\gm \ nat; m\0\ \ vv2(f,b,g,s) \ m" -apply (unfold vv2_def) + unfolding vv2_def apply (simp add: empty_lepollI) apply (fast dest!: le_imp_subset [THEN subset_imp_lepoll, THEN lepoll_0_is_0] intro!: singleton_eqpoll_1 [THEN eqpoll_imp_lepoll, THEN lepoll_trans] @@ -357,7 +357,7 @@ lemma ww2_lepoll: "\\b succ(m); g nat; vv2(f,b,g,d) \ f`g\ \ ww2(f,b,g,d) \ m" -apply (unfold ww2_def) + unfolding ww2_def apply (case_tac "f`g = 0") apply (simp add: empty_lepollI) apply (drule ospec, assumption) @@ -381,7 +381,7 @@ (* lemma ii *) (* ********************************************************************** *) lemma lemma_ii: "\succ(m) \ NN(y); y*y \ y; m \ nat; m\0\ \ m \ NN(y)" -apply (unfold NN_def) + unfolding NN_def apply (elim CollectE exE conjE) apply (rule quant_domain_uu_lepoll_m [THEN cases, THEN disjE], assumption) (* case 1 *) @@ -472,7 +472,7 @@ done lemma NN_imp_ex_inj: "1 \ NN(y) \ \a f. Ord(a) \ f \ inj(y, a)" -apply (unfold NN_def) + unfolding NN_def apply (elim CollectE exE conjE) apply (rule_tac x = a in exI) apply (rule_tac x = "\x \ y. \ i. f`i = {x}" in exI) @@ -517,12 +517,12 @@ (* another helpful lemma *) lemma NN_y_0: "0 \ NN(y) \ y=0" -apply (unfold NN_def) + unfolding NN_def apply (fast intro!: equalityI dest!: lepoll_0_is_0 elim: subst) done lemma WO6_imp_WO1: "WO6 \ WO1" -apply (unfold WO1_def) + unfolding WO1_def apply (rule allI) apply (case_tac "A=0") apply (fast intro!: well_ord_Memrel nat_0I [THEN nat_into_Ord]) diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Arith.thy --- a/src/ZF/Arith.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Arith.thy Tue Sep 27 17:54:20 2022 +0100 @@ -191,7 +191,7 @@ by (simp add: diff_def raw_diff_type) lemma diff_0_eq_0 [simp]: "0 #- n = 0" -apply (unfold diff_def) + unfolding diff_def apply (rule natify_in_nat [THEN nat_induct], auto) done @@ -245,7 +245,7 @@ done lemma add_succ_right [simp]: "m #+ succ(n) = succ(m #+ n)" -apply (unfold add_def) + unfolding add_def apply (rule_tac n = "natify(m) " in nat_induct) apply (auto simp add: natify_succ) done @@ -278,7 +278,7 @@ done lemma add_left_cancel_natify: "k #+ m = k #+ n \ natify(m) = natify(n)" -apply (unfold add_def) + unfolding add_def apply (drule raw_add_left_cancel, auto) done @@ -468,7 +468,7 @@ (*right annihilation in product*) lemma mult_0_right [simp]: "m #* 0 = 0" -apply (unfold mult_def) + unfolding mult_def apply (rule_tac n = "natify(m) " in nat_induct) apply auto done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/ArithSimp.thy --- a/src/ZF/ArithSimp.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/ArithSimp.thy Tue Sep 27 17:54:20 2022 +0100 @@ -82,14 +82,14 @@ nat_into_Ord not_lt_iff_le [THEN iffD1] lemma raw_mod_type: "\m:nat; n:nat\ \ raw_mod (m, n) \ nat" -apply (unfold raw_mod_def) + unfolding raw_mod_def apply (rule Ord_transrec_type) apply (auto simp add: nat_into_Ord [THEN Ord_0_lt_iff]) apply (blast intro: div_rls) done lemma mod_type [TC,iff]: "m mod n \ nat" -apply (unfold mod_def) + unfolding mod_def apply (simp (no_asm) add: mod_def raw_mod_type) done @@ -98,13 +98,13 @@ certain equations **) lemma DIVISION_BY_ZERO_DIV: "a div 0 = 0" -apply (unfold div_def) + unfolding div_def apply (rule raw_div_def [THEN def_transrec, THEN trans]) apply (simp (no_asm_simp)) done (*NOT for adding to default simpset*) lemma DIVISION_BY_ZERO_MOD: "a mod 0 = natify(a)" -apply (unfold mod_def) + unfolding mod_def apply (rule raw_mod_def [THEN def_transrec, THEN trans]) apply (simp (no_asm_simp)) done (*NOT for adding to default simpset*) @@ -138,14 +138,14 @@ subsection\Division\ lemma raw_div_type: "\m:nat; n:nat\ \ raw_div (m, n) \ nat" -apply (unfold raw_div_def) + unfolding raw_div_def apply (rule Ord_transrec_type) apply (auto simp add: nat_into_Ord [THEN Ord_0_lt_iff]) apply (blast intro: div_rls) done lemma div_type [TC,iff]: "m div n \ nat" -apply (unfold div_def) + unfolding div_def apply (simp (no_asm) add: div_def raw_div_type) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Bin.thy --- a/src/ZF/Bin.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Bin.thy Tue Sep 27 17:54:20 2022 +0100 @@ -164,7 +164,7 @@ (*This proof is complicated by the mutual recursion*) lemma bin_add_type [rule_format]: "v \ bin \ \w\bin. bin_add(v,w) \ bin" -apply (unfold bin_add_def) + unfolding bin_add_def apply (induct_tac "v") apply (rule_tac [3] ballI) apply (rename_tac [3] "w'") @@ -215,7 +215,7 @@ by (unfold bin_add_def, simp) lemma bin_add_Pls_right: "w \ bin \ bin_add(w,Pls) = w" -apply (unfold bin_add_def) + unfolding bin_add_def apply (erule bin.induct, auto) done @@ -223,7 +223,7 @@ by (unfold bin_add_def, simp) lemma bin_add_Min_right: "w \ bin \ bin_add(w,Min) = bin_pred(w)" -apply (unfold bin_add_def) + unfolding bin_add_def apply (erule bin.induct, auto) done @@ -252,7 +252,7 @@ lemma diff_integ_of_eq: "\v \ bin; w \ bin\ \ integ_of(v) $- integ_of(w) = integ_of(bin_add (v, bin_minus(w)))" -apply (unfold zdiff_def) + unfolding zdiff_def apply (simp add: integ_of_add integ_of_minus) done @@ -362,7 +362,7 @@ "\v \ bin; w \ bin\ \ ((integ_of(v)) = integ_of(w)) \ iszero (integ_of (bin_add (v, bin_minus(w))))" -apply (unfold iszero_def) + unfolding iszero_def apply (simp add: zcompare_rls integ_of_add integ_of_minus) done @@ -371,7 +371,7 @@ lemma nonzero_integ_of_Min: "\ iszero (integ_of(Min))" -apply (unfold iszero_def) + unfolding iszero_def apply (simp add: zminus_equation) done @@ -497,7 +497,7 @@ lemma add_integ_of_diff1 [simp]: "\v \ bin; w \ bin\ \ integ_of(v) $+ (integ_of(w) $- c) = integ_of(bin_add(v,w)) $- (c)" -apply (unfold zdiff_def) + unfolding zdiff_def apply (rule add_integ_of_left, auto) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Cardinal.thy --- a/src/ZF/Cardinal.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Cardinal.thy Tue Sep 27 17:54:20 2022 +0100 @@ -79,7 +79,7 @@ (** Equipollence is an equivalence relation **) lemma bij_imp_eqpoll: "f \ bij(A,B) \ A \ B" -apply (unfold eqpoll_def) + unfolding eqpoll_def apply (erule exI) done @@ -87,20 +87,20 @@ lemmas eqpoll_refl = id_bij [THEN bij_imp_eqpoll, simp] lemma eqpoll_sym: "X \ Y \ Y \ X" -apply (unfold eqpoll_def) + unfolding eqpoll_def apply (blast intro: bij_converse_bij) done lemma eqpoll_trans [trans]: "\X \ Y; Y \ Z\ \ X \ Z" -apply (unfold eqpoll_def) + unfolding eqpoll_def apply (blast intro: comp_bij) done (** Le-pollence is a partial ordering **) lemma subset_imp_lepoll: "X<=Y \ X \ Y" -apply (unfold lepoll_def) + unfolding lepoll_def apply (rule exI) apply (erule id_subset_inj) done @@ -113,7 +113,7 @@ by (unfold eqpoll_def bij_def lepoll_def, blast) lemma lepoll_trans [trans]: "\X \ Y; Y \ Z\ \ X \ Z" -apply (unfold lepoll_def) + unfolding lepoll_def apply (blast intro: comp_inj) done @@ -150,7 +150,7 @@ lemma Un_lepoll_Un: "\A \ B; C \ D; B \ D = 0\ \ A \ C \ B \ D" -apply (unfold lepoll_def) + unfolding lepoll_def apply (blast intro: inj_disjoint_Un) done @@ -163,7 +163,7 @@ lemma eqpoll_disjoint_Un: "\A \ B; C \ D; A \ C = 0; B \ D = 0\ \ A \ C \ B \ D" -apply (unfold eqpoll_def) + unfolding eqpoll_def apply (blast intro: bij_disjoint_Un) done @@ -180,12 +180,12 @@ by (unfold lesspoll_def, blast) lemma lepoll_well_ord: "\A \ B; well_ord(B,r)\ \ \s. well_ord(A,s)" -apply (unfold lepoll_def) + unfolding lepoll_def apply (blast intro: well_ord_rvimage) done lemma lepoll_iff_leqpoll: "A \ B \ A \ B | A \ B" -apply (unfold lesspoll_def) + unfolding lesspoll_def apply (blast intro!: eqpollI elim!: eqpollE) done @@ -208,19 +208,19 @@ lemma lesspoll_trans [trans]: "\X \ Y; Y \ Z\ \ X \ Z" -apply (unfold lesspoll_def) + unfolding lesspoll_def apply (blast elim!: eqpollE intro: eqpollI lepoll_trans) done lemma lesspoll_trans1 [trans]: "\X \ Y; Y \ Z\ \ X \ Z" -apply (unfold lesspoll_def) + unfolding lesspoll_def apply (blast elim!: eqpollE intro: eqpollI lepoll_trans) done lemma lesspoll_trans2 [trans]: "\X \ Y; Y \ Z\ \ X \ Z" -apply (unfold lesspoll_def) + unfolding lesspoll_def apply (blast elim!: eqpollE intro: eqpollI lepoll_trans) done @@ -237,7 +237,7 @@ lemma Least_equality: "\P(i); Ord(i); \x. x \P(x)\ \ (\ x. P(x)) = i" -apply (unfold Least_def) + unfolding Least_def apply (rule the_equality, blast) apply (elim conjE) apply (erule Ord_linear_lt, assumption, blast+) @@ -304,7 +304,7 @@ (*If there is no such P then \ is vacuously 0*) lemma Least_0: "\\ (\i. Ord(i) \ P(i))\ \ (\ x. P(x)) = 0" -apply (unfold Least_def) + unfolding Least_def apply (rule the_0, blast) done @@ -369,12 +369,12 @@ (** Observations from Kunen, page 28 **) lemma Ord_cardinal_le: "Ord(i) \ |i| \ i" -apply (unfold cardinal_def) + unfolding cardinal_def apply (erule eqpoll_refl [THEN Least_le]) done lemma Card_cardinal_eq: "Card(K) \ |K| = K" -apply (unfold Card_def) + unfolding Card_def apply (erule sym) done @@ -396,7 +396,7 @@ done lemma Ord_cardinal [simp,intro!]: "Ord(|A|)" -apply (unfold cardinal_def) + unfolding cardinal_def apply (rule Ord_Least) done @@ -417,7 +417,7 @@ qed lemma lt_Card_imp_lesspoll: "\Card(a); i \ i \ a" -apply (unfold lesspoll_def) + unfolding lesspoll_def apply (drule Card_iff_initial [THEN iffD1]) apply (blast intro!: leI [THEN le_imp_lepoll]) done @@ -536,7 +536,7 @@ by (blast intro: lepoll_cardinal_le well_ord_Memrel well_ord_cardinal_eqpoll dest!: lepoll_well_ord) lemma lesspoll_imp_eqpoll: "\A \ i; Ord(i)\ \ |A| \ A" -apply (unfold lesspoll_def) + unfolding lesspoll_def apply (blast intro: lepoll_Ord_imp_eqpoll) done @@ -569,7 +569,7 @@ (*Lemma suggested by Mike Fourman*) lemma succ_lepoll_succD: "succ(m) \ succ(n) \ m \ n" -apply (unfold succ_def) + unfolding succ_def apply (erule cons_lepoll_consD) apply (rule mem_not_refl)+ done @@ -757,7 +757,7 @@ by (blast intro: cons_eqpoll_cong cons_eqpoll_consD) lemma singleton_eqpoll_1: "{a} \ 1" -apply (unfold succ_def) + unfolding succ_def apply (blast intro!: eqpoll_refl [THEN cons_eqpoll_cong]) done @@ -775,26 +775,26 @@ (*Congruence law for succ under equipollence*) lemma succ_eqpoll_cong: "A \ B \ succ(A) \ succ(B)" -apply (unfold succ_def) + unfolding succ_def apply (simp add: cons_eqpoll_cong mem_not_refl) done (*Congruence law for + under equipollence*) lemma sum_eqpoll_cong: "\A \ C; B \ D\ \ A+B \ C+D" -apply (unfold eqpoll_def) + unfolding eqpoll_def apply (blast intro!: sum_bij) done (*Congruence law for * under equipollence*) lemma prod_eqpoll_cong: "\A \ C; B \ D\ \ A*B \ C*D" -apply (unfold eqpoll_def) + unfolding eqpoll_def apply (blast intro!: prod_bij) done lemma inj_disjoint_eqpoll: "\f \ inj(A,B); A \ B = 0\ \ A \ (B - range(f)) \ B" -apply (unfold eqpoll_def) + unfolding eqpoll_def apply (rule exI) apply (rule_tac c = "\x. if x \ A then f`x else x" and d = "\y. if y \ range (f) then converse (f) `y else y" @@ -815,7 +815,7 @@ then \<^term>\A-{a}\ has at most \<^term>\n\.\ lemma Diff_sing_lepoll: "\a \ A; A \ succ(n)\ \ A - {a} \ n" -apply (unfold succ_def) + unfolding succ_def apply (rule cons_lepoll_consD) apply (rule_tac [3] mem_not_refl) apply (erule cons_Diff [THEN ssubst], safe) @@ -846,7 +846,7 @@ done lemma Un_lepoll_sum: "A \ B \ A+B" -apply (unfold lepoll_def) + unfolding lepoll_def apply (rule_tac x = "\x\A \ B. if x\A then Inl (x) else Inr (x)" in exI) apply (rule_tac d = "\z. snd (z)" in lam_injective) apply force @@ -860,7 +860,7 @@ (*Krzysztof Grabczewski*) lemma disj_Un_eqpoll_sum: "A \ B = 0 \ A \ B \ A + B" -apply (unfold eqpoll_def) + unfolding eqpoll_def apply (rule_tac x = "\a\A \ B. if a \ A then Inl (a) else Inr (a)" in exI) apply (rule_tac d = "\z. case (\x. x, \x. x, z)" in lam_bijective) apply auto @@ -870,17 +870,17 @@ subsection \Finite and infinite sets\ lemma eqpoll_imp_Finite_iff: "A \ B \ Finite(A) \ Finite(B)" -apply (unfold Finite_def) + unfolding Finite_def apply (blast intro: eqpoll_trans eqpoll_sym) done lemma Finite_0 [simp]: "Finite(0)" -apply (unfold Finite_def) + unfolding Finite_def apply (blast intro!: eqpoll_refl nat_0I) done lemma Finite_cons: "Finite(x) \ Finite(cons(y,x))" -apply (unfold Finite_def) + unfolding Finite_def apply (case_tac "y \ x") apply (simp add: cons_absorb) apply (erule bexE) @@ -890,7 +890,7 @@ done lemma Finite_succ: "Finite(x) \ Finite(succ(x))" -apply (unfold succ_def) + unfolding succ_def apply (erule Finite_cons) done @@ -912,7 +912,7 @@ lemma lesspoll_nat_is_Finite: "A \ nat \ Finite(A)" -apply (unfold Finite_def) + unfolding Finite_def apply (blast dest: ltD lesspoll_cardinal_lt lesspoll_imp_eqpoll [THEN eqpoll_sym]) done @@ -943,7 +943,7 @@ lemma nat_le_infinite_Ord: "\Ord(i); \ Finite(i)\ \ nat \ i" -apply (unfold Finite_def) + unfolding Finite_def apply (erule Ord_nat [THEN [2] Ord_linear2]) prefer 2 apply assumption apply (blast intro!: eqpoll_refl elim!: ltE) @@ -993,12 +993,12 @@ apply (rule Fin.consI, blast) apply (blast intro: subset_consI [THEN Fin_mono, THEN subsetD]) (*Now for the lemma assumed above*) -apply (unfold eqpoll_def) + unfolding eqpoll_def apply (blast intro: bij_converse_bij [THEN bij_is_fun, THEN apply_type]) done lemma Finite_into_Fin: "Finite(A) \ A \ Fin(A)" -apply (unfold Finite_def) + unfolding Finite_def apply (blast intro: Fin_lemma) done @@ -1036,7 +1036,7 @@ (*Sidi Ehmety. The contrapositive says \Finite(A) \ \Finite(A-{a}) *) lemma Diff_sing_Finite: "Finite(A - {a}) \ Finite(A)" -apply (unfold Finite_def) + unfolding Finite_def apply (case_tac "a \ A") apply (subgoal_tac [2] "A-{a}=A", auto) apply (rule_tac x = "succ (n) " in bexI) @@ -1154,7 +1154,7 @@ lemma Finite_well_ord_converse: "\Finite(A); well_ord(A,r)\ \ well_ord(A,converse(r))" -apply (unfold Finite_def) + unfolding Finite_def apply (rule well_ord_converse, assumption) apply (blast dest: ordertype_eq_n intro!: nat_well_ord_converse_Memrel) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/CardinalArith.thy --- a/src/ZF/CardinalArith.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/CardinalArith.thy Tue Sep 27 17:54:20 2022 +0100 @@ -73,7 +73,7 @@ by (auto simp add: OUnion_def Card_0) lemma in_Card_imp_lesspoll: "\Card(K); b \ K\ \ b \ K" -apply (unfold lesspoll_def) + unfolding lesspoll_def apply (simp add: Card_iff_initial) apply (fast intro!: le_imp_lepoll ltI leI) done @@ -95,14 +95,14 @@ qed lemma cadd_commute: "i \ j = j \ i" -apply (unfold cadd_def) + unfolding cadd_def apply (rule sum_commute_eqpoll [THEN cardinal_cong]) done subsubsection\Cardinal addition is associative\ lemma sum_assoc_eqpoll: "(A+B)+C \ A+(B+C)" -apply (unfold eqpoll_def) + unfolding eqpoll_def apply (rule exI) apply (rule sum_assoc_bij) done @@ -125,13 +125,13 @@ subsubsection\0 is the identity for addition\ lemma sum_0_eqpoll: "0+A \ A" -apply (unfold eqpoll_def) + unfolding eqpoll_def apply (rule exI) apply (rule bij_0_sum) done lemma cadd_0 [simp]: "Card(K) \ 0 \ K = K" -apply (unfold cadd_def) + unfolding cadd_def apply (simp add: sum_0_eqpoll [THEN cardinal_cong] Card_cardinal_eq) done @@ -161,7 +161,7 @@ lemma sum_lepoll_mono: "\A \ C; B \ D\ \ A + B \ C + D" -apply (unfold lepoll_def) + unfolding lepoll_def apply (elim exE) apply (rule_tac x = "\z\A+B. case (\w. Inl(f`w), \y. Inr(fa`y), z)" in exI) apply (rule_tac d = "case (\w. Inl(converse(f) `w), \y. Inr(converse(fa) ` y))" @@ -171,7 +171,7 @@ lemma cadd_le_mono: "\K' \ K; L' \ L\ \ (K' \ L') \ (K \ L)" -apply (unfold cadd_def) + unfolding cadd_def apply (safe dest!: le_subset_iff [THEN iffD1]) apply (rule well_ord_lepoll_imp_cardinal_le) apply (blast intro: well_ord_radd well_ord_Memrel) @@ -181,7 +181,7 @@ subsubsection\Addition of finite cardinals is "ordinary" addition\ lemma sum_succ_eqpoll: "succ(A)+B \ succ(A+B)" -apply (unfold eqpoll_def) + unfolding eqpoll_def apply (rule exI) apply (rule_tac c = "\z. if z=Inl (A) then A+B else z" and d = "\z. if z=A+B then Inl (A) else z" in lam_bijective) @@ -219,21 +219,21 @@ subsubsection\Cardinal multiplication is commutative\ lemma prod_commute_eqpoll: "A*B \ B*A" -apply (unfold eqpoll_def) + unfolding eqpoll_def apply (rule exI) apply (rule_tac c = "\\x,y\.\y,x\" and d = "\\x,y\.\y,x\" in lam_bijective, auto) done lemma cmult_commute: "i \ j = j \ i" -apply (unfold cmult_def) + unfolding cmult_def apply (rule prod_commute_eqpoll [THEN cardinal_cong]) done subsubsection\Cardinal multiplication is associative\ lemma prod_assoc_eqpoll: "(A*B)*C \ A*(B*C)" -apply (unfold eqpoll_def) + unfolding eqpoll_def apply (rule exI) apply (rule prod_assoc_bij) done @@ -255,7 +255,7 @@ subsubsection\Cardinal multiplication distributes over addition\ lemma sum_prod_distrib_eqpoll: "(A+B)*C \ (A*C)+(B*C)" -apply (unfold eqpoll_def) + unfolding eqpoll_def apply (rule exI) apply (rule sum_prod_distrib_bij) done @@ -276,7 +276,7 @@ subsubsection\Multiplication by 0 yields 0\ lemma prod_0_eqpoll: "0*A \ 0" -apply (unfold eqpoll_def) + unfolding eqpoll_def apply (rule exI) apply (rule lam_bijective, safe) done @@ -287,7 +287,7 @@ subsubsection\1 is the identity for multiplication\ lemma prod_singleton_eqpoll: "{x}*A \ A" -apply (unfold eqpoll_def) + unfolding eqpoll_def apply (rule exI) apply (rule singleton_prod_bij [THEN bij_converse_bij]) done @@ -306,7 +306,7 @@ (*Could probably weaken the premise to well_ord(K,r), or remove using AC*) lemma cmult_square_le: "Card(K) \ K \ K \ K" -apply (unfold cmult_def) + unfolding cmult_def apply (rule le_trans) apply (rule_tac [2] well_ord_lepoll_imp_cardinal_le) apply (rule_tac [3] prod_square_lepoll) @@ -324,7 +324,7 @@ (*Could probably weaken the premises to well_ord(K,r), or removing using AC*) lemma cmult_le_self: "\Card(K); Ord(L); 0 \ K \ (K \ L)" -apply (unfold cmult_def) + unfolding cmult_def apply (rule le_trans [OF Card_cardinal_le well_ord_lepoll_imp_cardinal_le]) apply assumption apply (blast intro: well_ord_rmult well_ord_Memrel Card_is_Ord) @@ -335,7 +335,7 @@ lemma prod_lepoll_mono: "\A \ C; B \ D\ \ A * B \ C * D" -apply (unfold lepoll_def) + unfolding lepoll_def apply (elim exE) apply (rule_tac x = "lam \w,y\:A*B. " in exI) apply (rule_tac d = "\\w,y\. " @@ -345,7 +345,7 @@ lemma cmult_le_mono: "\K' \ K; L' \ L\ \ (K' \ L') \ (K \ L)" -apply (unfold cmult_def) + unfolding cmult_def apply (safe dest!: le_subset_iff [THEN iffD1]) apply (rule well_ord_lepoll_imp_cardinal_le) apply (blast intro: well_ord_rmult well_ord_Memrel) @@ -355,7 +355,7 @@ subsection\Multiplication of finite cardinals is "ordinary" multiplication\ lemma prod_succ_eqpoll: "succ(A)*B \ B + A*B" -apply (unfold eqpoll_def) + unfolding eqpoll_def apply (rule exI) apply (rule_tac c = "\\x,y\. if x=A then Inl (y) else Inr (\x,y\)" and d = "case (\y. \A,y\, \z. z)" in lam_bijective) @@ -402,7 +402,7 @@ and inverse \y. if y \ nat then nat_case(u, \z. z, y) else y. \ If f \ inj(nat,A) then range(f) behaves like the natural numbers.*) lemma nat_cons_lepoll: "nat \ A \ cons(u,A) \ A" -apply (unfold lepoll_def) + unfolding lepoll_def apply (erule exE) apply (rule_tac x = "\z\cons (u,A). @@ -426,35 +426,35 @@ (*Specialized version required below*) lemma nat_succ_eqpoll: "nat \ A \ succ(A) \ A" -apply (unfold succ_def) + unfolding succ_def apply (erule subset_imp_lepoll [THEN nat_cons_eqpoll]) done lemma InfCard_nat: "InfCard(nat)" -apply (unfold InfCard_def) + unfolding InfCard_def apply (blast intro: Card_nat le_refl Card_is_Ord) done lemma InfCard_is_Card: "InfCard(K) \ Card(K)" -apply (unfold InfCard_def) + unfolding InfCard_def apply (erule conjunct1) done lemma InfCard_Un: "\InfCard(K); Card(L)\ \ InfCard(K \ L)" -apply (unfold InfCard_def) + unfolding InfCard_def apply (simp add: Card_Un Un_upper1_le [THEN [2] le_trans] Card_is_Ord) done (*Kunen's Lemma 10.11*) lemma InfCard_is_Limit: "InfCard(K) \ Limit(K)" -apply (unfold InfCard_def) + unfolding InfCard_def apply (erule conjE) apply (frule Card_is_Ord) apply (rule ltI [THEN non_succ_LimitI]) apply (erule le_imp_subset [THEN subsetD]) apply (safe dest!: Limit_nat [THEN Limit_le_succD]) -apply (unfold Card_def) + unfolding Card_def apply (drule trans) apply (erule le_imp_subset [THEN nat_succ_eqpoll, THEN cardinal_cong]) apply (erule Ord_cardinal_le [THEN lt_trans2, THEN lt_irrefl]) @@ -468,7 +468,7 @@ (*A general fact about ordermap*) lemma ordermap_eqpoll_pred: "\well_ord(A,r); x \ A\ \ ordermap(A,r)`x \ Order.pred(A,x,r)" -apply (unfold eqpoll_def) + unfolding eqpoll_def apply (rule exI) apply (simp add: ordermap_eq_image well_ord_is_wf) apply (erule ordermap_bij [THEN bij_is_inj, THEN restrict_bij, @@ -492,7 +492,7 @@ lemma csquareD: "\<\x,y\, \z,z\> \ csquare_rel(K); x \ x \ z \ y \ z" -apply (unfold csquare_rel_def) + unfolding csquare_rel_def apply (erule rev_mp) apply (elim ltE) apply (simp add: rvimage_iff Un_absorb Un_least_mem_iff ltD) @@ -509,7 +509,7 @@ lemma csquare_ltI: "\x \ <\x,y\, \z,z\> \ csquare_rel(K)" -apply (unfold csquare_rel_def) + unfolding csquare_rel_def apply (subgoal_tac "x y apply *) lemma csquare_or_eqI: "\x \ z; y \ z; z \ <\x,y\, \z,z\> \ csquare_rel(K) | x=z \ y=z" -apply (unfold csquare_rel_def) + unfolding csquare_rel_def apply (subgoal_tac "x yThis result is Kunen's Theorem 10.16, which would be trivial using AC\ lemma Ord_jump_cardinal: "Ord(jump_cardinal(K))" -apply (unfold jump_cardinal_def) + unfolding jump_cardinal_def apply (rule Ord_is_Transset [THEN [2] OrdI]) prefer 2 apply (blast intro!: Ord_ordertype) -apply (unfold Transset_def) + unfolding Transset_def apply (safe del: subsetI) apply (simp add: ordertype_pred_unfold, safe) apply (rule UN_I) @@ -746,7 +746,7 @@ lemma jump_cardinal_iff: "i \ jump_cardinal(K) \ (\r X. r \ K*K \ X \ K \ well_ord(X,r) \ i = ordertype(X,r))" -apply (unfold jump_cardinal_def) + unfolding jump_cardinal_def apply (blast del: subsetI) done @@ -780,7 +780,7 @@ (*The hard part of Theorem 10.16: jump_cardinal(K) is itself a cardinal*) lemma Card_jump_cardinal: "Card(jump_cardinal(K))" apply (rule Ord_jump_cardinal [THEN CardI]) -apply (unfold eqpoll_def) + unfolding eqpoll_def apply (safe dest!: ltD jump_cardinal_iff [THEN iffD1]) apply (blast intro: Card_jump_cardinal_lemma [THEN mem_irrefl]) done @@ -788,7 +788,7 @@ subsection\Basic Properties of Successor Cardinals\ lemma csucc_basic: "Ord(K) \ Card(csucc(K)) \ K < csucc(K)" -apply (unfold csucc_def) + unfolding csucc_def apply (rule LeastI) apply (blast intro: Card_jump_cardinal K_lt_jump_cardinal Ord_jump_cardinal)+ done @@ -801,7 +801,7 @@ by (blast intro: Ord_0_le lt_csucc lt_trans1) lemma csucc_le: "\Card(L); K \ csucc(K) \ L" -apply (unfold csucc_def) + unfolding csucc_def apply (rule Least_le) apply (blast intro: Card_is_Ord)+ done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Coind/ECR.thy --- a/src/ZF/Coind/ECR.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Coind/ECR.thy Tue Sep 27 17:54:20 2022 +0100 @@ -98,7 +98,7 @@ v_clos(x,e,ve_owr(ve,f,cl)) = cl; hastyenv(ve,te); \ ElabRel\ \ \cl,t\ \ HasTyRel" -apply (unfold hastyenv_def) + unfolding hastyenv_def apply (erule elab_fixE, safe) apply hypsubst_thin apply (rule subst, assumption) diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Coind/Map.thy --- a/src/ZF/Coind/Map.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Coind/Map.thy Tue Sep 27 17:54:20 2022 +0100 @@ -69,7 +69,7 @@ lemma MapQU_lemma: "A \ univ(X) \ Pow(A * \(quniv(X))) \ quniv(X)" -apply (unfold quniv_def) + unfolding quniv_def apply (rule Pow_mono) apply (rule subset_trans [OF Sigma_mono product_univ]) apply (erule subset_trans) @@ -127,7 +127,7 @@ lemma pmap_appI: "\m \ PMap(A,B); a \ domain(m)\ \ map_app(m,a):B" -apply (unfold PMap_def) + unfolding PMap_def apply (frule tmap_app_notempty, assumption) apply (drule tmap_appI, auto) done @@ -165,7 +165,7 @@ lemma map_domain_owr: "b \ 0 \ domain(map_owr(f,a,b)) = {a} \ domain(f)" -apply (unfold map_owr_def) + unfolding map_owr_def apply (auto simp add: domain_Sigma) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Coind/Values.thy --- a/src/ZF/Coind/Values.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Coind/Values.thy Tue Sep 27 17:54:20 2022 +0100 @@ -101,7 +101,7 @@ done lemma ve_empI: "ve_emp \ ValEnv" -apply (unfold ve_emp_def) + unfolding ve_emp_def apply (rule Val_ValEnv.intros) apply (rule pmap_empI) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Constructible/AC_in_L.thy --- a/src/ZF/Constructible/AC_in_L.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Constructible/AC_in_L.thy Tue Sep 27 17:54:20 2022 +0100 @@ -216,7 +216,7 @@ text\Not needed--but interesting?\ theorem formula_lepoll_nat: "formula \ nat" apply (insert nat_times_nat_lepoll_nat) -apply (unfold lepoll_def) + unfolding lepoll_def apply (blast intro: Nat_Times_Nat.inj_formula_nat Nat_Times_Nat.intro) done @@ -447,7 +447,7 @@ lemma well_ord_L_r: "Ord(i) \ \r. well_ord(Lset(i), r)" apply (insert nat_times_nat_lepoll_nat) -apply (unfold lepoll_def) + unfolding lepoll_def apply (blast intro: Nat_Times_Nat.well_ord_L_r Nat_Times_Nat.intro) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Constructible/DPow_absolute.thy --- a/src/ZF/Constructible/DPow_absolute.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Constructible/DPow_absolute.thy Tue Sep 27 17:54:20 2022 +0100 @@ -177,7 +177,7 @@ theorem DPow_sats_reflection: "REFLECTS[\x. is_DPow_sats(L,f(x),g(x),h(x),g'(x)), \i x. is_DPow_sats(##Lset(i),f(x),g(x),h(x),g'(x))]" -apply (unfold is_DPow_sats_def) + unfolding is_DPow_sats_def apply (intro FOL_reflections function_reflections extra_reflections satisfies_reflection) done @@ -264,7 +264,7 @@ mem_formula(##Lset(i),p) \ mem_list(##Lset(i),A,env) \ pair(##Lset(i),env,p,u) \ is_Collect (##Lset(i), A, is_DPow_sats(##Lset(i),A,env,p), x))]" -apply (unfold is_Collect_def) + unfolding is_Collect_def apply (intro FOL_reflections function_reflections mem_formula_reflection mem_list_reflection DPow_sats_reflection) done @@ -279,7 +279,7 @@ apply (rule_tac u="{A,B}" in gen_separation_multi [OF DPow_replacement_Reflects], auto) -apply (unfold is_Collect_def) + unfolding is_Collect_def apply (rule_tac env="[A,B]" in DPow_LsetI) apply (rule sep_rules mem_formula_iff_sats mem_list_iff_sats DPow_sats_iff_sats | simp)+ @@ -543,7 +543,7 @@ lemma strong_rep: "\L(x); L(g)\ \ strong_replacement(L, \y z. transrec_body(L,g,x,y,z))" -apply (unfold transrec_body_def) + unfolding transrec_body_def apply (rule strong_replacementI) apply (rule_tac u="{x,g,B}" in gen_separation_multi [OF strong_rep_Reflects], auto) @@ -582,7 +582,7 @@ \r[L]. is_Replace(L, x, transrec_body(L,f,x), r) \ big_union(L, r, u), j)" apply (rule L.transrec_replacementI, assumption) -apply (unfold transrec_body_def) + unfolding transrec_body_def apply (rule strong_replacementI) apply (rule_tac u="{j,B,Memrel(eclose({j}))}" in gen_separation_multi [OF transrec_rep_Reflects], auto) diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Constructible/Formula.thy --- a/src/ZF/Constructible/Formula.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Constructible/Formula.thy Tue Sep 27 17:54:20 2022 +0100 @@ -799,7 +799,7 @@ lemma Pair_in_Lset: "\a \ Lset(i); b \ Lset(i); Ord(i)\ \ \a,b\ \ Lset(succ(succ(i)))" -apply (unfold Pair_def) + unfolding Pair_def apply (blast intro: doubleton_in_Lset) done @@ -862,7 +862,7 @@ lemma Lset_iff_lrank_lt: "Ord(i) \ x \ Lset(i) \ L(x) \ lrank(x) < i" apply (simp add: L_def, auto) apply (blast intro: Lset_lrank_lt) - apply (unfold lrank_def) + unfolding lrank_def apply (drule succI1 [THEN Lset_mono_mem, THEN subsetD]) apply (drule_tac P="\i. x \ Lset(succ(i))" in LeastI, assumption) apply (blast intro!: le_imp_subset Lset_mono [THEN subsetD]) @@ -873,7 +873,7 @@ text\Kunen's VI 1.9 (a)\ lemma lrank_of_Ord: "Ord(i) \ lrank(i) = i" -apply (unfold lrank_def) + unfolding lrank_def apply (rule Least_equality) apply (erule Ord_in_Lset) apply assumption @@ -894,7 +894,7 @@ done lemma lrank_Lset: "Ord(i) \ lrank(Lset(i)) = i" -apply (unfold lrank_def) + unfolding lrank_def apply (rule Least_equality) apply (rule Lset_in_Lset_succ) apply assumption diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Constructible/L_axioms.thy --- a/src/ZF/Constructible/L_axioms.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Constructible/L_axioms.thy Tue Sep 27 17:54:20 2022 +0100 @@ -155,7 +155,7 @@ theorem Not_reflection: "REFLECTS[P,Q] \ REFLECTS[\x. \P(x), \a x. \Q(a,x)]" -apply (unfold L_Reflects_def) + unfolding L_Reflects_def apply (erule meta_exE) apply (rule_tac x=Cl in meta_exI, simp) done @@ -163,7 +163,7 @@ theorem And_reflection: "\REFLECTS[P,Q]; REFLECTS[P',Q']\ \ REFLECTS[\x. P(x) \ P'(x), \a x. Q(a,x) \ Q'(a,x)]" -apply (unfold L_Reflects_def) + unfolding L_Reflects_def apply (elim meta_exE) apply (rule_tac x="\a. Cl(a) \ Cla(a)" in meta_exI) apply (simp add: Closed_Unbounded_Int, blast) @@ -172,7 +172,7 @@ theorem Or_reflection: "\REFLECTS[P,Q]; REFLECTS[P',Q']\ \ REFLECTS[\x. P(x) \ P'(x), \a x. Q(a,x) \ Q'(a,x)]" -apply (unfold L_Reflects_def) + unfolding L_Reflects_def apply (elim meta_exE) apply (rule_tac x="\a. Cl(a) \ Cla(a)" in meta_exI) apply (simp add: Closed_Unbounded_Int, blast) @@ -181,7 +181,7 @@ theorem Imp_reflection: "\REFLECTS[P,Q]; REFLECTS[P',Q']\ \ REFLECTS[\x. P(x) \ P'(x), \a x. Q(a,x) \ Q'(a,x)]" -apply (unfold L_Reflects_def) + unfolding L_Reflects_def apply (elim meta_exE) apply (rule_tac x="\a. Cl(a) \ Cla(a)" in meta_exI) apply (simp add: Closed_Unbounded_Int, blast) @@ -190,7 +190,7 @@ theorem Iff_reflection: "\REFLECTS[P,Q]; REFLECTS[P',Q']\ \ REFLECTS[\x. P(x) \ P'(x), \a x. Q(a,x) \ Q'(a,x)]" -apply (unfold L_Reflects_def) + unfolding L_Reflects_def apply (elim meta_exE) apply (rule_tac x="\a. Cl(a) \ Cla(a)" in meta_exI) apply (simp add: Closed_Unbounded_Int, blast) @@ -223,14 +223,14 @@ theorem Rex_reflection: "REFLECTS[ \x. P(fst(x),snd(x)), \a x. Q(a,fst(x),snd(x))] \ REFLECTS[\x. \z[L]. P(x,z), \a x. \z\Lset(a). Q(a,x,z)]" -apply (unfold rex_def) + unfolding rex_def apply (intro And_reflection Ex_reflection, assumption) done theorem Rall_reflection: "REFLECTS[\x. P(fst(x),snd(x)), \a x. Q(a,fst(x),snd(x))] \ REFLECTS[\x. \z[L]. P(x,z), \a x. \z\Lset(a). Q(a,x,z)]" -apply (unfold rall_def) + unfolding rall_def apply (intro Imp_reflection All_reflection, assumption) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Constructible/Normal.thy --- a/src/ZF/Constructible/Normal.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Constructible/Normal.thy Tue Sep 27 17:54:20 2022 +0100 @@ -171,7 +171,7 @@ done lemma Unbounded_INT: "Unbounded(\x. \a\A. P(a,x))" - apply (unfold Unbounded_def) + unfolding Unbounded_def apply (blast intro!: omega_sup_greater_gt P_omega_sup_greater) done @@ -367,7 +367,7 @@ lemma iterates_omega_increasing: "\Normal(F); Ord(a)\ \ a \ F^\ (a)" -apply (unfold iterates_omega_def) + unfolding iterates_omega_def apply (rule UN_upper_le [of 0], simp_all) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Constructible/Satisfies_absolute.thy --- a/src/ZF/Constructible/Satisfies_absolute.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Constructible/Satisfies_absolute.thy Tue Sep 27 17:54:20 2022 +0100 @@ -595,7 +595,7 @@ theorem satisfies_is_a_reflection: "REFLECTS[\x. satisfies_is_a(L,f(x),g(x),h(x),g'(x)), \i x. satisfies_is_a(##Lset(i),f(x),g(x),h(x),g'(x))]" -apply (unfold satisfies_is_a_def) + unfolding satisfies_is_a_def apply (intro FOL_reflections is_lambda_reflection bool_of_o_reflection nth_reflection is_list_reflection) done @@ -644,7 +644,7 @@ theorem satisfies_is_b_reflection: "REFLECTS[\x. satisfies_is_b(L,f(x),g(x),h(x),g'(x)), \i x. satisfies_is_b(##Lset(i),f(x),g(x),h(x),g'(x))]" -apply (unfold satisfies_is_b_def) + unfolding satisfies_is_b_def apply (intro FOL_reflections is_lambda_reflection bool_of_o_reflection nth_reflection is_list_reflection) done @@ -695,7 +695,7 @@ theorem satisfies_is_c_reflection: "REFLECTS[\x. satisfies_is_c(L,f(x),g(x),h(x),g'(x),h'(x)), \i x. satisfies_is_c(##Lset(i),f(x),g(x),h(x),g'(x),h'(x))]" -apply (unfold satisfies_is_c_def) + unfolding satisfies_is_c_def apply (intro FOL_reflections function_reflections is_lambda_reflection extra_reflections nth_reflection depth_apply_reflection is_list_reflection) @@ -751,7 +751,7 @@ theorem satisfies_is_d_reflection: "REFLECTS[\x. satisfies_is_d(L,f(x),g(x),h(x),g'(x)), \i x. satisfies_is_d(##Lset(i),f(x),g(x),h(x),g'(x))]" -apply (unfold satisfies_is_d_def) + unfolding satisfies_is_d_def apply (intro FOL_reflections function_reflections is_lambda_reflection extra_reflections nth_reflection depth_apply_reflection is_list_reflection) @@ -810,7 +810,7 @@ theorem satisfies_MH_reflection: "REFLECTS[\x. satisfies_MH(L,f(x),g(x),h(x),g'(x)), \i x. satisfies_MH(##Lset(i),f(x),g(x),h(x),g'(x))]" -apply (unfold satisfies_MH_def) + unfolding satisfies_MH_def apply (intro FOL_reflections satisfies_reflections) done @@ -925,7 +925,7 @@ is_Cons(##Lset(i),a,u,co) \ fun_apply(##Lset(i),rp,co,rpco) \ number1(##Lset(i),rpco), bo) \ pair(##Lset(i),u,bo,x))]" -apply (unfold is_bool_of_o_def) + unfolding is_bool_of_o_def apply (intro FOL_reflections function_reflections Cons_reflection) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Constructible/Wellorderings.thy --- a/src/ZF/Constructible/Wellorderings.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Constructible/Wellorderings.thy Tue Sep 27 17:54:20 2022 +0100 @@ -214,7 +214,7 @@ lemma wellordered_subset: "\wellordered(M, A, r); B \ A\ \ wellordered(M, B, r)" -apply (unfold wellordered_def) + unfolding wellordered_def apply (blast intro: linear_rel_subset transitive_rel_subset wellfounded_on_subset) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Epsilon.thy --- a/src/ZF/Epsilon.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Epsilon.thy Tue Sep 27 17:54:20 2022 +0100 @@ -40,7 +40,7 @@ subsection\Basic Closure Properties\ lemma arg_subset_eclose: "A \ eclose(A)" -apply (unfold eclose_def) + unfolding eclose_def apply (rule nat_rec_0 [THEN equalityD2, THEN subset_trans]) apply (rule nat_0I [THEN UN_upper]) done @@ -86,7 +86,7 @@ lemma eclose_least_lemma: "\Transset(X); A<=X; n \ nat\ \ nat_rec(n, A, \m r. \(r)) \ X" -apply (unfold Transset_def) + unfolding Transset_def apply (erule nat_induct) apply (simp add: nat_rec_0) apply (simp add: nat_rec_succ, blast) @@ -94,7 +94,7 @@ lemma eclose_least: "\Transset(X); A<=X\ \ eclose(A) \ X" -apply (unfold eclose_def) + unfolding eclose_def apply (rule eclose_least_lemma [THEN UN_least], assumption+) done @@ -106,7 +106,7 @@ \ \ P(a)" apply (rule eclose_least [THEN subsetD, THEN CollectD2, of "eclose(b)"]) prefer 3 apply assumption - apply (unfold Transset_def) + unfolding Transset_def apply (blast intro: ecloseD) apply (blast intro: arg_subset_eclose [THEN subsetD]) done @@ -168,7 +168,7 @@ done lemma transrec: "transrec(a,H) = H(a, \x\a. transrec(x,H))" -apply (unfold transrec_def) + unfolding transrec_def apply (rule wfrec_ssubst) apply (simp add: wfrec_eclose_eq2 arg_in_eclose_sing under_Memrel_eclose) done @@ -291,13 +291,13 @@ done lemma rank_pair1: "rank(a) < rank(\a,b\)" -apply (unfold Pair_def) + unfolding Pair_def apply (rule consI1 [THEN rank_lt, THEN lt_trans]) apply (rule consI1 [THEN consI2, THEN rank_lt]) done lemma rank_pair2: "rank(b) < rank(\a,b\)" -apply (unfold Pair_def) + unfolding Pair_def apply (rule consI1 [THEN consI2, THEN rank_lt, THEN lt_trans]) apply (rule consI1 [THEN consI2, THEN rank_lt]) done @@ -380,12 +380,12 @@ (** rec: old version for compatibility **) lemma rec_0 [simp]: "rec(0,a,b) = a" -apply (unfold rec_def) + unfolding rec_def apply (rule recursor_0) done lemma rec_succ [simp]: "rec(succ(m),a,b) = b(m, rec(m,a,b))" -apply (unfold rec_def) + unfolding rec_def apply (rule recursor_succ) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/EquivClass.thy --- a/src/ZF/EquivClass.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/EquivClass.thy Tue Sep 27 17:54:20 2022 +0100 @@ -45,7 +45,7 @@ lemma equiv_comp_eq: "equiv(A,r) \ converse(r) O r = r" -apply (unfold equiv_def) + unfolding equiv_def apply (blast del: subsetI intro!: sym_trans_comp_subset refl_comp_subset) done @@ -66,7 +66,7 @@ lemma equiv_class_eq: "\equiv(A,r); \a,b\: r\ \ r``{a} = r``{b}" -apply (unfold equiv_def) + unfolding equiv_def apply (safe del: subsetI intro!: equalityI equiv_class_subset) apply (unfold sym_def, blast) done @@ -104,7 +104,7 @@ (** Introduction/elimination rules -- needed? **) lemma quotientI [TC]: "x \ A \ r``{x}: A//r" -apply (unfold quotient_def) + unfolding quotient_def apply (erule RepFunI) done @@ -118,7 +118,7 @@ lemma quotient_disj: "\equiv(A,r); X \ A//r; Y \ A//r\ \ X=Y | (X \ Y \ 0)" -apply (unfold quotient_def) + unfolding quotient_def apply (safe intro!: equiv_class_eq, assumption) apply (unfold equiv_def trans_def sym_def, blast) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Fixedpt.thy --- a/src/ZF/Fixedpt.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Fixedpt.thy Tue Sep 27 17:54:20 2022 +0100 @@ -32,7 +32,7 @@ by (unfold bnd_mono_def, clarify, blast) lemma bnd_monoD1: "bnd_mono(D,h) \ h(D) \ D" -apply (unfold bnd_mono_def) + unfolding bnd_mono_def apply (erule conjunct1) done @@ -45,7 +45,7 @@ lemma bnd_mono_Un: "\bnd_mono(D,h); A \ D; B \ D\ \ h(A) \ h(B) \ h(A \ B)" -apply (unfold bnd_mono_def) + unfolding bnd_mono_def apply (rule Un_least, blast+) done @@ -53,7 +53,7 @@ lemma bnd_mono_UN: "\bnd_mono(D,h); \i\I. A(i) \ D\ \ (\i\I. h(A(i))) \ h((\i\I. A(i)))" -apply (unfold bnd_mono_def) + unfolding bnd_mono_def apply (rule UN_least) apply (elim conjE) apply (drule_tac x="A(i)" in spec) @@ -193,7 +193,7 @@ (*gfp contains each post-fixedpoint that is contained in D*) lemma gfp_upperbound: "\A \ h(A); A<=D\ \ A \ gfp(D,h)" -apply (unfold gfp_def) + unfolding gfp_def apply (rule PowI [THEN CollectI, THEN Union_upper]) apply (assumption+) done @@ -210,7 +210,7 @@ lemma gfp_least: "\bnd_mono(D,h); \X. \X \ h(X); X<=D\ \ X<=A\ \ gfp(D,h) \ A" -apply (unfold gfp_def) + unfolding gfp_def apply (blast dest: bnd_monoD1) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/IMP/Equiv.thy --- a/src/ZF/IMP/Equiv.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/IMP/Equiv.thy Tue Sep 27 17:54:20 2022 +0100 @@ -66,7 +66,7 @@ apply safe apply simp_all apply (frule Gamma_bnd_mono [OF C_subset], erule Fixedpt.induct, assumption) - apply (unfold Gamma_def) + unfolding Gamma_def apply force txt \\if\\ apply auto diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Induct/Comb.thy --- a/src/ZF/Induct/Comb.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Induct/Comb.thy Tue Sep 27 17:54:20 2022 +0100 @@ -86,7 +86,7 @@ lemma diamond_strip_lemmaD [rule_format]: "\diamond(r); \x,y\:r^+\ \ \y'. :r \ (\z. : r^+ \ \y,z\: r)" - apply (unfold diamond_def) + unfolding diamond_def apply (erule trancl_induct) apply (blast intro: r_into_trancl) apply clarify @@ -186,7 +186,7 @@ by (blast intro: comb_I) lemma not_diamond_contract: "\ diamond(contract)" - apply (unfold diamond_def) + unfolding diamond_def apply (blast intro: KIII_contract1 KIII_contract2 KIII_contract3 elim!: I_contract_E) done @@ -228,7 +228,7 @@ lemma diamond_parcontract: "diamond(parcontract)" \ \Church-Rosser property for parallel contraction\ - apply (unfold diamond_def) + unfolding diamond_def apply (rule impI [THEN allI, THEN allI]) apply (erule parcontract.induct) apply (blast elim!: comb.free_elims intro: parcontract_combD2)+ diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Induct/FoldSet.thy --- a/src/ZF/Induct/FoldSet.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Induct/FoldSet.thy Tue Sep 27 17:54:20 2022 +0100 @@ -144,7 +144,7 @@ lemma (in fold_typing) fold_equality: "\C,y\ \ fold_set(A,B,f,e) \ fold[B](f,e,C) = y" -apply (unfold fold_def) + unfolding fold_def apply (frule fold_set.dom_subset [THEN subsetD], clarify) apply (rule the_equality) apply (rule_tac [2] A=C in fold_typing.fold_set_determ) @@ -155,7 +155,7 @@ done lemma fold_0 [simp]: "e \ B \ fold[B](f,e,0) = e" -apply (unfold fold_def) + unfolding fold_def apply (blast elim!: empty_fold_setE intro: fold_set.intros) done @@ -193,7 +193,7 @@ lemma (in fold_typing) fold_cons: "\C\Fin(A); c\A; c\C\ \ fold[B](f, e, cons(c, C)) = f(c, fold[B](f, e, C))" -apply (unfold fold_def) + unfolding fold_def apply (simp add: fold_cons_lemma) apply (rule the_equality, auto) apply (subgoal_tac [2] "\C, y\ \ fold_set(A, B, f, e)") @@ -363,7 +363,7 @@ "\setsum(f, A) = $# succ(n); n\nat\\ \a\A. #0 $< f(a)" apply (case_tac "Finite (A) ") apply (blast intro: setsum_succD_lemma) -apply (unfold setsum_def) + unfolding setsum_def apply (auto simp del: int_of_0 int_of_succ simp add: int_succ_int_1 [symmetric] int_of_0 [symmetric]) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Induct/Multiset.thy --- a/src/ZF/Induct/Multiset.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Induct/Multiset.thy Tue Sep 27 17:54:20 2022 +0100 @@ -393,7 +393,7 @@ done lemma msize_eq_succ_imp_elem: "\msize(M)= $# succ(n); n \ nat\ \ \a. a \ mset_of(M)" -apply (unfold msize_def) + unfolding msize_def apply (blast dest: setsum_succD) done @@ -480,7 +480,7 @@ (\a \ mset_of(M). setsum(\z. $# mcount(M(a:=M`a #- 1), z), A) = (if a \ A then setsum(\z. $# mcount(M, z), A) $- #1 else setsum(\z. $# mcount(M, z), A))))" -apply (unfold multiset_def) + unfolding multiset_def apply (erule Finite_induct) apply (auto simp add: multiset_fun_iff) apply (unfold mset_of_def mcount_def) diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Induct/Primrec.thy --- a/src/ZF/Induct/Primrec.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Induct/Primrec.thy Tue Sep 27 17:54:20 2022 +0100 @@ -240,7 +240,7 @@ declare list_add_type [simp] lemma SC_case: "l \ list(nat) \ SC ` l < ack(1, list_add(l))" - apply (unfold SC_def) + unfolding SC_def apply (erule list.cases) apply (simp add: succ_iff) apply (simp add: ack_1 add_le_self) @@ -260,7 +260,7 @@ lemma PROJ_case [rule_format]: "l \ list(nat) \ \i \ nat. PROJ(i) ` l < ack(0, list_add(l))" - apply (unfold PROJ_def) + unfolding PROJ_def apply simp apply (erule list.induct) apply (simp add: nat_0_le) @@ -322,7 +322,7 @@ g \ prim_rec; kg\nat; l \ list(nat)\ \ PREC(f,g)`l #+ list_add(l) < ack(succ(kf#+kg), list_add(l))" - apply (unfold PREC_def) + unfolding PREC_def apply (erule list.cases) apply (simp add: lt_trans [OF nat_le_refl lt_ack2]) apply simp diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Induct/PropLog.thy --- a/src/ZF/Induct/PropLog.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Induct/PropLog.thy Tue Sep 27 17:54:20 2022 +0100 @@ -180,7 +180,7 @@ subsubsection \Soundness of the rules wrt truth-table semantics\ theorem soundness: "H |- p \ H |= p" - apply (unfold logcon_def) + unfolding logcon_def apply (induct set: thms) apply auto done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Induct/Rmap.thy --- a/src/ZF/Induct/Rmap.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Induct/Rmap.thy Tue Sep 27 17:54:20 2022 +0100 @@ -46,7 +46,7 @@ done lemma rmap_functional: "function(r) \ function(rmap(r))" - apply (unfold function_def) + unfolding function_def apply (rule impI [THEN allI, THEN allI]) apply (erule rmap.induct) apply blast+ diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Induct/Term.thy --- a/src/ZF/Induct/Term.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Induct/Term.thy Tue Sep 27 17:54:20 2022 +0100 @@ -169,7 +169,7 @@ lemma term_map_type [TC]: "\t \ term(A); \x. x \ A \ f(x): B\ \ term_map(f,t) \ term(B)" - apply (unfold term_map_def) + unfolding term_map_def apply (erule term_rec_simple_type) apply fast done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Induct/Tree_Forest.thy --- a/src/ZF/Induct/Tree_Forest.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Induct/Tree_Forest.thy Tue Sep 27 17:54:20 2022 +0100 @@ -109,7 +109,7 @@ \ \ (\t \ tree(A). tree_forest_rec(b,c,d,t) \ C(t)) \ (\f \ forest(A). tree_forest_rec(b,c,d,f) \ D(f))" \ \Mutually recursive version.\ - apply (unfold Ball_def) + unfolding Ball_def apply (rule tree_forest.mutual_induct) apply simp_all done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/IntDiv.thy --- a/src/ZF/IntDiv.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/IntDiv.thy Tue Sep 27 17:54:20 2022 +0100 @@ -688,12 +688,12 @@ done lemma negateSnd_eq [simp]: "negateSnd (\q,r\) = " -apply (unfold negateSnd_def) + unfolding negateSnd_def apply auto done lemma negateSnd_type: "qr \ int * int \ negateSnd (qr) \ int * int" -apply (unfold negateSnd_def) + unfolding negateSnd_def apply auto done @@ -735,7 +735,7 @@ by (simp add: zdiv_def) lemma zdiv_type [iff,TC]: "z zdiv w \ int" -apply (unfold zdiv_def) + unfolding zdiv_def apply (blast intro: fst_type divAlg_type) done @@ -746,7 +746,7 @@ by (simp add: zmod_def) lemma zmod_type [iff,TC]: "z zmod w \ int" -apply (unfold zmod_def) + unfolding zmod_def apply (rule snd_type) apply (blast intro: divAlg_type) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/List.thy --- a/src/ZF/List.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/List.thy Tue Sep 27 17:54:20 2022 +0100 @@ -267,7 +267,7 @@ (** set_of_list **) lemma set_of_list_type [TC]: "l \ list(A) \ set_of_list(l) \ Pow(A)" -apply (unfold set_of_list_list_def) + unfolding set_of_list_list_def apply (erule list_rec_type, auto) done @@ -463,7 +463,7 @@ (** min FIXME: replace by Int! **) (* Min theorems are also true for i, j ordinals *) lemma min_sym: "\i \ nat; j \ nat\ \ min(i,j)=min(j,i)" -apply (unfold min_def) + unfolding min_def apply (auto dest!: not_lt_imp_le dest: lt_not_sym intro: le_anti_sym) done @@ -471,17 +471,17 @@ by (unfold min_def, auto) lemma min_0 [simp]: "i \ nat \ min(0,i) = 0" -apply (unfold min_def) + unfolding min_def apply (auto dest: not_lt_imp_le) done lemma min_02 [simp]: "i \ nat \ min(i, 0) = 0" -apply (unfold min_def) + unfolding min_def apply (auto dest: not_lt_imp_le) done lemma lt_min_iff: "\i \ nat; j \ nat; k \ nat\ \ i i i take(0, xs) = Nil" -apply (unfold take_def) + unfolding take_def apply (erule list.induct, auto) done @@ -917,7 +917,7 @@ lemma length_zip [rule_format]: "xs:list(A) \ \ys \ list(B). length(zip(xs,ys)) = min(length(xs), length(ys))" -apply (unfold min_def) + unfolding min_def apply (induct_tac "xs", simp_all, clarify) apply (erule_tac a = ys in list.cases, auto) done @@ -1200,7 +1200,7 @@ lemma sublist_type [simp,TC]: "xs:list(B) \ sublist(xs, A):list(B)" -apply (unfold sublist_def) + unfolding sublist_def apply (induct_tac "xs") apply (auto simp add: filter_append map_app_distrib) done @@ -1212,7 +1212,7 @@ lemma sublist_append: "\xs:list(B); ys:list(B)\ \ sublist(xs@ys, A) = sublist(xs, A) @ sublist(ys, {j \ nat. j #+ length(xs): A})" -apply (unfold sublist_def) + unfolding sublist_def apply (erule_tac l = ys in list_append_induct, simp) apply (simp (no_asm_simp) add: upt_add_eq_append2 app_assoc [symmetric]) apply (auto simp add: sublist_shift_lemma length_type map_app_distrib app_assoc) diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Nat.thy --- a/src/ZF/Nat.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Nat.thy Tue Sep 27 17:54:20 2022 +0100 @@ -108,13 +108,13 @@ lemma Ord_nat [iff]: "Ord(nat)" apply (rule OrdI) apply (erule_tac [2] nat_into_Ord [THEN Ord_is_Transset]) -apply (unfold Transset_def) + unfolding Transset_def apply (rule ballI) apply (erule nat_induct, auto) done lemma Limit_nat [iff]: "Limit(nat)" -apply (unfold Limit_def) + unfolding Limit_def apply (safe intro!: ltI Ord_nat) apply (erule ltD) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Order.thy --- a/src/ZF/Order.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Order.thy Tue Sep 27 17:54:20 2022 +0100 @@ -142,13 +142,13 @@ lemma tot_ord_subset: "\tot_ord(A,r); B<=A\ \ tot_ord(B,r)" -apply (unfold tot_ord_def) + unfolding tot_ord_def apply (fast elim!: part_ord_subset linear_subset) done lemma well_ord_subset: "\well_ord(A,r); B<=A\ \ well_ord(B,r)" -apply (unfold well_ord_def) + unfolding well_ord_def apply (fast elim!: tot_ord_subset wf_on_subset_A) done @@ -162,7 +162,7 @@ by (unfold trans_on_def, blast) lemma part_ord_Int_iff: "part_ord(A,r \ A*A) \ part_ord(A,r)" -apply (unfold part_ord_def) + unfolding part_ord_def apply (simp add: irrefl_Int_iff trans_on_Int_iff) done @@ -170,7 +170,7 @@ by (unfold linear_def, blast) lemma tot_ord_Int_iff: "tot_ord(A,r \ A*A) \ tot_ord(A,r)" -apply (unfold tot_ord_def) + unfolding tot_ord_def apply (simp add: part_ord_Int_iff linear_Int_iff) done @@ -179,7 +179,7 @@ done lemma well_ord_Int_iff: "well_ord(A,r \ A*A) \ well_ord(A,r)" -apply (unfold well_ord_def) + unfolding well_ord_def apply (simp add: tot_ord_Int_iff wf_on_Int_iff) done @@ -199,7 +199,7 @@ by (unfold trans_on_def, blast) lemma part_ord_0: "part_ord(0,r)" -apply (unfold part_ord_def) + unfolding part_ord_def apply (simp add: irrefl_0 trans_on_0) done @@ -207,7 +207,7 @@ by (unfold linear_def, blast) lemma tot_ord_0: "tot_ord(0,r)" -apply (unfold tot_ord_def) + unfolding tot_ord_def apply (simp add: part_ord_0 linear_0) done @@ -215,7 +215,7 @@ by (unfold wf_on_def wf_def, blast) lemma well_ord_0: "well_ord(0,r)" -apply (unfold well_ord_def) + unfolding well_ord_def apply (simp add: tot_ord_0 wf_on_0) done @@ -228,7 +228,7 @@ by (simp add: irrefl_def trans_on_def part_ord_def linear_def tot_ord_def) lemma well_ord_unit: "well_ord({a},0)" -apply (unfold well_ord_def) + unfolding well_ord_def apply (simp add: tot_ord_unit wf_on_any_0) done @@ -297,7 +297,7 @@ lemma mono_map_trans: "\g \ mono_map(A,r,B,s); f \ mono_map(B,s,C,t)\ \ (f O g): mono_map(A,r,C,t)" -apply (unfold mono_map_def) + unfolding mono_map_def apply (auto simp add: comp_fun) done @@ -494,7 +494,7 @@ lemma converse_ord_iso_map: "converse(ord_iso_map(A,r,B,s)) = ord_iso_map(B,s,A,r)" -apply (unfold ord_iso_map_def) + unfolding ord_iso_map_def apply (blast intro: ord_iso_sym) done @@ -514,12 +514,12 @@ \ ord_iso_map(A,r,B,s) \ mono_map(domain(ord_iso_map(A,r,B,s)), r, range(ord_iso_map(A,r,B,s)), s)" -apply (unfold mono_map_def) + unfolding mono_map_def apply (simp (no_asm_simp) add: ord_iso_map_fun) apply safe apply (subgoal_tac "x \ A \ ya:A \ y \ B \ yb:B") apply (simp add: apply_equality [OF _ ord_iso_map_fun]) - apply (unfold ord_iso_map_def) + unfolding ord_iso_map_def apply (blast intro: well_ord_iso_preserving, blast) done @@ -542,7 +542,7 @@ "\well_ord(A,r); well_ord(B,s); a \ A; a \ domain(ord_iso_map(A,r,B,s))\ \ domain(ord_iso_map(A,r,B,s)) \ pred(A, a, r)" -apply (unfold ord_iso_map_def) + unfolding ord_iso_map_def apply (safe intro!: predI) (*Case analysis on xa vs a in r *) apply (simp (no_asm_simp)) @@ -621,7 +621,7 @@ by (unfold trans_on_def, blast) lemma part_ord_converse: "part_ord(A,r) \ part_ord(A,converse(r))" -apply (unfold part_ord_def) + unfolding part_ord_def apply (blast intro!: irrefl_converse trans_on_converse) done @@ -629,7 +629,7 @@ by (unfold linear_def, blast) lemma tot_ord_converse: "tot_ord(A,r) \ tot_ord(A,converse(r))" -apply (unfold tot_ord_def) + unfolding tot_ord_def apply (blast intro!: part_ord_converse linear_converse) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/OrderArith.thy --- a/src/ZF/OrderArith.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/OrderArith.thy Tue Sep 27 17:54:20 2022 +0100 @@ -69,7 +69,7 @@ subsubsection\Type checking\ lemma radd_type: "radd(A,r,B,s) \ (A+B) * (A+B)" -apply (unfold radd_def) + unfolding radd_def apply (rule Collect_subset) done @@ -127,7 +127,7 @@ "\f \ ord_iso(A,r,A',r'); g \ ord_iso(B,s,B',s')\ \ (\z\A+B. case(\x. Inl(f`x), \y. Inr(g`y), z)) \ ord_iso(A+B, radd(A,r,B,s), A'+B', radd(A',r',B',s'))" -apply (unfold ord_iso_def) + unfolding ord_iso_def apply (safe intro!: sum_bij) (*Do the beta-reductions now*) apply (auto cong add: conj_cong simp add: bij_is_fun [THEN apply_type]) @@ -232,7 +232,7 @@ "\f \ ord_iso(A,r,A',r'); g \ ord_iso(B,s,B',s')\ \ (lam \x,y\:A*B. \f`x, g`y\) \ ord_iso(A*B, rmult(A,r,B,s), A'*B', rmult(A',r',B',s'))" -apply (unfold ord_iso_def) + unfolding ord_iso_def apply (safe intro!: prod_bij) apply (simp_all add: bij_is_fun [THEN apply_type]) apply (blast intro: bij_is_inj [THEN inj_apply_equality]) @@ -337,7 +337,7 @@ lemma part_ord_rvimage: "\f \ inj(A,B); part_ord(B,r)\ \ part_ord(A, rvimage(A,f,r))" -apply (unfold part_ord_def) + unfolding part_ord_def apply (blast intro!: irrefl_rvimage trans_on_rvimage) done @@ -351,7 +351,7 @@ lemma tot_ord_rvimage: "\f \ inj(A,B); tot_ord(B,r)\ \ tot_ord(A, rvimage(A,f,r))" -apply (unfold tot_ord_def) + unfolding tot_ord_def apply (blast intro!: part_ord_rvimage linear_rvimage) done @@ -391,7 +391,7 @@ lemma ord_iso_rvimage: "f \ bij(A,B) \ f \ ord_iso(A, rvimage(A,f,s), B, s)" -apply (unfold ord_iso_def) + unfolding ord_iso_def apply (simp add: rvimage_iff) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/OrderType.thy --- a/src/ZF/OrderType.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/OrderType.thy Tue Sep 27 17:54:20 2022 +0100 @@ -80,7 +80,7 @@ apply (frule lt_pred_Memrel) apply (erule ltE) apply (rule well_ord_Memrel [THEN well_ord_iso_predE, of i f j], auto) -apply (unfold ord_iso_def) + unfolding ord_iso_def (*Combining the two simplifications causes looping*) apply (simp (no_asm_simp)) apply (blast intro: bij_is_fun [THEN apply_type] Ord_trans) @@ -156,7 +156,7 @@ lemma Ord_ordertype: "well_ord(A,r) \ Ord(ordertype(A,r))" -apply (unfold ordertype_def) + unfolding ordertype_def apply (subst image_fun [OF ordermap_type subset_refl]) apply (rule OrdI [OF _ Ord_is_Transset]) prefer 2 apply (blast intro: Ord_ordermap) @@ -201,7 +201,7 @@ lemma ordertype_ord_iso: "well_ord(A,r) \ ordermap(A,r) \ ord_iso(A,r, ordertype(A,r), Memrel(ordertype(A,r)))" -apply (unfold ord_iso_def) + unfolding ord_iso_def apply (safe elim!: well_ord_is_wf intro!: ordermap_type [THEN apply_type] ordermap_mono ordermap_bij) apply (blast dest!: converse_ordermap_mono) @@ -272,7 +272,7 @@ lemma ordertype_unfold: "ordertype(A,r) = {ordermap(A,r)`y . y \ A}" -apply (unfold ordertype_def) + unfolding ordertype_def apply (rule image_fun [OF ordermap_type subset_refl]) done @@ -311,7 +311,7 @@ (*proof by Krzysztof Grabczewski*) lemma Ord_is_Ord_alt: "Ord(i) \ Ord_alt(i)" -apply (unfold Ord_alt_def) + unfolding Ord_alt_def apply (rule conjI) apply (erule well_ord_Memrel) apply (unfold Ord_def Transset_def pred_def Memrel_def, blast) @@ -363,7 +363,7 @@ lemma pred_Inl_bij: "a \ A \ (\x\pred(A,a,r). Inl(x)) \ bij(pred(A,a,r), pred(A+B, Inl(a), radd(A,r,B,s)))" -apply (unfold pred_def) + unfolding pred_def apply (rule_tac d = "case (\x. x, \y. y) " in lam_bijective) apply auto done @@ -709,7 +709,7 @@ lemma Ord_odiff [simp,TC]: "\Ord(i); Ord(j)\ \ Ord(i--j)" -apply (unfold odiff_def) + unfolding odiff_def apply (blast intro: Ord_ordertype Diff_subset well_ord_subset well_ord_Memrel) done @@ -750,7 +750,7 @@ lemma Ord_omult [simp,TC]: "\Ord(i); Ord(j)\ \ Ord(i**j)" -apply (unfold omult_def) + unfolding omult_def apply (blast intro: Ord_ordertype well_ord_rmult well_ord_Memrel) done @@ -797,7 +797,7 @@ lemma lt_omult: "\Ord(i); Ord(j); k \ \j' i'. k = j**i' ++ j' \ j' i'j' \ j**i' ++ j' < j**i" -apply (unfold omult_def) + unfolding omult_def apply (rule ltI) prefer 2 apply (simp add: Ord_ordertype well_ord_rmult well_ord_Memrel lt_Ord2) @@ -834,19 +834,19 @@ text\Ordinal multiplication by zero\ lemma omult_0 [simp]: "i**0 = 0" -apply (unfold omult_def) + unfolding omult_def apply (simp (no_asm_simp)) done lemma omult_0_left [simp]: "0**i = 0" -apply (unfold omult_def) + unfolding omult_def apply (simp (no_asm_simp)) done text\Ordinal multiplication by 1\ lemma omult_1 [simp]: "Ord(i) \ i**1 = i" -apply (unfold omult_def) + unfolding omult_def apply (rule_tac s1="Memrel(i)" in ord_isoI [THEN ordertype_eq, THEN trans]) apply (rule_tac c = snd and d = "\z.\0,z\" in lam_bijective) @@ -854,7 +854,7 @@ done lemma omult_1_left [simp]: "Ord(i) \ 1**i = i" -apply (unfold omult_def) + unfolding omult_def apply (rule_tac s1="Memrel(i)" in ord_isoI [THEN ordertype_eq, THEN trans]) apply (rule_tac c = fst and d = "\z.\z,0\" in lam_bijective) @@ -886,7 +886,7 @@ lemma omult_assoc: "\Ord(i); Ord(j); Ord(k)\ \ (i**j)**k = i**(j**k)" -apply (unfold omult_def) + unfolding omult_def apply (rule ordertype_eq [THEN trans]) apply (rule prod_ord_iso_cong [OF ord_iso_refl ordertype_ord_iso [THEN ord_iso_sym]]) diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Ordinal.thy --- a/src/ZF/Ordinal.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Ordinal.thy Tue Sep 27 17:54:20 2022 +0100 @@ -40,7 +40,7 @@ by (unfold Transset_def, blast) lemma Transset_iff_Union_succ: "Transset(A) <-> \(succ(A)) = A" -apply (unfold Transset_def) + unfolding Transset_def apply (blast elim!: equalityE) done @@ -157,12 +157,12 @@ by (blast intro: Ord_succ dest!: Ord_succD) lemma Ord_Un [intro,simp,TC]: "\Ord(i); Ord(j)\ \ Ord(i \ j)" -apply (unfold Ord_def) + unfolding Ord_def apply (blast intro!: Transset_Un) done lemma Ord_Int [TC]: "\Ord(i); Ord(j)\ \ Ord(i \ j)" -apply (unfold Ord_def) + unfolding Ord_def apply (blast intro!: Transset_Int) done @@ -188,7 +188,7 @@ lemma ltE: "\ii\j; Ord(i); Ord(j)\ \ P\ \ P" -apply (unfold lt_def) + unfolding lt_def apply (blast intro: Ord_in_Ord) done @@ -214,7 +214,7 @@ by (blast intro!: ltI elim!: ltE intro: Ord_trans) lemma lt_not_sym: "i \ (jLimit Ordinals -- General Properties\ lemma Limit_Union_eq: "Limit(i) \ \(i) = i" -apply (unfold Limit_def) + unfolding Limit_def apply (fast intro!: ltI elim!: ltE elim: Ord_trans) done lemma Limit_is_Ord: "Limit(i) \ Ord(i)" -apply (unfold Limit_def) + unfolding Limit_def apply (erule conjunct1) done lemma Limit_has_0: "Limit(i) \ 0 < i" -apply (unfold Limit_def) + unfolding Limit_def apply (erule conjunct2 [THEN conjunct1]) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Perm.thy --- a/src/ZF/Perm.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Perm.thy Tue Sep 27 17:54:20 2022 +0100 @@ -42,17 +42,17 @@ subsection\Surjective Function Space\ lemma surj_is_fun: "f \ surj(A,B) \ f \ A->B" -apply (unfold surj_def) + unfolding surj_def apply (erule CollectD1) done lemma fun_is_surj: "f \ Pi(A,B) \ f \ surj(A,range(f))" -apply (unfold surj_def) + unfolding surj_def apply (blast intro: apply_equality range_of_fun domain_type) done lemma surj_range: "f \ surj(A,B) \ range(f)=B" -apply (unfold surj_def) + unfolding surj_def apply (best intro: apply_Pair elim: range_type) done @@ -83,14 +83,14 @@ subsection\Injective Function Space\ lemma inj_is_fun: "f \ inj(A,B) \ f \ A->B" -apply (unfold inj_def) + unfolding inj_def apply (erule CollectD1) done text\Good for dealing with sets of pairs, but a bit ugly in use [used in AC]\ lemma inj_equality: "\\a,b\:f; \c,b\:f; f \ inj(A,B)\ \ a=c" -apply (unfold inj_def) + unfolding inj_def apply (blast dest: Pair_mem_PiD) done @@ -115,12 +115,12 @@ subsection\Bijections\ lemma bij_is_inj: "f \ bij(A,B) \ f \ inj(A,B)" -apply (unfold bij_def) + unfolding bij_def apply (erule IntD1) done lemma bij_is_surj: "f \ bij(A,B) \ f \ surj(A,B)" -apply (unfold bij_def) + unfolding bij_def apply (erule IntD2) done @@ -133,7 +133,7 @@ \x. x \ A \ d(c(x)) = x; \y. y \ B \ c(d(y)) = y \ \ (\x\A. c(x)) \ bij(A,B)" -apply (unfold bij_def) + unfolding bij_def apply (blast intro!: lam_injective lam_surjective) done @@ -147,7 +147,7 @@ subsection\Identity Function\ lemma idI [intro!]: "a \ A \ \a,a\ \ id(A)" -apply (unfold id_def) + unfolding id_def apply (erule lamI) done @@ -155,17 +155,17 @@ by (simp add: id_def lam_def, blast) lemma id_type: "id(A) \ A->A" -apply (unfold id_def) + unfolding id_def apply (rule lam_type, assumption) done lemma id_conv [simp]: "x \ A \ id(A)`x = x" -apply (unfold id_def) + unfolding id_def apply (simp (no_asm_simp)) done lemma id_mono: "A<=B \ id(A) \ id(B)" -apply (unfold id_def) + unfolding id_def apply (erule lam_mono) done @@ -182,12 +182,12 @@ done lemma id_bij: "id(A): bij(A,A)" -apply (unfold bij_def) + unfolding bij_def apply (blast intro: id_inj id_surj) done lemma subset_iff_id: "A \ B \ id(A) \ A->B" -apply (unfold id_def) + unfolding id_def apply (force intro!: lam_type dest: apply_type) done @@ -199,7 +199,7 @@ subsection\Converse of a Function\ lemma inj_converse_fun: "f \ inj(A,B) \ converse(f) \ range(f)->A" -apply (unfold inj_def) + unfolding inj_def apply (simp (no_asm_simp) add: Pi_iff function_def) apply (erule CollectE) apply (simp (no_asm_simp) add: apply_iff) @@ -251,7 +251,7 @@ text\Adding this as an intro! rule seems to cause looping\ lemma bij_converse_bij [TC]: "f \ bij(A,B) \ converse(f): bij(B,A)" -apply (unfold bij_def) + unfolding bij_def apply (fast elim: surj_range [THEN subst] inj_converse_inj inj_converse_surj) done @@ -372,13 +372,13 @@ lemma comp_surj: "\g \ surj(A,B); f \ surj(B,C)\ \ (f O g) \ surj(A,C)" -apply (unfold surj_def) + unfolding surj_def apply (blast intro!: comp_fun comp_fun_apply) done lemma comp_bij: "\g \ bij(A,B); f \ bij(B,C)\ \ (f O g) \ bij(A,C)" -apply (unfold bij_def) + unfolding bij_def apply (blast intro: comp_inj comp_surj) done @@ -405,7 +405,7 @@ lemma comp_mem_surjD1: "\(f O g): surj(A,C); g \ A->B; f \ B->C\ \ f \ surj(B,C)" -apply (unfold surj_def) + unfolding surj_def apply (blast intro!: comp_fun_apply [symmetric] apply_funtype) done @@ -452,7 +452,7 @@ lemma fg_imp_bijective: "\f \ A->B; g \ B->A; f O g = id(B); g O f = id(A)\ \ f \ bij(A,B)" -apply (unfold bij_def) + unfolding bij_def apply (simp add: comp_eq_id_iff) apply (blast intro: f_imp_injective f_imp_surjective apply_funtype) done @@ -513,7 +513,7 @@ lemma restrict_inj: "\f \ inj(A,B); C<=A\ \ restrict(f,C): inj(C,B)" -apply (unfold inj_def) + unfolding inj_def apply (safe elim!: restrict_type2, auto) done @@ -532,14 +532,14 @@ subsubsection\Lemmas for Ramsey's Theorem\ lemma inj_weaken_type: "\f \ inj(A,B); B<=D\ \ f \ inj(A,D)" -apply (unfold inj_def) + unfolding inj_def apply (blast intro: fun_weaken_type) done lemma inj_succ_restrict: "\f \ inj(succ(m), A)\ \ restrict(f,m) \ inj(m, A-{f`m})" apply (rule restrict_bij [THEN bij_is_inj, THEN inj_weaken_type], assumption, blast) -apply (unfold inj_def) + unfolding inj_def apply (fast elim: range_type mem_irrefl dest: apply_equality) done @@ -547,7 +547,7 @@ lemma inj_extend: "\f \ inj(A,B); a\A; b\B\ \ cons(\a,b\,f) \ inj(cons(a,A), cons(b,B))" -apply (unfold inj_def) + unfolding inj_def apply (force intro: apply_type simp add: fun_extend) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/QUniv.thy --- a/src/ZF/QUniv.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/QUniv.thy Tue Sep 27 17:54:20 2022 +0100 @@ -47,7 +47,7 @@ by (simp add: quniv_def) lemma quniv_mono: "A<=B \ quniv(A) \ quniv(B)" -apply (unfold quniv_def) + unfolding quniv_def apply (erule eclose_mono [THEN univ_mono, THEN Pow_mono]) done @@ -67,7 +67,7 @@ lemmas univ_into_quniv = univ_subset_quniv [THEN subsetD] lemma Pow_univ_subset_quniv: "Pow(univ(A)) \ quniv(A)" -apply (unfold quniv_def) + unfolding quniv_def apply (rule arg_subset_eclose [THEN univ_mono, THEN Pow_mono]) done @@ -92,7 +92,7 @@ subsection\Quine Disjoint Sum\ lemma QInl_subset_univ: "a \ univ(A) \ QInl(a) \ univ(A)" -apply (unfold QInl_def) + unfolding QInl_def apply (erule empty_subsetI [THEN QPair_subset_univ]) done @@ -103,7 +103,7 @@ subset_trans [OF naturals_subset_nat nat_subset_univ] lemma QInr_subset_univ: "a \ univ(A) \ QInr(a) \ univ(A)" -apply (unfold QInr_def) + unfolding QInr_def apply (erule nat_1I [THEN naturals_subset_univ, THEN QPair_subset_univ]) done @@ -178,7 +178,7 @@ lemma QPair_Int_Vfrom_subset: "Transset(X) \ \ Vfrom(X,i) \ Vfrom(X,i); b \ Vfrom(X,i)>" -apply (unfold QPair_def) + unfolding QPair_def apply (erule Transset_Vfrom [THEN Transset_sum_Int_subset]) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Resid/Confluence.thy --- a/src/ZF/Resid/Confluence.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Resid/Confluence.thy Tue Sep 27 17:54:20 2022 +0100 @@ -110,7 +110,7 @@ apply (blast intro: red1D1 redD2) apply (blast intro: red1D1 redD2) apply (cut_tac confluence_beta_reduction) -apply (unfold confluence_def) + unfolding confluence_def apply (blast intro: Sred.trans) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Resid/Residuals.thy --- a/src/ZF/Resid/Residuals.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Resid/Residuals.thy Tue Sep 27 17:54:20 2022 +0100 @@ -85,21 +85,21 @@ lemma res_Fun [simp]: "\s \ t; regular(t)\\ Fun(s) |> Fun(t) = Fun(s |> t)" -apply (unfold res_func_def) + unfolding res_func_def apply (blast intro: comp_resfuncD residuals_function) done lemma res_App [simp]: "\s \ u; regular(u); t \ v; regular(v); b \ bool\ \ App(b,s,t) |> App(0,u,v) = App(b, s |> u, t |> v)" -apply (unfold res_func_def) + unfolding res_func_def apply (blast dest!: comp_resfuncD intro: residuals_function) done lemma res_redex [simp]: "\s \ u; regular(u); t \ v; regular(v); b \ bool\ \ App(b,Fun(s),t) |> App(1,Fun(u),v) = (t |> v)/ (s |> u)" -apply (unfold res_func_def) + unfolding res_func_def apply (blast elim!: redexes.free_elims dest!: comp_resfuncD intro: residuals_function) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Sum.thy --- a/src/ZF/Sum.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Sum.thy Tue Sep 27 17:54:20 2022 +0100 @@ -29,7 +29,7 @@ lemma Part_iff: "a \ Part(A,h) \ a \ A \ (\y. a=h(y))" -apply (unfold Part_def) + unfolding Part_def apply (rule separation) done @@ -46,7 +46,7 @@ done lemma Part_subset: "Part(A,h) \ A" -apply (unfold Part_def) + unfolding Part_def apply (rule Collect_subset) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Trancl.thy --- a/src/ZF/Trancl.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Trancl.thy Tue Sep 27 17:54:20 2022 +0100 @@ -101,7 +101,7 @@ by (rule bnd_monoI, blast+) lemma rtrancl_mono: "r<=s \ r^* \ s^*" -apply (unfold rtrancl_def) + unfolding rtrancl_def apply (rule lfp_mono) apply (rule rtrancl_bnd_mono)+ apply blast @@ -172,7 +172,7 @@ (*transitivity of transitive closure\-- by induction.*) lemma trans_rtrancl: "trans(r^*)" -apply (unfold trans_def) + unfolding trans_def apply (intro allI impI) apply (erule_tac b = z in rtrancl_induct, assumption) apply (blast intro: rtrancl_into_rtrancl) @@ -208,13 +208,13 @@ (** Conversions between trancl and rtrancl **) lemma trancl_into_rtrancl: "\a,b\ \ r^+ \ \a,b\ \ r^*" -apply (unfold trancl_def) + unfolding trancl_def apply (blast intro: rtrancl_into_rtrancl) done (*r^+ contains all pairs in r *) lemma r_into_trancl: "\a,b\ \ r \ \a,b\ \ r^+" -apply (unfold trancl_def) + unfolding trancl_def apply (blast intro!: rtrancl_refl) done @@ -266,7 +266,7 @@ done lemma trancl_type: "r^+ \ field(r)*field(r)" -apply (unfold trancl_def) + unfolding trancl_def apply (blast elim: rtrancl_type [THEN subsetD, THEN SigmaE2]) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/UNITY/AllocBase.thy --- a/src/ZF/UNITY/AllocBase.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/UNITY/AllocBase.thy Tue Sep 27 17:54:20 2022 +0100 @@ -118,7 +118,7 @@ done lemma mono_tokens [iff]: "mono1(list(A), prefix(A), nat, Le,tokens)" -apply (unfold mono1_def) + unfolding mono1_def apply (auto intro: tokens_mono simp add: Le_def) done @@ -280,7 +280,7 @@ lemma all_distinct_Cons [simp]: "all_distinct(Cons(a,l)) \ (a\set_of_list(l) \ False) \ (a \ set_of_list(l) \ all_distinct(l))" -apply (unfold all_distinct_def) + unfolding all_distinct_def apply (auto elim: list.cases) done @@ -336,14 +336,14 @@ lemma var_infinite_lemma: "(\x\nat. nat_var_inj(x))\inj(nat, var)" -apply (unfold nat_var_inj_def) + unfolding nat_var_inj_def apply (rule_tac d = var_inj in lam_injective) apply (auto simp add: var.intros nat_list_inj_type) apply (simp add: length_nat_list_inj) done lemma nat_lepoll_var: "nat \ var" -apply (unfold lepoll_def) + unfolding lepoll_def apply (rule_tac x = " (\x\nat. nat_var_inj (x))" in exI) apply (rule var_infinite_lemma) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/UNITY/AllocImpl.thy --- a/src/ZF/UNITY/AllocImpl.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/UNITY/AllocImpl.thy Tue Sep 27 17:54:20 2022 +0100 @@ -50,12 +50,12 @@ lemma available_tok_value_type [simp,TC]: "s\state \ s`available_tok \ nat" -apply (unfold state_def) + unfolding state_def apply (drule_tac a = available_tok in apply_type, auto) done lemma NbR_value_type [simp,TC]: "s\state \ s`NbR \ nat" -apply (unfold state_def) + unfolding state_def apply (drule_tac a = NbR in apply_type, auto) done @@ -270,7 +270,7 @@ {s\state . k \ length(s ` rel)} \ {s\state . s ` NbR = n} \w {x \ state. k \ length(x`rel)} \ (\m \ greater_than(n). {x \ state. x ` NbR=m})" -apply (unfold greater_than_def) + unfolding greater_than_def apply (rule_tac A' = "{x \ state. k \ length(x`rel)} \ {x \ state. n < x`NbR}" in LeadsTo_weaken_R) apply safe diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/UNITY/ClientImpl.thy --- a/src/ZF/UNITY/ClientImpl.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/UNITY/ClientImpl.thy Tue Sep 27 17:54:20 2022 +0100 @@ -56,29 +56,29 @@ (* This part should be automated *) lemma ask_value_type [simp,TC]: "s \ state \ s`ask \ list(nat)" -apply (unfold state_def) + unfolding state_def apply (drule_tac a = ask in apply_type, auto) done lemma giv_value_type [simp,TC]: "s \ state \ s`giv \ list(nat)" -apply (unfold state_def) + unfolding state_def apply (drule_tac a = giv in apply_type, auto) done lemma rel_value_type [simp,TC]: "s \ state \ s`rel \ list(nat)" -apply (unfold state_def) + unfolding state_def apply (drule_tac a = rel in apply_type, auto) done lemma tok_value_type [simp,TC]: "s \ state \ s`tok \ nat" -apply (unfold state_def) + unfolding state_def apply (drule_tac a = tok in apply_type, auto) done (** The Client Program **) lemma client_type [simp,TC]: "client_prog \ program" -apply (unfold client_prog_def) + unfolding client_prog_def apply (simp (no_asm)) done @@ -118,7 +118,7 @@ (*Safety property 1 \ ask, rel are increasing: (24) *) lemma client_prog_Increasing_ask_rel: "client_prog: program guarantees Incr(lift(ask)) \ Incr(lift(rel))" -apply (unfold guar_def) + unfolding guar_def apply (auto intro!: increasing_imp_Increasing simp add: client_prog_ok_iff Increasing.increasing_def preserves_imp_prefix) apply (safety, force, force)+ diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/UNITY/Comp.thy --- a/src/ZF/UNITY/Comp.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/UNITY/Comp.thy Tue Sep 27 17:54:20 2022 +0100 @@ -68,13 +68,13 @@ done lemma component_SKIP [simp]: "F \ program \ SKIP component F" -apply (unfold component_def) + unfolding component_def apply (rule_tac x = F in exI) apply (force intro: Join_SKIP_left) done lemma component_refl [simp]: "F \ program \ F component F" -apply (unfold component_def) + unfolding component_def apply (rule_tac x = F in exI) apply (force intro: Join_SKIP_right) done @@ -88,7 +88,7 @@ by (unfold component_def, blast) lemma component_Join2: "G component (F \ G)" -apply (unfold component_def) + unfolding component_def apply (simp (no_asm) add: Join_commute) apply blast done @@ -111,12 +111,12 @@ done lemma component_JOIN: "i \ I \ F(i) component (\i \ I. (F(i)))" -apply (unfold component_def) + unfolding component_def apply (blast intro: JOIN_absorb) done lemma component_trans: "\F component G; G component H\ \ F component H" -apply (unfold component_def) + unfolding component_def apply (blast intro: Join_assoc [symmetric]) done @@ -175,7 +175,7 @@ by (auto simp add: preserves_def INT_iff) lemma fun_pair_apply [simp]: "fun_pair(f,g,x) = " -apply (unfold fun_pair_def) + unfolding fun_pair_def apply (simp (no_asm)) done @@ -252,7 +252,7 @@ (* component_of satisfies many of component's properties *) lemma component_of_refl [simp]: "F \ program \ F component_of F" -apply (unfold component_of_def) + unfolding component_of_def apply (rule_tac x = SKIP in exI, auto) done @@ -263,7 +263,7 @@ lemma component_of_trans: "\F component_of G; G component_of H\ \ F component_of H" -apply (unfold component_of_def) + unfolding component_of_def apply (blast intro: Join_assoc [symmetric]) done @@ -276,7 +276,7 @@ lemma localize_AllowedActs_eq [simp]: "AllowedActs(localize(v,F)) = AllowedActs(F) \ (\G \ preserves(v). Acts(G))" -apply (unfold localize_def) + unfolding localize_def apply (rule equalityI) apply (auto dest: Acts_type [THEN subsetD]) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/UNITY/Constrains.thy --- a/src/ZF/UNITY/Constrains.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/UNITY/Constrains.thy Tue Sep 27 17:54:20 2022 +0100 @@ -66,7 +66,7 @@ done lemma st_set_reachable: "st_set(reachable(F))" -apply (unfold st_set_def) + unfolding st_set_def apply (rule reachable_type) done declare st_set_reachable [iff] @@ -129,7 +129,7 @@ (*Resembles the previous definition of Constrains*) lemma Constrains_eq_constrains: "A Co B = {F \ program. F:(reachable(F) \ A) co (reachable(F) \ B)}" -apply (unfold Constrains_def) + unfolding Constrains_def apply (blast dest: constrains_reachable_Int constrains_type [THEN subsetD] intro: constrains_weaken) done @@ -137,7 +137,7 @@ lemmas Constrains_def2 = Constrains_eq_constrains [THEN eq_reflection] lemma constrains_imp_Constrains: "F \ A co A' \ F \ A Co A'" -apply (unfold Constrains_def) + unfolding Constrains_def apply (blast intro: constrains_weaken_L dest: constrainsD2) done @@ -160,26 +160,26 @@ declare Constrains_empty [iff] lemma Constrains_state: "F \ A Co state \ F \ program" -apply (unfold Constrains_def) + unfolding Constrains_def apply (auto dest: Constrains_type [THEN subsetD] intro: constrains_imp_Constrains) done declare Constrains_state [iff] lemma Constrains_weaken_R: "\F \ A Co A'; A'<=B'\ \ F \ A Co B'" -apply (unfold Constrains_def2) + unfolding Constrains_def2 apply (blast intro: constrains_weaken_R) done lemma Constrains_weaken_L: "\F \ A Co A'; B<=A\ \ F \ B Co A'" -apply (unfold Constrains_def2) + unfolding Constrains_def2 apply (blast intro: constrains_weaken_L st_set_subset) done lemma Constrains_weaken: "\F \ A Co A'; B<=A; A'<=B'\ \ F \ B Co B'" -apply (unfold Constrains_def2) + unfolding Constrains_def2 apply (blast intro: constrains_weaken st_set_subset) done @@ -202,7 +202,7 @@ lemma Constrains_Int: "\F \ A Co A'; F \ B Co B'\\ F:(A \ B) Co (A' \ B')" -apply (unfold Constrains_def) + unfolding Constrains_def apply (subgoal_tac "reachable (F) \ (A \ B) = (reachable (F) \ A) \ (reachable (F) \ B) ") apply (auto intro: constrains_Int) done @@ -216,19 +216,19 @@ done lemma Constrains_imp_subset: "F \ A Co A' \ reachable(F) \ A \ A'" -apply (unfold Constrains_def) + unfolding Constrains_def apply (blast dest: constrains_imp_subset) done lemma Constrains_trans: "\F \ A Co B; F \ B Co C\ \ F \ A Co C" -apply (unfold Constrains_def2) + unfolding Constrains_def2 apply (blast intro: constrains_trans constrains_weaken) done lemma Constrains_cancel: "\F \ A Co (A' \ B); F \ B Co B'\ \ F \ A Co (A' \ B')" -apply (unfold Constrains_def2) + unfolding Constrains_def2 apply (simp (no_asm_use) add: Int_Un_distrib) apply (blast intro: constrains_cancel) done @@ -259,27 +259,27 @@ lemma Stable_Un: "\F \ Stable(A); F \ Stable(A')\ \ F \ Stable(A \ A')" -apply (unfold Stable_def) + unfolding Stable_def apply (blast intro: Constrains_Un) done lemma Stable_Int: "\F \ Stable(A); F \ Stable(A')\ \ F \ Stable (A \ A')" -apply (unfold Stable_def) + unfolding Stable_def apply (blast intro: Constrains_Int) done lemma Stable_Constrains_Un: "\F \ Stable(C); F \ A Co (C \ A')\ \ F \ (C \ A) Co (C \ A')" -apply (unfold Stable_def) + unfolding Stable_def apply (blast intro: Constrains_Un [THEN Constrains_weaken_R]) done lemma Stable_Constrains_Int: "\F \ Stable(C); F \ (C \ A) Co A'\ \ F \ (C \ A) Co (C \ A')" -apply (unfold Stable_def) + unfolding Stable_def apply (blast intro: Constrains_Int [THEN Constrains_weaken]) done @@ -302,7 +302,7 @@ done lemma Stable_type: "Stable(A) \ program" -apply (unfold Stable_def) + unfolding Stable_def apply (rule Constrains_type) done @@ -329,7 +329,7 @@ (** Unless **) lemma Unless_type: "A Unless B <=program" -apply (unfold op_Unless_def) + unfolding op_Unless_def apply (rule Constrains_type) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/UNITY/Distributor.thy --- a/src/ZF/UNITY/Distributor.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/UNITY/Distributor.thy Tue Sep 27 17:54:20 2022 +0100 @@ -55,19 +55,19 @@ lemma (in distr) In_value_type [simp,TC]: "s \ state \ s`In \ list(A)" -apply (unfold state_def) + unfolding state_def apply (drule_tac a = In in apply_type, auto) done lemma (in distr) iIn_value_type [simp,TC]: "s \ state \ s`iIn \ list(nat)" -apply (unfold state_def) + unfolding state_def apply (drule_tac a = iIn in apply_type, auto) done lemma (in distr) Out_value_type [simp,TC]: "s \ state \ s`Out(n):list(A)" -apply (unfold state_def) + unfolding state_def apply (drule_tac a = "Out (n)" in apply_type) apply auto done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/UNITY/FP.thy --- a/src/ZF/UNITY/FP.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/UNITY/FP.thy Tue Sep 27 17:54:20 2022 +0100 @@ -24,7 +24,7 @@ by (unfold FP_Orig_def, blast) lemma st_set_FP_Orig [iff]: "st_set(FP_Orig(F))" -apply (unfold st_set_def) + unfolding st_set_def apply (rule FP_Orig_type) done @@ -32,7 +32,7 @@ by (unfold FP_def, blast) lemma st_set_FP [iff]: "st_set(FP(F))" -apply (unfold st_set_def) + unfolding st_set_def apply (rule FP_type) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/UNITY/Follows.thy --- a/src/ZF/UNITY/Follows.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/UNITY/Follows.thy Tue Sep 27 17:54:20 2022 +0100 @@ -165,7 +165,7 @@ (* Follows type *) lemma Follows_type: "Follows(A, r, f, g)<=program" -apply (unfold Follows_def) + unfolding Follows_def apply (blast dest: Increasing_type [THEN subsetD]) done @@ -175,7 +175,7 @@ lemma FollowsD: "F \ Follows(A, r, f, g)\ F \ program \ (\a. a \ A) \ (\x \ state. f(x):A \ g(x):A)" -apply (unfold Follows_def) + unfolding Follows_def apply (blast dest: IncreasingD) done @@ -406,7 +406,7 @@ lemma empty_le_MultLe [simp]: "\multiset(M); mset_of(M)<= A\ \ \0, M\ \ MultLe(A, r)" -apply (unfold MultLe_def) + unfolding MultLe_def apply (case_tac "M=0") apply (auto simp add: FiniteFun.intros) apply (subgoal_tac "<0 +# 0, 0 +# M> \ multirel (A, r - id (A))") @@ -420,7 +420,7 @@ lemma munion_mono: "\\M, N\ \ MultLe(A, r); \K, L\ \ MultLe(A, r)\ \ \ MultLe(A, r)" -apply (unfold MultLe_def) + unfolding MultLe_def apply (auto intro: munion_multirel_mono1 munion_multirel_mono2 munion_multirel_mono multiset_into_Mult simp add: Mult_iff_multiset) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/UNITY/GenPrefix.thy --- a/src/ZF/UNITY/GenPrefix.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/UNITY/GenPrefix.thy Tue Sep 27 17:54:20 2022 +0100 @@ -182,7 +182,7 @@ lemma prefix_gen_prefix_trans: "\\x,y\ \ prefix(A); \y, z\ \ gen_prefix(A, r); r<=A*A\ \ \x, z\ \ gen_prefix(A, r)" -apply (unfold prefix_def) + unfolding prefix_def apply (rule_tac P = "\r. \x,z\ \ gen_prefix (A, r) " in right_comp_id [THEN subst]) apply (blast dest: gen_prefix_trans_comp gen_prefix.dom_subset [THEN subsetD])+ done @@ -191,7 +191,7 @@ lemma gen_prefix_prefix_trans: "\\x,y\ \ gen_prefix(A,r); \y, z\ \ prefix(A); r<=A*A\ \ \x, z\ \ gen_prefix(A, r)" -apply (unfold prefix_def) + unfolding prefix_def apply (rule_tac P = "\r. \x,z\ \ gen_prefix (A, r) " in left_comp_id [THEN subst]) apply (blast dest: gen_prefix_trans_comp gen_prefix.dom_subset [THEN subsetD])+ done @@ -232,7 +232,7 @@ lemma same_gen_prefix_gen_prefix: "\refl(A, r); xs \ list(A)\ \ : gen_prefix(A, r) \ \ys,zs\ \ gen_prefix(A, r)" -apply (unfold refl_def) + unfolding refl_def apply (induct_tac "xs") apply (simp_all (no_asm_simp)) done @@ -338,14 +338,14 @@ (** prefix is a partial order: **) lemma refl_prefix: "refl(list(A), prefix(A))" -apply (unfold prefix_def) + unfolding prefix_def apply (rule refl_gen_prefix) apply (auto simp add: refl_def) done declare refl_prefix [THEN reflD, simp] lemma trans_prefix: "trans(prefix(A))" -apply (unfold prefix_def) + unfolding prefix_def apply (rule trans_gen_prefix) apply (auto simp add: trans_def) done @@ -353,7 +353,7 @@ lemmas prefix_trans = trans_prefix [THEN transD] lemma trans_on_prefix: "trans[list(A)](prefix(A))" -apply (unfold prefix_def) + unfolding prefix_def apply (rule trans_on_gen_prefix) apply (auto simp add: trans_def) done @@ -365,7 +365,7 @@ lemma set_of_list_prefix_mono: "\xs,ys\ \ prefix(A) \ set_of_list(xs) \ set_of_list(ys)" -apply (unfold prefix_def) + unfolding prefix_def apply (erule gen_prefix.induct) apply (subgoal_tac [3] "xs \ list (A) \ys \ list (A) ") prefer 4 apply (blast dest: gen_prefix.dom_subset [THEN subsetD]) @@ -376,7 +376,7 @@ lemma Nil_prefix: "xs \ list(A) \ <[],xs> \ prefix(A)" -apply (unfold prefix_def) + unfolding prefix_def apply (simp (no_asm_simp) add: Nil_gen_prefix) done declare Nil_prefix [simp] @@ -399,7 +399,7 @@ lemma same_prefix_prefix: "xs \ list(A)\ \ prefix(A) \ (\ys,zs\ \ prefix(A))" -apply (unfold prefix_def) + unfolding prefix_def apply (subgoal_tac "refl (A,id (A))") apply (simp (no_asm_simp)) apply (auto simp add: refl_def) @@ -414,7 +414,7 @@ lemma prefix_appendI: "\\xs,ys\ \ prefix(A); zs \ list(A)\ \ \ prefix(A)" -apply (unfold prefix_def) + unfolding prefix_def apply (erule gen_prefix.append, assumption) done declare prefix_appendI [simp] @@ -423,14 +423,14 @@ "\xs \ list(A); ys \ list(A); y \ A\ \ \ prefix(A) \ (xs=[] | (\zs. xs=Cons(y,zs) \ \zs,ys\ \ prefix(A)))" -apply (unfold prefix_def) + unfolding prefix_def apply (auto simp add: gen_prefix_Cons) done lemma append_one_prefix: "\\xs,ys\ \ prefix(A); length(xs) < length(ys)\ \ \ prefix(A)" -apply (unfold prefix_def) + unfolding prefix_def apply (subgoal_tac "refl (A, id (A))") apply (simp (no_asm_simp) add: append_one_gen_prefix) apply (auto simp add: refl_def) @@ -438,24 +438,24 @@ lemma prefix_length_le: "\xs,ys\ \ prefix(A) \ length(xs) \ length(ys)" -apply (unfold prefix_def) + unfolding prefix_def apply (blast dest: gen_prefix_length_le) done lemma prefix_type: "prefix(A)<=list(A)*list(A)" -apply (unfold prefix_def) + unfolding prefix_def apply (blast intro!: gen_prefix.dom_subset) done lemma strict_prefix_type: "strict_prefix(A) \ list(A)*list(A)" -apply (unfold strict_prefix_def) + unfolding strict_prefix_def apply (blast intro!: prefix_type [THEN subsetD]) done lemma strict_prefix_length_lt_aux: "\xs,ys\ \ prefix(A) \ xs\ys \ length(xs) < length(ys)" -apply (unfold prefix_def) + unfolding prefix_def apply (erule gen_prefix.induct, clarify) apply (subgoal_tac [!] "ys \ list(A) \ xs \ list(A)") apply (auto dest: gen_prefix.dom_subset [THEN subsetD] @@ -468,7 +468,7 @@ lemma strict_prefix_length_lt: "\xs,ys\:strict_prefix(A) \ length(xs) < length(ys)" -apply (unfold strict_prefix_def) + unfolding strict_prefix_def apply (rule strict_prefix_length_lt_aux [THEN mp]) apply (auto dest: prefix_type [THEN subsetD]) done @@ -476,7 +476,7 @@ (*Equivalence to the definition used in Lex/Prefix.thy*) lemma prefix_iff: "\xs,zs\ \ prefix(A) \ (\ys \ list(A). zs = xs@ys) \ xs \ list(A)" -apply (unfold prefix_def) + unfolding prefix_def apply (auto simp add: gen_prefix_iff_nth lt_nat_in_nat nth_append nth_type app_type length_app) apply (subgoal_tac "drop (length (xs), zs) \ list (A) ") apply (rule_tac x = "drop (length (xs), zs) " in bexI) @@ -544,7 +544,7 @@ declare refl_Le [simp] lemma antisym_Le: "antisym(Le)" -apply (unfold antisym_def) + unfolding antisym_def apply (auto intro: le_anti_sym) done declare antisym_Le [simp] @@ -579,7 +579,7 @@ lemma prefix_imp_pfixLe: "\xs,ys\:prefix(nat)\ xs pfixLe ys" -apply (unfold prefix_def) + unfolding prefix_def apply (rule gen_prefix_mono [THEN subsetD], auto) done @@ -619,7 +619,7 @@ lemma prefix_imp_take: "\xs, ys\ \ prefix(A) \ xs = take(length(xs), ys)" -apply (unfold prefix_def) + unfolding prefix_def apply (erule gen_prefix.induct) apply (subgoal_tac [3] "length (xs) :nat") apply (auto dest: gen_prefix.dom_subset [THEN subsetD] simp add: length_type) @@ -641,7 +641,7 @@ by (blast intro: prefix_length_equal le_anti_sym prefix_length_le) lemma take_prefix [rule_format]: "xs \ list(A) \ \n \ nat. \ prefix(A)" -apply (unfold prefix_def) + unfolding prefix_def apply (erule list.induct, simp, clarify) apply (erule natE, auto) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/UNITY/Guar.thy --- a/src/ZF/UNITY/Guar.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/UNITY/Guar.thy Tue Sep 27 17:54:20 2022 +0100 @@ -95,7 +95,7 @@ lemma ex1 [rule_format]: "GG \ Fin(program) \ ex_prop(X) \ GG \ X\0 \ OK(GG, (\G. G)) \(\G \ GG. G) \ X" -apply (unfold ex_prop_def) + unfolding ex_prop_def apply (erule Fin_induct) apply (simp_all add: OK_cons_iff) apply (safe elim!: not_emptyE, auto) @@ -132,14 +132,14 @@ (*** universal properties ***) lemma uv_imp_subset_program: "uv_prop(X)\ X\program" -apply (unfold uv_prop_def) + unfolding uv_prop_def apply (simp (no_asm_simp)) done lemma uv1 [rule_format]: "GG \ Fin(program) \ (uv_prop(X)\ GG \ X \ OK(GG, (\G. G)) \ (\G \ GG. G) \ X)" -apply (unfold uv_prop_def) + unfolding uv_prop_def apply (erule Fin_induct) apply (auto simp add: OK_cons_iff) done @@ -216,7 +216,7 @@ done lemma guarantees_imp: "(Y = program guarantees Y) \ ex_prop(Y)" -apply (unfold guar_def) + unfolding guar_def apply (simp (no_asm_simp) add: ex_prop_equiv) apply safe apply (blast intro: elim: equalityE) @@ -231,7 +231,7 @@ lemma guarantees_UN_left: "i \ I \(\i \ I. X(i)) guarantees Y = (\i \ I. X(i) guarantees Y)" -apply (unfold guar_def) + unfolding guar_def apply (rule equalityI, safe) prefer 2 apply force apply blast+ @@ -239,13 +239,13 @@ lemma guarantees_Un_left: "(X \ Y) guarantees Z = (X guarantees Z) \ (Y guarantees Z)" -apply (unfold guar_def) + unfolding guar_def apply (rule equalityI, safe, blast+) done lemma guarantees_INT_right: "i \ I \ X guarantees (\i \ I. Y(i)) = (\i \ I. X guarantees Y(i))" -apply (unfold guar_def) + unfolding guar_def apply (rule equalityI, safe, blast+) done @@ -307,7 +307,7 @@ "\F \ U guarantees V; G \ X guarantees Y; F ok G\ \ F \ G: (U \ X) guarantees (V \ Y)" -apply (unfold guar_def) + unfolding guar_def apply (simp (no_asm)) apply safe apply (simp add: Join_assoc) @@ -319,7 +319,7 @@ lemma guarantees_Join_Un: "\F \ U guarantees V; G \ X guarantees Y; F ok G\ \ F \ G: (U \ X) guarantees (V \ Y)" -apply (unfold guar_def) + unfolding guar_def apply (simp (no_asm)) apply safe apply (simp add: Join_assoc) @@ -480,7 +480,7 @@ lemma wx_equiv: "wx(X) = {F \ program. \G \ program. F ok G \ (F \ G) \ X}" -apply (unfold wx_def) + unfolding wx_def apply (rule equalityI, safe, blast) apply (simp (no_asm_use) add: ex_prop_def) apply blast diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/UNITY/Increasing.thy --- a/src/ZF/UNITY/Increasing.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/UNITY/Increasing.thy Tue Sep 27 17:54:20 2022 +0100 @@ -41,7 +41,7 @@ lemma increasingD: "F \ increasing[A](r,f) \ F \ program \ (\a. a \ A) \ (\s \ state. f(s):A)" -apply (unfold increasing_def) + unfolding increasing_def apply (subgoal_tac "\x. x \ state") apply (auto dest: stable_type [THEN subsetD] intro: st0_in_state) done @@ -110,7 +110,7 @@ lemma IncreasingD: "F \ Increasing[A](r, f) \ F \ program \ (\a. a \ A) \ (\s \ state. f(s):A)" -apply (unfold Increasing_def) + unfolding Increasing_def apply (subgoal_tac "\x. x \ state") apply (auto intro: st0_in_state) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/UNITY/Merge.thy --- a/src/ZF/UNITY/Merge.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/UNITY/Merge.thy Tue Sep 27 17:54:20 2022 +0100 @@ -85,18 +85,18 @@ lemma (in merge) In_value_type [TC,simp]: "s \ state \ s`In(n) \ list(A)" -apply (unfold state_def) + unfolding state_def apply (drule_tac a = "In (n)" in apply_type) apply auto done lemma (in merge) Out_value_type [TC,simp]: "s \ state \ s`Out \ list(A)" -apply (unfold state_def) + unfolding state_def apply (drule_tac a = Out in apply_type, auto) done lemma (in merge) iOut_value_type [TC,simp]: "s \ state \ s`iOut \ list(nat)" -apply (unfold state_def) + unfolding state_def apply (drule_tac a = iOut in apply_type, auto) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/UNITY/Monotonicity.thy --- a/src/ZF/UNITY/Monotonicity.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/UNITY/Monotonicity.thy Tue Sep 27 17:54:20 2022 +0100 @@ -95,7 +95,7 @@ lemma mono_length [iff]: "mono1(list(A), prefix(A), nat, Le, length)" -apply (unfold mono1_def) + unfolding mono1_def apply (auto dest: prefix_length_le simp add: Le_def) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/UNITY/Mutex.thy --- a/src/ZF/UNITY/Mutex.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/UNITY/Mutex.thy Tue Sep 27 17:54:20 2022 +0100 @@ -94,27 +94,27 @@ declare p_type [simp] u_type [simp] v_type [simp] m_type [simp] n_type [simp] lemma u_value_type: "s \ state \s`u \ bool" -apply (unfold state_def) + unfolding state_def apply (drule_tac a = u in apply_type, auto) done lemma v_value_type: "s \ state \ s`v \ bool" -apply (unfold state_def) + unfolding state_def apply (drule_tac a = v in apply_type, auto) done lemma p_value_type: "s \ state \ s`p \ bool" -apply (unfold state_def) + unfolding state_def apply (drule_tac a = p in apply_type, auto) done lemma m_value_type: "s \ state \ s`m \ int" -apply (unfold state_def) + unfolding state_def apply (drule_tac a = m in apply_type, auto) done lemma n_value_type: "s \ state \s`n \ int" -apply (unfold state_def) + unfolding state_def apply (drule_tac a = n in apply_type, auto) done @@ -216,7 +216,7 @@ lemma U_F3: "Mutex \ {s \ state. s`m = #3} \w {s \ state. s`p=1}" apply (rule_tac B = "{s \ state. s`m = #4}" in LeadsTo_Trans) - apply (unfold Mutex_def) + unfolding Mutex_def apply (ensures U3) apply (ensures U4) done @@ -267,7 +267,7 @@ lemma V_F3: "Mutex \ {s \ state. s`n = #3} \w {s \ state. s`p=0}" apply (rule_tac B = "{s \ state. s`n = #4}" in LeadsTo_Trans) - apply (unfold Mutex_def) + unfolding Mutex_def apply (ensures V3) apply (ensures V4) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/UNITY/SubstAx.thy --- a/src/ZF/UNITY/SubstAx.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/UNITY/SubstAx.thy Tue Sep 27 17:54:20 2022 +0100 @@ -26,7 +26,7 @@ (* Equivalence with the HOL-like definition *) lemma LeadsTo_eq: "st_set(B)\ A \w B = {F \ program. F:(reachable(F) \ A) \ B}" -apply (unfold LeadsTo_def) + unfolding LeadsTo_def apply (blast dest: psp_stable2 leadsToD2 constrainsD2 intro: leadsTo_weaken) done @@ -40,7 +40,7 @@ by (simp add: LeadsTo_def Always_eq_includes_reachable Int_absorb2 Int_assoc [symmetric] leadsToD2) lemma Always_LeadsTo_post: "F \ Always(I) \ (F \ A \w (I \ A')) \ (F \ A \w A')" -apply (unfold LeadsTo_def) + unfolding LeadsTo_def apply (simp add: Always_eq_includes_reachable Int_absorb2 Int_assoc [symmetric] leadsToD2) done @@ -123,12 +123,12 @@ declare LeadsTo_state [iff] lemma LeadsTo_weaken_R: "\F \ A \w A'; A'<=B'\ \ F \ A \w B'" -apply (unfold LeadsTo_def) + unfolding LeadsTo_def apply (auto intro: leadsTo_weaken_R) done lemma LeadsTo_weaken_L: "\F \ A \w A'; B \ A\ \ F \ B \w A'" -apply (unfold LeadsTo_def) + unfolding LeadsTo_def apply (auto intro: leadsTo_weaken_L) done @@ -256,7 +256,7 @@ lemma PSP_Unless: "\F \ A \w A'; F \ B Unless B'\\ F:(A \ B) \w ((A' \ B) \ B')" -apply (unfold op_Unless_def) + unfolding op_Unless_def apply (drule PSP, assumption) apply (blast intro: LeadsTo_Diff LeadsTo_weaken subset_imp_LeadsTo) done @@ -327,7 +327,7 @@ "\F \ A \w A'; F \ Stable(A'); F \ B \w B'; F \ Stable(B')\ \ F \ (A \ B) \w (A' \ B')" -apply (unfold Stable_def) + unfolding Stable_def apply (rule_tac C1 = 0 in Completion [THEN LeadsTo_weaken_R]) prefer 5 apply blast @@ -339,7 +339,7 @@ (\i. i \ I \ F \ A(i) \w A'(i)); (\i. i \ I \F \ Stable(A'(i))); F \ program\ \ F \ (\i \ I. A(i)) \w (\i \ I. A'(i))" -apply (unfold Stable_def) + unfolding Stable_def apply (rule_tac C1 = 0 in Finite_completion [THEN LeadsTo_weaken_R], simp_all) apply (rule_tac [3] subset_refl, auto) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/UNITY/UNITY.thy --- a/src/ZF/UNITY/UNITY.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/UNITY/UNITY.thy Tue Sep 27 17:54:20 2022 +0100 @@ -165,7 +165,7 @@ lemmas InitD = Init_type [THEN subsetD] lemma st_set_Init [iff]: "st_set(Init(F))" -apply (unfold st_set_def) + unfolding st_set_def apply (rule Init_type) done @@ -469,7 +469,7 @@ by (force simp add: unless_def constrains_def) lemma unlessI: "\F \ (A-B) co (A \ B)\ \ F \ A unless B" -apply (unfold unless_def) + unfolding unless_def apply (blast dest: constrainsD2) done @@ -515,34 +515,34 @@ lemma stable_Un: "\F \ stable(A); F \ stable(A')\ \ F \ stable(A \ A')" -apply (unfold stable_def) + unfolding stable_def apply (blast intro: constrains_Un) done lemma stable_UN: "\\i. i\I \ F \ stable(A(i)); F \ program\ \ F \ stable (\i \ I. A(i))" -apply (unfold stable_def) + unfolding stable_def apply (blast intro: constrains_UN) done lemma stable_Int: "\F \ stable(A); F \ stable(A')\ \ F \ stable (A \ A')" -apply (unfold stable_def) + unfolding stable_def apply (blast intro: constrains_Int) done lemma stable_INT: "\\i. i \ I \ F \ stable(A(i)); F \ program\ \ F \ stable (\i \ I. A(i))" -apply (unfold stable_def) + unfolding stable_def apply (blast intro: constrains_INT) done lemma stable_All: "\\z. F \ stable({s \ state. P(s, z)}); F \ program\ \ F \ stable({s \ state. \z. P(s, z)})" -apply (unfold stable_def) + unfolding stable_def apply (rule constrains_All, auto) done @@ -562,7 +562,7 @@ subsection\The Operator \<^term>\invariant\\ lemma invariant_type: "invariant(A) \ program" -apply (unfold invariant_def) + unfolding invariant_def apply (blast dest: stable_type [THEN subsetD]) done @@ -575,7 +575,7 @@ by (unfold invariant_def initially_def, auto) lemma invariantD2: "F \ invariant(A) \ F \ program \ st_set(A)" -apply (unfold invariant_def) + unfolding invariant_def apply (blast dest: stableD2) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/UNITY/Union.thy --- a/src/ZF/UNITY/Union.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/UNITY/Union.thy Tue Sep 27 17:54:20 2022 +0100 @@ -159,7 +159,7 @@ lemma Acts_JOIN [simp]: "Acts(JOIN(I,F)) = cons(id(state), \i \ I. Acts(F(i)))" -apply (unfold JOIN_def) + unfolding JOIN_def apply (auto simp del: INT_simps UN_simps) apply (rule equalityI) apply (auto dest: Acts_type [THEN subsetD]) @@ -325,7 +325,7 @@ "i \ I \ (\i \ I. F(i)) \ transient(A) \ (\i \ I. programify(F(i)) \ transient(A))" apply (auto simp add: transient_def JOIN_def) -apply (unfold st_set_def) + unfolding st_set_def apply (drule_tac [2] x = act in bspec) apply (auto dest: Acts_type [THEN subsetD]) done @@ -357,7 +357,7 @@ (programify(F) \ (A-B) co (A \ B) \ programify(G) \ (A-B) co (A \ B) \ (programify(F) \ transient (A-B) | programify(G) \ transient (A-B)))" -apply (unfold ensures_def) + unfolding ensures_def apply (auto simp add: Join_transient) done @@ -567,7 +567,7 @@ lemma def_UNION_ok_iff: "\F \ mk_program(init,acts, \G \ X. Acts(G)); safety_prop(X)\ \ F ok G \ (programify(G) \ X \ acts \ Pow(state*state) \ AllowedActs(G))" -apply (unfold ok_def) + unfolding ok_def apply (drule_tac G = G in safety_prop_Acts_iff) apply (cut_tac F = G in AllowedActs_type) apply (cut_tac F = G in Acts_type, auto) diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/UNITY/WFair.thy --- a/src/ZF/UNITY/WFair.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/UNITY/WFair.thy Tue Sep 27 17:54:20 2022 +0100 @@ -116,7 +116,7 @@ lemma ensuresI: "\F:(A-B) co (A \ B); F \ transient(A-B)\\F \ A ensures B" -apply (unfold ensures_def) + unfolding ensures_def apply (auto simp add: transient_type [THEN subsetD]) done @@ -131,7 +131,7 @@ by (unfold ensures_def, auto) lemma ensures_weaken_R: "\F \ A ensures A'; A'<=B'\ \ F \ A ensures B'" -apply (unfold ensures_def) + unfolding ensures_def apply (blast intro: transient_strengthen constrains_weaken) done @@ -139,7 +139,7 @@ lemma stable_ensures_Int: "\F \ stable(C); F \ A ensures B\ \ F:(C \ A) ensures (C \ B)" -apply (unfold ensures_def) + unfolding ensures_def apply (simp (no_asm) add: Int_Un_distrib [symmetric] Diff_Int_distrib [symmetric]) apply (blast intro: transient_strengthen stable_constrains_Int constrains_weaken) done @@ -182,13 +182,13 @@ lemmas subset_imp_leadsTo = subset_imp_ensures [THEN leadsTo_Basis] lemma leadsTo_Trans: "\F \ A \ B; F \ B \ C\\F \ A \ C" -apply (unfold leadsTo_def) + unfolding leadsTo_def apply (auto intro: leads.Trans) done (* Better when used in association with leadsTo_weaken_R *) lemma transient_imp_leadsTo: "F \ transient(A) \ F \ A \ (state-A)" -apply (unfold transient_def) + unfolding transient_def apply (blast intro: ensuresI [THEN leadsTo_Basis] constrains_weaken transientI) done @@ -424,7 +424,7 @@ lemma psp_stable: "\F \ A \ A'; F \ stable(B)\ \ F:(A \ B) \ (A' \ B)" -apply (unfold stable_def) + unfolding stable_def apply (frule leadsToD2) apply (erule leadsTo_induct) prefer 3 apply (blast intro: leadsTo_Union_Int) @@ -470,7 +470,7 @@ lemma psp_unless: "\F \ A \ A'; F \ B unless B'; st_set(B); st_set(B')\ \ F \ (A \ B) \ ((A' \ B) \ B')" -apply (unfold unless_def) + unfolding unless_def apply (subgoal_tac "st_set (A) \st_set (A') ") prefer 2 apply (blast dest: leadsToD2) apply (drule psp, assumption, blast) @@ -511,7 +511,7 @@ done lemma nat_measure_field: "field(measure(nat, \x. x)) = nat" -apply (unfold field_def) + unfolding field_def apply (simp add: measure_def) apply (rule equalityI, force, clarify) apply (erule_tac V = "x\range (y)" for y in thin_rl) @@ -551,13 +551,13 @@ by (unfold wlt_def, auto) lemma wlt_st_set: "st_set(wlt(F, B))" -apply (unfold st_set_def) + unfolding st_set_def apply (rule wlt_type) done declare wlt_st_set [iff] lemma wlt_leadsTo_iff: "F \ wlt(F, B) \ B \ (F \ program \ st_set(B))" -apply (unfold wlt_def) + unfolding wlt_def apply (blast dest: leadsToD2 intro!: leadsTo_Union) done @@ -565,7 +565,7 @@ lemmas wlt_leadsTo = conjI [THEN wlt_leadsTo_iff [THEN iffD2]] lemma leadsTo_subset: "F \ A \ B \ A \ wlt(F, B)" -apply (unfold wlt_def) + unfolding wlt_def apply (frule leadsToD2) apply (auto simp add: st_set_def) done @@ -687,7 +687,7 @@ "\F \ A \ A'; F \ stable(A'); F \ B \ B'; F \ stable(B')\ \ F \ (A \ B) \ (A' \ B')" -apply (unfold stable_def) + unfolding stable_def apply (rule_tac C1 = 0 in completion [THEN leadsTo_weaken_R], simp+) apply (blast dest: leadsToD2) done @@ -698,7 +698,7 @@ (\i. i \ I \ F \ A(i) \ A'(i)); (\i. i \ I \ F \ stable(A'(i))); F \ program\ \ F \ (\i \ I. A(i)) \ (\i \ I. A'(i))" -apply (unfold stable_def) + unfolding stable_def apply (subgoal_tac "st_set (\i \ I. A' (i))") prefer 2 apply (blast dest: leadsToD2) apply (rule_tac C1 = 0 in finite_completion [THEN leadsTo_weaken_R], auto) diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Univ.thy --- a/src/ZF/Univ.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Univ.thy Tue Sep 27 17:54:20 2022 +0100 @@ -125,7 +125,7 @@ lemma Pair_in_Vfrom: "\a \ Vfrom(A,i); b \ Vfrom(A,i)\ \ \a,b\ \ Vfrom(A,succ(succ(i)))" -apply (unfold Pair_def) + unfolding Pair_def apply (blast intro: doubleton_in_Vfrom) done @@ -249,13 +249,13 @@ lemma Inl_in_VLimit: "\a \ Vfrom(A,i); Limit(i)\ \ Inl(a) \ Vfrom(A,i)" -apply (unfold Inl_def) + unfolding Inl_def apply (blast intro: zero_in_VLimit Pair_in_VLimit) done lemma Inr_in_VLimit: "\b \ Vfrom(A,i); Limit(i)\ \ Inr(b) \ Vfrom(A,i)" -apply (unfold Inr_def) + unfolding Inr_def apply (blast intro: one_in_VLimit Pair_in_VLimit) done @@ -336,7 +336,7 @@ \ a*b \ Vfrom(A, succ(succ(succ(j))))" apply (drule Transset_Vfrom) apply (rule subset_mem_Vfrom) -apply (unfold Transset_def) + unfolding Transset_def apply (blast intro: Pair_in_Vfrom) done @@ -352,10 +352,10 @@ lemma sum_in_Vfrom: "\a \ Vfrom(A,j); b \ Vfrom(A,j); Transset(A); 1:j\ \ a+b \ Vfrom(A, succ(succ(succ(j))))" -apply (unfold sum_def) + unfolding sum_def apply (drule Transset_Vfrom) apply (rule subset_mem_Vfrom) -apply (unfold Transset_def) + unfolding Transset_def apply (blast intro: zero_in_Vfrom Pair_in_Vfrom i_subset_Vfrom [THEN subsetD]) done @@ -371,7 +371,7 @@ lemma fun_in_Vfrom: "\a \ Vfrom(A,j); b \ Vfrom(A,j); Transset(A)\ \ a->b \ Vfrom(A, succ(succ(succ(succ(j)))))" -apply (unfold Pi_def) + unfolding Pi_def apply (drule Transset_Vfrom) apply (rule subset_mem_Vfrom) apply (rule Collect_subset [THEN subset_trans]) @@ -380,7 +380,7 @@ apply (rule_tac [3] Un_upper2) apply (rule_tac [2] succI1 [THEN UN_upper]) apply (rule Pow_mono) -apply (unfold Transset_def) + unfolding Transset_def apply (blast intro: Pair_in_Vfrom) done @@ -395,7 +395,7 @@ "\a \ Vfrom(A,j); Transset(A)\ \ Pow(a) \ Vfrom(A, succ(succ(j)))" apply (drule Transset_Vfrom) apply (rule subset_mem_Vfrom) -apply (unfold Transset_def) + unfolding Transset_def apply (subst Vfrom, blast) done @@ -476,12 +476,12 @@ subsubsection\Set Up an Environment for Simplification\ lemma rank_Inl: "rank(a) < rank(Inl(a))" -apply (unfold Inl_def) + unfolding Inl_def apply (rule rank_pair2) done lemma rank_Inr: "rank(a) < rank(Inr(a))" -apply (unfold Inr_def) + unfolding Inr_def apply (rule rank_pair2) done @@ -491,7 +491,7 @@ text\NOT SUITABLE FOR REWRITING: recursive!\ lemma Vrec: "Vrec(a,H) = H(a, \x\Vset(rank(a)). Vrec(x,H))" -apply (unfold Vrec_def) + unfolding Vrec_def apply (subst transrec, simp) apply (rule refl [THEN lam_cong, THEN subst_context], simp add: lt_def) done @@ -507,7 +507,7 @@ text\NOT SUITABLE FOR REWRITING: recursive!\ lemma Vrecursor: "Vrecursor(H,a) = H(\x\Vset(rank(a)). Vrecursor(H,x), a)" -apply (unfold Vrecursor_def) + unfolding Vrecursor_def apply (subst transrec, simp) apply (rule refl [THEN lam_cong, THEN subst_context], simp add: lt_def) done @@ -523,20 +523,20 @@ subsection\The Datatype Universe: \<^term>\univ(A)\\ lemma univ_mono: "A<=B \ univ(A) \ univ(B)" -apply (unfold univ_def) + unfolding univ_def apply (erule Vfrom_mono) apply (rule subset_refl) done lemma Transset_univ: "Transset(A) \ Transset(univ(A))" -apply (unfold univ_def) + unfolding univ_def apply (erule Transset_Vfrom) done subsubsection\The Set \<^term>\univ(A)\ as a Limit\ lemma univ_eq_UN: "univ(A) = (\i\nat. Vfrom(A,i))" -apply (unfold univ_def) + unfolding univ_def apply (rule Limit_nat [THEN Limit_Vfrom_eq]) done @@ -567,7 +567,7 @@ subsection\Closure Properties for \<^term>\univ(A)\\ lemma zero_in_univ: "0 \ univ(A)" -apply (unfold univ_def) + unfolding univ_def apply (rule nat_0I [THEN zero_in_Vfrom]) done @@ -575,7 +575,7 @@ by (blast intro: zero_in_univ) lemma A_subset_univ: "A \ univ(A)" -apply (unfold univ_def) + unfolding univ_def apply (rule A_subset_Vfrom) done @@ -584,30 +584,30 @@ subsubsection\Closure under Unordered and Ordered Pairs\ lemma singleton_in_univ: "a: univ(A) \ {a} \ univ(A)" -apply (unfold univ_def) + unfolding univ_def apply (blast intro: singleton_in_VLimit Limit_nat) done lemma doubleton_in_univ: "\a: univ(A); b: univ(A)\ \ {a,b} \ univ(A)" -apply (unfold univ_def) + unfolding univ_def apply (blast intro: doubleton_in_VLimit Limit_nat) done lemma Pair_in_univ: "\a: univ(A); b: univ(A)\ \ \a,b\ \ univ(A)" -apply (unfold univ_def) + unfolding univ_def apply (blast intro: Pair_in_VLimit Limit_nat) done lemma Union_in_univ: "\X: univ(A); Transset(A)\ \ \(X) \ univ(A)" -apply (unfold univ_def) + unfolding univ_def apply (blast intro: Union_in_VLimit Limit_nat) done lemma product_univ: "univ(A)*univ(A) \ univ(A)" -apply (unfold univ_def) + unfolding univ_def apply (rule Limit_nat [THEN product_VLimit]) done @@ -615,7 +615,7 @@ subsubsection\The Natural Numbers\ lemma nat_subset_univ: "nat \ univ(A)" -apply (unfold univ_def) + unfolding univ_def apply (rule i_subset_Vfrom) done @@ -625,7 +625,7 @@ subsubsection\Instances for 1 and 2\ lemma one_in_univ: "1 \ univ(A)" -apply (unfold univ_def) + unfolding univ_def apply (rule Limit_nat [THEN one_in_VLimit]) done @@ -634,7 +634,7 @@ by (blast intro: nat_into_univ) lemma bool_subset_univ: "bool \ univ(A)" -apply (unfold bool_def) + unfolding bool_def apply (blast intro!: zero_in_univ one_in_univ) done @@ -644,17 +644,17 @@ subsubsection\Closure under Disjoint Union\ lemma Inl_in_univ: "a: univ(A) \ Inl(a) \ univ(A)" -apply (unfold univ_def) + unfolding univ_def apply (erule Inl_in_VLimit [OF _ Limit_nat]) done lemma Inr_in_univ: "b: univ(A) \ Inr(b) \ univ(A)" -apply (unfold univ_def) + unfolding univ_def apply (erule Inr_in_VLimit [OF _ Limit_nat]) done lemma sum_univ: "univ(C)+univ(C) \ univ(C)" -apply (unfold univ_def) + unfolding univ_def apply (rule Limit_nat [THEN sum_VLimit]) done @@ -694,7 +694,7 @@ lemmas Fin_subset_VLimit = subset_trans [OF Fin_mono Fin_VLimit] lemma Fin_univ: "Fin(univ(A)) \ univ(A)" -apply (unfold univ_def) + unfolding univ_def apply (rule Limit_nat [THEN Fin_VLimit]) done @@ -710,7 +710,7 @@ lemmas nat_fun_subset_VLimit = subset_trans [OF Pi_mono nat_fun_VLimit] lemma nat_fun_univ: "n: nat \ n -> univ(A) \ univ(A)" -apply (unfold univ_def) + unfolding univ_def apply (erule nat_fun_VLimit [OF _ Limit_nat]) done @@ -726,7 +726,7 @@ done lemma FiniteFun_univ1: "univ(A) -||> univ(A) \ univ(A)" -apply (unfold univ_def) + unfolding univ_def apply (rule Limit_nat [THEN FiniteFun_VLimit1]) done @@ -740,7 +740,7 @@ lemma FiniteFun_univ: "W \ univ(A) \ W -||> univ(A) \ univ(A)" -apply (unfold univ_def) + unfolding univ_def apply (erule FiniteFun_VLimit [OF _ Limit_nat]) done @@ -777,7 +777,7 @@ lemma Pair_in_Vfrom_D: "\\a,b\ \ Vfrom(X,succ(i)); Transset(X)\ \ a \ Vfrom(X,i) \ b \ Vfrom(X,i)" -apply (unfold Pair_def) + unfolding Pair_def apply (blast dest!: doubleton_in_Vfrom_D Vfrom_doubleton_D) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/WF.thy --- a/src/ZF/WF.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/WF.thy Tue Sep 27 17:54:20 2022 +0100 @@ -109,7 +109,7 @@ "\wf(r); \x.\\y. \y,x\: r \ P(y)\ \ P(x)\ \ P(a)" -apply (unfold wf_def) + unfolding wf_def apply (erule_tac x = "{z \ domain(r). \ P(z)}" in allE) apply blast done @@ -132,7 +132,7 @@ "\wf[A](r); a \ A; \x.\x \ A; \y\A. \y,x\: r \ P(y)\ \ P(x) \ \ P(a)" -apply (unfold wf_on_def) + unfolding wf_on_def apply (erule wf_induct2, assumption) apply (rule field_Int_square, blast) done @@ -220,7 +220,7 @@ subsection\The Predicate \<^term>\is_recfun\\ lemma is_recfun_type: "is_recfun(r,a,H,f) \ f \ r-``{a} -> range(f)" -apply (unfold is_recfun_def) + unfolding is_recfun_def apply (erule ssubst) apply (rule lamI [THEN rangeI, THEN lam_type], assumption) done @@ -229,7 +229,7 @@ lemma apply_recfun: "\is_recfun(r,a,H,f); \x,a\:r\ \ f`x = H(x, restrict(f,r-``{x}))" -apply (unfold is_recfun_def) + unfolding is_recfun_def txt\replace f only on the left-hand side\ apply (erule_tac P = "\x. t(x) = u" for t u in ssubst) apply (simp add: underI) @@ -271,7 +271,7 @@ lemma the_recfun_eq: "\is_recfun(r,a,H,f); wf(r); trans(r)\ \ the_recfun(r,a,H) = f" -apply (unfold the_recfun_def) + unfolding the_recfun_def apply (blast intro: is_recfun_functional) done @@ -319,7 +319,7 @@ lemma wftrec: "\wf(r); trans(r)\ \ wftrec(r,a,H) = H(a, \x\r-``{a}. wftrec(r,x,H))" -apply (unfold wftrec_def) + unfolding wftrec_def apply (subst unfold_the_recfun [unfolded is_recfun_def]) apply (simp_all add: vimage_singleton_iff [THEN iff_sym] the_recfun_cut) done @@ -330,7 +330,7 @@ (*NOT SUITABLE FOR REWRITING: it is recursive!*) lemma wfrec: "wf(r) \ wfrec(r,a,H) = H(a, \x\r-``{a}. wfrec(r,x,H))" -apply (unfold wfrec_def) + unfolding wfrec_def apply (erule wf_trancl [THEN wftrec, THEN ssubst]) apply (rule trans_trancl) apply (rule vimage_pair_mono [THEN restrict_lam_eq, THEN subst_context]) diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/ZF_Base.thy --- a/src/ZF/ZF_Base.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/ZF_Base.thy Tue Sep 27 17:54:20 2022 +0100 @@ -365,7 +365,7 @@ (*Rule in Modus Ponens style [was called subsetE] *) lemma subsetD [elim]: "\A \ B; c\A\ \ c\B" -apply (unfold subset_def) + unfolding subset_def apply (erule bspec, assumption) done @@ -430,7 +430,7 @@ lemma Replace_iff: "b \ {y. x\A, P(x,y)} <-> (\x\A. P(x,b) \ (\y. P(x,y) \ y=b))" -apply (unfold Replace_def) + unfolding Replace_def apply (rule replacement [THEN iff_trans], blast+) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/Zorn.thy --- a/src/ZF/Zorn.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/Zorn.thy Tue Sep 27 17:54:20 2022 +0100 @@ -70,7 +70,7 @@ subsection\The Transfinite Construction\ lemma increasingD1: "f \ increasing(A) \ f \ Pow(A)->Pow(A)" -apply (unfold increasing_def) + unfolding increasing_def apply (erule CollectD1) done @@ -182,17 +182,17 @@ text\* Defining the "next" operation for Hausdorff's Theorem *\ lemma chain_subset_Pow: "chain(A) \ Pow(A)" -apply (unfold chain_def) + unfolding chain_def apply (rule Collect_subset) done lemma super_subset_chain: "super(A,c) \ chain(A)" -apply (unfold super_def) + unfolding super_def apply (rule Collect_subset) done lemma maxchain_subset_chain: "maxchain(A) \ chain(A)" -apply (unfold maxchain_def) + unfolding maxchain_def apply (rule Collect_subset) done @@ -220,7 +220,7 @@ if X \ chain(S) - maxchain(S) then ch ` super(S, X) else X" in bexI) apply force -apply (unfold increasing_def) + unfolding increasing_def apply (rule CollectI) apply (rule lam_type) apply (simp (no_asm_simp)) @@ -245,7 +245,7 @@ apply (erule TFin_induct) apply (simp (no_asm_simp) add: chain_subset_Pow [THEN subsetD, THEN PowD] choice_super [THEN super_subset_chain [THEN subsetD]]) -apply (unfold chain_def) + unfolding chain_def apply (rule CollectI, blast, safe) apply (rule_tac m1=B and n1=Ba in TFin_subset_linear [THEN disjE], fast+) txt\\Blast_tac's\ slow\ @@ -377,7 +377,7 @@ apply (rule_tac x="\X\Pow(S). if X=S then S else cons(ch`(S-X), X)" in bexI) apply force -apply (unfold increasing_def) + unfolding increasing_def apply (rule CollectI) apply (rule lam_type) txt\Type checking is surprisingly hard!\ diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/equalities.thy --- a/src/ZF/equalities.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/equalities.thy Tue Sep 27 17:54:20 2022 +0100 @@ -621,7 +621,7 @@ (** Range **) lemma rangeI [intro]: "\a,b\\ r \ b \ range(r)" -apply (unfold range_def) + unfolding range_def apply (erule converseI [THEN domainI]) done @@ -629,7 +629,7 @@ by (unfold range_def, blast) lemma range_subset: "range(A*B) \ B" -apply (unfold range_def) + unfolding range_def apply (subst converse_prod) apply (rule domain_subset) done @@ -682,12 +682,12 @@ by blast lemma domain_subset_field: "domain(r) \ field(r)" -apply (unfold field_def) + unfolding field_def apply (rule Un_upper1) done lemma range_subset_field: "range(r) \ field(r)" -apply (unfold field_def) + unfolding field_def apply (rule Un_upper2) done @@ -807,7 +807,7 @@ done lemma vimage_subset: "r \ A*B \ r-``C \ A" -apply (unfold vimage_def) + unfolding vimage_def apply (erule converse_type [THEN image_subset]) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/ex/Commutation.thy --- a/src/ZF/ex/Commutation.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/ex/Commutation.thy Tue Sep 27 17:54:20 2022 +0100 @@ -63,7 +63,7 @@ lemma commute_rtrancl: "commute(r,s) \ field(r)=field(s) \ commute(r^*,s^*)" -apply (unfold commute_def) + unfolding commute_def apply (rule square_rtrancl) apply (rule square_sym [THEN square_rtrancl, THEN square_sym]) apply (simp_all add: rtrancl_field) @@ -95,7 +95,7 @@ lemma confluent_Un: "\confluent(r); confluent(s); commute(r^*, s^*); relation(r); relation(s)\ \ confluent(r \ s)" -apply (unfold confluent_def) + unfolding confluent_def apply (rule rtrancl_Un_rtrancl [THEN subst], auto) apply (blast dest: diamond_Un intro: diamond_confluent [THEN confluentD]) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/ex/Limit.thy --- a/src/ZF/ex/Limit.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/ex/Limit.thy Tue Sep 27 17:54:20 2022 +0100 @@ -470,7 +470,7 @@ lemma matrix_chain_left: "\matrix(D,M); n \ nat\ \ chain(D,M`n)" -apply (unfold chain_def) + unfolding chain_def apply (auto intro: matrix_fun [THEN apply_type] matrix_in matrix_rel_0_1) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/ex/Ramsey.thy --- a/src/ZF/ex/Ramsey.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/ex/Ramsey.thy Tue Sep 27 17:54:20 2022 +0100 @@ -69,7 +69,7 @@ lemma Atleast_succD: "Atleast(succ(m),A) \ \x \ A. Atleast(m, A-{x})" -apply (unfold Atleast_def) + unfolding Atleast_def apply (blast dest: inj_is_fun [THEN apply_type] inj_succ_restrict) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/func.thy --- a/src/ZF/func.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/func.thy Tue Sep 27 17:54:20 2022 +0100 @@ -64,7 +64,7 @@ by (unfold apply_def function_def, blast) lemma apply_equality: "\\a,b\: f; f \ Pi(A,B)\ \ f`a = b" -apply (unfold Pi_def) + unfolding Pi_def apply (blast intro: function_apply_equality) done @@ -132,7 +132,7 @@ subsection\Lambda Abstraction\ lemma lamI: "a \ A \ \ (\x\A. b(x))" -apply (unfold lam_def) + unfolding lam_def apply (erule RepFunI) done @@ -304,7 +304,7 @@ by (unfold restrict_def, blast) lemma domain_restrict [simp]: "domain(restrict(f,C)) = domain(f) \ C" -apply (unfold restrict_def) + unfolding restrict_def apply (auto simp add: domain_def) done @@ -352,7 +352,7 @@ "\\f\S. \C D. f \ C->D; \f\S. \y\S. f<=y | y<=f\ \ \(S) \ domain(\(S)) -> range(\(S))" -apply (unfold Pi_def) + unfolding Pi_def apply (blast intro!: rel_Union function_Union) done @@ -468,7 +468,7 @@ done lemma update_idem: "\f`x = y; f \ Pi(A,B); x \ A\ \ f(x:=y) = f" -apply (unfold update_def) + unfolding update_def apply (simp add: domain_of_fun cons_absorb) apply (rule fun_extension) apply (best intro: apply_type if_type lam_type, assumption, simp) @@ -482,7 +482,7 @@ by (unfold update_def, simp) lemma update_type: "\f \ Pi(A,B); x \ A; y \ B(x)\ \ f(x:=y) \ Pi(A, B)" -apply (unfold update_def) + unfolding update_def apply (simp add: domain_of_fun cons_absorb apply_funtype lam_type) done @@ -539,7 +539,7 @@ by (blast intro: lam_type elim: Pi_lamE) lemma lam_mono: "A<=B \ Lambda(A,c) \ Lambda(B,c)" -apply (unfold lam_def) + unfolding lam_def apply (erule RepFun_mono) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/pair.thy --- a/src/ZF/pair.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/pair.thy Tue Sep 27 17:54:20 2022 +0100 @@ -46,7 +46,7 @@ lemmas Pair_inject2 = Pair_iff [THEN iffD1, THEN conjunct2] lemma Pair_not_0: "\a,b\ \ 0" -apply (unfold Pair_def) + unfolding Pair_def apply (blast elim: equalityE) done diff -r a642599ffdea -r 9fc34f76b4e8 src/ZF/upair.thy --- a/src/ZF/upair.thy Tue Sep 27 17:46:52 2022 +0100 +++ b/src/ZF/upair.thy Tue Sep 27 17:54:20 2022 +0100 @@ -66,7 +66,7 @@ subsection\Rules for Binary Intersection, Defined via \<^term>\Upair\\ lemma Int_iff [simp]: "c \ A \ B \ (c \ A \ c \ B)" -apply (unfold Int_def) + unfolding Int_def apply (blast intro: UpairI1 UpairI2 elim: UpairE) done @@ -104,7 +104,7 @@ subsection\Rules for \<^term>\cons\\ lemma cons_iff [simp]: "a \ cons(b,A) \ (a=b | a \ A)" -apply (unfold cons_def) + unfolding cons_def apply (blast intro: UpairI1 UpairI2 elim: UpairE) done @@ -152,7 +152,7 @@ lemma the_equality [intro]: "\P(a); \x. P(x) \ x=a\ \ (THE x. P(x)) = a" -apply (unfold the_def) + unfolding the_def apply (fast dest: subst) done @@ -171,7 +171,7 @@ (*If it's "undefined", it's zero!*) lemma the_0: "\ (\!x. P(x)) \ (THE x. P(x))=0" -apply (unfold the_def) + unfolding the_def apply (blast elim!: ReplaceE) done