src/HOL/NSA/HLim.thy
changeset 61976 3a27957ac658
parent 61975 b4b11391c676
child 61981 1b5845c62fa0
equal deleted inserted replaced
61975:b4b11391c676 61976:3a27957ac658
   134 by (simp add: NSLIM_def)
   134 by (simp add: NSLIM_def)
   135 
   135 
   136 subsubsection \<open>Equivalence of @{term filterlim} and @{term NSLIM}\<close>
   136 subsubsection \<open>Equivalence of @{term filterlim} and @{term NSLIM}\<close>
   137 
   137 
   138 lemma LIM_NSLIM:
   138 lemma LIM_NSLIM:
   139   assumes f: "f -- a --> L" shows "f \<midarrow>a\<rightarrow>\<^sub>N\<^sub>S L"
   139   assumes f: "f \<midarrow>a\<rightarrow> L" shows "f \<midarrow>a\<rightarrow>\<^sub>N\<^sub>S L"
   140 proof (rule NSLIM_I)
   140 proof (rule NSLIM_I)
   141   fix x
   141   fix x
   142   assume neq: "x \<noteq> star_of a"
   142   assume neq: "x \<noteq> star_of a"
   143   assume approx: "x \<approx> star_of a"
   143   assume approx: "x \<approx> star_of a"
   144   have "starfun f x - star_of L \<in> Infinitesimal"
   144   have "starfun f x - star_of L \<in> Infinitesimal"
   162   thus "starfun f x \<approx> star_of L"
   162   thus "starfun f x \<approx> star_of L"
   163     by (unfold approx_def)
   163     by (unfold approx_def)
   164 qed
   164 qed
   165 
   165 
   166 lemma NSLIM_LIM:
   166 lemma NSLIM_LIM:
   167   assumes f: "f \<midarrow>a\<rightarrow>\<^sub>N\<^sub>S L" shows "f -- a --> L"
   167   assumes f: "f \<midarrow>a\<rightarrow>\<^sub>N\<^sub>S L" shows "f \<midarrow>a\<rightarrow> L"
   168 proof (rule LIM_I)
   168 proof (rule LIM_I)
   169   fix r::real assume r: "0 < r"
   169   fix r::real assume r: "0 < r"
   170   have "\<exists>s>0. \<forall>x. x \<noteq> star_of a \<and> hnorm (x - star_of a) < s
   170   have "\<exists>s>0. \<forall>x. x \<noteq> star_of a \<and> hnorm (x - star_of a) < s
   171         \<longrightarrow> hnorm (starfun f x - star_of L) < star_of r"
   171         \<longrightarrow> hnorm (starfun f x - star_of L) < star_of r"
   172   proof (rule exI, safe)
   172   proof (rule exI, safe)
   188   qed
   188   qed
   189   thus "\<exists>s>0. \<forall>x. x \<noteq> a \<and> norm (x - a) < s \<longrightarrow> norm (f x - L) < r"
   189   thus "\<exists>s>0. \<forall>x. x \<noteq> a \<and> norm (x - a) < s \<longrightarrow> norm (f x - L) < r"
   190     by transfer
   190     by transfer
   191 qed
   191 qed
   192 
   192 
   193 theorem LIM_NSLIM_iff: "(f -- x --> L) = (f \<midarrow>x\<rightarrow>\<^sub>N\<^sub>S L)"
   193 theorem LIM_NSLIM_iff: "(f \<midarrow>x\<rightarrow> L) = (f \<midarrow>x\<rightarrow>\<^sub>N\<^sub>S L)"
   194 by (blast intro: LIM_NSLIM NSLIM_LIM)
   194 by (blast intro: LIM_NSLIM NSLIM_LIM)
   195 
   195 
   196 
   196 
   197 subsection \<open>Continuity\<close>
   197 subsection \<open>Continuity\<close>
   198 
   198 
   213 lemma isNSCont_NSLIM_iff: "(isNSCont f a) = (f \<midarrow>a\<rightarrow>\<^sub>N\<^sub>S (f a))"
   213 lemma isNSCont_NSLIM_iff: "(isNSCont f a) = (f \<midarrow>a\<rightarrow>\<^sub>N\<^sub>S (f a))"
   214 by (blast intro: isNSCont_NSLIM NSLIM_isNSCont)
   214 by (blast intro: isNSCont_NSLIM NSLIM_isNSCont)
   215 
   215 
   216 text\<open>Hence, NS continuity can be given
   216 text\<open>Hence, NS continuity can be given
   217   in terms of standard limit\<close>
   217   in terms of standard limit\<close>
   218 lemma isNSCont_LIM_iff: "(isNSCont f a) = (f -- a --> (f a))"
   218 lemma isNSCont_LIM_iff: "(isNSCont f a) = (f \<midarrow>a\<rightarrow> (f a))"
   219 by (simp add: LIM_NSLIM_iff isNSCont_NSLIM_iff)
   219 by (simp add: LIM_NSLIM_iff isNSCont_NSLIM_iff)
   220 
   220 
   221 text\<open>Moreover, it's trivial now that NS continuity
   221 text\<open>Moreover, it's trivial now that NS continuity
   222   is equivalent to standard continuity\<close>
   222   is equivalent to standard continuity\<close>
   223 lemma isNSCont_isCont_iff: "(isNSCont f a) = (isCont f a)"
   223 lemma isNSCont_isCont_iff: "(isNSCont f a) = (isCont f a)"