# HG changeset patch # User paulson # Date 1395240947 0 # Node ID 76ff0a15d2027c72a39cdba09c8c8dea5cf497ac # Parent fcf90317383dfb4645b4b55c556eeaaf6e8b6e45# Parent d503c51e869af901c4c6f3042e017d275333ca9c Merge diff -r fcf90317383d -r 76ff0a15d202 NEWS --- a/NEWS Wed Mar 19 14:54:45 2014 +0000 +++ b/NEWS Wed Mar 19 14:55:47 2014 +0000 @@ -412,6 +412,53 @@ shows up as additional case in fixpoint induction proofs. INCOMPATIBILITY +* Removed and renamed theorems in Series: + summable_le ~> suminf_le + suminf_le ~> suminf_le_const + series_pos_le ~> setsum_le_suminf + series_pos_less ~> setsum_less_suminf + suminf_ge_zero ~> suminf_nonneg + suminf_gt_zero ~> suminf_pos + suminf_gt_zero_iff ~> suminf_pos_iff + summable_sumr_LIMSEQ_suminf ~> summable_LIMSEQ + suminf_0_le ~> suminf_nonneg [rotate] + pos_summable ~> summableI_nonneg_bounded + ratio_test ~> summable_ratio_test + + removed series_zero, replaced by sums_finite + + removed auxiliary lemmas: + sumr_offset, sumr_offset2, sumr_offset3, sumr_offset4, sumr_group, + half, le_Suc_ex_iff, lemma_realpow_diff_sumr, real_setsum_nat_ivl_bounded, + summable_le2, ratio_test_lemma2, sumr_minus_one_realpow_zerom, + sumr_one_lb_realpow_zero, summable_convergent_sumr_iff, sumr_diff_mult_const +INCOMPATIBILITY. + +* Replace (F)DERIV syntax by has_derivative: + - "(f has_derivative f') (at x within s)" replaces "FDERIV f x : s : f'" + + - "(f has_field_derivative f') (at x within s)" replaces "DERIV f x : s : f'" + + - "f differentiable at x within s" replaces "_ differentiable _ in _" syntax + + - removed constant isDiff + + - "DERIV f x : f'" and "FDERIV f x : f'" syntax is only available as input + syntax. + + - "DERIV f x : s : f'" and "FDERIV f x : s : f'" syntax removed + + - Renamed FDERIV_... lemmas to has_derivative_... + + - Other renamings: + differentiable_def ~> real_differentiable_def + differentiableE ~> real_differentiableE + fderiv_def ~> has_derivative_at + field_fderiv_def ~> field_has_derivative_at + isDiff_der ~> differentiable_def + deriv_fderiv ~> has_field_derivative_def +INCOMPATIBILITY. + * Removed solvers remote_cvc3 and remote_z3. Use cvc3 and z3 instead. * Nitpick: diff -r fcf90317383d -r 76ff0a15d202 src/HOL/Probability/Lebesgue_Integration.thy --- a/src/HOL/Probability/Lebesgue_Integration.thy Wed Mar 19 14:54:45 2014 +0000 +++ b/src/HOL/Probability/Lebesgue_Integration.thy Wed Mar 19 14:55:47 2014 +0000 @@ -2239,7 +2239,7 @@ proof eventually_elim fix j x assume [simp]: "x \ space M" have "\\i \ (\if i x\)" by (rule setsum_abs) - also have "\ \ w x" using w[of x] series_pos_le[of "\i. \f i x\"] unfolding sums_iff by auto + also have "\ \ w x" using w[of x] setsum_le_suminf[of "\i. \f i x\"] unfolding sums_iff by auto finally show "\\i \ ?w x" by simp qed diff -r fcf90317383d -r 76ff0a15d202 src/HOL/Series.thy --- a/src/HOL/Series.thy Wed Mar 19 14:54:45 2014 +0000 +++ b/src/HOL/Series.thy Wed Mar 19 14:55:47 2014 +0000 @@ -7,12 +7,14 @@ Additional contributions by Jeremy Avigad *) -header {* Finite Summation and Infinite Series *} +header {* Infinite Series *} theory Series imports Limits begin +subsection {* Definition of infinite summability *} + definition sums :: "(nat \ 'a::{topological_space, comm_monoid_add}) \ 'a \ bool" (infixr "sums" 80) @@ -28,6 +30,8 @@ where "suminf f = (THE s. f sums s)" +subsection {* Infinite summability on topological monoids *} + lemma sums_subst[trans]: "f = g \ g sums z \ f sums z" by simp @@ -40,6 +44,24 @@ lemma suminf_eq_lim: "suminf f = lim (\n. \in. 0) sums 0" + unfolding sums_def by (simp add: tendsto_const) + +lemma summable_zero[simp, intro]: "summable (\n. 0)" + by (rule sums_zero [THEN sums_summable]) + +lemma sums_group: "f sums s \ 0 < k \ (\n. setsum f {n * k ..< n * k + k}) sums s" + apply (simp only: sums_def setsum_nat_group tendsto_def eventually_sequentially) + apply safe + apply (erule_tac x=S in allE) + apply safe + apply (rule_tac x="N" in exI, safe) + apply (drule_tac x="n*k" in spec) + apply (erule mp) + apply (erule order_trans) + apply simp + done + lemma sums_finite: assumes [simp]: "finite N" and f: "\n. n \ N \ f n = 0" shows "f sums (\n\N. f n)" @@ -65,36 +87,26 @@ (simp add: eq atLeast0LessThan tendsto_const del: add_Suc_right) qed +lemma summable_finite: "finite N \ (\n. n \ N \ f n = 0) \ summable f" + by (rule sums_summable) (rule sums_finite) + lemma sums_If_finite_set: "finite A \ (\r. if r \ A then f r else 0) sums (\r\A. f r)" using sums_finite[of A "(\r. if r \ A then f r else 0)"] by simp +lemma summable_If_finite_set[simp, intro]: "finite A \ summable (\r. if r \ A then f r else 0)" + by (rule sums_summable) (rule sums_If_finite_set) + lemma sums_If_finite: "finite {r. P r} \ (\r. if P r then f r else 0) sums (\r | P r. f r)" using sums_If_finite_set[of "{r. P r}"] by simp +lemma summable_If_finite[simp, intro]: "finite {r. P r} \ summable (\r. if P r then f r else 0)" + by (rule sums_summable) (rule sums_If_finite) + lemma sums_single: "(\r. if r = i then f r else 0) sums f i" using sums_If_finite[of "\r. r = i"] by simp -lemma series_zero: (* REMOVE *) - "(\m. n \ m \ f m = 0) \ f sums (\in. 0) sums 0" - unfolding sums_def by (simp add: tendsto_const) - -lemma summable_zero[simp, intro]: "summable (\n. 0)" - by (rule sums_zero [THEN sums_summable]) - -lemma sums_group: "f sums s \ 0 < k \ (\n. setsum f {n * k ..< n * k + k}) sums s" - apply (simp only: sums_def setsum_nat_group tendsto_def eventually_sequentially) - apply safe - apply (erule_tac x=S in allE) - apply safe - apply (rule_tac x="N" in exI, safe) - apply (drule_tac x="n*k" in spec) - apply (erule mp) - apply (erule order_trans) - apply simp - done +lemma summable_single[simp, intro]: "summable (\r. if r = i then f r else 0)" + by (rule sums_summable) (rule sums_single) context fixes f :: "nat \ 'a::{t2_space, comm_monoid_add}" @@ -123,26 +135,53 @@ lemma suminf_zero[simp]: "suminf (\n. 0::'a::{t2_space, comm_monoid_add}) = 0" by (rule sums_zero [THEN sums_unique, symmetric]) + +subsection {* Infinite summability on ordered, topological monoids *} + +lemma sums_le: + fixes f g :: "nat \ 'a::{ordered_comm_monoid_add, linorder_topology}" + shows "\n. f n \ g n \ f sums s \ g sums t \ s \ t" + by (rule LIMSEQ_le) (auto intro: setsum_mono simp: sums_def) + context fixes f :: "nat \ 'a::{ordered_comm_monoid_add, linorder_topology}" begin -lemma series_pos_le: "summable f \ \m\n. 0 \ f m \ setsum f {.. suminf f" - apply (rule LIMSEQ_le_const[OF summable_LIMSEQ]) - apply assumption - apply (intro exI[of _ n]) - apply (auto intro!: setsum_mono2 simp: not_le[symmetric]) - done +lemma suminf_le: "\\n. f n \ g n; summable f; summable g\ \ suminf f \ suminf g" + by (auto dest: sums_summable intro: sums_le) + +lemma setsum_le_suminf: "summable f \ \m\n. 0 \ f m \ setsum f {.. suminf f" + by (rule sums_le[OF _ sums_If_finite_set summable_sums]) auto + +lemma suminf_nonneg: "summable f \ \n. 0 \ f n \ 0 \ suminf f" + using setsum_le_suminf[of 0] by simp + +lemma setsum_less_suminf2: "summable f \ \m\n. 0 \ f m \ n \ i \ 0 < f i \ setsum f {.. \m\n. 0 < f m \ setsum f {.. \n. 0 \ f n \ 0 < f i \ 0 < suminf f" + using setsum_less_suminf2[of 0 i] by simp + +lemma suminf_pos: "summable f \ \n. 0 < f n \ 0 < suminf f" + using suminf_pos2[of 0] by (simp add: less_imp_le) + +lemma suminf_le_const: "summable f \ (\n. setsum f {.. x) \ suminf f \ x" + by (metis LIMSEQ_le_const2 summable_LIMSEQ) lemma suminf_eq_zero_iff: "summable f \ \n. 0 \ f n \ suminf f = 0 \ (\n. f n = 0)" proof assume "summable f" "suminf f = 0" and pos: "\n. 0 \ f n" - then have "f sums 0" - by (simp add: sums_iff) then have f: "(\n. \i 0" - by (simp add: sums_def atLeast0LessThan) - have "\i. (\n\{i}. f n) \ 0" - proof (rule LIMSEQ_le_const[OF f]) + using summable_LIMSEQ[of f] by simp + then have "\i. (\n\{i}. f n) \ 0" + proof (rule LIMSEQ_le_const) fix i show "\N. \n\N. (\n\{i}. f n) \ setsum f {.. \n. 0 \ f n \ 0 < suminf f \ (\i. 0 < f i)" - using series_pos_le[of 0] suminf_eq_zero_iff by (simp add: less_le) - -lemma suminf_gt_zero: "summable f \ \n. 0 < f n \ 0 < suminf f" - using suminf_gt_zero_iff by (simp add: less_imp_le) - -lemma suminf_ge_zero: "summable f \ \n. 0 \ f n \ 0 \ suminf f" - by (drule_tac n="0" in series_pos_le) simp_all - -lemma suminf_le: "summable f \ (\n. setsum f {.. x) \ suminf f \ x" - by (metis LIMSEQ_le_const2 summable_LIMSEQ) - -lemma summable_le: "\\n. f n \ g n; summable f; summable g\ \ suminf f \ suminf g" - by (rule LIMSEQ_le) (auto intro: setsum_mono summable_LIMSEQ) +lemma suminf_pos_iff: "summable f \ \n. 0 \ f n \ 0 < suminf f \ (\i. 0 < f i)" + using setsum_le_suminf[of 0] suminf_eq_zero_iff by (simp add: less_le) end -lemma series_pos_less: - fixes f :: "nat \ 'a::{ordered_ab_semigroup_add_imp_le, ordered_comm_monoid_add, linorder_topology}" - shows "\summable f; \m\n. 0 < f m\ \ setsum f {.. 'a::{ordered_comm_monoid_add, linorder_topology, conditionally_complete_linorder}" + assumes pos[simp]: "\n. 0 \ f n" and le: "\n. (\i x" + shows "summable f" + unfolding summable_def sums_def[abs_def] +proof (intro exI order_tendstoI) + have [simp, intro]: "bdd_above (range (\n. \iiim. n \ m \ a < (\in. a < (\iin. (\i (SUP n. \in. (\i 'a::real_normed_vector" @@ -289,6 +329,8 @@ lemmas summable_of_real = bounded_linear.summable [OF bounded_linear_of_real] lemmas suminf_of_real = bounded_linear.suminf [OF bounded_linear_of_real] +subsection {* Infinite summability on real normed algebras *} + context fixes f :: "nat \ 'a::real_normed_algebra" begin @@ -313,6 +355,8 @@ end +subsection {* Infinite summability on real normed fields *} + context fixes c :: "'a::real_normed_field" begin @@ -361,6 +405,8 @@ by simp qed +subsection {* Infinite summability on Banach spaces *} + text{*Cauchy-type criterion for convergence of series (c.f. Harrison)*} lemma summable_Cauchy: @@ -452,12 +498,6 @@ end -lemma summable_norm_comparison_test: "\N. \n\N. norm (f n) \ g n \ summable g \ summable (\n. norm (f n))" - by (rule summable_comparison_test) auto - -lemma summable_rabs_cancel: "summable (\n. \f n :: real\) \ summable f" - by (rule summable_norm_cancel) simp - text{*Summability of geometric series for real algebras*} lemma complete_algebra_summable_geometric: @@ -470,34 +510,6 @@ by (simp add: summable_geometric) qed - -text{*A summable series of positive terms has limit that is at least as -great as any partial sum.*} - -lemma pos_summable: - fixes f:: "nat \ real" - assumes pos: "\n. 0 \ f n" and le: "\n. setsum f {.. x" - shows "summable f" -proof - - have "convergent (\n. setsum f {..n. setsum f {.. real" - shows "\\N. \n\N. \f n\ \ g n; summable g\ \ summable (\n. \f n\)" - by (rule summable_comparison_test) auto - -lemma summable_rabs: - fixes f :: "nat \ real" - shows "summable (\n. \f n\) \ \suminf f\ \ (\n. \f n\)" -by (fold real_norm_def, rule summable_norm) - subsection {* Cauchy Product Formula *} text {* @@ -507,14 +519,14 @@ lemma setsum_triangle_reindex: fixes n :: nat - shows "(\(i,j)\{(i,j). i+j < n}. f i j) = (\ki=0..k. f i (k - i))" + shows "(\(i,j)\{(i,j). i+j < n}. f i j) = (\ki\k. f i (k - i))" proof - have "(\(i, j)\{(i, j). i + j < n}. f i j) = - (\(k, i)\(SIGMA k:{..(k, i)\(SIGMA k:{..(k,i). (i, k - i)) (SIGMA k:{..(k,i). (i, k - i)) (SIGMA k:{..(k,i). (i, k - i)) ` (SIGMA k:{..(k,i). (i, k - i)) ` (SIGMA k:{..a. (\(k, i). f i (k - i)) a = split f ((\(k, i). (i, k - i)) a)" by clarify @@ -526,7 +538,7 @@ fixes a b :: "nat \ 'a::{real_normed_algebra,banach}" assumes a: "summable (\k. norm (a k))" assumes b: "summable (\k. norm (b k))" - shows "(\k. \i=0..k. a i * b (k - i)) sums ((\k. a k) * (\k. b k))" + shows "(\k. \i\k. a i * b (k - i)) sums ((\k. a k) * (\k. b k))" proof - let ?S1 = "\n::nat. {.. {.. 'a::{real_normed_algebra,banach}" assumes a: "summable (\k. norm (a k))" assumes b: "summable (\k. norm (b k))" - shows "(\k. a k) * (\k. b k) = (\k. \i=0..k. a i * b (k - i))" -using a b -by (rule Cauchy_product_sums [THEN sums_unique]) + shows "(\k. a k) * (\k. b k) = (\k. \i\k. a i * b (k - i))" + using a b + by (rule Cauchy_product_sums [THEN sums_unique]) + +subsection {* Series on @{typ real}s *} + +lemma summable_norm_comparison_test: "\N. \n\N. norm (f n) \ g n \ summable g \ summable (\n. norm (f n))" + by (rule summable_comparison_test) auto + +lemma summable_rabs_comparison_test: "\\N. \n\N. \f n\ \ g n; summable g\ \ summable (\n. \f n :: real\)" + by (rule summable_comparison_test) auto + +lemma summable_rabs_cancel: "summable (\n. \f n :: real\) \ summable f" + by (rule summable_norm_cancel) simp + +lemma summable_rabs: "summable (\n. \f n :: real\) \ \suminf f\ \ (\n. \f n\)" + by (fold real_norm_def) (rule summable_norm) end diff -r fcf90317383d -r 76ff0a15d202 src/HOL/Transcendental.thy --- a/src/HOL/Transcendental.thy Wed Mar 19 14:54:45 2014 +0000 +++ b/src/HOL/Transcendental.thy Wed Mar 19 14:55:47 2014 +0000 @@ -552,7 +552,7 @@ hence "norm (suminf (g h)) \ (\n. norm (g h n))" by (rule summable_norm) also from A C B have "(\n. norm (g h n)) \ (\n. f n * norm h)" - by (rule summable_le) + by (rule suminf_le) also from f have "(\n. f n * norm h) = suminf f * norm h" by (rule suminf_mult2 [symmetric]) finally show "norm (suminf (g h)) \ suminf f * norm h" . @@ -737,7 +737,7 @@ using `x \ 0` by auto } note 1 = this and 2 = summable_rabs_comparison_test[OF _ ign[OF `summable L`]] then have "\ \ i. ?diff (i + ?N) x \ \ (\ i. L (i + ?N))" - by (metis (lifting) abs_idempotent order_trans[OF summable_rabs[OF 2] summable_le[OF _ 2 ign[OF `summable L`]]]) + by (metis (lifting) abs_idempotent order_trans[OF summable_rabs[OF 2] suminf_le[OF _ 2 ign[OF `summable L`]]]) then have "\ \ i. ?diff (i + ?N) x \ \ r / 3" (is "?L_part \ r/3") using L_estimate by auto @@ -1006,22 +1006,17 @@ shows "(\n. f n * 0 ^ n) = f 0" proof - have "(\n<1. f n * 0 ^ n) = (\n. f n * 0 ^ n)" - by (rule sums_unique [OF series_zero], simp add: power_0_left) + by (subst suminf_finite[where N="{0}"]) (auto simp: power_0_left) thus ?thesis unfolding One_nat_def by simp qed lemma exp_zero [simp]: "exp 0 = 1" unfolding exp_def by (simp add: scaleR_conv_of_real powser_zero) -lemma setsum_cl_ivl_Suc2: - "(\i=m..Suc n. f i) = (if Suc n < m then 0 else f m + (\i=m..n. f (Suc i)))" - by (simp add: setsum_head_Suc setsum_shift_bounds_cl_Suc_ivl - del: setsum_cl_ivl_Suc) - lemma exp_series_add: fixes x y :: "'a::{real_field}" defines S_def: "S \ \x n. x ^ n /\<^sub>R real (fact n)" - shows "S (x + y) n = (\i=0..n. S x i * S y (n - i))" + shows "S (x + y) n = (\i\n. S x i * S y (n - i))" proof (induct n) case 0 show ?case @@ -1035,32 +1030,32 @@ have "real (Suc n) *\<^sub>R S (x + y) (Suc n) = (x + y) * S (x + y) n" by (simp only: times_S) - also have "\ = (x + y) * (\i=0..n. S x i * S y (n-i))" + also have "\ = (x + y) * (\i\n. S x i * S y (n-i))" by (simp only: Suc) - also have "\ = x * (\i=0..n. S x i * S y (n-i)) - + y * (\i=0..n. S x i * S y (n-i))" + also have "\ = x * (\i\n. S x i * S y (n-i)) + + y * (\i\n. S x i * S y (n-i))" by (rule distrib_right) - also have "\ = (\i=0..n. (x * S x i) * S y (n-i)) - + (\i=0..n. S x i * (y * S y (n-i)))" + also have "\ = (\i\n. (x * S x i) * S y (n-i)) + + (\i\n. S x i * (y * S y (n-i)))" by (simp only: setsum_right_distrib mult_ac) - also have "\ = (\i=0..n. real (Suc i) *\<^sub>R (S x (Suc i) * S y (n-i))) - + (\i=0..n. real (Suc n-i) *\<^sub>R (S x i * S y (Suc n-i)))" + also have "\ = (\i\n. real (Suc i) *\<^sub>R (S x (Suc i) * S y (n-i))) + + (\i\n. real (Suc n-i) *\<^sub>R (S x i * S y (Suc n-i)))" by (simp add: times_S Suc_diff_le) - also have "(\i=0..n. real (Suc i) *\<^sub>R (S x (Suc i) * S y (n-i))) = - (\i=0..Suc n. real i *\<^sub>R (S x i * S y (Suc n-i)))" - by (subst setsum_cl_ivl_Suc2, simp) - also have "(\i=0..n. real (Suc n-i) *\<^sub>R (S x i * S y (Suc n-i))) = - (\i=0..Suc n. real (Suc n-i) *\<^sub>R (S x i * S y (Suc n-i)))" - by (subst setsum_cl_ivl_Suc, simp) - also have "(\i=0..Suc n. real i *\<^sub>R (S x i * S y (Suc n-i))) + - (\i=0..Suc n. real (Suc n-i) *\<^sub>R (S x i * S y (Suc n-i))) = - (\i=0..Suc n. real (Suc n) *\<^sub>R (S x i * S y (Suc n-i)))" + also have "(\i\n. real (Suc i) *\<^sub>R (S x (Suc i) * S y (n-i))) = + (\i\Suc n. real i *\<^sub>R (S x i * S y (Suc n-i)))" + by (subst setsum_atMost_Suc_shift) simp + also have "(\i\n. real (Suc n-i) *\<^sub>R (S x i * S y (Suc n-i))) = + (\i\Suc n. real (Suc n-i) *\<^sub>R (S x i * S y (Suc n-i)))" + by simp + also have "(\i\Suc n. real i *\<^sub>R (S x i * S y (Suc n-i))) + + (\i\Suc n. real (Suc n-i) *\<^sub>R (S x i * S y (Suc n-i))) = + (\i\Suc n. real (Suc n) *\<^sub>R (S x i * S y (Suc n-i)))" by (simp only: setsum_addf [symmetric] scaleR_left_distrib [symmetric] - real_of_nat_add [symmetric], simp) - also have "\ = real (Suc n) *\<^sub>R (\i=0..Suc n. S x i * S y (Suc n-i))" + real_of_nat_add [symmetric]) simp + also have "\ = real (Suc n) *\<^sub>R (\i\Suc n. S x i * S y (Suc n-i))" by (simp only: scaleR_right.setsum) finally show - "S (x + y) (Suc n) = (\i=0..Suc n. S x i * S y (Suc n - i))" + "S (x + y) (Suc n) = (\i\Suc n. S x i * S y (Suc n - i))" by (simp del: setsum_cl_ivl_Suc) qed @@ -1128,7 +1123,7 @@ have "1+x \ (\n<2. inverse (real (fact n)) * x ^ n)" by (auto simp add: numeral_2_eq_2) also have "... \ (\n. inverse (real (fact n)) * x ^ n)" - apply (rule series_pos_le [OF summable_exp]) + apply (rule setsum_le_suminf [OF summable_exp]) using `0 < x` apply (auto simp add: zero_le_mult_iff) done @@ -1412,7 +1407,7 @@ proof - have "suminf (\n. inverse(fact (n+2)) * (x ^ (n+2))) <= suminf (\n. (x\<^sup>2/2) * ((1/2)^n))" - apply (rule summable_le) + apply (rule suminf_le) apply (rule allI, rule aux1) apply (rule summable_exp [THEN summable_ignore_initial_segment]) by (rule sums_summable, rule aux2) @@ -2388,7 +2383,7 @@ show "0 < sin x" unfolding sums_unique [OF sums] using sums_summable [OF sums] pos - by (rule suminf_gt_zero) + by (rule suminf_pos) qed lemma cos_double_less_one: "0 < x \ x < 2 \ cos (2 * x) < 1" @@ -2427,7 +2422,7 @@ apply (frule sums_unique) apply (drule sums_summable) apply simp -apply (erule suminf_gt_zero) +apply (erule suminf_pos) apply (simp add: add_ac) done diff -r fcf90317383d -r 76ff0a15d202 src/HOL/ex/HarmonicSeries.thy --- a/src/HOL/ex/HarmonicSeries.thy Wed Mar 19 14:54:45 2014 +0000 +++ b/src/HOL/ex/HarmonicSeries.thy Wed Mar 19 14:55:47 2014 +0000 @@ -268,8 +268,8 @@ text {* The final theorem shows that as we take more and more elements (see @{thm [source] harmonic_aux3}) we get an ever increasing sum. By assuming -the sum converges, the lemma @{thm [source] series_pos_less} ( @{thm -series_pos_less} ) states that each sum is bounded above by the +the sum converges, the lemma @{thm [source] setsum_less_suminf} ( @{thm +setsum_less_suminf} ) states that each sum is bounded above by the series' limit. This contradicts our first statement and thus we prove that the harmonic series is divergent. *} @@ -284,7 +284,7 @@ proof - have "\n. 0 \ ?f n" by simp with sf have "?s \ 0" - by - (rule suminf_ge_zero, simp_all) + by (rule suminf_nonneg) then have cgt0: "\2*?s\ \ 0" by simp from ndef have "n = nat \(2*?s)\" . @@ -298,11 +298,9 @@ obtain j where jdef: "j = (2::nat)^n" by simp have "\m\j. 0 < ?f m" by simp - with sf have "(\i\{0..i\{1..ii\{Suc 0..i\{1..< Suc ((2::nat)^n)}. 1 / (real i)) < ?s" by simp then have