# HG changeset patch # User paulson # Date 1331052387 0 # Node ID 95f1e700b712d2ef96bfca7fd71e67a1864f17a5 # Parent ff6b0c1087f27dc8b7dcda7384a3439e65dd456c mathematical symbols for Isabelle/ZF example theories diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/AC/AC15_WO6.thy --- a/src/ZF/AC/AC15_WO6.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/AC/AC15_WO6.thy Tue Mar 06 16:46:27 2012 +0000 @@ -42,11 +42,11 @@ "0\A ==> \B \ {cons(0,x*nat). x \ A}. ~Finite(B)" apply clarify apply (rule nat_not_Finite [THEN notE] ) -apply (subgoal_tac "x ~= 0") +apply (subgoal_tac "x \ 0") apply (blast intro: lepoll_Sigma [THEN lepoll_Finite])+ done -lemma lemma1: "[| Union(C)=A; a \ A |] ==> \B \ C. a \ B & B \ A" +lemma lemma1: "[| \(C)=A; a \ A |] ==> \B \ C. a \ B & B \ A" by fast lemma lemma2: @@ -55,7 +55,7 @@ lemma lemma3: "\B \ {cons(0, x*nat). x \ A}. pairwise_disjoint(f`B) & - sets_of_size_between(f`B, 2, n) & Union(f`B)=B + 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) @@ -104,7 +104,7 @@ lemma ex_fun_AC13_AC15: "[| \B \ {cons(0, x*nat). x \ A}. pairwise_disjoint(f`B) & - sets_of_size_between(f`B, 2, succ(n)) & Union(f`B)=B; + sets_of_size_between(f`B, 2, succ(n)) & \(f`B)=B; n \ nat |] ==> \f. \B \ A. f`B \ 0 & f`B \ B & f`B \ n" by (fast del: subsetI notI diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/AC/AC16_WO4.thy --- a/src/ZF/AC/AC16_WO4.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/AC/AC16_WO4.thy Tue Mar 06 16:46:27 2012 +0000 @@ -47,8 +47,8 @@ lemmas lepoll_paired = paired_eqpoll [THEN eqpoll_sym, THEN eqpoll_imp_lepoll]; -lemma lemma2: "\y R. well_ord(y,R) & x Int y = 0 & ~y \ z & ~Finite(y)" -apply (rule_tac x = "{{a,x}. a \ nat Un Hartog (z) }" in exI) +lemma lemma2: "\y R. well_ord(y,R) & x \ y = 0 & ~y \ z & ~Finite(y)" +apply (rule_tac x = "{{a,x}. a \ nat \ Hartog (z) }" in exI) apply (rule well_ord_Un [OF Ord_nat [THEN well_ord_Memrel] Ord_Hartog [THEN well_ord_Memrel], THEN exE]) apply (blast intro!: Ord_Hartog well_ord_Memrel well_ord_paired @@ -60,11 +60,11 @@ lepoll_paired [THEN lepoll_Finite]) done -lemma infinite_Un: "~Finite(B) ==> ~Finite(A Un B)" +lemma infinite_Un: "~Finite(B) ==> ~Finite(A \ B)" by (blast intro: subset_Finite) (* ********************************************************************** *) -(* There is a v \ s(u) such that k \ x Int y (in our case succ(k)) *) +(* There is a v \ s(u) such that k \ x \ y (in our case succ(k)) *) (* The idea of the proof is the following \ *) (* Suppose not, i.e. every element of s(u) has exactly k-1 elements of y *) (* Thence y is less than or equipollent to {v \ Pow(x). v \ n#-k} *) @@ -100,11 +100,11 @@ ordermap_bij [THEN exI [THEN eqpoll_def [THEN def_imp_iff, THEN iffD2]]] lemma cons_cons_subset: - "[| a \ y; b \ y-a; u \ x |] ==> cons(b, cons(u, a)) \ Pow(x Un y)" + "[| a \ y; b \ y-a; u \ x |] ==> cons(b, cons(u, a)) \ Pow(x \ y)" by fast lemma cons_cons_eqpoll: - "[| a \ k; a \ y; b \ y-a; u \ x; x Int y = 0 |] + "[| a \ k; a \ y; b \ y-a; u \ x; x \ y = 0 |] ==> cons(b, cons(u, a)) \ succ(succ(k))" by (fast intro!: cons_eqpoll_succ) @@ -124,7 +124,7 @@ lemma cons_eqE: "[| cons(x,a) = cons(y,a); x \ a |] ==> x = y " by (fast elim!: equalityE) -lemma eq_imp_Int_eq: "A = B ==> A Int C = B Int C" +lemma eq_imp_Int_eq: "A = B ==> A \ C = B \ C" by blast (* ********************************************************************** *) @@ -133,7 +133,7 @@ lemma eqpoll_sum_imp_Diff_lepoll_lemma [rule_format]: "[| k \ nat; m \ nat |] - ==> \A B. A \ k #+ m & k \ B & B \ A --> A-B \ m" + ==> \A B. A \ k #+ m & k \ B & B \ A \ A-B \ m" apply (induct_tac "k") apply (simp add: add_0) apply (blast intro: eqpoll_imp_lepoll lepoll_trans @@ -162,7 +162,7 @@ lemma eqpoll_sum_imp_Diff_eqpoll_lemma [rule_format]: "[| k \ nat; m \ nat |] - ==> \A B. A \ k #+ m & k \ B & B \ A --> A-B \ m" + ==> \A B. A \ k #+ m & k \ B & B \ A \ A-B \ m" apply (induct_tac "k") apply (force dest!: eqpoll_sym [THEN eqpoll_imp_lepoll, THEN lepoll_0_is_0]) apply (intro allI impI) @@ -193,27 +193,27 @@ lemma subsets_lepoll_succ: "n \ nat ==> {z \ Pow(y). z \ succ(n)} = - {z \ Pow(y). z \ n} Un {z \ Pow(y). z \ succ(n)}" + {z \ Pow(y). z \ n} \ {z \ Pow(y). z \ succ(n)}" by (blast intro: leI le_imp_lepoll nat_into_Ord lepoll_trans eqpoll_imp_lepoll dest!: lepoll_succ_disj) lemma Int_empty: - "n \ nat ==> {z \ Pow(y). z \ n} Int {z \ Pow(y). z \ succ(n)} = 0" + "n \ nat ==> {z \ Pow(y). z \ n} \ {z \ Pow(y). z \ succ(n)} = 0" by (blast intro: eqpoll_sym [THEN eqpoll_imp_lepoll, THEN lepoll_trans] succ_lepoll_natE) locale AC16 = fixes x and y and k and l and m and t_n and R and MM and LL and GG and s defines k_def: "k == succ(l)" - and MM_def: "MM == {v \ t_n. succ(k) \ v Int y}" - and LL_def: "LL == {v Int y. v \ MM}" + and MM_def: "MM == {v \ t_n. succ(k) \ v \ y}" + and LL_def: "LL == {v \ y. v \ MM}" and GG_def: "GG == \v \ LL. (THE w. w \ MM & v \ w) - v" - and s_def: "s(u) == {v \ t_n. u \ v & k \ v Int y}" - assumes all_ex: "\z \ {z \ Pow(x Un y) . z \ succ(k)}. + and s_def: "s(u) == {v \ t_n. u \ v & k \ v \ y}" + assumes all_ex: "\z \ {z \ Pow(x \ y) . z \ succ(k)}. \! w. w \ t_n & z \ w " - and disjoint[iff]: "x Int y = 0" - and "includes": "t_n \ {v \ Pow(x Un y). v \ succ(k #+ m)}" + and disjoint[iff]: "x \ y = 0" + and "includes": "t_n \ {v \ Pow(x \ y). v \ succ(k #+ m)}" and WO_R[iff]: "well_ord(y,R)" and lnat[iff]: "l \ nat" and mnat[iff]: "m \ nat" @@ -274,16 +274,16 @@ done lemma (in AC16) the_eq_cons: - "[| \v \ s(u). succ(l) \ v Int y; + "[| \v \ s(u). succ(l) \ v \ y; l \ a; a \ y; b \ y - a; u \ x |] - ==> (THE c. c \ s(u) & a \ c & b \ c) Int y = cons(b, a)" + ==> (THE c. c \ s(u) & a \ c & b \ c) \ y = cons(b, a)" apply (frule ex1_superset_a [THEN theI], assumption+) apply (rule set_eq_cons) apply (fast+) done lemma (in AC16) y_lepoll_subset_s: - "[| \v \ s(u). succ(l) \ v Int y; + "[| \v \ s(u). succ(l) \ v \ y; l \ a; a \ y; u \ x |] ==> y \ {v \ s(u). a \ v}" apply (rule Diff_Finite_eqpoll [THEN eqpoll_sym, THEN eqpoll_imp_lepoll, @@ -310,14 +310,14 @@ by (blast dest: disjoint [THEN equalityD1, THEN subsetD, OF IntI]) lemma (in AC16) w_Int_eq_w_Diff: - "w \ x Un y ==> w Int (x - {u}) = w - cons(u, w Int y)" + "w \ x \ y ==> w \ (x - {u}) = w - cons(u, w \ y)" by blast lemma (in AC16) w_Int_eqpoll_m: "[| w \ {v \ s(u). a \ v}; l \ a; u \ x; - \v \ s(u). succ(l) \ v Int y |] - ==> w Int (x - {u}) \ m" + \v \ s(u). succ(l) \ v \ y |] + ==> w \ (x - {u}) \ m" apply (erule CollectE) apply (subst w_Int_eq_w_Diff) apply (fast dest!: s_subset [THEN subsetD] @@ -341,7 +341,7 @@ done lemma (in AC16) cons_cons_in: - "[| z \ xa Int (x - {u}); l \ a; a \ y; u \ x |] + "[| 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) @@ -349,9 +349,9 @@ done lemma (in AC16) subset_s_lepoll_w: - "[| \v \ s(u). succ(l) \ v Int y; a \ y; l \ a; u \ x |] + "[| \v \ s(u). succ(l) \ v \ y; a \ y; l \ a; u \ x |] ==> {v \ s(u). a \ v} \ {v \ Pow(x). v \ m}" -apply (rule_tac f3 = "\w \ {v \ s (u) . a \ v}. w Int (x - {u})" +apply (rule_tac f3 = "\w \ {v \ s (u) . a \ v}. w \ (x - {u})" in exI [THEN lepoll_def [THEN def_imp_iff, THEN iffD2]]) apply (simp add: inj_def) apply (intro conjI lam_type CollectI) @@ -425,11 +425,11 @@ (* The union of appropriate values is the whole x *) (* ********************************************************************** *) -lemma (in AC16) Int_in_LL: "w \ MM ==> w Int y \ LL" +lemma (in AC16) Int_in_LL: "w \ MM ==> w \ y \ LL" by (unfold LL_def, fast) lemma (in AC16) in_LL_eq_Int: - "v \ LL ==> v = (THE x. x \ MM & v \ x) Int y" + "v \ LL ==> v = (THE x. x \ MM & v \ x) \ y" apply (unfold LL_def, clarify) apply (subst unique_superset_in_MM [THEN the_equality2]) apply (auto simp add: Int_in_LL) @@ -439,7 +439,7 @@ by (erule unique_superset_in_MM [THEN theI, THEN conjunct1]) lemma (in AC16) the_in_MM_subset: - "v \ LL ==> (THE x. x \ MM & v \ x) \ x Un y" + "v \ LL ==> (THE x. x \ MM & v \ x) \ x \ y" apply (drule unique_superset1) apply (unfold MM_def) apply (fast dest!: unique_superset1 "includes" [THEN subsetD]) @@ -468,9 +468,9 @@ done -lemma (in AC16) exists_proper_in_s: "u \ x ==> \v \ s(u). succ(k) \ v Int y" +lemma (in AC16) exists_proper_in_s: "u \ x ==> \v \ s(u). succ(k) \ v \ y" apply (rule ccontr) -apply (subgoal_tac "\v \ s (u) . k \ v Int y") +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) apply (insert all_ex "includes" lnat) @@ -568,7 +568,7 @@ apply (rule lemma1, assumption+) apply (cut_tac lemma2) apply (elim exE conjE) -apply (erule_tac x = "A Un y" in allE) +apply (erule_tac x = "A \ y" in allE) apply (frule infinite_Un, drule mp, assumption) apply (erule zero_lt_natE, assumption, clarify) apply (blast intro: AC16.conclusion [OF AC16.intro]) diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/AC/AC16_lemmas.thy --- a/src/ZF/AC/AC16_lemmas.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/AC/AC16_lemmas.thy Tue Mar 06 16:46:27 2012 +0000 @@ -11,7 +11,7 @@ lemma cons_Diff_eq: "a\A ==> cons(a,A)-{a}=A" by fast -lemma nat_1_lepoll_iff: "1\X <-> (\x. x \ X)" +lemma nat_1_lepoll_iff: "1\X \ (\x. x \ X)" apply (unfold lepoll_def) apply (rule iffI) apply (fast intro: inj_is_fun [THEN apply_type]) @@ -20,7 +20,7 @@ apply (fast intro!: lam_injective) done -lemma eqpoll_1_iff_singleton: "X\1 <-> (\x. X={x})" +lemma eqpoll_1_iff_singleton: "X\1 \ (\x. X={x})" apply (rule iffI) apply (erule eqpollE) apply (drule nat_1_lepoll_iff [THEN iffD1]) @@ -79,7 +79,7 @@ apply (simp, blast intro: InfCard_Least_in) done -lemma set_of_Ord_succ_Union: "(\y \ z. Ord(y)) ==> z \ succ(Union(z))" +lemma set_of_Ord_succ_Union: "(\y \ z. Ord(y)) ==> z \ succ(\(z))" apply (rule subsetI) apply (case_tac "\y \ z. y \ x", blast ) apply (simp, erule bexE) @@ -91,22 +91,22 @@ by (fast elim!: mem_irrefl) lemma succ_Union_not_mem: - "(!!y. y \ z ==> Ord(y)) ==> succ(Union(z)) \ z" + "(!!y. y \ z ==> Ord(y)) ==> succ(\(z)) \ z" apply (rule set_of_Ord_succ_Union [THEN subset_not_mem], blast) done lemma Union_cons_eq_succ_Union: - "Union(cons(succ(Union(z)),z)) = succ(Union(z))" + "\(cons(succ(\(z)),z)) = succ(\(z))" by fast -lemma Un_Ord_disj: "[| Ord(i); Ord(j) |] ==> i Un j = i | i Un j = j" +lemma Un_Ord_disj: "[| Ord(i); Ord(j) |] ==> i \ j = i | i \ j = j" by (fast dest!: le_imp_subset elim: Ord_linear_le) -lemma Union_eq_Un: "x \ X ==> Union(X) = x Un Union(X-{x})" +lemma Union_eq_Un: "x \ X ==> \(X) = x \ \(X-{x})" by fast lemma Union_in_lemma [rule_format]: - "n \ nat ==> \z. (\y \ z. Ord(y)) & z\n & z\0 --> Union(z) \ z" + "n \ nat ==> \z. (\y \ z. Ord(y)) & z\n & z\0 \ \(z) \ z" apply (induct_tac "n") apply (fast dest!: eqpoll_imp_lepoll [THEN lepoll_0_is_0]) apply (intro allI impI) @@ -126,11 +126,11 @@ apply (drule Un_Ord_disj, assumption, auto) done -lemma Union_in: "[| \x \ z. Ord(x); z\n; z\0; n \ nat |] ==> Union(z) \ z" +lemma Union_in: "[| \x \ z. Ord(x); z\n; z\0; n \ nat |] ==> \(z) \ z" by (blast intro: Union_in_lemma) lemma succ_Union_in_x: - "[| InfCard(x); z \ Pow(x); z\n; n \ nat |] ==> succ(Union(z)) \ x" + "[| InfCard(x); z \ Pow(x); z\n; n \ nat |] ==> succ(\(z)) \ x" apply (rule Limit_has_succ [THEN ltE]) prefer 3 apply assumption apply (erule InfCard_is_Limit) @@ -145,9 +145,9 @@ "[| InfCard(x); n \ nat |] ==> {y \ Pow(x). y\succ(n)} \ {y \ Pow(x). y\succ(succ(n))}" apply (unfold lepoll_def) -apply (rule_tac x = "\z \ {y\Pow(x). y\succ(n)}. cons(succ(Union(z)), z)" +apply (rule_tac x = "\z \ {y\Pow(x). y\succ(n)}. cons(succ(\(z)), z)" in exI) -apply (rule_tac d = "%z. z-{Union (z) }" in lam_injective) +apply (rule_tac d = "%z. z-{\(z) }" in lam_injective) apply (blast intro!: succ_Union_in_x succ_Union_not_mem intro: cons_eqpoll_succ Ord_in_Ord dest!: InfCard_is_Card [THEN Card_is_Ord]) diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/AC/AC17_AC1.thy --- a/src/ZF/AC/AC17_AC1.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/AC/AC17_AC1.thy Tue Mar 06 16:46:27 2012 +0000 @@ -75,7 +75,7 @@ apply (erule swap) apply (rule allI) apply (erule swap) -apply (rule_tac x = "Union (A)" in exI) +apply (rule_tac x = "\(A)" in exI) apply (blast intro: lam_type) done @@ -136,7 +136,7 @@ AC1 ==> AC2 ==> AC1 AC1 ==> AC4 ==> AC3 ==> AC1 AC4 ==> AC5 ==> AC4 - AC1 <-> AC6 + AC1 \ AC6 ************************************************************************* *) (* ********************************************************************** *) @@ -144,7 +144,7 @@ (* ********************************************************************** *) lemma AC1_AC2_aux1: - "[| f:(\ X \ A. X); B \ A; 0\A |] ==> {f`B} \ B Int {f`C. C \ A}" + "[| f:(\ X \ A. X); B \ A; 0\A |] ==> {f`B} \ B \ {f`C. C \ A}" by (fast elim!: apply_type) lemma AC1_AC2_aux2: @@ -169,16 +169,16 @@ lemma AC2_AC1_aux1: "0\A ==> 0 \ {B*{B}. B \ A}" by (fast dest!: sym [THEN Sigma_empty_iff [THEN iffD1]]) -lemma AC2_AC1_aux2: "[| X*{X} Int C = {y}; X \ A |] - ==> (THE y. X*{X} Int C = {y}): X*A" +lemma AC2_AC1_aux2: "[| X*{X} \ C = {y}; X \ A |] + ==> (THE y. X*{X} \ C = {y}): X*A" apply (rule subst_elem [of y]) apply (blast elim!: equalityE) apply (auto simp add: singleton_eq_iff) done lemma AC2_AC1_aux3: - "\D \ {E*{E}. E \ A}. \y. D Int C = {y} - ==> (\x \ A. fst(THE z. (x*{x} Int C = {z}))) \ (\ X \ A. X)" + "\D \ {E*{E}. E \ A}. \y. D \ C = {y} + ==> (\x \ A. fst(THE z. (x*{x} \ C = {z}))) \ (\ X \ A. X)" apply (rule lam_type) apply (drule bspec, blast) apply (blast intro: AC2_AC1_aux2 fst_type) @@ -212,7 +212,7 @@ (* AC4 ==> AC3 *) (* ********************************************************************** *) -lemma AC4_AC3_aux1: "f \ A->B ==> (\z \ A. {z}*f`z) \ A*Union(B)" +lemma AC4_AC3_aux1: "f \ A->B ==> (\z \ A. {z}*f`z) \ A*\(B)" by (fast dest!: apply_type) lemma AC4_AC3_aux2: "domain(\z \ A. {z}*f(z)) = {a \ A. f(a)\0}" @@ -292,10 +292,10 @@ (* ********************************************************************** *) -(* AC1 <-> AC6 *) +(* AC1 \ AC6 *) (* ********************************************************************** *) -lemma AC1_iff_AC6: "AC1 <-> AC6" +lemma AC1_iff_AC6: "AC1 \ AC6" by (unfold AC1_def AC6_def, blast) end diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/AC/AC18_AC19.thy --- a/src/ZF/AC/AC18_AC19.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/AC/AC18_AC19.thy Tue Mar 06 16:46:27 2012 +0000 @@ -10,7 +10,7 @@ definition uu :: "i => i" where - "uu(a) == {c Un {0}. c \ a}" + "uu(a) == {c \ {0}. c \ a}" (* ********************************************************************** *) @@ -23,7 +23,7 @@ by (rule lam_type, drule apply_type, auto) lemma lemma_AC18: - "[| \A. 0 \ A --> (\f. f \ (\ X \ A. X)); A \ 0 |] + "[| \A. 0 \ A \ (\f. f \ (\ X \ A. X)); A \ 0 |] ==> (\a \ A. \b \ B(a). X(a, b)) \ (\f \ \ a \ A. B(a). \a \ A. X(a, f`a))" apply (rule subsetI) @@ -61,7 +61,7 @@ apply (blast dest!: sym [THEN RepFun_eq_0_iff [THEN iffD1]]) done -lemma lemma1_1: "[|c \ a; x = c Un {0}; x \ a |] ==> x - {0} \ a" +lemma lemma1_1: "[|c \ a; x = c \ {0}; x \ a |] ==> x - {0} \ a" apply clarify apply (rule subst_elem, assumption) apply (fast elim: notE subst_elem) diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/AC/AC7_AC9.thy --- a/src/ZF/AC/AC7_AC9.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/AC/AC7_AC9.thy Tue Mar 06 16:46:27 2012 +0000 @@ -15,13 +15,13 @@ (* - Sigma_fun_space_eqpoll *) (* ********************************************************************** *) -lemma Sigma_fun_space_not0: "[| 0\A; B \ A |] ==> (nat->Union(A)) * B \ 0" +lemma Sigma_fun_space_not0: "[| 0\A; B \ A |] ==> (nat->\(A)) * B \ 0" by (blast dest!: Sigma_empty_iff [THEN iffD1] Union_empty_iff [THEN iffD1]) lemma inj_lemma: - "C \ A ==> (\g \ (nat->Union(A))*C. + "C \ A ==> (\g \ (nat->\(A))*C. (\n \ nat. if(n=0, snd(g), fst(g)`(n #- 1)))) - \ inj((nat->Union(A))*C, (nat->Union(A)) ) " + \ inj((nat->\(A))*C, (nat->\(A)) ) " apply (unfold inj_def) apply (rule CollectI) apply (fast intro!: lam_type if_type apply_type fst_type snd_type, auto) @@ -31,7 +31,7 @@ done lemma Sigma_fun_space_eqpoll: - "[| C \ A; 0\A |] ==> (nat->Union(A)) * C \ (nat->Union(A))" + "[| C \ A; 0\A |] ==> (nat->\(A)) * C \ (nat->\(A))" apply (rule eqpollI) apply (simp add: lepoll_def) apply (fast intro!: inj_lemma) @@ -62,10 +62,10 @@ done lemma AC7_AC6_lemma1: - "(\ B \ {(nat->Union(A))*C. C \ A}. B) \ 0 ==> (\ B \ A. B) \ 0" + "(\ B \ {(nat->\(A))*C. C \ A}. B) \ 0 ==> (\ B \ A. B) \ 0" by (fast intro!: equals0I lemma1_1 lemma1_2) -lemma AC7_AC6_lemma2: "0 \ A ==> 0 \ {(nat -> Union(A)) * C. C \ A}" +lemma AC7_AC6_lemma2: "0 \ A ==> 0 \ {(nat -> \(A)) * C. C \ A}" by (blast dest: Sigma_fun_space_not0) lemma AC7_AC6: "AC7 ==> AC6" @@ -125,8 +125,8 @@ (* AC9 ==> AC1 *) (* The idea of this proof comes from "Equivalents of the Axiom of Choice" *) (* by Rubin & Rubin. But (x * y) is not necessarily equipollent to *) -(* (x * y) Un {0} when y is a set of total functions acting from nat to *) -(* Union(A) -- therefore we have used the set (y * nat) instead of y. *) +(* (x * y) \ {0} when y is a set of total functions acting from nat to *) +(* \(A) -- therefore we have used the set (y * nat) instead of y. *) (* ********************************************************************** *) lemma snd_lepoll_SigmaI: "b \ B \ X \ B \ X" @@ -134,13 +134,13 @@ prod_commute_eqpoll) lemma nat_lepoll_lemma: - "[|0 \ A; B \ A|] ==> nat \ ((nat \ Union(A)) \ B) \ nat" + "[|0 \ A; B \ A|] ==> nat \ ((nat \ \(A)) \ B) \ nat" by (blast dest: Sigma_fun_space_not0 intro: snd_lepoll_SigmaI) lemma AC9_AC1_lemma1: "[| 0\A; A\0; - C = {((nat->Union(A))*B)*nat. B \ A} Un - {cons(0,((nat->Union(A))*B)*nat). B \ A}; + C = {((nat->\(A))*B)*nat. B \ A} \ + {cons(0,((nat->\(A))*B)*nat). B \ A}; B1 \ C; B2 \ C |] ==> B1 \ B2" by (blast intro!: nat_lepoll_lemma Sigma_fun_space_eqpoll @@ -149,8 +149,8 @@ intro: eqpoll_trans eqpoll_sym ) lemma AC9_AC1_lemma2: - "\B1 \ {(F*B)*N. B \ A} Un {cons(0,(F*B)*N). B \ A}. - \B2 \ {(F*B)*N. B \ A} Un {cons(0,(F*B)*N). B \ A}. + "\B1 \ {(F*B)*N. B \ A} \ {cons(0,(F*B)*N). B \ A}. + \B2 \ {(F*B)*N. B \ A} \ {cons(0,(F*B)*N). B \ A}. f` \ bij(B1, B2) ==> (\B \ A. snd(fst((f`)`0))) \ (\ X \ A. X)" apply (intro lam_type snd_type fst_type) @@ -162,7 +162,7 @@ apply (unfold AC1_def AC9_def) apply (intro allI impI) apply (erule allE) -apply (case_tac "A~=0") +apply (case_tac "A\0") apply (blast dest: AC9_AC1_lemma1 AC9_AC1_lemma2, force) done diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/AC/AC_Equiv.thy --- a/src/ZF/AC/AC_Equiv.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/AC/AC_Equiv.thy Tue Mar 06 16:46:27 2012 +0000 @@ -38,16 +38,16 @@ & (\bb m))" definition - "WO7 == \A. Finite(A) <-> (\R. well_ord(A,R) --> well_ord(A,converse(R)))" + "WO7 == \A. Finite(A) \ (\R. well_ord(A,R) \ well_ord(A,converse(R)))" definition - "WO8 == \A. (\f. f \ (\ X \ A. X)) --> (\R. well_ord(A,R))" + "WO8 == \A. (\f. f \ (\ X \ A. X)) \ (\R. well_ord(A,R))" definition (* Auxiliary concepts needed below *) pairwise_disjoint :: "i => o" where - "pairwise_disjoint(A) == \A1 \ A. \A2 \ A. A1 Int A2 \ 0 --> A1=A2" + "pairwise_disjoint(A) == \A1 \ A. \A2 \ A. A1 \ A2 \ 0 \ A1=A2" definition sets_of_size_between :: "[i, i, i] => o" where @@ -59,60 +59,60 @@ "AC0 == \A. \f. f \ (\ X \ Pow(A)-{0}. X)" definition - "AC1 == \A. 0\A --> (\f. f \ (\ X \ A. X))" + "AC1 == \A. 0\A \ (\f. f \ (\ X \ A. X))" definition "AC2 == \A. 0\A & pairwise_disjoint(A) - --> (\C. \B \ A. \y. B Int C = {y})" + \ (\C. \B \ A. \y. B \ C = {y})" definition "AC3 == \A B. \f \ A->B. \g. g \ (\ x \ {a \ A. f`a\0}. f`x)" definition - "AC4 == \R A B. (R \ A*B --> (\f. f \ (\ x \ domain(R). R``{x})))" + "AC4 == \R A B. (R \ A*B \ (\f. f \ (\ x \ domain(R). R``{x})))" definition "AC5 == \A B. \f \ A->B. \g \ range(f)->A. \x \ domain(g). f`(g`x) = x" definition - "AC6 == \A. 0\A --> (\ B \ A. B)\0" + "AC6 == \A. 0\A \ (\ B \ A. B)\0" definition - "AC7 == \A. 0\A & (\B1 \ A. \B2 \ A. B1\B2) --> (\ B \ A. B) \ 0" + "AC7 == \A. 0\A & (\B1 \ A. \B2 \ A. B1\B2) \ (\ B \ A. B) \ 0" definition "AC8 == \A. (\B \ A. \B1 B2. B= & B1\B2) - --> (\f. \B \ A. f`B \ bij(fst(B),snd(B)))" + \ (\f. \B \ A. f`B \ bij(fst(B),snd(B)))" definition - "AC9 == \A. (\B1 \ A. \B2 \ A. B1\B2) --> + "AC9 == \A. (\B1 \ A. \B2 \ A. B1\B2) \ (\f. \B1 \ A. \B2 \ A. f` \ bij(B1,B2))" definition - "AC10(n) == \A. (\B \ A. ~Finite(B)) --> + "AC10(n) == \A. (\B \ A. ~Finite(B)) \ (\f. \B \ A. (pairwise_disjoint(f`B) & - sets_of_size_between(f`B, 2, succ(n)) & Union(f`B)=B))" + sets_of_size_between(f`B, 2, succ(n)) & \(f`B)=B))" definition "AC11 == \n \ nat. 1\n & AC10(n)" definition - "AC12 == \A. (\B \ A. ~Finite(B)) --> + "AC12 == \A. (\B \ A. ~Finite(B)) \ (\n \ nat. 1\n & (\f. \B \ A. (pairwise_disjoint(f`B) & - sets_of_size_between(f`B, 2, succ(n)) & Union(f`B)=B)))" + sets_of_size_between(f`B, 2, succ(n)) & \(f`B)=B)))" definition - "AC13(m) == \A. 0\A --> (\f. \B \ A. f`B\0 & f`B \ B & f`B \ m)" + "AC13(m) == \A. 0\A \ (\f. \B \ A. f`B\0 & f`B \ B & f`B \ m)" definition "AC14 == \m \ nat. 1\m & AC13(m)" definition - "AC15 == \A. 0\A --> + "AC15 == \A. 0\A \ (\m \ nat. 1\m & (\f. \B \ A. f`B\0 & f`B \ B & f`B \ m))" definition "AC16(n, k) == - \A. ~Finite(A) --> + \A. ~Finite(A) \ (\T. T \ {X \ Pow(A). X\succ(n)} & (\X \ {X \ Pow(A). X\succ(k)}. \! Y. Y \ T & X \ Y))" @@ -121,13 +121,13 @@ \f \ Pow(A)-{0} -> A. f`(g`f) \ g`f" locale AC18 = - assumes AC18: "A\0 & (\a \ A. B(a) \ 0) --> + assumes AC18: "A\0 & (\a \ A. B(a) \ 0) \ ((\a \ A. \b \ B(a). X(a,b)) = (\f \ \ a \ A. B(a). \a \ A. X(a, f`a)))" --"AC18 cannot be expressed within the object-logic" definition - "AC19 == \A. A\0 & 0\A --> ((\a \ A. \b \ a. b) = + "AC19 == \A. A\0 & 0\A \ ((\a \ A. \b \ a. b) = (\f \ (\ B \ A. B). \a \ A. f`a))" @@ -137,7 +137,7 @@ (* ********************************************************************** *) (* lemma for ordertype_Int *) -lemma rvimage_id: "rvimage(A,id(A),r) = r Int A*A" +lemma rvimage_id: "rvimage(A,id(A),r) = r \ A*A" apply (unfold rvimage_def) apply (rule equalityI, safe) apply (drule_tac P = "%a. :r" in id_conv [THEN subst], @@ -148,7 +148,7 @@ (* used only in Hartog.ML *) lemma ordertype_Int: - "well_ord(A,r) ==> ordertype(A, r Int A*A) = ordertype(A,r)" + "well_ord(A,r) ==> ordertype(A, r \ A*A) = ordertype(A,r)" apply (rule_tac P = "%a. ordertype (A,a) =ordertype (A,r) " in rvimage_id [THEN subst]) apply (erule id_bij [THEN bij_ordertype_vimage]) done @@ -191,11 +191,11 @@ (* ********************************************************************** *) lemma first_in_B: - "[| well_ord(Union(A),r); 0\A; B \ A |] ==> (THE b. first(b,B,r)) \ B" + "[| well_ord(\(A),r); 0\A; B \ A |] ==> (THE b. first(b,B,r)) \ B" by (blast dest!: well_ord_imp_ex1_first [THEN theI, THEN first_def [THEN def_imp_iff, THEN iffD1]]) -lemma ex_choice_fun: "[| well_ord(Union(A), R); 0\A |] ==> \f. f:(\ X \ A. X)" +lemma ex_choice_fun: "[| well_ord(\(A), R); 0\A |] ==> \f. f:(\ X \ A. X)" by (fast elim!: first_in_B intro!: lam_type) lemma ex_choice_fun_Pow: "well_ord(A, R) ==> \f. f:(\ X \ Pow(A)-{0}. X)" diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/AC/Cardinal_aux.thy --- a/src/ZF/AC/Cardinal_aux.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/AC/Cardinal_aux.thy Tue Mar 06 16:46:27 2012 +0000 @@ -20,13 +20,13 @@ (* j=|A| *) lemma lepoll_imp_ex_le_eqpoll: - "[| A \ i; Ord(i) |] ==> \j. j le i & A \ j" -by (blast intro!: lepoll_cardinal_le well_ord_Memrel + "[| A \ i; Ord(i) |] ==> \j. j \ i & A \ j" +by (blast intro!: lepoll_cardinal_le well_ord_Memrel well_ord_cardinal_eqpoll [THEN eqpoll_sym] dest: lepoll_well_ord) (* j=|A| *) -lemma lesspoll_imp_ex_lt_eqpoll: +lemma lesspoll_imp_ex_lt_eqpoll: "[| A \ i; Ord(i) |] ==> \j. j j" by (unfold lesspoll_def, blast dest!: lepoll_imp_ex_le_eqpoll elim!: leE) @@ -34,41 +34,41 @@ apply (unfold InfCard_def) apply (rule conjI) apply (rule Card_cardinal) -apply (rule Card_nat +apply (rule Card_nat [THEN Card_def [THEN def_imp_iff, THEN iffD1, THEN ssubst]]) -- "rewriting would loop!" -apply (rule well_ord_Memrel [THEN well_ord_lepoll_imp_Card_le], assumption) +apply (rule well_ord_Memrel [THEN well_ord_lepoll_imp_Card_le], assumption) apply (rule nat_le_infinite_Ord [THEN le_imp_lepoll], assumption+) done text{*An alternative and more general proof goes like this: A and B are both -well-ordered (because they are injected into an ordinal), either A lepoll B -or B lepoll A. Also both are equipollent to their cardinalities, so -(if A and B are infinite) then A Un B lepoll |A|+|B| = max(|A|,|B|) lepoll i. +well-ordered (because they are injected into an ordinal), either @{term"A \ B"} +or @{term"B \ A"}. Also both are equipollent to their cardinalities, so +(if A and B are infinite) then @{term"A \ B \ |A\B| \ max(|A|,|B|) \ i"}. In fact, the correctly strengthened version of this theorem appears below.*} lemma Un_lepoll_Inf_Ord_weak: "[|A \ i; B \ i; \ Finite(i); Ord(i)|] ==> A \ B \ i" apply (rule Un_lepoll_sum [THEN lepoll_trans]) apply (rule lepoll_imp_sum_lepoll_prod [THEN lepoll_trans]) -apply (erule eqpoll_trans [THEN eqpoll_imp_lepoll]) -apply (erule eqpoll_sym) -apply (rule subset_imp_lepoll [THEN lepoll_trans, THEN lepoll_trans]) -apply (rule nat_2I [THEN OrdmemD], rule Ord_nat) -apply (rule nat_le_infinite_Ord [THEN le_imp_lepoll], assumption+) -apply (erule eqpoll_sym [THEN eqpoll_imp_lepoll]) +apply (erule eqpoll_trans [THEN eqpoll_imp_lepoll]) +apply (erule eqpoll_sym) +apply (rule subset_imp_lepoll [THEN lepoll_trans, THEN lepoll_trans]) +apply (rule nat_2I [THEN OrdmemD], rule Ord_nat) +apply (rule nat_le_infinite_Ord [THEN le_imp_lepoll], assumption+) +apply (erule eqpoll_sym [THEN eqpoll_imp_lepoll]) apply (erule prod_eqpoll_cong [THEN eqpoll_imp_lepoll, THEN lepoll_trans], assumption) -apply (rule eqpoll_imp_lepoll) -apply (rule well_ord_Memrel [THEN well_ord_InfCard_square_eq], assumption) -apply (rule Inf_Ord_imp_InfCard_cardinal, assumption+) +apply (rule eqpoll_imp_lepoll) +apply (rule well_ord_Memrel [THEN well_ord_InfCard_square_eq], assumption) +apply (rule Inf_Ord_imp_InfCard_cardinal, assumption+) done lemma Un_eqpoll_Inf_Ord: - "[| A \ i; B \ i; ~Finite(i); Ord(i) |] ==> A Un B \ i" + "[| A \ i; B \ i; ~Finite(i); Ord(i) |] ==> A \ B \ i" apply (rule eqpollI) -apply (blast intro: Un_lepoll_Inf_Ord_weak) -apply (erule eqpoll_sym [THEN eqpoll_imp_lepoll, THEN lepoll_trans]) -apply (rule Un_upper1 [THEN subset_imp_lepoll]) +apply (blast intro: Un_lepoll_Inf_Ord_weak) +apply (erule eqpoll_sym [THEN eqpoll_imp_lepoll, THEN lepoll_trans]) +apply (rule Un_upper1 [THEN subset_imp_lepoll]) done schematic_lemma paired_bij: "?f \ bij({{y,z}. y \ x}, x)" @@ -79,19 +79,19 @@ lemma paired_eqpoll: "{{y,z}. y \ x} \ x" by (unfold eqpoll_def, fast intro!: paired_bij) -lemma ex_eqpoll_disjoint: "\B. B \ A & B Int C = 0" +lemma ex_eqpoll_disjoint: "\B. B \ A & B \ C = 0" by (fast intro!: paired_eqpoll equals0I elim: mem_asym) (*Finally we reach this result. Surely there's a simpler proof, as sketched above?*) lemma Un_lepoll_Inf_Ord: - "[| A \ i; B \ i; ~Finite(i); Ord(i) |] ==> A Un B \ i" + "[| A \ i; B \ i; ~Finite(i); Ord(i) |] ==> A \ B \ i" apply (rule_tac A1 = i and C1 = i in ex_eqpoll_disjoint [THEN exE]) apply (erule conjE) -apply (drule lepoll_trans) +apply (drule lepoll_trans) apply (erule eqpoll_sym [THEN eqpoll_imp_lepoll]) apply (rule Un_lepoll_Un [THEN lepoll_trans], (assumption+)) -apply (blast intro: eqpoll_refl Un_eqpoll_Inf_Ord eqpoll_imp_lepoll) +apply (blast intro: eqpoll_refl Un_eqpoll_Inf_Ord eqpoll_imp_lepoll) done lemma Least_in_Ord: "[| P(i); i \ j; Ord(j) |] ==> (LEAST i. P(i)) \ j" @@ -103,14 +103,14 @@ done lemma Diff_first_lepoll: - "[| well_ord(x,r); y \ x; y \ succ(n); n \ nat |] + "[| well_ord(x,r); y \ x; y \ succ(n); n \ nat |] ==> y - {THE b. first(b,y,r)} \ n" -apply (case_tac "y=0", simp add: empty_lepollI) +apply (case_tac "y=0", simp add: empty_lepollI) apply (fast intro!: Diff_sing_lepoll the_first_in) done lemma UN_subset_split: - "(\x \ X. P(x)) \ (\x \ X. P(x)-Q(x)) Un (\x \ X. Q(x))" + "(\x \ X. P(x)) \ (\x \ X. P(x)-Q(x)) \ (\x \ X. Q(x))" by blast lemma UN_sing_lepoll: "Ord(a) ==> (\x \ a. {P(x)}) \ a" @@ -122,14 +122,14 @@ done lemma UN_fun_lepoll_lemma [rule_format]: - "[| well_ord(T, R); ~Finite(a); Ord(a); n \ nat |] - ==> \f. (\b \ a. f`b \ n & f`b \ T) --> (\b \ a. f`b) \ a" + "[| well_ord(T, R); ~Finite(a); Ord(a); n \ nat |] + ==> \f. (\b \ a. f`b \ n & f`b \ T) \ (\b \ a. f`b) \ a" apply (induct_tac "n") apply (rule allI) apply (rule impI) apply (rule_tac b = "\b \ a. f`b" in subst) apply (rule_tac [2] empty_lepollI) -apply (rule equals0I [symmetric], clarify) +apply (rule equals0I [symmetric], clarify) apply (fast dest: lepoll_0_is_0 [THEN subst]) apply (rule allI) apply (rule impI) @@ -137,19 +137,19 @@ apply (erule impE, simp) apply (fast intro!: Diff_first_lepoll, simp) apply (rule UN_subset_split [THEN subset_imp_lepoll, THEN lepoll_trans]) -apply (fast intro: Un_lepoll_Inf_Ord UN_sing_lepoll) +apply (fast intro: Un_lepoll_Inf_Ord UN_sing_lepoll) done lemma UN_fun_lepoll: - "[| \b \ a. f`b \ n & f`b \ T; well_ord(T, R); + "[| \b \ a. f`b \ n & f`b \ T; well_ord(T, R); ~Finite(a); Ord(a); n \ nat |] ==> (\b \ a. f`b) \ a" -by (blast intro: UN_fun_lepoll_lemma) +by (blast intro: UN_fun_lepoll_lemma) lemma UN_lepoll: - "[| \b \ a. F(b) \ n & F(b) \ T; well_ord(T, R); - ~Finite(a); Ord(a); n \ nat |] + "[| \b \ a. F(b) \ n & F(b) \ T; well_ord(T, R); + ~Finite(a); Ord(a); n \ nat |] ==> (\b \ a. F(b)) \ a" -apply (rule rev_mp) +apply (rule rev_mp) apply (rule_tac f="\b \ a. F (b)" in UN_fun_lepoll) apply auto done @@ -167,11 +167,11 @@ apply (blast intro: Ord_Least ltI) done -lemma lepoll_imp_eqpoll_subset: +lemma lepoll_imp_eqpoll_subset: "a \ X ==> \Y. Y \ X & a \ Y" -apply (unfold lepoll_def eqpoll_def, clarify) +apply (unfold lepoll_def eqpoll_def, clarify) apply (blast intro: restrict_bij - dest: inj_is_fun [THEN fun_is_rel, THEN image_subset]) + dest: inj_is_fun [THEN fun_is_rel, THEN image_subset]) done (* ********************************************************************** *) @@ -184,27 +184,27 @@ apply (frule_tac j=xa in Un_upper1_le [OF lt_Ord lt_Ord], assumption) apply (frule_tac j=xa in Un_upper2_le [OF lt_Ord lt_Ord], assumption) apply (drule Un_least_lt, assumption) -apply (drule eqpoll_imp_lepoll [THEN lepoll_trans], +apply (drule eqpoll_imp_lepoll [THEN lepoll_trans], rule le_imp_lepoll, assumption)+ -apply (case_tac "Finite(x Un xa)") +apply (case_tac "Finite(x \ xa)") txt{*finite case*} - apply (drule Finite_Un [OF lepoll_Finite lepoll_Finite], assumption+) + apply (drule Finite_Un [OF lepoll_Finite lepoll_Finite], assumption+) apply (drule subset_Un_Diff [THEN subset_imp_lepoll, THEN lepoll_Finite]) apply (fast dest: eqpoll_sym [THEN eqpoll_imp_lepoll, THEN lepoll_Finite]) txt{*infinite case*} apply (drule Un_lepoll_Inf_Ord, (assumption+)) -apply (blast intro: le_Ord2) -apply (drule lesspoll_trans1 - [OF subset_Un_Diff [THEN subset_imp_lepoll, THEN lepoll_trans] +apply (blast intro: le_Ord2) +apply (drule lesspoll_trans1 + [OF subset_Un_Diff [THEN subset_imp_lepoll, THEN lepoll_trans] lt_Card_imp_lesspoll], assumption+) -apply (simp add: lesspoll_def) +apply (simp add: lesspoll_def) done lemma Diff_lesspoll_eqpoll_Card: "[| A \ a; ~Finite(a); Card(a); B \ a |] ==> A - B \ a" apply (rule ccontr) apply (rule Diff_lesspoll_eqpoll_Card_lemma, (assumption+)) -apply (blast intro: lesspoll_def [THEN def_imp_iff, THEN iffD2] +apply (blast intro: lesspoll_def [THEN def_imp_iff, THEN iffD2] subset_imp_lepoll eqpoll_imp_lepoll lepoll_trans) done diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/AC/DC.thy --- a/src/ZF/AC/DC.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/AC/DC.thy Tue Mar 06 16:46:27 2012 +0000 @@ -82,13 +82,13 @@ definition DC :: "i => o" where "DC(a) == \X R. R \ Pow(X)*X & - (\Y \ Pow(X). Y \ a --> (\x \ X. \ R)) - --> (\f \ a->X. \b \ R)" + (\Y \ Pow(X). Y \ a \ (\x \ X. \ R)) + \ (\f \ a->X. \b \ R)" definition DC0 :: o where "DC0 == \A B R. R \ A*B & R\0 & range(R) \ domain(R) - --> (\f \ nat->domain(R). \n \ nat. :R)" + \ (\f \ nat->domain(R). \n \ nat. :R)" definition ff :: "[i, i, i, i] => i" where @@ -99,7 +99,7 @@ locale DC0_imp = fixes XX and RR and X and R - assumes all_ex: "\Y \ Pow(X). Y \ nat --> (\x \ X. \ R)" + assumes all_ex: "\Y \ Pow(X). Y \ nat \ (\x \ X. \ R)" defines XX_def: "XX == (\n \ nat. {f \ n->X. \k \ n. \ R})" and RR_def: "RR == {:XX*XX. domain(z2)=succ(domain(z1)) @@ -314,7 +314,7 @@ lemma (in imp_DC0) lemma4: "[| range(R) \ domain(R); x \ domain(R) |] ==> RR \ Pow(XX)*XX & - (\Y \ Pow(XX). Y \ nat --> (\x \ XX. :RR))" + (\Y \ Pow(XX). Y \ nat \ (\x \ XX. :RR))" apply (rule conjI) apply (force dest!: FinD [THEN PowI] simp add: RR_def) apply (rule impI [THEN ballI]) @@ -331,7 +331,7 @@ lemma (in imp_DC0) UN_image_succ_eq: "[| f \ nat->X; n \ nat |] - ==> (\x \ f``succ(n). P(x)) = P(f`n) Un (\x \ f``n. P(x))" + ==> (\x \ f``succ(n). P(x)) = P(f`n) \ (\x \ f``n. P(x))" by (simp add: image_fun OrdmemD) lemma (in imp_DC0) UN_image_succ_eq_succ: @@ -475,7 +475,7 @@ done (* ********************************************************************** *) -(* \K. Card(K) --> DC(K) ==> WO3 *) +(* \K. Card(K) \ DC(K) ==> WO3 *) (* ********************************************************************** *) lemma fun_Ord_inj: @@ -492,7 +492,7 @@ lemma value_in_image: "[| f \ X->Y; A \ X; a \ A |] ==> f`a \ f``A" by (fast elim!: image_fun [THEN ssubst]) -theorem DC_WO3: "(\K. Card(K) --> DC(K)) ==> WO3" +theorem DC_WO3: "(\K. Card(K) \ DC(K)) ==> WO3" apply (unfold DC_def WO3_def) apply (rule allI) apply (case_tac "A \ Hartog (A)") @@ -516,7 +516,7 @@ done (* ********************************************************************** *) -(* WO1 ==> \K. Card(K) --> DC(K) *) +(* WO1 ==> \K. Card(K) \ DC(K) *) (* ********************************************************************** *) lemma images_eq: @@ -538,7 +538,7 @@ by (fast intro!: lam_type RepFunI) lemma lemmaX: - "[| \Y \ Pow(X). Y \ K --> (\x \ X. \ R); + "[| \Y \ Pow(X). Y \ K \ (\x \ X. \ R); b \ K; Z \ Pow(X); Z \ K |] ==> {x \ X. \ R} \ 0" by blast @@ -546,7 +546,7 @@ lemma WO1_DC_lemma: "[| Card(K); well_ord(X,Q); - \Y \ Pow(X). Y \ K --> (\x \ X. \ R); b \ K |] + \Y \ Pow(X). Y \ K \ (\x \ X. \ R); b \ K |] ==> ff(b, X, Q, R) \ {x \ X. <(\c \ b. ff(c, X, Q, R))``b, x> \ R}" apply (rule_tac P = "b \ K" in impE, (erule_tac [2] asm_rl)+) apply (rule_tac i=b in Card_is_Ord [THEN Ord_in_Ord, THEN trans_induct], @@ -560,7 +560,7 @@ apply (blast intro: lesspoll_trans1 in_Card_imp_lesspoll RepFun_lepoll) done -theorem WO1_DC_Card: "WO1 ==> \K. Card(K) --> DC(K)" +theorem WO1_DC_Card: "WO1 ==> \K. Card(K) \ DC(K)" apply (unfold DC_def WO1_def) apply (rule allI impI)+ apply (erule allE exE conjE)+ diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/AC/Hartog.thy --- a/src/ZF/AC/Hartog.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/AC/Hartog.thy Tue Mar 06 16:46:27 2012 +0000 @@ -12,7 +12,7 @@ Hartog :: "i => i" where "Hartog(X) == LEAST i. ~ i \ X" -lemma Ords_in_set: "\a. Ord(a) --> a \ X ==> P" +lemma Ords_in_set: "\a. Ord(a) \ a \ X ==> P" apply (rule_tac X = "{y \ X. Ord (y) }" in ON_class [elim_format]) apply fast done @@ -43,15 +43,15 @@ done lemma Ords_lepoll_set_lemma: - "(\a. Ord(a) --> a \ X) ==> - \a. Ord(a) --> + "(\a. Ord(a) \ a \ X) ==> + \a. Ord(a) \ a \ {b. Z \ Pow(X)*Pow(X*X), \Y R. Z= & ordertype(Y,R)=b}" apply (intro allI impI) apply (elim allE impE, assumption) apply (blast dest!: Ord_lepoll_imp_eq_ordertype intro: sym) done -lemma Ords_lepoll_set: "\a. Ord(a) --> a \ X ==> P" +lemma Ords_lepoll_set: "\a. Ord(a) \ a \ X ==> P" by (erule Ords_lepoll_set_lemma [THEN Ords_in_set]) lemma ex_Ord_not_lepoll: "\a. Ord(a) & ~a \ X" diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/AC/WO1_AC.thy --- a/src/ZF/AC/WO1_AC.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/AC/WO1_AC.thy Tue Mar 06 16:46:27 2012 +0000 @@ -11,7 +11,7 @@ Assume WO1. Let s be a set of infinite sets. Suppose x \ s. Then x is equipollent to |x| (by WO1), an infinite cardinal -call it K. Since K = K |+| K = |K+K| (by InfCard_cdouble_eq) there is an +call it K. Since K = K \ K = |K+K| (by InfCard_cdouble_eq) there is an isomorphism h \ bij(K+K, x). (Here + means disjoint sum.) So there is a partition of x into 2-element sets, namely @@ -41,7 +41,7 @@ lemma lemma1: "[| WO1; \B \ A. \C \ D(B). P(C,B) |] ==> \f. \B \ A. P(f`B,B)" apply (unfold WO1_def) -apply (erule_tac x = "Union ({{C \ D (B) . P (C,B) }. B \ A}) " in allE) +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) apply (rule_tac x = "\x \ A. f`{C \ D (x) . P (C,x) }" in exI) @@ -82,7 +82,7 @@ done lemma lemma2_5: - "f \ bij(D+D, B) ==> Union({{f`Inl(i), f`Inr(i)}. i \ D})=B" + "f \ bij(D+D, B) ==> \({{f`Inl(i), f`Inr(i)}. i \ D})=B" apply (unfold bij_def surj_def) apply (fast elim!: inj_is_fun [THEN apply_type]) done @@ -91,7 +91,7 @@ "[| WO1; ~Finite(B); 1\n |] ==> \C \ Pow(Pow(B)). pairwise_disjoint(C) & sets_of_size_between(C, 2, succ(n)) & - Union(C)=B" + \(C)=B" apply (drule lemma2_1 [THEN eqpoll_def [THEN def_imp_iff, THEN iffD1]], assumption) apply (blast intro!: lemma2_2 lemma2_3 lemma2_4 lemma2_5) diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/AC/WO1_WO7.thy --- a/src/ZF/AC/WO1_WO7.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/AC/WO1_WO7.thy Tue Mar 06 16:46:27 2012 +0000 @@ -2,10 +2,10 @@ Author: Lawrence C Paulson, CU Computer Laboratory Copyright 1998 University of Cambridge -WO7 <-> LEMMA <-> WO1 (Rubin & Rubin p. 5) +WO7 \ LEMMA \ WO1 (Rubin & Rubin p. 5) LEMMA is the sentence denoted by (**) -Also, WO1 <-> WO8 +Also, WO1 \ WO8 *) theory WO1_WO7 @@ -14,13 +14,13 @@ definition "LEMMA == - \X. ~Finite(X) --> (\R. well_ord(X,R) & ~well_ord(X,converse(R)))" + \X. ~Finite(X) \ (\R. well_ord(X,R) & ~well_ord(X,converse(R)))" (* ********************************************************************** *) (* It is easy to see that WO7 is equivalent to (**) *) (* ********************************************************************** *) -lemma WO7_iff_LEMMA: "WO7 <-> LEMMA" +lemma WO7_iff_LEMMA: "WO7 \ LEMMA" apply (unfold WO7_def LEMMA_def) apply (blast intro: Finite_well_ord_converse) done @@ -85,7 +85,7 @@ lepoll_def [THEN def_imp_iff, THEN iffD2] ) done -lemma WO1_iff_WO7: "WO1 <-> WO7" +lemma WO1_iff_WO7: "WO1 \ WO7" apply (simp add: WO7_iff_LEMMA) apply (blast intro: LEMMA_imp_WO1 WO1_imp_LEMMA) done @@ -93,7 +93,7 @@ (* ********************************************************************** *) -(* The proof of WO8 <-> WO1 (Rubin & Rubin p. 6) *) +(* The proof of WO8 \ WO1 (Rubin & Rubin p. 6) *) (* ********************************************************************** *) lemma WO1_WO8: "WO1 ==> WO8" diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/AC/WO2_AC16.thy --- a/src/ZF/AC/WO2_AC16.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/AC/WO2_AC16.thy Tue Mar 06 16:46:27 2012 +0000 @@ -9,7 +9,7 @@ The first instance is trivial, the third not difficult, but the second is very complicated requiring many lemmas. We also need to prove that at any stage gamma the set -(s - Union(...) - k_gamma) (Rubin & Rubin page 15) +(s - \(...) - k_gamma) (Rubin & Rubin page 15) contains m distinct elements (in fact is equipollent to s) *) @@ -22,8 +22,8 @@ "recfunAC16(f,h,i,a) == transrec2(i, 0, %g r. if (\y \ r. h`g \ y) then r - else r Un {f`(LEAST i. h`g \ f`i & - (\b f`i --> (\t \ r. ~ h`b \ t))))})" + else r \ {f`(LEAST i. h`g \ f`i & + (\b f`i \ (\t \ r. ~ h`b \ t))))})" (* ********************************************************************** *) (* Basic properties of recfunAC16 *) @@ -35,10 +35,10 @@ lemma recfunAC16_succ: "recfunAC16(f,h,succ(i),a) = (if (\y \ recfunAC16(f,h,i,a). h ` i \ y) then recfunAC16(f,h,i,a) - else recfunAC16(f,h,i,a) Un + else recfunAC16(f,h,i,a) \ {f ` (LEAST j. h ` i \ f ` j & (\b f`j - --> (\t \ recfunAC16(f,h,i,a). ~ h`b \ t))))})" + \ (\t \ recfunAC16(f,h,i,a). ~ h`b \ t))))})" apply (simp add: recfunAC16_def) done @@ -52,7 +52,7 @@ lemma transrec2_mono_lemma [rule_format]: "[| !!g r. r \ B(g,r); Ord(i) |] - ==> j transrec2(j, 0, B) \ transrec2(i, 0, B)" + ==> j transrec2(j, 0, B) \ transrec2(i, 0, B)" apply (erule trans_induct) apply (rule Ord_cases, assumption+, fast) apply (simp (no_asm_simp)) @@ -86,8 +86,8 @@ lemma lemma3_1: - "[| \yzY \ F(y). f(z)<=Y) --> (\! Y. Y \ F(y) & f(z)<=Y); - \i j. i\j --> F(i) \ F(j); j\i; iyzY \ F(y). f(z)<=Y) \ (\! Y. Y \ F(y) & f(z)<=Y); + \i j. i\j \ F(i) \ F(j); j\i; i F(i); f(z)<=V; W \ F(j); f(z)<=W |] ==> V = W" apply (erule asm_rl allE impE)+ @@ -96,8 +96,8 @@ lemma lemma3: - "[| \yzY \ F(y). f(z)<=Y) --> (\! Y. Y \ F(y) & f(z)<=Y); - \i j. i\j --> F(i) \ F(j); iyzY \ F(y). f(z)<=Y) \ (\! Y. Y \ F(y) & f(z)<=Y); + \i j. i\j \ F(i) \ F(j); i F(i); f(z)<=V; W \ F(j); f(z)<=W |] ==> V = W" apply (rule_tac j=j in Ord_linear_le [OF lt_Ord lt_Ord], assumption+) @@ -107,10 +107,10 @@ lemma lemma4: "[| \y X & - (\xY \ F(y). h(x) \ Y) --> + (\xY \ F(y). h(x) \ Y) \ (\! Y. Y \ F(y) & h(x) \ Y)); x < a |] - ==> \yzY \ F(y). h(z) \ Y) --> + ==> \yzY \ F(y). h(z) \ Y) \ (\! Y. Y \ F(y) & h(z) \ Y)" apply (intro oallI impI) apply (drule ospec, assumption, clarify) @@ -119,12 +119,12 @@ lemma lemma5: "[| \y X & - (\xY \ F(y). h(x) \ Y) --> + (\xY \ F(y). h(x) \ Y) \ (\! Y. Y \ F(y) & h(x) \ Y)); - x < a; Limit(x); \i j. i\j --> F(i) \ F(j) |] + x < a; Limit(x); \i j. i\j \ F(i) \ F(j) |] ==> (\x X & (\xax \ \x x) - --> (\! Y. Y \ (\x Y))" + \ (\! Y. Y \ (\x Y))" apply (rule conjI) apply (rule subsetI) apply (erule OUN_E) @@ -147,7 +147,7 @@ (* First quite complicated proof of the fact used in the recursive construction of the family T_gamma (WO2 ==> AC16(k #+ m, k)) - the fact that at any stage - gamma the set (s - Union(...) - k_gamma) is equipollent to s + gamma the set (s - \(...) - k_gamma) is equipollent to s (Rubin & Rubin page 15). *) @@ -179,7 +179,7 @@ lemma Union_lesspoll: "[| \x \ X. x lepoll n & x \ T; well_ord(T, R); X lepoll b; b nat |] - ==> Union(X)\a" + ==> \(X)\a" apply (case_tac "Finite (X)") apply (blast intro: Card_is_Ord Finite_lesspoll_infinite_Ord lepoll_nat_imp_Finite Finite_Union) @@ -200,10 +200,10 @@ (* recfunAC16_lepoll_index *) (* ********************************************************************** *) -lemma Un_sing_eq_cons: "A Un {a} = cons(a, A)" +lemma Un_sing_eq_cons: "A \ {a} = cons(a, A)" by fast -lemma Un_lepoll_succ: "A lepoll B ==> A Un {a} lepoll succ(B)" +lemma Un_lepoll_succ: "A lepoll B ==> A \ {a} lepoll succ(B)" apply (simp add: Un_sing_eq_cons succ_def) apply (blast elim!: mem_irrefl intro: cons_lepoll_cong) done @@ -211,7 +211,7 @@ lemma Diff_UN_succ_empty: "Ord(a) ==> F(a) - (\b F(a) Un X - (\b X" +lemma Diff_UN_succ_subset: "Ord(a) ==> F(a) \ X - (\b X" by blast lemma recfunAC16_Diff_lepoll_1: @@ -288,7 +288,7 @@ lemma Union_recfunAC16_lesspoll: "[| recfunAC16(f,g,y,a) \ {X \ Pow(A). X\n}; A\a; y nat |] - ==> Union(recfunAC16(f,g,y,a))\a" + ==> \(recfunAC16(f,g,y,a))\a" apply (erule eqpoll_def [THEN def_imp_iff, THEN iffD1, THEN exE]) apply (rule_tac T=A in Union_lesspoll, simp_all) apply (blast intro!: eqpoll_imp_lepoll) @@ -302,7 +302,7 @@ Card(a); ~ Finite(a); A\a; k \ nat; y bij(a, {Y \ Pow(A). Y\succ(k)}) |] - ==> A - Union(recfunAC16(f, h, y, a)) - h`y\a" + ==> A - \(recfunAC16(f, h, y, a)) - h`y\a" apply (rule dbl_Diff_eqpoll_Card, simp_all) apply (simp add: Union_recfunAC16_lesspoll) apply (rule Finite_lesspoll_infinite_Ord) @@ -320,7 +320,7 @@ lemma Un_in_Collect: "[| x \ Pow(A - B - h`i); x\m; h \ bij(a, {x \ Pow(A) . x\k}); i nat; m \ nat |] - ==> h ` i Un x \ {x \ Pow(A) . x\k #+ m}" + ==> h ` i \ x \ {x \ Pow(A) . x\k #+ m}" by (blast intro: disj_Un_eqpoll_nat_sum dest: ltD bij_is_fun [THEN apply_type]) @@ -330,14 +330,14 @@ (* ********************************************************************** *) lemma lemma6: - "[| \yx Q(x,y)); succ(j) F(j)<=X & (\x Q(x,j))" + "[| \yx Q(x,y)); succ(j) F(j)<=X & (\x Q(x,j))" by (blast intro!: lt_Ord succI1 [THEN ltI, THEN lt_Ord, THEN le_refl]) lemma lemma7: - "[| \x Q(x,j); succ(j) P(j,j) --> (\xj | P(x,j) --> Q(x,j))" + "[| \x Q(x,j); succ(j) P(j,j) \ (\xj | P(x,j) \ Q(x,j))" by (fast elim!: leE) (* ********************************************************************** *) @@ -354,12 +354,12 @@ apply (fast elim!: eqpoll_sym) done -lemma subset_Un_disjoint: "[| A \ B Un C; A Int C = 0 |] ==> A \ B" +lemma subset_Un_disjoint: "[| A \ B \ C; A \ C = 0 |] ==> A \ B" by blast lemma Int_empty: - "[| X \ Pow(A - Union(B) -C); T \ B; F \ T |] ==> F Int X = 0" + "[| X \ Pow(A - \(B) -C); T \ B; F \ T |] ==> F \ X = 0" by blast @@ -369,7 +369,7 @@ lemma subset_imp_eq_lemma: - "m \ nat ==> \A B. A \ B & m lepoll A & B lepoll m --> A=B" + "m \ nat ==> \A B. A \ B & m lepoll A & B lepoll m \ A=B" apply (induct_tac "m") apply (fast dest!: lepoll_0_is_0) apply (intro allI impI) @@ -407,7 +407,7 @@ h \ bij(a, {Y \ Pow(A). Y\succ(k)}); ~ (\Y \ recfunAC16(f, h, y, a). h`y \ Y) |] ==> \X \ {Y \ Pow(A). Y\succ(k #+ m)}. h`y \ X & - (\b X --> + (\b X \ (\T \ recfunAC16(f, h, y, a). ~ h`b \ T))" apply (erule_tac m1=m in dbl_Diff_eqpoll [THEN ex_subset_eqpoll, THEN bexE], assumption+) @@ -434,7 +434,7 @@ f \ bij(a, {Y \ Pow(A). Y\succ(k #+ m)}); ~ (\Y \ recfunAC16(f, h, y, a). h`y \ Y) |] ==> \c f`c & - (\b f`c --> + (\b f`c \ (\T \ recfunAC16(f, h, y, a). ~ h`b \ T))" apply (drule ex_next_set, assumption+) apply (erule bexE) @@ -451,11 +451,11 @@ lemma lemma8: "[| \xxa \ F(j). P(x, xa)) - --> (\! Y. Y \ F(j) & P(x, Y)); F(j) \ X; - L \ X; P(j, L) & (\x (\xa \ F(j). ~P(x, xa))) |] - ==> F(j) Un {L} \ X & - (\xj | (\xa \ (F(j) Un {L}). P(x, xa)) --> - (\! Y. Y \ (F(j) Un {L}) & P(x, Y)))" + \ (\! Y. Y \ F(j) & P(x, Y)); F(j) \ X; + L \ X; P(j, L) & (\x (\xa \ F(j). ~P(x, xa))) |] + ==> F(j) \ {L} \ X & + (\xj | (\xa \ (F(j) \ {L}). P(x, xa)) \ + (\! Y. Y \ (F(j) \ {L}) & P(x, Y)))" apply (rule conjI) apply (fast intro!: singleton_subsetI) apply (rule oallI) @@ -472,7 +472,7 @@ h \ bij(a, {Y \ Pow(A) . Y\succ(k)}); ~Finite(a); Card(a); A\a; k \ nat; m \ nat |] ==> recfunAC16(f, h, b, a) \ {X \ Pow(A) . X\succ(k #+ m)} & - (\xY \ recfunAC16(f, h, b, a). h ` x \ Y) --> + (\xY \ recfunAC16(f, h, b, a). h ` x \ Y) \ (\! Y. Y \ recfunAC16(f, h, b, a) & h ` x \ Y))" apply (erule lt_induct) apply (frule lt_Ord) @@ -507,10 +507,10 @@ (* ********************************************************************** *) lemma lemma_simp_induct: - "[| \b. b F(b) \ S & (\xY \ F(b). f`x \ Y)) - --> (\! Y. Y \ F(b) & f`x \ Y)); + "[| \b. b F(b) \ S & (\xY \ F(b). f`x \ Y)) + \ (\! Y. Y \ F(b) & f`x \ Y)); f \ a->f``(a); Limit(a); - \i j. i\j --> F(i) \ F(j) |] + \i j. i\j \ F(i) \ F(j) |] ==> (\j S & (\x \ f``a. \! Y. Y \ (\j Y)" apply (rule conjI) diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/AC/WO6_WO1.thy --- a/src/ZF/AC/WO6_WO1.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/AC/WO6_WO1.thy Tue Mar 06 16:46:27 2012 +0000 @@ -22,7 +22,7 @@ definition uu :: "[i, i, i, i] => i" where - "uu(f, beta, gamma, delta) == (f`beta * f`gamma) Int f`delta" + "uu(f, beta, gamma, delta) == (f`beta * f`gamma) \ f`delta" (** Definitions for case 1 **) @@ -171,9 +171,9 @@ (* ********************************************************************** *) lemma cases: "\bgd m - ==> (\b 0 --> + ==> (\b 0 \ (\gd 0 & u(f,b,g,d) \ m)) - | (\b 0 & (\gd 0 --> + | (\b 0 & (\gd 0 \ u(f,b,g,d) \ m))" apply (unfold lesspoll_def) apply (blast del: equalityI) @@ -182,7 +182,7 @@ (* ********************************************************************** *) (* Lemmas used in both cases *) (* ********************************************************************** *) -lemma UN_oadd: "Ord(a) ==> (\bb (\bb C(a++b))" by (blast intro: ltI lt_oadd1 oadd_lt_mono2 dest!: lt_oadd_disj) @@ -223,7 +223,7 @@ lemma gg1_lepoll_m: "[| Ord(a); m \ nat; - \b0 --> + \b0 \ (\gd 0 & domain(uu(f,b,g,d)) \ m); \b succ(m); bgd0 --> + "[| \gd0 \ domain(uu(f, b, g, d)) \ succ(m); \b succ(m); y*y \ y; (\bgd0 --> + "[| \gd0 \ domain(uu(f, b, g, d)) \ succ(m); \b succ(m); y*y \ y; (\b nat; s \ f`b |] @@ -325,7 +325,7 @@ (* Case 2: Union of images is the whole "y" *) (* ********************************************************************** *) lemma UN_gg2_eq: - "[| \gd 0 --> + "[| \gd 0 \ domain(uu(f,b,g,d)) \ succ(m); \b succ(m); y*y \ y; (\b nat; s \ f`b; bgd 0 --> + "[| \gd 0 \ domain(uu(f,b,g,d)) \ succ(m); \b succ(m); y*y \ y; (\b f`b; m \ nat; m\ 0; g y *) +(* For every set x there is a set y such that x \ (y * y) \ y *) (* ********************************************************************** *) @@ -409,29 +409,29 @@ (used only in the following two lemmas) *) lemma z_n_subset_z_succ_n: - "\n \ nat. rec(n, x, %k r. r Un r*r) \ rec(succ(n), x, %k r. r Un r*r)" + "\n \ nat. rec(n, x, %k r. r \ r*r) \ rec(succ(n), x, %k r. r \ r*r)" by (fast intro: rec_succ [THEN ssubst]) lemma le_subsets: "[| \n \ nat. f(n)<=f(succ(n)); n\m; n \ nat; m \ nat |] ==> f(n)<=f(m)" apply (erule_tac P = "n\m" in rev_mp) -apply (rule_tac P = "%z. n\z --> f (n) \ f (z) " in nat_induct) +apply (rule_tac P = "%z. n\z \ f (n) \ f (z) " in nat_induct) apply (auto simp add: le_iff) done lemma le_imp_rec_subset: "[| n\m; m \ nat |] - ==> rec(n, x, %k r. r Un r*r) \ rec(m, x, %k r. r Un r*r)" + ==> rec(n, x, %k r. r \ r*r) \ rec(m, x, %k r. r \ r*r)" apply (rule z_n_subset_z_succ_n [THEN le_subsets]) apply (blast intro: lt_nat_in_nat)+ done -lemma lemma_iv: "\y. x Un y*y \ y" -apply (rule_tac x = "\n \ nat. rec (n, x, %k r. r Un r*r) " in exI) +lemma lemma_iv: "\y. x \ y*y \ y" +apply (rule_tac x = "\n \ nat. rec (n, x, %k r. r \ r*r) " in exI) apply safe apply (rule nat_0I [THEN UN_I], simp) -apply (rule_tac a = "succ (n Un na) " in UN_I) +apply (rule_tac a = "succ (n \ na) " in UN_I) apply (erule Un_nat_type [THEN nat_succI], assumption) apply (auto intro: le_imp_rec_subset [THEN subsetD] intro!: Un_upper1_le Un_upper2_le Un_nat_type @@ -494,7 +494,7 @@ lemma rev_induct_lemma [rule_format]: "[| n \ nat; !!m. [| m \ nat; m\0; P(succ(m)) |] ==> P(m) |] - ==> n\0 --> P(n) --> P(1)" + ==> n\0 \ P(n) \ P(1)" by (erule nat_induct, blast+) lemma rev_induct: diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/Coind/Dynamic.thy --- a/src/ZF/Coind/Dynamic.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/Coind/Dynamic.thy Tue Mar 06 16:46:27 2012 +0000 @@ -8,7 +8,7 @@ consts EvalRel :: i inductive - domains "EvalRel" <= "ValEnv * Exp * Val" + domains "EvalRel" \ "ValEnv * Exp * Val" intros eval_constI: " [| ve \ ValEnv; c \ Const |] ==> diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/Coind/ECR.thy --- a/src/ZF/Coind/ECR.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/Coind/ECR.thy Tue Mar 06 16:46:27 2012 +0000 @@ -10,7 +10,7 @@ consts HasTyRel :: i coinductive - domains "HasTyRel" <= "Val * Ty" + domains "HasTyRel" \ "Val * Ty" intros htr_constI [intro!]: "[| c \ Const; t \ Ty; isof(c,t) |] ==> \ HasTyRel" @@ -37,7 +37,7 @@ "[| x \ ExVar; e \ Exp; t \ Ty; ve \ ValEnv; te \ TyEnv; \ ElabRel; ve_dom(ve) = te_dom(te); {.y \ ve_dom(ve)} \ - Pow({} Un HasTyRel) |] + Pow({} \ HasTyRel) |] ==> \ HasTyRel" apply (rule singletonI [THEN HasTyRel.coinduct], auto) done @@ -113,10 +113,10 @@ "[| ve \ ValEnv; e1 \ Exp; e2 \ Exp; c1 \ Const; c2 \ Const; \ EvalRel; \t te. - hastyenv(ve,te) --> \ ElabRel --> \ HasTyRel; + hastyenv(ve,te) \ \ ElabRel \ \ HasTyRel; \ EvalRel; \t te. - hastyenv(ve,te) --> \ ElabRel --> \ HasTyRel; + hastyenv(ve,te) \ \ ElabRel \ \ HasTyRel; hastyenv(ve, te); \ ElabRel |] ==> \ HasTyRel" @@ -126,13 +126,13 @@ "[| ve \ ValEnv; vem \ ValEnv; e1 \ Exp; e2 \ Exp; em \ Exp; xm \ ExVar; v \ Val; \ EvalRel; - \t te. hastyenv(ve,te) --> - \ ElabRel --> \ HasTyRel; + \t te. hastyenv(ve,te) \ + \ ElabRel \ \ HasTyRel; \ EvalRel; - \t te. hastyenv(ve,te) --> \ ElabRel --> \ HasTyRel; + \t te. hastyenv(ve,te) \ \ ElabRel \ \ HasTyRel; \ EvalRel; - \t te. hastyenv(ve_owr(vem,xm,v2),te) --> - \ ElabRel --> \ HasTyRel; + \t te. hastyenv(ve_owr(vem,xm,v2),te) \ + \ ElabRel \ \ HasTyRel; hastyenv(ve,te); \ ElabRel |] ==> \ HasTyRel" apply (erule elab_appE) @@ -150,7 +150,7 @@ lemma consistency [rule_format]: " \ EvalRel - ==> (\t te. hastyenv(ve,te) --> \ ElabRel --> \ HasTyRel)" + ==> (\t te. hastyenv(ve,te) \ \ ElabRel \ \ HasTyRel)" apply (erule EvalRel.induct) apply (simp_all add: consistency_const consistency_var consistency_fn consistency_fix consistency_app1) diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/Coind/Map.thy --- a/src/ZF/Coind/Map.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/Coind/Map.thy Tue Mar 06 16:46:27 2012 +0000 @@ -9,7 +9,7 @@ definition TMap :: "[i,i] => i" where - "TMap(A,B) == {m \ Pow(A*Union(B)).\a \ A. m``{a} \ B}" + "TMap(A,B) == {m \ Pow(A*\(B)).\a \ A. m``{a} \ B}" definition PMap :: "[i,i] => i" where @@ -23,24 +23,24 @@ definition map_owr :: "[i,i,i]=>i" where - "map_owr(m,a,b) == \ x \ {a} Un domain(m). if x=a then b else m``{x}" + "map_owr(m,a,b) == \ x \ {a} \ domain(m). if x=a then b else m``{x}" definition map_app :: "[i,i]=>i" where "map_app(m,a) == m``{a}" -lemma "{0,1} \ {1} Un TMap(I, {0,1})" +lemma "{0,1} \ {1} \ TMap(I, {0,1})" by (unfold TMap_def, blast) -lemma "{0} Un TMap(I,1) \ {1} Un TMap(I, {0} Un TMap(I,1))" +lemma "{0} \ TMap(I,1) \ {1} \ TMap(I, {0} \ TMap(I,1))" by (unfold TMap_def, blast) -lemma "{0,1} Un TMap(I,2) \ {1} Un TMap(I, {0,1} Un TMap(I,2))" +lemma "{0,1} \ TMap(I,2) \ {1} \ TMap(I, {0,1} \ TMap(I,2))" by (unfold TMap_def, blast) (*A bit too slow. -lemma "{0,1} Un TMap(I,TMap(I,2)) Un TMap(I,2) \ - {1} Un TMap(I, {0,1} Un TMap(I,TMap(I,2)) Un TMap(I,2))" +lemma "{0,1} \ TMap(I,TMap(I,2)) \ TMap(I,2) \ + {1} \ TMap(I, {0,1} \ TMap(I,TMap(I,2)) \ TMap(I,2))" by (unfold TMap_def, blast) *) @@ -68,7 +68,7 @@ (* Lemmas *) lemma MapQU_lemma: - "A \ univ(X) ==> Pow(A * Union(quniv(X))) \ quniv(X)" + "A \ univ(X) ==> Pow(A * \(quniv(X))) \ quniv(X)" apply (unfold quniv_def) apply (rule Pow_mono) apply (rule subset_trans [OF Sigma_mono product_univ]) @@ -164,7 +164,7 @@ by (unfold map_emp_def, blast) lemma map_domain_owr: - "b \ 0 ==> domain(map_owr(f,a,b)) = {a} Un domain(f)" + "b \ 0 ==> domain(map_owr(f,a,b)) = {a} \ domain(f)" apply (unfold map_owr_def) apply (auto simp add: domain_Sigma) done diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/Coind/Static.thy --- a/src/ZF/Coind/Static.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/Coind/Static.thy Tue Mar 06 16:46:27 2012 +0000 @@ -27,7 +27,7 @@ consts ElabRel :: i inductive - domains "ElabRel" <= "TyEnv * Exp * Ty" + domains "ElabRel" \ "TyEnv * Exp * Ty" intros constI [intro!]: "[| te \ TyEnv; c \ Const; t \ Ty; isof(c,t) |] ==> diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/Coind/Types.thy --- a/src/ZF/Coind/Types.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/Coind/Types.thy Tue Mar 06 16:46:27 2012 +0000 @@ -30,7 +30,7 @@ primrec (*domain of the type environment*) "te_dom (te_emp) = 0" - "te_dom (te_owr(te,x,v)) = te_dom(te) Un {x}" + "te_dom (te_owr(te,x,v)) = te_dom(te) \ {x}" primrec (*lookup up identifiers in the type environment*) "te_app (te_emp,x) = 0" diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/Coind/Values.thy --- a/src/ZF/Coind/Values.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/Coind/Values.thy Tue Mar 06 16:46:27 2012 +0000 @@ -80,7 +80,7 @@ (* Equalities for value environments *) lemma ve_dom_owr [simp]: - "[| ve \ ValEnv; v \0 |] ==> ve_dom(ve_owr(ve,x,v)) = ve_dom(ve) Un {x}" + "[| ve \ ValEnv; v \0 |] ==> ve_dom(ve_owr(ve,x,v)) = ve_dom(ve) \ {x}" apply (erule ValEnvE) apply (auto simp add: map_domain_owr) done diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/IMP/Equiv.thy --- a/src/ZF/IMP/Equiv.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/IMP/Equiv.thy Tue Mar 06 16:46:27 2012 +0000 @@ -8,7 +8,7 @@ lemma aexp_iff [rule_format]: "[| a \ aexp; sigma: loc -> nat |] - ==> ALL n. -a-> n <-> A(a,sigma) = n" + ==> \n. -a-> n \ A(a,sigma) = n" apply (erule aexp.induct) apply (force intro!: evala.intros)+ done @@ -27,7 +27,7 @@ lemma bexp_iff [rule_format]: "[| b \ bexp; sigma: loc -> nat |] - ==> ALL w. -b-> w <-> B(b,sigma) = w" + ==> \w. -b-> w \ B(b,sigma) = w" apply (erule bexp.induct) apply (auto intro!: evalb.intros) done diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/Induct/Acc.thy --- a/src/ZF/Induct/Acc.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/Induct/Acc.thy Tue Mar 06 16:46:27 2012 +0000 @@ -36,7 +36,7 @@ lemma acc_induct [consumes 1, case_names vimage, induct set: acc]: "[| a \ acc(r); - !!x. [| x \ acc(r); \y. :r --> P(y) |] ==> P(x) + !!x. [| x \ acc(r); \y. :r \ P(y) |] ==> P(x) |] ==> P(a)" by (erule acc.induct) (blast intro: acc.intros) @@ -55,7 +55,7 @@ apply (blast intro: accI)+ done -lemma wf_acc_iff: "wf(r) <-> field(r) \ acc(r)" +lemma wf_acc_iff: "wf(r) \ field(r) \ acc(r)" by (rule iffI, erule acc_wfD, erule acc_wfI) end diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/Induct/Binary_Trees.thy --- a/src/ZF/Induct/Binary_Trees.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/Induct/Binary_Trees.thy Tue Mar 06 16:46:27 2012 +0000 @@ -20,7 +20,7 @@ lemma Br_neq_left: "l \ bt(A) ==> Br(x, l, r) \ l" by (induct arbitrary: x r set: bt) auto -lemma Br_iff: "Br(a, l, r) = Br(a', l', r') <-> a = a' & l = l' & r = r'" +lemma Br_iff: "Br(a, l, r) = Br(a', l', r') \ a = a' & l = l' & r = r'" -- "Proving a freeness theorem." by (fast elim!: bt.free_elims) diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/Induct/Comb.thy --- a/src/ZF/Induct/Comb.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/Induct/Comb.thy Tue Mar 06 16:46:27 2012 +0000 @@ -28,7 +28,7 @@ text {* Inductive definition of contractions, @{text "-1->"} and - (multi-step) reductions, @{text "--->"}. + (multi-step) reductions, @{text "-\"}. *} consts @@ -39,8 +39,8 @@ where "p -1-> q == \ contract" abbreviation - contract_multi :: "[i,i] => o" (infixl "--->" 50) - where "p ---> q == \ contract^*" + contract_multi :: "[i,i] => o" (infixl "-\" 50) + where "p -\ q == \ contract^*" inductive domains "contract" \ "comb \ comb" @@ -87,14 +87,14 @@ definition diamond :: "i => o" where "diamond(r) == - \x y. \r --> (\y'. \r --> (\z. \r & \ r))" + \x y. \r \ (\y'. \r \ (\z. \r & \ r))" subsection {* Transitive closure preserves the Church-Rosser property *} lemma diamond_strip_lemmaD [rule_format]: "[| diamond(r); :r^+ |] ==> - \y'. :r --> (\z. : r^+ & : r)" + \y'. :r \ (\z. : r^+ & : r)" apply (unfold diamond_def) apply (erule trancl_induct) apply (blast intro: r_into_trancl) @@ -145,7 +145,7 @@ contract.Ap1 [THEN rtrancl_into_rtrancl2] contract.Ap2 [THEN rtrancl_into_rtrancl2] -lemma "p \ comb ==> I\p ---> p" +lemma "p \ comb ==> I\p -\ p" -- {* Example only: not used *} by (unfold I_def) (blast intro: reduction_rls) @@ -168,7 +168,7 @@ lemma K1_contractD: "K\p -1-> r ==> (\q. r = K\q & p -1-> q)" by auto -lemma Ap_reduce1: "[| p ---> q; r \ comb |] ==> p\r ---> q\r" +lemma Ap_reduce1: "[| p -\ q; r \ comb |] ==> p\r -\ q\r" apply (frule rtrancl_type [THEN subsetD, THEN SigmaD1]) apply (drule field_contract_eq [THEN equalityD1, THEN subsetD]) apply (erule rtrancl_induct) @@ -177,7 +177,7 @@ apply (blast intro: contract_combD2 reduction_rls) done -lemma Ap_reduce2: "[| p ---> q; r \ comb |] ==> r\p ---> r\q" +lemma Ap_reduce2: "[| p -\ q; r \ comb |] ==> r\p -\ r\q" apply (frule rtrancl_type [THEN subsetD, THEN SigmaD1]) apply (drule field_contract_eq [THEN equalityD1, THEN subsetD]) apply (erule rtrancl_induct) @@ -247,13 +247,13 @@ done text {* - \medskip Equivalence of @{prop "p ---> q"} and @{prop "p ===> q"}. + \medskip Equivalence of @{prop "p -\ q"} and @{prop "p ===> q"}. *} lemma contract_imp_parcontract: "p-1->q ==> p=1=>q" by (induct set: contract) auto -lemma reduce_imp_parreduce: "p--->q ==> p===>q" +lemma reduce_imp_parreduce: "p-\q ==> p===>q" apply (frule rtrancl_type [THEN subsetD, THEN SigmaD1]) apply (drule field_contract_eq [THEN equalityD1, THEN subsetD]) apply (erule rtrancl_induct) @@ -262,7 +262,7 @@ trans_trancl [THEN transD]) done -lemma parcontract_imp_reduce: "p=1=>q ==> p--->q" +lemma parcontract_imp_reduce: "p=1=>q ==> p-\q" apply (induct set: parcontract) apply (blast intro: reduction_rls) apply (blast intro: reduction_rls) @@ -271,7 +271,7 @@ Ap_reduce1 Ap_reduce2 parcontract_combD1 parcontract_combD2) done -lemma parreduce_imp_reduce: "p===>q ==> p--->q" +lemma parreduce_imp_reduce: "p===>q ==> p-\q" apply (frule trancl_type [THEN subsetD, THEN SigmaD1]) apply (drule field_parcontract_eq [THEN equalityD1, THEN subsetD]) apply (erule trancl_induct, erule parcontract_imp_reduce) @@ -279,7 +279,7 @@ apply (erule parcontract_imp_reduce) done -lemma parreduce_iff_reduce: "p===>q <-> p--->q" +lemma parreduce_iff_reduce: "p===>q \ p-\q" by (blast intro: parreduce_imp_reduce reduce_imp_parreduce) end diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/Induct/FoldSet.thy --- a/src/ZF/Induct/FoldSet.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/Induct/FoldSet.thy Tue Mar 06 16:46:27 2012 +0000 @@ -11,10 +11,10 @@ consts fold_set :: "[i, i, [i,i]=>i, i] => i" inductive - domains "fold_set(A, B, f,e)" <= "Fin(A)*B" + domains "fold_set(A, B, f,e)" \ "Fin(A)*B" intros emptyI: "e\B ==> <0, e>\fold_set(A, B, f,e)" - consI: "[| x\A; x \C; : fold_set(A, B,f,e); f(x,y):B |] + consI: "[| x\A; x \C; \ fold_set(A, B,f,e); f(x,y):B |] ==> \fold_set(A, B, f, e)" type_intros Fin.intros @@ -29,12 +29,12 @@ (** foldSet **) -inductive_cases empty_fold_setE: "<0, x> : fold_set(A, B, f,e)" -inductive_cases cons_fold_setE: " : fold_set(A, B, f,e)" +inductive_cases empty_fold_setE: "<0, x> \ fold_set(A, B, f,e)" +inductive_cases cons_fold_setE: " \ fold_set(A, B, f,e)" (* add-hoc lemmas *) -lemma cons_lemma1: "[| x\C; x\B |] ==> cons(x,B)=cons(x,C) <-> B = C" +lemma cons_lemma1: "[| x\C; x\B |] ==> cons(x,B)=cons(x,C) \ B = C" by (auto elim: equalityE) lemma cons_lemma2: "[| cons(x, B)=cons(y, C); x\y; x\B; y\C |] @@ -44,13 +44,13 @@ (* fold_set monotonicity *) lemma fold_set_mono_lemma: - " : fold_set(A, B, f, e) - ==> ALL D. A<=D --> : fold_set(D, B, f, e)" + " \ fold_set(A, B, f, e) + ==> \D. A<=D \ \ fold_set(D, B, f, e)" apply (erule fold_set.induct) apply (auto intro: fold_set.intros) done -lemma fold_set_mono: " C<=A ==> fold_set(C, B, f, e) <= fold_set(A, B, f, e)" +lemma fold_set_mono: " C<=A ==> fold_set(C, B, f, e) \ fold_set(A, B, f, e)" apply clarify apply (frule fold_set.dom_subset [THEN subsetD], clarify) apply (auto dest: fold_set_mono_lemma) @@ -64,8 +64,8 @@ (* Proving that fold_set is deterministic *) lemma Diff1_fold_set: - "[| : fold_set(A, B, f,e); x\C; x\A; f(x, y):B |] - ==> : fold_set(A, B, f, e)" + "[| \ fold_set(A, B, f,e); x\C; x\A; f(x, y):B |] + ==> \ fold_set(A, B, f, e)" apply (frule fold_set.dom_subset [THEN subsetD]) apply (erule cons_Diff [THEN subst], rule fold_set.intros, auto) done @@ -79,7 +79,7 @@ lemma (in fold_typing) Fin_imp_fold_set: - "C\Fin(A) ==> (EX x. : fold_set(A, B, f,e))" + "C\Fin(A) ==> (\x. \ fold_set(A, B, f,e))" apply (erule Fin_induct) apply (auto dest: fold_set.dom_subset [THEN subsetD] intro: fold_set.intros etype ftype) @@ -91,9 +91,9 @@ lemma (in fold_typing) fold_set_determ_lemma [rule_format]: "n\nat - ==> ALL C. |C| - (ALL x. : fold_set(A, B, f,e)--> - (ALL y. : fold_set(A, B, f,e) --> y=x))" + ==> \C. |C| + (\x. \ fold_set(A, B, f,e)\ + (\y. \ fold_set(A, B, f,e) \ y=x))" apply (erule nat_induct) apply (auto simp add: le_iff) apply (erule fold_set.cases) @@ -110,7 +110,7 @@ apply (drule cons_lemma2, safe) apply (frule Diff_sing_imp, assumption+) txt{** LEVEL 17*} -apply (subgoal_tac "|Ca| le |Cb|") +apply (subgoal_tac "|Ca| \ |Cb|") prefer 2 apply (rule succ_le_imp_le) apply (simp add: Fin_into_Finite Finite_imp_succ_cardinal_Diff @@ -122,7 +122,7 @@ apply (blast dest!: ftype fold_set.dom_subset [THEN subsetD]) apply (subgoal_tac "ya = f(xb,xa) ") prefer 2 apply (blast del: equalityCE) -apply (subgoal_tac " : fold_set(A,B,f,e)") +apply (subgoal_tac " \ fold_set(A,B,f,e)") prefer 2 apply simp apply (subgoal_tac "yb = f (x, xa) ") apply (drule_tac [2] C = Cb in Diff1_fold_set, simp_all) @@ -143,7 +143,7 @@ (** The fold function **) lemma (in fold_typing) fold_equality: - " : fold_set(A,B,f,e) ==> fold[B](f,e,C) = y" + " \ fold_set(A,B,f,e) ==> fold[B](f,e,C) = y" apply (unfold fold_def) apply (frule fold_set.dom_subset [THEN subsetD], clarify) apply (rule the_equality) @@ -154,15 +154,15 @@ apply (auto dest: fold_set_lemma intro: ftype etype fcomm) done -lemma fold_0 [simp]: "e : B ==> fold[B](f,e,0) = e" +lemma fold_0 [simp]: "e \ B ==> fold[B](f,e,0) = e" apply (unfold fold_def) apply (blast elim!: empty_fold_setE intro: fold_set.intros) done text{*This result is the right-to-left direction of the subsequent result*} lemma (in fold_typing) fold_set_imp_cons: - "[| : fold_set(C, B, f, e); C : Fin(A); c : A; c\C |] - ==> : fold_set(cons(c, C), B, f, e)" + "[| \ fold_set(C, B, f, e); C \ Fin(A); c \ A; c\C |] + ==> \ fold_set(cons(c, C), B, f, e)" apply (frule FinD [THEN fold_set_mono, THEN subsetD]) apply assumption apply (frule fold_set.dom_subset [of A, THEN subsetD]) @@ -170,9 +170,9 @@ done lemma (in fold_typing) fold_cons_lemma [rule_format]: -"[| C : Fin(A); c : A; c\C |] - ==> : fold_set(cons(c, C), B, f, e) <-> - (EX y. : fold_set(C, B, f, e) & v = f(c, y))" +"[| C \ Fin(A); c \ A; c\C |] + ==> \ fold_set(cons(c, C), B, f, e) \ + (\y. \ fold_set(C, B, f, e) & v = f(c, y))" apply auto prefer 2 apply (blast intro: fold_set_imp_cons) apply (frule_tac Fin.consI [of c, THEN FinD, THEN fold_set_mono, THEN subsetD], assumption+) @@ -220,7 +220,7 @@ lemma (in fold_typing) fold_nest_Un_Int: "[| C\Fin(A); D\Fin(A) |] ==> fold[B](f, fold[B](f, e, D), C) = - fold[B](f, fold[B](f, e, (C Int D)), C Un D)" + fold[B](f, fold[B](f, e, (C \ D)), C \ D)" apply (erule Fin_induct, auto) apply (simp add: Un_cons Int_cons_left fold_type fold_commute fold_typing.fold_cons [of A _ _ f] @@ -228,8 +228,8 @@ done lemma (in fold_typing) fold_nest_Un_disjoint: - "[| C\Fin(A); D\Fin(A); C Int D = 0 |] - ==> fold[B](f,e,C Un D) = fold[B](f, fold[B](f,e,D), C)" + "[| C\Fin(A); D\Fin(A); C \ D = 0 |] + ==> fold[B](f,e,C \ D) = fold[B](f, fold[B](f,e,D), C)" by (simp add: fold_nest_Un_Int) lemma Finite_cons_lemma: "Finite(C) ==> C\Fin(cons(c, C))" @@ -245,7 +245,7 @@ lemma setsum_cons [simp]: "Finite(C) ==> setsum(g, cons(c,C)) = - (if c : C then setsum(g,C) else g(c) $+ setsum(g,C))" + (if c \ C then setsum(g,C) else g(c) $+ setsum(g,C))" apply (auto simp add: setsum_def Finite_cons cons_absorb) apply (rule_tac A = "cons (c, C)" in fold_typing.fold_cons) apply (auto intro: fold_typing.intro Finite_cons_lemma) @@ -260,7 +260,7 @@ (*The reversed orientation looks more natural, but LOOPS as a simprule!*) lemma setsum_Un_Int: "[| Finite(C); Finite(D) |] - ==> setsum(g, C Un D) $+ setsum(g, C Int D) + ==> setsum(g, C \ D) $+ setsum(g, C \ D) = setsum(g, C) $+ setsum(g, D)" apply (erule Finite_induct) apply (simp_all add: Int_cons_right cons_absorb Un_cons Int_commute Finite_Un @@ -274,27 +274,27 @@ done lemma setsum_Un_disjoint: - "[| Finite(C); Finite(D); C Int D = 0 |] - ==> setsum(g, C Un D) = setsum(g, C) $+ setsum(g,D)" + "[| Finite(C); Finite(D); C \ D = 0 |] + ==> setsum(g, C \ D) = setsum(g, C) $+ setsum(g,D)" apply (subst setsum_Un_Int [symmetric]) -apply (subgoal_tac [3] "Finite (C Un D) ") +apply (subgoal_tac [3] "Finite (C \ D) ") apply (auto intro: Finite_Un) done lemma Finite_RepFun [rule_format (no_asm)]: - "Finite(I) ==> (\i\I. Finite(C(i))) --> Finite(RepFun(I, C))" + "Finite(I) ==> (\i\I. Finite(C(i))) \ Finite(RepFun(I, C))" apply (erule Finite_induct, auto) done lemma setsum_UN_disjoint [rule_format (no_asm)]: "Finite(I) - ==> (\i\I. Finite(C(i))) --> - (\i\I. \j\I. i\j --> C(i) Int C(j) = 0) --> + ==> (\i\I. Finite(C(i))) \ + (\i\I. \j\I. i\j \ C(i) \ C(j) = 0) \ setsum(f, \i\I. C(i)) = setsum (%i. setsum(f, C(i)), I)" apply (erule Finite_induct, auto) apply (subgoal_tac "\i\B. x \ i") prefer 2 apply blast -apply (subgoal_tac "C (x) Int (\i\B. C (i)) = 0") +apply (subgoal_tac "C (x) \ (\i\B. C (i)) = 0") prefer 2 apply blast apply (subgoal_tac "Finite (\i\B. C (i)) & Finite (C (x)) & Finite (B) ") apply (simp (no_asm_simp) add: setsum_Un_disjoint) @@ -332,21 +332,21 @@ lemma setsum_Un: "[| Finite(A); Finite(B) |] - ==> setsum(f, A Un B) = - setsum(f, A) $+ setsum(f, B) $- setsum(f, A Int B)" + ==> setsum(f, A \ B) = + setsum(f, A) $+ setsum(f, B) $- setsum(f, A \ B)" apply (subst setsum_Un_Int [symmetric], auto) done lemma setsum_zneg_or_0 [rule_format (no_asm)]: - "Finite(A) ==> (\x\A. g(x) $<= #0) --> setsum(g, A) $<= #0" + "Finite(A) ==> (\x\A. g(x) $<= #0) \ setsum(g, A) $<= #0" apply (erule Finite_induct) apply (auto intro: zneg_or_0_add_zneg_or_0_imp_zneg_or_0) done lemma setsum_succD_lemma [rule_format]: "Finite(A) - ==> \n\nat. setsum(f,A) = $# succ(n) --> (\a\A. #0 $< f(a))" + ==> \n\nat. setsum(f,A) = $# succ(n) \ (\a\A. #0 $< f(a))" apply (erule Finite_induct) apply (auto simp del: int_of_0 int_of_succ simp add: not_zless_iff_zle int_of_0 [symmetric]) apply (subgoal_tac "setsum (f, B) $<= #0") @@ -368,7 +368,7 @@ done lemma g_zpos_imp_setsum_zpos [rule_format]: - "Finite(A) ==> (\x\A. #0 $<= g(x)) --> #0 $<= setsum(g, A)" + "Finite(A) ==> (\x\A. #0 $<= g(x)) \ #0 $<= setsum(g, A)" apply (erule Finite_induct) apply (simp (no_asm)) apply (auto intro: zpos_add_zpos_imp_zpos) @@ -382,13 +382,13 @@ lemma g_zspos_imp_setsum_zspos [rule_format]: "Finite(A) - ==> (\x\A. #0 $< g(x)) --> A \ 0 --> (#0 $< setsum(g, A))" + ==> (\x\A. #0 $< g(x)) \ A \ 0 \ (#0 $< setsum(g, A))" apply (erule Finite_induct) apply (auto intro: zspos_add_zspos_imp_zspos) done lemma setsum_Diff [rule_format]: - "Finite(A) ==> \a. M(a) = #0 --> setsum(M, A) = setsum(M, A-{a})" + "Finite(A) ==> \a. M(a) = #0 \ setsum(M, A) = setsum(M, A-{a})" apply (erule Finite_induct) apply (simp_all add: Diff_cons_eq Finite_Diff) done diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/Induct/ListN.thy --- a/src/ZF/Induct/ListN.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/Induct/ListN.thy Tue Mar 06 16:46:27 2012 +0000 @@ -24,7 +24,7 @@ lemma list_into_listn: "l \ list(A) ==> \ listn(A)" by (induct set: list) (simp_all add: listn.intros) -lemma listn_iff: " \ listn(A) <-> l \ list(A) & length(l)=n" +lemma listn_iff: " \ listn(A) \ l \ list(A) & length(l)=n" apply (rule iffI) apply (erule listn.induct) apply auto diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/Induct/Multiset.thy --- a/src/ZF/Induct/Multiset.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/Induct/Multiset.thy Tue Mar 06 16:46:27 2012 +0000 @@ -34,8 +34,8 @@ definition munion :: "[i, i] => i" (infixl "+#" 65) where - "M +# N == \x \ mset_of(M) Un mset_of(N). - if x \ mset_of(M) Int mset_of(N) then (M`x) #+ (N`x) + "M +# N == \x \ mset_of(M) \ mset_of(N). + if x \ mset_of(M) \ mset_of(N) then (M`x) #+ (N`x) else (if x \ mset_of(M) then M`x else N`x)" definition @@ -74,7 +74,7 @@ "a :# M == a \ mset_of(M)" syntax - "_MColl" :: "[pttrn, i, o] => i" ("(1{# _ : _./ _#})") + "_MColl" :: "[pttrn, i, o] => i" ("(1{# _ \ _./ _#})") syntax (xsymbols) "_MColl" :: "[pttrn, i, o] => i" ("(1{# _ \ _./ _#})") translations @@ -144,7 +144,7 @@ text{* A useful simplification rule *} lemma multiset_fun_iff: - "(f \ A -> nat-{0}) <-> f \ A->nat&(\a \ A. f`a \ nat & 0 < f`a)" + "(f \ A -> nat-{0}) \ f \ A->nat&(\a \ A. f`a \ nat & 0 < f`a)" apply safe apply (rule_tac [4] B1 = "range (f) " in Pi_mono [THEN subsetD]) apply (auto intro!: Ord_0_lt @@ -170,10 +170,10 @@ apply (blast intro: Fin_into_Finite) done -lemma Mult_iff_multiset: "M \ Mult(A) <-> multiset(M) & mset_of(M)\A" +lemma Mult_iff_multiset: "M \ Mult(A) \ multiset(M) & mset_of(M)\A" by (blast dest: Mult_into_multiset intro: multiset_into_Mult) -lemma multiset_iff_Mult_mset_of: "multiset(M) <-> M \ Mult(mset_of(M))" +lemma multiset_iff_Mult_mset_of: "multiset(M) \ M \ Mult(mset_of(M))" by (auto simp add: Mult_iff_multiset) @@ -193,13 +193,13 @@ lemma mset_of_0 [iff]: "mset_of(0) = 0" by (simp add: mset_of_def) -lemma mset_is_0_iff: "multiset(M) ==> mset_of(M)=0 <-> M=0" +lemma mset_is_0_iff: "multiset(M) ==> mset_of(M)=0 \ M=0" by (auto simp add: multiset_def mset_of_def) lemma mset_of_single [iff]: "mset_of({#a#}) = {a}" by (simp add: msingle_def mset_of_def) -lemma mset_of_union [iff]: "mset_of(M +# N) = mset_of(M) Un mset_of(N)" +lemma mset_of_union [iff]: "mset_of(M +# N) = mset_of(M) \ mset_of(N)" by (simp add: mset_of_def munion_def) lemma mset_of_diff [simp]: "mset_of(M)\A ==> mset_of(M -# N) \ A" @@ -210,7 +210,7 @@ lemma msingle_not_0 [iff]: "{#a#} \ 0 & 0 \ {#a#}" by (simp add: msingle_def) -lemma msingle_eq_iff [iff]: "({#a#} = {#b#}) <-> (a = b)" +lemma msingle_eq_iff [iff]: "({#a#} = {#b#}) \ (a = b)" by (simp add: msingle_def) lemma msingle_multiset [iff,TC]: "multiset({#a#})" @@ -248,7 +248,7 @@ lemma munion_multiset [simp]: "[| multiset(M); multiset(N) |] ==> multiset(M +# N)" apply (unfold multiset_def munion_def mset_of_def, auto) -apply (rule_tac x = "A Un Aa" in exI) +apply (rule_tac x = "A \ Aa" in exI) apply (auto intro!: lam_type intro: Finite_Un simp add: multiset_fun_iff zero_less_add) done @@ -298,7 +298,7 @@ prefer 2 apply (force intro!: lam_type) apply (subgoal_tac [2] "{x \ A \ {a} . x \ a \ x \ A} = A") apply (rule fun_extension, auto) -apply (drule_tac x = "A Un {a}" in spec) +apply (drule_tac x = "A \ {a}" in spec) apply (simp add: Finite_Un) apply (force intro!: lam_type) done @@ -361,7 +361,7 @@ apply (blast dest!: fun_is_rel) done -lemma msize_eq_0_iff: "multiset(M) ==> msize(M)=#0 <-> M=0" +lemma msize_eq_0_iff: "multiset(M) ==> msize(M)=#0 \ M=0" apply (simp add: msize_def, auto) apply (rule_tac P = "setsum (?u,?v) \ #0" in swap) apply blast @@ -378,11 +378,11 @@ done lemma setsum_mcount_Int: - "Finite(A) ==> setsum(%a. $# mcount(N, a), A Int mset_of(N)) + "Finite(A) ==> setsum(%a. $# mcount(N, a), A \ mset_of(N)) = setsum(%a. $# mcount(N, a), A)" apply (induct rule: Finite_induct) apply auto -apply (subgoal_tac "Finite (B Int mset_of (N))") +apply (subgoal_tac "Finite (B \ mset_of (N))") prefer 2 apply (blast intro: subset_Finite) apply (auto simp add: mcount_def Int_cons_left) done @@ -412,7 +412,7 @@ done lemma multiset_equality: - "[| multiset(M); multiset(N) |]==> M=N<->(\a. mcount(M, a)=mcount(N, a))" + "[| multiset(M); multiset(N) |]==> M=N\(\a. mcount(M, a)=mcount(N, a))" apply auto apply (subgoal_tac "mset_of (M) = mset_of (N) ") prefer 2 apply (blast intro: equality_lemma) @@ -426,28 +426,28 @@ (** More algebraic properties of multisets **) -lemma munion_eq_0_iff [simp]: "[|multiset(M); multiset(N)|]==>(M +# N =0) <-> (M=0 & N=0)" +lemma munion_eq_0_iff [simp]: "[|multiset(M); multiset(N)|]==>(M +# N =0) \ (M=0 & N=0)" by (auto simp add: multiset_equality) -lemma empty_eq_munion_iff [simp]: "[|multiset(M); multiset(N)|]==>(0=M +# N) <-> (M=0 & N=0)" +lemma empty_eq_munion_iff [simp]: "[|multiset(M); multiset(N)|]==>(0=M +# N) \ (M=0 & N=0)" apply (rule iffI, drule sym) apply (simp_all add: multiset_equality) done lemma munion_right_cancel [simp]: - "[| multiset(M); multiset(N); multiset(K) |]==>(M +# K = N +# K)<->(M=N)" + "[| multiset(M); multiset(N); multiset(K) |]==>(M +# K = N +# K)\(M=N)" by (auto simp add: multiset_equality) lemma munion_left_cancel [simp]: - "[|multiset(K); multiset(M); multiset(N)|] ==>(K +# M = K +# N) <-> (M = N)" + "[|multiset(K); multiset(M); multiset(N)|] ==>(K +# M = K +# N) \ (M = N)" by (auto simp add: multiset_equality) -lemma nat_add_eq_1_cases: "[| m \ nat; n \ nat |] ==> (m #+ n = 1) <-> (m=1 & n=0) | (m=0 & n=1)" +lemma nat_add_eq_1_cases: "[| m \ nat; n \ nat |] ==> (m #+ n = 1) \ (m=1 & n=0) | (m=0 & n=1)" by (induct_tac n) auto lemma munion_is_single: "[|multiset(M); multiset(N)|] - ==> (M +# N = {#a#}) <-> (M={#a#} & N=0) | (M = 0 & N = {#a#})" + ==> (M +# N = {#a#}) \ (M={#a#} & N=0) | (M = 0 & N = {#a#})" apply (simp (no_asm_simp) add: multiset_equality) apply safe apply simp_all @@ -467,8 +467,8 @@ done lemma msingle_is_union: "[| multiset(M); multiset(N) |] - ==> ({#a#} = M +# N) <-> ({#a#} = M & N=0 | M = 0 & {#a#} = N)" -apply (subgoal_tac " ({#a#} = M +# N) <-> (M +# N = {#a#}) ") + ==> ({#a#} = M +# N) \ ({#a#} = M & N=0 | M = 0 & {#a#} = N)" +apply (subgoal_tac " ({#a#} = M +# N) \ (M +# N = {#a#}) ") apply (simp (no_asm_simp) add: munion_is_single) apply blast apply (blast dest: sym) @@ -478,7 +478,7 @@ lemma setsum_decr: "Finite(A) - ==> (\M. multiset(M) --> + ==> (\M. multiset(M) \ (\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))))" @@ -494,7 +494,7 @@ lemma setsum_decr2: "Finite(A) - ==> \M. multiset(M) --> (\a \ mset_of(M). + ==> \M. multiset(M) \ (\a \ mset_of(M). setsum(%x. $# mcount(funrestrict(M, mset_of(M)-{a}), x), A) = (if a \ A then setsum(%x. $# mcount(M, x), A) $- $# M`a else setsum(%x. $# mcount(M, x), A)))" @@ -514,11 +514,11 @@ apply (simp add: mcount_def mset_of_def) done -lemma nat_le_1_cases: "n \ nat ==> n le 1 <-> (n=0 | n=1)" +lemma nat_le_1_cases: "n \ nat ==> n \ 1 \ (n=0 | n=1)" by (auto elim: natE) lemma succ_pred_eq_self: "[| 0 nat |] ==> succ(n #- 1) = n" -apply (subgoal_tac "1 le n") +apply (subgoal_tac "1 \ n") apply (drule add_diff_inverse2, auto) done @@ -536,8 +536,8 @@ and prem2: "!!M b. [| multiset(M); b \ mset_of(M); P(M) |] ==> P(M(b:= M`b #+ 1))" shows "[| n \ nat; P(0) |] - ==> (\M. multiset(M)--> - (setsum(%x. $# mcount(M, x), {x \ mset_of(M). 0 < M`x}) = $# n) --> P(M))" + ==> (\M. multiset(M)\ + (setsum(%x. $# mcount(M, x), {x \ mset_of(M). 0 < M`x}) = $# n) \ P(M))" apply (erule nat_induct, clarify) apply (frule msize_eq_0_iff) apply (auto simp add: mset_of_def multiset_def multiset_fun_iff msize_def) @@ -562,9 +562,9 @@ apply (drule mp, drule_tac [2] mp, simp_all) apply (rule_tac x = A in exI) apply (auto intro: update_type) -apply (subgoal_tac "Finite ({x \ cons (a, A) . x\a-->0 cons (a, A) . x\a\0 {a} = A") apply (rule fun_extension) apply (auto dest: domain_type intro: lam_type update_type) done @@ -665,7 +665,7 @@ by (auto simp add: mset_of_def MCollect_def multiset_def funrestrict_def) lemma MCollect_mem_iff [iff]: - "x \ mset_of({#x \ M. P(x)#}) <-> x \ mset_of(M) & P(x)" + "x \ mset_of({#x \ M. P(x)#}) \ x \ mset_of(M) & P(x)" by (simp add: MCollect_def mset_of_def) lemma mcount_MCollect [simp]: @@ -682,7 +682,7 @@ (* and more algebraic laws on multisets *) lemma munion_eq_conv_diff: "[| multiset(M); multiset(N) |] - ==> (M +# {#a#} = N +# {#b#}) <-> (M = N & a = b | + ==> (M +# {#a#} = N +# {#b#}) \ (M = N & a = b | M = N -# {#a#} +# {#b#} & N = M -# {#b#} +# {#a#})" apply (simp del: mcount_single add: multiset_equality) apply (rule iffI, erule_tac [2] disjE, erule_tac [3] conjE) @@ -697,7 +697,7 @@ lemma melem_diff_single: "multiset(M) ==> - k \ mset_of(M -# {#a#}) <-> (k=a & 1 < mcount(M,a)) | (k\ a & k \ mset_of(M))" + k \ mset_of(M -# {#a#}) \ (k=a & 1 < mcount(M,a)) | (k\ a & k \ mset_of(M))" apply (simp add: multiset_def) apply (simp add: normalize_def mset_of_def msingle_def mdiff_def mcount_def) apply (auto dest: domain_type intro: zero_less_diff [THEN iffD1] @@ -709,7 +709,7 @@ lemma munion_eq_conv_exist: "[| M \ Mult(A); N \ Mult(A) |] - ==> (M +# {#a#} = N +# {#b#}) <-> + ==> (M +# {#a#} = N +# {#b#}) \ (M=N & a=b | (\K \ Mult(A). M= K +# {#b#} & N=K +# {#a#}))" by (auto simp add: Mult_iff_multiset melem_diff_single munion_eq_conv_diff) @@ -728,7 +728,7 @@ by (auto simp add: multirel1_def) lemma multirel1_iff: -" \ multirel1(A, r) <-> +" \ multirel1(A, r) \ (\a. a \ A & (\M0. M0 \ Mult(A) & (\K. K \ Mult(A) & M=M0 +# {#a#} & N=M0 +# K & (\b \ mset_of(K). \ r))))" @@ -789,10 +789,10 @@ lemma acc_0: "acc(0)=0" by (auto intro!: equalityI dest: acc.dom_subset [THEN subsetD]) -lemma lemma1: "[| \b \ A. \ r --> +lemma lemma1: "[| \b \ A. \ r \ (\M \ acc(multirel1(A, r)). M +# {#b#}:acc(multirel1(A, r))); M0 \ acc(multirel1(A, r)); a \ A; - \M. \ multirel1(A, r) --> M +# {#a#} \ acc(multirel1(A, r)) |] + \M. \ multirel1(A, r) \ M +# {#a#} \ acc(multirel1(A, r)) |] ==> M0 +# {#a#} \ acc(multirel1(A, r))" apply (subgoal_tac "M0 \ Mult(A) ") prefer 2 @@ -822,7 +822,7 @@ done lemma lemma2: "[| \b \ A. \ r - --> (\M \ acc(multirel1(A, r)). M +# {#b#} :acc(multirel1(A, r))); + \ (\M \ acc(multirel1(A, r)). M +# {#b#} :acc(multirel1(A, r))); M \ acc(multirel1(A, r)); a \ A|] ==> M +# {#a#} \ acc(multirel1(A, r))" apply (erule acc_induct) apply (blast intro: lemma1) @@ -834,8 +834,8 @@ apply (blast intro: lemma2) done -lemma lemma4: "multiset(M) ==> mset_of(M)\A --> - wf[A](r) --> M \ field(multirel1(A, r)) --> M \ acc(multirel1(A, r))" +lemma lemma4: "multiset(M) ==> mset_of(M)\A \ + wf[A](r) \ M \ field(multirel1(A, r)) \ M \ acc(multirel1(A, r))" apply (erule multiset_induct) (* proving the base case *) apply clarify @@ -899,7 +899,7 @@ (* Equivalence of multirel with the usual (closure-free) def *) -lemma add_diff_eq: "k \ nat ==> 0 < k --> n #+ k #- 1 = n #+ (k #- 1)" +lemma add_diff_eq: "k \ nat ==> 0 < k \ n #+ k #- 1 = n #+ (k #- 1)" by (erule nat_induct, auto) lemma mdiff_union_single_conv: "[|a \ mset_of(J); multiset(I); multiset(J) |] @@ -910,14 +910,14 @@ apply (auto dest: domain_type simp add: add_diff_eq) done -lemma diff_add_commute: "[| n le m; m \ nat; n \ nat; k \ nat |] ==> m #- n #+ k = m #+ k #- n" +lemma diff_add_commute: "[| n \ m; m \ nat; n \ nat; k \ nat |] ==> m #- n #+ k = m #+ k #- n" by (auto simp add: le_iff less_iff_succ_add) (* One direction *) lemma multirel_implies_one_step: " \ multirel(A, r) ==> - trans[A](r) --> + trans[A](r) \ (\I J K. I \ Mult(A) & J \ Mult(A) & K \ Mult(A) & N = I +# J & M = I +# K & J \ 0 & @@ -986,7 +986,7 @@ (\I J K. I \ Mult(A) & J \ Mult(A) & K \ Mult(A) & (msize(J) = $# n & J \0 & (\k \ mset_of(K). \j \ mset_of(J). \ r)) - --> \ multirel(A, r))" + \ \ multirel(A, r))" apply (simp add: Mult_iff_multiset) apply (erule nat_induct, clarify) apply (drule_tac M = J in msize_eq_0_iff, auto) @@ -1039,7 +1039,7 @@ (*irreflexivity*) lemma multirel_irrefl_lemma: - "Finite(A) ==> part_ord(A, r) --> (\x \ A. \y \ A. \ r) -->A=0" + "Finite(A) ==> part_ord(A, r) \ (\x \ A. \y \ A. \ r) \A=0" apply (erule Finite_induct) apply (auto dest: subset_consI [THEN [2] part_ord_subset]) apply (auto simp add: part_ord_def irrefl_def) @@ -1152,7 +1152,7 @@ lemma munion_omultiset [simp]: "[| omultiset(M); omultiset(N) |] ==> omultiset(M +# N)" apply (simp add: omultiset_def, clarify) -apply (rule_tac x = "i Un ia" in exI) +apply (rule_tac x = "i \ ia" in exI) apply (simp add: Mult_iff_multiset Ord_Un Un_subset_iff) apply (blast intro: field_Memrel_mono) done @@ -1173,7 +1173,7 @@ apply (drule_tac i = x in ltI [THEN lt_irrefl], auto) done -lemma trans_iff_trans_on: "trans(r) <-> trans[field(r)](r)" +lemma trans_iff_trans_on: "trans(r) \ trans[field(r)](r)" by (simp add: trans_on_def trans_def, auto) lemma part_ord_Memrel: "Ord(i) ==>part_ord(field(Memrel(i)), Memrel(i))" @@ -1204,7 +1204,7 @@ (*transitivity*) lemma mless_trans: "[| K <# M; M <# N |] ==> K <# N" apply (simp add: mless_def, clarify) -apply (rule_tac x = "i Un ia" in exI) +apply (rule_tac x = "i \ ia" in exI) apply (blast dest: multirel_Memrel_mono [OF Un_upper1 Un_upper1, THEN subsetD] multirel_Memrel_mono [OF Un_upper2 Un_upper2, THEN subsetD] intro: multirel_trans Ord_Un) @@ -1236,14 +1236,14 @@ apply (blast intro: mless_trans) done -lemma mless_le_iff: "M <# N <-> (M <#= N & M \ N)" +lemma mless_le_iff: "M <# N \ (M <#= N & M \ N)" by (simp add: mle_def, auto) (** Monotonicity of mless **) lemma munion_less_mono2: "[| M <# N; omultiset(K) |] ==> K +# M <# K +# N" apply (simp add: mless_def omultiset_def, clarify) -apply (rule_tac x = "i Un ia" in exI) +apply (rule_tac x = "i \ ia" in exI) apply (simp add: Mult_iff_multiset Ord_Un Un_subset_iff) apply (rule munion_multirel_mono2) apply (blast intro: multirel_Memrel_mono [THEN subsetD]) diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/Induct/Mutil.thy --- a/src/ZF/Induct/Mutil.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/Induct/Mutil.thy Tue Mar 06 16:46:27 2012 +0000 @@ -24,10 +24,10 @@ type_intros empty_subsetI cons_subsetI PowI SigmaI nat_succI inductive - domains "tiling(A)" \ "Pow(Union(A))" + domains "tiling(A)" \ "Pow(\(A))" intros empty: "0 \ tiling(A)" - Un: "[| a \ A; t \ tiling(A); a Int t = 0 |] ==> a Un t \ tiling(A)" + Un: "[| a \ A; t \ tiling(A); a \ t = 0 |] ==> a \ t \ tiling(A)" type_intros empty_subsetI Union_upper Un_least PowI type_elims PowD [elim_format] @@ -38,7 +38,7 @@ subsection {* Basic properties of evnodd *} -lemma evnodd_iff: ": evnodd(A,b) <-> : A & (i#+j) mod 2 = b" +lemma evnodd_iff: ": evnodd(A,b) \ : A & (i#+j) mod 2 = b" by (unfold evnodd_def) blast lemma evnodd_subset: "evnodd(A, b) \ A" @@ -47,7 +47,7 @@ lemma Finite_evnodd: "Finite(X) ==> Finite(evnodd(X,b))" by (rule lepoll_Finite, rule subset_imp_lepoll, rule evnodd_subset) -lemma evnodd_Un: "evnodd(A Un B, b) = evnodd(A,b) Un evnodd(B,b)" +lemma evnodd_Un: "evnodd(A \ B, b) = evnodd(A,b) \ evnodd(B,b)" by (simp add: evnodd_def Collect_Un) lemma evnodd_Diff: "evnodd(A - B, b) = evnodd(A,b) - evnodd(B,b)" @@ -83,7 +83,7 @@ text {* The union of two disjoint tilings is a tiling *} lemma tiling_UnI: - "t \ tiling(A) ==> u \ tiling(A) ==> t Int u = 0 ==> t Un u \ tiling(A)" + "t \ tiling(A) ==> u \ tiling(A) ==> t \ u = 0 ==> t \ u \ tiling(A)" apply (induct set: tiling) apply (simp add: tiling.intros) apply (simp add: Un_assoc subset_empty_iff [THEN iff_sym]) @@ -108,7 +108,7 @@ apply simp apply assumption apply safe - apply (subgoal_tac "\p b. p \ evnodd (a,b) --> p\evnodd (t,b)") + apply (subgoal_tac "\p b. p \ evnodd (a,b) \ p\evnodd (t,b)") apply (simp add: evnodd_Un Un_cons tiling_domino_Finite evnodd_subset [THEN subset_Finite] Finite_imp_cardinal_cons) apply (blast dest!: evnodd_subset [THEN subsetD] elim: equalityE) @@ -123,7 +123,7 @@ prefer 2 apply assumption apply (rename_tac n') apply (subgoal_tac (*seems the easiest way of turning one to the other*) - "{i}*{succ (n'#+n') } Un {i}*{n'#+n'} = + "{i}*{succ (n'#+n') } \ {i}*{n'#+n'} = {, }") prefer 2 apply blast apply (simp add: domino.horiz) diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/Induct/PropLog.thy --- a/src/ZF/Induct/PropLog.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/Induct/PropLog.thy Tue Mar 06 16:46:27 2012 +0000 @@ -68,13 +68,13 @@ "is_true(p,t) == is_true_fun(p,t) = 1" -- {* this definition is required since predicates can't be recursive *} -lemma is_true_Fls [simp]: "is_true(Fls,t) <-> False" +lemma is_true_Fls [simp]: "is_true(Fls,t) \ False" by (simp add: is_true_def) -lemma is_true_Var [simp]: "is_true(#v,t) <-> v \ t" +lemma is_true_Var [simp]: "is_true(#v,t) \ v \ t" by (simp add: is_true_def) -lemma is_true_Imp [simp]: "is_true(p=>q,t) <-> (is_true(p,t)-->is_true(q,t))" +lemma is_true_Imp [simp]: "is_true(p=>q,t) \ (is_true(p,t)\is_true(q,t))" by (simp add: is_true_def) @@ -87,7 +87,7 @@ definition logcon :: "[i,i] => o" (infixl "|=" 50) where - "H |= p == \t. (\q \ H. is_true(q,t)) --> is_true(p,t)" + "H |= p == \t. (\q \ H. is_true(q,t)) \ is_true(p,t)" text {* @@ -335,7 +335,7 @@ apply (blast intro: propn_Is) done -theorem thms_iff: "H \ Fin(propn) ==> H |- p <-> H |= p \ p \ propn" +theorem thms_iff: "H \ Fin(propn) ==> H |- p \ H |= p \ p \ propn" by (blast intro: soundness completeness thms_in_pl) end diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/ex/CoUnit.thy --- a/src/ZF/ex/CoUnit.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/ex/CoUnit.thy Tue Mar 06 16:46:27 2012 +0000 @@ -27,7 +27,7 @@ inductive_cases ConE: "Con(x) \ counit" -- {* USELESS because folding on @{term "Con(xa) == xa"} fails. *} -lemma Con_iff: "Con(x) = Con(y) <-> x = y" +lemma Con_iff: "Con(x) = Con(y) \ x = y" -- {* Proving freeness results. *} by (auto elim!: counit.free_elims) @@ -55,7 +55,7 @@ inductive_cases Con2E: "Con2(x, y) \ counit2" -lemma Con2_iff: "Con2(x, y) = Con2(x', y') <-> x = x' & y = y'" +lemma Con2_iff: "Con2(x, y) = Con2(x', y') \ x = x' & y = y'" -- {* Proving freeness results. *} by (fast elim!: counit2.free_elims) @@ -73,7 +73,7 @@ done lemma counit2_Int_Vset_subset [rule_format]: - "Ord(i) ==> \x y. x \ counit2 --> y \ counit2 --> x Int Vset(i) \ y" + "Ord(i) ==> \x y. x \ counit2 \ y \ counit2 \ x \ Vset(i) \ y" -- {* Lemma for proving finality. *} apply (erule trans_induct) apply (tactic "safe_tac (put_claset subset_cs @{context})") diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/ex/Commutation.thy --- a/src/ZF/ex/Commutation.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/ex/Commutation.thy Tue Mar 06 16:46:27 2012 +0000 @@ -10,7 +10,7 @@ definition square :: "[i, i, i, i] => o" where "square(r,s,t,u) == - (\a b. \ r --> (\c. \ s --> (\x. \ t & \ u)))" + (\a b. \ r \ (\c. \ s \ (\x. \ t & \ u)))" definition commute :: "[i, i] => o" where @@ -26,7 +26,7 @@ definition Church_Rosser :: "i => o" where - "Church_Rosser(r) == (\x y. \ (r Un converse(r))^* --> + "Church_Rosser(r) == (\x y. \ (r \ converse(r))^* \ (\z. \ r^* & \ r^*))" definition @@ -79,11 +79,11 @@ apply (simp_all add: rtrancl_field) done -lemma commute_Un: "[| commute(r,t); commute(s,t) |] ==> commute(r Un s, t)" +lemma commute_Un: "[| commute(r,t); commute(s,t) |] ==> commute(r \ s, t)" unfolding commute_def square_def by blast lemma diamond_Un: - "[| diamond(r); diamond(s); commute(r, s) |] ==> diamond(r Un s)" + "[| diamond(r); diamond(s); commute(r, s) |] ==> diamond(r \ s)" unfolding diamond_def by (blast intro: commute_Un commute_sym) lemma diamond_confluent: @@ -94,7 +94,7 @@ lemma confluent_Un: "[| confluent(r); confluent(s); commute(r^*, s^*); - relation(r); relation(s) |] ==> confluent(r Un s)" + relation(r); relation(s) |] ==> confluent(r \ s)" apply (unfold confluent_def) apply (rule rtrancl_Un_rtrancl [THEN subst], auto) apply (blast dest: diamond_Un intro: diamond_confluent [THEN confluentD]) @@ -136,7 +136,7 @@ done -lemma Church_Rosser: "Church_Rosser(r) <-> confluent(r)" +lemma Church_Rosser: "Church_Rosser(r) \ confluent(r)" by (blast intro: Church_Rosser1 Church_Rosser2) end diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/ex/Group.thy --- a/src/ZF/ex/Group.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/ex/Group.thy Tue Mar 06 16:46:27 2012 +0000 @@ -105,7 +105,7 @@ proof - have l_cancel [simp]: "\x y z. \x \ carrier(G); y \ carrier(G); z \ carrier(G)\ \ - (x \ y = x \ z) <-> (y = z)" + (x \ y = x \ z) \ (y = z)" proof fix x y z assume G: "x \ carrier(G)" "y \ carrier(G)" "z \ carrier(G)" @@ -178,7 +178,7 @@ lemma (in group) l_cancel [simp]: assumes "x \ carrier(G)" "y \ carrier(G)" "z \ carrier(G)" - shows "(x \ y = x \ z) <-> (y = z)" + shows "(x \ y = x \ z) \ (y = z)" proof assume eq: "x \ y = x \ z" hence "(inv x \ x) \ y = (inv x \ x) \ z" @@ -191,7 +191,7 @@ lemma (in group) r_cancel [simp]: assumes "x \ carrier(G)" "y \ carrier(G)" "z \ carrier(G)" - shows "(y \ x = z \ x) <-> (y = z)" + shows "(y \ x = z \ x) \ (y = z)" proof assume eq: "y \ x = z \ x" then have "y \ (x \ inv x) = z \ (x \ inv x)" @@ -679,9 +679,9 @@ text{*Alternative characterization of normal subgroups*} lemma (in group) normal_inv_iff: - "(N \ G) <-> + "(N \ G) \ (subgroup(N,G) & (\x \ carrier(G). \h \ N. x \ h \ (inv x) \ N))" - (is "_ <-> ?rhs") + (is "_ \ ?rhs") proof assume N: "N \ G" show ?rhs diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/ex/LList.thy --- a/src/ZF/ex/LList.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/ex/LList.thy Tue Mar 06 16:46:27 2012 +0000 @@ -30,7 +30,7 @@ standard pairs work just as well. To use variant pairs, must change prefix a q/Q to the Sigma, Pair and converse rules.*) coinductive - domains "lleq(A)" <= "llist(A) * llist(A)" + domains "lleq(A)" \ "llist(A) * llist(A)" intros LNil: " \ lleq(A)" LCons: "[| a \ A; \ lleq(A) |] @@ -74,7 +74,7 @@ inductive_cases LConsE: "LCons(a,l) \ llist(A)" (*Proving freeness results*) -lemma LCons_iff: "LCons(a,l)=LCons(a',l') <-> a=a' & l=l'" +lemma LCons_iff: "LCons(a,l)=LCons(a',l') \ a=a' & l=l'" by auto lemma LNil_LCons_iff: "~ LNil=LCons(a,l)" @@ -107,7 +107,7 @@ declare Ord_in_Ord [elim!] lemma llist_quniv_lemma [rule_format]: - "Ord(i) ==> \l \ llist(quniv(A)). l Int Vset(i) \ univ(eclose(A))" + "Ord(i) ==> \l \ llist(quniv(A)). l \ Vset(i) \ univ(eclose(A))" apply (erule trans_induct) apply (rule ballI) apply (erule llist.cases) @@ -135,7 +135,7 @@ (*Lemma for proving finality. Unfold the lazy list; use induction hypothesis*) lemma lleq_Int_Vset_subset [rule_format]: - "Ord(i) ==> \l l'. \ lleq(A) --> l Int Vset(i) \ l'" + "Ord(i) ==> \l l'. \ lleq(A) \ l \ Vset(i) \ l'" apply (erule trans_induct) apply (intro allI impI) apply (erule lleq.cases) @@ -200,7 +200,7 @@ flip_LCons [simp] not_type [simp] -lemma bool_Int_subset_univ: "b \ bool ==> b Int X \ univ(eclose(A))" +lemma bool_Int_subset_univ: "b \ bool ==> b \ X \ univ(eclose(A))" by (fast intro: Int_lower1 [THEN subset_trans] elim!: boolE) declare not_type [intro!] @@ -209,7 +209,7 @@ (*Reasoning borrowed from lleq.ML; a similar proof works for all "productive" functions -- cf Coquand's "Infinite Objects in Type Theory".*) lemma flip_llist_quniv_lemma [rule_format]: - "Ord(i) ==> \l \ llist(bool). flip(l) Int Vset(i) \ univ(eclose(bool))" + "Ord(i) ==> \l \ llist(bool). flip(l) \ Vset(i) \ univ(eclose(bool))" apply (erule trans_induct) apply (rule ballI) apply (erule llist.cases, simp_all) diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/ex/Limit.thy --- a/src/ZF/ex/Limit.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/ex/Limit.thy Tue Mar 06 16:46:27 2012 +0000 @@ -7,13 +7,13 @@ The following paper comments on the formalization: "A Comparison of HOL-ST and Isabelle/ZF" by Sten Agerholm -In Proceedings of the First Isabelle Users Workshop, Technical +In Proceedings of the First Isabelle Users Workshop, Technical Report No. 379, University of Cambridge Computer Laboratory, 1995. This is a condensed version of: "A Comparison of HOL-ST and Isabelle/ZF" by Sten Agerholm -Technical Report No. 369, University of Cambridge Computer +Technical Report No. 369, University of Cambridge Computer Laboratory, 1995. *) @@ -32,8 +32,8 @@ "po(D) == (\x \ set(D). rel(D,x,x)) & (\x \ set(D). \y \ set(D). \z \ set(D). - rel(D,x,y) --> rel(D,y,z) --> rel(D,x,z)) & - (\x \ set(D). \y \ set(D). rel(D,x,y) --> rel(D,y,x) --> x = y)" + rel(D,x,y) \ rel(D,y,z) \ rel(D,x,z)) & + (\x \ set(D). \y \ set(D). rel(D,x,y) \ rel(D,y,x) \ x = y)" definition chain :: "[i,i]=>o" where @@ -46,7 +46,7 @@ definition islub :: "[i,i,i]=>o" where - "islub(D,X,x) == isub(D,X,x) & (\y. isub(D,X,y) --> rel(D,x,y))" + "islub(D,X,x) == isub(D,X,x) & (\y. isub(D,X,y) \ rel(D,x,y))" definition lub :: "[i,i]=>i" where @@ -54,7 +54,7 @@ definition cpo :: "i=>o" where - "cpo(D) == po(D) & (\X. chain(D,X) --> (\x. islub(D,X,x)))" + "cpo(D) == po(D) & (\X. chain(D,X) \ (\x. islub(D,X,x)))" definition pcpo :: "i=>o" where @@ -68,13 +68,13 @@ mono :: "[i,i]=>i" where "mono(D,E) == {f \ set(D)->set(E). - \x \ set(D). \y \ set(D). rel(D,x,y) --> rel(E,f`x,f`y)}" + \x \ set(D). \y \ set(D). rel(D,x,y) \ rel(E,f`x,f`y)}" definition cont :: "[i,i]=>i" where "cont(D,E) == {f \ mono(D,E). - \X. chain(D,X) --> f`(lub(D,X)) = lub(E,\n \ nat. f`(X`n))}" + \X. chain(D,X) \ f`(lub(D,X)) = lub(E,\n \ nat. f`(X`n))}" definition cf :: "[i,i]=>i" where @@ -134,8 +134,8 @@ subcpo :: "[i,i]=>o" where "subcpo(D,E) == set(D) \ set(E) & - (\x \ set(D). \y \ set(D). rel(D,x,y) <-> rel(E,x,y)) & - (\X. chain(D,X) --> lub(E,X):set(D))" + (\x \ set(D). \y \ set(D). rel(D,x,y) \ rel(E,x,y)) & + (\X. chain(D,X) \ lub(E,X):set(D))" definition subpcpo :: "[i,i]=>o" where @@ -154,13 +154,13 @@ definition e_less :: "[i,i,i,i]=>i" where - (* Valid for m le n only. *) + (* Valid for m \ n only. *) "e_less(DD,ee,m,n) == rec(n#-m,id(set(DD`m)),%x y. ee`(m#+x) O y)" definition e_gr :: "[i,i,i,i]=>i" where - (* Valid for n le m only. *) + (* Valid for n \ m only. *) "e_gr(DD,ee,m,n) == rec(m#-n,id(set(DD`n)), %x y. y O Rp(DD`(n#+x),DD`(succ(n#+x)),ee`(n#+x)))" @@ -168,7 +168,7 @@ definition eps :: "[i,i,i,i]=>i" where - "eps(DD,ee,m,n) == if(m le n,e_less(DD,ee,m,n),e_gr(DD,ee,m,n))" + "eps(DD,ee,m,n) == if(m \ n,e_less(DD,ee,m,n),e_gr(DD,ee,m,n))" definition rho_emb :: "[i,i,i]=>i" where @@ -182,7 +182,7 @@ commute :: "[i,i,i,i=>i]=>o" where "commute(DD,ee,E,r) == (\n \ nat. emb(DD`n,E,r(n))) & - (\m \ nat. \n \ nat. m le n --> r(n) O eps(DD,ee,m,n) = r(m))" + (\m \ nat. \n \ nat. m \ n \ r(n) O eps(DD,ee,m,n) = r(m))" definition mediating :: "[i,i,i=>i,i=>i,i]=>o" where @@ -224,7 +224,7 @@ "[| !!x. x \ set(D) ==> rel(D,x,x); !!x y z. [| rel(D,x,y); rel(D,y,z); x \ set(D); y \ set(D); z \ set(D)|] ==> rel(D,x,z); - !!x y. [| rel(D,x,y); rel(D,y,x); x \ set(D); y \ set(D)|] ==> x=y |] + !!x y. [| rel(D,x,y); rel(D,y,x); x \ set(D); y \ set(D)|] ==> x=y |] ==> po(D)" by (unfold po_def, blast) @@ -323,7 +323,7 @@ done lemma chain_rel_gen: - "[|n le m; chain(D,X); cpo(D); m \ nat|] ==> rel(D,X`n,X`m)" + "[|n \ m; chain(D,X); cpo(D); m \ nat|] ==> rel(D,X`n,X`m)" apply (frule lt_nat_in_nat, erule nat_succI) apply (erule rev_mp) (*prepare the induction*) apply (induct_tac m) @@ -382,14 +382,14 @@ (*----------------------------------------------------------------------*) lemma isub_suffix: - "[| chain(D,X); cpo(D) |] ==> isub(D,suffix(X,n),x) <-> isub(D,X,x)" + "[| chain(D,X); cpo(D) |] ==> isub(D,suffix(X,n),x) \ isub(D,X,x)" apply (simp add: isub_def suffix_def, safe) apply (drule_tac x = na in bspec) apply (auto intro: cpo_trans chain_rel_gen_add) done lemma islub_suffix: - "[|chain(D,X); cpo(D)|] ==> islub(D,suffix(X,n),x) <-> islub(D,X,x)" + "[|chain(D,X); cpo(D)|] ==> islub(D,suffix(X,n),x) \ islub(D,X,x)" by (simp add: islub_def isub_suffix) lemma lub_suffix: @@ -401,7 +401,7 @@ (*----------------------------------------------------------------------*) lemma dominateI: - "[| !!m. m \ nat ==> n(m):nat; !!m. m \ nat ==> rel(D,X`m,Y`n(m))|] + "[| !!m. m \ nat ==> n(m):nat; !!m. m \ nat ==> rel(D,X`m,Y`n(m))|] ==> dominate(D,X,Y)" by (simp add: dominate_def, blast) @@ -426,7 +426,7 @@ lemma dominate_islub_eq: "[|dominate(D,X,Y); subchain(Y,X); islub(D,X,x); islub(D,Y,y); cpo(D); X \ nat->set(D); Y \ nat->set(D)|] ==> x = y" -by (blast intro: cpo_antisym dominate_islub islub_least subchain_isub +by (blast intro: cpo_antisym dominate_islub islub_least subchain_isub islub_isub islub_in) @@ -488,19 +488,19 @@ shows "matrix(D,M)" proof - { - fix n m assume "n : nat" "m : nat" + fix n m assume "n \ nat" "m \ nat" with chain_rel [OF yprem] have "rel(D, M ` n ` m, M ` succ(n) ` m)" by simp } note rel_succ = this show "matrix(D,M)" proof (simp add: matrix_def Mfun rel_succ, intro conjI ballI) - fix n m assume n: "n : nat" and m: "m : nat" + fix n m assume n: "n \ nat" and m: "m \ nat" thus "rel(D, M ` n ` m, M ` n ` succ(m))" by (simp add: chain_rel xprem) next - fix n m assume n: "n : nat" and m: "m : nat" + fix n m assume n: "n \ nat" and m: "m \ nat" thus "rel(D, M ` n ` m, M ` succ(n) ` succ(m))" - by (rule cpo_trans [OF cpoD rel_succ], + by (rule cpo_trans [OF cpoD rel_succ], simp_all add: chain_fun [THEN apply_type] xprem) qed qed @@ -511,31 +511,31 @@ by simp lemma isub_lemma: - "[|isub(D, \n \ nat. M`n`n, y); matrix(D,M); cpo(D)|] + "[|isub(D, \n \ nat. M`n`n, y); matrix(D,M); cpo(D)|] ==> isub(D, \n \ nat. lub(D,\m \ nat. M`n`m), y)" proof (simp add: isub_def, safe) fix n - assume DM: "matrix(D, M)" and D: "cpo(D)" and n: "n \ nat" and y: "y \ set(D)" + assume DM: "matrix(D, M)" and D: "cpo(D)" and n: "n \ nat" and y: "y \ set(D)" and rel: "\n\nat. rel(D, M ` n ` n, y)" have "rel(D, lub(D, M ` n), y)" proof (rule matrix_chain_left [THEN cpo_lub, THEN islub_least], simp_all add: n D DM) - show "isub(D, M ` n, y)" + show "isub(D, M ` n, y)" proof (unfold isub_def, intro conjI ballI y) fix k assume k: "k \ nat" show "rel(D, M ` n ` k, y)" - proof (cases "n le k") - case True - hence yy: "rel(D, M`n`k, M`k`k)" - by (blast intro: lemma2 n k y DM D chain_rel_gen matrix_chain_right) + proof (cases "n \ k") + case True + hence yy: "rel(D, M`n`k, M`k`k)" + by (blast intro: lemma2 n k y DM D chain_rel_gen matrix_chain_right) show "?thesis" - by (rule cpo_trans [OF D yy], + by (rule cpo_trans [OF D yy], simp_all add: k rel n y DM matrix_in) next case False - hence le: "k le n" - by (blast intro: not_le_iff_lt [THEN iffD1, THEN leI] nat_into_Ord n k) + hence le: "k \ n" + by (blast intro: not_le_iff_lt [THEN iffD1, THEN leI] nat_into_Ord n k) show "?thesis" - by (rule cpo_trans [OF D chain_rel_gen [OF le]], + by (rule cpo_trans [OF D chain_rel_gen [OF le]], simp_all add: n y k rel DM D matrix_chain_left) qed qed @@ -550,7 +550,7 @@ proof (simp add: chain_def, intro conjI ballI) assume "matrix(D, M)" "cpo(D)" thus "(\x\nat. lub(D, Lambda(nat, op `(M ` x)))) \ nat \ set(D)" - by (force intro: islub_in cpo_lub chainI lam_type matrix_in matrix_rel_0_1) + by (force intro: islub_in cpo_lub chainI lam_type matrix_in matrix_rel_0_1) next fix n assume DD: "matrix(D, M)" "cpo(D)" "n \ nat" @@ -558,24 +558,24 @@ by (force simp add: dominate_def intro: matrix_rel_1_0) with DD show "rel(D, lub(D, Lambda(nat, op `(M ` n))), lub(D, Lambda(nat, op `(M ` succ(n)))))" - by (simp add: matrix_chain_left [THEN chain_fun, THEN eta] + by (simp add: matrix_chain_left [THEN chain_fun, THEN eta] dominate_islub cpo_lub matrix_chain_left chain_fun) qed lemma isub_eq: assumes DM: "matrix(D, M)" and D: "cpo(D)" - shows "isub(D,(\n \ nat. lub(D,\m \ nat. M`n`m)),y) <-> isub(D,(\n \ nat. M`n`n),y)" + shows "isub(D,(\n \ nat. lub(D,\m \ nat. M`n`m)),y) \ isub(D,(\n \ nat. M`n`n),y)" proof assume isub: "isub(D, \n\nat. lub(D, Lambda(nat, op `(M ` n))), y)" - hence dom: "dominate(D, \n\nat. M ` n ` n, \n\nat. lub(D, Lambda(nat, op `(M ` n))))" + hence dom: "dominate(D, \n\nat. M ` n ` n, \n\nat. lub(D, Lambda(nat, op `(M ` n))))" using DM D by (simp add: dominate_def, intro ballI bexI, simp_all add: matrix_chain_left [THEN chain_fun, THEN eta] islub_ub cpo_lub matrix_chain_left) thus "isub(D, \n\nat. M ` n ` n, y)" using DM D - by - (rule dominate_isub [OF dom isub], + by - (rule dominate_isub [OF dom isub], simp_all add: matrix_chain_diag chain_fun matrix_chain_lub) next - assume isub: "isub(D, \n\nat. M ` n ` n, y)" + assume isub: "isub(D, \n\nat. M ` n ` n, y)" thus "isub(D, \n\nat. lub(D, Lambda(nat, op `(M ` n))), y)" using DM D by (simp add: isub_lemma) qed @@ -591,7 +591,7 @@ by (simp add: lub_def) lemma lub_matrix_diag: - "[|matrix(D,M); cpo(D)|] + "[|matrix(D,M); cpo(D)|] ==> lub(D,(\n \ nat. lub(D,\m \ nat. M`n`m))) = lub(D,(\n \ nat. M`n`n))" apply (simp (no_asm) add: lub_matrix_diag_aux1 lub_matrix_diag_aux2) @@ -599,7 +599,7 @@ done lemma lub_matrix_diag_sym: - "[|matrix(D,M); cpo(D)|] + "[|matrix(D,M); cpo(D)|] ==> lub(D,(\m \ nat. lub(D,\n \ nat. M`n`m))) = lub(D,(\n \ nat. M`n`n))" by (drule matrix_sym_axis [THEN lub_matrix_diag], auto) @@ -610,7 +610,7 @@ lemma monoI: "[|f \ set(D)->set(E); - !!x y. [|rel(D,x,y); x \ set(D); y \ set(D)|] ==> rel(E,f`x,f`y)|] + !!x y. [|rel(D,x,y); x \ set(D); y \ set(D)|] ==> rel(E,f`x,f`y)|] ==> f \ mono(D,E)" by (simp add: mono_def) @@ -627,14 +627,14 @@ lemma contI: "[|f \ set(D)->set(E); !!x y. [|rel(D,x,y); x \ set(D); y \ set(D)|] ==> rel(E,f`x,f`y); - !!X. chain(D,X) ==> f`lub(D,X) = lub(E,\n \ nat. f`(X`n))|] + !!X. chain(D,X) ==> f`lub(D,X) = lub(E,\n \ nat. f`(X`n))|] ==> f \ cont(D,E)" by (simp add: cont_def mono_def) lemma cont2mono: "f \ cont(D,E) ==> f \ mono(D,E)" by (simp add: cont_def) -lemma cont_fun [TC] : "f \ cont(D,E) ==> f \ set(D)->set(E)" +lemma cont_fun [TC]: "f \ cont(D,E) ==> f \ set(D)->set(E)" apply (simp add: cont_def) apply (rule mono_fun, blast) done @@ -684,7 +684,7 @@ (* rel_cf originally an equality. Now stated as two rules. Seemed easiest. *) lemma rel_cfI: - "[|!!x. x \ set(D) ==> rel(E,f`x,g`x); f \ cont(D,E); g \ cont(D,E)|] + "[|!!x. x \ set(D) ==> rel(E,f`x,g`x); f \ cont(D,E); g \ cont(D,E)|] ==> rel(cf(D,E),f,g)" by (simp add: rel_I cf_def) @@ -703,7 +703,7 @@ done lemma matrix_lemma: - "[|chain(cf(D,E),X); chain(D,Xa); cpo(D); cpo(E) |] + "[|chain(cf(D,E),X); chain(D,Xa); cpo(D); cpo(E) |] ==> matrix(E,\x \ nat. \xa \ nat. X`x`(Xa`xa))" apply (rule matrix_chainI, auto) apply (force intro: chainI lam_type apply_funtype cont_fun cf_cont cont_mono) @@ -716,13 +716,13 @@ shows "(\x \ set(D). lub(E, \n \ nat. X ` n ` x)) \ cont(D, E)" proof (rule contI) show "(\x\set(D). lub(E, \n\nat. X ` n ` x)) \ set(D) \ set(E)" - by (blast intro: lam_type chain_cf [THEN cpo_lub, THEN islub_in] ch E) + by (blast intro: lam_type chain_cf [THEN cpo_lub, THEN islub_in] ch E) next fix x y assume xy: "rel(D, x, y)" "x \ set(D)" "y \ set(D)" hence dom: "dominate(E, \n\nat. X ` n ` x, \n\nat. X ` n ` y)" by (force intro: dominateI chain_in [OF ch, THEN cf_cont, THEN cont_mono]) - note chE = chain_cf [OF ch] + note chE = chain_cf [OF ch] from xy show "rel(E, (\x\set(D). lub(E, \n\nat. X ` n ` x)) ` x, (\x\set(D). lub(E, \n\nat. X ` n ` x)) ` y)" by (simp add: dominate_islub [OF dom] cpo_lub [OF chE] E chain_fun [OF chE]) @@ -735,7 +735,7 @@ by (simp add: D E) also have "... = lub(E, \x\nat. lub(E, \n\nat. X ` n ` (Y ` x)))" using matrix_lemma [THEN lub_matrix_diag_sym, OF ch chDY] - by (simp add: D E) + by (simp add: D E) finally have "lub(E, \x\nat. lub(E, \n\nat. X ` x ` (Y ` n))) = lub(E, \x\nat. lub(E, \n\nat. X ` n ` (Y ` x)))" . thus "(\x\set(D). lub(E, \n\nat. X ` n ` x)) ` lub(D, Y) = @@ -745,7 +745,7 @@ qed lemma islub_cf: - "[| chain(cf(D,E),X); cpo(D); cpo(E)|] + "[| chain(cf(D,E),X); cpo(D); cpo(E)|] ==> islub(cf(D,E), X, \x \ set(D). lub(E,\n \ nat. X`n`x))" apply (rule islubI) apply (rule isubI) @@ -774,13 +774,13 @@ apply (assumption | rule cf_cont [THEN cont_fun, THEN apply_type] cf_cont)+ apply (rule fun_extension) apply (assumption | rule cf_cont [THEN cont_fun])+ -apply (blast intro: cpo_antisym rel_cf +apply (blast intro: cpo_antisym rel_cf cf_cont [THEN cont_fun, THEN apply_type]) apply (fast intro: islub_cf) done lemma lub_cf: - "[| chain(cf(D,E),X); cpo(D); cpo(E)|] + "[| chain(cf(D,E),X); cpo(D); cpo(E)|] ==> lub(cf(D,E), X) = (\x \ set(D). lub(E,\n \ nat. X`n`x))" by (blast intro: islub_unique cpo_lub islub_cf cpo_cf) @@ -801,13 +801,13 @@ lemma pcpo_cf: "[|cpo(D); pcpo(E)|] ==> pcpo(cf(D,E))" apply (rule pcpoI) -apply (assumption | +apply (assumption | rule cf_least bot_in const_cont [THEN cont_cf] cf_cont cpo_cf pcpo_cpo)+ done lemma bot_cf: "[|cpo(D); pcpo(E)|] ==> bot(cf(D,E)) = (\x \ set(D).bot(E))" -by (blast intro: bot_unique [symmetric] pcpo_cf cf_least +by (blast intro: bot_unique [symmetric] pcpo_cf cf_least bot_in [THEN const_cont, THEN cont_cf] cf_cont pcpo_cpo) (*----------------------------------------------------------------------*) @@ -838,9 +838,9 @@ lemma comp_mono: "[| f \ cont(D',E); g \ cont(D,D'); f':cont(D',E); g':cont(D,D'); - rel(cf(D',E),f,f'); rel(cf(D,D'),g,g'); cpo(D); cpo(E) |] + rel(cf(D',E),f,f'); rel(cf(D,D'),g,g'); cpo(D); cpo(E) |] ==> rel(cf(D,E),f O g,f' O g')" -apply (rule rel_cfI) +apply (rule rel_cfI) apply (subst comp_cont_apply) apply (rule_tac [3] comp_cont_apply [THEN ssubst]) apply (rule_tac [5] cpo_trans) @@ -848,7 +848,7 @@ done lemma chain_cf_comp: - "[| chain(cf(D',E),X); chain(cf(D,D'),Y); cpo(D); cpo(E)|] + "[| chain(cf(D',E),X); chain(cf(D,D'),Y); cpo(D); cpo(E)|] ==> chain(cf(D,E),\n \ nat. X`n O Y`n)" apply (rule chainI) defer 1 @@ -858,23 +858,23 @@ apply (rule_tac [3] comp_cont_apply [THEN ssubst]) apply (rule_tac [5] cpo_trans) apply (rule_tac [6] rel_cf) -apply (rule_tac [8] cont_mono) -apply (blast intro: lam_type comp_pres_cont cont_cf chain_in [THEN cf_cont] +apply (rule_tac [8] cont_mono) +apply (blast intro: lam_type comp_pres_cont cont_cf chain_in [THEN cf_cont] cont_map chain_rel rel_cf)+ done lemma comp_lubs: - "[| chain(cf(D',E),X); chain(cf(D,D'),Y); cpo(D); cpo(D'); cpo(E)|] + "[| chain(cf(D',E),X); chain(cf(D,D'),Y); cpo(D); cpo(D'); cpo(E)|] ==> lub(cf(D',E),X) O lub(cf(D,D'),Y) = lub(cf(D,E),\n \ nat. X`n O Y`n)" apply (rule fun_extension) apply (rule_tac [3] lub_cf [THEN ssubst]) -apply (assumption | - rule comp_fun cf_cont [THEN cont_fun] cpo_lub [THEN islub_in] +apply (assumption | + rule comp_fun cf_cont [THEN cont_fun] cpo_lub [THEN islub_in] cpo_cf chain_cf_comp)+ apply (simp add: chain_in [THEN cf_cont, THEN comp_cont_apply]) apply (subst comp_cont_apply) apply (assumption | rule cpo_lub [THEN islub_in, THEN cf_cont] cpo_cf)+ -apply (simp add: lub_cf chain_cf chain_in [THEN cf_cont, THEN cont_lub] +apply (simp add: lub_cf chain_cf chain_in [THEN cf_cont, THEN cont_lub] chain_cf [THEN cpo_lub, THEN islub_in]) apply (cut_tac M = "\xa \ nat. \xb \ nat. X`xa` (Y`xb`x)" in lub_matrix_diag) prefer 3 apply simp @@ -968,8 +968,8 @@ lemma projpair_unique: - "[|cpo(D); cpo(E); projpair(D,E,e,p); projpair(D,E,e',p')|] - ==> (e=e')<->(p=p')" + "[|cpo(D); cpo(E); projpair(D,E,e,p); projpair(D,E,e',p')|] + ==> (e=e')\(p=p')" by (blast intro: cpo_antisym projpair_unique_aux1 projpair_unique_aux2 cpo_cf cont_cf dest: projpair_ep_cont) @@ -1036,7 +1036,7 @@ (* Proof in Isa/ZF: 23 lines (compared to 56: 60% reduction). *) lemma comp_lemma: - "[|emb(D,D',e); emb(D',E,e'); cpo(D); cpo(D'); cpo(E)|] + "[|emb(D,D',e); emb(D',E,e'); cpo(D); cpo(D'); cpo(E)|] ==> projpair(D,E,e' O e,(Rp(D,D',e)) O (Rp(D',E,e')))" apply (simp add: projpair_def, safe) apply (assumption | rule comp_pres_cont Rp_cont emb_cont)+ @@ -1090,7 +1090,7 @@ by (simp add: iprod_def rel_def) lemma chain_iprod: - "[|chain(iprod(DD),X); !!n. n \ nat ==> cpo(DD`n); n \ nat|] + "[|chain(iprod(DD),X); !!n. n \ nat ==> cpo(DD`n); n \ nat|] ==> chain(DD`n,\m \ nat. X`m`n)" apply (unfold chain_def, safe) apply (rule lam_type) @@ -1101,7 +1101,7 @@ done lemma islub_iprod: - "[|chain(iprod(DD),X); !!n. n \ nat ==> cpo(DD`n)|] + "[|chain(iprod(DD),X); !!n. n \ nat ==> cpo(DD`n)|] ==> islub(iprod(DD),X,\n \ nat. lub(DD`n,\m \ nat. X`m`n))" apply (simp add: islub_def isub_def, safe) apply (rule iprodI) @@ -1151,7 +1151,7 @@ lemma subcpoI: "[|set(D)<=set(E); - !!x y. [|x \ set(D); y \ set(D)|] ==> rel(D,x,y)<->rel(E,x,y); + !!x y. [|x \ set(D); y \ set(D)|] ==> rel(D,x,y)\rel(E,x,y); !!X. chain(D,X) ==> lub(E,X) \ set(D)|] ==> subcpo(D,E)" by (simp add: subcpo_def) @@ -1159,7 +1159,7 @@ by (simp add: subcpo_def) lemma subcpo_rel_eq: - "[|subcpo(D,E); x \ set(D); y \ set(D)|] ==> rel(D,x,y)<->rel(E,x,y)" + "[|subcpo(D,E); x \ set(D); y \ set(D)|] ==> rel(D,x,y)\rel(E,x,y)" by (simp add: subcpo_def) lemmas subcpo_relD1 = subcpo_rel_eq [THEN iffD1] @@ -1213,7 +1213,7 @@ by (simp add: rel_def mkcpo_def) lemma rel_mkcpo: - "[|x \ set(D); y \ set(D)|] ==> rel(mkcpo(D,P),x,y) <-> rel(D,x,y)" + "[|x \ set(D); y \ set(D)|] ==> rel(mkcpo(D,P),x,y) \ rel(D,x,y)" by (simp add: mkcpo_def rel_def set_def) lemma chain_mkcpo: @@ -1273,7 +1273,7 @@ lemma rel_DinfI: "[|!!n. n \ nat ==> rel(DD`n,x`n,y`n); - x:(\ n \ nat. set(DD`n)); y:(\ n \ nat. set(DD`n))|] + x:(\ n \ nat. set(DD`n)); y:(\ n \ nat. set(DD`n))|] ==> rel(Dinf(DD,ee),x,y)" apply (simp add: Dinf_def) apply (blast intro: rel_mkcpo [THEN iffD2] rel_iprodI iprodI) @@ -1299,7 +1299,7 @@ apply (assumption | rule chain_Dinf emb_chain_cpo)+ apply simp apply (subst Rp_cont [THEN cont_lub]) -apply (assumption | +apply (assumption | rule emb_chain_cpo emb_chain_emb nat_succI chain_iprod chain_Dinf)+ (* Useful simplification, ugly in HOL. *) apply (simp add: Dinf_eq chain_in) @@ -1341,11 +1341,11 @@ by (simp add: e_less_def) lemma le_exists: - "[| m le n; !!x. [|n=m#+x; x \ nat|] ==> Q; n \ nat |] ==> Q" + "[| m \ n; !!x. [|n=m#+x; x \ nat|] ==> Q; n \ nat |] ==> Q" apply (drule less_imp_succ_add, auto) done -lemma e_less_le: "[| m le n; n \ nat |] +lemma e_less_le: "[| m \ n; n \ nat |] ==> e_less(DD,ee,m,succ(n)) = ee`n O e_less(DD,ee,m,n)" apply (rule le_exists, assumption) apply (simp add: e_less_add, assumption) @@ -1358,7 +1358,7 @@ by (simp add: e_less_le e_less_eq) lemma e_less_succ_emb: - "[|!!n. n \ nat ==> emb(DD`n,DD`succ(n),ee`n); m \ nat|] + "[|!!n. n \ nat ==> emb(DD`n,DD`succ(n),ee`n); m \ nat|] ==> e_less(DD,ee,m,succ(m)) = ee`m" apply (simp add: e_less_succ) apply (blast intro: emb_cont cont_fun comp_id) @@ -1370,7 +1370,7 @@ lemma emb_e_less_add: "[| emb_chain(DD,ee); m \ nat |] ==> emb(DD`m, DD`(m#+k), e_less(DD,ee,m,m#+k))" -apply (subgoal_tac "emb (DD`m, DD` (m#+natify (k)), +apply (subgoal_tac "emb (DD`m, DD` (m#+natify (k)), e_less (DD,ee,m,m#+natify (k))) ") apply (rule_tac [2] n = "natify (k) " in nat_induct) apply (simp_all add: e_less_eq) @@ -1380,7 +1380,7 @@ done lemma emb_e_less: - "[| m le n; emb_chain(DD,ee); n \ nat |] + "[| m \ n; emb_chain(DD,ee); n \ nat |] ==> emb(DD`m, DD`n, e_less(DD,ee,m,n))" apply (frule lt_nat_in_nat) apply (erule nat_succI) @@ -1397,8 +1397,8 @@ Therefore this theorem is only a lemma. *) lemma e_less_split_add_lemma [rule_format]: - "[| emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] - ==> n le k --> + "[| emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] + ==> n \ k \ e_less(DD,ee,m,m#+k) = e_less(DD,ee,m#+n,m#+k) O e_less(DD,ee,m,m#+n)" apply (induct_tac k) apply (simp add: e_less_eq id_type [THEN id_comp]) @@ -1419,7 +1419,7 @@ done lemma e_less_split_add: - "[| n le k; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] + "[| n \ k; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] ==> e_less(DD,ee,m,m#+k) = e_less(DD,ee,m#+n,m#+k) O e_less(DD,ee,m,m#+n)" by (blast intro: e_less_split_add_lemma) @@ -1428,13 +1428,13 @@ by (simp add: e_gr_def) lemma e_gr_add: - "[|n \ nat; k \ nat|] + "[|n \ nat; k \ nat|] ==> e_gr(DD,ee,succ(n#+k),n) = e_gr(DD,ee,n#+k,n) O Rp(DD`(n#+k),DD`succ(n#+k),ee`(n#+k))" by (simp add: e_gr_def) lemma e_gr_le: - "[|n le m; m \ nat; n \ nat|] + "[|n \ m; m \ nat; n \ nat|] ==> e_gr(DD,ee,succ(m),n) = e_gr(DD,ee,m,n) O Rp(DD`m,DD`succ(m),ee`m)" apply (erule le_exists) apply (simp add: e_gr_add, assumption+) @@ -1445,14 +1445,14 @@ by (simp add: e_gr_le e_gr_eq) (* Cpo asm's due to THE uniqueness. *) -lemma e_gr_succ_emb: "[|emb_chain(DD,ee); m \ nat|] +lemma e_gr_succ_emb: "[|emb_chain(DD,ee); m \ nat|] ==> e_gr(DD,ee,succ(m),m) = Rp(DD`m,DD`succ(m),ee`m)" apply (simp add: e_gr_succ) apply (blast intro: id_comp Rp_cont cont_fun emb_chain_cpo emb_chain_emb) done lemma e_gr_fun_add: - "[|emb_chain(DD,ee); n \ nat; k \ nat|] + "[|emb_chain(DD,ee); n \ nat; k \ nat|] ==> e_gr(DD,ee,n#+k,n): set(DD`(n#+k))->set(DD`n)" apply (induct_tac k) apply (simp add: e_gr_eq id_type) @@ -1461,15 +1461,15 @@ done lemma e_gr_fun: - "[|n le m; emb_chain(DD,ee); m \ nat; n \ nat|] + "[|n \ m; emb_chain(DD,ee); m \ nat; n \ nat|] ==> e_gr(DD,ee,m,n): set(DD`m)->set(DD`n)" apply (rule le_exists, assumption) apply (simp add: e_gr_fun_add, assumption+) done lemma e_gr_split_add_lemma: - "[| emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] - ==> m le k --> + "[| emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] + ==> m \ k \ e_gr(DD,ee,n#+k,n) = e_gr(DD,ee,n#+m,n) O e_gr(DD,ee,n#+k,n#+m)" apply (induct_tac k) apply (rule impI) @@ -1491,19 +1491,19 @@ done lemma e_gr_split_add: - "[| m le k; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] + "[| m \ k; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] ==> e_gr(DD,ee,n#+k,n) = e_gr(DD,ee,n#+m,n) O e_gr(DD,ee,n#+k,n#+m)" apply (blast intro: e_gr_split_add_lemma [THEN mp]) done lemma e_less_cont: - "[|m le n; emb_chain(DD,ee); m \ nat; n \ nat|] + "[|m \ n; emb_chain(DD,ee); m \ nat; n \ nat|] ==> e_less(DD,ee,m,n):cont(DD`m,DD`n)" apply (blast intro: emb_cont emb_e_less) done lemma e_gr_cont: - "[|n le m; emb_chain(DD,ee); m \ nat; n \ nat|] + "[|n \ m; emb_chain(DD,ee); m \ nat; n \ nat|] ==> e_gr(DD,ee,m,n):cont(DD`m,DD`n)" apply (erule rev_mp) apply (induct_tac m) @@ -1520,7 +1520,7 @@ (* Considerably shorter.... 57 against 26 *) lemma e_less_e_gr_split_add: - "[|n le k; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] + "[|n \ k; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] ==> e_less(DD,ee,m,m#+n) = e_gr(DD,ee,m#+k,m#+n) O e_less(DD,ee,m,m#+k)" (* Use mp to prepare for induction. *) apply (erule rev_mp) @@ -1547,7 +1547,7 @@ (* Again considerably shorter, and easy to obtain from the previous thm. *) lemma e_gr_e_less_split_add: - "[|m le k; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] + "[|m \ k; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] ==> e_gr(DD,ee,n#+m,n) = e_gr(DD,ee,n#+k,n) O e_less(DD,ee,n#+m,n#+k)" (* Use mp to prepare for induction. *) apply (erule rev_mp) @@ -1572,7 +1572,7 @@ lemma emb_eps: - "[|m le n; emb_chain(DD,ee); m \ nat; n \ nat|] + "[|m \ n; emb_chain(DD,ee); m \ nat; n \ nat|] ==> emb(DD`m,DD`n,eps(DD,ee,m,n))" apply (simp add: eps_def) apply (blast intro: emb_e_less) @@ -1595,7 +1595,7 @@ by (simp add: eps_def add_le_self) lemma eps_e_less: - "[|m le n; m \ nat; n \ nat|] ==> eps(DD,ee,m,n) = e_less(DD,ee,m,n)" + "[|m \ n; m \ nat; n \ nat|] ==> eps(DD,ee,m,n) = e_less(DD,ee,m,n)" by (simp add: eps_def) lemma eps_e_gr_add: @@ -1603,7 +1603,7 @@ by (simp add: eps_def e_less_eq e_gr_eq) lemma eps_e_gr: - "[|n le m; m \ nat; n \ nat|] ==> eps(DD,ee,m,n) = e_gr(DD,ee,m,n)" + "[|n \ m; m \ nat; n \ nat|] ==> eps(DD,ee,m,n) = e_gr(DD,ee,m,n)" apply (erule le_exists) apply (simp_all add: eps_e_gr_add) done @@ -1627,28 +1627,28 @@ (* Theorems about splitting. *) lemma eps_split_add_left: - "[|n le k; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] + "[|n \ k; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] ==> eps(DD,ee,m,m#+k) = eps(DD,ee,m#+n,m#+k) O eps(DD,ee,m,m#+n)" apply (simp add: eps_e_less add_le_self add_le_mono) apply (auto intro: e_less_split_add) done lemma eps_split_add_left_rev: - "[|n le k; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] + "[|n \ k; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] ==> eps(DD,ee,m,m#+n) = eps(DD,ee,m#+k,m#+n) O eps(DD,ee,m,m#+k)" apply (simp add: eps_e_less_add eps_e_gr add_le_self add_le_mono) apply (auto intro: e_less_e_gr_split_add) done lemma eps_split_add_right: - "[|m le k; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] + "[|m \ k; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] ==> eps(DD,ee,n#+k,n) = eps(DD,ee,n#+m,n) O eps(DD,ee,n#+k,n#+m)" apply (simp add: eps_e_gr add_le_self add_le_mono) apply (auto intro: e_gr_split_add) done lemma eps_split_add_right_rev: - "[|m le k; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] + "[|m \ k; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] ==> eps(DD,ee,n#+m,n) = eps(DD,ee,n#+k,n) O eps(DD,ee,n#+m,n#+k)" apply (simp add: eps_e_gr_add eps_e_less add_le_self add_le_mono) apply (auto intro: e_gr_e_less_split_add) @@ -1657,8 +1657,8 @@ (* Arithmetic *) lemma le_exists_lemma: - "[| n le k; k le m; - !!p q. [|p le q; k=n#+p; m=n#+q; p \ nat; q \ nat|] ==> R; + "[| n \ k; k \ m; + !!p q. [|p \ q; k=n#+p; m=n#+q; p \ nat; q \ nat|] ==> R; m \ nat |]==>R" apply (rule le_exists, assumption) prefer 2 apply (simp add: lt_nat_in_nat) @@ -1666,28 +1666,28 @@ done lemma eps_split_left_le: - "[|m le k; k le n; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] + "[|m \ k; k \ n; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] ==> eps(DD,ee,m,n) = eps(DD,ee,k,n) O eps(DD,ee,m,k)" apply (rule le_exists_lemma, assumption+) apply (auto intro: eps_split_add_left) done lemma eps_split_left_le_rev: - "[|m le n; n le k; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] + "[|m \ n; n \ k; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] ==> eps(DD,ee,m,n) = eps(DD,ee,k,n) O eps(DD,ee,m,k)" apply (rule le_exists_lemma, assumption+) apply (auto intro: eps_split_add_left_rev) done lemma eps_split_right_le: - "[|n le k; k le m; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] + "[|n \ k; k \ m; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] ==> eps(DD,ee,m,n) = eps(DD,ee,k,n) O eps(DD,ee,m,k)" apply (rule le_exists_lemma, assumption+) apply (auto intro: eps_split_add_right) done lemma eps_split_right_le_rev: - "[|n le m; m le k; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] + "[|n \ m; m \ k; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] ==> eps(DD,ee,m,n) = eps(DD,ee,k,n) O eps(DD,ee,m,k)" apply (rule le_exists_lemma, assumption+) apply (auto intro: eps_split_add_right_rev) @@ -1696,7 +1696,7 @@ (* The desired two theorems about `splitting'. *) lemma eps_split_left: - "[|m le k; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] + "[|m \ k; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] ==> eps(DD,ee,m,n) = eps(DD,ee,k,n) O eps(DD,ee,m,k)" apply (rule nat_linear_le) apply (rule_tac [4] eps_split_right_le_rev) @@ -1708,7 +1708,7 @@ done lemma eps_split_right: - "[|n le k; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] + "[|n \ k; emb_chain(DD,ee); m \ nat; n \ nat; k \ nat|] ==> eps(DD,ee,m,n) = eps(DD,ee,k,n) O eps(DD,ee,m,k)" apply (rule nat_linear_le) apply (rule_tac [3] eps_split_left_le_rev) @@ -1726,7 +1726,7 @@ (* Considerably shorter. *) lemma rho_emb_fun: - "[|emb_chain(DD,ee); n \ nat|] + "[|emb_chain(DD,ee); n \ nat|] ==> rho_emb(DD,ee,n): set(DD`n) -> set(Dinf(DD,ee))" apply (simp add: rho_emb_def) apply (assumption | @@ -1742,8 +1742,8 @@ apply (assumption | rule add_le_self nat_0I nat_succI)+ apply (simp add: eps_succ_Rp) apply (subst comp_fun_apply) - apply (assumption | - rule eps_fun nat_succI Rp_cont [THEN cont_fun] + apply (assumption | + rule eps_fun nat_succI Rp_cont [THEN cont_fun] emb_chain_emb emb_chain_cpo refl)+ (* Now the second part of the proof. Slightly different than HOL. *) apply (simp add: eps_e_less nat_succI) @@ -1752,7 +1752,7 @@ apply (subst comp_fun_apply) apply (assumption | rule e_less_cont cont_fun emb_chain_emb emb_cont)+ apply (subst embRp_eq_thm) -apply (assumption | +apply (assumption | rule emb_chain_emb e_less_cont [THEN cont_fun, THEN apply_type] emb_chain_cpo nat_succI)+ apply (simp add: eps_e_less) @@ -1773,13 +1773,13 @@ (* Shorter proof, 23 against 62. *) lemma rho_emb_cont: - "[|emb_chain(DD,ee); n \ nat|] + "[|emb_chain(DD,ee); n \ nat|] ==> rho_emb(DD,ee,n): cont(DD`n,Dinf(DD,ee))" apply (rule contI) apply (assumption | rule rho_emb_fun)+ apply (rule rel_DinfI) apply (simp add: rho_emb_def) -apply (assumption | +apply (assumption | rule eps_cont [THEN cont_mono] Dinf_prod apply_type rho_emb_fun)+ (* Continuity, different order, slightly different proofs. *) apply (subst lub_Dinf) @@ -1788,16 +1788,16 @@ apply simp apply (rule rel_DinfI) apply (simp add: rho_emb_apply2 chain_in) -apply (assumption | - rule eps_cont [THEN cont_mono] chain_rel Dinf_prod +apply (assumption | + rule eps_cont [THEN cont_mono] chain_rel Dinf_prod rho_emb_fun [THEN apply_type] chain_in nat_succI)+ (* Now, back to the result of applying lub_Dinf *) apply (simp add: rho_emb_apply2 chain_in) apply (subst rho_emb_apply1) apply (assumption | rule cpo_lub [THEN islub_in] emb_chain_cpo)+ apply (rule fun_extension) -apply (assumption | - rule lam_type eps_cont [THEN cont_fun, THEN apply_type] +apply (assumption | + rule lam_type eps_cont [THEN cont_fun, THEN apply_type] cpo_lub [THEN islub_in] emb_chain_cpo)+ apply (assumption | rule cont_chain eps_cont emb_chain_cpo)+ apply simp @@ -1807,7 +1807,7 @@ (* 32 vs 61, using safe_tac with imp in asm would be unfortunate (5steps) *) lemma eps1_aux1: - "[|m le n; emb_chain(DD,ee); x \ set(Dinf(DD,ee)); m \ nat; n \ nat|] + "[|m \ n; emb_chain(DD,ee); x \ set(Dinf(DD,ee)); m \ nat; n \ nat|] ==> rel(DD`n,e_less(DD,ee,m,n)`(x`m),x`n)" apply (erule rev_mp) (* For induction proof *) apply (induct_tac n) @@ -1823,16 +1823,16 @@ apply (rule_tac [2] e_less_le [THEN ssubst]) apply (assumption | rule emb_chain_cpo nat_succI)+ apply (subst comp_fun_apply) -apply (assumption | - rule emb_chain_emb [THEN emb_cont] e_less_cont cont_fun apply_type +apply (assumption | + rule emb_chain_emb [THEN emb_cont] e_less_cont cont_fun apply_type Dinf_prod)+ apply (rule_tac y = "x`xa" in emb_chain_emb [THEN emb_cont, THEN cont_mono]) apply (assumption | rule e_less_cont [THEN cont_fun] apply_type Dinf_prod)+ apply (rule_tac x1 = x and n1 = xa in Dinf_eq [THEN subst]) apply (rule_tac [3] comp_fun_apply [THEN subst]) apply (rename_tac [5] y) -apply (rule_tac [5] P = - "%z. rel(DD`succ(y), +apply (rule_tac [5] P = + "%z. rel(DD`succ(y), (ee`y O Rp(?DD(y)`y,?DD(y)`succ(y),?ee(y)`y)) ` (x`succ(y)), z)" in id_conv [THEN subst]) @@ -1851,7 +1851,7 @@ (* 18 vs 40 *) lemma eps1_aux2: - "[|n le m; emb_chain(DD,ee); x \ set(Dinf(DD,ee)); m \ nat; n \ nat|] + "[|n \ m; emb_chain(DD,ee); x \ set(Dinf(DD,ee)); m \ nat; n \ nat|] ==> rel(DD`n,e_gr(DD,ee,m,n)`(x`m),x`n)" apply (erule rev_mp) (* For induction proof *) apply (induct_tac m) @@ -1866,8 +1866,8 @@ apply (subst e_gr_le) apply (rule_tac [4] comp_fun_apply [THEN ssubst]) apply (rule_tac [6] Dinf_eq [THEN ssubst]) -apply (assumption | - rule emb_chain_emb emb_chain_cpo Rp_cont e_gr_cont cont_fun emb_cont +apply (assumption | + rule emb_chain_emb emb_chain_cpo Rp_cont e_gr_cont cont_fun emb_cont apply_type Dinf_prod nat_succI)+ apply (simp add: e_gr_eq) apply (subst id_conv) @@ -1875,7 +1875,7 @@ done lemma eps1: - "[|emb_chain(DD,ee); x \ set(Dinf(DD,ee)); m \ nat; n \ nat|] + "[|emb_chain(DD,ee); x \ set(Dinf(DD,ee)); m \ nat; n \ nat|] ==> rel(DD`n,eps(DD,ee,m,n)`(x`m),x`n)" apply (simp add: eps_def) apply (blast intro: eps1_aux1 not_le_iff_lt [THEN iffD1, THEN leI, THEN eps1_aux2] @@ -1887,7 +1887,7 @@ Look for occurences of rel_cfI, rel_DinfI, etc to evaluate the problem. *) lemma lam_Dinf_cont: - "[| emb_chain(DD,ee); n \ nat |] + "[| emb_chain(DD,ee); n \ nat |] ==> (\x \ set(Dinf(DD,ee)). x`n) \ cont(Dinf(DD,ee),DD`n)" apply (rule contI) apply (assumption | rule lam_type apply_type Dinf_prod)+ @@ -1899,7 +1899,7 @@ done lemma rho_projpair: - "[| emb_chain(DD,ee); n \ nat |] + "[| emb_chain(DD,ee); n \ nat |] ==> projpair(DD`n,Dinf(DD,ee),rho_emb(DD,ee,n),rho_proj(DD,ee,n))" apply (simp add: rho_proj_def) apply (rule projpairI) @@ -1913,23 +1913,23 @@ apply (rule_tac [4] comp_fun_apply [THEN ssubst]) apply (rule_tac [6] beta [THEN ssubst]) apply (rule_tac [7] rho_emb_id [THEN ssubst]) -apply (assumption | +apply (assumption | rule comp_fun id_type lam_type rho_emb_fun Dinf_prod [THEN apply_type] apply_type refl)+ (*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*) -apply (rule rel_cfI) (* ------------------>>>Yields type cond, not in HOL *) +apply (rule rel_cfI) (* ----------------\>>Yields type cond, not in HOL *) apply (subst id_conv) apply (rule_tac [2] comp_fun_apply [THEN ssubst]) apply (rule_tac [4] beta [THEN ssubst]) apply (rule_tac [5] rho_emb_apply1 [THEN ssubst]) -apply (rule_tac [6] rel_DinfI) +apply (rule_tac [6] rel_DinfI) apply (rule_tac [6] beta [THEN ssubst]) (* Dinf_prod bad with lam_type *) apply (assumption | rule eps1 lam_type rho_emb_fun eps_fun Dinf_prod [THEN apply_type] refl)+ -apply (assumption | - rule apply_type eps_fun Dinf_prod comp_pres_cont rho_emb_cont +apply (assumption | + rule apply_type eps_fun Dinf_prod comp_pres_cont rho_emb_cont lam_Dinf_cont id_cont cpo_Dinf emb_chain_cpo)+ done @@ -1937,7 +1937,7 @@ "[| emb_chain(DD,ee); n \ nat |] ==> emb(DD`n,Dinf(DD,ee),rho_emb(DD,ee,n))" by (auto simp add: emb_def intro: exI rho_projpair) -lemma rho_proj_cont: "[| emb_chain(DD,ee); n \ nat |] +lemma rho_proj_cont: "[| emb_chain(DD,ee); n \ nat |] ==> rho_proj(DD,ee,n) \ cont(Dinf(DD,ee),DD`n)" by (auto intro: rho_projpair projpair_p_cont) @@ -1947,7 +1947,7 @@ lemma commuteI: "[| !!n. n \ nat ==> emb(DD`n,E,r(n)); - !!m n. [|m le n; m \ nat; n \ nat|] ==> r(n) O eps(DD,ee,m,n) = r(m) |] + !!m n. [|m \ n; m \ nat; n \ nat|] ==> r(n) O eps(DD,ee,m,n) = r(m) |] ==> commute(DD,ee,E,r)" by (simp add: commute_def) @@ -1956,7 +1956,7 @@ by (simp add: commute_def) lemma commute_eq: - "[| commute(DD,ee,E,r); m le n; m \ nat; n \ nat |] + "[| commute(DD,ee,E,r); m \ n; m \ nat; n \ nat |] ==> r(n) O eps(DD,ee,m,n) = r(m) " by (simp add: commute_def) @@ -1976,17 +1976,17 @@ apply (auto intro: eps_fun) done -lemma le_succ: "n \ nat ==> n le succ(n)" +lemma le_succ: "n \ nat ==> n \ succ(n)" by (simp add: le_succ_iff) (* Shorter proof: 21 vs 83 (106 - 23, due to OAssoc complication) *) lemma commute_chain: - "[| commute(DD,ee,E,r); emb_chain(DD,ee); cpo(E) |] + "[| commute(DD,ee,E,r); emb_chain(DD,ee); cpo(E) |] ==> chain(cf(E,E),\n \ nat. r(n) O Rp(DD`n,E,r(n)))" apply (rule chainI) -apply (blast intro: lam_type cont_cf comp_pres_cont commute_emb Rp_cont - emb_cont emb_chain_cpo, +apply (blast intro: lam_type cont_cf comp_pres_cont commute_emb Rp_cont + emb_cont emb_chain_cpo, simp) apply (rule_tac r1 = r and m1 = n in commute_eq [THEN subst]) apply (assumption | rule le_succ nat_succI)+ @@ -1995,14 +1995,14 @@ apply (rule comp_assoc [THEN subst]) (* comp_assoc is simpler in Isa *) apply (rule_tac r1 = "r (succ (n))" in comp_assoc [THEN ssubst]) apply (rule comp_mono) -apply (blast intro: comp_pres_cont eps_cont emb_eps commute_emb Rp_cont +apply (blast intro: comp_pres_cont eps_cont emb_eps commute_emb Rp_cont emb_cont emb_chain_cpo le_succ)+ apply (rule_tac b="r(succ(n))" in comp_id [THEN subst]) (* 1 subst too much *) apply (rule_tac [2] comp_mono) -apply (blast intro: comp_pres_cont eps_cont emb_eps emb_id commute_emb +apply (blast intro: comp_pres_cont eps_cont emb_eps emb_id commute_emb Rp_cont emb_cont cont_fun emb_chain_cpo le_succ)+ apply (subst comp_id) (* Undoes "1 subst too much", typing next anyway *) -apply (blast intro: cont_fun Rp_cont emb_cont commute_emb cont_cf cpo_cf +apply (blast intro: cont_fun Rp_cont emb_cont commute_emb cont_cf cpo_cf emb_chain_cpo embRp_rel emb_eps le_succ)+ done @@ -2013,14 +2013,14 @@ by (auto intro: commute_chain rho_emb_commute cpo_Dinf) lemma rho_emb_chain_apply1: - "[| emb_chain(DD,ee); x \ set(Dinf(DD,ee)) |] + "[| emb_chain(DD,ee); x \ set(Dinf(DD,ee)) |] ==> chain(Dinf(DD,ee), \n \ nat. (rho_emb(DD,ee,n) O Rp(DD`n,Dinf(DD,ee),rho_emb(DD,ee,n)))`x)" by (drule rho_emb_chain [THEN chain_cf], assumption, simp) lemma chain_iprod_emb_chain: - "[| chain(iprod(DD),X); emb_chain(DD,ee); n \ nat |] + "[| chain(iprod(DD),X); emb_chain(DD,ee); n \ nat |] ==> chain(DD`n,\m \ nat. X `m `n)" by (auto intro: chain_iprod emb_chain_cpo) @@ -2031,7 +2031,7 @@ \xa \ nat. (rho_emb(DD, ee, xa) O Rp(DD ` xa, Dinf(DD, ee),rho_emb(DD, ee, xa))) ` x ` n)" -by (frule rho_emb_chain_apply1 [THEN chain_Dinf, THEN chain_iprod_emb_chain], +by (frule rho_emb_chain_apply1 [THEN chain_Dinf, THEN chain_iprod_emb_chain], auto) (* Shorter proof: 32 vs 72 (roughly), Isabelle proof has lemmas. *) @@ -2045,7 +2045,7 @@ apply (rule cpo_cf) (*Instantiate variable, continued below (loops otherwise)*) apply (assumption | rule cpo_Dinf)+ apply (rule islub_least) -apply (assumption | +apply (assumption | rule cpo_lub rho_emb_chain cpo_cf cpo_Dinf isubI cont_cf id_cont)+ apply simp apply (assumption | rule embRp_rel emb_rho_emb emb_chain_cpo cpo_Dinf)+ @@ -2055,7 +2055,7 @@ apply (subst lub_Dinf) apply (assumption | rule rho_emb_chain_apply1)+ defer 1 -apply (assumption | +apply (assumption | rule Dinf_prod cpo_lub [THEN islub_in] id_cont cpo_Dinf cpo_cf cf_cont rho_emb_chain rho_emb_chain_apply1 id_cont [THEN cont_cf])+ apply simp @@ -2064,11 +2064,11 @@ apply (rule_tac [6] x1 = "x`n" in chain_const [THEN chain_fun]) defer 1 apply (assumption | - rule rho_emb_chain_apply2 emb_chain_cpo islub_const apply_type + rule rho_emb_chain_apply2 emb_chain_cpo islub_const apply_type Dinf_prod emb_chain_cpo chain_fun rho_emb_chain_apply2)+ apply (rule dominateI, assumption, simp) apply (subst comp_fun_apply) -apply (assumption | +apply (assumption | rule cont_fun Rp_cont emb_cont emb_rho_emb cpo_Dinf emb_chain_cpo)+ apply (subst rho_projpair [THEN Rp_unique]) prefer 5 @@ -2079,28 +2079,28 @@ lemma theta_chain: (* almost same proof as commute_chain *) "[| commute(DD,ee,E,r); commute(DD,ee,G,f); - emb_chain(DD,ee); cpo(E); cpo(G) |] + emb_chain(DD,ee); cpo(E); cpo(G) |] ==> chain(cf(E,G),\n \ nat. f(n) O Rp(DD`n,E,r(n)))" apply (rule chainI) -apply (blast intro: lam_type cont_cf comp_pres_cont commute_emb Rp_cont - emb_cont emb_chain_cpo, +apply (blast intro: lam_type cont_cf comp_pres_cont commute_emb Rp_cont + emb_cont emb_chain_cpo, simp) apply (rule_tac r1 = r and m1 = n in commute_eq [THEN subst]) apply (rule_tac [5] r1 = f and m1 = n in commute_eq [THEN subst]) apply (assumption | rule le_succ nat_succI)+ apply (subst Rp_comp) apply (assumption | rule emb_eps commute_emb emb_chain_cpo le_succ nat_succI)+ -apply (rule comp_assoc [THEN subst]) +apply (rule comp_assoc [THEN subst]) apply (rule_tac r1 = "f (succ (n))" in comp_assoc [THEN ssubst]) apply (rule comp_mono) apply (blast intro: comp_pres_cont eps_cont emb_eps commute_emb Rp_cont emb_cont emb_chain_cpo le_succ)+ apply (rule_tac b="f(succ(n))" in comp_id [THEN subst]) (* 1 subst too much *) apply (rule_tac [2] comp_mono) -apply (blast intro: comp_pres_cont eps_cont emb_eps emb_id commute_emb +apply (blast intro: comp_pres_cont eps_cont emb_eps emb_id commute_emb Rp_cont emb_cont cont_fun emb_chain_cpo le_succ)+ apply (subst comp_id) (* Undoes "1 subst too much", typing next anyway *) -apply (blast intro: cont_fun Rp_cont emb_cont commute_emb cont_cf cpo_cf +apply (blast intro: cont_fun Rp_cont emb_cont commute_emb cont_cf cpo_cf emb_chain_cpo embRp_rel emb_eps le_succ)+ done @@ -2109,7 +2109,7 @@ emb_chain(DD,ee); cpo(E); cpo(G) |] ==> chain(cf(G,E),\n \ nat. r(n) O Rp(DD`n,G,f(n)))" apply (rule chainI) -apply (blast intro: lam_type cont_cf comp_pres_cont commute_emb Rp_cont +apply (blast intro: lam_type cont_cf comp_pres_cont commute_emb Rp_cont emb_cont emb_chain_cpo, simp) apply (rule_tac r1 = r and m1 = n in commute_eq [THEN subst]) apply (rule_tac [5] r1 = f and m1 = n in commute_eq [THEN subst]) @@ -2119,14 +2119,14 @@ apply (rule comp_assoc [THEN subst]) (* comp_assoc is simpler in Isa *) apply (rule_tac r1 = "r (succ (n))" in comp_assoc [THEN ssubst]) apply (rule comp_mono) -apply (blast intro: comp_pres_cont eps_cont emb_eps commute_emb Rp_cont +apply (blast intro: comp_pres_cont eps_cont emb_eps commute_emb Rp_cont emb_cont emb_chain_cpo le_succ)+ apply (rule_tac b="r(succ(n))" in comp_id [THEN subst]) (* 1 subst too much *) apply (rule_tac [2] comp_mono) -apply (blast intro: comp_pres_cont eps_cont emb_eps emb_id commute_emb +apply (blast intro: comp_pres_cont eps_cont emb_eps emb_id commute_emb Rp_cont emb_cont cont_fun emb_chain_cpo le_succ)+ apply (subst comp_id) (* Undoes "1 subst too much", typing next anyway *) -apply (blast intro: cont_fun Rp_cont emb_cont commute_emb cont_cf cpo_cf +apply (blast intro: cont_fun Rp_cont emb_cont commute_emb cont_cf cpo_cf emb_chain_cpo embRp_rel emb_eps le_succ)+ done @@ -2139,7 +2139,7 @@ lemma commute_O_lemma: "[| commute(DD,ee,E,r); commute(DD,ee,G,f); - emb_chain(DD,ee); cpo(E); cpo(G); x \ nat |] + emb_chain(DD,ee); cpo(E); cpo(G); x \ nat |] ==> r(x) O Rp(DD ` x, G, f(x)) O f(x) O Rp(DD ` x, E, r(x)) = r(x) O Rp(DD ` x, E, r(x))" apply (rule_tac s1 = "f (x) " in comp_assoc [THEN subst]) @@ -2162,12 +2162,12 @@ apply (simp add: projpair_def rho_proj_def, safe) apply (rule_tac [3] comp_lubs [THEN ssubst]) (* The following one line is 15 lines in HOL, and includes existentials. *) -apply (assumption | +apply (assumption | rule cf_cont islub_in cpo_lub cpo_cf theta_chain theta_proj_chain)+ apply (simp (no_asm) add: comp_assoc) apply (simp add: commute_O_lemma) apply (subst comp_lubs) -apply (assumption | +apply (assumption | rule cf_cont islub_in cpo_lub cpo_cf theta_chain theta_proj_chain)+ apply (simp (no_asm) add: comp_assoc) apply (simp add: commute_O_lemma) @@ -2184,14 +2184,14 @@ lemma emb_theta: "[| lub(cf(E,E), \n \ nat. r(n) O Rp(DD`n,E,r(n))) = id(set(E)); commute(DD,ee,E,r); commute(DD,ee,G,f); - emb_chain(DD,ee); cpo(E); cpo(G) |] + emb_chain(DD,ee); cpo(E); cpo(G) |] ==> emb(E,G,lub(cf(E,G), \n \ nat. f(n) O Rp(DD`n,E,r(n))))" apply (simp add: emb_def) apply (blast intro: theta_projpair) done lemma mono_lemma: - "[| g \ cont(D,D'); cpo(D); cpo(D'); cpo(E) |] + "[| g \ cont(D,D'); cpo(D); cpo(D'); cpo(E) |] ==> (\f \ cont(D',E). f O g) \ mono(cf(D',E),cf(D,E))" apply (rule monoI) apply (simp add: set_def cf_def) @@ -2207,31 +2207,31 @@ ((\n \ nat. f(n) O Rp(DD ` n, E, r(n))) ` na)) = (\na \ nat. (f(na) O Rp(DD ` na, E, r(na))) O r(n))" apply (rule fun_extension) -(*something wrong here*) +(*something wrong here*) apply (auto simp del: beta_if simp add: beta intro: lam_type) done lemma chain_lemma: "[| commute(DD,ee,E,r); commute(DD,ee,G,f); - emb_chain(DD,ee); cpo(E); cpo(G); n \ nat |] + emb_chain(DD,ee); cpo(E); cpo(G); n \ nat |] ==> chain(cf(DD`n,G),\x \ nat. (f(x) O Rp(DD ` x, E, r(x))) O r(n))" apply (rule commute_lam_lemma [THEN subst]) -apply (blast intro: theta_chain emb_chain_cpo +apply (blast intro: theta_chain emb_chain_cpo commute_emb [THEN emb_cont, THEN mono_lemma, THEN mono_chain])+ done lemma suffix_lemma: "[| commute(DD,ee,E,r); commute(DD,ee,G,f); - emb_chain(DD,ee); cpo(E); cpo(G); cpo(DD`x); x \ nat |] - ==> suffix(\n \ nat. (f(n) O Rp(DD`n,E,r(n))) O r(x),x) = + emb_chain(DD,ee); cpo(E); cpo(G); cpo(DD`x); x \ nat |] + ==> suffix(\n \ nat. (f(n) O Rp(DD`n,E,r(n))) O r(x),x) = (\n \ nat. f(x))" apply (simp add: suffix_def) apply (rule lam_type [THEN fun_extension]) -apply (blast intro: lam_type comp_fun cont_fun Rp_cont emb_cont +apply (blast intro: lam_type comp_fun cont_fun Rp_cont emb_cont commute_emb emb_chain_cpo)+ apply simp apply (rename_tac y) -apply (subgoal_tac +apply (subgoal_tac "f(x#+y) O (Rp(DD`(x#+y), E, r(x#+y)) O r (x#+y)) O eps(DD, ee, x, x#+y) = f(x)") apply (simp add: comp_assoc commute_eq add_le_self) @@ -2258,12 +2258,12 @@ apply (assumption | rule mediatingI emb_theta)+ apply (rule_tac b = "r (n) " in lub_const [THEN subst]) apply (rule_tac [3] comp_lubs [THEN ssubst]) -apply (blast intro: cont_cf emb_cont commute_emb cpo_cf theta_chain +apply (blast intro: cont_cf emb_cont commute_emb cpo_cf theta_chain chain_const emb_chain_cpo)+ apply (simp (no_asm)) apply (rule_tac n1 = n in lub_suffix [THEN subst]) apply (assumption | rule chain_lemma cpo_cf emb_chain_cpo)+ -apply (simp add: suffix_lemma lub_const cont_cf emb_cont commute_emb cpo_cf +apply (simp add: suffix_lemma lub_const cont_cf emb_cont commute_emb cpo_cf emb_chain_cpo) done @@ -2271,7 +2271,7 @@ "[| mediating(E,G,r,f,t); lub(cf(E,E), \n \ nat. r(n) O Rp(DD`n,E,r(n))) = id(set(E)); commute(DD,ee,E,r); commute(DD,ee,G,f); - emb_chain(DD,ee); cpo(E); cpo(G) |] + emb_chain(DD,ee); cpo(E); cpo(G) |] ==> t = lub(cf(E,G), \n \ nat. f(n) O Rp(DD`n,E,r(n)))" apply (rule_tac b = t in comp_id [THEN subst]) apply (erule_tac [2] subst) @@ -2294,11 +2294,11 @@ (Dinf(DD,ee),G,rho_emb(DD,ee),f, lub(cf(Dinf(DD,ee),G), \n \ nat. f(n) O Rp(DD`n,Dinf(DD,ee),rho_emb(DD,ee,n)))) & - (\t. mediating(Dinf(DD,ee),G,rho_emb(DD,ee),f,t) --> + (\t. mediating(Dinf(DD,ee),G,rho_emb(DD,ee),f,t) \ t = lub(cf(Dinf(DD,ee),G), \n \ nat. f(n) O Rp(DD`n,Dinf(DD,ee),rho_emb(DD,ee,n))))" apply safe -apply (assumption | +apply (assumption | rule lub_universal_mediating rho_emb_commute rho_emb_lub cpo_Dinf)+ apply (auto intro: lub_universal_unique rho_emb_commute rho_emb_lub cpo_Dinf) done diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/ex/Primes.thy --- a/src/ZF/ex/Primes.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/ex/Primes.thy Tue Mar 06 16:46:27 2012 +0000 @@ -14,7 +14,7 @@ definition is_gcd :: "[i,i,i]=>o" --{*definition of great common divisor*} where "is_gcd(p,m,n) == ((p dvd m) & (p dvd n)) & - (\d\nat. (d dvd m) & (d dvd n) --> d dvd p)" + (\d\nat. (d dvd m) & (d dvd n) \ d dvd p)" definition gcd :: "[i,i]=>i" --{*Euclid's algorithm for the gcd*} where @@ -28,7 +28,7 @@ definition prime :: i --{*the set of prime numbers*} where - "prime == {p \ nat. 1

