Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/PVS/summaries/   (Beweissystem der NASA Version 6.0.9©) image not shown  

Impressum Transcendental.thy   Sprache: Isabelle

 

uthor      D. , University , University of
     ( n)
    AuthorJeremy
*)

sectioncase

ry Transcendental ( n)
 Series NthRoot
begin

text "( (Suc n)*( (Suc ) (Suc )*of_nat Sucn *( n * fact n :: real"

lemmasquare_fact_le_2_fact: " n * fact n \ (fact (2 * n) :: real)"
proof (induct  alsohave"mult_right_mono simp field_simps
  casecase 0
  then  finally ?case .
next
  case (Suc n)
  have "(fact (Suc n)) * (fact (Suc n)) = of_nat (Suc n) * of_nat (Suc n) * (fact n * fact n :: real)"
    by (simp add: field_simps)
  also have "\ \ of_nat (Suc n) * of_nat (Suc n) * fact (2 * n)"
    by (rule mult_left_mono [OF Suc]) simp
  also have "\ \ of_nat (Suc (Suc (2 * n))) * of_nat (Suc (2 * n)) * fact (2 * n)"
    by (rule mult_right_mono)+ (auto simp: field_simps)
  also have "\ = fact (2 * Suc n)" by (simp add: field_simps)
  finally show ?case .
qed

lemma fact_in_Reals: "fact n \ \"
  by (induction n) auto

lemma of_real_fact [simp]: "of_real (fact n) = fact n"
  by (metis of_nat_fact of_real_of_nat_eq)

lemma pochhammer_of_real: "pochhammer (of_real x) n = of_real (pochhammer x n)"
  by (simp add: pochhammer_prod)

lemma norm_fact [simp]: "norm (fact n :: 'a::real_normed_algebra_1) = fact n"
proof -
  have "(fact n :: 'a) = of_real (fact n)"
    by simp
  also have "norm \ = fact n"
    by (subst norm_of_real) simp
  finally show ?thesis .
qed

lemma root_test_convergence:
  fixes f :: "nat \ 'a::banach"
  assumes f: "(\n. root n (norm (f n))) \ x" \ \could be weakened to lim sup\
    and "x < 1"
  shows "summable f"
proof -
  have "0 \ x"
    by (rule LIMSEQ_le[OF tendsto_const f]) (auto intro!: exI[of _ 1])
  from \<open>x < 1\<close> obtain z where z: "x < z" "z < 1"
    by (metis dense)
  from f \<open>x < z\<close> have "eventually (\<lambda>n. root n (norm (f n)) < z) sequentially"
by rule)
   have eventually
    using eventually_ge_at_top
  proof eventually_elim
    fix n
    assume less: "root n (norm java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 subst java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
      byjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
  qed "summable "
  then show "summable f"
    unfolding eventually_sequentially
    using z \<open>0 \<le> x\<close> by (auto intro!: summable_comparison_test[OF _  summable_geometric])
qed rule[OF f] auto! [of ]java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70

subsection

lemmapowser_zero] (<n   *     "
  for f :: "nat \ 'a::real_normed_algebra_1"
proof -
  have    
 subst[where] auto )
  then show ?thesis by simp
qed

lemma"\lambdan ^)sums a 0"
  for : nat
  using sums_finite eventually_ge_at_top
  by simp

lemma powser_sums_zero_iff eventually_elim n
  for:nat
  using powser_sums_zero power_strict_monoOFless n]  "norm( )\ z ^ n"

text
Power has or of: if sums
  then 

lemma z
  fixesx  :"a:java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
  assumesjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     2: norm
  shows "
