src/HOL/Lim.thy
changeset 44233 aa74ce315bae
parent 44218 f0e442e24816
child 44251 d101ed3177b6
equal deleted inserted replaced
44229:7e3a026f014f 44233:aa74ce315bae
   319 
   319 
   320 lemma (in bounded_linear) LIM:
   320 lemma (in bounded_linear) LIM:
   321   "g -- a --> l \<Longrightarrow> (\<lambda>x. f (g x)) -- a --> f l"
   321   "g -- a --> l \<Longrightarrow> (\<lambda>x. f (g x)) -- a --> f l"
   322 by (rule tendsto)
   322 by (rule tendsto)
   323 
   323 
   324 lemma (in bounded_linear) cont: "f -- a --> f a"
       
   325 by (rule LIM [OF LIM_ident])
       
   326 
       
   327 lemma (in bounded_linear) LIM_zero:
   324 lemma (in bounded_linear) LIM_zero:
   328   "g -- a --> 0 \<Longrightarrow> (\<lambda>x. f (g x)) -- a --> 0"
   325   "g -- a --> 0 \<Longrightarrow> (\<lambda>x. f (g x)) -- a --> 0"
   329   by (rule tendsto_zero)
   326   by (rule tendsto_zero)
   330 
   327 
   331 text {* Bounded Bilinear Operators *}
   328 text {* Bounded Bilinear Operators *}
   399   unfolding isCont_def by (rule LIM_ident)
   396   unfolding isCont_def by (rule LIM_ident)
   400 
   397 
   401 lemma isCont_const [simp]: "isCont (\<lambda>x. k) a"
   398 lemma isCont_const [simp]: "isCont (\<lambda>x. k) a"
   402   unfolding isCont_def by (rule LIM_const)
   399   unfolding isCont_def by (rule LIM_const)
   403 
   400 
   404 lemma isCont_norm:
   401 lemma isCont_norm [simp]:
   405   fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
   402   fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
   406   shows "isCont f a \<Longrightarrow> isCont (\<lambda>x. norm (f x)) a"
   403   shows "isCont f a \<Longrightarrow> isCont (\<lambda>x. norm (f x)) a"
   407   unfolding isCont_def by (rule LIM_norm)
   404   unfolding isCont_def by (rule LIM_norm)
   408 
   405 
   409 lemma isCont_rabs: "isCont f a \<Longrightarrow> isCont (\<lambda>x. \<bar>f x :: real\<bar>) a"
   406 lemma isCont_rabs [simp]:
       
   407   fixes f :: "'a::topological_space \<Rightarrow> real"
       
   408   shows "isCont f a \<Longrightarrow> isCont (\<lambda>x. \<bar>f x\<bar>) a"
   410   unfolding isCont_def by (rule LIM_rabs)
   409   unfolding isCont_def by (rule LIM_rabs)
   411 
   410 
   412 lemma isCont_add:
   411 lemma isCont_add [simp]:
   413   fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
   412   fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
   414   shows "\<lbrakk>isCont f a; isCont g a\<rbrakk> \<Longrightarrow> isCont (\<lambda>x. f x + g x) a"
   413   shows "\<lbrakk>isCont f a; isCont g a\<rbrakk> \<Longrightarrow> isCont (\<lambda>x. f x + g x) a"
   415   unfolding isCont_def by (rule LIM_add)
   414   unfolding isCont_def by (rule LIM_add)
   416 
   415 
   417 lemma isCont_minus:
   416 lemma isCont_minus [simp]:
   418   fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
   417   fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
   419   shows "isCont f a \<Longrightarrow> isCont (\<lambda>x. - f x) a"
   418   shows "isCont f a \<Longrightarrow> isCont (\<lambda>x. - f x) a"
   420   unfolding isCont_def by (rule LIM_minus)
   419   unfolding isCont_def by (rule LIM_minus)
   421 
   420 
   422 lemma isCont_diff:
   421 lemma isCont_diff [simp]:
   423   fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
   422   fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
   424   shows "\<lbrakk>isCont f a; isCont g a\<rbrakk> \<Longrightarrow> isCont (\<lambda>x. f x - g x) a"
   423   shows "\<lbrakk>isCont f a; isCont g a\<rbrakk> \<Longrightarrow> isCont (\<lambda>x. f x - g x) a"
   425   unfolding isCont_def by (rule LIM_diff)
   424   unfolding isCont_def by (rule LIM_diff)
   426 
   425 
   427 lemma isCont_mult:
   426 lemma isCont_mult [simp]:
   428   fixes f g :: "'a::topological_space \<Rightarrow> 'b::real_normed_algebra"
   427   fixes f g :: "'a::topological_space \<Rightarrow> 'b::real_normed_algebra"
   429   shows "\<lbrakk>isCont f a; isCont g a\<rbrakk> \<Longrightarrow> isCont (\<lambda>x. f x * g x) a"
   428   shows "\<lbrakk>isCont f a; isCont g a\<rbrakk> \<Longrightarrow> isCont (\<lambda>x. f x * g x) a"
   430   unfolding isCont_def by (rule LIM_mult)
   429   unfolding isCont_def by (rule LIM_mult)
   431 
   430 
   432 lemma isCont_inverse:
   431 lemma isCont_inverse [simp]:
   433   fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_div_algebra"
   432   fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_div_algebra"
   434   shows "\<lbrakk>isCont f a; f a \<noteq> 0\<rbrakk> \<Longrightarrow> isCont (\<lambda>x. inverse (f x)) a"
   433   shows "\<lbrakk>isCont f a; f a \<noteq> 0\<rbrakk> \<Longrightarrow> isCont (\<lambda>x. inverse (f x)) a"
   435   unfolding isCont_def by (rule LIM_inverse)
   434   unfolding isCont_def by (rule LIM_inverse)
       
   435 
       
   436 lemma isCont_divide [simp]:
       
   437   fixes f g :: "'a::topological_space \<Rightarrow> 'b::real_normed_field"
       
   438   shows "\<lbrakk>isCont f a; isCont g a; g a \<noteq> 0\<rbrakk> \<Longrightarrow> isCont (\<lambda>x. f x / g x) a"
       
   439   unfolding isCont_def by (rule tendsto_divide)
   436 
   440 
   437 lemma isCont_LIM_compose:
   441 lemma isCont_LIM_compose:
   438   "\<lbrakk>isCont g l; f -- a --> l\<rbrakk> \<Longrightarrow> (\<lambda>x. g (f x)) -- a --> g l"
   442   "\<lbrakk>isCont g l; f -- a --> l\<rbrakk> \<Longrightarrow> (\<lambda>x. g (f x)) -- a --> g l"
   439   unfolding isCont_def by (rule LIM_compose)
   443   unfolding isCont_def by (rule LIM_compose)
   440 
   444 
   457   unfolding isCont_def by (rule LIM_compose)
   461   unfolding isCont_def by (rule LIM_compose)
   458 
   462 
   459 lemma isCont_o: "\<lbrakk>isCont f a; isCont g (f a)\<rbrakk> \<Longrightarrow> isCont (g o f) a"
   463 lemma isCont_o: "\<lbrakk>isCont f a; isCont g (f a)\<rbrakk> \<Longrightarrow> isCont (g o f) a"
   460   unfolding o_def by (rule isCont_o2)
   464   unfolding o_def by (rule isCont_o2)
   461 
   465 
   462 lemma (in bounded_linear) isCont: "isCont f a"
   466 lemma (in bounded_linear) isCont:
   463   unfolding isCont_def by (rule cont)
   467   "isCont g a \<Longrightarrow> isCont (\<lambda>x. f (g x)) a"
       
   468   unfolding isCont_def by (rule LIM)
   464 
   469 
   465 lemma (in bounded_bilinear) isCont:
   470 lemma (in bounded_bilinear) isCont:
   466   "\<lbrakk>isCont f a; isCont g a\<rbrakk> \<Longrightarrow> isCont (\<lambda>x. f x ** g x) a"
   471   "\<lbrakk>isCont f a; isCont g a\<rbrakk> \<Longrightarrow> isCont (\<lambda>x. f x ** g x) a"
   467   unfolding isCont_def by (rule LIM)
   472   unfolding isCont_def by (rule LIM)
   468 
   473 
   469 lemmas isCont_scaleR = scaleR.isCont
   474 lemmas isCont_scaleR [simp] = scaleR.isCont
   470 
   475 
   471 lemma isCont_of_real:
   476 lemma isCont_of_real [simp]:
   472   "isCont f a \<Longrightarrow> isCont (\<lambda>x. of_real (f x)::'b::real_normed_algebra_1) a"
   477   "isCont f a \<Longrightarrow> isCont (\<lambda>x. of_real (f x)::'b::real_normed_algebra_1) a"
   473   unfolding isCont_def by (rule LIM_of_real)
   478   by (rule of_real.isCont)
   474 
   479 
   475 lemma isCont_power:
   480 lemma isCont_power [simp]:
   476   fixes f :: "'a::topological_space \<Rightarrow> 'b::{power,real_normed_algebra}"
   481   fixes f :: "'a::topological_space \<Rightarrow> 'b::{power,real_normed_algebra}"
   477   shows "isCont f a \<Longrightarrow> isCont (\<lambda>x. f x ^ n) a"
   482   shows "isCont f a \<Longrightarrow> isCont (\<lambda>x. f x ^ n) a"
   478   unfolding isCont_def by (rule LIM_power)
   483   unfolding isCont_def by (rule LIM_power)
   479 
   484 
   480 lemma isCont_sgn:
   485 lemma isCont_sgn [simp]:
   481   fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
   486   fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
   482   shows "\<lbrakk>isCont f a; f a \<noteq> 0\<rbrakk> \<Longrightarrow> isCont (\<lambda>x. sgn (f x)) a"
   487   shows "\<lbrakk>isCont f a; f a \<noteq> 0\<rbrakk> \<Longrightarrow> isCont (\<lambda>x. sgn (f x)) a"
   483   unfolding isCont_def by (rule LIM_sgn)
   488   unfolding isCont_def by (rule LIM_sgn)
   484 
   489 
   485 lemma isCont_abs [simp]: "isCont abs (a::real)"
   490 lemma isCont_setsum [simp]:
   486 by (rule isCont_rabs [OF isCont_ident])
       
   487 
       
   488 lemma isCont_setsum:
       
   489   fixes f :: "'a \<Rightarrow> 'b::topological_space \<Rightarrow> 'c::real_normed_vector"
   491   fixes f :: "'a \<Rightarrow> 'b::topological_space \<Rightarrow> 'c::real_normed_vector"
   490   fixes A :: "'a set" assumes "finite A"
   492   fixes A :: "'a set"
   491   shows "\<forall> i \<in> A. isCont (f i) x \<Longrightarrow> isCont (\<lambda> x. \<Sum> i \<in> A. f i x) x"
   493   shows "\<forall>i\<in>A. isCont (f i) a \<Longrightarrow> isCont (\<lambda>x. \<Sum>i\<in>A. f i x) a"
   492   unfolding isCont_def by (simp add: tendsto_setsum)
   494   unfolding isCont_def by (simp add: tendsto_setsum)
       
   495 
       
   496 lemmas isCont_intros =
       
   497   isCont_ident isCont_const isCont_norm isCont_rabs isCont_add isCont_minus
       
   498   isCont_diff isCont_mult isCont_inverse isCont_divide isCont_scaleR
       
   499   isCont_of_real isCont_power isCont_sgn isCont_setsum
   493 
   500 
   494 lemma LIM_less_bound: fixes f :: "real \<Rightarrow> real" assumes "b < x"
   501 lemma LIM_less_bound: fixes f :: "real \<Rightarrow> real" assumes "b < x"
   495   and all_le: "\<forall> x' \<in> { b <..< x}. 0 \<le> f x'" and isCont: "isCont f x"
   502   and all_le: "\<forall> x' \<in> { b <..< x}. 0 \<le> f x'" and isCont: "isCont f x"
   496   shows "0 \<le> f x"
   503   shows "0 \<le> f x"
   497 proof (rule ccontr)
   504 proof (rule ccontr)