m \ nat. m dvd p --> m=1 | m=p)}" + "prime == {p \ nat. 1

m \ nat. m dvd p \ m=1 | m=p)}" subsection{*The Divides Relation*} @@ -143,7 +143,7 @@ (*Imitating TFL*) lemma gcd_induct_lemma [rule_format (no_asm)]: "[| n \ nat; \m \ nat. P(m,0); - \m \ nat. \n \ nat. 0 P(n, m mod n) --> P(m,n) |] + \m \ nat. \n \ nat. 0 P(n, m mod n) \ P(m,n) |] ==> \m \ nat. P (m,n)" apply (erule_tac i = n in complete_induct) apply (case_tac "x=0") @@ -206,7 +206,7 @@ lemma gcd_greatest_raw [rule_format]: "[| m \ nat; n \ nat; f \ nat |] - ==> (f dvd m) --> (f dvd n) --> f dvd gcd(m,n)" + ==> (f dvd m) \ (f dvd n) \ f dvd gcd(m,n)" apply (rule_tac m = m and n = n in gcd_induct) apply (simp_all add: gcd_non_0 dvd_mod) done @@ -217,7 +217,7 @@ done lemma gcd_greatest_iff [simp]: "[| k \ nat; m \ nat; n \ nat |] - ==> (k dvd gcd (m, n)) <-> (k dvd m & k dvd n)" + ==> (k dvd gcd (m, n)) \ (k dvd m & k dvd n)" by (blast intro!: gcd_greatest gcd_dvd1 gcd_dvd2 intro: dvd_trans) @@ -235,7 +235,7 @@ apply (blast intro: dvd_anti_sym) done -lemma is_gcd_commute: "is_gcd(k,m,n) <-> is_gcd(k,n,m)" +lemma is_gcd_commute: "is_gcd(k,m,n) \ is_gcd(k,n,m)" by (simp add: is_gcd_def, blast) lemma gcd_commute_raw: "[| m \ nat; n \ nat |] ==> gcd(m,n) = gcd(n,m)" @@ -331,7 +331,7 @@ done lemma relprime_dvd_mult_iff: - "[| gcd (k,n) = 1; m \ nat |] ==> k dvd (m #* n) <-> k dvd m" + "[| gcd (k,n) = 1; m \ nat |] ==> k dvd (m #* n) \ k dvd m" by (blast intro: dvdI2 relprime_dvd_mult dvd_trans) lemma prime_imp_relprime: diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/ex/Ramsey.thy --- a/src/ZF/ex/Ramsey.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/ex/Ramsey.thy Tue Mar 06 16:46:27 2012 +0000 @@ -28,7 +28,7 @@ definition Symmetric :: "i=>o" where - "Symmetric(E) == (\x y. :E --> :E)" + "Symmetric(E) == (\x y. :E \ :E)" definition Atleast :: "[i,i]=>o" where -- "not really necessary: ZF defines cardinality" @@ -36,15 +36,15 @@ definition Clique :: "[i,i,i]=>o" where - "Clique(C,V,E) == (C \ V) & (\x \ C. \y \ C. x\y --> \ E)" + "Clique(C,V,E) == (C \ V) & (\x \ C. \y \ C. x\y \ \ E)" definition Indept :: "[i,i,i]=>o" where - "Indept(I,V,E) == (I \ V) & (\x \ I. \y \ I. x\y --> \ E)" + "Indept(I,V,E) == (I \ V) & (\x \ I. \y \ I. x\y \ \ E)" definition Ramsey :: "[i,i,i]=>o" where - "Ramsey(n,i,j) == \V E. Symmetric(E) & Atleast(n,V) --> + "Ramsey(n,i,j) == \V E. Symmetric(E) & Atleast(n,V) \ (\C. Clique(C,V,E) & Atleast(i,C)) | (\I. Indept(I,V,E) & Atleast(j,I))" @@ -93,7 +93,7 @@ the same proof could be used!!*) lemma pigeon2 [rule_format]: "m \ nat ==> - \n \ nat. \A B. Atleast((m#+n) #- succ(0), A Un B) --> + \n \ nat. \A B. Atleast((m#+n) #- succ(0), A \ B) \ Atleast(m,A) | Atleast(n,B)" apply (induct_tac "m") apply (blast intro!: Atleast0, simp) diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/ex/Ring.thy --- a/src/ZF/ex/Ring.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/ex/Ring.thy Tue Mar 06 16:46:27 2012 +0000 @@ -115,13 +115,13 @@ lemma (in abelian_group) a_l_cancel [simp]: "\x \ carrier(G); y \ carrier(G); z \ carrier(G)\ - \ (x \ y = x \ z) <-> (y = z)" + \ (x \ y = x \ z) \ (y = z)" by (rule group.l_cancel [OF a_group, simplified, simplified ring_add_def [symmetric]]) lemma (in abelian_group) a_r_cancel [simp]: "\x \ carrier(G); y \ carrier(G); z \ carrier(G)\ - \ (y \ x = z \ x) <-> (y = z)" + \ (y \ x = z \ x) \ (y = z)" by (rule group.r_cancel [OF a_group, simplified, simplified ring_add_def [symmetric]]) lemma (in abelian_monoid) a_assoc: @@ -234,7 +234,7 @@ ring_hom :: "[i,i] => i" where "ring_hom(R,S) == {h \ carrier(R) -> carrier(S). - (\x y. x \ carrier(R) & y \ carrier(R) --> + (\x y. x \ carrier(R) & y \ carrier(R) \ h ` (x \\<^bsub>R\<^esub> y) = (h ` x) \\<^bsub>S\<^esub> (h ` y) & h ` (x \\<^bsub>R\<^esub> y) = (h ` x) \\<^bsub>S\<^esub> (h ` y)) & h ` \\<^bsub>R\<^esub> = \\<^bsub>S\<^esub>}" diff -r ff6b0c1087f2 -r 95f1e700b712 src/ZF/ex/misc.thy --- a/src/ZF/ex/misc.thy Tue Mar 06 16:06:52 2012 +0000 +++ b/src/ZF/ex/misc.thy Tue Mar 06 16:46:27 2012 +0000 @@ -31,16 +31,16 @@ text{*A weird property of ordered pairs.*} -lemma "b\c ==> Int = " +lemma "b\c ==> \ = " by (simp add: Pair_def Int_cons_left Int_cons_right doubleton_eq_iff, blast) text{*These two are cited in Benzmueller and Kohlhase's system description of LEO, CADE-15, 1998 (page 139-143) as theorems LEO could not prove.*} -lemma "(X = Y Un Z) <-> (Y \ X & Z \ X & (\V. Y \ V & Z \ V --> X \ V))" +lemma "(X = Y \ Z) \ (Y \ X & Z \ X & (\V. Y \ V & Z \ V \ X \ V))" by (blast intro!: equalityI) text{*the dual of the previous one*} -lemma "(X = Y Int Z) <-> (X \ Y & X \ Z & (\V. V \ Y & V \ Z --> V \ X))" +lemma "(X = Y \ Z) \ (X \ Y & X \ Z & (\V. V \ Y & V \ Z \ V \ X))" by (blast intro!: equalityI) text{*trivial example of term synthesis: apparently hard for some provers!*} @@ -52,18 +52,18 @@ by blast text{*variant of the benchmark above*} -lemma "\x \ S. Union(S) \ x ==> \z. S \ {z}" +lemma "\x \ S. \(S) \ x ==> \z. S \ {z}" by blast (*Example 12 (credited to Peter Andrews) from W. Bledsoe. A Maximal Method for Set Variables in Automatic Theorem-proving. In: J. Hayes and D. Michie and L. Mikulich, eds. Machine Intelligence 9. Ellis Horwood, 53-100 (1979). *) -lemma "(\F. {x} \ F --> {y} \ F) --> (\A. x \ A --> y \ A)" +lemma "(\F. {x} \ F \ {y} \ F) \ (\A. x \ A \ y \ A)" by best text{*A characterization of functions suggested by Tobias Nipkow*} -lemma "r \ domain(r)->B <-> r \ domain(r)*B & (\X. r `` (r -`` X) \ X)" +lemma "r \ domain(r)->B \ r \ domain(r)*B & (\X. r `` (r -`` X) \ X)" by (unfold Pi_def function_def, best) @@ -81,8 +81,8 @@ rewriting does not instantiate Vars.*) lemma "(\A f B g. hom(A,f,B,g) = {H \ A->B. f \ A*A->A & g \ B*B->B & - (\x \ A. \y \ A. H`(f`) = g`)}) --> - J \ hom(A,f,B,g) & K \ hom(B,g,C,h) --> + (\x \ A. \y \ A. H`(f`) = g`)}) \ + J \ hom(A,f,B,g) & K \ hom(B,g,C,h) \ (K O J) \ hom(A,f,C,h)" by force @@ -90,7 +90,7 @@ lemma "(!! A f B g. hom(A,f,B,g) == {H \ A->B. f \ A*A->A & g \ B*B->B & (\x \ A. \y \ A. H`(f`) = g`)}) - ==> J \ hom(A,f,B,g) & K \ hom(B,g,C,h) --> (K O J) \ hom(A,f,C,h)" + ==> J \ hom(A,f,B,g) & K \ hom(B,g,C,h) \ (K O J) \ hom(A,f,C,h)" by force