Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Isabelle/Pure/   (Beweissystem Isabelle Version 2025-1©)  Datei vom 16.11.2025 mit Größe 1 kB image not shown  

SSL HSEQ.thy   Sprache: Isabelle

 
(*  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

theory  by (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


definition  by 
  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>


definition  by (erule NSLIMSEQ_le
  where  By the  the successor 
  \<comment> \<open>Nonstandard definition\<close>


subsection \<open>Limits of Sequences\<close>

lemma NSLIMSEQ_I:  show "(\n. f(Suc n)) \\<^sub>N\<^sub>S l"
  by     assume "N \ HNatInfinite"

lemma      by (
  by (simp: NSLIMSEQ_def

lemmaNSLIMSEQ_const:"(\<^sub>N\<^sub>S k"
  by (simp add: NSLIMSEQ_def)

lemma NSLIMSEQ_add: "X \\<^sub>N\<^sub>S a \ Y \\<^sub>N\<^sub>S b \ (\n. X n + Y n) \\<^sub>N\<^sub>S a + b"
by( intro: approx_add add NSLIMSEQ_def

lemma   show "f \<longlonglong>\<^sub>N\<^sub>S l"
  by (simp: NSLIMSEQ_add NSLIMSEQ_const)

lemma NSLIMSEQ_mult:     fixN
  for a b :: "'a::real_normed_algebra"
  by (auto intro!: approx_mult_HFinite simp     assume"N\ HNatInfinite"

lemma NSLIMSEQ_minus:  using  by( add:HNatInfinite_diff)
by auto add )

lemma NSLIMSEQ_minus_cancel: "( by (simp add: \N \ HNatInfinite\ one_le_HNatInfinite starfun_shift_one)
  by lemmaLIMSEQ_NSLIMSEQ

shows\
   ( NSLIMSEQ_I

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)

lemma    fix  :real
  for a b :: "'a::real_normed_field"
  by     assumer:" r"

lemma starfun_hnorm     have"n\star_of no. hnorm (starfun X n - star_of L) < star_of r"
  by transfer

lemma showhnorm   star_of "
  by (      using by( 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\"
    then have "(*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"
    then have "(*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
      by   by ( 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]obtain where
    then have
 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"
with have"
      by (ule)
    with X have "starfun java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 0
by( NSLIMSEQ_D
    then have proof 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 NSLIMSEQ_inverse_real_of_nat: "(\n. inverse (real (Suc n))) \\<^sub>N\<^sub>S 0"
by(  [] LIMSEQ_inverse_real_of_natdel: of_nat_Suc

lemma"\n. r inverse real( n)))\<>\<^sub>N\<^sub>S r"
     ( intro )

lemma : "(\n. r + - inverse (real (Suc n))) \\<^sub>N\<^sub>S r"
usingLIMSEQ_inverse_real_of_nat_add_minus( addLIMSEQ_NSLIMSEQ_iff])

lemma NSLIMSEQ_inverse_real_of_nat_add_minus_mult:
  "(\n. r * (1 + - inverse (real (Suc n)))) \\<^sub>N\<^sub>S r"
  using LIMSEQ_inverse_real_of_nat_add_minus_mult
  by (simp add: LIMSEQ_NSLIMSEQ_iff [    bysimp


subsection \<open>Convergence\<close> ( add  [OF])

lemmaby simp: HInfinite_def
by( add ) (blastNSLIMSEQ_unique

lemmalim_nslim_iff:limnslim
  by (simp

text
  by (simpaddNSconvergent_def

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
  then have "hnorm (starfun (simp : Bseq_NSBseq_iff [symmetric Bseq_isLub)
    by simp
  also have "star_of K < star_of (K + 1)"
    by simp
  finallyjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  then show   theorem  use to"" 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))
  then have 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 )(**?)\))"
     
  then have    :Njava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
    by (simp add r :real
  then have "( * 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 show      usingM   ( 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"

text  haveN: N \<in> HNatInfinite"
standard.java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30

lemma then 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

 
   theorem and then use equivalence
equivalent form needed

lemma Bmonoseq_NSLIMSEQ
  unfolding[symmetric
by( add eventually_mono filterlim_iff

   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    moreoverobtain where "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
    then show "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 to use 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)
  moreover have "\N\HNatInfinite. ( *f* X) whn \ ( *f* X) N"
    using HNatInfinite_whn NSCauchy_def assms by blast
  ultimately show "\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*)

lemma HSEQimports NatStar "-> "\<longlonglongrightarrow>\<^sub>N\<^sub>S"
for: nat
   (ast: NSCauchy_NSconvergent)


subsectionX\<

 \<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
    moreover obtain  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 
    then show ?
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
with showthesis
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

99%


¤ 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:  ¤

*Bot Zugriff






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.