src/HOL/Lim.thy
changeset 44314 dbad46932536
parent 44312 471ff02a8574
child 44532 a2e9b39df938
     1.1 --- a/src/HOL/Lim.thy	Fri Aug 19 15:07:10 2011 -0700
     1.2 +++ b/src/HOL/Lim.thy	Fri Aug 19 15:54:43 2011 -0700
     1.3 @@ -81,32 +81,8 @@
     1.4    shows "(\<lambda>h. f (a + h)) -- 0 --> L \<Longrightarrow> f -- a --> L"
     1.5  by (drule_tac k="- a" in LIM_offset, simp)
     1.6  
     1.7 -lemma LIM_const [simp]: "(%x. k) -- x --> k"
     1.8 -by (rule tendsto_const)
     1.9 -
    1.10  lemma LIM_cong_limit: "\<lbrakk> f -- x --> L ; K = L \<rbrakk> \<Longrightarrow> f -- x --> K" by simp
    1.11  
    1.12 -lemma LIM_add:
    1.13 -  fixes f g :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
    1.14 -  assumes f: "f -- a --> L" and g: "g -- a --> M"
    1.15 -  shows "(\<lambda>x. f x + g x) -- a --> (L + M)"
    1.16 -using assms by (rule tendsto_add)
    1.17 -
    1.18 -lemma LIM_add_zero:
    1.19 -  fixes f g :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
    1.20 -  shows "\<lbrakk>f -- a --> 0; g -- a --> 0\<rbrakk> \<Longrightarrow> (\<lambda>x. f x + g x) -- a --> 0"
    1.21 -  by (rule tendsto_add_zero)
    1.22 -
    1.23 -lemma LIM_minus:
    1.24 -  fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
    1.25 -  shows "f -- a --> L \<Longrightarrow> (\<lambda>x. - f x) -- a --> - L"
    1.26 -by (rule tendsto_minus)
    1.27 -
    1.28 -lemma LIM_diff:
    1.29 -  fixes f g :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
    1.30 -  shows "\<lbrakk>f -- x --> l; g -- x --> m\<rbrakk> \<Longrightarrow> (\<lambda>x. f x - g x) -- x --> l - m"
    1.31 -by (rule tendsto_diff)
    1.32 -
    1.33  lemma LIM_zero:
    1.34    fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
    1.35    shows "f -- a --> l \<Longrightarrow> (\<lambda>x. f x - l) -- a --> 0"
    1.36 @@ -138,38 +114,6 @@
    1.37    by (rule metric_LIM_imp_LIM [OF f],
    1.38      simp add: dist_norm le)
    1.39  
    1.40 -lemma LIM_norm:
    1.41 -  fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
    1.42 -  shows "f -- a --> l \<Longrightarrow> (\<lambda>x. norm (f x)) -- a --> norm l"
    1.43 -by (rule tendsto_norm)
    1.44 -
    1.45 -lemma LIM_norm_zero:
    1.46 -  fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
    1.47 -  shows "f -- a --> 0 \<Longrightarrow> (\<lambda>x. norm (f x)) -- a --> 0"
    1.48 -by (rule tendsto_norm_zero)
    1.49 -
    1.50 -lemma LIM_norm_zero_cancel:
    1.51 -  fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
    1.52 -  shows "(\<lambda>x. norm (f x)) -- a --> 0 \<Longrightarrow> f -- a --> 0"
    1.53 -by (rule tendsto_norm_zero_cancel)
    1.54 -
    1.55 -lemma LIM_norm_zero_iff:
    1.56 -  fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
    1.57 -  shows "(\<lambda>x. norm (f x)) -- a --> 0 = f -- a --> 0"
    1.58 -by (rule tendsto_norm_zero_iff)
    1.59 -
    1.60 -lemma LIM_rabs: "f -- a --> (l::real) \<Longrightarrow> (\<lambda>x. \<bar>f x\<bar>) -- a --> \<bar>l\<bar>"
    1.61 -  by (rule tendsto_rabs)
    1.62 -
    1.63 -lemma LIM_rabs_zero: "f -- a --> (0::real) \<Longrightarrow> (\<lambda>x. \<bar>f x\<bar>) -- a --> 0"
    1.64 -  by (rule tendsto_rabs_zero)
    1.65 -
    1.66 -lemma LIM_rabs_zero_cancel: "(\<lambda>x. \<bar>f x\<bar>) -- a --> (0::real) \<Longrightarrow> f -- a --> 0"
    1.67 -  by (rule tendsto_rabs_zero_cancel)
    1.68 -
    1.69 -lemma LIM_rabs_zero_iff: "(\<lambda>x. \<bar>f x\<bar>) -- a --> (0::real) = f -- a --> 0"
    1.70 -  by (rule tendsto_rabs_zero_iff)
    1.71 -
    1.72  lemma trivial_limit_at:
    1.73    fixes a :: "'a::real_normed_algebra_1"
    1.74    shows "\<not> trivial_limit (at a)"  -- {* TODO: find a more appropriate class *}
    1.75 @@ -197,9 +141,6 @@
    1.76    shows "\<lbrakk>f -- a --> L; f -- a --> M\<rbrakk> \<Longrightarrow> L = M"
    1.77    using trivial_limit_at by (rule tendsto_unique)
    1.78  
    1.79 -lemma LIM_ident [simp]: "(\<lambda>x. x) -- a --> a"
    1.80 -by (rule tendsto_ident_at)
    1.81 -
    1.82  text{*Limits are equal for functions equal except at limit point*}
    1.83  lemma LIM_equal:
    1.84       "[| \<forall>x. x \<noteq> a --> (f x = g x) |] ==> (f -- a --> l) = (g -- a --> l)"
    1.85 @@ -229,12 +170,6 @@
    1.86    shows "g -- a --> l \<Longrightarrow> f -- a --> l"
    1.87  by (rule metric_LIM_equal2 [OF 1 2], simp_all add: dist_norm)
    1.88  
    1.89 -lemma LIM_compose:
    1.90 -  assumes g: "g -- l --> g l"
    1.91 -  assumes f: "f -- a --> l"
    1.92 -  shows "(\<lambda>x. g (f x)) -- a --> g l"
    1.93 -  using assms by (rule tendsto_compose)
    1.94 -
    1.95  lemma LIM_compose_eventually:
    1.96    assumes f: "f -- a --> b"
    1.97    assumes g: "g -- b --> c"
    1.98 @@ -247,8 +182,8 @@
    1.99    assumes g: "g -- b --> c"
   1.100    assumes inj: "\<exists>d>0. \<forall>x. x \<noteq> a \<and> dist x a < d \<longrightarrow> f x \<noteq> b"
   1.101    shows "(\<lambda>x. g (f x)) -- a --> c"
   1.102 -using f g inj [folded eventually_at]
   1.103 -by (rule LIM_compose_eventually)
   1.104 +  using g f inj [folded eventually_at]
   1.105 +  by (rule tendsto_compose_eventually)
   1.106  
   1.107  lemma LIM_compose2:
   1.108    fixes a :: "'a::real_normed_vector"
   1.109 @@ -259,7 +194,7 @@
   1.110  by (rule metric_LIM_compose2 [OF f g inj [folded dist_norm]])
   1.111  
   1.112  lemma LIM_o: "\<lbrakk>g -- l --> g l; f -- a --> l\<rbrakk> \<Longrightarrow> (g \<circ> f) -- a --> g l"
   1.113 -unfolding o_def by (rule LIM_compose)
   1.114 +  unfolding o_def by (rule tendsto_compose)
   1.115  
   1.116  lemma real_LIM_sandwich_zero:
   1.117    fixes f g :: "'a::topological_space \<Rightarrow> real"
   1.118 @@ -307,9 +242,6 @@
   1.119    "f -- a --> 0 \<Longrightarrow> (\<lambda>x. c ** f x) -- a --> 0"
   1.120    by (rule tendsto_right_zero)
   1.121  
   1.122 -lemmas LIM_mult =
   1.123 -  bounded_bilinear.LIM [OF bounded_bilinear_mult]
   1.124 -
   1.125  lemmas LIM_mult_zero =
   1.126    bounded_bilinear.LIM_prod_zero [OF bounded_bilinear_mult]
   1.127  
   1.128 @@ -319,32 +251,10 @@
   1.129  lemmas LIM_mult_right_zero =
   1.130    bounded_bilinear.LIM_right_zero [OF bounded_bilinear_mult]
   1.131  
   1.132 -lemmas LIM_scaleR =
   1.133 -  bounded_bilinear.LIM [OF bounded_bilinear_scaleR]
   1.134 -
   1.135 -lemmas LIM_of_real =
   1.136 -  bounded_linear.LIM [OF bounded_linear_of_real]
   1.137 -
   1.138 -lemma LIM_power:
   1.139 -  fixes f :: "'a::topological_space \<Rightarrow> 'b::{power,real_normed_algebra}"
   1.140 -  assumes f: "f -- a --> l"
   1.141 -  shows "(\<lambda>x. f x ^ n) -- a --> l ^ n"
   1.142 -  using assms by (rule tendsto_power)
   1.143 -
   1.144 -lemma LIM_inverse:
   1.145 -  fixes L :: "'a::real_normed_div_algebra"
   1.146 -  shows "\<lbrakk>f -- a --> L; L \<noteq> 0\<rbrakk> \<Longrightarrow> (\<lambda>x. inverse (f x)) -- a --> inverse L"
   1.147 -by (rule tendsto_inverse)
   1.148 -
   1.149  lemma LIM_inverse_fun:
   1.150    assumes a: "a \<noteq> (0::'a::real_normed_div_algebra)"
   1.151    shows "inverse -- a --> inverse a"
   1.152 -by (rule LIM_inverse [OF LIM_ident a])
   1.153 -
   1.154 -lemma LIM_sgn:
   1.155 -  fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
   1.156 -  shows "\<lbrakk>f -- a --> l; l \<noteq> 0\<rbrakk> \<Longrightarrow> (\<lambda>x. sgn (f x)) -- a --> sgn l"
   1.157 -  by (rule tendsto_sgn)
   1.158 +  by (rule tendsto_inverse [OF tendsto_ident_at a])
   1.159  
   1.160  
   1.161  subsection {* Continuity *}
   1.162 @@ -360,45 +270,45 @@
   1.163  by (simp add: isCont_def LIM_isCont_iff)
   1.164  
   1.165  lemma isCont_ident [simp]: "isCont (\<lambda>x. x) a"
   1.166 -  unfolding isCont_def by (rule LIM_ident)
   1.167 +  unfolding isCont_def by (rule tendsto_ident_at)
   1.168  
   1.169  lemma isCont_const [simp]: "isCont (\<lambda>x. k) a"
   1.170 -  unfolding isCont_def by (rule LIM_const)
   1.171 +  unfolding isCont_def by (rule tendsto_const)
   1.172  
   1.173  lemma isCont_norm [simp]:
   1.174    fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
   1.175    shows "isCont f a \<Longrightarrow> isCont (\<lambda>x. norm (f x)) a"
   1.176 -  unfolding isCont_def by (rule LIM_norm)
   1.177 +  unfolding isCont_def by (rule tendsto_norm)
   1.178  
   1.179  lemma isCont_rabs [simp]:
   1.180    fixes f :: "'a::topological_space \<Rightarrow> real"
   1.181    shows "isCont f a \<Longrightarrow> isCont (\<lambda>x. \<bar>f x\<bar>) a"
   1.182 -  unfolding isCont_def by (rule LIM_rabs)
   1.183 +  unfolding isCont_def by (rule tendsto_rabs)
   1.184  
   1.185  lemma isCont_add [simp]:
   1.186    fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
   1.187    shows "\<lbrakk>isCont f a; isCont g a\<rbrakk> \<Longrightarrow> isCont (\<lambda>x. f x + g x) a"
   1.188 -  unfolding isCont_def by (rule LIM_add)
   1.189 +  unfolding isCont_def by (rule tendsto_add)
   1.190  
   1.191  lemma isCont_minus [simp]:
   1.192    fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
   1.193    shows "isCont f a \<Longrightarrow> isCont (\<lambda>x. - f x) a"
   1.194 -  unfolding isCont_def by (rule LIM_minus)
   1.195 +  unfolding isCont_def by (rule tendsto_minus)
   1.196  
   1.197  lemma isCont_diff [simp]:
   1.198    fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
   1.199    shows "\<lbrakk>isCont f a; isCont g a\<rbrakk> \<Longrightarrow> isCont (\<lambda>x. f x - g x) a"
   1.200 -  unfolding isCont_def by (rule LIM_diff)
   1.201 +  unfolding isCont_def by (rule tendsto_diff)
   1.202  
   1.203  lemma isCont_mult [simp]:
   1.204    fixes f g :: "'a::topological_space \<Rightarrow> 'b::real_normed_algebra"
   1.205    shows "\<lbrakk>isCont f a; isCont g a\<rbrakk> \<Longrightarrow> isCont (\<lambda>x. f x * g x) a"
   1.206 -  unfolding isCont_def by (rule LIM_mult)
   1.207 +  unfolding isCont_def by (rule tendsto_mult)
   1.208  
   1.209  lemma isCont_inverse [simp]:
   1.210    fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_div_algebra"
   1.211    shows "\<lbrakk>isCont f a; f a \<noteq> 0\<rbrakk> \<Longrightarrow> isCont (\<lambda>x. inverse (f x)) a"
   1.212 -  unfolding isCont_def by (rule LIM_inverse)
   1.213 +  unfolding isCont_def by (rule tendsto_inverse)
   1.214  
   1.215  lemma isCont_divide [simp]:
   1.216    fixes f g :: "'a::topological_space \<Rightarrow> 'b::real_normed_field"
   1.217 @@ -409,10 +319,6 @@
   1.218    "\<lbrakk>isCont g l; (f ---> l) F\<rbrakk> \<Longrightarrow> ((\<lambda>x. g (f x)) ---> g l) F"
   1.219    unfolding isCont_def by (rule tendsto_compose)
   1.220  
   1.221 -lemma isCont_LIM_compose:
   1.222 -  "\<lbrakk>isCont g l; f -- a --> l\<rbrakk> \<Longrightarrow> (\<lambda>x. g (f x)) -- a --> g l"
   1.223 -  by (rule isCont_tendsto_compose) (* TODO: delete? *)
   1.224 -
   1.225  lemma metric_isCont_LIM_compose2:
   1.226    assumes f [unfolded isCont_def]: "isCont f a"
   1.227    assumes g: "g -- f a --> l"
   1.228 @@ -429,18 +335,18 @@
   1.229  by (rule LIM_compose2 [OF f g inj])
   1.230  
   1.231  lemma isCont_o2: "\<lbrakk>isCont f a; isCont g (f a)\<rbrakk> \<Longrightarrow> isCont (\<lambda>x. g (f x)) a"
   1.232 -  unfolding isCont_def by (rule LIM_compose)
   1.233 +  unfolding isCont_def by (rule tendsto_compose)
   1.234  
   1.235  lemma isCont_o: "\<lbrakk>isCont f a; isCont g (f a)\<rbrakk> \<Longrightarrow> isCont (g o f) a"
   1.236    unfolding o_def by (rule isCont_o2)
   1.237  
   1.238  lemma (in bounded_linear) isCont:
   1.239    "isCont g a \<Longrightarrow> isCont (\<lambda>x. f (g x)) a"
   1.240 -  unfolding isCont_def by (rule LIM)
   1.241 +  unfolding isCont_def by (rule tendsto)
   1.242  
   1.243  lemma (in bounded_bilinear) isCont:
   1.244    "\<lbrakk>isCont f a; isCont g a\<rbrakk> \<Longrightarrow> isCont (\<lambda>x. f x ** g x) a"
   1.245 -  unfolding isCont_def by (rule LIM)
   1.246 +  unfolding isCont_def by (rule tendsto)
   1.247  
   1.248  lemmas isCont_scaleR [simp] =
   1.249    bounded_bilinear.isCont [OF bounded_bilinear_scaleR]
   1.250 @@ -451,12 +357,12 @@
   1.251  lemma isCont_power [simp]:
   1.252    fixes f :: "'a::topological_space \<Rightarrow> 'b::{power,real_normed_algebra}"
   1.253    shows "isCont f a \<Longrightarrow> isCont (\<lambda>x. f x ^ n) a"
   1.254 -  unfolding isCont_def by (rule LIM_power)
   1.255 +  unfolding isCont_def by (rule tendsto_power)
   1.256  
   1.257  lemma isCont_sgn [simp]:
   1.258    fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
   1.259    shows "\<lbrakk>isCont f a; f a \<noteq> 0\<rbrakk> \<Longrightarrow> isCont (\<lambda>x. sgn (f x)) a"
   1.260 -  unfolding isCont_def by (rule LIM_sgn)
   1.261 +  unfolding isCont_def by (rule tendsto_sgn)
   1.262  
   1.263  lemma isCont_setsum [simp]:
   1.264    fixes f :: "'a \<Rightarrow> 'b::topological_space \<Rightarrow> 'c::real_normed_vector"
   1.265 @@ -584,4 +490,29 @@
   1.266     (X -- a --> (L::'b::topological_space))"
   1.267    using LIMSEQ_SEQ_conv2 LIMSEQ_SEQ_conv1 ..
   1.268  
   1.269 +subsection {* Legacy theorem names *}
   1.270 +
   1.271 +lemmas LIM_ident [simp] = tendsto_ident_at
   1.272 +lemmas LIM_const [simp] = tendsto_const [where F="at x", standard]
   1.273 +lemmas LIM_add = tendsto_add [where F="at x", standard]
   1.274 +lemmas LIM_add_zero = tendsto_add_zero [where F="at x", standard]
   1.275 +lemmas LIM_minus = tendsto_minus [where F="at x", standard]
   1.276 +lemmas LIM_diff = tendsto_diff [where F="at x", standard]
   1.277 +lemmas LIM_norm = tendsto_norm [where F="at x", standard]
   1.278 +lemmas LIM_norm_zero = tendsto_norm_zero [where F="at x", standard]
   1.279 +lemmas LIM_norm_zero_cancel = tendsto_norm_zero_cancel [where F="at x", standard]
   1.280 +lemmas LIM_norm_zero_iff = tendsto_norm_zero_iff [where F="at x", standard]
   1.281 +lemmas LIM_rabs = tendsto_rabs [where F="at x", standard]
   1.282 +lemmas LIM_rabs_zero = tendsto_rabs_zero [where F="at x", standard]
   1.283 +lemmas LIM_rabs_zero_cancel = tendsto_rabs_zero_cancel [where F="at x", standard]
   1.284 +lemmas LIM_rabs_zero_iff = tendsto_rabs_zero_iff [where F="at x", standard]
   1.285 +lemmas LIM_compose = tendsto_compose [where F="at x", standard]
   1.286 +lemmas LIM_mult = tendsto_mult [where F="at x", standard]
   1.287 +lemmas LIM_scaleR = tendsto_scaleR [where F="at x", standard]
   1.288 +lemmas LIM_of_real = tendsto_of_real [where F="at x", standard]
   1.289 +lemmas LIM_power = tendsto_power [where F="at x", standard]
   1.290 +lemmas LIM_inverse = tendsto_inverse [where F="at x", standard]
   1.291 +lemmas LIM_sgn = tendsto_sgn [where F="at x", standard]
   1.292 +lemmas isCont_LIM_compose = isCont_tendsto_compose [where F="at x", standard]
   1.293 +
   1.294  end