proof -
  rom : "x \ 0" by clarsimp
  frombysubst showbyjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
     java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
   have 
    by powser_sums_zero  
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
  then have it for
    by (rule Cauchy_Bseq)
  then   3:"n. ( ^)\java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
    by (autoassumes:summable
have
  proof ( exI impI
    fix n :: nat
    assume "0 \ n"
    haveshows " (\n. norm (f n * z ^ n))"
          norm 2havex_neq_0" \ 0" by clarsimp
      by (simpfrom have"( 0"
so have "\ \ K * norm (z ^ n)"
         have "convergent \n. f n * x^n)"
     have" = K * norm (z ^ n) * (inverse (norm (x^n)) * norm (x^n))"
      by (simp add:
alsojava.lang.NullPointerException
      thenwhere" :\foralln (f
    finally by( simp)
      by (simp add:  (intro impI)
  qed
 summable
  proof -
    from 2 have "norm (norm (z "normz^)   (^n 
using
      by (simp add abs_multalso have"
    then(lambdaz*inverse
      by (rule summable_geometric  "
    then have "summable (\n. K * norm (z * inverse x) ^ n)"
       java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
then"
      using x_neq_0
      by( add nonzero_norm_inverse
          power_inverse
 java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
  ultimately show "summable (\n. norm (f n * z ^ n))"
omparison_test
    rule

lemma:
     nat
  shows
    summable
      summable ( x_neq_0
  byrule [THEN]

lemma powser_times_n_limit_0:
   x :":{eal_normed_div_algebrabanach"
  assumes "norm x < 1"
    shows "(\n. of_nat n * x ^ n) \ 0"
proof -
  have "norm x / (1 - norm x) java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 5
    using  [ summable_norm_cancel
moreover  where:" x /1- x) N"
    usingf  :":{banach"
ultimately">"
byauto
  then 
 " x / 1-n x) \ 0"
  have **u assms simp)
      real_of_natN N: norm x < of_int
  proof -
    from that have "real_of_int N * real_of_nat (Suc n) \ real_of_nat n * real_of_int (1 + N)"
bysimp: algebra_simps
     have"real_of_int Sucn)*normx*norm x^)
     (real_of_nat1+N  norm (x^n)
      using N0 assms simp)
    thenh ** real_of_int   real_of_nat*(^)) <>
       simp)
  qed
  show ?proof
by( summable_LIMSEQ_zero , where=nat
      ( ( add)
qed

corollary lim_n_over_pown:
  fixes x :: "'a::{real_normed_field ( n * 1+ normx (x ^n)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
 <java.lang.StringIndexOutOfBoundsException: Index 106 out of bounds for length 106
  using
   simp  field_split_simps

lemma sum_split_even_odd:
  fixes f :: "nat \ real"
  shows "(\i<2 * n. if even i then f i else g i) = (\ii
proof (induct n)
  case 0
  then show ?case by   f :: " \ real"
next
  case (Suc n)
  have "(\i<2 * Suc n. if even i then f i else g i) =
    (\<Sum>i<n. f (2 * i)) + (\<Sum>i<n. g (2 * i + 1)) + (f (2 * n) + g (2 * n + 1))"
       java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
  also   "\i<2 * Suc n. if even i then f i else g i) =
    by auto
  finally show ?case .
qed

lemma sums_if':
   g : "at
  assumes "g sums x"
  shows "( n. if even n then 0 else g ((n - 1) div 2)) sums x"
  unfolding sums_def
 (ruleLIMSEQ_I)
  fixr: real
  assume "0 < r"
  from \<open>g sums x\<close>[unfolded sums_def, THEN LIMSEQ_D, OF this]
  obtain no where no_eq "(\ n. if even n then 0 else g ((n - 1) div 2)) sums x"
     blast

  let ?SUM = "\ m. \i
  have "(norm (?SUM m - x) < r)" ifproofruleLIMSEQ_I
  proof -
    from that have "m div 2 \ no" by auto
    have sum_eq: "?SUM (2 * (m div 2)) = sum g {..< m div 2}"
      using sum_split_even_odd"0
    then havehave"norm(?SUMm x) if <ge> 2 * no" for m
      using no_eqproof
    java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
     have( SUM )- <"
    proof (cases "even m")
      casejava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
       show
        by (autoTrue
    next
      case False
then eq Suc ( )  "
      then have "even (2 * (m div 2))"    java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
       "SUMm=?SUMS (2 * (mdiv 2)))"eq
      also have "\ = ?SUM (2 * (m div 2))" using \even (2 * (m div 2))\ by auto
 thesis
    qedalsohave\<dots> = ?SUM (2 * (m div 2))" using \<open>even (2 * (m div 2))\<close> by auto
 show by auto
  qed
  then
       show
qed

lemma sums_if:
  fixes g :: "nat \ real"
  assumes "g sums x"java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  shows " "g sumsx"and "f sums
proof -
  let s ="\ n. if even n then 0 else f ((n - 1) div 2)"
  have if_sum: "(if B thenproof -
    for B T E
    by (cases B) auto
  have g_sums: "(\ n. if even n then 0 else g ((n - 1) div 2)) sums x"
    using sums_if'[OF have if_sum: "(if B then (0 :: real) else E) + (if B then T else 0) = (if B then T else E)"
  have if_eq: "\B T E. (if \ B then T else E) = (if B then E else T)"
    by auto
  have cases
  from this   g_sums(l>.iftheng(n- 1 div "
  have "(\n. if even n then f (n div 2) else 0) sums y"
    by (simp add: lessThan_Suc_eq_insert_0 sum.atLeast1_atMost_eq image_Suc_lessThan    using sums_ifOF
         sums_def : if_weak_cong
  from sums_add[OFhave"ssumsy 'OF\f sums y\] .
    by (simp: if_sum
qed

 \<open>Alternating series test / Leibniz formula\<close>
(* FIXME: generalise these results from the reals via type classes? *)

 :
  fixes only
  assumes
    and open>Alternating series test / Leibniz formula\<close>
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  shows "\l. ((\n. (\i<2*n. (- 1)^i*a i) \ l) \ (\ n. \i<2*n. (- 1)^i*a i) \ l) \
  shows "l. ((\n. (\i<2*n. (- 1)^i*a i) \ l) \ (\ n. \i<2*n. (- 1)^i*a i) \ l) \
  (is "\l. ((\n. ?f n \ l) \ _) \ ((\n. l \ ?g n) \ _)")
proof (rule nested_sequence_unique)
             \forall.l\<le> (\<Sum>i<2*n + 1. (- 1)^i*a i)) \<and> (\<lambda> n. \<Sum>i<2*n + 1. (- 1)^i*a i) \<longlonglongrightarrow> l)"

  showproof rule)
  proof
    show   "\n. ?f n \ ?f (Suc n)"
      using[of*] auto
  qed
  show "\n. ?g (Suc n) \ ?g n"
  proof
    show "? java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
      using mono[of "Suc (2*n)"by       mono "Suc (2n)"]byauto
  qed
  show "\n. ?f n \ ?g n"
  proof
    show "?f n \ ?g n" for ng n"
      usingproof
  qed
  show "(\n. ?f n - ?g n) \ 0"
    unfolding fg_diff
  proof (rule LIMSEQ_I)
    fix r :: real
    assume "0< "
    withshow(\<lambda>n. ?f n - ?g n) \<longlonglongrightarrow> 0"
   ( LIMSEQ_I
have
      by auto
    then show \<open>a \<longlonglongrightarrow> 0\<close>[THEN LIMSEQ_D] obtain N where "\<And> n. n \<ge> N \<Longrightarrow> norm (a n - 0) < r"
           show\<exists>N. \<forall>n \<ge> N. norm (- a (2 * n) - 0) < r"
  java.lang.StringIndexOutOfBoundsException: Range [0, 5) out of bounds for length 3
qed

lemma summable_Leibniz':
  fixes a :: "nat \ real"
  assumes a_zero    and"<>n.a ( n) \ a n"
    and a_pos: "\n. 0 \ a n"
   and : "\n. a (Suc n) \ a n"
java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
    and "\n. (\i<2*n. (-1)^i*a i) \ (\i. (-1)^i*a i)"
    and "(\n. \i<2*n. (-1)^i*a i) \ (\i. (-1)^i*a i)"
    and "\n. (\i. (-1)^i*a i) \ (\i<2*n+1. (-1)^i*a i)"
 "(\n. \i<2*n+1. (-1)^i*a i) \ (\i. (-1)^i*a i)"
proof -
  let?S="\n. (-1)^n * a n"
  let ?P = "\n. \i
  let ?f = "\n. ?P (2 * n)"
  let ?g = "\n. ?P (2 * n + 1)"
  obtain l  letf  \<lambda>n. ?P (2 * n)"
       l:
      and
       above_l:
      and "?g \ l"
   usingsums_alternating_upper_lower a_monotone a_pos] by blast

  let? = "\m. \n
 "? \ l"
  proof (rule LIMSEQ_I)
    fix : real
    assume "0 < r"
    with \<open>?f \<longlonglongrightarrow> l\<close>[THEN LIMSEQ_D]
    obtain f_no where f: "\n. n \ f_no \ norm (?f n - l) < r"
      by auto
    from \<open>0 < r\<close> \<open>?g \<longlonglongrightarrow> l\<close>[THEN LIMSEQ_D]
    obtain g_no where g: "\n. n \ g_no \ norm (?g n - l) < r"
      by auto
    have "norm (?Sa n - l) < r" if "n \ (max (2 * f_no) (2 * g_no))" for n
    proof -
      from that have "n \ 2 * f_no" and "n \ 2 * g_no" by auto
      show ?thesis
      proof (cases "even n")
        case True
        then have n_eq: "2 * (n div 2) = n"
          by (simp add: even_two_times_div_two)
        with \<open>n \<ge> 2 * f_no\<close> have "n div 2 \<ge> f_no"
          by auto
        from f[OF this] show ?thesis
          unfolding n_eq atLeastLessThanSuc_atLeastAtMost .
      next
        case False
        then have "even (n - 1)" by simp
        then have n_eq: "2 * ((n - 1) div 2) = n - 1"
          by (simp add: even_two_times_div_two)
        then have range_eq: "n - 1 + 1 = n"
          using odd_pos[OF False] by auto
        from n_eq \<open>n \<ge> 2 * g_no\<close> have "(n - 1) div 2 \<ge> g_no"
          by auto
        from g[OF this] show ?thesis
          by (simp only: n_eq range_eq)
      qed
    qed
    then show "\no. \n \ no. norm (?Sa n - l) < r" by blast
  qed
  then have sums_l: "(\i. (-1)^i * a i) sums l"
    by (simp only: sums_def)
  then show "summable ?S"
    by (auto simp: summable_def)

  have "l = suminf ?S" by (rule sums_unique[OF sums_l])

  fix n
  show "suminf ?S \ ?g n"
    unfolding sums_unique[OF sums_l, symmetric] using above_l by auto
  show "?f n \ suminf ?S"
    unfolding sums_unique[OF sums_l, symmetric] using below_l by auto
  show "?g \ suminf ?S"
    using \<open>?g \<longlonglongrightarrow> l\<close> \<open>l = suminf ?S\<close> by auto
  show "?f \ suminf ?S"
    using \<open>?f \<longlonglongrightarrow> l\<close> \<open>l = suminf ?S\<close> by auto
qed

theorem summable_Leibniz:
  fixes a :: "nat \ real"
  assumes a_zero: "a \ 0"
    and "monoseq a"
  shows "summable (\ n. (-1)^n * a n)" (is "?summable")
    and "0 < a 0 \
      (\<forall>n. (\<Sum>i. (- 1)^i*a i) \<in> { \<Sum>i<2*n. (- 1)^i * a i .. \<Sum>i<2*n+1. (- 1)^i * a i})" (is "?pos")
    and "a 0 < 0 \
      (\<forall>n. (\<Sum>i. (- 1)^i*a i) \<in> { \<Sum>i<2*n+1. (- 1)^i * a i .. \<Sum>i<2*n. (- 1)^i * a i})" (is "?neg")
    and "(\n. \i<2*n. (- 1)^i*a i) \ (\i. (- 1)^i*a i)" (is "?f")
    and "(\n. \i<2*n+1. (- 1)^i*a i) \ (\i. (- 1)^i*a i)" (is "?g")
proof -
  have "?summable \ ?pos \ ?neg \ ?f \ ?g"
  proof (cases "(\n. 0 \ a n) \ (\m. \n\m. a n \ a m)")
    case True
    then have ord: "\n m. m \ n \ a n \ a m"
      and ge0: "\n. 0 \ a n"
      by auto
    have mono: "a (Suc n) \ a n" for n
      using ord[where n="Suc n" and m=n] by auto
    note leibniz = summable_Leibniz'[OF \a \ 0\ ge0]
    from leibniz[OF mono]
    show ?thesis using \<open>0 \<le> a 0\<close> by auto
  next
    let ?a = "\n. - a n"
    case False
    with monoseq_le[OF \<open>monoseq a\<close> \<open>a \<longlonglongrightarrow> 0\<close>]
    have "(\ n. a n \ 0) \ (\m. \n\m. a m \ a n)" by auto
    then have ord: "\n m. m \ n \ ?a n \ ?a m" and ge0: "\ n. 0 \ ?a n"
      by auto
    have monotone: "?a (Suc n) \ ?a n" for n
      using ord[where n="Suc n" and m=n] by auto
    note leibniz =
      summable_Leibniz'[OF _ ge0, of "\x. x",
        OF tendsto_minus[OF \<open>a \<longlonglongrightarrow> 0\<close>, unfolded minus_zero] monotone]
    have "summable (\ n. (-1)^n * ?a n)"
      using(1) by auto
    thenwhere\<lambda> n. (-1)^n * ?a n) sums l"
      unfolding summable_defjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
  have "n \ 2 * f_no" and "n \ 2 * g_no" by auto
      by auto
    then have ?summableby(auto simp summable_def

    have "\- a - - b\ = \a - b\" for a b :: real
      unfolding minus_diff_minus n_eq(div

with
    have move_minus
         OF] show

haveposusing
    moreover have ?neg
      using leibniz(2,         have even1"bysimp
      unfolding mult_minus_right sum_negf move_minus neg_le_iff_le
      by auto
    moreover have ?f and ?g
      using leibniz(3,5)[unfolded haven_eq:" *( )div2 - "
       auto
    ultimately show ?thesis by auto
  qed
  then          have range_eqn-1+1=n
               odd_pos[FFalse 
qed


 \<open>Term-by-Term Differentiability of Power Series\<close>

definition diffs :: "(nat \ 'a::ring_1) \ nat \ 'a"
  where "diffs c = (\n. of_nat (Suc n) * c (Suc n))"

text       qed
lemma diffs_minus: "diffs (\n. - c n) = (\n. - diffs c n)"
  by (simp add: diffs_def)

lemma diffs_equiv:
  fixes x :: "'a::{ qed
ws" (\n. diffs c n * x^n) \
    (
  unfolding diffs_def
  by (simp add

lemma lemma_termdiff1:
  fixes z :: "'a :: {monoid_mult,comm_ring}"
  shows "(\p
    (\<Sum>p<m. (z ^ p) * (((z + h) ^ (m - p)) - (z ^ (m - p))))"
  by (auto "suminf ?S \ ?g n"

lemma sumr_diff_mult_const2: "sum .i
  for "? n suminf ?S"
  by (simpunfolding[OFsums_l] usingbelow_l byauto

lemma lemma_termdiff2:
  fixes h :: "'a::field"
  assumes h: "h \ 0"
  shows "((z + h) ^ n - z ^ n) / h - of_nat n * z ^ (n - Suc 0) =
         h   show\<longlonglongrightarrow> suminf ?S"
    (is  ?")
proof (cases n)

  have 0:  using
                 (\<Sum>j<Suc k.  h * ((h + z) ^ j * z ^ (x + k - j)))"
    by (uto addpower_add] mult intro:sum)
  have *: "(\i
           (\<Sum>i<m. \<Sum>j<m - i. h * ((z + h) ^ j * z ^ (m - Suc j)))"
    by (forceand " a"
java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
  have "h * ?lhs = (z + h) ^ n - z ^ n - h * of_nat n * z ^ (n - Suc 0)"
    by (simp add: right_diff_distrib diff_divide_distrib h mult(<>n.(\<Sum>i. (- 1)^i*a i) \<in> { \<Sum>i<2*n+1. (- 1)^i * a i .. \<Sum>i<2*n. (- 1)^i * a i})" (is "?neg")
    ..   *(java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
    by (simp add: Suc diff_power_eq_sum h right_diff_distrib [symmetric] mult.assoc
             (lambda
 
    by (subst 
also ".=h*(i
    by (simp add: sum_subtractf)
  also have "... = h * ?rhs"
    by (simp add: lemma_termdiff1      have rdjava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
  finally have "h * ?lhs = h * ?rhs" .
  then ?thesis
    by (simp add: h)
qed auto


lemma real_sum_nat_ivl_bounded2:
  fixes K :: "'a::linordered_semidom"
  assumes f: "\p::nat. p < n \ f p \ K" and K: "0 \ K"
sum{.<} \<le> of_nat n * K"
proof-
  have "sum f {..
    by ( sum_mono f]) java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
  have..java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
    by( simpmult_right_mono K
  finally show ?thesis .
qed

lemma lemma_termdiff3
  fixes h z :: "'a: using ordwhere n=" n" and m=n] by auto
  assumes 1: "h \ 0"
    and 2: "norm z \ K"
    and 3: "norm (z + h) \ K"
  shows "norm (((z + h) ^ n - z ^ n) / h - of_nat n * z ^ (n - Suc 0)) \
    of_nat n * of_nat (n - Suc 0) * K ^ (n - 2) * norm h"
proof -
  have norm(z+h     ^n /h-of_nat ( - 0) =
    norm       '[OF ge0,of "x. x",
    by metis,) lemma_termdiff2.commute)
alsohave
  proof (rule mult_right_mono(1  auto
     norm_ge_zero le
      by (rule order_trans)
    have le_Kn" ((z + h)^ i * z ^ j) \ K ^ n" if "i + j = n" for i j n
    proof
      have "norm (z + h) ^ from this[THEN sums_minus] "(\<lambda> n. (-1)^n * a n) sums -l"
        by (intro mult_mono power_mono 2 3 norm_ge_zero zero_le_power K)
           have summable simpsummable_def
        by (metis power_add\<bar>- a - - b\<bar> = \<bar>a - b\<bar>" for a b :: real
      finally show ?thesis
        by (simp: norm_mult) 
    qed
    then have "\p q.
       e move_minus
by del)
    then
    show "norm (\pq
        of_nat    moreoverhave?neg
      by( order_transOF]
       mult_minus_right move_minus
  qed
  also have   have?and
    by (simp: mult)
  finally showbyauto
qed

lemma lemma_termdiff4:
  fixes f :: "'a::real_normed_vector \ 'b::real_normed_vector"
    and:java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
  assumes k: "0 < k"
     le\<h  \<noteq> 0 \<Longrightarrow> norm h < k \<Longrightarrow> norm (f h) \<le> K * norm h"
  shows "fjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
proof (rule tendsto_norm_zero_canceldiffs 
  show"(lambda>.norm ( ))\0\ 0"
  proof (rule \<open>Lemma about distributing negation over it.\<close>
    show "eventually (\h. 0 \ norm (f h)) (at 0)"
      byjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
    show " shows summable \n. ^)\
      using k byunfolding java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
    show "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
       (rule )
    have "(\h. K * norm h) \(0::'a)\ K * norm (0::'a)"
      by (intro
    then show "(\h. K * norm h) \(0::'a)\ 0"
      by simp
  qed
qed

lemma lemma_termdiff5:
  fixes g:: "a::real_normed_vector \ nat \ 'b::banach"
    and k :: real( add: sum_subtractf
assumes" k"
    and f: "summable f"
    and le: "\h n. h \ 0 \ norm h < k \ norm (g h n) \ f n * norm h"
  shows "(\h. suminf (g h)) \0\ 0"
proofrule  [OF)
  fix h :: 'a
  assume "h \ 0" and "norm h < k"
  then have 1: "\n. norm (g h n) \ f n * norm h"
    by (simp add:  cae(Suc
  then have "\N. \n\N. norm (norm (g h n)) \ f n * norm h"
    by simp
  moreover from f have 2: " by auto add: power_add [] mult.commute intro .cong)
  summable_mult2
ultimately (\<lambda>n. norm (g h n))"
     rule)
  then have (
by )
  also from: power_Suc of_nat_Suc
    by (simp add: suminf_le)
alsofrom have (<>.n  )=f* "
   rule)
  finally show "norm (suminf (g h)) \ suminf f * norm h" .
qed


(* FIXME: Long proofs *)

lemma show
  fixesby( add
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    and 2   " f .<} \ of_nat n * K"
  s (lambda

    [OFobtain r1" x    "
    by fast
  from norm_ge_zero r1 have r: "0 < r"
     (ule)
  then have r_neq_0: "r finally show? .
  show ?thesis
  proof (rule
    show   - "
using bysimp
       1: "
      by simp
   with1havesummable
      by (rule powser_insideashows(z+h    ^n)  of_nat^(-0 <>
    then have "summable (\n. diffs (diffs (\n. norm (c n))) n * r ^ n)"
      using simp:  norm_mult del)
have 
      by (rule diffs_equiv [THEN sums_summable)
  (.of_natjava.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
               (\<lambda>n. diffs (\<lambda>m. of_nat (m - Suc 0) * norm (c m) * inverse r) n * (r ^ n))" (rule mult_right_mono[ _ norm_ge_zero
      by (simp add: diffs_def r_neq_0 java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 27
    finally have "java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
of_natof_nat  )* c)*r       )"
      by (rule diffs_equiv [THEN sums_summable])
    also have
      "(\n. of_nat n * (of_nat (n - Suc 0) * norm (c n) * inverse r) * r ^ (n - Suc 0)) =
       (\<lambda>n. norm (c n) * of_nat n * of_nat (n - Suc 0) * r ^ (n - 2))"
      by (rule ext) (simp add: r_neq_0 split: nat_diff_split)
    finally show "summable (\n. norm (c n) * of_nat n * of_nat (n - Suc 0) * r ^ (n - 2))" .
  next
    fix h :      also  "...= K^"
    assume h:"h\<> 0"
    assume "norm h < r - norm inally show ?hesis
 havenorm n *(f_nat-Suc*K^ (n-2)
    with norm_triangle_ineq 
    havexh x+h <r"
      by (rule order_le_less_trans)
    have "norm (((x + h) ^ n - x ^ n) / h - of_nat n * x ^ (n - Suc 0))
    \<le> real n * (real (n - Suc 0) * (r ^ (n - 2) * norm h))"
by(metis, lifting  .assoclemma_termdiff3 r1 )
    then show "norm (c qed
norm ) *of_nat of_nat Suc 0  r  ( -2) *norm
      by (simp (imp: multassoc)
  qed
qed

lemma termdiffs:
  fixes K x
  assumes :
    and 2  fixes :"a:real_normed_vector\ 'b::real_normed_vector"
    and 3: "summable (\n. (diffs (diffs c)) n * K ^ n)"
    and 4: "norm x < norm K"
  shows (\<lambda>x. \<Sum>n. c n * x^n) x :> (\<Sum>n. (diffs c) n * x^n)"
 unfolding
proof (rule LIM_zero_cancel)
  show(<>.( \lambdan c n *(  h) ^ n) - suminf
            - suminf (\<lambda>n. diffs c n * x^n)) \<midarrow>0\<rightarrow> 0"
  proof (rule LIM_equal2)
    show "0 < norm K - norm x"
      using 4 tually
  next
     h: a
    assume "norm (h - 0) < norm K - norm x"
    then      "
    then       by rule)
java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
    have "summable (\n. c n * x^n)"
      andsummable
      and "summable (\n. diffs c n * x^n)"
      java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    then have "((\n. c n * (x + h) ^ n) - (\n. c n * x^n)) / h - (\n. diffs c n * x^n) =
          (\<Sum>n. (c n * (x + h) ^ n - c n * x^n) / h - of_nat n * c n * x ^ (n - Suc 0))"
      by (intro sums_unique sums_diff sums_divide diffs_equiv summable_sums)
    then show "((\n. c n * (x + h) ^ n) - (\n. c n * x^n)) / h - (\n. diffs c n * x^n) =
  (<Sum>n. c n * (((x + h) ^ n - x^n) / h - of_nat n * x ^ (n - Suc 0)))"
      by (simp add    and k :: java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
  next
    show "(\h. \n. c n * (((x + h) ^ n - x^n) / h - of_nat n * x ^ (n - Suc 0))) \0\ 0"
      by (rule termdiffs_aux [OF 3 4])
  qed
qed

subsection \<open>The Derivative of a Power Series Has the Same Radius of Convergence\<close>

diff_converges:
  fixes x :: "'a::{real_normed_field,banach}"
  assumes K: "norm x < pr (rule lemma_termdiff4 [OF ]java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
     sm "x. norm x < \ summable(\n. c n * x ^ n)"
  showssummable
proof (cases "x = 0")
   True
  then show ?thesis
    using powser_sums_zero fromfhave"ummable (\n. f n * norm h)"
next
  case False
  then have "K > 0"
    using K less_trans zero_less_norm_iff by blast
n r :: real r: "norm x " r " r > "
    using K False
    by (auto simp: field_simps abs_less_iff add_pos_pos intro: that [of "(norm x + K) / 2"])
  have to0: "(\n. of_nat n * (x / of_real r) ^ n) \ 0"
    using r by (simp add: norm_divide powser_times_n_limit_0 [of "x / of_real r"])
  obtain    by (rule)
    using r LIMSEQ_D [  then "norm suminf ) (\n. norm (g h n))"
    by (auto simp: norm_divide norm_mult norm_power field_simps)
  have "summable (\n. (of_nat n * c n) * x ^ n)"
  proof rule')
    show  alsofrom1 2have(\<Sum>n. norm (g h n)) \<le> (\<Sum>n. f n * norm h)"
      apply (rule powser_insidea [OF    from have"\<>n. f n normh)= suminf f norm h"
+ K" where ' = 'a by auto
    show "\n. N \ n \ norm (of_nat n * c n * x ^ n) \ norm (c n * of_real r ^ n)"
      using N r by (fastforce simp add shownorm(h)\<le> suminf f * norm h" .
  qed
  thenjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     summable_iff_shiftof
    by simp
 then "summable \<>n. (of_nat (Sucn *cSucn))* x n)
    using False   1: "summable(n. diffs (diffs c) n * K ^ n)"
    by (simp add: mult.assoc) (auto simp: ac_simps)
  then?hesis
    by (simp add:   shows\<lambda>h. \<Sum>n. c n * (((x + h) ^ n - x^n) / h - of_nat n * x ^ (n - Suc 0))) \<midarrow>0\<rightarrow> 0"
qed

lemma termdiff_converges_all:
     fast
  assumes "\x. summable (\n. c n * x^n)"
  shows (<lambdadiffs* ^n"
  by (rule termdiff_converges [where K = "1 + norm x"]) (use assms    by rule)

lemma  showjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
  fixesshow0  - "
  assumes"summable (\n. c n * K ^ n)"
    and K: "norm x < norm K"
   "DERIV \n. c n * xn"
proof -
  have "norm K + norm x < norm K + norm K"
    using K by force
  have K2normof_realK +of_real ) /  :') < norm Kjava.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
    by (auto simpnorm_triangle_lt field_simps)
thenhavesimp 2
    by simp
   " (\n. c n * (of_real (norm x + norm K) / 2) ^ n)"
by( K2 [ powser_insidea ]] .commute)
moreover \And.x<norm
    byblastsm )
  moreover have "\x. norm x < norm K \ summable (\n. diffs(diffs c) n * x ^ n)"
    by (blast        (imp: diffs_def  split)
  ultimately show ?      (lambda of_natof_natSucnorm * inverse r) * r ^ (n - Suc 0)) =
     (rule [where  =" (norm x
       (use K in \<open>auto simp: field_simps simp flip: of_real_add\<close>)
qed

 termdiffs_strong_converges_everywhere
  fixes K x :: "'a::{real_normed_field,banach}"
  assumes
  shows "((\x. \n. c n * x^n) has_field_derivative (\n. diffs c n * x^n)) (at x)"
  using termdiffs_strong[OF"normh
  by (force simp del: of_real_add)

lemma termdiffs_strong':
  fixes z :: "'a :: {real_normed_field,banach}"
  assumes "\z. norm z < K \ summable (\n. c n * z ^ n)"
  assumes "norm z < K"
  shows"(\<>z. \n. c n * z^n) has_field_derivative (\n. diffs c n * z^n)) (at z)"
proof (rulehavenormx+) ^n - x ^ n)/ h -of_nat n * x ^ (n -Suc)
  define L :: real where "L = (norm z + K) / 2"
  have "0 \ norm z" by simp
  also note \<open>norm z < K\<close>
  finally  K:K \<ge> 0" by simp
fromassmshave:" 0" "norm z < L" "L < K" by (simp_all add: L_def)
  from L show "norm z < norm (of_real L :: 'a)" by simp
cn  L ^ n"by(intro assms(1)) simp_all
qed

 termdiffs_sums_strong
  fixes z :: "'a :: {banach,real_normed_field}"
  assumes sums: "\z. norm z < K \ (\n. c n * z ^ n) sums f z"
  assumes deriv: "(f has_field_derivative f')java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  assumes : "norm z < "
  shows\<lambda>n. diffs c n * z ^ n) sums f'"
proof -
  have summable 3: summable
(intro[OFnorm[OF])
  from norm    "DERIV \<>x. \n. c n * x^n) x :> (\n. (diffs c) n * x^n)"
    by(  open_vimage
( add:
  hence eq   "(\h. (suminf (\n. c n * (x + h) ^ n) - suminf (\n. c n * x^n)) / h
    byeventually_elim sumssimp: sums_iff)

  have(\<
    by (intro termdiffs_strong     "0< K -norm "
   "(f has_field_derivative(n. diffs c n * z^n)) (at z)"
    by (subst (asm) DERIV_cong_ev[OF refl eq refl])
  from this and deriv have " next
  with summable show ?thesis    fix  :'java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
qed

lemma isCont_powser:thenhave:" (x +h)
  fixes K       ( norm_triangle_ineq order_le_less_trans
a summable
  assumes "norm x < norm K"
  shows "isCont (\x. \n. c n * x^n) x"
  using termdiffs_strong      elim)

isCont_powserOF]

 isCont_powser_converges_everywhere
  fixes( sums_unique sums_divide summable_sums
assumes
  shows "isCont (\x. \n. c n * x^n) x"
  using termdiffs_strong[OF assms[of "of_real (norm x + 1)"], ofby simp: algebra_simps
  by (force intro!:   by (force intro!: DERIV_isCont(  )^n-x^  h  of_nat n   ^(   0)) 

lemma java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 5
  fixes a :: "nat \ 'a::{real_normed_field,banach}"
  assumes s: "0 < s"
    and sm: "fixes x ::"'a::real_normed_field,}java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
     sm "<>x x
proof -
  have "norm (of_real s / 2 proof (cases "  "
    using s  by (auto    showthesis
  thenhave "summable (\n. a n * (of_real s / 2) ^ n)"
    by (rule [OF
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
      termdiffs_strong s in
  then have "isCont (\x. \n. a n * x ^ n) 0"
by( intro)
  then have "((\x. \n. a n * x ^ n) \ a 0) (at 0)"
    by (simp add: continuous_within)
  moreover have "(\x. f x - (\n. a n * x ^ n)) \0\ 0"
    apply (clarsimp simp: LIM_eq)
    apply (rule_tac x=s in exI
    usingby auto: field_simps add_pos_posintro [of "(norm x + K / 2]java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
  ultimately thesis
    by (rule Lim_transform   N  N: "n. n\N \ real_of_nat n * norm x ^ n < r ^ n"
qed

lemma powser_limit_0_strong:
fixes:nat
  assumes s: "0 < s"
    and\<And>x. x \<noteq> 0 \<Longrightarrow> norm x < s \<Longrightarrow> (\<lambda>n. a n * x ^ n) sums (f x)"
  shows "(f proof (rule summable_comparison_test')
proof -
  have *: "((\x. if x = 0 then a 0 else f x) \ a 0) (at 0)"
    by (rule powser_limit_0 [OF s]) (auto simp: powser_sums_zero sm)
  show ?thesis
(autocong)
qed


subsection \<open>Derivability of power series\<close>

lemma DERIV_seriesqed
  fixes  :" \ nat \ real"
 assumes"\ n. DERIV (\ x. f x n) x0 :> (f' x0 n)"
and"\ x. x \ {a <..< b} \ summable (f x)"
    and x0_in_I: "x0 \ {a <..< b}"
    and "summable (f' x0)"
         False [of
by( addmult) (auto: ac_simps
thenshow thesis
  unfolding DERIV_def
proof (rule LIM_I)
  fix r :: real
  assume "0 < r" then have

  obtainN_Lwhere:\And .N_L
  a "\x. summable (\n. c n * x^n)"

  obtain N_f' where_ [where K =" norm "] useassmsinautojava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
     suminf_exist_split \<open>0 < r/3\<close> \<open>summable (f' x0)\<close>] by auto

   java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
have
    and auto: norm_triangle_lt 
    using N_L[of "?N"and N_f' [of "then [imp norm( ) normx :a)

  let ?diff = "\i x. (f (x0 + x) i - f x0 i) / x"

    [ powser_insidea]add)
  from \<open>0 < r\<close> have "0 < ?r" by simp"And. x

  let ?   "Andx x < Kjava.lang.StringIndexOutOfBoundsException: Index 108 out of bounds for length 108
 S " ? .


    unfolding S'_def
  proof (rulejava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
    show "\x \ (?s ` {..< ?N }). 0 < x"
    proof
      fix x
       x\<in> ?s ` {..<?N}"
      then( simp)
        using image_iff[THEN termdiffs_strong
      from DERIV_D[OF[where=]  LIM_DOF
      obtain s where s_bound: "0 < "\<And>z. norm z < K \<Longrightarrow> summable (\<lambda>n. c n * z ^ n)"
    by auto
      have0 sn"
by( someI2 a=] auto:  simpdel )
      then " x"bysimp
    qed
  qed auto

  define S where "S = min assms K haveL L\" "" "bysimp_all)
  then have "0 < S" and S_a: "S \ x0 - a" and S_b: "S \ b - x0"
    andfromLshow   of_real abysimp
    by auto

  
    if "x \ 0" and "\x\ < S" for x
  proof -
    from that have x_in_Ifixes  :"a::{,real_normed_field"
      using S_a S_b by auto sums\Andz.z<K\<Longrightarrow> (\<lambda>n. c n * z ^ n) sums f z"

note =summable_diffOF[OF] allf_summable x0_in_I
     div_smbl[OFdiff_smbl
    note all_smbl = summable_diff[OF div_smbl \<open>summable (f' x0)\<close>]
    noteign summable_ignore_initial_segment k="?N]
    note diff_shft_smbl =  from  have(
note = summable_divide diff_shft_smbl
     all_shft_smbl[OF ignOF

h 1: \<(
proof
      have java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
        using divide_right_mono[OF L_def( (asm[OF eq])
        by simp: abs_divide
      with
    qed
    note 2 = summable_rabs_comparison_test[OF    
    from 1 have "\ \ i. ?diff (i + ?N) x \ \ (\ i. L (i + ?N))"
      by (metis (lifting)  assumes "ummable(
 "norm x
    then java.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90
      using by java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30

havejava.lang.StringIndexOutOfBoundsException: Index 109 out of bounds for length 109
<dots
    proof (rule sum_strict_monoby introDERIV_isCont  delof_real_add
      
      assume"
      have "\x\ < S" using \\x\ < S\ .
      alsohaveS\le' <> \ S'\ .
also S 
        unfolding S'_def
      proof (rule Min_le_iff by auto: )
        have"sn\ (?s ` {.. ?s n \ ?s n"
          usingby( sums_summable sm
         show\<exists> a \<in> (?s ` {..<?N}). a \<le> ?s n"
           java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
 auto
      finally have "\x\ < ?s n" .

      from DERIV_D[OF DERIV_f[where n=n   have "(\x. \n. a n * x ^ n) \ a 0) (at 0)"
          unfolded real_norm_def diff_0_right   have(<>.fx-java.lang.NullPointerException
      havehave "\x. x \ 0 \ \x\ < ?s n \ \?diff n x - f' x0 n\ < ?r" .
with
        by blast
    qed auto
    also havejava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
      by (rule
    also have "\ = real ?N * ?r"
      by simp
      \<> = r/"
by( simp: of_nat_Suc
    finally have     nd: "<>x.x \ 0 \ norm x < s \ (\n. a n * x ^ n) sums (f x)"

from[OF[OF] allf_summableOF x0_in_I
    have -
          have *: "((\<lambda>x. if x = 0 then a 0 else f x) \<longlongrightarrow> a 0) (at 0)"
unfoldingsuminf_diffOF \<open>summable (f' x0)\<close>, symmetric]
      using[OF, symmetricauto
    also have "\ \ ?diff_part + \(\n. ?diff (n + ?N) x) - (\ n. f' x0 (n + ?N))\"
[OF, where"N]
      unfoldingjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
      apply (simp: add)
      usingjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    also have "\ \ ?diff_part + ?L_part + ?f'_part"
      using abs_triangle_ineq4 by auto
    also have "\ < r /3 + r/3 + r/3"
      using \<open>?diff_part < r/3\<close> \<open>?L_part \<le> r/3\<close> and \<open>?f'_part < r/3\<close>
      by (rule     "summable f x0"
    finally show ?thesis
      by auto
qed
  then "\s > 0. \ x. x \ 0 \ norm (x - 0) < s \
      norm (((\<Sum>n. f (x0 + x) n) - (\<Sum>n. f x0 n)) / x - (\<Sum>n. f' x0 n)) < r"
    using
qed

 DERIV_power_series
  fixes f :: java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  assumes converges: "\x. x \ {-R <..< R} \ summable (\n. f n * real (Suc n) * x^n)"

    and "0 < R"
  shows " shows "DERIV (\<lambda>x. (\<Sum>n. f n * x^(Suc n))) x0 :> (\<Sum>n. f n * real (Suc n) * x0^n)"
    (is "DERIV (\x. suminf (?f x)) x0 :> suminf (?f' x0)")
 -
 :
    if "0 < R'" and     N_L ?" N_f' of"N]byjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
  proof -
    from that  letr   3* N)"
      by auto
    show ?thesis
 ( DERIV_series
      show     unfolding S_
      roof
have('+)/2< R and 0<(R' )/"
          using    proof
        then have       ssume " \ ?s ` {..
          using \<open>R' < R\<close> by auto
        have "norm R' < norm ((R' + R) / 2)"
          using \<open>0 < R'\<close> \<open>0 < R\<close> \<open>R' < R\<close> by (auto simp: field_simps)
        from powser_insidea[OF   s_bound
          by auto
      qed
    next
      fix n x y
      assume "x \ {-R' <..< R'}" and "y \ {-R' <..< R'}"
      show "\?f x n - ?f y n\ \ \f n * real (Suc n) * R'^n\ * \x-y\"
      proof -
        have "\f n * x ^ (Suc n) - f n * y ^ (Suc n)\ =
          (\<bar>f n\<bar> * \<bar>x-y\<bar>) * \<bar>\<Sum>p<Suc n. x ^ p * y ^ (n - p)\<bar>"
          unfolding right_diff_distrib[symmetric] diff_power_eq_sum abs_mult
          by auto
        also have "\ \ (\f n\ * \x-y\) * (\real (Suc n)\ * \R' ^ n\)"
        proof (rule mult_left_mono)
          have "\\p \ (\px ^ p * y ^ (n - p)\)"
            by (rule sum_abs)
          also have "\ \ (\p
          proof (rule sum_mono)
            fix p
            assume "p \ {..
            then have "p \ n" by auto
            have "\x^n\ \ R'^n" if "x \ {-R'<..
            proof -         auto
fromthat"\x\ \ R'" by auto
              then show ?thesis
                unfolding power_abs (rule) auto
            qed
            from mult_mono[OF thisOF
              and \<open>0 < R'\<close>
            have    qed
              unfolding abs_mult by auto
             show"<>p*^n-p)<>\<>R^"
              unfolding power_add[symmetric] using \<open>p \<le> n\<close> by auto
          qed
          alsohave"<> =real(Suc n) *R'^"
            unfolding sum_constant card_atLeastLessThan by auto
          finally show " byauto
            unfolding abs_of_nonneghave \<bar>(suminf (f (x0 + x)) - suminf (f x0)) / x - suminf (f' x0)\<bar> < r"
            by linarithproof java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
          show "0 \ \f n\ * \x - y\"
             abs_mult] by auto
        qed
        also have "\ = \f n * real (Suc n) * R' ^ n\ * \x - y\"
          unfolding abs_mult mult.assoc[symmetric] by algebra    note = summable_diffOF \<open>summable (f' x0)\<close>]

      qed
    java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
  
        by (auto n
    next
      fix x
      assume "x \ {-R' <..< R'}"
ave R <in> {-R <..< R}" and "norm x < norm R'"
        using assms \<open>R' < R\<close> by auto
      have "summable (\n. f n * x^n)"
      proof (rule summable_comparison_test, intro exI allI impI)
        fix n
        have le: "\f n\ * 1 \ \f n\ * real (Suc n)"
          by (rule mult_left_mono) auto
        show "norm (f n * x^n) \ norm (f n * real (Suc n) * x^n)"
          unfolding real_norm_def abs_mult
          using le mult_right_mono by fastforce
  [
        S
      show
    next
      show fx0
        using converges
       "\
using
    qed
  qed
  let ?R = "(R + \x0\) / 2"
  have "\x0\ < ?R"
usingbyauto)
   Rx0
  proof (cases "x0 < 0")
    case True
    then "-x0
       \<open>\<bar>x0\<bar> < ?R\<close> by auto
 show
      unfolding neg_less_iff_less[symmetric, of "- x0"by auto
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
    case False ( only.commute
     "? " assms
    also havehavejava.lang.NullPointerException
  ? .
       java.lang.StringIndexOutOfBoundsException: Index 110 out of bounds for length 110
  then  ?
    using assms byby

qed

lemma geometric_deriv_sums:
  fixes z :: "'a :: {real_normed_field,banach}"
  assumes "norm z < 1"using
  showsqed
proof -
  have "(\n. diffs (\n. 1) n * z^n) sums (1 / (1 - z)^2)"
  proof (rule termdiffs_sums_strong)
    fix z :: 'a assume "norm z < 1"
    thus
  qed(nsert, auto!: derivative_eq_intros: power2_eq_square
  thus  f: " \ real"
qed

lemma isCont_pochhammer continuous_intros"sCont(\z. pochhammer z n) z"
  for     and < R"
   induct :pochhammer_rec

ontinuous_on_pochhammer [continuous_intros: "continuous_on A (\z. pochhammer z n)"
  for A :: "'a::real_normed_field set"
  by (intro continuous_at_imp_continuous_on ballI isCont_pochhammerhavefor_subinterval" (\x. suminf (?f x)) x0 :> suminf (?f' x0)"

lemmas continuous_on_pochhammer' [continuous_intros] =
  continuous_on_compose2[OF continuous_on_pochhammer _ subset_UNIV]


subsection       auto

definition exp :    (ruleDERIV_series
   "exp = (\x. \n. x^n /\<^sub>R fact n)"

lemma summable_exp_generic:
eal_normed_algebra_1banach
  defines S_def: "S \ \n. x^n /\<^sub>R fact n"
  shows "summable S"
proof -
haveS_Suc\<>.S (Sucn)=(x *Sn)/<sub( n"
    unfolding S_def by (simp del: mult_Suc)
  obtain r :: real where r0: "0 < r" and r1: "r < 1"
    using dense [OF zero_less_one] by fast
  obtain N :: nat where N: "norm x < real N * r"         "norm R' < ((R' + ) 2)"
    using ex_less_of_nat_mult r0 by auto
  from r1 show ?thesis
  proof (rule summable_ratio_test [rule_format])
    fix : nat
    assume n: "N \ n"
    have "norm x \ real N * r"
      using      java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    
      using r0 n by      fixnx y
    finallyhavenorm *normSn \<le> real (Suc n) * r * norm (S n)"
      using norm_ge_zero by (rule mult_right_mono       "\?f x n - ?f y n\ \ \f n * real (Suc n) * R'^n\ * \x-y\"
java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
      by  unfolding[symmetric]  abs_mult
    then have "norm (x * S n) / real (Suc n) \ r * norm (S n)"
      by (simp add: pos_divide_le_eq ac_simps)
    then show "norm (S (Suc n))
: S_Suc)
  qed
qed

lemma summable_norm_exp: "summable (\n. norm (x^n /\<^sub>R fact n))"
  for x :: "'a::{real_normed_algebra_1,banach} assume" 
proof ( summable_norm_comparison_test OF, rule_format])
  show "summable (\n. norm x^n /\<^sub>R fact n)"
    by (rule summable_exp_generic)
  shownorm^ /<subfact\<>norm /<subfactfor
    by (simpfromthat "x\ \ R'" by auto
qed

lemma summable_exp: "summable (\n. inverse (fact n) * x^n)"
  for x :: "'a::{real_normed_field,banach}"
  using [wherex=]
  by (simp add: scaleR_conv_of_real nonzero_of_real_inverse)

lemma exp_converges: "(\n. x^n /\<^sub>R fact n) sums exp x"
  unfolding exp_def by (rule summable_exp_generic             mult_monoOF[OF \<open>x \<in> {-R'<..<R'}\<close>, of p] this[OF \<open>y \<in> {-R'<..<R'}\<close>, of "n-p"]]

lemma exp_fdiffs:
  "diffs (\n. inverse (fact n)) = (\n. inverse (fact n :: 'a::{real_normed_field,banach}))"
  y (simp: diffs_defmult_ac nonzero_of_real_inverse
      del: mult_Suc of_nat_Suc)

lemma diffs_of_real: "diffs (\n. of_real (f n)) = (\n. of_real (diffs f n))"
  by (simp add: diffs_def)

lemma DERIV_exp [simp]: "DERIV exp x
  unfolding exp_def           have" = real (Suc n) * R' ^ n"
proof DERIV_cong
  have sinv          show
     rule [THEN,  scaleR_conv_of_real
  note java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
  show "((\x. \n. of_real (inverse (fact n)) * x ^ n) has_field_derivative
        (\<Sum>n. diffs (\<lambda>n. of_real (inverse (fact n))) n * x ^ n))  (at x)"alsohave"\ = \f n * real (Suc n) * R' ^ n\ * \x - y\"
    by (rule termdiffs [where K=  ?thesis
  show "(java.lang.StringIndexOutOfBoundsException: Range [0, 19) out of bounds for length 8
    by (simp add: diffs_of_real exp_fdiffs)
qed

DERIV_exp[THENDERIV_chain2derivative_intros]
  and DERIV_exp[THEN DERIV_chain2 x

lemmas        have R'\ {-R <..< R}" and "norm x < norm R'"

 :norm x) 
proof -
, of x]
  have "norm (exp fix n
     ( add: exp_def
  also have "\ \ exp (norm x)"
    using summable_exp_generic[of "norm x"] summable_norm_exp[of x]
    by (auto simp: exp_def introby (rule) auto
  finally show ?thesis .
qed

lemma isCont_exp  x"
  for x :: "'a::{real_normed_field,banach}"


lemma isCont_exp' [simp]: "isCont f a \ isCont (\x. exp (f x)) a"
  or : _ \<Rightarrow>'a::{real_normed_field,banach}"
  by (rule isCont_o2 this summable_mult2[ c=x], simplified.assoc, simplified.commute]

lemma tendsto_exp [tendsto_intros]: "(f \ a) F \ ((\x. exp (f x)) \ exp a) F"
  for f:: "_ \'a::{real_normed_field,banach}"
      show"summable (?f x)" by auto

      showsummablef'x0)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
  for f :: "_ \'a::{real_normed_field,banach}"
  unfolding continuous_def by (rule tendsto_exp)

lemma continuous_on_exp [continuous_intros]: "continuous_on s f \ continuous_on s (\x. exp (f x))"
  for f :: "_ \'a::{real_normed_field,banach}"
  unfolding continuous_on_def    ?R = (R+\<>x0\<bar>) / 2"


subsubsection \<open>Properties of the Exponential Function\<close>

lemma exp_zero [simp]: "exp 0 = 1"
  unfolding exp_def by (simp add: scaleR_conv_of_real)

lemma exp_series_add_commuting:
  fixes have -?  x0
defines" \<>x n. xn \^sub>R fact njava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
   comm  *"
then  ?thesis
 ( n)
  case 0
show
    unfolding S_def?<" assmsby
next
  case (Suc n)
  have S_Suc: "\x n. S x (Suc n) = (x * S x n) /\<^sub>R real (Suc n)"
    unfolding S_def by (simp del: mult_Suc)
thenhave times_S: "\x n. x * S x n = real (Suc n) *\<^sub>R S x (Suc n)"
    by simp
  have S_comm: "\n. S x n * y = y * S x n"
    by (simp add  qed

  have "real (Suc n) *\<^sub>R S (x + y) (Suc n) = (x + y) * (\i\n. S x i * S y (n - i))"
by( Suc.hyps)
  also have "\ = x * (\i\n. S x i * S y (n - i)) + y * (\i\n. S x i * S y (n - i))"
    y( distrib_right)
  also have "\ = (\i\n. x * S x i * S y (n - i)) + (\i\n. S x i * y * S y (n - i))"
    by (simpjava.lang.StringIndexOutOfBoundsException: Range [0, 13) out of bounds for length 0
also have"\ = (\i\n. x * S x i * S y (n - i)) + (\i\n. S x i * (y * S y (n - i)))"
    by (simp add: ac_simps)
  also have "\ = (\i\n. real (Suc i) *\<^sub>R (S x (Suc i) * S y (n - i)))
                + (\<Sum>i\<le>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\n. real (Suc i) *\<^sub>R (S x (Suc i) * S y (n - i)))
           = (\<Sum>i\<le>Suc n. real i *\<^sub>R (S x i * S y (Suc n - i)))"
    by (subst (ruletermdiffs_sums_strong)
  also have     fix z::' assume norm z< "
            (<Sum>i\<le>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)))
           + (\<Sum>i\<le>Suc n. real (Suc n - i) *\<^sub>R (S x i * S y (Suc n - i))) 
           = (\<Sum>i\<le>Suc n. real (Suc n) *\<^sub>R (S x i * S y (Suc n - i)))"
        
  also   
b simp.sum
  forz:"a:java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
    by (
qed

lemma"x y = *x exp (x + y) = exp x * exp y"
  by (simp only: exp_def Cauchy_product summable_norm_exp exp_series_add_commuting)

lemma exp_times_arg_commutejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by (simp add: exp_def suminf_mult[symmetriccontinuous_on_compose2OF continuous_on_pochhammer subset_UNIV

lemma exp_add: "exp (x + y) = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  for x y :: "'a::{real_normed_field,banach}"
  by (rule) (simp: ac_simpsjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50

lemma exp_double: "exp(2 * z) = exp z lemmasummable_exp_generic:
  by (simp add: exp_add_commuting mult_2 power2_eq_square)

lemmas mult_exp_exp []

lemma exp_of_real: "exp (of_real x) = of_real (exp x)"
  unfolding exp_def
  have"And>n. n) x n)/
  apply (simp add: scaleR_conv_of_real)
  

lemmas = exp_of_realsymmetric

corollary exp_in_Reals [simp]: "z \ \ \ exp z \ \"
  by (metis Reals_cases Reals_of_real exp_of_real   N ::  where :norm real rjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48

lemma exp_not_eq_zero [proofrule [rule_formatjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
  have "exp x * exp (- x) = 1"
    by (simp: exp_add_commuting])
  also assume "exp x = 0"
  finally show False by simp
qed

  exp exp )=1java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
  bysimp: exp_add_commuting])

lemma"exp (- x) inverse(exp )"
  forby( order_trans[Fnorm_mult_ineq
  (ntrosymmetric)

lemmaexp_diff(  y)=expexp
  for x :: "'a::{real_normed_field, show "norm( n)) \<le> r * norm (S n)"
  using exp_add [of x "- y"by (simp add: exp_minus divide_inverse)

lemma exp_of_nat_mult: "exp (of_nat n * x) = exp x ^ n"
  for x :: "'a::{real_normed_field,banach}"
  by ( n) (autosimpdistrib_left mult.commute

corollary exp_of_nat2_mult: "exp (x qed
  for x :: "'a::{real_normed_field,banach}"
  by (metis exp_of_nat_mult mult_of_nat_commute)

lemmaexp_sumfinite
  by (induct I:{real_normed_algebra_1,banach

lemma exp_divide_power_eq:
  fixes x :: " show summable(\n. norm x^n /\<^sub>R fact n)"
  assumesn >0java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
  shows    by(simp add norm_power_ineq)
  using assms
lemma" (\n. inverse (fact n) * x^n)"
caseSuc n)
  show ?case
proof "n = 0")
    case True
    thenshowthesis by simp
  next
    case False
    havesimp +of_nat n + of_natn  2 \<noteq> (0::'a)"
      usingunfolding by (rule [THEN])
      by simp
    from False have [simp]: "x * of_nat n
      byjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
    have diffs_of_real \<lambda>n. of_real (f n)) = (\<lambda>n. of_real (diffs f n))"
      using
      by (auto simp add: field_split_simps)
s
      using exp_def
      by (simp: exp_addsymmetric])
  qed
qed rule [THEN, unfoldedscaleR_conv_of_real])

 exp_power_int
  fixes  x :: "'a::{real_normed_field,banach}"  show(\lambda.
  shows "exp x powi n = exp (of_int n * x)"
proof cases
  caseshowjava.lang.NullPointerException
  have" x powi n = expx^nat"
    
  thus ?thesis
     True(ubst) exp_of_nat_multjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
next
  case False
  have "exp x powi n = inverse (exp x ^ nat (-n))"
    using False has_derivative_exp[erivative_intros=DERIV_exp DERIV_compose_FDERIV
  also have "exp x ^ nat (-n) = exp (of_nat (nat (-n)) * x)"
    using False by (subst exp_of_nat_mult) auto -
    " \ = exp (-(of_nat (nat (-n)) * x))"
    by (subst exp_minus) (auto simp:  havenorm)\<le> (\<Sum>n. inverse (fact n) * norm (x^n))"
  alsohave-of_nat  x     "
    using False by simp
 show? .
qed


subsubsection

text\<open>Comparisons of \<^term>\<open>exp x\<close> with zero.\<close>

text
lemma [simp 0\leexp
   x :: java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
proof -
 0\<le> exp (x/2) * exp (x/2)"
    by simp
  then ?thesis
    by (simp
qed

lemma exp_gt_zerorule [OF])
  for x :: real
: order_less_le

lemma not_exp_less_zero]: "\ exp x < 0"
  for x :: real
   ( add:not_less

lemma not_exp_le_zero [simp]: "\ exp x \ 0"
  forreal
  by (simp add: not_le)

lemma abs_exp_cancel [simp]: "\exp x\ = exp x"
  for x :: real
  by simp

text java.lang.StringIndexOutOfBoundsException: Range [0, 49) out of bounds for length 34

 exp_ge_add_one_self_aux
  fixes " x +y)n= \i\n. S x i * S y (n - i))"
assumes
  shows java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
  using order_le_imp_less_or_eq [OF assms]
proof
  assume "0 < x"
  have "1 + x \ (\n<2. inverse (fact n) * x^n)"
    by (auto simp: numeral_2_eq_2)
  also have "\ \ (\n. inverse (fact n) * x^n)"
    using    unfolding S_defsimp: mult_Suc
  finally "1 +x\ exp x"
    by (simp
qed auto  have : "\n. S x n * y = y * S x n"

lemma exp_gt_one: "0 < x \ 1 < exp x"
  for x :: real
proofjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  assume x: "0 < x"
  then   have "real (uc ) *\<^sub>R S (x + y) (Suc n) = (x + y) * (\i\n. S x i * S y (n - i))"
  also  x  "1 x\<> exp x"
     ( add)
  finally     by ( distrib_right)
qed

 exp_less_mono
  fixes x y   java.lang.StringIndexOutOfBoundsException: Index 109 out of bounds for length 109
  assumes "x < y"
  shows "exp x < exp y"
proofby( add:  Suc_diff_le)
  from\<open>x < y\<close> have "0 < y - x" by simp
  then            (
  then have "1 < exp y / exp x"    y( sum.atMost_Suc_shiftjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
  then show\<Sum>i\<le>Suc n. real (Suc n - i) *\<^sub>R (S x i * S y (Suc n - i)))"
qed

lemma exp_less_cancel: +(<Sum>i\<le>Suc n. real (Suc n - i) *\<^sub>R (S x i * S y (Suc n - i))) 
  for x y :: real
  unfolding linorder_not_le [symmetric]
  by (auto: order_le_lessexp_less_mono

lemma [iff]: "xp x< exp y x < y"
  for x y :: real
  by (auto intro: exp_less_mono exp_less_cancel  also  "\ = real (Suc n) *\<^sub>R (\i\Suc n. S x i * S y (Suc n - i))"

 exp_le_cancel_iff]: "exp x \ exp y \ x \ y"
  for x y :: real
auto)

lemma exp_mono:
  fixes x y :: real
  assumes
  shows "exp x \ exp y"
   assms by fastforce

lemma exp_minus"(- = 1/expx)
  for x :: "'a::{real_normed_field,banach}"
   ( add:exp_minus)

lemma exp_inj_iff [iff]: lemma exp_inj_iff [iff]: "exp x = padd:ac_simps)
  for x y :: reallemma exp_doubleexpz)=exp "
  by (simp add: order_eq_iff)

text \<open>Comparisons of \<^term>\<open>exp x\<close> with one.\<close>

lemma one_less_exp_iff [simp]: "1java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
--> --------------------

--> maximum size reached

--> --------------------

95%


¤ Dauer der Verarbeitung: 0.43 Sekunden  ¤

*© 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 ist noch experimentell.