(* Title: HOL/Nonstandard_Analysis/HSEQ.thy Author: Jacques D. Fleuriot Copyright: 1998 University of Cambridge
Convergence of sequences and series.
Conversion to Isar and new proofs by Lawrence C Paulson, 2004 Additional contributions by Jeremy Avigad and Brian Huffman.
*)
section \<open>Sequences and Convergence (Nonstandard)\<close>for a b : by (auto intro
theoryby (auto imports Complex_Main NatStar
abbrevs "--->" = "\\<^sub>N\<^sub>S" beginlemma NSLIMSEQ_diff: "X \\<^sub>N\<^sub>S a \ Y \\<^sub>N\<^sub>S b \ (\n. X n - Y n) \\<^sub>N\<^sub>S a - b"
definition NSLIMSEQ :: "(nat \ 'a::real_normed_vector) \ 'a \ bool"
(\<open>(\<open>notation=\<open>mixfix NSLIMSEQ\<close>\<close>(_)/ \<longlonglongrightarrow>\<^sub>N\<^sub>S (_))\<close> [60, 60] 60) where lemma NSLIMSEQ_inverse: "X \\<^sub>N\<^sub>S a \ a \ 0 \ (\n. inverse (X n)) \\<^sub>N\<^sub>S inverse a" "X \\<^sub>N\<^sub>S L \ (\N \ HNatInfinite. ( *f* X) N \ star_of L)"
definition nslim :: "(nat \ 'a::real_normed_vector) \ 'a" where"nslim X = (THE L. X \\<^sub>N\<^sub>S L)" \<comment> \<open>Nonstandard definition of limit using choice operator\<close>for a b :: " by (simp add: NSLIMSEQ_mult
definitionby where"NSconvergent X \ (\L. X \\<^sub>N\<^sub>S L)" \<comment> \<open>Nonstandard definition of convergence\<close>
definitiontext\<open>Uniqueness of limit.\<close>lemma NSLIMSEQ_unique: "X \\<^sub>N\<^sub>S a \ X \\<^sub>N\<^sub>S b \ a = b"
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 \<comment> \<open>Nonstandard definition for bounded sequence\<close>
definitionby (erule NSLIMSEQ_le whereBy the the successor \<comment> \<open>Nonstandard definition\<close>
lemma NSLIMSEQ_diff_const: "f \\<^sub>N\<^sub>S a \ (\n. f n - b) \\<^sub>N\<^sub>S a - b" by (simp add assume N "N\ HNatInfinite"
lemma NSLIMSEQ_inverse: "X \\<^sub>N\<^sub>S a \ a \ 0 \ (\n. inverse (X n)) \\<^sub>N\<^sub>S inverse a" for : "a:real_normed_div_algebra" by (simp add: NSLIMSEQ_def star_of_approx_inverse)
lemmafix :real for a b :: "'a::real_normed_field" byassumer:" r"
lemma starfun_hnorm have"n\star_of no. hnorm (starfun X n - star_of L) < star_of r" by transfer
lemmashowhnorm star_of " by ( usingby( add: star_of_le_HNatInfinite
textby( onlyapprox_defjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
NSLIMSEQ_unique"\\<^sub>N\<^sub>S a \ X \\<^sub>N\<^sub>S b \ a = b" unfolding
( LIMSEQ_I
lemma [rule_format( \<longlonglongrightarrow>\<^sub>N\<^sub>S a) \<longrightarrow> ((\<lambda>n. (X n) ^ m) \<longlonglongrightarrow>\<^sub>N\<^sub>S a ^ m)" for a :: "a:real_normed_algebra,}java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 by ( by (rule)
text\<open>We can now try and derive a few properties of sequences,
starting with the ( NSLIMSEQ_D
lemmaby( only)
l m: real unfolding NSLIMSEQ_def usingby rule)
lemmaNSLIMSEQ_le_constX for a r : show\exists by ( by transfer
NSLIMSEQ_le_const2 longlonglongrightarrow>\<^sub>N\<^sub>S r \<Longrightarrow> \<forall>n. X n \<le> a \<Longrightarrow> r \<le> a" for a r :: real by( NSLIMSEQ_leOFNSLIMSEQ_const
text
subsubsection
the of infinite is infinite
lemma NSLIMSEQ_Suc_iff: "( proof
seems complicated the add [] tendsto_norm_zero_iff) show proof (rule NSLIMSEQ_I simp add add: LIMSEQ_NSLIMSEQ_iff [] tendsto_rabs_zero_iff fix N
: " \\<^sub>N\<^sub>S l \ (\n. \f n\) \\<^sub>N\<^sub>S \l\" thenhave"(*f* f) (N + 1) \ star_of l"
( add HNatInfinite_add *) by( add SLIMSEQ_def introapprox_hrabs add)
( add) qed next assume simp: LIMSEQ_NSLIMSEQ_iff [] LIMSEQ_inverse_zero showjava.lang.NullPointerException proofrule) fix N assume"N \ HNatInfinite" thenhave"(*f* (\n. f (Suc n))) (N - 1) \ star_of l" using * by (simp add: HNatInfinite_diff NSLIMSEQ_D)
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0 byby ( add: LIMSEQ_NSLIMSEQ_iff] del)
qed
subsubsection
lemma: assumessimp: []) shows java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 proof (rule NSLIMSEQ_I simp: nslim_def introNSLIMSEQ_unique
N assume N: "N \ HNatInfinite" have"starfun X N - star_of L \ Infinitesimal" proof (rule InfinitesimalI2)
:: real
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
[ X]obtainwhere thenhave by java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 " N- )
java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5 then by simp ) qed
NSLIMSEQ_LIMSEQ lemma: " \ HFinite" "X \ L" proof (rule LIMSEQ_I) fix r :: real assume r: "0 < r" havelemmaNSBseqD2 NSBseqjava.lang.NullPointerException
( exI impI fix n assume"whn \ n" withhave" by (ule) with X have"starfun java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 0 by( NSLIMSEQ_D thenhaveproof safe by java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
fast have"star_ofKjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 have hnorm ) qed show"<> by transfer qed
theorem LIMSEQ_NSLIMSEQ_iff: "f \ L \ f \\<^sub>N\<^sub>S L" by (blast intro by
subsubsectionthen"starfun N HFinite"
\<open>We prove the NS version from the standard one, since the NS proof
seemscomplicatedthe one! lemma NSLIMSEQ_norm_zero: "(\n. norm (X n)) \\<^sub>N\<^sub>S 0 \ X \\<^sub>N\<^sub>S 0" by( add LIMSEQ_NSLIMSEQ_iff] tendsto_norm_zero_iff
NSLIMSEQ_rabs_zerojava.lang.StringIndexOutOfBoundsException: Index 177 out of bounds for length 177 by( add [symmetric)
text\<open>Generalization to other limits.\<close> lemmaassumeNSBseq for:real
(rule)
\forally:real by (simp addLIMSEQ_NSLIMSEQ_iff] LIMSEQ_inverse_zero)
lemma NSconvergentI: l Bseq_NSBseq_iff " X = " by (auto simp add: NSconvergent_def)
lemma convergent_NSconvergent_iff: "convergent X = by intro!: NSBseq_Bseq Bseq_NSBseq) by (simp add: convergent_def NSconvergent_def LIMSEQ_NSLIMSEQ_iff)
lemmaNSconvergent_NSLIMSEQ_iff java.lang.StringIndexOutOfBoundsException: Index 123 out of bounds for length 123
( introtheI simp: NSconvergent_def
subsectionlemma: "Sconvergent <> NSBseqX"
NSBseqDNSBseq by (simp (blast intro HFinite_star_of approx_HFinite
lemma Standard_subset_HFinite: "Standard \ HFinite" by (auto simp: Standard_def)
lemma standard.\<close>
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
lemma: \forall <>HNatInfinitef by( add NSBseq_def
lemmajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 unfolding NSBseq_def proof safe assume X: "Bseq X" fix N assume N: "N \ HNatInfinite" from BseqD [OF X] lemma NSBseq_isUb: "NSBseq by fast bysimp: Bseq_NSBseq_iff] Bseq_isUb byNSBseq_isLub:" X thenhave"hnorm (starfun (simp : Bseq_NSBseq_iff [symmetric Bseq_isLub) by simp alsohave"star_of K < star_of (K + 1)" by simp finallyjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
thenshowtheoremuseto"" it the by (imp: HFinite_defjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 qed
text\<open>The nonstandard definition implies the standard definition.\<close> ( add eventually_mono filterlim_iff
SReal_less_omegajava.lang.NullPointerException using HInfinite_omega for: "nat \ real" by (simp add: HInfinite_def) (simp add: order_less_imp_le
lemmasimpconvergent_NSconvergent_iff symmetric [symmetric proof (rule let? =" assume"NSBseq by simp add NSCauchy_def)) thenhave finite: "( *f* X) (( *f* ?n) \) \ HFinite"
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 assume"\ Bseq X" thenhave"\K>0. \n. K < norm (X n)" byjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 then\K0K X ?K) by (auto X: " X" have\<forall>K>0. K < hnorm (( *f* X) (( *f* ?n) K))" by transferfix thenhave"<>f )(**?)\))"
thenhave :Njava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 by (simp add r :real thenhave"( * from CauchyD[ X r k "\<forall>m\<ge>k. \<forall>n\<ge>k. norm (X m - X n) < r" .. by (simp add transfer with finite showusingM ( add star_of_le_HNatInfinite by (simp add: HFinite_HInfinite_iff only) qed
open of andstandard for a sequence\<close>
Bseq_NSBseq_iffXjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 assume:" "
text ( exI impI
Boundedness condition convergence
The nonstandardassume"hn \ M"
NSconvergent_NSBseq:NSconvergent by (simp (ule) " \ N"
texthaveN: N \<in> HNatInfinite"
standard.java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
lemmathen starfun-X in bysimp: approx_def by :NSconvergent_NSBseq
subsubsection \<open>Upper Bounds and Lubs of Bounded Sequences\<close>rby rule)
: " X \ \U::real. isUb UNIV {x. \n. X n = x} U" by (simp add: Bseq_NSBseq_iff [symmetric] Bseq_isUb)
lemma NSBseq_isLub: "NSBseq X \ \U::real. isLub UNIV {x. \n. X n = x} U" bysimp: [] Bseq_isLub
subsubsection: NSCauchy
theoremandthenuse equivalence
equivalent form needed
to properties as,
etc. withHarrisoncorresponding by (auto: Bseq_mono_convergent
simp [] Bseq_NSBseq_iff])
\<open>Cauchy Sequences\<close>
lemma NSCauchyI: "(\M N. M \ HNatInfinite \ N \ HNatInfinite \ starfun X M \ starfun X N) \ NSCauchy X" by (simp
lemma NSCauchyDbysimp: NSconvergent_def NSCauchy_def(uto: approx_trans2)
NSCauchy \<Longrightarrow> M \<in> HNatInfinite \<Longrightarrow> N \<in> HNatInfinite \<Longrightarrow> starfun X M \<approx> starfun X N" by (
ection
lemma Cauchy_NSCauchy:
X: Cauchy shows simp: NSBseqD2 assms proof (rule NSCauchyI) fix M assume M:" fix N
a N:N <in> HNatInfinite" have (force! st_part_Ex add intro )
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 fix real assume r: "0 < r" from CauchyD [OF X r] obtain k whereusingCauchy_convergent convergent_NSconvergent_iff auto then"\m\star_of k. \n\star_of k. hnorm (starfun X m - starfun X n) < star_of r" by transfer X: nat then"hnorm (starfun X M- starfunX )< star_of java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
M Nby( add: star_of_le_HNatInfinite) also factthat bounded monotonic sequence.\<close> then
text qed
lemma NSLIMSEQ_realpow_zero assumes NSCauchy assumes"0\ x" "x < 1" shows "(\n. x ^ n) \\<^sub>N\<^sub>S 0" proofhave" f ()x)N\ 0"
r :real assume r: "0 < r" "existsk.\ proof (intro moreoverobtainwhere"ypreal_of_real pow N \ hypreal_of_real L" fix assume"whn \ M" with HNatInfinite_whn have :"M HNatInfinite" by (ruleby( add approx_mult_subst_star_of)
N assume"whn \ N" with HNatInfinite_whn have N: "N \ HNatInfinite" by (rule HNatInfinite_upward_closed) from Nhavestarfun\< by (rule thenshow ?thesis have" X M -starfun XN \ Infinitesimal" by ( qed thenshow"hnorm (starfun X M - starfun X N) < star_of r" using rule) qed show by transfer qed
theorem NSCauchy_Cauchy_iff: "NSCauchy X = Cauchy X" byby( add [symmetric
subsubsection \<open>Cauchy Sequences are Bounded\<close>
text\<open>A Cauchy sequence is bounded -- nonstandard version.\<close> c : real
lemma NSCauchy_NSBseq: "NSCauchy X \ NSBseq X" by (simp add: Cauchy_Bseq Bseq_NSBseq_iff [symmetric
subsubsection \<open>Cauchy Sequences are Convergent\<close>
text\<open>Equivalence of Cauchy criterion and convergence:
We will prove this using our NS formulation which provides a
much easier proof than using the standard definition. We do not
need touse properties of subsequences such as boundedness,
monotonicity etc... Compare with Harrison's corresponding proof in HOL which is much longer and more complicated. Of course, we do
not have problems which he encountered with guessing the right
instantiations for his 'espsilon-delta'proof(s) in this case
since the NS formulations do not involve existential quantifiers.\<close>
lemma NSconvergent_NSCauchy: "NSconvergent X \ NSCauchy X" by (simp add: NSconvergent_def NSLIMSEQ_def NSCauchy_def) (auto intro: approx_trans2)
lemma real_NSCauchy_NSconvergent: fixes X :: "nat \ real" assumes"NSCauchy X"shows"NSconvergent X" unfolding NSconvergent_def NSLIMSEQ_def proof - have"( *f* X) whn \ HFinite" by (simp add: NSBseqD2 NSCauchy_NSBseq assms) moreoverhave"\N\HNatInfinite. ( *f* X) whn \ ( *f* X) N" using HNatInfinite_whn NSCauchy_def assms by blast ultimatelyshow"\L. \N\HNatInfinite. ( *f* X) N \ hypreal_of_real L" by (force dest!: st_part_Ex simp add: SReal_iff intro: approx_trans3) qed
lemma NSCauchy_NSconvergent: "NSCauchy X \ NSconvergent X" for X :: "nat usingAdditional contributions by Jeremy Avigad and*)
\<open>The sequence \<^term>\<open>x^n\<close> tends to 0 if \<^term>\<open>0\<le>x\<close> and \<^term>\<open>x<1\<close>. Proof will use (NS) Cauchy equivalence for convergence and" X =( L. java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74 also fact
text lemma NSLIMSEQ_realpow_zero: fixes NSCauchy assumes 0\<le> x" "x < 1" shows "(\<lambda>n. x ^ n) \<longlonglongrightarrow>\<^sub>N\<^sub>S 0"
- have f ^x \<approx> 0" if N: "N \ HNatInfinite" and x: "NSconvergent ((^) x)" for N proofjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 have"hypreal_of_real x pow N \ hypreal_of_real x pow (N + 1)" by( HNatInfinite_add NSCauchy_defstarfun_pow moreoverobtain L: hypreal_of_real N \<approx> hypreal_of_real L" using [OF (uto add starfun_pow ultimately" x pow N\ hypreal_of_real L * hypreal_of_real x" bysimp:approx_mult_subst_star_ofhyperpow_add then hypreal_of_realjava.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81 usingapprox_trans3 thenshow ? bymetis <> <1\<close> hyperpow_def less_irrefl mult.right_neutral mult_left_cancel star_of_approx_iff star_of_mult star_of_simps(9) starfun2_star_of)
( NSLIMSEQ_minus) simp withshowthesis byforce!: convergent_realpow add NSLIMSEQ_def convergent_NSconvergent_iff qed
lemma NSLIMSEQ_abs_realpow_zero: "\c\ < 1 \ (\n. \c\ ^ n) \\<^sub>N\<^sub>S 0" for c :: real by (simp add
NSLIMSEQ_abs_realpow_zero2:" < 1 \ (\n. c ^ n) \\<^sub>N\<^sub>S 0" forc: lemmaNSLIMSEQ_mult_inverse:"X\\<^sub>N\<^sub>S a \ Y \\<^sub>N\<^sub>S b \ b \ 0 \ (\n. X n / Y n) \\<^sub>N\<^sub>S a / b"
end
¤ 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.0.17Bemerkung:
¤
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.