(* Title: HOL/Transcendental.thy Author: Jacques D. Fleuriot, University of Cambridge, University of Edinburgh Author: Lawrence C Paulson Author: Jeremy Avigad
*)
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 alsohave"norm \ = fact n" by( norm_of_real)simp finallyshow ?thesis . qed
lemma root_test_convergence: fixesby simp assumes f: "(\n. root n (norm (f n))) \ x" \ \could be weakened to lim sup\ and shows fjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 proof - have"0 \ x" by( LIMSEQ_le tendsto_const)( intro:exI _1) from\<open>x < 1\<close> obtain z where z: "x < z" "z < 1"
by \<open>Properties of Power Series\<close>lemma [simp:"\Sum>.fn *0^n)= f0java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56 fromf\<open>x < z\<close> have "eventually (\<lambda>n. root n (norm (f n)) < z) sequentially"by( suminf_finite N="{0}")( simp:power_0_left by powser_sums_zero(<>.a n*0n sums thenfor a:" \ 'a::real_normed_div_algebra" usingjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 proof fix assume less a :: " \ 'a::real_normed_div_algebra" frompower_strict_mono[OF less, of nshow fn) by qed
series a circle radius convergence it for\<open>x\<close>, unfoldingeventually_sequentially using\<open>0 \<le> x\<close> by (auto intro!: summable_comparison_test[OF _ summable_geometric]) xz: "':real_normed_div_algebra" qed
subsection \<open>Properties of Power Series\<close>
lemma powser_zero [simp]: "(\n. f n * 0 ^ n) = f 0" forand" z < norm x"
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 7
f 2 havex_neq_0
( suminf_finite[where N="{0}"]) (auto simp: power_0_left) then ?thesis by simp qed
lemma powser_sums_zero: "(\n. a n * 0^n) sums a 0" for a :: "nat \ 'a::real_normed_div_algebra" using sums_finite [of "{0}""\n. a n * 0 ^ n"] bysimp
lemma powser_sums_zero_iff [simp]: "(\n. a n * 0^n) sums x \ a 0 = x" forthen"convergent(\n. f n * x^n)" using sums_unique2byblast
text\<open>
Power series has a circle or radius of convergence: if it sums for by (rule convergent_Cauchy) then sums absolutely \<open>z\<close> with \<^term>\<open>\<bar>z\<bar> < \<bar>x\<bar>\<close>.\<close>
lemma powser_insidea obtainKwhere 0 K" and4:"<forall normfn*xn <le> K" fixes x z :: "'a::real_normed_div_algebra" assumes 1 "summable (\n. f n * x^n)" and 2: "norm z < norm x "\<exists>N. \<forall>n\<ge>N. norm (norm (f n * z ^ n)) \<le> K * norm (z ^ n) * inverse (norm (x^n))"intro allI) showssummable proof - from2 : x
1 (> ^)
al then( byalso java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80 thenhave"Cauchy (\n. f n * x^n)" by (rule convergent_Cauchy) thenhave"Bseq (\n. f n * x^n)" by (rule have" = K * norm (z ^ n) * inverse (norm (x^n)) * norm (x^n)" obtain K 3: "0 < K and4:"<>.norm n * x^n) \<le> K"
auto: Bseq_def have"\N. \n\N. norm (norm (f n * z ^ n)) \ K * norm (z ^ n) * inverse (norm (x^n))" proof exI allI) fix n :: nat assume"0ve"summable (\<lambda>n. K * norm (z ^ n) * inverse (norm (x^n)))" have"orm ( (f n * n) *norm(x^n)=
norm (f n x_neq_0
: norm_mult) alsohave"\ \ K * norm (z ^ n)" by (simp only: mult_right_mono 4 norm_ge_zero have"summable \<>n. norm ( * x) ^ n)" alsohave\<dots> = K * norm (z ^ n) * (inverse (norm (x^n)) * norm (x^n))" by (simp add: x_neq_0) alsohave"\ = K * norm (z ^ n) * inverse (norm (x^n)) * norm (x^n)" by (simp only: mult.assoc) finallyshow"norm (norm (f n * z ^ n)) \ K * norm (z ^ n) * inverse (norm (x^n))" by (simp add: thenshow"ummable(\n. K * norm (z ^ n) * inverse (norm (x^n)))" qed moreoverby simp: norm_mult power_mult_distrib proof - from 2 qed using x_neq_0 by (simp add: norm_mult nonzero_norm_inverse divide_inverse [where'a=real, symmetric]) thenhave"summableomparison_test) by( summable_geometric) then powser_inside by (rule summable_mult fixesf::"nat \ 'a::{real_normed_div_algebra,banach}" then" (\n. f n * (x^n)) \ norm z < norm x \ using by (simp add (rule powser_insidea summable_norm_cancel)
power_inversefixes: "a:{eal_normed_div_algebra,}java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 qed ultimatelyshow"summable (\n. norm (f n * z ^ n))" by (rule summable_comparison_test) qed
lemma powser_inside: fixes f :: "nat \ 'a::{real_normed_div_algebra,banach}" shows "summable (\n. f n * (x^n)) \ norm z < norm x \
summable (\<lambda>n. f n * (z ^ n))" by (rulepowser_insideaTHEN])
lemmaobtainN where N: norm/( - norm <of_int
ixesx: "a:{eal_normed_div_algebra,}" have N0N0 showsby auto
havenorm ( - orm\<ge> 0"
sing by (auto: field_split_simps moreoverobtainwhere" x / (1 -norm x) N"
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
(simp addalgebra_simps) by autothen"(real_of_int N*real_of_nat( n) *(norm ( ^n) \
n * ( + ))*( x * norm n)" using N by (auto: field_simps
ave*" N * (normx *( (Suc n) *norm x n))\
real_of_nat n * ( by( add: algebra_simps
- from that (ule [OFsummable_ratio_test N1"nat N"]) by(simp: algebra_simps thenjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
real_of_nat ( N)) *( x *norm )" using N0 mult_mono by fastforce thenshow ?thesis by (simp add: algebra_simps) qed show ?thesis using * by (rule summable_LIMSEQ_zero [OF summable_ratio_test, where N1="nat N"])
(simp add: N0 norm_mult field_simps ** del: of_nat_Suc of_int_add) qed
corollary lim_n_over_pown: fixes x :: "'a::{real_normed_field,banach}" showsshows"1 norm x ((\n. of_nat n / x^n) \ 0) sequentially" using powser_times_n_limit_0 [of "inverse x"] by (simp add: norm_divide field_split_simps)
lemma sum_split_even_oddby(simp add: norm_divide) fixesnat shows"(java.lang.StringIndexOutOfBoundsException: Range [0, 12) out of bounds for length 4 proof (induct n) case0 thenshow ?caseby simp next case (Suc n) have(
(\<Sum>i<n. f (2 * i)) + (\<Sum>i<n. g (2 * i + 1)) + (f (2 * n) + g (2 * n + 1))" using Suc
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 by auto finallyshow ?case . qed
lemmafixes :"at\ real" fixes java.lang.NullPointerException proof LIMSEQ_I :java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15 shows unfolding sums_defbyjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
( ) fix r :: java.lang.StringIndexOutOfBoundsException: Range [0, 15) out of bounds for length 9 assume"0 r" from\<open>g sums x\<close>[unfolded sums_def, THEN LIMSEQ_D, OF this] obtain no where no_eq: "\n. n \ no \ (norm (sum g {.. by blast
let ?SUM = "\ m. \i have ( (? -x <r) if"m\java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
- from that have" moreover have sum_eq: "?SUM (2 * (m div 2)) = sum g {..< m div 2}" using sum_split_even_odd by auto then"(norm(? (2 * (m div2)) - x) using no_eq unfolding True moreover have"?SUM (2 * (m div 2)) = ?SUM m" proof (casesthen ?thesis case True thenshow ?thesisnext by (auto thenhaveeq: " (2 *m div2)=m bysimp next case False thenhave eq: "Suc (2 * (m div 2)) = m"by simp thenhave"even (2 * (m div 2))"using\<open>odd m\<close> by autohave? ? (uc* ( div"unfolding eq .. have"?SUM finally show? by auto "\ = ?SUM (2 * (m div 2))" using \even (2 * (m div 2))\ by auto finallyshow ?thesis by auto qedultimately ?thesisauto ultimatelyqed qed then"\no. \ m \ no. norm (?SUM m - x) < r" byjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 qed
lemma sums_if: fixes g :: "nat \ real" assumes" f y" shows? \<lambda> n. if even n then 0 else f ((n - 1) div 2)" proof let ?s = "java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93 for by( B) auto have: "\ using'[ \g sums x\] . have if_eqif_eq congdel) by auto have ? "usingsums_if[ from this only) have"(\n. if even n then f (n div 2) else 0) sums y" by (subsection
if_eq sums_def cong del: (* FIXME: generalise these results from the reals via type classes? *) from sums_add[lemmasums_alternating_upper_lower by (simp: if_sum) qed
subsection\< (* FIXME: generalise these results from the reals via type classes? *)
lemma sums_alternating_upper_lower: fixes a :: "nat \ real" assumes mono: "\n. a (Suc n) \ a n" and a_pos: "\n. 0 \ a n" and"a \ 0"
java.lang.StringIndexOutOfBoundsException: Index 153 out of bounds for length 153
((<>n \<le> (\<Sum>i<2*n + 1. (- 1)^i*a i)) \<and> (\<lambda> n. \<Sum>i<2*n + 1. (- 1)^i*a i) \<longlonglongrightarrow> l)"
(is proof ( nested_sequence_unique have fg_diff
show proof show mono "2*"byjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 using mono qed show"\n. ?g (Suc n) \ ?g n" proof show"?g (Suc n) \ ?g n" for n using[of*" java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
"
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 using r qed "\n. ?f n - ?g n) \ 0" unfolding fg_diff proofrule) fix r "\n \ N. norm (- a (2 * n) - 0) < r" assume"0 < r" with by auto thenhave"\n \ N. norm (- a (2 * n) - 0) < r" by auto then"\N. \n \ N. norm (- a (2 * n) - 0) < r" by auto qed qed
lemma summable_Leibniz': fixes a :: "nat \ real" assumes a_zero
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 and a_monotone\And. Sucjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50 anda_monotone and" shows summable: "summable (\ n. (-1)^n * a n)" 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)" and"(\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. \iand =java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
?f=" let ?g = "\n. ?P (2 * n + 1)" obtainl : real where below_l: "\ n. ?f n \ l" "?f \ l" and"\ n. l \ ?g n" and [OF a_zero using Sa
let"Sa\ l" have r:real proof (rule java.lang.StringIndexOutOfBoundsException: Range [69, 5) out of bounds for length 69 fix leibniz assume" obtain l "( with\<open>?f \<longlonglongrightarrow> l\<close>[THEN LIMSEQ_D]by auto 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 - fromthatn show ?thesis auto:) proofmoreover case True thenhave: "2 * ( div 2) = n" by (simp add: even_two_times_div_two) \<open>n \<ge> 2 * f_no\<close> have "n div 2 \<ge> f_no" by auto fromf[ this ?thesis
?pos \<open>0 \<le> ?a 0\<close> by auto next case False then" (n - )" java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 then n_eq 2*(n-1 )=n-1 bybyjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 then: " " using[ ] byauto
by auto fromsubsection by (simp java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
thenshow"\no. \n \ no. norm (?Sa n - l) < r" by blast
qed summable thenhave sums_l\<lambda>n. of_nat n * c n * x^(n - Suc 0)) sums (\<Sum>n. diffs c n * x^n)" by (simp only: sums_def) thenshow"summable ?S" by (auto simp: summable_def)
have"l = suminf ?Sjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
fix n showsuminf unfoldingf {. n* show?java.lang.NullPointerException
sums_unique , symmetric below_l java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69 "g\ suminf ?S" using\<open>?g \<longlonglongrightarrow> l\<close> \<open>l = suminf ?S\<close> by auto"?lhs=rhs) show"?f show "?f \ suminf ?S" \<open>?f \<longlonglongrightarrow> l\<close> \<open>l = suminf ?S\<close> by auto qed
theorem summable_Leibniz( simp: [symmetric.commute:.cong fixes a :: "nat \ real" assumes a_zero: "a \ 0" andmonoseq shows"summable ( simp del: sum.lessThan_Suc power_Suc intro: sum.cong) 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\<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"(alsohave".=h*(<Sum>p<Suc m. (z + h) ^ p * z ^ (m - p)) - of_nat (Suc m) * z ^ m)" 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 have".. \ theno: "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 show notejava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8 from f {n-k show ?thesis - next let ?a = "\n. - a n" case False with monoseq_le[OF \<open>monoseq a\<close> \<open>a \<longlonglongrightarrow> 0\<close>] rule [OFauto havealso". of_nat n * K" thenhave ord: auto: mult_right_mono) by auto have:
[nSucjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48 note" (( )^n-z )/ of_nat n * z ^ ( -Suc0)=
summable_Leibniz_ java.lang.NullPointerException
OF( (lifting no_types [OF 1] mult norm_mult) have" "\<dots> \<le> of_nat n * (of_nat (n - Suc 0) * K ^ (n - 2)) * norm h" using leibniz)byauto thenobtainfrom 2 have K: "0\<> K" unfolding summable_def: norm i - fromhavejava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73 by auto then? by (auto: ) moreover have" unfolding minus_diff_minus by auto
from suminf_minus add norm_power
: "(\n. - ((- 1) ^ n * a n)) = - (\n. (- 1) ^ n * a n)" by auto (simp: subst_all
have ?pos using\<open>0 \<le> ?a 0\<close> by auto moreover neg using intro [ norm_sum unfolding sum_negf neg_le_iff_le by auto moreover ?f ?g using leibniz( only.assoc
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 ultimatelyshow ?thesis by k ::real qed thenshow ?summable and ?pos and ?neg and ?f and ?g byand: "And>.h \ 0 \ norm h < k \ norm (f h) \ K * norm h" qed
subsection \<open>Term-by-Term Differentiability of Power Series\<close>
text lemma diffs_minus: "diffs (\n. - c n) = (\n. - diffs c n)" by (simp simp
lemma diffs_equiv: fixes x :: "'a::{real_normed_vector,ring_1}" "(<> diffscn*xn
(\<lambda>n. of_nat n * c n * x^(n - Suc 0)) sums (\<Sum>n. diffs c n * x^n)" unfoldingdiffs_def by (simp add: summable_sums sums_Suc_imp)
lemma lemma_termdiff1: fixesby(ruletendsto_const shows"(\p
(\<Sum>p<m. (z ^ p) * (((z + h) ^ (m - p)) - (z ^ (m - p))))" by (auto simp: algebra_simps power_add
lemma sumr_diff_mult_const2 for'real_normed_vector by simp )
lemma lemma_termdiff2: fixes h :: "'a::field" assumes h: "h \ 0"
k: 0<
h * (\<Sum>p< n - Suc 0. \<Sum>q< n - Suc 0 - p. (z + h) ^ q * z ^ (n - 2 - q))"f"
(is"?lhs = ?rhs") proof (cases n) (rulelemma_termdiff4 k]java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
s m) have 0: "\x k. (\n
(\<Sum>j<Suc k. h * ((h + z) ^ j * z ^ (x + k - j)))"
(simp symmetric:sum have *: "(\i
(\<Sum>i<m. \<Sum>j<m - i. h * ((z + h) ^ j * z ^ (m - Suc j)))" by (force simp add: less_iff_Suc_add sum_distrib_left diff_power_eq_sum ac_simps 0 by(rule) have"h have 3: "summable by (simp add: right_diff_distrib diff_divide_distrib h mult. by (rule summable_comparison_test alsohave"... = h * ((p by (simp add (rulesummable_norm
del sum.lessThan_Suc) alsohave"... = h * ((\p by (subst sum.nat_diff_reindex[ f"\Sum>n f *normh =suminf normh" alsohave"... = h by ( suminf_mult2 [symmetric]java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38 by (simp add alsohave"... = h * ?rhs" by (simp add: lemma_termdiff1 sum_distrib_left Suc *) finallyhave then ?thesis
simp: 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" showssum{.n-k\<le> of_nat n * K" proof"\<>h. \n. c n * (((x + h) ^ n - x^n) / h - of_nat n * x ^ (n - Suc 0))) \0\0" have by (rulefromdense 2] r where: norm "andr2 r alsohave"... java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 11 by (auto by( order_le_less_trans finally thesis
lemma lemma_termdiff3 "0 fixes r1 assumesh\<noteq> 0" and and 3: with"summable (\n. norm (diffs (diffs c) n * (of_real r ^ n)))" "norm (( +) ^n-z n)/h- n * z ^( Suc 0)\
of_nat r by( adddiffs_def norm_power: of_nat_Suc
the "summable(\n. of_nat n * diffs (\n. norm (c n)) n * r ^ (n - Suc 0))"
]
norm (\<Sum>p<n - Suc 0. \<Sum>q<n - Suc 0 - p. (z + h) ^ q * z ^ (n - 2 - q)) * norm h" by (metis (lifting alsohave"\n n * diffs (\n. norm (c n)) n * r ^ (n - Suc 0)) = alsohave"\ \ of_nat n * (of_nat (n - Suc 0) * K ^ (n - 2)) * norm h" proofrule OF]) from norm_ge_zero 2 have K: "0 \ K" by (rule order_trans) finallysummable proof - have"norm ( have "norm (z n * ( (n -Suc0 *norm(c n inverse r)*r^(n-Suc0)java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95 by have.n by (metisassumeh <noteq
f ? " x + norm h < r"by simp qed thenhave"\p q. \<lbrakk>p < n; q < n - Suc 0\<rbrakk> \<Longrightarrow> norm ((z + h) ^ q * z ^ (n - 2 - q)) \<le> K ^ (n - 2)" by (simp del: subst_all) then show"norm (\pq
of_natn*( (n 0) ( 2" by (intro order_trans [OF norm_sum : "norm( )
real_sum_nat_ivl_bounded2 mult_nonneg_nonneg of_nat_0_le_iff ( (mono_tags)hmult less_eq_real_defxh qed also (cn n * (n -Suc)*^n-) h" by ( only.assoc finallyshow ?thesis . qed
lemmalemma_termdiff4
f: ': and k :: real assumes k: "0 < k" and le: "DERIV( shows DERIV_def proof (rule tendsto_norm_zero_cancel "\lambdah. suminf(. c n x+h (\n. c n * x^n)) / h show"(\h. norm (f h)) \0\ 0" proof (rule real_tendsto_sandwich) show"eventually (\h. 0 \ norm (f h)) (at 0)" by simp
(\<lambda>h. norm (f h) \<le> K * norm h) (at 0)" usingfix ::'java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15 show(\<lambda>h. 0) \<midarrow>(0::'a)\<rightarrow> (0::real)" by( tendsto_const have"( by (rule norm_triangle_ineq [THEN order_le_less_trans]) by (intro tendsto_intros) thenshow"(\h. K * norm h) \(0::'a)\ 0" by simp qed"summable (\n. c n * (x + h) ^ n)" qed
lemma lemma_termdiff5: fixes java.lang.NullPointerException andreal assumes and f: and le shows"(\h. suminf (g h)) \0\ 0"
oof k) fix h :: 'a assume"h \ 0" and "norm h < k" thenand:\AndK by (simp " (\n. diffs c n * x ^ n)" thenhave"\N. \n\N. norm (norm (g h n)) \ f n * norm h"case by simp moreover 2"ummable ( by (java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
then obtai wherex "normr>0java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
summable_comparison_test have((g h)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 by (rule( summable_comparison_test
3 " by (simp add: suminf_le) also f (Sum* f*norm by (rule suminf_mult2 [symmetric" '=']by java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64 finally" (suminf g ) qed
(* FIXME: Long proofs *)
lemmausing [ "\n. of_nat n * c n * x ^ n" 1] fixes x :: have(lambda )*( ) x^) assumes java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 and 2: "norm x < norm show ?hesis "(\h. \n. c n * (((x + h) ^ n - x^n) / h - of_nat n * x ^ (n - Suc 0))) \0\ 0" proof - from java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 byjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11 from"summable \lambda>n. c n *x)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48 by( order_le_less_trans thenhave r_neq_0
?thesis proof (rule lemma_termdiff5) "0 using r1 sm(\<lambda>n. c n * K ^ n)" from r shows(>x.\<>.cn*^n:> \<Sumdiffs^)java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80 then: " (( (norm )+of_real (normx)/2: a < " with 1 have"summable (\n. norm (diffs (diffs c) n * (of_real r ^ n)))" byauto : norm_divide thenhave"summable (\n. diffs (diffs (\n. norm (c n))) n * r ^ n)" using r by (simp add: diffs_def then [simp]: "norm ((of_real (norm K) + of_real (norm x)) :: 'a) < norm K* 2 thenhavesummable by metis summable_norm_cancelOF [OFsmadd of_real_add have"<>x norm K \ summable (\n. diffs c n * x ^ n)"
(\<lambda>n. diffs (\<lambda>m. of_nat (m - Suc 0) * norm (c m) * inverse r) n * (r ^ n))" ( intro: termdiff_convergespowser_inside by( add r_neq_0fun_eq_iff: nat_diff_split finallyhave"summable
(\<lambda>n. of_nat n * (of_nat (n - Suc 0) * norm (c n) * inverse r) * r ^ (n - Suc 0))" by (rule diffs_equiv [THEN sums_summable]) alsohave "\<>n.of_nat n * ( (n - 0) * norm (c n)
(\<lambda>n. norm (c n) * of_nat n * of_nat (n - Suc 0) * r ^ (n - 2))"by termdiffsK of_real+ norm K) / 2"]) by (rule ext) (simp add: r_neq_0 finallylemma: next fix"\y. summable (\n. c n * y ^ n)" assume h: "h \ 0" assume" < " thenhave"norm x + norm h < r"by simp with norm_triangle_ineq have xh:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 by (rule order_le_less_trans (lambda " ((( +h x ) 0)java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71 \<le> real n * (real (n - Suc 0) * (r ^ (n - 2) * norm h))" by (metis (mono_tagsfinallyhave:"
K L Ljava.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
norm (c n) * of_nat n * of_nat c *of_real) assms by (simp onlylemma: qed qed
lemma termdiffs: fixesnormK assumes 1 "( andproof - and" (\n. (diffs (diffs c)) n * K ^ n)" and termdiff_converges ] sums_summable sums shows(lambda unfolding introeventually_nhds_in_open) proof ( simp_all: continuous_on_norm) show
- suminf (insert, addsums_iff proof (rule "(z. \n. c n * z^n) has_field_derivative (\n. diffs c n * z^n)) (at z)" show norm x using 4 by (hence java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6 fixh: a assume"norm (h - 0) < norm K - norm x" thenhave"norm x + java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 then 5 norm +)<norm byrule [THEN]) have"summable ssumes" (\<lambda>n. c n * K ^ n)" and"summable (\n. c n * (x + h) ^ n)" and"summable (\n. diffs c n * x^n)" using1 24 5 by(auto: powser_inside thenhave"lemmas isCont_powser' = isCont_o2[OF _ isCont_powser]
(lemma: by intro sums_diff diffs_equiv) then"\y. summable (\n. c n * y ^ n)"
(\<Sum>n. c n * (((x + h) ^ n - x^n) / h - of_nat n * x ^ (n - Suc 0)))" by ( add) next
c n * ((x+h -^)/h-of_natn*x^n-Suc)\<midarrow>0\<rightarrow> 0" by (rule qed qed
subsection \<open>The Derivative of a Power Series Has the Same Radius of Convergence\<close>
lemma termdiff_converges: fixes'::banach" assumes K: "norm x < K" and: \And.norm <Longrightarrow> summable(\<lambda>n. c n * x ^ n)" shows"summable (\n. diffs c n * x ^ n)" proofx=0) case True then ?thesis using powser_sums_zero sums_summable sums_summable sm]) next case False thenhave"K > 0" usingby(rule) (use\<open>auto simp: norm_divide\<close>) thenobtain r :: real by (blast: DERIV_continuous using K False)
( simp abs_less_iff : that )/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 show? obtainwherejava.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91 using a : " \ 'a::{real_normed_field,banach}" by (auto simp: norm_divide norm_mult sm" have"summable (\n. (of_nat n * c n) * x ^ n)"
java.lang.StringIndexOutOfBoundsException: Range [40, 2) out of bounds for length 40 show"summable (\n. norm (c n * of_real r ^ n))" apply ( using "*" by : Lim_cong_within using show"\n. N \ n \ norm (of_nat n * c n * x ^ n) \ norm (c n * of_real r ^ n)" using N r by (fastforce qed fixesf: real using summable_iff_shift [ DERIV_f by allf_summable\<And> x. x \<in> {a <..< b} \<Longrightarrow> summable (f x)" thenhave"summable (\n. (of_nat (Suc n) * c(Suc n)) * x ^ n)" using summable_mult2 "\n. (of_nat (Suc n) * c(Suc n) * x ^ n) * x" "inverse x"]
simp: .assoc simp) thenshow?java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 by (simp add: diffs_def) qed
lemma termdiff_converges_all: fixes N_L N_L "<> n \ n \ \ \ i. L (i + n) \ < r/3"
ssumes shows"summable ( shows "summable (\n. diffs c n * x^n)"
converges 1+x)( )
lemma termdiffs_strong: fixes K x :: "'a::{real_normed_field,banach}" assumes sm: "summable (\n. c n * K ^ n)" andusingsuminf_exist_split[OF\<open>0 < r/3\<close> \<open>summable (f' x0)\<close>] by auto shows"DERIV (\x. \n. c n * x^n) x :> (\n. diffs c n * x^n)" proof- have"norm K + norm x < norm K + norm K" using K by force then"\ \ i. f' x0 (i + ?N) \ < r/3" (is "?f'_part < r/3") by (auto simpnorm_triangle_lt norm_dividefield_simps) have[]:" (of_real(normK)+of_real(norm ))::'a) < K *2java.lang.StringIndexOutOfBoundsException: Range [85, 86) out of bounds for length 85 by simp have"summable (\n. c n * (of_real (norm x + norm K) / 2) ^ n)" by (metisK2summable_norm_cancelOF [OF sm] .commute of_real_add moreoverhave\<>x norm < K\<Longrightarrow> summable (\<lambda>n. diffs c n * x ^ n)" by java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 moreoverhave\<>. norm<norm \<Longrightarrow> summable (\<lambda>n. diffs(diffs c) n * x ^ n)" by (blast intro: sm termdiff_converges powser_inside) ultimatelyshow ?thesis
define'where S'=Min(s`{.. )
(use K in (use K in \<open>auto simp: field_simps simp flip: of_real_add\<close>) qed
lemma termdiffs_strong_converges_everywhere: fixes K x :: "'a::{real_normed_field,banach}" assumes"\y. summable (\n. c n * y ^ n)" shows"((\x. \n. c n * x^n) has_field_derivative (\n. diffs c n * x^n)) (at x)" using termdiffs_strong[OF assms assume" \ ?s ` {.. by force del: of_real_add
proof (rule " n"
rule[wheres)( simps_bound del:of_nat_Suc haveshow0<x" ( only: \x = ?s n\) alsonote\<open>norm z < K\<close> finallyhave K: "K \ 0" by simp fromassms :" <>0 normz
L "normz java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55 from L show"summable (have "\(suminf (f (x0 + x)) - suminf (f x0)) / x - suminf (f' x0)\ < r" qed
lemma termdiffs_sums_strong: fixes z: " : banachreal_normed_field}java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 assumes: "<>z norm < \ (\n. c n * z ^ n) sums f z" assumes deriv: "(f has_field_derivative f') (at z)"
diff_smbl summable_diff[ allf_summable x_in_I[OF]] showsnote = summable_divide ] proof - have summable: "summable (\n. diffs c n * z^n)" by (intro =[where" fromnorm "eventually \z. z \ norm -` {.. by div_shft_smbl[OF]
(simp_allnote = summable_diff div_smbl[ \<open>summable (f' x0)\<close>]]
ave"bar>\?diff (n + ?N) x\)\ \ L (n + ?N)" for n by -
have"((\z. \n. c n * z^n) has_field_derivative (\n. diffs c n * z^n)) (at z)" by (intro termdiffs_strong'[OF _ norm] sums_summable[OF sums]) hence"(f has_field_derivative (\n. diffs c n * z^n)) (at z)" by subst) DERIV_cong_ev refl refl from this( only) with summable show\<open>x \<noteq> 0\<close> show ?thesis by auto qed
lemma isCont_powser: fixes K x :: "'a::{real_normed_field,banach}" assumes" (\n. c n * K ^ n)" assumes K" shows"isCont (\x. \n. c n * x^n) x" using termdiffs_strong have"\i. ?diff (i + ?N) x\ \ r / 3" (is "?L_part \ r/3")
lemmasusing L_estimateauto
lemma isCont_powser_converges_everywhere: fixes K "\\n \ (\n?diff n x - f' x0 n\)" .. assumes"\y. summable (\n. c n * y ^ n)" shows"isCont (\x. \n. c n * x^n) x" using also have "\> < (\<Sum>n<?N. ?r)"
(force!: DERIV_isContsimp: )
lemma powser_limit_0: fixes a :: assume n \<in> {..< ?N}" assumes s: "0 < s" and" <> S"using\openS \ S'\ . shows" have"S'\ ?s n" proof - have"norm (of_real s / 2 :: 'a) < s" usings by( simpnorm_divide thenhavehave ?
rule [OF]) thenhavethen" by (rule termdiffs_strong) (byblast thenhave"isCont (\x. \n. a n * x ^ n) 0" qedjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14 then ( by (simp add: continuous_within) moreover"\lambdax f (n. a n * x ^ n)) \0\ 0" apply (clarsimp simp: LIM_eq apply (rule_tac x=s \<open>x \<noteq> 0\<close> and \<open>\<bar>x\<bar> < ?s n\<close> show "\<bar>?diff n x - f' x0 n\<bar> < ?r" using s sm sums_unique " = of_nat (card {.. ultimatelyshow ?thesis by (rule Lim_transform) qed
lemma powser_limit_0_strong: fixes a :: "nat alsohave"<dots3 assumes s auto del)
a sm\And\<noteq> 0 \<Longrightarrow> norm x < s \<Longrightarrow> (\<lambda>n. a n * x ^ n) sums (f x)" shows suminf_diff allf_summable x_in_I[OF]] proof- have *: "((\x. if x = 0 then a 0 else f x) \ a 0) (at 0)" by (rule powser_limit_0 unfolding suminf_diff[ div_smbl show ?thesis suminf_divide diff_smbl] by java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58 using"*"by uminf_split_initial_segment all_smbl k=?"] qed
subsection \<open>Derivability of power series\<close> only.commute
lemma DERIV_series': fixes f :: "real \ nat \ real" assumes DERIV_f: "\ n. DERIV (\ x. f x n) x0 :> (f' x0 n)" and allf_summable: "\ x. x \ {a <..< b} \ summable (f x)" and x0_in_I: "x0 \ {a <..< b}" and(')java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 and"summable L" and showsshow\<exists>s > 0. \<forall> x. x \<noteq> 0 \<and> norm (x - 0) < s \<longrightarrow> unfolding DERIV_def proof (rule LIM_I \<open>0 < S\<close> by auto fix r :: real assume"0 < r"lemma':
obtain N_L where N_L: "\ n. N_L \ n \ \ \ i. L (i + n) \ < r/3" using suminf_exist_split[OF using suminf_exist_split[OF \<open>0 < r/3\<close> \<open>summable L\<close>] by auto
\<bar> < r/3" using suminf_exist_split[OF \<open>0 < r/3\<close> \<open>summable (f' x0)\<close>] by auto
let ?N = proof havefor_subinterval "DERIV (\x. suminf (?f x)) x0 :> suminf (?f' x0)" and L_estimate: "\ \ i. L (i + ?N) \ < r/3" using[of"N"and[ ?"] auto
let ?diff = "\i x. (f (x0 + x) i - f x0 i) / x"
? ="r/( *real?N)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 from\<open>0 < r\<close> have "0 < ?r" by simp
let ?s = "\n. SOME s. 0 < s \ (\ x. x \ 0 \ \ x \ < s \ \ ?diff n x - f' x0 n \ < ?r)"
define S' where "S' = Min (?s ` {..< ?N })"
proofrule') unfolding'def proof (rule iffD2p - show"R R < R"" R +R)/2"
fix x
assume x \<in> ?s ` {..<?N}" thenobtain n where"x = ?s n"and"n \ {.. using image_iff[THEN iffD1] by blast from DERIV_D[OF DERIV_f[where n=n], THEN LIM_D, OF \<open>0 < ?r\<close>, unfolded real_norm_def] obtainswhere: "0 < s \ (\x. x \ 0 \ \x\ < s \ \?diff n x - f' x0 n\ < ?r)" by have"0 < ? have \x\ \ R'" by auto by (rule someI2 by power_mono thenmult_mono[ \<open>x \<in> {-R'<..<R'}\<close>, of p] this[OF \<open>y \<in> {-R'<..<R'}\<close>, of "n-p"]]
qed auto
then"barx^ y( )bar \dots= Suc ' njava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 and"S \ S'" using x0_in_I and \0 < S'\
have" if"x \ 0" and "\x\ < S" for x proof- from that have x_in_I: "x0 + x \ {a <..< b}" using S_a S_b by auto
have 1: "\(\?diff (n + ?N) x\)\ \ L (n + ?N)" for n proof - have"\?diff (n + ?N) x\ \ L (n + ?N) * \(x0 + x) - x0\ / \x\" using divide_right_mono[OF L_def[OF x_in_I x0_in_I] abs_ge_zero] by (simp only: abs_divide) with\<open>x \<noteq> 0\<close> show ?thesis by auto qed note 2 = summable_rabs_comparison_test[OF _ ign[OF \<open>summable L\<close>]] from 1 have"\ \ i. ?diff (i + ?N) x \ \ (\ i. L (i + ?N))" by (metis (lifting) abs_idempotent
order_trans[OF summable_rabs[OF 2] suminf_le[OF _ 2 ign[OF \<open>summable L\<close>]]]) thenhave"\\i. ?diff (i + ?N) x\ \ r / 3" (is "?L_part \ r/3") using L_estimate by auto
have"\\n \ (\n?diff n x - f' x0 n\)" .. alsohave"\ < (\n proof ( show"DERIV(\x. ?f x n) x0 :> ?f' x0 n" for n fixjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
assume"'\ qed (rule powser_insidea[OF convergesOF \<open>R' \<in> {-R <..< R}\<close>] \<open>norm x < norm R'\<close>]) alsohave" \ S'" using \S \ S'\ . alsohave"S' \ ?s n" unfolding S'_def proof (rule Min_le_iff[THEN iffD2]) have"?s n \ (?s ` {.. ?s n \ ?s n" using\<open>n \<in> {..< ?N}\<close> by auto thenshow"\ a \ (?s ` {.. ?s n" by blast qed auto finallyhave"\x\ < ?s n" .
from DERIV_D[OF DERIV_f[where n=n], THEN LIM_D, OF \<open>0 < ?r\<close>,
unfolded real_norm_def diff_0_right, unfolded some_eq_ex[symmetric "summable(?' )" have"\x. x \ 0 \ \x\ < ?s n \ \?diff n x - f' x0 n\ < ?r" . show"0 {-R' <..< R'}" using\<open>x0 \<in> {-R' <..< R'}\<close> . qed auto alsohave"\ = of_nat (card {.. by (rule sum_constant) alsohave"\ = real ?N * ?r" by simp
assms by ( simp: field_simps by (auto simp del: thenhave"-?R < x0" finallyhave"\\n < r / 3" (is "?diff_part < r / 3") .
from suminf_diff have- " have"\(suminf (f (x0 + x)) - (suminf (f x0))) / x - suminf (f' x0)\ = \<bar>\<Sum>n. ?diff n x - f' x0 n\<bar>" unfolding suminf_diff[OF div_smbl \<open>summable (f' x0)\<close>, symmetric] using suminf_divide[OF diff_smbl, symmetric using alsothen ?thesis unfolding suminf_split_initial_segment next unfolding suminf_diff[OF div_shft_smbl ign[OF \<open>summable (f' x0)\<close>]] apply(imp: add) using abs_triangle_ineq by blasthave- R <0 usingby auto also" \ ?diff_part + ?L_part + ?f'_part" using abs_triangle_ineq4 by auto finallyshowthesis using\<open>?diff_part < r/3\<close> \<open>?L_part \<le> r/3\<close> and \<open>?f'_part < r/3\<close> by (rule add_strict_mono [OF add_less_le_mono]) finallyshowthesis by auto qed thenshow"\s > 0. \ x. x \ 0 \ norm (x - 0) < s \
norm ((java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 using\<open>0 < S\<close> by auto
lemma ( assms intro simp)
:nat assumes converges and x0_in_I: lemmaisCont_pochhammer[]: " \z. pochhammer z n) z" "0< R" shows"DERIVby( n) (autosimp ')
(lemma c] java.lang.NullPointerException proof -
: DERIV if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 proof - from that byauto show ?thesis proof') showwhere proof - have"(R' + ,}" using\<open>0 < R'\<close> \<open>0 < R\<close> \<open>R' < R\<close> by (auto simp: field_simps) then : "R Suc)java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64 using\<open>R' < R\<close> by auto havenormnormR /)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 using\<open>0 < R'\<close> \<open>0 < R\<close> \<open>R' < R\<close> by (auto simp: field_simps) from powser_insidea n :java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16 by auto qed next
x assume" " x ( ) show proof - have" then have "norm (x * S n) \ real (Suc n) * r * norm (S n)"
(\<bar>f n\<bar> * \<bar>x-y\<bar>) * \<bar>\<Sum>p<Suc n. x ^ p * y ^ (n - p)\<bar>"
right_diff_distribdiff_power_eq_sum by auto alsohave"\ \ (\f n\ * \x-y\) * (\real (Suc n)\ * \R' ^ n\)" proof (rule mult_left_mono) have"\\p \ (\px ^ p * y ^ (n - p)\)" by ( by (simp add inverse_eq_divide alsohave"\ \ (\p proof (rule sum_mono) fix p
p\<in> {..<Suc n}" then rule[ exI have"\x^n\ \ R'^n" if "x \ {-R'<.. " (xn \^>R n) R fact n" n havejava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 thenshow summable_exp_generic xjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 unfolding power_abs qed from[ this and\<open>0 < R'\<close> have"\x^p * y^(n - p)\ \ R'^p * R'^(n - p)" unfolding abs_mult by b add nonzero_inverse_mult_distrib thenjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 unfolding power_add[symmetric qed also java.lang.NullPointerException unfolding sum_constant (rule) finally"\\p \ \real (Suc n)\ * \R' ^ n\" unfolding abs_of_nonnegby(rule exp_converges sums_summableunfolded]) bylinarith show"0 \ \f n\ * \x - y\" unfolding abs_mult[symmetric] by auto qed " unfolding abs_mult mult.assoc[symmetric] by algebra finallyshow . qed next show"DERIV (\x. ?f x n) x0 :> ?f' x0 n" for n by (auto intro!: derivative_eq_intros simp del: power_Suc) next[ , derivative_intros fix assume" then"'\ {-R <..< R}" and "norm x < norm R'" using assms \<open>R' < R\<close> by auto have"summablelemmanorm_exp: " (exp\<le> exp (norm x)" proof (rule from summable_norm[OF summable_norm_exp
have lebysimp) by( mult_left_mono show"norm (f n * x^n) \ norm (f n * real (Suc n) * x^n)" unfolding real_norm_def abs_mult: "isContexp using le mult_right_mono by using le mult_right_mono by fastforce qed (rule f f:" from[THENwhere mult multjava.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
summable next " (?f " using converges[OF \<open>x0 \<in> {-R <..< R}\<close>] . show"x0 \ {-R' <..< R'}" using\<open>x0 \<in> {-R' <..< R'}\<close> . qed qed let" x0\) / 2"bar have"\x0\ < ?R" using assms by (auto then" ? proof S_defS\equiv lambda^/<sub " case True thenhave"- x0 < ?R" usingassumes: "x * y =y x
henshow unfolding neg_less_iff_less[proofinduct next case ?case have"- R <0"usingbyauto alsohave java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 finallyshow ?thesis java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80 qed thenhave"0 < ?R""?R < R""- ?R < x0"and"x0 < ?R" using assms by (auto simp: metis times_S from for_subinterval[OF b rule qed
lemma geometric_deriv_sums: fixes z :: "'a :: {real_normed_field java.lang.StringIndexOutOfBoundsException: Index 109 out of bounds for length 109 assumes"norm z < 1" shows"(\n. of_nat (Suc n) * z ^ n) sums (1 / (1 - z)^2)" proof - have"(\n. diffs (\n. 1) n * z^n) sums (1 / (1 - z)^2)" proof termdiffs_sums_strong fix :a" 1 thus"(=\java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87 qed (insert assms thus ?thesis unfolding diffs_def by simp
lemma y ( only: scaleR_right) for : ':real_normed_field" by (induct n) (auto simp: pochhammer_rec')
lemma
exp_add_commuting*=y \java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 fixes = exp_addsymmetric
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 shows"summable S" proof -
S_Suc\<And.S (Suc =(*Sn \^>( ) unfolding S_def by (simp del done obtain of_real_expexp_of_real[] usingjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 obtain:natwhereN:" x < N *r" using ex_less_of_nat_mult r0 by auto from r1 show
( summable_ratio_test]) fix n :: nat assume n: "N proof have"norm x \ real N * r" using N by (rule add[symmetric alsohave"real N * r \ real (Suc n) * r" using r0 n by (simp add: mult_right_mono finallyhave"norm x * norm lemmaexp_minus_inverse:" x * (-x " using norm_ge_zero by (rule ( add[symmetric thenhave exp_minus= x"
rule [ ]) thenhave"norm uby(ntro inverse_unique [symmetric] exp_minus_inverse) by (simp add : "exp x-y x / exp y" then (S Suc\<le> r * norm (S n)" by induct : exp_add) qed
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
lemma summable_norm_exp : " I \ exp (sum f I) = prod (\x. exp (f x)) I"
:real_normed_algebra_1}" proof java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 " \n. norm x^n /\<^sub>R fact n)" by (rule summable_exp_generic "n 0" show"norm (x^n /\<^sub>R fact n) \ norm x^n /\<^sub>R fact n" for n
simp:norm_power_ineq qed
summable_expsummable for x :: "'a:: ( using summable_exp_generic [where x= (cases by (simp add: scaleR_conv_of_real ?thesis
lemma exp_fdiffs: "diffs (\n. inverse (fact n)) = (\n. inverse (fact n :: 'a::{real_normed_field,banach}))" by (simp simp
del: mult_Suc of_nat_Suc)
lemma: "diffs( by (simp add: diffs_def of_nat_neq_0
lemma show ?thesi unfolding scaleR_conv_of_real proof (rule add [symmetric have sinv by( exp_converges sums_summable scaleR_conv_of_real note xx = exp_converges [THENlemma: "(<>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)" by (proof( "n \ 0") "(n. diffs (\n. of_real (inverse (fact n))) n * x ^ n) = (\n. of_real (inverse (fact n)) * x ^ n)" by (simp add: diffs_of_real exp_fdiffs exp n
declare DERIV_exp[THEN DERIV_chain2, derivative_introsusingby ( (asm [symmetric]) auto and DERIV_exp[THEN DERIV_chain2java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
lemmas[] [THEN]
lemma norm_exp: "norm (exp x) \ exp (norm x)" proof from summable_norm[OF summable_norm_exp, ofalsohaveinverse " (exp x by (simp add: exp_def "( (nat (-n))*)=of_intn*xjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 alsohavefinallyshow ?hesis using summable_exp_generic[of "norm x"] summable_norm_exp by (auto simp: exp_def \<open>Properties of the Exponential Function on Reals\<close> finallyshowtext\<open>Comparisons of \<^term>\<open>exp x\<close> with zero.\<close> qed
lemma isCont_exp exp_ge_zero]:" <> x" for x forreal by (rule DERIV_exp [THEN DERIV_isCont])
lemma isCont_exp' [simp]: "isCont have" \ exp (x/2) * exp (x/2)" for f :: "_ \'a::{real_normed_field,banach}" by (rule isCont_o2 show
lemma tendsto_exp for f:: "_ \'a::{real_normed_field,banach}" by ( isCont_tendsto_compose isCont_exp
lemma by (simp add) for unfolding continuous_def [simp
lemma continuous_on_expbysimp ) for f :: "_ \'a::{real_normed_field,banach}" unfolding continuous_on_def by (auto intro: tendsto_exp x :: java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
subsubsection \<open>Properties of the Exponential Function\<close>
lemma exp_series_add_commuting: fixes x y :: "'a::{real_normed_algebra_1,banach}" defines S_def assumeslemmaexp_ge_add_one_self_aux: showsS(x +) ( proof (induct n "0 \ x" case0 show ?case unfolding S_def next case (Suc n) have S_Suc: "\x n. S x (Suc n) = (x * S x n) /\<^sub>R real (Suc n)" unfoldingby ( del) thenhaveshow by simp haveS_comm by (simp add:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
have(n by (metis Sucfromhave+ le alsoby(imp: exp_ge_add_one_self_aux
rule) alsohave"\ = (\i\n. x * S x i * S y (n - i)) + (\i\n. S x i * y * S y (n - i))" by (simplemma: alsohave" = (\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) alsohave"\ = (\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)))"
simptimes_S alsohave\<open>x < y\<close> have "0 < y - x" by simp
= \<Sum>i\<le>Suc n. real i *\<^sub>R (S x i * S y (Suc n - i)))"
b subst) simp alsohave"(\i\n. real (Suc n - i) *\<^sub>R (S x i * S y (Suc n - i)))
( by simp alsohave"(\i\Suc n. real i *\<^sub>R (S x i * S y (Suc n - i)))
java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
= (\<Sum>i\<le>Suc n. real (Suc n) *\<^sub>R (S x i * S y (Suc n - i)))" simp ) by ( exp_less_cancel_iff:" expy\java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76 alsohave by (simp onlylemma [iff finallyshow"S (x + y) (Suc n) = (\i\Suc n. S x i * S y (Suc n - i))" by (simp del: sum.cl_ivl_Suc) qed
lemma exp_add_commuting: "x * y = y * by ( simp: linorder_not_less [symmetric]java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 by (simp "x \ y"
lemma exp_times_arg_commuteusing exp_le_cancel_iff by (simp': "xp -)= /( )
lemma exp_addbysimp inverse_eq_divide for x y :: "'a::{real_normed_field,banach}"
)
: "(2 * z ^2java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 by (simp java.lang.StringIndexOutOfBoundsException: Range [0, 2) out of bounds for length 0
corollary exp_in_Reals [simp]: "z \ \ \ exp z \ \" by (metis Reals_cases Reals_of_real exp_of_real)
lemma exp_not_eq_zero [simp]: "exp x \ 0" proof have"exp x * exp (- x) = 1" by (simp add: exp_add_commuting[symmetric]) alsoassume"exp x = 0" finallyshow False by simp qed
lemma exp_minus_inverse: "exp x * exp (- x) = 1" by (simp add: exp_add_commuting[symmetric])
lemma exp_minus: "exp (- x) = inverse (exp x)" for x :: "'a::{real_normed_field,banach}" by (intro inverse_unique [symmetric] exp_minus_inverse)
lemma exp_diff: "exp (x - y) = exp x / exp y" for x :: "'a::{real_normed_field,banach}" 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 (induct n) (auto simp: distrib_left exp_add mult.commute)
corollary exp_of_nat2_mult: "exp (x * of_nat n) = exp x ^ n" for x :: "'a::{real_normed_field,banach}" by (metis exp_of_nat_mult mult_of_nat_commute)
lemma exp_sum: "finite I \ exp (sum f I) = prod (\x. exp (f x)) I" by (induct I rule: finite_induct) (auto simp: exp_add_commuting mult.commute)
lemma exp_divide_power_eq: fixes x :: "'a::{real_normed_field,banach}" assumes"n > 0" shows"exp (x / of_nat n) ^ n = exp x" using assms proof (induction n arbitrary: x) case (Suc n) show ?case proof (cases "n = 0") case True thenshow ?thesis by simp next case False have [simp]: "1 + (of_nat n * of_nat n + of_nat n * 2) \ (0::'a)" using of_nat_eq_iff [of "1 + n * n + n * 2""0"] by simp from False have [simp]: "x * of_nat n / (1 + of_nat n) / of_nat n = x / (1 + of_nat n)" by simp have [simp]: "x / (1 + of_nat n) + x * of_nat n / (1 + of_nat n) = x" using of_nat_neq_0 by (auto simp add: field_split_simps) show ?thesis using Suc.IH [of "x * of_nat n / (1 + of_nat n)"] False by (simp add: exp_add [symmetric]) qed qed simp
lemma exp_power_int: fixes x :: "'a::{real_normed_field,banach}" shows"exp x powi n = exp (of_int n * x)" proof (cases "n \ 0") case True have"exp x powi n = exp x ^ nat n" using True by (simp add: power_int_def) thus ?thesis using True by (subst (asm) exp_of_nat_mult [symmetric]) auto next case False have"exp x powi n = inverse (exp x ^ nat (-n))" using False by (simp add: power_int_def field_simps) alsohave"exp x ^ nat (-n) = exp (of_nat (nat (-n)) * x)" using False by (subst exp_of_nat_mult) auto alsohave"inverse \ = exp (-(of_nat (nat (-n)) * x))" by (subst exp_minus) (auto simp: field_simps) alsohave"-(of_nat (nat (-n)) * x) = of_int n * x" using False by simp finallyshow ?thesis . qed
subsubsection \<open>Properties of the Exponential Function on Reals\<close>
text\<open>Comparisons of \<^term>\<open>exp x\<close> with zero.\<close>
text\<open>Proof: because every exponential can be seen as a square.\<close> lemma exp_ge_zero [simp]: "0 \ exp x" for x :: real proof - have"0 \ exp (x/2) * exp (x/2)" by simp thenshow ?thesis by (simp add: exp_add [symmetric]) qed
lemma exp_gt_zero [simp]: "0 < exp x" for x :: real by (simp add: order_less_le)
lemma not_exp_less_zero [simp]: "\ exp x < 0" for x :: real by (simp add: not_less)
lemma not_exp_le_zero [simp]: "\ exp x \ 0" for x :: real by (simp add: not_le)
lemma abs_exp_cancel [simp]: "\exp x\ = exp x" for x :: real by simp
text\<open>Strict monotonicity of exponential.\<close>
lemma exp_ge_add_one_self_aux: fixes x :: real assumes"0 \ x" shows"1 + x \ exp x" 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) alsohave"\ \ (\n. inverse (fact n) * x^n)" using\<open>0 < x\<close> by (auto simp add: zero_le_mult_iff intro: sum_le_suminf [OF summable_exp]) finallyshow"1 + x \ exp x" by (simp add: exp_def) qed auto
lemma exp_gt_one: "0 < x \ 1 < exp x" for x :: real proof - assume x: "0 < x" thenhave"1 < 1 + x"by simp alsofrom x have"1 + x \ exp x" by (simp add: exp_ge_add_one_self_aux) finallyshow ?thesis . qed
lemma exp_less_mono: fixes x y :: real assumes"x < y" shows"exp x < exp y" proof - from\<open>x < y\<close> have "0 < y - x" by simp thenhave"1 < exp (y - x)"by (rule exp_gt_one) thenhave"1 < exp y / exp x"by (simp only: exp_diff) thenshow"exp x < exp y"by simp qed
lemma exp_less_cancel: "exp x < exp y \ x < y" for x y :: real unfolding linorder_not_le [symmetric] by (auto simp: order_le_less exp_less_mono)
lemma exp_less_cancel_iff [iff]: "exp x < exp y \ x < y" for x y :: real by (auto intro: exp_less_mono exp_less_cancel)
lemma exp_le_cancel_iff [iff]: "exp x \ exp y \ x \ y" for x y :: real by (auto simp: linorder_not_less [symmetric])
lemma exp_mono: fixes x y :: real assumes"x \ y" shows"exp x \ exp y" using assms exp_le_cancel_iff by fastforce
lemma exp_minus': "exp (-x) = 1 / (exp x)" for x :: "'a::{real_normed_field,banach}" by (simp add: exp_minus inverse_eq_divide)
lemma exp_inj_iff [iff]: "exp x = exp y \ x = y" for x y :: real by (simp add: order_eq_iff)
text\<open>Comparisons of \<^term>\<open>exp x\<close> with one.\<close>
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.