put syntax for tendsto in Limits.thy; rename variables
authorhuffman
Fri Jun 05 15:59:20 2009 -0700 (2009-06-05)
changeset 3148793938cafc0e6
parent 31469 40f815edbde4
child 31488 5691ccb8d6b5
put syntax for tendsto in Limits.thy; rename variables
src/HOL/Library/Topology_Euclidean_Space.thy
src/HOL/Lim.thy
src/HOL/Limits.thy
src/HOL/SEQ.thy
     1.1 --- a/src/HOL/Library/Topology_Euclidean_Space.thy	Fri Jun 05 21:55:08 2009 +0200
     1.2 +++ b/src/HOL/Library/Topology_Euclidean_Space.thy	Fri Jun 05 15:59:20 2009 -0700
     1.3 @@ -1170,8 +1170,6 @@
     1.4  
     1.5  subsection{* Limits, defined as vacuously true when the limit is trivial. *}
     1.6  
     1.7 -notation tendsto (infixr "--->" 55)
     1.8 -
     1.9    text{* Notation Lim to avoid collition with lim defined in analysis *}
    1.10  definition "Lim net f = (THE l. (f ---> l) net)"
    1.11  
     2.1 --- a/src/HOL/Lim.thy	Fri Jun 05 21:55:08 2009 +0200
     2.2 +++ b/src/HOL/Lim.thy	Fri Jun 05 15:59:20 2009 -0700
     2.3 @@ -29,7 +29,7 @@
     2.4  
     2.5  subsection {* Limits of Functions *}
     2.6  
     2.7 -lemma LIM_conv_tendsto: "(f -- a --> L) \<longleftrightarrow> tendsto f L (at a)"
     2.8 +lemma LIM_conv_tendsto: "(f -- a --> L) \<longleftrightarrow> (f ---> L) (at a)"
     2.9  unfolding LIM_def tendsto_def eventually_at ..
    2.10  
    2.11  lemma metric_LIM_I:
     3.1 --- a/src/HOL/Limits.thy	Fri Jun 05 21:55:08 2009 +0200
     3.2 +++ b/src/HOL/Limits.thy	Fri Jun 05 15:59:20 2009 -0700
     3.3 @@ -175,20 +175,21 @@
     3.4  
     3.5  definition
     3.6    Bfun :: "('a \<Rightarrow> 'b::real_normed_vector) \<Rightarrow> 'a net \<Rightarrow> bool" where
     3.7 -  [code del]: "Bfun S net = (\<exists>K>0. eventually (\<lambda>i. norm (S i) \<le> K) net)"
     3.8 +  [code del]: "Bfun f net = (\<exists>K>0. eventually (\<lambda>x. norm (f x) \<le> K) net)"
     3.9  
    3.10 -lemma BfunI: assumes K: "eventually (\<lambda>i. norm (X i) \<le> K) net" shows "Bfun X net"
    3.11 +lemma BfunI:
    3.12 +  assumes K: "eventually (\<lambda>x. norm (f x) \<le> K) net" shows "Bfun f net"
    3.13  unfolding Bfun_def
    3.14  proof (intro exI conjI allI)
    3.15    show "0 < max K 1" by simp
    3.16  next
    3.17 -  show "eventually (\<lambda>i. norm (X i) \<le> max K 1) net"
    3.18 +  show "eventually (\<lambda>x. norm (f x) \<le> max K 1) net"
    3.19      using K by (rule eventually_elim1, simp)
    3.20  qed
    3.21  
    3.22  lemma BfunE:
    3.23 -  assumes "Bfun S net"
    3.24 -  obtains B where "0 < B" and "eventually (\<lambda>i. norm (S i) \<le> B) net"
    3.25 +  assumes "Bfun f net"
    3.26 +  obtains B where "0 < B" and "eventually (\<lambda>x. norm (f x) \<le> B) net"
    3.27  using assms unfolding Bfun_def by fast
    3.28  
    3.29  
    3.30 @@ -196,30 +197,30 @@
    3.31  
    3.32  definition
    3.33    Zfun :: "('a \<Rightarrow> 'b::real_normed_vector) \<Rightarrow> 'a net \<Rightarrow> bool" where
    3.34 -  [code del]: "Zfun S net = (\<forall>r>0. eventually (\<lambda>i. norm (S i) < r) net)"
    3.35 +  [code del]: "Zfun f net = (\<forall>r>0. eventually (\<lambda>x. norm (f x) < r) net)"
    3.36  
    3.37  lemma ZfunI:
    3.38 -  "(\<And>r. 0 < r \<Longrightarrow> eventually (\<lambda>i. norm (S i) < r) net) \<Longrightarrow> Zfun S net"
    3.39 +  "(\<And>r. 0 < r \<Longrightarrow> eventually (\<lambda>x. norm (f x) < r) net) \<Longrightarrow> Zfun f net"
    3.40  unfolding Zfun_def by simp
    3.41  
    3.42  lemma ZfunD:
    3.43 -  "\<lbrakk>Zfun S net; 0 < r\<rbrakk> \<Longrightarrow> eventually (\<lambda>i. norm (S i) < r) net"
    3.44 +  "\<lbrakk>Zfun f net; 0 < r\<rbrakk> \<Longrightarrow> eventually (\<lambda>x. norm (f x) < r) net"
    3.45  unfolding Zfun_def by simp
    3.46  
    3.47  lemma Zfun_ssubst:
    3.48 -  "eventually (\<lambda>i. X i = Y i) net \<Longrightarrow> Zfun Y net \<Longrightarrow> Zfun X net"
    3.49 +  "eventually (\<lambda>x. f x = g x) net \<Longrightarrow> Zfun g net \<Longrightarrow> Zfun f net"
    3.50  unfolding Zfun_def by (auto elim!: eventually_rev_mp)
    3.51  
    3.52 -lemma Zfun_zero: "Zfun (\<lambda>i. 0) net"
    3.53 +lemma Zfun_zero: "Zfun (\<lambda>x. 0) net"
    3.54  unfolding Zfun_def by simp
    3.55  
    3.56 -lemma Zfun_norm_iff: "Zfun (\<lambda>i. norm (S i)) net = Zfun (\<lambda>i. S i) net"
    3.57 +lemma Zfun_norm_iff: "Zfun (\<lambda>x. norm (f x)) net = Zfun (\<lambda>x. f x) net"
    3.58  unfolding Zfun_def by simp
    3.59  
    3.60  lemma Zfun_imp_Zfun:
    3.61 -  assumes X: "Zfun X net"
    3.62 -  assumes Y: "eventually (\<lambda>i. norm (Y i) \<le> norm (X i) * K) net"
    3.63 -  shows "Zfun (\<lambda>n. Y n) net"
    3.64 +  assumes f: "Zfun f net"
    3.65 +  assumes g: "eventually (\<lambda>x. norm (g x) \<le> norm (f x) * K) net"
    3.66 +  shows "Zfun (\<lambda>x. g x) net"
    3.67  proof (cases)
    3.68    assume K: "0 < K"
    3.69    show ?thesis
    3.70 @@ -227,16 +228,16 @@
    3.71      fix r::real assume "0 < r"
    3.72      hence "0 < r / K"
    3.73        using K by (rule divide_pos_pos)
    3.74 -    then have "eventually (\<lambda>i. norm (X i) < r / K) net"
    3.75 -      using ZfunD [OF X] by fast
    3.76 -    with Y show "eventually (\<lambda>i. norm (Y i) < r) net"
    3.77 +    then have "eventually (\<lambda>x. norm (f x) < r / K) net"
    3.78 +      using ZfunD [OF f] by fast
    3.79 +    with g show "eventually (\<lambda>x. norm (g x) < r) net"
    3.80      proof (rule eventually_elim2)
    3.81 -      fix i
    3.82 -      assume *: "norm (Y i) \<le> norm (X i) * K"
    3.83 -      assume "norm (X i) < r / K"
    3.84 -      hence "norm (X i) * K < r"
    3.85 +      fix x
    3.86 +      assume *: "norm (g x) \<le> norm (f x) * K"
    3.87 +      assume "norm (f x) < r / K"
    3.88 +      hence "norm (f x) * K < r"
    3.89          by (simp add: pos_less_divide_eq K)
    3.90 -      thus "norm (Y i) < r"
    3.91 +      thus "norm (g x) < r"
    3.92          by (simp add: order_le_less_trans [OF *])
    3.93      qed
    3.94    qed
    3.95 @@ -247,68 +248,68 @@
    3.96    proof (rule ZfunI)
    3.97      fix r :: real
    3.98      assume "0 < r"
    3.99 -    from Y show "eventually (\<lambda>i. norm (Y i) < r) net"
   3.100 +    from g show "eventually (\<lambda>x. norm (g x) < r) net"
   3.101      proof (rule eventually_elim1)
   3.102 -      fix i
   3.103 -      assume "norm (Y i) \<le> norm (X i) * K"
   3.104 -      also have "\<dots> \<le> norm (X i) * 0"
   3.105 +      fix x
   3.106 +      assume "norm (g x) \<le> norm (f x) * K"
   3.107 +      also have "\<dots> \<le> norm (f x) * 0"
   3.108          using K norm_ge_zero by (rule mult_left_mono)
   3.109 -      finally show "norm (Y i) < r"
   3.110 +      finally show "norm (g x) < r"
   3.111          using `0 < r` by simp
   3.112      qed
   3.113    qed
   3.114  qed
   3.115  
   3.116 -lemma Zfun_le: "\<lbrakk>Zfun Y net; \<forall>n. norm (X n) \<le> norm (Y n)\<rbrakk> \<Longrightarrow> Zfun X net"
   3.117 +lemma Zfun_le: "\<lbrakk>Zfun g net; \<forall>x. norm (f x) \<le> norm (g x)\<rbrakk> \<Longrightarrow> Zfun f net"
   3.118  by (erule_tac K="1" in Zfun_imp_Zfun, simp)
   3.119  
   3.120  lemma Zfun_add:
   3.121 -  assumes X: "Zfun X net" and Y: "Zfun Y net"
   3.122 -  shows "Zfun (\<lambda>n. X n + Y n) net"
   3.123 +  assumes f: "Zfun f net" and g: "Zfun g net"
   3.124 +  shows "Zfun (\<lambda>x. f x + g x) net"
   3.125  proof (rule ZfunI)
   3.126    fix r::real assume "0 < r"
   3.127    hence r: "0 < r / 2" by simp
   3.128 -  have "eventually (\<lambda>i. norm (X i) < r/2) net"
   3.129 -    using X r by (rule ZfunD)
   3.130 +  have "eventually (\<lambda>x. norm (f x) < r/2) net"
   3.131 +    using f r by (rule ZfunD)
   3.132    moreover
   3.133 -  have "eventually (\<lambda>i. norm (Y i) < r/2) net"
   3.134 -    using Y r by (rule ZfunD)
   3.135 +  have "eventually (\<lambda>x. norm (g x) < r/2) net"
   3.136 +    using g r by (rule ZfunD)
   3.137    ultimately
   3.138 -  show "eventually (\<lambda>i. norm (X i + Y i) < r) net"
   3.139 +  show "eventually (\<lambda>x. norm (f x + g x) < r) net"
   3.140    proof (rule eventually_elim2)
   3.141 -    fix i
   3.142 -    assume *: "norm (X i) < r/2" "norm (Y i) < r/2"
   3.143 -    have "norm (X i + Y i) \<le> norm (X i) + norm (Y i)"
   3.144 +    fix x
   3.145 +    assume *: "norm (f x) < r/2" "norm (g x) < r/2"
   3.146 +    have "norm (f x + g x) \<le> norm (f x) + norm (g x)"
   3.147        by (rule norm_triangle_ineq)
   3.148      also have "\<dots> < r/2 + r/2"
   3.149        using * by (rule add_strict_mono)
   3.150 -    finally show "norm (X i + Y i) < r"
   3.151 +    finally show "norm (f x + g x) < r"
   3.152        by simp
   3.153    qed
   3.154  qed
   3.155  
   3.156 -lemma Zfun_minus: "Zfun X net \<Longrightarrow> Zfun (\<lambda>i. - X i) net"
   3.157 +lemma Zfun_minus: "Zfun f net \<Longrightarrow> Zfun (\<lambda>x. - f x) net"
   3.158  unfolding Zfun_def by simp
   3.159  
   3.160 -lemma Zfun_diff: "\<lbrakk>Zfun X net; Zfun Y net\<rbrakk> \<Longrightarrow> Zfun (\<lambda>i. X i - Y i) net"
   3.161 +lemma Zfun_diff: "\<lbrakk>Zfun f net; Zfun g net\<rbrakk> \<Longrightarrow> Zfun (\<lambda>x. f x - g x) net"
   3.162  by (simp only: diff_minus Zfun_add Zfun_minus)
   3.163  
   3.164  lemma (in bounded_linear) Zfun:
   3.165 -  assumes X: "Zfun X net"
   3.166 -  shows "Zfun (\<lambda>n. f (X n)) net"
   3.167 +  assumes g: "Zfun g net"
   3.168 +  shows "Zfun (\<lambda>x. f (g x)) net"
   3.169  proof -
   3.170    obtain K where "\<And>x. norm (f x) \<le> norm x * K"
   3.171      using bounded by fast
   3.172 -  then have "eventually (\<lambda>i. norm (f (X i)) \<le> norm (X i) * K) net"
   3.173 +  then have "eventually (\<lambda>x. norm (f (g x)) \<le> norm (g x) * K) net"
   3.174      by simp
   3.175 -  with X show ?thesis
   3.176 +  with g show ?thesis
   3.177      by (rule Zfun_imp_Zfun)
   3.178  qed
   3.179  
   3.180  lemma (in bounded_bilinear) Zfun:
   3.181 -  assumes X: "Zfun X net"
   3.182 -  assumes Y: "Zfun Y net"
   3.183 -  shows "Zfun (\<lambda>n. X n ** Y n) net"
   3.184 +  assumes f: "Zfun f net"
   3.185 +  assumes g: "Zfun g net"
   3.186 +  shows "Zfun (\<lambda>x. f x ** g x) net"
   3.187  proof (rule ZfunI)
   3.188    fix r::real assume r: "0 < r"
   3.189    obtain K where K: "0 < K"
   3.190 @@ -316,32 +317,32 @@
   3.191      using pos_bounded by fast
   3.192    from K have K': "0 < inverse K"
   3.193      by (rule positive_imp_inverse_positive)
   3.194 -  have "eventually (\<lambda>i. norm (X i) < r) net"
   3.195 -    using X r by (rule ZfunD)
   3.196 +  have "eventually (\<lambda>x. norm (f x) < r) net"
   3.197 +    using f r by (rule ZfunD)
   3.198    moreover
   3.199 -  have "eventually (\<lambda>i. norm (Y i) < inverse K) net"
   3.200 -    using Y K' by (rule ZfunD)
   3.201 +  have "eventually (\<lambda>x. norm (g x) < inverse K) net"
   3.202 +    using g K' by (rule ZfunD)
   3.203    ultimately
   3.204 -  show "eventually (\<lambda>i. norm (X i ** Y i) < r) net"
   3.205 +  show "eventually (\<lambda>x. norm (f x ** g x) < r) net"
   3.206    proof (rule eventually_elim2)
   3.207 -    fix i
   3.208 -    assume *: "norm (X i) < r" "norm (Y i) < inverse K"
   3.209 -    have "norm (X i ** Y i) \<le> norm (X i) * norm (Y i) * K"
   3.210 +    fix x
   3.211 +    assume *: "norm (f x) < r" "norm (g x) < inverse K"
   3.212 +    have "norm (f x ** g x) \<le> norm (f x) * norm (g x) * K"
   3.213        by (rule norm_le)
   3.214 -    also have "norm (X i) * norm (Y i) * K < r * inverse K * K"
   3.215 +    also have "norm (f x) * norm (g x) * K < r * inverse K * K"
   3.216        by (intro mult_strict_right_mono mult_strict_mono' norm_ge_zero * K)
   3.217      also from K have "r * inverse K * K = r"
   3.218        by simp
   3.219 -    finally show "norm (X i ** Y i) < r" .
   3.220 +    finally show "norm (f x ** g x) < r" .
   3.221    qed
   3.222  qed
   3.223  
   3.224  lemma (in bounded_bilinear) Zfun_left:
   3.225 -  "Zfun X net \<Longrightarrow> Zfun (\<lambda>n. X n ** a) net"
   3.226 +  "Zfun f net \<Longrightarrow> Zfun (\<lambda>x. f x ** a) net"
   3.227  by (rule bounded_linear_left [THEN bounded_linear.Zfun])
   3.228  
   3.229  lemma (in bounded_bilinear) Zfun_right:
   3.230 -  "Zfun X net \<Longrightarrow> Zfun (\<lambda>n. a ** X n) net"
   3.231 +  "Zfun f net \<Longrightarrow> Zfun (\<lambda>x. a ** f x) net"
   3.232  by (rule bounded_linear_right [THEN bounded_linear.Zfun])
   3.233  
   3.234  lemmas Zfun_mult = mult.Zfun
   3.235 @@ -352,27 +353,28 @@
   3.236  subsection{* Limits *}
   3.237  
   3.238  definition
   3.239 -  tendsto :: "('a \<Rightarrow> 'b::metric_space) \<Rightarrow> 'b \<Rightarrow> 'a net \<Rightarrow> bool" where
   3.240 -  [code del]: "tendsto f l net \<longleftrightarrow> (\<forall>e>0. eventually (\<lambda>x. dist (f x) l < e) net)"
   3.241 +  tendsto :: "('a \<Rightarrow> 'b::metric_space) \<Rightarrow> 'b \<Rightarrow> 'a net \<Rightarrow> bool"
   3.242 +    (infixr "--->" 55) where
   3.243 +  [code del]: "(f ---> l) net \<longleftrightarrow> (\<forall>e>0. eventually (\<lambda>x. dist (f x) l < e) net)"
   3.244  
   3.245  lemma tendstoI:
   3.246    "(\<And>e. 0 < e \<Longrightarrow> eventually (\<lambda>x. dist (f x) l < e) net)
   3.247 -    \<Longrightarrow> tendsto f l net"
   3.248 +    \<Longrightarrow> (f ---> l) net"
   3.249    unfolding tendsto_def by auto
   3.250  
   3.251  lemma tendstoD:
   3.252 -  "tendsto f l net \<Longrightarrow> 0 < e \<Longrightarrow> eventually (\<lambda>x. dist (f x) l < e) net"
   3.253 +  "(f ---> l) net \<Longrightarrow> 0 < e \<Longrightarrow> eventually (\<lambda>x. dist (f x) l < e) net"
   3.254    unfolding tendsto_def by auto
   3.255  
   3.256 -lemma tendsto_Zfun_iff: "tendsto (\<lambda>n. X n) L net = Zfun (\<lambda>n. X n - L) net"
   3.257 +lemma tendsto_Zfun_iff: "(f ---> a) net = Zfun (\<lambda>x. f x - a) net"
   3.258  by (simp only: tendsto_def Zfun_def dist_norm)
   3.259  
   3.260 -lemma tendsto_const: "tendsto (\<lambda>n. k) k net"
   3.261 +lemma tendsto_const: "((\<lambda>x. k) ---> k) net"
   3.262  by (simp add: tendsto_def)
   3.263  
   3.264  lemma tendsto_norm:
   3.265    fixes a :: "'a::real_normed_vector"
   3.266 -  shows "tendsto X a net \<Longrightarrow> tendsto (\<lambda>n. norm (X n)) (norm a) net"
   3.267 +  shows "(f ---> a) net \<Longrightarrow> ((\<lambda>x. norm (f x)) ---> norm a) net"
   3.268  apply (simp add: tendsto_def dist_norm, safe)
   3.269  apply (drule_tac x="e" in spec, safe)
   3.270  apply (erule eventually_elim1)
   3.271 @@ -391,30 +393,30 @@
   3.272  
   3.273  lemma tendsto_add:
   3.274    fixes a b :: "'a::real_normed_vector"
   3.275 -  shows "\<lbrakk>tendsto X a net; tendsto Y b net\<rbrakk> \<Longrightarrow> tendsto (\<lambda>n. X n + Y n) (a + b) net"
   3.276 +  shows "\<lbrakk>(f ---> a) net; (g ---> b) net\<rbrakk> \<Longrightarrow> ((\<lambda>x. f x + g x) ---> a + b) net"
   3.277  by (simp only: tendsto_Zfun_iff add_diff_add Zfun_add)
   3.278  
   3.279  lemma tendsto_minus:
   3.280    fixes a :: "'a::real_normed_vector"
   3.281 -  shows "tendsto X a net \<Longrightarrow> tendsto (\<lambda>n. - X n) (- a) net"
   3.282 +  shows "(f ---> a) net \<Longrightarrow> ((\<lambda>x. - f x) ---> - a) net"
   3.283  by (simp only: tendsto_Zfun_iff minus_diff_minus Zfun_minus)
   3.284  
   3.285  lemma tendsto_minus_cancel:
   3.286    fixes a :: "'a::real_normed_vector"
   3.287 -  shows "tendsto (\<lambda>n. - X n) (- a) net \<Longrightarrow> tendsto X a net"
   3.288 +  shows "((\<lambda>x. - f x) ---> - a) net \<Longrightarrow> (f ---> a) net"
   3.289  by (drule tendsto_minus, simp)
   3.290  
   3.291  lemma tendsto_diff:
   3.292    fixes a b :: "'a::real_normed_vector"
   3.293 -  shows "\<lbrakk>tendsto X a net; tendsto Y b net\<rbrakk> \<Longrightarrow> tendsto (\<lambda>n. X n - Y n) (a - b) net"
   3.294 +  shows "\<lbrakk>(f ---> a) net; (g ---> b) net\<rbrakk> \<Longrightarrow> ((\<lambda>x. f x - g x) ---> a - b) net"
   3.295  by (simp add: diff_minus tendsto_add tendsto_minus)
   3.296  
   3.297  lemma (in bounded_linear) tendsto:
   3.298 -  "tendsto X a net \<Longrightarrow> tendsto (\<lambda>n. f (X n)) (f a) net"
   3.299 +  "(g ---> a) net \<Longrightarrow> ((\<lambda>x. f (g x)) ---> f a) net"
   3.300  by (simp only: tendsto_Zfun_iff diff [symmetric] Zfun)
   3.301  
   3.302  lemma (in bounded_bilinear) tendsto:
   3.303 -  "\<lbrakk>tendsto X a net; tendsto Y b net\<rbrakk> \<Longrightarrow> tendsto (\<lambda>n. X n ** Y n) (a ** b) net"
   3.304 +  "\<lbrakk>(f ---> a) net; (g ---> b) net\<rbrakk> \<Longrightarrow> ((\<lambda>x. f x ** g x) ---> a ** b) net"
   3.305  by (simp only: tendsto_Zfun_iff prod_diff_prod
   3.306                 Zfun_add Zfun Zfun_left Zfun_right)
   3.307  
   3.308 @@ -422,31 +424,31 @@
   3.309  subsection {* Continuity of Inverse *}
   3.310  
   3.311  lemma (in bounded_bilinear) Zfun_prod_Bfun:
   3.312 -  assumes X: "Zfun X net"
   3.313 -  assumes Y: "Bfun Y net"
   3.314 -  shows "Zfun (\<lambda>n. X n ** Y n) net"
   3.315 +  assumes f: "Zfun f net"
   3.316 +  assumes g: "Bfun g net"
   3.317 +  shows "Zfun (\<lambda>x. f x ** g x) net"
   3.318  proof -
   3.319    obtain K where K: "0 \<le> K"
   3.320      and norm_le: "\<And>x y. norm (x ** y) \<le> norm x * norm y * K"
   3.321      using nonneg_bounded by fast
   3.322    obtain B where B: "0 < B"
   3.323 -    and norm_Y: "eventually (\<lambda>i. norm (Y i) \<le> B) net"
   3.324 -    using Y by (rule BfunE)
   3.325 -  have "eventually (\<lambda>i. norm (X i ** Y i) \<le> norm (X i) * (B * K)) net"
   3.326 -  using norm_Y proof (rule eventually_elim1)
   3.327 -    fix i
   3.328 -    assume *: "norm (Y i) \<le> B"
   3.329 -    have "norm (X i ** Y i) \<le> norm (X i) * norm (Y i) * K"
   3.330 +    and norm_g: "eventually (\<lambda>x. norm (g x) \<le> B) net"
   3.331 +    using g by (rule BfunE)
   3.332 +  have "eventually (\<lambda>x. norm (f x ** g x) \<le> norm (f x) * (B * K)) net"
   3.333 +  using norm_g proof (rule eventually_elim1)
   3.334 +    fix x
   3.335 +    assume *: "norm (g x) \<le> B"
   3.336 +    have "norm (f x ** g x) \<le> norm (f x) * norm (g x) * K"
   3.337        by (rule norm_le)
   3.338 -    also have "\<dots> \<le> norm (X i) * B * K"
   3.339 -      by (intro mult_mono' order_refl norm_Y norm_ge_zero
   3.340 +    also have "\<dots> \<le> norm (f x) * B * K"
   3.341 +      by (intro mult_mono' order_refl norm_g norm_ge_zero
   3.342                  mult_nonneg_nonneg K *)
   3.343 -    also have "\<dots> = norm (X i) * (B * K)"
   3.344 +    also have "\<dots> = norm (f x) * (B * K)"
   3.345        by (rule mult_assoc)
   3.346 -    finally show "norm (X i ** Y i) \<le> norm (X i) * (B * K)" .
   3.347 +    finally show "norm (f x ** g x) \<le> norm (f x) * (B * K)" .
   3.348    qed
   3.349 -  with X show ?thesis
   3.350 -  by (rule Zfun_imp_Zfun)
   3.351 +  with f show ?thesis
   3.352 +    by (rule Zfun_imp_Zfun)
   3.353  qed
   3.354  
   3.355  lemma (in bounded_bilinear) flip:
   3.356 @@ -460,10 +462,10 @@
   3.357  using bounded by fast
   3.358  
   3.359  lemma (in bounded_bilinear) Bfun_prod_Zfun:
   3.360 -  assumes X: "Bfun X net"
   3.361 -  assumes Y: "Zfun Y net"
   3.362 -  shows "Zfun (\<lambda>n. X n ** Y n) net"
   3.363 -using flip Y X by (rule bounded_bilinear.Zfun_prod_Bfun)
   3.364 +  assumes f: "Bfun f net"
   3.365 +  assumes g: "Zfun g net"
   3.366 +  shows "Zfun (\<lambda>x. f x ** g x) net"
   3.367 +using flip g f by (rule bounded_bilinear.Zfun_prod_Bfun)
   3.368  
   3.369  lemma inverse_diff_inverse:
   3.370    "\<lbrakk>(a::'a::division_ring) \<noteq> 0; b \<noteq> 0\<rbrakk>
   3.371 @@ -479,44 +481,44 @@
   3.372  
   3.373  lemma Bfun_inverse:
   3.374    fixes a :: "'a::real_normed_div_algebra"
   3.375 -  assumes X: "tendsto X a net"
   3.376 +  assumes f: "(f ---> a) net"
   3.377    assumes a: "a \<noteq> 0"
   3.378 -  shows "Bfun (\<lambda>n. inverse (X n)) net"
   3.379 +  shows "Bfun (\<lambda>x. inverse (f x)) net"
   3.380  proof -
   3.381    from a have "0 < norm a" by simp
   3.382    hence "\<exists>r>0. r < norm a" by (rule dense)
   3.383    then obtain r where r1: "0 < r" and r2: "r < norm a" by fast
   3.384 -  have "eventually (\<lambda>i. dist (X i) a < r) net"
   3.385 -    using tendstoD [OF X r1] by fast
   3.386 -  hence "eventually (\<lambda>i. norm (inverse (X i)) \<le> inverse (norm a - r)) net"
   3.387 +  have "eventually (\<lambda>x. dist (f x) a < r) net"
   3.388 +    using tendstoD [OF f r1] by fast
   3.389 +  hence "eventually (\<lambda>x. norm (inverse (f x)) \<le> inverse (norm a - r)) net"
   3.390    proof (rule eventually_elim1)
   3.391 -    fix i
   3.392 -    assume "dist (X i) a < r"
   3.393 -    hence 1: "norm (X i - a) < r"
   3.394 +    fix x
   3.395 +    assume "dist (f x) a < r"
   3.396 +    hence 1: "norm (f x - a) < r"
   3.397        by (simp add: dist_norm)
   3.398 -    hence 2: "X i \<noteq> 0" using r2 by auto
   3.399 -    hence "norm (inverse (X i)) = inverse (norm (X i))"
   3.400 +    hence 2: "f x \<noteq> 0" using r2 by auto
   3.401 +    hence "norm (inverse (f x)) = inverse (norm (f x))"
   3.402        by (rule nonzero_norm_inverse)
   3.403      also have "\<dots> \<le> inverse (norm a - r)"
   3.404      proof (rule le_imp_inverse_le)
   3.405        show "0 < norm a - r" using r2 by simp
   3.406      next
   3.407 -      have "norm a - norm (X i) \<le> norm (a - X i)"
   3.408 +      have "norm a - norm (f x) \<le> norm (a - f x)"
   3.409          by (rule norm_triangle_ineq2)
   3.410 -      also have "\<dots> = norm (X i - a)"
   3.411 +      also have "\<dots> = norm (f x - a)"
   3.412          by (rule norm_minus_commute)
   3.413        also have "\<dots> < r" using 1 .
   3.414 -      finally show "norm a - r \<le> norm (X i)" by simp
   3.415 +      finally show "norm a - r \<le> norm (f x)" by simp
   3.416      qed
   3.417 -    finally show "norm (inverse (X i)) \<le> inverse (norm a - r)" .
   3.418 +    finally show "norm (inverse (f x)) \<le> inverse (norm a - r)" .
   3.419    qed
   3.420    thus ?thesis by (rule BfunI)
   3.421  qed
   3.422  
   3.423  lemma tendsto_inverse_lemma:
   3.424    fixes a :: "'a::real_normed_div_algebra"
   3.425 -  shows "\<lbrakk>tendsto X a net; a \<noteq> 0; eventually (\<lambda>i. X i \<noteq> 0) net\<rbrakk>
   3.426 -         \<Longrightarrow> tendsto (\<lambda>i. inverse (X i)) (inverse a) net"
   3.427 +  shows "\<lbrakk>(f ---> a) net; a \<noteq> 0; eventually (\<lambda>x. f x \<noteq> 0) net\<rbrakk>
   3.428 +         \<Longrightarrow> ((\<lambda>x. inverse (f x)) ---> inverse a) net"
   3.429  apply (subst tendsto_Zfun_iff)
   3.430  apply (rule Zfun_ssubst)
   3.431  apply (erule eventually_elim1)
   3.432 @@ -530,23 +532,23 @@
   3.433  
   3.434  lemma tendsto_inverse:
   3.435    fixes a :: "'a::real_normed_div_algebra"
   3.436 -  assumes X: "tendsto X a net"
   3.437 +  assumes f: "(f ---> a) net"
   3.438    assumes a: "a \<noteq> 0"
   3.439 -  shows "tendsto (\<lambda>i. inverse (X i)) (inverse a) net"
   3.440 +  shows "((\<lambda>x. inverse (f x)) ---> inverse a) net"
   3.441  proof -
   3.442    from a have "0 < norm a" by simp
   3.443 -  with X have "eventually (\<lambda>i. dist (X i) a < norm a) net"
   3.444 +  with f have "eventually (\<lambda>x. dist (f x) a < norm a) net"
   3.445      by (rule tendstoD)
   3.446 -  then have "eventually (\<lambda>i. X i \<noteq> 0) net"
   3.447 +  then have "eventually (\<lambda>x. f x \<noteq> 0) net"
   3.448      unfolding dist_norm by (auto elim!: eventually_elim1)
   3.449 -  with X a show ?thesis
   3.450 +  with f a show ?thesis
   3.451      by (rule tendsto_inverse_lemma)
   3.452  qed
   3.453  
   3.454  lemma tendsto_divide:
   3.455    fixes a b :: "'a::real_normed_field"
   3.456 -  shows "\<lbrakk>tendsto X a net; tendsto Y b net; b \<noteq> 0\<rbrakk>
   3.457 -    \<Longrightarrow> tendsto (\<lambda>n. X n / Y n) (a / b) net"
   3.458 +  shows "\<lbrakk>(f ---> a) net; (g ---> b) net; b \<noteq> 0\<rbrakk>
   3.459 +    \<Longrightarrow> ((\<lambda>x. f x / g x) ---> a / b) net"
   3.460  by (simp add: mult.tendsto tendsto_inverse divide_inverse)
   3.461  
   3.462  end
     4.1 --- a/src/HOL/SEQ.thy	Fri Jun 05 21:55:08 2009 +0200
     4.2 +++ b/src/HOL/SEQ.thy	Fri Jun 05 15:59:20 2009 -0700
     4.3 @@ -193,7 +193,7 @@
     4.4  
     4.5  subsection {* Limits of Sequences *}
     4.6  
     4.7 -lemma LIMSEQ_conv_tendsto: "(X ----> L) \<longleftrightarrow> tendsto X L sequentially"
     4.8 +lemma LIMSEQ_conv_tendsto: "(X ----> L) \<longleftrightarrow> (X ---> L) sequentially"
     4.9  unfolding LIMSEQ_def tendsto_def eventually_sequentially ..
    4.10  
    4.11  lemma LIMSEQ_iff: