src/HOL/SEQ.thy
changeset 51526 155263089e7b
parent 51525 d3d170a2887f
child 51527 bd62e7ff103b
     1.1 --- a/src/HOL/SEQ.thy	Tue Mar 26 12:20:58 2013 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,415 +0,0 @@
     1.4 -(*  Title:      HOL/SEQ.thy
     1.5 -    Author:     Jacques D. Fleuriot, University of Cambridge
     1.6 -    Author:     Lawrence C Paulson
     1.7 -    Author:     Jeremy Avigad
     1.8 -    Author:     Brian Huffman
     1.9 -
    1.10 -Convergence of sequences and series.
    1.11 -*)
    1.12 -
    1.13 -header {* Sequences and Convergence *}
    1.14 -
    1.15 -theory SEQ
    1.16 -imports Limits
    1.17 -begin
    1.18 -
    1.19 -subsection {* Limits of Sequences *}
    1.20 -
    1.21 -lemma [trans]: "X=Y ==> Y ----> z ==> X ----> z"
    1.22 -  by simp
    1.23 -
    1.24 -lemma LIMSEQ_iff:
    1.25 -  fixes L :: "'a::real_normed_vector"
    1.26 -  shows "(X ----> L) = (\<forall>r>0. \<exists>no. \<forall>n \<ge> no. norm (X n - L) < r)"
    1.27 -unfolding LIMSEQ_def dist_norm ..
    1.28 -
    1.29 -lemma LIMSEQ_I:
    1.30 -  fixes L :: "'a::real_normed_vector"
    1.31 -  shows "(\<And>r. 0 < r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. norm (X n - L) < r) \<Longrightarrow> X ----> L"
    1.32 -by (simp add: LIMSEQ_iff)
    1.33 -
    1.34 -lemma LIMSEQ_D:
    1.35 -  fixes L :: "'a::real_normed_vector"
    1.36 -  shows "\<lbrakk>X ----> L; 0 < r\<rbrakk> \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. norm (X n - L) < r"
    1.37 -by (simp add: LIMSEQ_iff)
    1.38 -
    1.39 -lemma LIMSEQ_linear: "\<lbrakk> X ----> x ; l > 0 \<rbrakk> \<Longrightarrow> (\<lambda> n. X (n * l)) ----> x"
    1.40 -  unfolding tendsto_def eventually_sequentially
    1.41 -  by (metis div_le_dividend div_mult_self1_is_m le_trans nat_mult_commute)
    1.42 -
    1.43 -lemma Bseq_inverse_lemma:
    1.44 -  fixes x :: "'a::real_normed_div_algebra"
    1.45 -  shows "\<lbrakk>r \<le> norm x; 0 < r\<rbrakk> \<Longrightarrow> norm (inverse x) \<le> inverse r"
    1.46 -apply (subst nonzero_norm_inverse, clarsimp)
    1.47 -apply (erule (1) le_imp_inverse_le)
    1.48 -done
    1.49 -
    1.50 -lemma Bseq_inverse:
    1.51 -  fixes a :: "'a::real_normed_div_algebra"
    1.52 -  shows "\<lbrakk>X ----> a; a \<noteq> 0\<rbrakk> \<Longrightarrow> Bseq (\<lambda>n. inverse (X n))"
    1.53 -  by (rule Bfun_inverse)
    1.54 -
    1.55 -lemma LIMSEQ_diff_approach_zero:
    1.56 -  fixes L :: "'a::real_normed_vector"
    1.57 -  shows "g ----> L ==> (%x. f x - g x) ----> 0 ==> f ----> L"
    1.58 -  by (drule (1) tendsto_add, simp)
    1.59 -
    1.60 -lemma LIMSEQ_diff_approach_zero2:
    1.61 -  fixes L :: "'a::real_normed_vector"
    1.62 -  shows "f ----> L ==> (%x. f x - g x) ----> 0 ==> g ----> L"
    1.63 -  by (drule (1) tendsto_diff, simp)
    1.64 -
    1.65 -text{*An unbounded sequence's inverse tends to 0*}
    1.66 -
    1.67 -lemma LIMSEQ_inverse_zero:
    1.68 -  "\<forall>r::real. \<exists>N. \<forall>n\<ge>N. r < X n \<Longrightarrow> (\<lambda>n. inverse (X n)) ----> 0"
    1.69 -  apply (rule filterlim_compose[OF tendsto_inverse_0])
    1.70 -  apply (simp add: filterlim_at_infinity[OF order_refl] eventually_sequentially)
    1.71 -  apply (metis abs_le_D1 linorder_le_cases linorder_not_le)
    1.72 -  done
    1.73 -
    1.74 -text{*The sequence @{term "1/n"} tends to 0 as @{term n} tends to infinity*}
    1.75 -
    1.76 -lemma LIMSEQ_inverse_real_of_nat: "(%n. inverse(real(Suc n))) ----> 0"
    1.77 -  by (metis filterlim_compose tendsto_inverse_0 filterlim_mono order_refl filterlim_Suc
    1.78 -            filterlim_compose[OF filterlim_real_sequentially] at_top_le_at_infinity)
    1.79 -
    1.80 -text{*The sequence @{term "r + 1/n"} tends to @{term r} as @{term n} tends to
    1.81 -infinity is now easily proved*}
    1.82 -
    1.83 -lemma LIMSEQ_inverse_real_of_nat_add:
    1.84 -     "(%n. r + inverse(real(Suc n))) ----> r"
    1.85 -  using tendsto_add [OF tendsto_const LIMSEQ_inverse_real_of_nat] by auto
    1.86 -
    1.87 -lemma LIMSEQ_inverse_real_of_nat_add_minus:
    1.88 -     "(%n. r + -inverse(real(Suc n))) ----> r"
    1.89 -  using tendsto_add [OF tendsto_const tendsto_minus [OF LIMSEQ_inverse_real_of_nat]]
    1.90 -  by auto
    1.91 -
    1.92 -lemma LIMSEQ_inverse_real_of_nat_add_minus_mult:
    1.93 -     "(%n. r*( 1 + -inverse(real(Suc n)))) ----> r"
    1.94 -  using tendsto_mult [OF tendsto_const LIMSEQ_inverse_real_of_nat_add_minus [of 1]]
    1.95 -  by auto
    1.96 -
    1.97 -subsection {* Convergence *}
    1.98 -
    1.99 -lemma convergent_add:
   1.100 -  fixes X Y :: "nat \<Rightarrow> 'a::real_normed_vector"
   1.101 -  assumes "convergent (\<lambda>n. X n)"
   1.102 -  assumes "convergent (\<lambda>n. Y n)"
   1.103 -  shows "convergent (\<lambda>n. X n + Y n)"
   1.104 -  using assms unfolding convergent_def by (fast intro: tendsto_add)
   1.105 -
   1.106 -lemma convergent_setsum:
   1.107 -  fixes X :: "'a \<Rightarrow> nat \<Rightarrow> 'b::real_normed_vector"
   1.108 -  assumes "\<And>i. i \<in> A \<Longrightarrow> convergent (\<lambda>n. X i n)"
   1.109 -  shows "convergent (\<lambda>n. \<Sum>i\<in>A. X i n)"
   1.110 -proof (cases "finite A")
   1.111 -  case True from this and assms show ?thesis
   1.112 -    by (induct A set: finite) (simp_all add: convergent_const convergent_add)
   1.113 -qed (simp add: convergent_const)
   1.114 -
   1.115 -lemma (in bounded_linear) convergent:
   1.116 -  assumes "convergent (\<lambda>n. X n)"
   1.117 -  shows "convergent (\<lambda>n. f (X n))"
   1.118 -  using assms unfolding convergent_def by (fast intro: tendsto)
   1.119 -
   1.120 -lemma (in bounded_bilinear) convergent:
   1.121 -  assumes "convergent (\<lambda>n. X n)" and "convergent (\<lambda>n. Y n)"
   1.122 -  shows "convergent (\<lambda>n. X n ** Y n)"
   1.123 -  using assms unfolding convergent_def by (fast intro: tendsto)
   1.124 -
   1.125 -lemma convergent_minus_iff:
   1.126 -  fixes X :: "nat \<Rightarrow> 'a::real_normed_vector"
   1.127 -  shows "convergent X \<longleftrightarrow> convergent (\<lambda>n. - X n)"
   1.128 -apply (simp add: convergent_def)
   1.129 -apply (auto dest: tendsto_minus)
   1.130 -apply (drule tendsto_minus, auto)
   1.131 -done
   1.132 -
   1.133 -
   1.134 -subsection {* Bounded Monotonic Sequences *}
   1.135 -
   1.136 -subsubsection {* Bounded Sequences *}
   1.137 -
   1.138 -lemma BseqI': "(\<And>n. norm (X n) \<le> K) \<Longrightarrow> Bseq X"
   1.139 -  by (intro BfunI) (auto simp: eventually_sequentially)
   1.140 -
   1.141 -lemma BseqI2': "\<forall>n\<ge>N. norm (X n) \<le> K \<Longrightarrow> Bseq X"
   1.142 -  by (intro BfunI) (auto simp: eventually_sequentially)
   1.143 -
   1.144 -lemma Bseq_def: "Bseq X \<longleftrightarrow> (\<exists>K>0. \<forall>n. norm (X n) \<le> K)"
   1.145 -  unfolding Bfun_def eventually_sequentially
   1.146 -proof safe
   1.147 -  fix N K assume "0 < K" "\<forall>n\<ge>N. norm (X n) \<le> K"
   1.148 -  then show "\<exists>K>0. \<forall>n. norm (X n) \<le> K"
   1.149 -    by (intro exI[of _ "max (Max (norm ` X ` {..N})) K"] min_max.less_supI2)
   1.150 -       (auto intro!: imageI not_less[where 'a=nat, THEN iffD1] Max_ge simp: le_max_iff_disj)
   1.151 -qed auto
   1.152 -
   1.153 -lemma BseqE: "\<lbrakk>Bseq X; \<And>K. \<lbrakk>0 < K; \<forall>n. norm (X n) \<le> K\<rbrakk> \<Longrightarrow> Q\<rbrakk> \<Longrightarrow> Q"
   1.154 -unfolding Bseq_def by auto
   1.155 -
   1.156 -lemma BseqD: "Bseq X ==> \<exists>K. 0 < K & (\<forall>n. norm (X n) \<le> K)"
   1.157 -by (simp add: Bseq_def)
   1.158 -
   1.159 -lemma BseqI: "[| 0 < K; \<forall>n. norm (X n) \<le> K |] ==> Bseq X"
   1.160 -by (auto simp add: Bseq_def)
   1.161 -
   1.162 -lemma lemma_NBseq_def:
   1.163 -  "(\<exists>K > 0. \<forall>n. norm (X n) \<le> K) = (\<exists>N. \<forall>n. norm (X n) \<le> real(Suc N))"
   1.164 -proof safe
   1.165 -  fix K :: real
   1.166 -  from reals_Archimedean2 obtain n :: nat where "K < real n" ..
   1.167 -  then have "K \<le> real (Suc n)" by auto
   1.168 -  moreover assume "\<forall>m. norm (X m) \<le> K"
   1.169 -  ultimately have "\<forall>m. norm (X m) \<le> real (Suc n)"
   1.170 -    by (blast intro: order_trans)
   1.171 -  then show "\<exists>N. \<forall>n. norm (X n) \<le> real (Suc N)" ..
   1.172 -qed (force simp add: real_of_nat_Suc)
   1.173 -
   1.174 -text{* alternative definition for Bseq *}
   1.175 -lemma Bseq_iff: "Bseq X = (\<exists>N. \<forall>n. norm (X n) \<le> real(Suc N))"
   1.176 -apply (simp add: Bseq_def)
   1.177 -apply (simp (no_asm) add: lemma_NBseq_def)
   1.178 -done
   1.179 -
   1.180 -lemma lemma_NBseq_def2:
   1.181 -     "(\<exists>K > 0. \<forall>n. norm (X n) \<le> K) = (\<exists>N. \<forall>n. norm (X n) < real(Suc N))"
   1.182 -apply (subst lemma_NBseq_def, auto)
   1.183 -apply (rule_tac x = "Suc N" in exI)
   1.184 -apply (rule_tac [2] x = N in exI)
   1.185 -apply (auto simp add: real_of_nat_Suc)
   1.186 - prefer 2 apply (blast intro: order_less_imp_le)
   1.187 -apply (drule_tac x = n in spec, simp)
   1.188 -done
   1.189 -
   1.190 -(* yet another definition for Bseq *)
   1.191 -lemma Bseq_iff1a: "Bseq X = (\<exists>N. \<forall>n. norm (X n) < real(Suc N))"
   1.192 -by (simp add: Bseq_def lemma_NBseq_def2)
   1.193 -
   1.194 -subsubsection{*A Few More Equivalence Theorems for Boundedness*}
   1.195 -
   1.196 -text{*alternative formulation for boundedness*}
   1.197 -lemma Bseq_iff2: "Bseq X = (\<exists>k > 0. \<exists>x. \<forall>n. norm (X(n) + -x) \<le> k)"
   1.198 -apply (unfold Bseq_def, safe)
   1.199 -apply (rule_tac [2] x = "k + norm x" in exI)
   1.200 -apply (rule_tac x = K in exI, simp)
   1.201 -apply (rule exI [where x = 0], auto)
   1.202 -apply (erule order_less_le_trans, simp)
   1.203 -apply (drule_tac x=n in spec, fold diff_minus)
   1.204 -apply (drule order_trans [OF norm_triangle_ineq2])
   1.205 -apply simp
   1.206 -done
   1.207 -
   1.208 -text{*alternative formulation for boundedness*}
   1.209 -lemma Bseq_iff3: "Bseq X = (\<exists>k > 0. \<exists>N. \<forall>n. norm(X(n) + -X(N)) \<le> k)"
   1.210 -apply safe
   1.211 -apply (simp add: Bseq_def, safe)
   1.212 -apply (rule_tac x = "K + norm (X N)" in exI)
   1.213 -apply auto
   1.214 -apply (erule order_less_le_trans, simp)
   1.215 -apply (rule_tac x = N in exI, safe)
   1.216 -apply (drule_tac x = n in spec)
   1.217 -apply (rule order_trans [OF norm_triangle_ineq], simp)
   1.218 -apply (auto simp add: Bseq_iff2)
   1.219 -done
   1.220 -
   1.221 -lemma BseqI2: "(\<forall>n. k \<le> f n & f n \<le> (K::real)) ==> Bseq f"
   1.222 -apply (simp add: Bseq_def)
   1.223 -apply (rule_tac x = " (\<bar>k\<bar> + \<bar>K\<bar>) + 1" in exI, auto)
   1.224 -apply (drule_tac x = n in spec, arith)
   1.225 -done
   1.226 -
   1.227 -subsubsection{*Upper Bounds and Lubs of Bounded Sequences*}
   1.228 -
   1.229 -lemma Bseq_isUb:
   1.230 -  "!!(X::nat=>real). Bseq X ==> \<exists>U. isUb (UNIV::real set) {x. \<exists>n. X n = x} U"
   1.231 -by (auto intro: isUbI setleI simp add: Bseq_def abs_le_iff)
   1.232 -
   1.233 -text{* Use completeness of reals (supremum property)
   1.234 -   to show that any bounded sequence has a least upper bound*}
   1.235 -
   1.236 -lemma Bseq_isLub:
   1.237 -  "!!(X::nat=>real). Bseq X ==>
   1.238 -   \<exists>U. isLub (UNIV::real set) {x. \<exists>n. X n = x} U"
   1.239 -by (blast intro: reals_complete Bseq_isUb)
   1.240 -
   1.241 -subsubsection{*A Bounded and Monotonic Sequence Converges*}
   1.242 -
   1.243 -(* TODO: delete *)
   1.244 -(* FIXME: one use in NSA/HSEQ.thy *)
   1.245 -lemma Bmonoseq_LIMSEQ: "\<forall>n. m \<le> n --> X n = X m ==> \<exists>L. (X ----> L)"
   1.246 -  apply (rule_tac x="X m" in exI)
   1.247 -  apply (rule filterlim_cong[THEN iffD2, OF refl refl _ tendsto_const])
   1.248 -  unfolding eventually_sequentially
   1.249 -  apply blast
   1.250 -  done
   1.251 -
   1.252 -text {* A monotone sequence converges to its least upper bound. *}
   1.253 -
   1.254 -lemma isLub_mono_imp_LIMSEQ:
   1.255 -  fixes X :: "nat \<Rightarrow> real"
   1.256 -  assumes u: "isLub UNIV {x. \<exists>n. X n = x} u" (* FIXME: use 'range X' *)
   1.257 -  assumes X: "\<forall>m n. m \<le> n \<longrightarrow> X m \<le> X n"
   1.258 -  shows "X ----> u"
   1.259 -proof (rule LIMSEQ_I)
   1.260 -  have 1: "\<forall>n. X n \<le> u"
   1.261 -    using isLubD2 [OF u] by auto
   1.262 -  have "\<forall>y. (\<forall>n. X n \<le> y) \<longrightarrow> u \<le> y"
   1.263 -    using isLub_le_isUb [OF u] by (auto simp add: isUb_def setle_def)
   1.264 -  hence 2: "\<forall>y<u. \<exists>n. y < X n"
   1.265 -    by (metis not_le)
   1.266 -  fix r :: real assume "0 < r"
   1.267 -  hence "u - r < u" by simp
   1.268 -  hence "\<exists>m. u - r < X m" using 2 by simp
   1.269 -  then obtain m where "u - r < X m" ..
   1.270 -  with X have "\<forall>n\<ge>m. u - r < X n"
   1.271 -    by (fast intro: less_le_trans)
   1.272 -  hence "\<exists>m. \<forall>n\<ge>m. u - r < X n" ..
   1.273 -  thus "\<exists>m. \<forall>n\<ge>m. norm (X n - u) < r"
   1.274 -    using 1 by (simp add: diff_less_eq add_commute)
   1.275 -qed
   1.276 -
   1.277 -text{*A standard proof of the theorem for monotone increasing sequence*}
   1.278 -
   1.279 -lemma Bseq_mono_convergent:
   1.280 -   "Bseq X \<Longrightarrow> \<forall>m. \<forall>n \<ge> m. X m \<le> X n \<Longrightarrow> convergent (X::nat=>real)"
   1.281 -  by (metis Bseq_isLub isLub_mono_imp_LIMSEQ convergentI)
   1.282 -
   1.283 -lemma Bseq_minus_iff: "Bseq (%n. -(X n) :: 'a :: real_normed_vector) = Bseq X"
   1.284 -  by (simp add: Bseq_def)
   1.285 -
   1.286 -text{*Main monotonicity theorem*}
   1.287 -
   1.288 -lemma Bseq_monoseq_convergent: "Bseq X \<Longrightarrow> monoseq X \<Longrightarrow> convergent (X::nat\<Rightarrow>real)"
   1.289 -  by (metis monoseq_iff incseq_def decseq_eq_incseq convergent_minus_iff Bseq_minus_iff
   1.290 -            Bseq_mono_convergent)
   1.291 -
   1.292 -lemma Cauchy_iff:
   1.293 -  fixes X :: "nat \<Rightarrow> 'a::real_normed_vector"
   1.294 -  shows "Cauchy X \<longleftrightarrow> (\<forall>e>0. \<exists>M. \<forall>m\<ge>M. \<forall>n\<ge>M. norm (X m - X n) < e)"
   1.295 -  unfolding Cauchy_def dist_norm ..
   1.296 -
   1.297 -lemma CauchyI:
   1.298 -  fixes X :: "nat \<Rightarrow> 'a::real_normed_vector"
   1.299 -  shows "(\<And>e. 0 < e \<Longrightarrow> \<exists>M. \<forall>m\<ge>M. \<forall>n\<ge>M. norm (X m - X n) < e) \<Longrightarrow> Cauchy X"
   1.300 -by (simp add: Cauchy_iff)
   1.301 -
   1.302 -lemma CauchyD:
   1.303 -  fixes X :: "nat \<Rightarrow> 'a::real_normed_vector"
   1.304 -  shows "\<lbrakk>Cauchy X; 0 < e\<rbrakk> \<Longrightarrow> \<exists>M. \<forall>m\<ge>M. \<forall>n\<ge>M. norm (X m - X n) < e"
   1.305 -by (simp add: Cauchy_iff)
   1.306 -
   1.307 -lemma Bseq_eq_bounded: "range f \<subseteq> {a .. b::real} \<Longrightarrow> Bseq f"
   1.308 -  apply (simp add: subset_eq)
   1.309 -  apply (rule BseqI'[where K="max (norm a) (norm b)"])
   1.310 -  apply (erule_tac x=n in allE)
   1.311 -  apply auto
   1.312 -  done
   1.313 -
   1.314 -lemma incseq_bounded: "incseq X \<Longrightarrow> \<forall>i. X i \<le> (B::real) \<Longrightarrow> Bseq X"
   1.315 -  by (intro Bseq_eq_bounded[of X "X 0" B]) (auto simp: incseq_def)
   1.316 -
   1.317 -lemma decseq_bounded: "decseq X \<Longrightarrow> \<forall>i. (B::real) \<le> X i \<Longrightarrow> Bseq X"
   1.318 -  by (intro Bseq_eq_bounded[of X B "X 0"]) (auto simp: decseq_def)
   1.319 -
   1.320 -lemma incseq_convergent:
   1.321 -  fixes X :: "nat \<Rightarrow> real"
   1.322 -  assumes "incseq X" and "\<forall>i. X i \<le> B"
   1.323 -  obtains L where "X ----> L" "\<forall>i. X i \<le> L"
   1.324 -proof atomize_elim
   1.325 -  from incseq_bounded[OF assms] `incseq X` Bseq_monoseq_convergent[of X]
   1.326 -  obtain L where "X ----> L"
   1.327 -    by (auto simp: convergent_def monoseq_def incseq_def)
   1.328 -  with `incseq X` show "\<exists>L. X ----> L \<and> (\<forall>i. X i \<le> L)"
   1.329 -    by (auto intro!: exI[of _ L] incseq_le)
   1.330 -qed
   1.331 -
   1.332 -lemma decseq_convergent:
   1.333 -  fixes X :: "nat \<Rightarrow> real"
   1.334 -  assumes "decseq X" and "\<forall>i. B \<le> X i"
   1.335 -  obtains L where "X ----> L" "\<forall>i. L \<le> X i"
   1.336 -proof atomize_elim
   1.337 -  from decseq_bounded[OF assms] `decseq X` Bseq_monoseq_convergent[of X]
   1.338 -  obtain L where "X ----> L"
   1.339 -    by (auto simp: convergent_def monoseq_def decseq_def)
   1.340 -  with `decseq X` show "\<exists>L. X ----> L \<and> (\<forall>i. L \<le> X i)"
   1.341 -    by (auto intro!: exI[of _ L] decseq_le)
   1.342 -qed
   1.343 -
   1.344 -subsubsection {* Cauchy Sequences are Bounded *}
   1.345 -
   1.346 -text{*A Cauchy sequence is bounded -- this is the standard
   1.347 -  proof mechanization rather than the nonstandard proof*}
   1.348 -
   1.349 -lemma lemmaCauchy: "\<forall>n \<ge> M. norm (X M - X n) < (1::real)
   1.350 -          ==>  \<forall>n \<ge> M. norm (X n :: 'a::real_normed_vector) < 1 + norm (X M)"
   1.351 -apply (clarify, drule spec, drule (1) mp)
   1.352 -apply (simp only: norm_minus_commute)
   1.353 -apply (drule order_le_less_trans [OF norm_triangle_ineq2])
   1.354 -apply simp
   1.355 -done
   1.356 -
   1.357 -class banach = real_normed_vector + complete_space
   1.358 -
   1.359 -instance real :: banach by default
   1.360 -
   1.361 -subsection {* Power Sequences *}
   1.362 -
   1.363 -text{*The sequence @{term "x^n"} tends to 0 if @{term "0\<le>x"} and @{term
   1.364 -"x<1"}.  Proof will use (NS) Cauchy equivalence for convergence and
   1.365 -  also fact that bounded and monotonic sequence converges.*}
   1.366 -
   1.367 -lemma Bseq_realpow: "[| 0 \<le> (x::real); x \<le> 1 |] ==> Bseq (%n. x ^ n)"
   1.368 -apply (simp add: Bseq_def)
   1.369 -apply (rule_tac x = 1 in exI)
   1.370 -apply (simp add: power_abs)
   1.371 -apply (auto dest: power_mono)
   1.372 -done
   1.373 -
   1.374 -lemma monoseq_realpow: fixes x :: real shows "[| 0 \<le> x; x \<le> 1 |] ==> monoseq (%n. x ^ n)"
   1.375 -apply (clarify intro!: mono_SucI2)
   1.376 -apply (cut_tac n = n and N = "Suc n" and a = x in power_decreasing, auto)
   1.377 -done
   1.378 -
   1.379 -lemma convergent_realpow:
   1.380 -  "[| 0 \<le> (x::real); x \<le> 1 |] ==> convergent (%n. x ^ n)"
   1.381 -by (blast intro!: Bseq_monoseq_convergent Bseq_realpow monoseq_realpow)
   1.382 -
   1.383 -lemma LIMSEQ_inverse_realpow_zero: "1 < (x::real) \<Longrightarrow> (\<lambda>n. inverse (x ^ n)) ----> 0"
   1.384 -  by (rule filterlim_compose[OF tendsto_inverse_0 filterlim_realpow_sequentially_gt1]) simp
   1.385 -
   1.386 -lemma LIMSEQ_realpow_zero:
   1.387 -  "\<lbrakk>0 \<le> (x::real); x < 1\<rbrakk> \<Longrightarrow> (\<lambda>n. x ^ n) ----> 0"
   1.388 -proof cases
   1.389 -  assume "0 \<le> x" and "x \<noteq> 0"
   1.390 -  hence x0: "0 < x" by simp
   1.391 -  assume x1: "x < 1"
   1.392 -  from x0 x1 have "1 < inverse x"
   1.393 -    by (rule one_less_inverse)
   1.394 -  hence "(\<lambda>n. inverse (inverse x ^ n)) ----> 0"
   1.395 -    by (rule LIMSEQ_inverse_realpow_zero)
   1.396 -  thus ?thesis by (simp add: power_inverse)
   1.397 -qed (rule LIMSEQ_imp_Suc, simp add: tendsto_const)
   1.398 -
   1.399 -lemma LIMSEQ_power_zero:
   1.400 -  fixes x :: "'a::{real_normed_algebra_1}"
   1.401 -  shows "norm x < 1 \<Longrightarrow> (\<lambda>n. x ^ n) ----> 0"
   1.402 -apply (drule LIMSEQ_realpow_zero [OF norm_ge_zero])
   1.403 -apply (simp only: tendsto_Zfun_iff, erule Zfun_le)
   1.404 -apply (simp add: power_abs norm_power_ineq)
   1.405 -done
   1.406 -
   1.407 -lemma LIMSEQ_divide_realpow_zero: "1 < x \<Longrightarrow> (\<lambda>n. a / (x ^ n) :: real) ----> 0"
   1.408 -  by (rule tendsto_divide_0 [OF tendsto_const filterlim_realpow_sequentially_gt1]) simp
   1.409 -
   1.410 -text{*Limit of @{term "c^n"} for @{term"\<bar>c\<bar> < 1"}*}
   1.411 -
   1.412 -lemma LIMSEQ_rabs_realpow_zero: "\<bar>c\<bar> < 1 \<Longrightarrow> (\<lambda>n. \<bar>c\<bar> ^ n :: real) ----> 0"
   1.413 -  by (rule LIMSEQ_realpow_zero [OF abs_ge_zero])
   1.414 -
   1.415 -lemma LIMSEQ_rabs_realpow_zero2: "\<bar>c\<bar> < 1 \<Longrightarrow> (\<lambda>n. c ^ n :: real) ----> 0"
   1.416 -  by (rule LIMSEQ_power_zero) simp
   1.417 -
   1.418 -end