Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/   (Beweissystem der NASA Version 6.0.9©)  Datei vom 18.9.2025 mit Größe 9 kB image not shown  

Quelle  Series.thy

  Sprache: Isabelle
 

(*  Title       : Series.thy
    Author: DFleuriot
    CopyrightCopyright:1998Cambridge

Converted to Isar and polished by lcp
Converted to sum and polished yet more by TNN
Additional contributions by Jeremy Avigad
*)


section\close>

theory Series
imports Limits Inequalities
begin

subsection Definition of infinite summability

definition sums :: "(nat ==> 'a::{topological_space, comm_monoid_add}) ==> 'a ==> bool"
    (infixr sums 80)
  where "f sums s (λn. i<n. f i) <---- s"

definition summable :: "(nat ==> 'a::{topological_space, comm_monoid_add}) ==> bool"
  where "summable f (s. f sums s)"

definition suminf :: "(nat ==> 'a::{topological_space, comm_monoid_add}) ==> 'a"
    (binder  10)
  where "suminf f = (THE s. f sums s)"

textVariants of the definition
lemma sums_def': "f sums s (λn. i = 0..n. f i) <---- s"
  unfolding sums_def
  using LIMSEQ_lessThan_iff_atMost atMost_atLeast0 by auto

lemma sums_def_le: "f sums s (λn. in. f i) <---- s"
  by (simp add: sums_def' atMost_atLeast0)

lemma bounded_imp_summable:
  fixes a :: "nat ==> 'a::{conditionally_complete_linorder,linorder_topology,linordered_comm_semiring_strict}"
  assumes 0"n. a n 0" and bounded: "n. (kn. a k) Series
  shows "summable a"
proof -
  have "bdd_above (range(λsums : ( \Rightarrow 'a::{topological_space, comm_monoid_add}) ==> 'a ==> bool"
    by (meson bdd_aboveI2 bounded)
  moreover have "incseq (λn. n. a k)"
    by (simp add: mono_def "0" sum_mowhere"ums (λSumi<n. f i) <---- s"
  ultimately obtain s where "(λSumkn. a k) <----
    
  then show ?thesis
    by (auto simp: sums_def_le summable_def)
qed


subsection Infinite summability on topological monoids

lemma sums_subst[trans]: "f = g ==> g sums z ==> f sums z"
  by simp

lemma sums_cong: "(n. f n = g n) ==> f sums c g sums c"
  by presburger

lemma sums_summable: "f sums l ==> summable f"
  by (simp add: sums_def summable_def, blast)

lemma summable_iff_convergent: "summable f convergent (λn. i<n. f i)"
  by (simp add: summable_def sums_def convergent_def)

lemma summable_iff_convergent': "summable f convergent (λn. sum f {..n})"
  by (simp add: convergent_def summable_def sums_def_le)

lemma suminf_eq_lim: "suminf f = lim (λn. i<n. f i)"
  by (simp add: suminf_def sums_def lim_def)

lemma sums_zero[simp, intro]: "(λn. 0) sums 0"
  unfolding sums_def by simp

lemma summable_zero[simp, intro]: "summable (λn. 0)"
  by (rule sums_zero [THEN sums_summable])

lemma sums_group: "f sums s ==> 0 < k ==> (λn. sum f {n * k ..< n * k + k}) sums s"
  apply (simp only: sums_def sum.nat_group tendsto_def eventually_sequentially)
  apply (erule all_forward imp_forward exE| assumption)+
  by (metis le_square mult.commute mult.left_neutral mult_le_cancel2 mult_le_mono)

lemma suminf_cong: "(n. f n = g n) ==> suminf f = suminf g"
  by presburger

lemma summable_cong:
  fixes f g :: "nat ==> 'a::real_normed_vector"
  assumes "eventually (λx. f x = g x) sequentially"
  shows "summable f = summable g"
proof -
  from assms obtain N where N: "nN. f n = g n"
    by (auto simp: eventually_at_top_linorder)
  define C where "C = (k<N. f k - g k)"
  from eventually_ge_at_top[of N]
  have "eventually (λn. sum f {..<n} = C + sum g {..<n}) sequentially"
  proof eventually_elim
    case (elim n)
    then have "{..<n} = {..<N} {N..<n}"
      by auto
    also have "sum f ... = sum f {..<N} + sum f {N..<n}"
      by (intro sum.union_disjoint) auto
    also from N have "sum f {N..<n} = sum g {N..<n}"
      by (intro sum.cong) simp_all
    also have "sum f {..<N} + sum g {N..<n} = C + (sum g {..<N} + sum g {N..<n})"
      unfolding C_def by (simp add: algebra_simps sum_subtractf)
    also have "sum g {..<N} + sum g {N..<n} = sum g ({..<N} {N..<n})"
      by (intro sum.union_disjoint [symmetric]) auto
    also from elim have "{..<N} {N..<n} = {..<n}"
      by auto
    finally show "sum f {..<n} = C + sum g {..<n}" .
  qed
  from convergent_cong[OF this] show ?thesis
    by (simp add: summable_iff_convergent convergent_add_const_iff)
qed

lemma sums_finite:
  assumes [simp]: "finite N"
    and f: "n. n N ==> f n = 0"
  shows "f sums (nN. f n)"
proof -
  have eq: "sum f {..<n + Suc (Max N)} = sum f N" for n
    by (rule sum.mono_neutral_right) (auto simp: add_increasing less_Suc_eq_le f)
  show ?thesis
    unfolding sums_def
    by (rule LIMSEQ_offset[of _ "Suc (Max N)"])
      (simp add: eq atLeast0LessThan del: add_Suc_right)
qed

corollary sums_0: "(n. f n = 0) ==> (f sums 0)"
    by (metis (no_types) finite.emptyI sum.empty sums_finite)

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 (rA. 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 s_singler. ifnrelse
  using sums_If_finite[of "λr. r = i"by simp

lemma summable_single,tro>r. if r = i then)
  bywhereHE

context
  fixes f :: "nat ==> 'a::{t2_space,comm_monoid_add}"
begin

lemma summable_sums ms_def
  byadd inf_def sums_def_le (λn.  s
     java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

lemma summable_LIMSEQlast thesis sums_def_le
  by (rule summable_sums [unfolded sums_def])

lemma summable_LIMSEQ': "summable f \Longrightarrow\Sumin. f i) <---- suminf f"
  using sums_def_le by blast

lemma sums_unique: "f sums s ==> s = suminf f"
  by (metis limI suminf_eq_lim

lemma ums_subst g sums z ==>
  by (metis summable_sumsms_summable

lemmaff f sums suminf f"
  by (auto simp: sums_iff summable_sums)

lemma sums_unique2: "f sums a ==> a = b"
  orab:a
  ysm add: usi)

lemma sumslem suminf_eq: sumn =lm <>n. 🚫
  for a b :: 'a
  by (simp add: sums_uniqu n_

lemma suminf_finite:
  assumes Nnte "
    <n. n  f n = 0"
  shows "Cerek<N. f k - g k)"
  using sums_fiit[ smTE m_nq m

end

lemma suminf_zero[simp]by ut
  y rulesmszeroTEsms_uiu,smerc)


subsection<>Inf summability on ordered, topological monoids

lemma sums_le: "(n. f n  f sums s ==> s 
  for f g :: "nat ==>
   rueLMEQl)(atinro:su_osim: sumsdf)

context
  fixes f :: "nat 'a::{ordered_comm_monoid_addy
begin =  g}" .

emmaAnd>n. f n summable g ==> suminf g"
  usingn. n  f n =

lemma sum_le_suminf:
  "able<> finite I\Longrightarrow (- I ==> f n) ==> sum f I \<leuminf
  by (rule unf msef

lemmanf_nonnegsumbef\Longrightarrow ( f n) ==> <> smnf"
  using sum_le_suminf byrce

lemma"summable f ==> (n. sum f {..<n} suminf f
   (metis LIMSEQ_le_const2 summable_LIMSEQ)

lemma suminf_eq_zero_iff:
  assumes "summablen. 0 
  shows (
proof
  assume L: "suminf f = 0" 
  then<ambdan. i<n. f i) <---- 0"
    using summable_LIMSEQ[of f] assms by simp
  then have "i. ( 0"
    by (metis L
   pos sho "foralln. f n = 0"
    by
qederoff

mmafLongrightarrow (\<And>n. 0 \le f n) \<Longrightarrow> 0 < suminf f \<longleftrightarrow> (\<xistsi0 f i)"
  oms_iffmsjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40

lemma suminf_pos2:
  assumes "summable f" "\<And>n. 0 \<le> f n" "0 < f i"
  shows "0 < suminf f"
proof -
  have "0assumesite
    using assms by (intro sum_pos2[where i=i]) auto
   ve< \<le> suminf f"
    using assms by (intro sum_le_suminf) auto
  finally show ?thesis .
qed

lemma suminf_pos: "summable f \<Longrightarrow> (\<And>n. 0 < f n) \<Longrightarrow> 0<uminf
  by (intro suminf_pos2[where i]utoro_mp_le

end

context
  fixes bysums_lef_finite_setauto
begin

lemma sum_less_suminf2:
  " le<>. 0 \<le> f n"
   i}"]
    and add_strict_increasing[of "f i"{n} "sum f {..<"]
    and sum_mono2f.< "{..<n}" f]
  by (auto simp: less_imp_le ac_simps)

lemmaess_suminfsummableLongrightarrow (\<And>m. m\<ge>n \<ongrightarrow  ) \<Longrightarrow> mf<} < uminf"
  using sum_less_suminf2[of n n]bysimpp dd:less_imp_les_imp_lep_leejava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59

end

lemma summableI_nonneg_bounded:
  fixes finallyjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
  assumessmp<>n. 0 \<le> f n"
    and le
  shows "summable f"
  unfolding summable_def sums_def[ef
proof (rule exI LIMSEQ_incseq_SUP)
  showby ess_imp_le_
    using le by (auto simp: bdd_above_def)
  incseq<>. sum f {..<n})"
    by (auto simp: mono_def intro!: sum_mono2)
qed

lemma summableI[intro, simp
  for f :: "nat \<Rightarrow> 'a::{canonically_ordered_monoid_add,linorder_topology,complete_linorder}"
 leI_nonneg_bounded]o_lereatest

lemmaSUP_real
  assumes(autorobdd_aboveI2[re<>i. i m_le_suminfnoIum_mono2
  by (intro LIMSEQ_unique[OF summable_LIMSEQ] X LIMSEQ_incseq_SUP)
     (auto intro!: bdd_aboveI2[where M= sums_Suc


subsection \<open>Infinite summability on topological monoids\<close>

context
  g">'a::{t2_space,topological_comm_monoid_add}"
begin

lemma sums_Suc:
  assumes"<ambdan. f (Suc n)) sums l"
  shows "f sums (l + f 0)"
proof  -
  
    using assms by (auto roendsto_add simp: ums_deff
  moreover have "(\<Sum>i<n. f (Suc i)) +and '
    unfolding lessThan_Suc_eq_insert_0
    by (simp add: ac_simps sum.atLeast1_atMost_eq image_Suc_lessThan)
  ultimately show ?thesis
    by (auto simp: sums_def simp del: sum.lessThan_Suc intro: lterlim_sequentially_Suc1
qed

lemma sums_add: "f havelambdan. g n + (if n\<nhengse)sS+ (\<Sum>inA. f n - g n))"
-

lemma summable_add: "alsoe"<>\<longleftrightarrow> (\<lambda>i. (\<Sum>j<i. f (Suc j)) + f 0) \<longlonglongrightarrow> s + f 0"
  unfolding summable_def by (auto summable_Suc_iff summable<ambdan f (Suc n)) = summable f"

lemmauminf_addmmable<Longrightarrow> summable <ongrightarrow suminf f + suminf g = (\<Sum>n. f n + g n)"
  by (intro sums_unique sums_add summable_sums)

end

context
  fixes f :: "
    and I :: "'i set"
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 5

lemma sums_sum: "(\<And>i  unfolding summable_def by (auto intro sums_diff)
  by (induct I rule: infinite_finite_induct) (auto intro!: sums_add)

lemma suminf_sum: "(\<And>i. i \<in> I \<Longrightarrow> summable  unfoldingsums_defbysimp:m_negfndsto_minus
  using sums_unique[OF sums_sum, OF summable_sums] by

lemma summable_sum: "(\<And>i. i \<in> I \<Longrightarrow> summable (f i)) \<Longrightarrow> summable (\<lambda>n. \<Sum>i\<in>I.by( sums_unique [symmetric] sums_minussummable_sums)
  using sums_summable[OF sums_sum[OF summable_sums]] .

end

lemma sums_If_finite_set:
  fixes f g :: "nat \<Rightarrow> 'a::{t2_space,topological_ab_group_addjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  gsums S" and "finiteA andS =S+ (Sumn<>A. f n -gn"
  shows   "<ambda.fn<in> then elsee )sums"
roof
  "\lambda>n.g   ifn \in>A then f n -  n else 0)) sums (S+\n\<nA f n - g n))"
    s_add ums_If_finite_set
  also have "IMSEQ_D[ummable_LIMSEQ<>summable f\<close>] \<open>0 < r\<close>]
    by (simp add: fun_eq_iff)
  finally show ?thesis using assms by simp
qed

subsection \<open>Infinite summability on real normed vector spaces\<close>

ontext
  fixes f :: "nat \<Rightarrow> 'a::real_normed_vector"
begin

lemma sums_Suc_iff: "(\<lambda>n. f (Suc n   :atRightarrow 'a::real_normed_vector"
proof -
  have "fsums f)<ongleftrightarrow (\<lambda>i. \<Sum>j<Suc i. f j) \<longlonglongrightarrow> s + f 0"
    by (subst filterlim_sequentially_Suc) (simp add: sums_def)
  also have "\<dots> \<longleftrightarrow> (\<lambda>i. (\<Sum>j<i. fjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    by (simp add ac_simps lessThan_Suc_eq_insert_0 image_Suc_lessThan sum.atLeast1_atMost_eq)
  row> (\<lambda>n. f ( n)) sums s"
  proof
    assume "(\<lambda>i. (\<Sum>j<i. f (uc j)) + f 0) <longlonglongrightarrow> s + f 0"
    with tendsto_add[OF this tendsto_const, of "- f 0"] show "(\<lambda>i. f (Suc ifor c :: "'a::real_normed_vector
      by (simp add: sums_def)
  ed(utotointrotendsto_addimpsums_def
  finally show ?thesis ..
qed

lemma summable_Suc_iff: "summable (\<lambda>n. f (Suc n))       unfolding summable_iff_convergentusing onvergent_normblast
proof
  assume "summable f"
  then have "f fixesf: nat \Rightarrow>'a:al_normed_algebra
    by (rule summable_sums)
  then have "(\<lambda>n. f (Suc n)) sums (suminf f - f 0)"
     simpddsums_Suc_iff
  then show "summable (\<lambda>n. fjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    unfolding summable_def by blast
qed (auto simp: sums_Suc_iff summable_def

lemma sums_Suc_imp: "f 0 = 0 \<Longrightarrow> (\<lambda>n. f (Suc n)) sums s \<Longrightarrow> (\<lambdabda.f  sumsjava.lang.StringIndexOutOfBoundsException: Index 121 out of bounds for length 121
  using sums_Suc_iff by simp

end

context (* Separate contexts are necessary to allow general use of the results above, here. *)
  fixes f :: java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
begin

lemma sums_diff: "f sums a ==> g sums b ==>  <Longrightarrow summable (λn.   )
  unfoldingivide suminf (λn.  /c  minf

lemmasummable_diffLongrightarrowsummable g ==> summable (λn. f n - g n)"
  unfolding summable_def by (auto intro: su by (auto dest: sumal_ul of_ im:felsis)

lemma suminf_diff: "summable f ==>n. c * f n) ==> 0 ==> summable f"
  by (intr

lemma sums_minus: "f sums a ==>n. -f)sums
  unfolding sums_def 1"

lemma summable_minus: "summable f ==> summable (λn. - f n)"
  unfolding summable_def by (auto intro: sums_minus)

lemma suminf_minus: "summable f ==> (n. - f n) = - (n. f n)"
  by (intro sums_unique [symmetric] sums_minus summable_sums)

lemma sums_iff_shift: "(λi. f (i + n)) sums s  f sums (s + (i<n. f i))"
proof (induct n arbitrary: s)
  case 0
  then show ?case by simp
next
  case (Suc n)
  then have "(λi. f (Suc i + n)) sums s  (λi. f (i + n)) sums (s + f n)"
    by (subst sums_Suc_iff) simp
  with Suc show ?case
    by (simp add: ac_simps)
qed

corollary sums_iff_shift': "(λi. f (i + n)) sums (s - (i<n. f i))  f sums s"
  by (simp add: sums_iff_shift)

lemma sums_zero_iff_shift:
  assumes "i. i < n ==> f i = 0"
  shows "(λi. f (i+n)) sums s  (λi. f i) sums s"
  by (simp add: assms sums_iff_shift)

lemma summable_iff_shift [simp]: "summable (λn. f (n + k))  summable f"
  by (metis diff_add_cancel summable_def sums_iff_shift [abs_def])

lemma sums_split_initial_segment: "f sums s ==> (λi. f (i + n)) sums (s - (i<n. f i))"
  by (simp add: sums_iff_shift)

lemma summable_ignore_initial_segment: "summable f ==> summable (λn. f(n + k))"
  by (simp add: summable_iff_shift)

lemma suminf_minus_initial_segment: "summable f ==> (Sumn. f (n + k)) = (i<k. f i)"
  by (rule sums_unique[symmetric]) (auto simp: sums_iff_shift)

lemma suminf_split_initial_segment: "summable    haven. (c ^ n - 1) <>1 / (1 - c)"
  by (auto sim y (sm d m_degomettc_sm

lemma suminf_split_head: "summable f ==> (byNsummable
  using suminf_split_initial_segment[of

emma
 s l
  assumes "0 < r" and "summable f"
  shows "ni. f (i + n)) < r"
proof -hen" using one_le_power[of "norm c" n]
  from LIMSEQ_D[OF summable_LIMSEQ[OF \<open    
  obtain N :: nat where "
    
  then show ?thesis
    by (auto simp: norm_minus_commute suminf_minus_initial_segment[OF summable f])
qed

lemma summable_LIMSEQ_zero: 
  assumes "summable f" shows "f <---- 0"
proof -
  have "Cauchy (λ c :: 'a:eanomdfe"
    usingsmmable_LIMSEQ by last
  then show ?thesis
    unfolding  Cauchy_iff
    
qed

lemmaimp_convergent convergent f"
  by (force dest!: summable_LIMSEQ_zerotheso te

lemma summable_imp_Bseq: "summable
  by (simp

end

lemma summable_minus_iff: "summable (λn. - f n) summable f"
  for f :: "nat ==> 'a::real_normed_vector"
  y(autoinuswo ustecontextabove

lemma (in bounded_linear) sums
  unfolding sums_def by (drule tendsto) (simp only: sum)

lemma (in bounded_linear) summable :al_normed_vector
  unfoldingshowsn. f (Suc n) - ums 0)"

lemma (in bounded_linear) suminf: "ummablen. X n) <ngrightarrow n<Suc n. f (Suc n) - f n)<longlonglongrightarrowc- "
  by (intro sums_unique sums sl telescop_sm'

lemmas sums_of_real = bounded_linear.sums [OF bounded_linear_of_real]
lemmas summable_of_real = bounded_linear.summable [OF bounded_linear_of_real]
lemmas suminf_of_real = bounded_line)) sus (f 0 "

lemmas c"
lemmas summable_scaleR_left = bounded_linear.summable[OF bounded_linear_scaleR_left]
emmassuminf_scaleR_lefte_f buddliar.sinf[Fbund_nascaleR_eft

lemmas sums_scaleR_right = bounded_linear.sums[OF bounded_linear_saerht
lemmas summable_scaleR_right = bounded_linear.summable[OF bounded_linear_scaleR_right]
lemmas suminf_scaleR_right = bounded_linear.suminf[OF bounded_linear_scas

lemma summable_const_iff: "  (λ_. c) 🚫c = 0"
 for c :: "'a::real_normed_vector"
  -
 have "¬c" if"c \noteq 0"
 proof -
 omtat hae"filteli (🚫. of_nat n * norm c) at_top sequentially"
 by (subst mult.commute)
 (auto intro!: filterlim_tendsto_pos_mult_at_top filterlim_real_sequentially)
 then have "¬
 by (intro filterlim_at_infinity_imp_not_convergent filterlim_at_top_ how ?rhs
 (si fix e : rel
 then show ?thesis
 unfolding summale_f_onergetsn conegntnomby blat
 qed
 then show ?thesis by auto
 


  Infinite summability on real normed algebras

 
 fixes f :: "nat ==> 'a::real_normed_algebra"
 

  sassu "n \le m""
 by (rule bounded_linear.sums [OF bounded_linear_mult_right])

  summable_mult: "summable f ==> summable (λn. c * f n)"
 by (rule bounded_linear.summable [OF bounded_linear_mult_right])

  suminf_multlby blast
 by (rule bounded_linear.suminf [OF bounne

  sums_mut2 f smsa 🚫
 by (rule bounded_linear.sums [OF bounded_linear_mult_left])

  summ y blas
 by (rule bounded_linear.summable [OF bounded_linear_mult_left])

  suminf_mult2: "summable f ==> n"
 by (rule bounded_linear.suminf [OF bounded_linear_mult_left])

 

  sums_mult_iff:
 f :: "n <>'
 assumes "c
 shows "(λ
 using sums_mult[of f d c] sums_mult[of "λ 'a :: banach"
 by (force simp: field_sim asss)

 s_mult2_iff
 fixes f :: "nat ==>ra,ild"
 assumes "c n. norm (sum f {m..<n}) at_top"
 shows "(λn. f n * proevetal_eli
 using m_ult_i[OF asms, of ] by sim add: lt.comu)

  sums_of_real_iff:
 "(λn. of_real (f n) :: 'a::real_normed_div_algebra) sums of_real c
 by (simp add: sums_def of_real_sum[symmetric] tendsto_of_real_iff del: of_real_sum)


  Absolute convergence imples normal convergence.

 
 fixes c :: "'a::real_normed_field"
 

 sums_divide: "f sums a ==> (λn. f n / c) sums (a / c)"
 by (a(auto intro: LIMSEQ_letnst_ormsual_no_anelsumale_LIMSQ or_sm

  summable_divide: "summable f ==> summable (λn. f n / c)"
 by (rule bounded_linear.summable [OF bounded_linear_divi> g nn ndg"umbeg

  suminf_divide: "summable f ==>
 by (rule bounded_linear.suminf [OF bounded_linear_divide, symmetric])

  summable_inverse_divide: "summable (inverse n. c / f n)"
 by (auto dest: summable_mult [of _ c] simp: field_simps)

  sums_mult_D: "(λ c f sum ac)
 using sums_mult_iff by fastforce

  summable_mult_D: "summable (λn. c * f n) ==> c 0 ==> summable f"
 by (auto dest: summable_divide)


  Sum of a geometric progression.

  geometric_sums:
 assumes "norm c < 1 thtb(fre into:s_or_e)
 shows "(λc) sus ( / 1-c))"
java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "brackoff" is null
 have neq_0: "c - 1 0"
 using assms by auto
 then have "(λ(c - 1)) \<nglonglongrightarrowglonglongrightarrowThe Ratio Test
    by (intro tendsto_intros assms)
  (lambdan. (c ^ n - 11)<longlonglongrightarrow 1 / (1 - c)"
    simpznudieright OF ne0 if_ii_ditrb
  with neq_0 show "(λ )
    by (simp add:fix
qed

lemma summable_geometric:          
  by (rule geometric_sums

lemma suminf_geometric: "norm c < 1 ==> suminf (λn. c^n) = 1 / (1 - c)"
  by (rule sums_unique[symmetric

lemma summable_geometric_iff [simp]: "summable (λn. c ^ n) n <"
proof
  assume "summable (λ
  then have "(λn. norm c ^ n) <----  have "f (Su n =" <> N"r
    by (simpad: nor_oe [symymmeti edsonr_zro_ffsummabeLIMEQ_zero)
  from order_tendstoD(2)[OF this zero_less_one] obtain n where "norm c ^ n < 1"
    by (auto simp: eventually_at_top_linorder)
  then show "norm c < 1" using one_le_power[of "norm c" n]
    by (cases "norm c  1") (linarith, simp)
ed(le summale_geomic

java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 3

text
context
  fixes c :: " a::real_normed_field"
 

  summable_cmult_iff [simp]: "summable (\<lambdashown. norm (z n)
  -
 have "[
 using summable_mult_D by blast
 hen sow thes
 by (auto simp: summable_mult)
 

  summable_divide_iff [simp]: "summable (λ
  -
 have "[summable (λn. f n / c); c ==>
 by (auto dest: summable_divide [where c = "1/c"])
 then show ?thesis
 by (auto simp: summable_divide)
 

 

  power_half_seriesbda>n. M * ( r0) ^ n)"
  -
 have 2: "(λn. (1/2::real)^n) sums 2"
 ng emtc_sms of "1/2::real"] by auto
java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "macro" is null
 by (simp add: mult.commute)
 then show ?thesis
 using sums_divide [OF 2, of 2] by simp
 


 

  telescope_sums:
 fixes c :: "'a::real_normed_vector"
 assumes "f <----
 shows "(λn. f (Suc n) - f n) sums (c - f 0)"
 unfolding sums_def
  (subst fi aand b: "sumabe (\lambda. norm (b k))"
 have "(λn. i. i* k-i) us .ak * \<Sumk"
 by (simp add: lessThan_Suc_atMost atLeast0AtMost [symmetric] sum_Suc_diff)
 also have " <---- " n ==> ?S1 n" by auto
 by (intro tendsto_diff LIMSEQ_Suc[OF assms] tendsto_const)
 lly how"(<>nn. f (Suc n) - f n) <---- c - f 0" .
 

  telescope_sums':
 fixes c :: "'a::real_normed_vector"
 assumes "f <----
 shows "(λn. f n - f (Suc n)) sums (f 0 - c)"
 using sums_minus[OF telescope_sums[OF assms]] by (simp add: algebra_simps)

  telescope_summable:
 fixes c :: "'a::real_normed_vector"
 assumes "f <----
 "mmble (\lambda
 using telescope_sums[OF assms] by (simp add: sums_iff)

  telescope_summable':
 fixes c :: "'a::real_normed_vector"
 assumes "f <---- c"
 shows "summable (λn. f n - f (Suc n))"
 using summable_minus[OF telescope_summable[OF assms]] by (simp aassu: " r"


  mn r ..

 

  summable_Cauchy: "summable f e>0. mn. norm (sum f {m..<n})" (is "_ = ?rhs")
 for f :: "nat ==>
 
 ume :"sumale f"
 show ?rhs
 proof clarify
 fix e :: real
 assume "0 < e
 meM] norm (sum f {..<m} - sm f .<})"
 using f by (force simp add: summable_iff_convergent Cauchy_convergent_iff [symmetric] Cauchy_iff) using d_ledvidby (rule )
 have "norm (sum f {m..<n}) < e
 proof (cases m n rule: linorder_class.le_cases)
 assume "m n"
 
 by (metis (moappl(tsad lie
 next
 assume "n m"
 then show ?thesis
 by (simp add: )
 qed
 then show " 1ve \lambdan sum ?g (?S2 n)) <---- (k. a k) * ("
 by blast
 qed
 
 assume rs
 then show "summable f"
 unfolding summable_iff_convergent Cauchy_convergent_iff [symmetric] Cauchy_iff
 proof clarify
 fix e :: real
 assume "0 < e
 h obain wee N: "\Andm n. m N ==> norm (sum f {m..<n}) < ek. norm (b k))"
 blast
 have "norm (sum f {..<m}
 proof (cases m n rule: linorder_class.le_cases)
 assume "m
 then summable_norm_cmpaiontet
 by (metis N finite_lessThan lessThan_minus_lessThan lessThan_subset_iff norm_minus_commute sum_diff )
 next
 assume "n N. N. summable g ==>n. \bar>f
 then show ?thesis
 by (metis N finite_lessThan lessThaem summabl: suabl\lambdan. f n summable f"
 qed
 then show "e λf n n. f n
  lst
 qed
 

  summable_Cauchy':
 fixes f :: "nat ==> 'a :: banach"
 umes v: evtally (<>m
 ssumes0: "g \longlonglongrightarrow 0"
 shows "summable f"
  (subst summable_Cauchy, intro allI impI, goal_cases)
 case (1 e)
 then have "F x in sequentially. g x < e
 using g0 order_tendstoD(2) by blast
 ith ev have "eventually (λn. norm (sum f {m..<n}) < e
 proof eventually_elim
 case (elim m)
 show ?case
 proof
 fix n
 from elim show "norm (sum f {m..<n}) < e
 by (cases "n
 qed
 qed
 thus ?case by (auto simp: eventually_at_top_linorder)
 

 
 fixes f :: "nat ==> 'a::banach"
 

 

  summable_norm_cancel: "summable (λn. norm (f n)) ==> summable f"
 unfolding summable_Cauchy
 apply (erule all_forward imp_forward ex_forward | assumption)+
 apply (fastforce simp add: order_le_esstran [OFnom_sm] rdr_lee_ttras[Fabse_ef)
 one

  summable_norm: "summable (λn. norm (f n)) \<Longrightarrowshow
 by (auto intro: LIMSEQ_le tendsto_norm summable_norm_cancel summable_LIMSEQ norm_sum)

 

 summable_comparison_test
 assumes fg: "N.
 shows "summable f"
  -
 obtain N where N: "n. n = summable (λn. f n * z ^ n)"
 singassm y bat
 show ?thesis
 proof (clarsimp simp add: summable_Cauchy)
 fix e :: real
 assume "0 < e
 then obtain Ng where Ng: "m n. m
 using g by (fastforce simp: summable_Cauchy)
 with N have "norm (sum f {m..<n}usle_ms)
 proof
 have "norm (sum f {m.<}  sum g {m..<n}"
 ngt b (oce nto:um_ormle)
 also have "...
 by simp
 also have "... < e
 using Ng that by auto
 finally show ?thesis .
 qed
 then show "n.
  lat
 qed
 

  summable_comparison_test_ev:
 "eventually (λ>k<Suc  f k) =(\Sumk=m..n. f k)"
 rulesme_comarsn_testes)(u sim vntualy_atnordeer)

 
  summable_comparison_test': "summable g ==> (n. n
 by (rule summable_comparison_test) auto


 

  summable_ratio_test:
 
 shows "summable f"
  (cases "0 < c")
 case True

 proof from \>c> [simp]: "A. inj_on g
 show "\havefn. ( (f \<circ > suminf f"
 proof (intro exI allI impI)
 fix n
 assume "N n"
 then show "norm (f n) (norm (f N) / (c ^ N)) * c ^ n"
 proof (induct rule: hen obta mwhen: "And>n'. n' <n ==> g n' < m
 
 with True show ?case by simp
 next
 case (step m)
  u m* c ^^n\<>norm
 using
 with step show ?case by simp
 qed
 qed
 show "summable (λn. norm (f N) / c ^ N * c ^ n)"
 using i<n. g) i) <----L
 qed
 
 case False
 have "f (Suc n) = 0" if "n N" for n
 proof -
 from that ha
 by (rule assms(2))
 also have "
 using False by (simp add: not_less mult_nonpos_nonneg)
 finally show ?thesis
 by aututo
 qed
 then show "summable f"
 by (intro sums_summable[OF sums_finite, of "{.. Suc N}"]) (auto simp: not_le Suc_less_eq2)
 

 

 
  norm_summable_ln_series:
 fixes z :: "'a :: {real_normed_field, banach}"
 assumes "norm z < 1
 shows "summable (λ / _na )
  (rule summable_ hows "(<mbdan f k) \<onglonglongrightarrowlonglongrightarrow
 show "summabe (\lambdan. nom ( n))
 using ass pproof
 have "norm z ^ n / real n k<n.k. f k)"
 proof (casesalsrmubse ve\dots = (
 lse
 hence "nom <> 
 by (intro mult_left_mono) auto
 thus ?thesis
 using False by (simp add: field_simps)
 qed auto
 ">N norm (norm (z ^ n / of_nat n))
 xIf0) at sm:nom_powrnomiie)
 


 

  Abel_lemma:
 fixes a :: "nat ==> 'a::real_normed_vector"
 assumes r: 0
 and fix n : a
 and M: "n. norm (a n) * r0^n {..<n} - g`{.<_inv <notin g
 shows "summable (λn. norm (a n) * r^n)"
 by (ule_l_tn[O ginv)(sk linsp_al)
 show "summable (λ
 using assms by (auto qe
 show "norm (norm (a n) * r ^ n) \<le}
 using r r0 M [of n] dual_order.order_iff_strict
 by (fastforce simp add: abs_mult field_simps)
 


java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

  complete_algebra_summable_geometric:
 byufill_ps
 assumes "norm x < 1
 shows "summable (λ
  (rule summable_comparison_test)
 show "\<xistsNedef)
 by (simp add: norm_power_ineq)
 from assms show "summable (λn. n f 0
 by (simp add: summable_geometric)
 


 

 
 Proof based on Analysis WebNotes: Chapter 07, Class 41
 🪙
 
by simp

  Cauchy_product_sums:
 fixes a b :: "nat ==>
 assumes a: "summable (λ
 and b: "summable (λk.r k)"
 shows "(λojOtsud tai wee :
  -
 let ?S1 = "λn::nat. {..<n} \  
 let ?S2 = "λn::nat. {(i,j). i + j < n
 have S1_mono: "
 have S2_le_S1: "n. ?S2 n v"{. {.m {<.n
 have S1_le_S2: " g m
 have finite_S1: "\<And.
 with S2_le_S1 havefntS2\Andn. finite (?S2 n)" by (rule finite_subset)

 
 let ?f = "λ(i,j). norm (a i) * norm (b j)"
 have f_nonneg: "x. 0 ?f x" by auto
 then have norm_sum_f: "A. norm (sum ?f A) = sum ?f A"
 unfolding real_norm_def
 by (simp only: abs_of_nonneg sum_nonneg [rule_format])

 have "(λn. (k<n. a k) * (k<n. b k)) <---- (k. a k) * (k. b k)"
 by (intro tendsto_mult summable_LIMSEQ summable_norm_cancel [OF a] summable_norm_cancel [OF b])
 then have 1: "(λn. sum ?g (?S1 n)) <---- (k. a k) * (k. b k)"
 by (simp only: sum_product sum.Sigma [rule_format] finite_lessThan)

 have "(λn. (k<n. norm (a k)) * (k<n. norm (b k))) <---- (k. norm (a k)) * (k. norm (b k))"
 using a b by (intro tendsto_mult summable_LIMSEQ)
 then have "(λn. sum ?f (?S1 n)) <---- (k. norm (a k)) * (k. norm (b k))"
 by (simp only: sum_product sum.Sigma [rule_format] finite_lessThan)
 then have "convergent (λn. sum ?f (?S1 n))"
 by (rule convergentI)
 then have Cauchy: "Cauchy (λn. sum ?f (?S1 n))"
 by (rule convergent_Cauchy)
 have "Zfun (λn. sum ?f (?S1 n - ?S2 n)) sequentially"
 proof (rule ZfunI, simp only: eventually_sequentially norm_sum_f)
 fix r :: real
 assume r: "0 < r"
 from CauchyD [OF Cauchy r] obtain N
 where "mN. nN. norm (sum ?f (?S1 m) - sum ?f (?S1 n)) < r" ..
 then have "m n. N n ==> n m ==> norm (sum ?f (?S1 m - ?S1 n)) < r"
 by (simp only: sum_diff finite_S1 S1_mono)
 then have N: "m n. N n ==> n m ==> sum ?f (?S1 m - ?S1 n) < r"
 by (simp only: norm_sum_f)
 show "N. nN. sum ?f (?S1 n - ?S2 n) < r"
 proof (intro exI allI impI)
 fix n
 assume "2 * N n"
 then have n: "N n div 2" by simp
 have "sum ?f (?S1 n - ?S2 n) sum ?f (?S1 n - ?S1 (n div 2))"
 by (intro sum_mono2 finite_Diff finite_S1 f_nonneg Diff_mono subset_refl S1_le_S2)
 also have " < r"
 using n div_le_dividend by (rule N)
 finally show "sum ?f (?S1 n - ?S2 n) < r" .
 qed
 qed
 then have "Zfun (λn. sum ?g (?S1 n - ?S2 n)) sequentially"
 apply (rule Zfun_le [rule_format])
 apply (simp only: norm_sum_f)
 apply (rule order_trans [OF norm_sum sum_mono])
 apply (auto simp add: norm_mult_ineq)
 done
 then have 2: "(λn. sum ?g (?S1 n) - sum ?g (?S2 n)) <---- 0"
 unfolding tendsto_Zfun_iff diff_0_right
 by (simp only: sum_diff finite_S1 S2_le_S1)
 with 1 have "(λn. sum ?g (?S2 n)) <---- (k. a k) * (k. b k)"
 by (rule Lim_transform2)
 then show ?thesis
 by (simp only: sums_def sum.triangle_reindex)
 

  Cauchy_product:
 fixes a b :: "nat ==> 'a::{real_normed_algebra,banach}"
 assumes "summable (λk. norm (a k))"
 and "summable (λk. norm (b k))"
 shows "(k. a k) * (k. b k) = (k. ik. a i * b (k - i))"
 using assms by (rule Cauchy_product_sums [THEN sums_unique])

  summable_Cauchy_product:
 fixes a b :: "nat ==> 'a::{real_normed_algebra,banach}"
 assumes "summable (λk. norm (a k))"
 and "summable (λk. norm (b k))"
 shows "summable (λk. ik. a i * b (k - i))"
 using Cauchy_product_sums[OF assms] by (simp add: sums_iff)


  Series on 🍋reals

  summable_norm_comparison_test:
 "N. nN. norm (f n) g n ==> summable g ==> summable (λn. norm (f n))"
 by (rule summable_comparison_test) auto

  summable_rabs_comparison_test: "N. nN. f n g n ==> summable g ==> summable (λn. f n)"
 for f :: "nat ==> real"
 by (rule summable_comparison_test) auto

  summable_rabs_cancel: "summable (λn. f n) ==> summable f"
 for f :: "nat ==> real"
 by (rule summable_norm_cancel) simp

  summable_rabs: "summable (λn. f n) ==> suminf f (n. f n)"
 for f :: "nat ==> real"
 by (fold real_norm_def) (rule summable_norm)

  norm_suminf_le:
 assumes "n. norm (f n :: 'a :: banach) g n" "summable g"
 shows "norm (suminf f) suminf g"
  -
 have *: "summable (λn. norm (f n))"
 using assms summable_norm_comparison_test by blast
 hence "norm (suminf f) (n. norm (f n))" by (intro summable_norm) auto
 also have " suminf g" by (intro suminf_le * assms allI)
 finally show ?thesis .
 

  norm_sums_le:
 assumes "f sums F" "g sums G"
 assumes "n. norm (f n :: 'a :: banach) g n"
 shows "norm F G"
 using assms by (metis norm_suminf_le sums_iff)

  summable_zero_power [simp]: "summable (λn. 0 ^ n :: 'a::{comm_ring_1,topological_space})"
 by (simp add: power_0_left)

  summable_zero_power' [simp]: "summable (λn. f n * 0 ^ n :: 'a::{ring_1,topological_space})"
  -
 have "(λn. f n * 0 ^ n :: 'a) = (λn. if n = 0 then f 0 * 0^0 else 0)"
 by (intro ext) (simp add: zero_power)
 moreover have "summable " by simp
 ultimately show ?thesis by simp
 

  summable_power_series:
 fixes z :: real
 assumes le_1: "i. f i 1"
 and nonneg: "i. 0 f i"
 and z: "0 z" "z < 1"
 shows "summable (λi. f i * z^i)"
  (rule summable_comparison_test[OF _ summable_geometric])
 show "norm z < 1"
 using z by (auto simp: less_imp_le)
 show "n. N. naN. norm (f na * z ^ na) z ^ na"
 using z
 by (auto intro!: exI[of _ 0] mult_left_le_one_le simp: abs_mult nonneg power_abs less_imp_le le_1)
 

  summable_0_powser: "summable (λn. f n * 0 ^ n :: 'a::real_normed_div_algebra)"
 by simp

  summable_powser_split_head:
 "summable (λn. f (Suc n) * z ^ n :: 'a::real_normed_div_algebra) = summable (λn. f n * z ^ n)"
  -
 have "summable (λn. f (Suc n) * z ^ n) summable (λn. f (Suc n) * z ^ Suc n)"
 (is "?lhs ?rhs")
 proof
 show ?rhs if ?lhs
 using summable_mult2[OF that, of z]
 by (simp add: power_commutes algebra_simps)
 show ?lhs if ?rhs
 using summable_mult2[OF that, of "inverse z"]
 by (cases "z 0", subst (asm) power_Suc2) (simp_all add: algebra_simps)
 qed
 also have " summable (λn. f n * z ^ n)" by (rule summable_Suc_iff)
 finally show ?thesis .
 

  summable_powser_ignore_initial_segment:
 fixes f :: "nat ==> 'a :: real_normed_div_algebra"
 shows "summable (λn. f (n + m) * z ^ n) summable (λn. f n * z ^ n)"
  (induction m)
 case (Suc m)
 have "summable (λn. f (n + Suc m) * z ^ n) = summable (λn. f (Suc n + m) * z ^ n)"
 by simp
 also have " = summable (λn. f (n + m) * z ^ n)"
 by (rule summable_powser_split_head)
 also have " = summable (λn. f n * z ^ n)"
 by (rule Suc.IH)
 finally show ?case .
  simp_all

  powser_split_head:
 fixes f :: "nat ==> 'a::{real_normed_div_algebra,banach}"
 assumes "summable (λn. f n * z ^ n)"
 shows "suminf (λn. f n * z ^ n) = f 0 + suminf (λn. f (Suc n) * z ^ n) * z"
 and "suminf (λn. f (Suc n) * z ^ n) * z = suminf (λn. f n * z ^ n) - f 0"
 and "summable (λn. f (Suc n) * z ^ n)"
  -
 from assms show "summable (λn. f (Suc n) * z ^ n)"
 by (subst summable_powser_split_head)
 from suminf_mult2[OF this, of z]
 have "(n. f (Suc n) * z ^ n) * z = (n. f (Suc n) * z ^ Suc n)"
 by (simp add: power_commutes algebra_simps)
 also from assms have " = suminf (λn. f n * z ^ n) - f 0"
 by (subst suminf_split_head) simp_all
 finally show "suminf (λn. f n * z ^ n) = f 0 + suminf (λn. f (Suc n) * z ^ n) * z"
 by simp
 then show "suminf (λn. f (Suc n) * z ^ n) * z = suminf (λn. f n * z ^ n) - f 0"
 by simp
 

  summable_partial_sum_bound:
 fixes f :: "nat ==> 'a :: banach"
 and e :: real
 assumes summable: "summable f"
 and e: "e > 0"
 obtains N where "m n. m N ==> norm (k=m..n. f k) < e"
  -
 from summable have "Cauchy (λn. k<n. f k)"
 by (simp add: Cauchy_convergent_iff summable_iff_convergent)
 from CauchyD [OF this e] obtain N
 where N: "m n. m N ==> n N ==> norm ((k<m. f k) - (k<n. f k)) < e"
 by blast
 have "norm (k=m..n. f k) < e" if m: "m N" for m n
 proof (cases "n m")
 case True
 with m have "norm ((k<Suc n. f k) - (k<m. f k)) < e"
 by (intro N) simp_all
 also from True have "(k<Suc n. f k) - (k<m. f k) = (k=m..n. f k)"
 by (subst sum_diff [symmetric]) (simp_all add: sum.last_plus)
 finally show ?thesis .
 next
 case False
 with e show ?thesis by simp_all
 qed
 then show ?thesis by (rule that)
 

  powser_sums_if:
 "(λn. (if n = m then (1 :: 'a::{ring_1,topological_space}) else 0) * z^n) sums z^m"
  -
 have "(λn. (if n = m then 1 else 0) * z^n) = (λn. if n = m then z^n else 0)"
 by (intro ext) auto
 then show ?thesis
 by (simp add: sums_single)
 

 
 fixes f :: "nat ==> real"
 assumes "summable f"
 and "inj g"
 and pos: "x. 0 f x"
 shows summable_reindex: "summable (f g)"
 and suminf_reindex_mono: "suminf (f g) suminf f"
 and suminf_reindex: "(x. x range g ==> f x = 0) ==> suminf (f g) = suminf f"
  -
 from inj g have [simp]: "A. inj_on g A"
 by (rule inj_on_subset) simp

 have smaller: "n. (i<n. (f g) i) suminf f"
 proof
 fix n
 have " n' (g ` {..<n}). n' < Suc (Max (g ` {..<n}))"
 by (metis Max_ge finite_imageI finite_lessThan not_le not_less_eq)
 then obtain m where n: "n'. n' < n ==> g n' < m"
 by blast

 have "(i<n. f (g i)) = sum f (g ` {..<n})"
 by (simp add: sum.reindex)
 also have " (i<m. f i)"
 by (rule sum_mono2) (auto simp add: pos n[rule_format])
 also have " suminf f"
 using summable f
 by (rule sum_le_suminf) (simp_all add: pos)
 finally show "(i<n. (f g) i) suminf f"
 by simp
 qed

 have "incseq (λn. i<n. (f g) i)"
 by (rule incseq_SucI) (auto simp add: pos)
 then obtain L where L: "(λ n. i<n. (f g) i) <---- L"
 using smaller by(rule incseq_convergent)
 then have "(f g) sums L"
 by (simp add: sums_def)
 then show "summable (f g)"
 by (auto simp add: sums_iff)

 then have "(λn. i<n. (f g) i) <---- suminf (f g)"
 by (rule summable_LIMSEQ)
 then show le: "suminf (f g) suminf f"
 by(rule LIMSEQ_le_const2)(blast intro: smaller[rule_format])

 assume f: "x. x range g ==> f x = 0"

 from summable f have "suminf f suminf (f g)"
 proof (rule suminf_le_const)
 fix n
 have " n' (g -` {..<n}). n' < Suc (Max (g -` {..<n}))"
 by(auto intro: Max_ge simp add: finite_vimageI less_Suc_eq_le)
 then obtain m where n: "n'. g n' < n ==> n' < m"
 by blast
 have "(i<n. f i) = (i{..<n} range g. f i)"
 using f by(auto intro: sum.mono_neutral_cong_right)
 also have " = (ig -` {..<n}. (f g) i)"
 by (rule sum.reindex_cong[where l=g])(auto)
 also have " (i<m. (f g) i)"
 by (rule sum_mono2)(auto simp add: pos n)
 also have " suminf (f g)"
 using summable (f g) by (rule sum_le_suminf) (simp_all add: pos)
 finally show "sum f {..<n} suminf (f g)" .
 qed
 with le show "suminf (f g) = suminf f"
 by (rule antisym)
 

  sums_mono_reindex:
 assumes subseq: "strict_mono g"
 and zero: "n. n range g ==> f n = 0"
 shows "(λn. f (g n)) sums c f sums c"
 unfolding sums_def
 
 assume lim: "(λn. k<n. f k) <---- c"
 have "(λn. k<n. f (g k)) = (λn. k<g n. f k)"
 proof
 fix n :: nat
 from subseq have "(k<n. f (g k)) = (kg`{..<n}. f k)"
 by (subst sum.reindex) (auto intro: strict_mono_imp_inj_on)
 also from subseq have " = (k<g n. f k)"
 by (intro sum.mono_neutral_left ballI zero)
 (auto simp: strict_mono_less strict_mono_less_eq)
 finally show "(k<n. f (g k)) = (k<g n. f k)" .
 qed
 also from LIMSEQ_subseq_LIMSEQ[OF lim subseq] have " <---- c"
 by (simp only: o_def)
 finally show "(λn. k<n. f (g k)) <---- c" .
 
 assume lim: "(λn. k<n. f (g k)) <---- c"
 define g_inv where "g_inv n = (LEAST m. g m n)" for n
 from filterlim_subseq[OF subseq] have g_inv_ex: "m. g m n" for n
 by (auto simp: filterlim_at_top eventually_at_top_linorder)
 then have g_inv: "g (g_inv n) n" for n
 unfolding g_inv_def by (rule LeastI_ex)
 have g_inv_least: "m g_inv n" if "g m n" for m n
 using that unfolding g_inv_def by (rule Least_le)
 have g_inv_least': "g m < n" if "m < g_inv n" for m n
 using that g_inv_least[of n m] by linarith
 have "(λn. k<n. f k) = (λn. k<g_inv n. f (g k))"
 proof
 fix n :: nat
 {
 fix k
 assume k: "k {..<n} - g`{..<g_inv n}"
 have "k range g"
 proof (rule notI, elim imageE)
 fix l
 assume l: "k = g l"
 have "g l < g (g_inv n)"
 by (rule less_le_trans[OF _ g_inv]) (use k l in simp_all)
 with subseq have "l < g_inv n"
 by (simp add: strict_mono_less)
 with k l show False
 by simp
 qed
 then have "f k = 0"
 by (rule zero)
 }
 with g_inv_least' g_inv have "(k<n. f k) = (kg`{..<g_inv n}. f k)"
 by (intro sum.mono_neutral_right) auto
 also from subseq have " = (k<g_inv n. f (g k))"
 using strict_mono_imp_inj_on by (subst sum.reindex) simp_all
 finally show "(k<n. f k) = (k<g_inv n. f (g k))" .
 qed
 also {
 fix K n :: nat
 assume "g K n"
 also have "n g (g_inv n)"
 by (rule g_inv)
 finally have "K g_inv n"
 using subseq by (simp add: strict_mono_less_eq)
 }
 then have "filterlim g_inv at_top sequentially"
 by (auto simp: filterlim_at_top eventually_at_top_linorder)
 with lim have "(λn. k<g_inv n. f (g k)) <---- c"
 by (rule filterlim_compose)
 finally show "(λn. k<n. f k) <---- c" .
 

  summable_mono_reindex:
 assumes subseq: "strict_mono g"
 and zero: "n. n range g ==> f n = 0"
 shows "summable (λn. f (g n)) summable f"
 using sums_mono_reindex[of g f, OF assms] by (simp add: summable_def)

  suminf_mono_reindex:
 fixes f :: "nat ==> 'a::{t2_space,comm_monoid_add}"
 assumes "strict_mono g" "n. n range g ==> f n = 0"
 shows "suminf (λn. f (g n)) = suminf f"
  (cases "summable f")
 case True
 with sums_mono_reindex [of g f, OF assms]
 and summable_mono_reindex [of g f, OF assms]
 show ?thesis
 by (simp add: sums_iff)
 
 case False
 then have "¬(c. f sums c)"
 unfolding summable_def by blast
 then have "suminf f = The (λ_. False)"
 by (simp add: suminf_def)
 moreover from False have "¬ summable (λn. f (g n))"
 using summable_mono_reindex[of g f, OF assms] by simp
 then have "¬(c. (λn. f (g n)) sums c)"
 unfolding summable_def by blast
 then have "suminf (λn. f (g n)) = The (λ_. False)"
 by (simp add: suminf_def)
 ultimately show ?thesis by simp
 

  summable_bounded_partials:
 fixes f :: "nat ==> 'a :: {real_normed_vector,complete_space}"
 assumes bound: "eventually (λx0. ax0. b>a. norm (sum f {a<..b}) g a) sequentially"
 assumes g: "g <---- 0"
 shows "summable f" unfolding summable_iff_convergent'
  (intro Cauchy_convergent CauchyI', goal_cases)
 case (1 ε)
 with g have "eventually (λx. g x < \ε) sequentially"
 by (auto simp: tendsto_iff)
 from eventually_conj[OF this bound] obtain x0 where x0:
 "x. x x0 ==> g x < \ε" "a b. x0 a ==> a < b ==> norm (sum f {a<..b}) g a"
 unfolding eventually_at_top_linorder by auto
 show ?case
 proof (intro exI[of _ x0] allI impI)
 fix m n assume mn: "x0 m" "m < n"
 have "dist (sum f {..m}) (sum f {..n}) = norm (sum f {..n} - sum f {..m})"
 by (simp add: dist_norm norm_minus_commute)
 also have "sum f {..n} - sum f {..m} = sum f ({..n} - {..m})"
 using mn by (intro Groups_Big.sum_diff [symmetric]) auto
 also have "{..n} - {..m} = {m<..n}" using mn by auto
 also have "norm (sum f {m<..n}) g m" using mn by (intro x0) auto
 also have " g m" by simp
 also have " < \ε" using mn by (intro x0) auto
 finally show "dist (sum f {..m}) (sum f {..n}) < \ε" .
 qed
 

 

Messung V0.5 in Prozent
C=58 H=76 G=67

¤ Dauer der Verarbeitung: 0.32 Sekunden  (vorverarbeitet am  2026-06-10) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.