| author | hoelzl |
| Fri, 22 Mar 2013 10:41:43 +0100 | |
| changeset 51472 | adb441e4b9e9 |
| parent 51471 | cad22a3cc09c |
| child 51474 | 1e9e68247ad1 |
| permissions | -rw-r--r-- |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
1 |
(* Title : Limits.thy |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
2 |
Author : Brian Huffman |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
3 |
*) |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
4 |
|
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
5 |
header {* Filters and Limits *}
|
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
6 |
|
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
7 |
theory Limits |
| 36822 | 8 |
imports RealVector |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
9 |
begin |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
10 |
|
|
50324
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
11 |
definition at_infinity :: "'a::real_normed_vector filter" where |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
12 |
"at_infinity = Abs_filter (\<lambda>P. \<exists>r. \<forall>x. r \<le> norm x \<longrightarrow> P x)" |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
13 |
|
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
14 |
lemma eventually_at_infinity: |
| 50325 | 15 |
"eventually P at_infinity \<longleftrightarrow> (\<exists>b. \<forall>x. b \<le> norm x \<longrightarrow> P x)" |
|
50324
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
16 |
unfolding at_infinity_def |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
17 |
proof (rule eventually_Abs_filter, rule is_filter.intro) |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
18 |
fix P Q :: "'a \<Rightarrow> bool" |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
19 |
assume "\<exists>r. \<forall>x. r \<le> norm x \<longrightarrow> P x" and "\<exists>s. \<forall>x. s \<le> norm x \<longrightarrow> Q x" |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
20 |
then obtain r s where |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
21 |
"\<forall>x. r \<le> norm x \<longrightarrow> P x" and "\<forall>x. s \<le> norm x \<longrightarrow> Q x" by auto |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
22 |
then have "\<forall>x. max r s \<le> norm x \<longrightarrow> P x \<and> Q x" by simp |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
23 |
then show "\<exists>r. \<forall>x. r \<le> norm x \<longrightarrow> P x \<and> Q x" .. |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
24 |
qed auto |
| 31392 | 25 |
|
| 50325 | 26 |
lemma at_infinity_eq_at_top_bot: |
27 |
"(at_infinity \<Colon> real filter) = sup at_top at_bot" |
|
28 |
unfolding sup_filter_def at_infinity_def eventually_at_top_linorder eventually_at_bot_linorder |
|
29 |
proof (intro arg_cong[where f=Abs_filter] ext iffI) |
|
30 |
fix P :: "real \<Rightarrow> bool" assume "\<exists>r. \<forall>x. r \<le> norm x \<longrightarrow> P x" |
|
31 |
then guess r .. |
|
32 |
then have "(\<forall>x\<ge>r. P x) \<and> (\<forall>x\<le>-r. P x)" by auto |
|
33 |
then show "(\<exists>r. \<forall>x\<ge>r. P x) \<and> (\<exists>r. \<forall>x\<le>r. P x)" by auto |
|
34 |
next |
|
35 |
fix P :: "real \<Rightarrow> bool" assume "(\<exists>r. \<forall>x\<ge>r. P x) \<and> (\<exists>r. \<forall>x\<le>r. P x)" |
|
36 |
then obtain p q where "\<forall>x\<ge>p. P x" "\<forall>x\<le>q. P x" by auto |
|
37 |
then show "\<exists>r. \<forall>x. r \<le> norm x \<longrightarrow> P x" |
|
38 |
by (intro exI[of _ "max p (-q)"]) |
|
39 |
(auto simp: abs_real_def) |
|
40 |
qed |
|
41 |
||
42 |
lemma at_top_le_at_infinity: |
|
43 |
"at_top \<le> (at_infinity :: real filter)" |
|
44 |
unfolding at_infinity_eq_at_top_bot by simp |
|
45 |
||
46 |
lemma at_bot_le_at_infinity: |
|
47 |
"at_bot \<le> (at_infinity :: real filter)" |
|
48 |
unfolding at_infinity_eq_at_top_bot by simp |
|
49 |
||
| 31355 | 50 |
subsection {* Boundedness *}
|
51 |
||
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
52 |
definition Bfun :: "('a \<Rightarrow> 'b::real_normed_vector) \<Rightarrow> 'a filter \<Rightarrow> bool"
|
| 44195 | 53 |
where "Bfun f F = (\<exists>K>0. eventually (\<lambda>x. norm (f x) \<le> K) F)" |
| 31355 | 54 |
|
|
31487
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
55 |
lemma BfunI: |
| 44195 | 56 |
assumes K: "eventually (\<lambda>x. norm (f x) \<le> K) F" shows "Bfun f F" |
| 31355 | 57 |
unfolding Bfun_def |
58 |
proof (intro exI conjI allI) |
|
59 |
show "0 < max K 1" by simp |
|
60 |
next |
|
| 44195 | 61 |
show "eventually (\<lambda>x. norm (f x) \<le> max K 1) F" |
| 31355 | 62 |
using K by (rule eventually_elim1, simp) |
63 |
qed |
|
64 |
||
65 |
lemma BfunE: |
|
| 44195 | 66 |
assumes "Bfun f F" |
67 |
obtains B where "0 < B" and "eventually (\<lambda>x. norm (f x) \<le> B) F" |
|
| 31355 | 68 |
using assms unfolding Bfun_def by fast |
69 |
||
70 |
||
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
71 |
subsection {* Convergence to Zero *}
|
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
72 |
|
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
73 |
definition Zfun :: "('a \<Rightarrow> 'b::real_normed_vector) \<Rightarrow> 'a filter \<Rightarrow> bool"
|
| 44195 | 74 |
where "Zfun f F = (\<forall>r>0. eventually (\<lambda>x. norm (f x) < r) F)" |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
75 |
|
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
76 |
lemma ZfunI: |
| 44195 | 77 |
"(\<And>r. 0 < r \<Longrightarrow> eventually (\<lambda>x. norm (f x) < r) F) \<Longrightarrow> Zfun f F" |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
78 |
unfolding Zfun_def by simp |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
79 |
|
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
80 |
lemma ZfunD: |
| 44195 | 81 |
"\<lbrakk>Zfun f F; 0 < r\<rbrakk> \<Longrightarrow> eventually (\<lambda>x. norm (f x) < r) F" |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
82 |
unfolding Zfun_def by simp |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
83 |
|
| 31355 | 84 |
lemma Zfun_ssubst: |
| 44195 | 85 |
"eventually (\<lambda>x. f x = g x) F \<Longrightarrow> Zfun g F \<Longrightarrow> Zfun f F" |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
86 |
unfolding Zfun_def by (auto elim!: eventually_rev_mp) |
| 31355 | 87 |
|
| 44195 | 88 |
lemma Zfun_zero: "Zfun (\<lambda>x. 0) F" |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
89 |
unfolding Zfun_def by simp |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
90 |
|
| 44195 | 91 |
lemma Zfun_norm_iff: "Zfun (\<lambda>x. norm (f x)) F = Zfun (\<lambda>x. f x) F" |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
92 |
unfolding Zfun_def by simp |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
93 |
|
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
94 |
lemma Zfun_imp_Zfun: |
| 44195 | 95 |
assumes f: "Zfun f F" |
96 |
assumes g: "eventually (\<lambda>x. norm (g x) \<le> norm (f x) * K) F" |
|
97 |
shows "Zfun (\<lambda>x. g x) F" |
|
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
98 |
proof (cases) |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
99 |
assume K: "0 < K" |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
100 |
show ?thesis |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
101 |
proof (rule ZfunI) |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
102 |
fix r::real assume "0 < r" |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
103 |
hence "0 < r / K" |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
104 |
using K by (rule divide_pos_pos) |
| 44195 | 105 |
then have "eventually (\<lambda>x. norm (f x) < r / K) F" |
|
31487
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
106 |
using ZfunD [OF f] by fast |
| 44195 | 107 |
with g show "eventually (\<lambda>x. norm (g x) < r) F" |
| 46887 | 108 |
proof eventually_elim |
109 |
case (elim x) |
|
|
31487
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
110 |
hence "norm (f x) * K < r" |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
111 |
by (simp add: pos_less_divide_eq K) |
| 46887 | 112 |
thus ?case |
113 |
by (simp add: order_le_less_trans [OF elim(1)]) |
|
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
114 |
qed |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
115 |
qed |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
116 |
next |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
117 |
assume "\<not> 0 < K" |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
118 |
hence K: "K \<le> 0" by (simp only: not_less) |
| 31355 | 119 |
show ?thesis |
120 |
proof (rule ZfunI) |
|
121 |
fix r :: real |
|
122 |
assume "0 < r" |
|
| 44195 | 123 |
from g show "eventually (\<lambda>x. norm (g x) < r) F" |
| 46887 | 124 |
proof eventually_elim |
125 |
case (elim x) |
|
126 |
also have "norm (f x) * K \<le> norm (f x) * 0" |
|
| 31355 | 127 |
using K norm_ge_zero by (rule mult_left_mono) |
| 46887 | 128 |
finally show ?case |
| 31355 | 129 |
using `0 < r` by simp |
130 |
qed |
|
131 |
qed |
|
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
132 |
qed |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
133 |
|
| 44195 | 134 |
lemma Zfun_le: "\<lbrakk>Zfun g F; \<forall>x. norm (f x) \<le> norm (g x)\<rbrakk> \<Longrightarrow> Zfun f F" |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
135 |
by (erule_tac K="1" in Zfun_imp_Zfun, simp) |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
136 |
|
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
137 |
lemma Zfun_add: |
| 44195 | 138 |
assumes f: "Zfun f F" and g: "Zfun g F" |
139 |
shows "Zfun (\<lambda>x. f x + g x) F" |
|
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
140 |
proof (rule ZfunI) |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
141 |
fix r::real assume "0 < r" |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
142 |
hence r: "0 < r / 2" by simp |
| 44195 | 143 |
have "eventually (\<lambda>x. norm (f x) < r/2) F" |
|
31487
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
144 |
using f r by (rule ZfunD) |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
145 |
moreover |
| 44195 | 146 |
have "eventually (\<lambda>x. norm (g x) < r/2) F" |
|
31487
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
147 |
using g r by (rule ZfunD) |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
148 |
ultimately |
| 44195 | 149 |
show "eventually (\<lambda>x. norm (f x + g x) < r) F" |
| 46887 | 150 |
proof eventually_elim |
151 |
case (elim x) |
|
|
31487
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
152 |
have "norm (f x + g x) \<le> norm (f x) + norm (g x)" |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
153 |
by (rule norm_triangle_ineq) |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
154 |
also have "\<dots> < r/2 + r/2" |
| 46887 | 155 |
using elim by (rule add_strict_mono) |
156 |
finally show ?case |
|
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
157 |
by simp |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
158 |
qed |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
159 |
qed |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
160 |
|
| 44195 | 161 |
lemma Zfun_minus: "Zfun f F \<Longrightarrow> Zfun (\<lambda>x. - f x) F" |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
162 |
unfolding Zfun_def by simp |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
163 |
|
| 44195 | 164 |
lemma Zfun_diff: "\<lbrakk>Zfun f F; Zfun g F\<rbrakk> \<Longrightarrow> Zfun (\<lambda>x. f x - g x) F" |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
165 |
by (simp only: diff_minus Zfun_add Zfun_minus) |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
166 |
|
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
167 |
lemma (in bounded_linear) Zfun: |
| 44195 | 168 |
assumes g: "Zfun g F" |
169 |
shows "Zfun (\<lambda>x. f (g x)) F" |
|
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
170 |
proof - |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
171 |
obtain K where "\<And>x. norm (f x) \<le> norm x * K" |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
172 |
using bounded by fast |
| 44195 | 173 |
then have "eventually (\<lambda>x. norm (f (g x)) \<le> norm (g x) * K) F" |
| 31355 | 174 |
by simp |
|
31487
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
175 |
with g show ?thesis |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
176 |
by (rule Zfun_imp_Zfun) |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
177 |
qed |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
178 |
|
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
179 |
lemma (in bounded_bilinear) Zfun: |
| 44195 | 180 |
assumes f: "Zfun f F" |
181 |
assumes g: "Zfun g F" |
|
182 |
shows "Zfun (\<lambda>x. f x ** g x) F" |
|
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
183 |
proof (rule ZfunI) |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
184 |
fix r::real assume r: "0 < r" |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
185 |
obtain K where K: "0 < K" |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
186 |
and norm_le: "\<And>x y. norm (x ** y) \<le> norm x * norm y * K" |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
187 |
using pos_bounded by fast |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
188 |
from K have K': "0 < inverse K" |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
189 |
by (rule positive_imp_inverse_positive) |
| 44195 | 190 |
have "eventually (\<lambda>x. norm (f x) < r) F" |
|
31487
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
191 |
using f r by (rule ZfunD) |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
192 |
moreover |
| 44195 | 193 |
have "eventually (\<lambda>x. norm (g x) < inverse K) F" |
|
31487
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
194 |
using g K' by (rule ZfunD) |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
195 |
ultimately |
| 44195 | 196 |
show "eventually (\<lambda>x. norm (f x ** g x) < r) F" |
| 46887 | 197 |
proof eventually_elim |
198 |
case (elim x) |
|
|
31487
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
199 |
have "norm (f x ** g x) \<le> norm (f x) * norm (g x) * K" |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
200 |
by (rule norm_le) |
|
31487
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
201 |
also have "norm (f x) * norm (g x) * K < r * inverse K * K" |
| 46887 | 202 |
by (intro mult_strict_right_mono mult_strict_mono' norm_ge_zero elim K) |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
203 |
also from K have "r * inverse K * K = r" |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
204 |
by simp |
| 46887 | 205 |
finally show ?case . |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
206 |
qed |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
207 |
qed |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
208 |
|
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
209 |
lemma (in bounded_bilinear) Zfun_left: |
| 44195 | 210 |
"Zfun f F \<Longrightarrow> Zfun (\<lambda>x. f x ** a) F" |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
211 |
by (rule bounded_linear_left [THEN bounded_linear.Zfun]) |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
212 |
|
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
213 |
lemma (in bounded_bilinear) Zfun_right: |
| 44195 | 214 |
"Zfun f F \<Longrightarrow> Zfun (\<lambda>x. a ** f x) F" |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
215 |
by (rule bounded_linear_right [THEN bounded_linear.Zfun]) |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
216 |
|
|
44282
f0de18b62d63
remove bounded_(bi)linear locale interpretations, to avoid duplicating so many lemmas
huffman
parents:
44253
diff
changeset
|
217 |
lemmas Zfun_mult = bounded_bilinear.Zfun [OF bounded_bilinear_mult] |
|
f0de18b62d63
remove bounded_(bi)linear locale interpretations, to avoid duplicating so many lemmas
huffman
parents:
44253
diff
changeset
|
218 |
lemmas Zfun_mult_right = bounded_bilinear.Zfun_right [OF bounded_bilinear_mult] |
|
f0de18b62d63
remove bounded_(bi)linear locale interpretations, to avoid duplicating so many lemmas
huffman
parents:
44253
diff
changeset
|
219 |
lemmas Zfun_mult_left = bounded_bilinear.Zfun_left [OF bounded_bilinear_mult] |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
220 |
|
| 44195 | 221 |
lemma tendsto_Zfun_iff: "(f ---> a) F = Zfun (\<lambda>x. f x - a) F" |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
222 |
by (simp only: tendsto_iff Zfun_def dist_norm) |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
223 |
|
|
44205
18da2a87421c
generalize constant 'lim' and limit uniqueness theorems to class t2_space
huffman
parents:
44195
diff
changeset
|
224 |
subsubsection {* Distance and norms *}
|
|
36662
621122eeb138
generalize types of LIMSEQ and LIM; generalize many lemmas
huffman
parents:
36656
diff
changeset
|
225 |
|
|
621122eeb138
generalize types of LIMSEQ and LIM; generalize many lemmas
huffman
parents:
36656
diff
changeset
|
226 |
lemma norm_conv_dist: "norm x = dist x 0" |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
227 |
unfolding dist_norm by simp |
|
36662
621122eeb138
generalize types of LIMSEQ and LIM; generalize many lemmas
huffman
parents:
36656
diff
changeset
|
228 |
|
| 31565 | 229 |
lemma tendsto_norm [tendsto_intros]: |
| 44195 | 230 |
"(f ---> a) F \<Longrightarrow> ((\<lambda>x. norm (f x)) ---> norm a) F" |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
231 |
unfolding norm_conv_dist by (intro tendsto_intros) |
|
36662
621122eeb138
generalize types of LIMSEQ and LIM; generalize many lemmas
huffman
parents:
36656
diff
changeset
|
232 |
|
|
621122eeb138
generalize types of LIMSEQ and LIM; generalize many lemmas
huffman
parents:
36656
diff
changeset
|
233 |
lemma tendsto_norm_zero: |
| 44195 | 234 |
"(f ---> 0) F \<Longrightarrow> ((\<lambda>x. norm (f x)) ---> 0) F" |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
235 |
by (drule tendsto_norm, simp) |
|
36662
621122eeb138
generalize types of LIMSEQ and LIM; generalize many lemmas
huffman
parents:
36656
diff
changeset
|
236 |
|
|
621122eeb138
generalize types of LIMSEQ and LIM; generalize many lemmas
huffman
parents:
36656
diff
changeset
|
237 |
lemma tendsto_norm_zero_cancel: |
| 44195 | 238 |
"((\<lambda>x. norm (f x)) ---> 0) F \<Longrightarrow> (f ---> 0) F" |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
239 |
unfolding tendsto_iff dist_norm by simp |
|
36662
621122eeb138
generalize types of LIMSEQ and LIM; generalize many lemmas
huffman
parents:
36656
diff
changeset
|
240 |
|
|
621122eeb138
generalize types of LIMSEQ and LIM; generalize many lemmas
huffman
parents:
36656
diff
changeset
|
241 |
lemma tendsto_norm_zero_iff: |
| 44195 | 242 |
"((\<lambda>x. norm (f x)) ---> 0) F \<longleftrightarrow> (f ---> 0) F" |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
243 |
unfolding tendsto_iff dist_norm by simp |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
244 |
|
|
44194
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
245 |
lemma tendsto_rabs [tendsto_intros]: |
| 44195 | 246 |
"(f ---> (l::real)) F \<Longrightarrow> ((\<lambda>x. \<bar>f x\<bar>) ---> \<bar>l\<bar>) F" |
|
44194
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
247 |
by (fold real_norm_def, rule tendsto_norm) |
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
248 |
|
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
249 |
lemma tendsto_rabs_zero: |
| 44195 | 250 |
"(f ---> (0::real)) F \<Longrightarrow> ((\<lambda>x. \<bar>f x\<bar>) ---> 0) F" |
|
44194
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
251 |
by (fold real_norm_def, rule tendsto_norm_zero) |
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
252 |
|
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
253 |
lemma tendsto_rabs_zero_cancel: |
| 44195 | 254 |
"((\<lambda>x. \<bar>f x\<bar>) ---> (0::real)) F \<Longrightarrow> (f ---> 0) F" |
|
44194
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
255 |
by (fold real_norm_def, rule tendsto_norm_zero_cancel) |
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
256 |
|
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
257 |
lemma tendsto_rabs_zero_iff: |
| 44195 | 258 |
"((\<lambda>x. \<bar>f x\<bar>) ---> (0::real)) F \<longleftrightarrow> (f ---> 0) F" |
|
44194
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
259 |
by (fold real_norm_def, rule tendsto_norm_zero_iff) |
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
260 |
|
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
261 |
subsubsection {* Addition and subtraction *}
|
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
262 |
|
| 31565 | 263 |
lemma tendsto_add [tendsto_intros]: |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
264 |
fixes a b :: "'a::real_normed_vector" |
| 44195 | 265 |
shows "\<lbrakk>(f ---> a) F; (g ---> b) F\<rbrakk> \<Longrightarrow> ((\<lambda>x. f x + g x) ---> a + b) F" |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
266 |
by (simp only: tendsto_Zfun_iff add_diff_add Zfun_add) |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
267 |
|
|
44194
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
268 |
lemma tendsto_add_zero: |
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
269 |
fixes f g :: "'a::type \<Rightarrow> 'b::real_normed_vector" |
| 44195 | 270 |
shows "\<lbrakk>(f ---> 0) F; (g ---> 0) F\<rbrakk> \<Longrightarrow> ((\<lambda>x. f x + g x) ---> 0) F" |
|
44194
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
271 |
by (drule (1) tendsto_add, simp) |
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
272 |
|
| 31565 | 273 |
lemma tendsto_minus [tendsto_intros]: |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
274 |
fixes a :: "'a::real_normed_vector" |
| 44195 | 275 |
shows "(f ---> a) F \<Longrightarrow> ((\<lambda>x. - f x) ---> - a) F" |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
276 |
by (simp only: tendsto_Zfun_iff minus_diff_minus Zfun_minus) |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
277 |
|
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
278 |
lemma tendsto_minus_cancel: |
|
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
279 |
fixes a :: "'a::real_normed_vector" |
| 44195 | 280 |
shows "((\<lambda>x. - f x) ---> - a) F \<Longrightarrow> (f ---> a) F" |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
281 |
by (drule tendsto_minus, simp) |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
282 |
|
|
50330
d0b12171118e
conversion rules for at, at_left and at_right; applied to l'Hopital's rules.
hoelzl
parents:
50327
diff
changeset
|
283 |
lemma tendsto_minus_cancel_left: |
|
d0b12171118e
conversion rules for at, at_left and at_right; applied to l'Hopital's rules.
hoelzl
parents:
50327
diff
changeset
|
284 |
"(f ---> - (y::_::real_normed_vector)) F \<longleftrightarrow> ((\<lambda>x. - f x) ---> y) F" |
|
d0b12171118e
conversion rules for at, at_left and at_right; applied to l'Hopital's rules.
hoelzl
parents:
50327
diff
changeset
|
285 |
using tendsto_minus_cancel[of f "- y" F] tendsto_minus[of f "- y" F] |
|
d0b12171118e
conversion rules for at, at_left and at_right; applied to l'Hopital's rules.
hoelzl
parents:
50327
diff
changeset
|
286 |
by auto |
|
d0b12171118e
conversion rules for at, at_left and at_right; applied to l'Hopital's rules.
hoelzl
parents:
50327
diff
changeset
|
287 |
|
| 31565 | 288 |
lemma tendsto_diff [tendsto_intros]: |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
289 |
fixes a b :: "'a::real_normed_vector" |
| 44195 | 290 |
shows "\<lbrakk>(f ---> a) F; (g ---> b) F\<rbrakk> \<Longrightarrow> ((\<lambda>x. f x - g x) ---> a - b) F" |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
291 |
by (simp add: diff_minus tendsto_add tendsto_minus) |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
292 |
|
| 31588 | 293 |
lemma tendsto_setsum [tendsto_intros]: |
294 |
fixes f :: "'a \<Rightarrow> 'b \<Rightarrow> 'c::real_normed_vector" |
|
| 44195 | 295 |
assumes "\<And>i. i \<in> S \<Longrightarrow> (f i ---> a i) F" |
296 |
shows "((\<lambda>x. \<Sum>i\<in>S. f i x) ---> (\<Sum>i\<in>S. a i)) F" |
|
| 31588 | 297 |
proof (cases "finite S") |
298 |
assume "finite S" thus ?thesis using assms |
|
|
44194
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
299 |
by (induct, simp add: tendsto_const, simp add: tendsto_add) |
| 31588 | 300 |
next |
301 |
assume "\<not> finite S" thus ?thesis |
|
302 |
by (simp add: tendsto_const) |
|
303 |
qed |
|
304 |
||
| 50999 | 305 |
lemmas real_tendsto_sandwich = tendsto_sandwich[where 'b=real] |
306 |
||
|
44194
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
307 |
subsubsection {* Linear operators and multiplication *}
|
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
308 |
|
|
44282
f0de18b62d63
remove bounded_(bi)linear locale interpretations, to avoid duplicating so many lemmas
huffman
parents:
44253
diff
changeset
|
309 |
lemma (in bounded_linear) tendsto: |
| 44195 | 310 |
"(g ---> a) F \<Longrightarrow> ((\<lambda>x. f (g x)) ---> f a) F" |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
311 |
by (simp only: tendsto_Zfun_iff diff [symmetric] Zfun) |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
312 |
|
|
44194
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
313 |
lemma (in bounded_linear) tendsto_zero: |
| 44195 | 314 |
"(g ---> 0) F \<Longrightarrow> ((\<lambda>x. f (g x)) ---> 0) F" |
|
44194
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
315 |
by (drule tendsto, simp only: zero) |
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
316 |
|
|
44282
f0de18b62d63
remove bounded_(bi)linear locale interpretations, to avoid duplicating so many lemmas
huffman
parents:
44253
diff
changeset
|
317 |
lemma (in bounded_bilinear) tendsto: |
| 44195 | 318 |
"\<lbrakk>(f ---> a) F; (g ---> b) F\<rbrakk> \<Longrightarrow> ((\<lambda>x. f x ** g x) ---> a ** b) F" |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
319 |
by (simp only: tendsto_Zfun_iff prod_diff_prod |
|
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
320 |
Zfun_add Zfun Zfun_left Zfun_right) |
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
321 |
|
|
44194
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
322 |
lemma (in bounded_bilinear) tendsto_zero: |
| 44195 | 323 |
assumes f: "(f ---> 0) F" |
324 |
assumes g: "(g ---> 0) F" |
|
325 |
shows "((\<lambda>x. f x ** g x) ---> 0) F" |
|
|
44194
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
326 |
using tendsto [OF f g] by (simp add: zero_left) |
| 31355 | 327 |
|
|
44194
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
328 |
lemma (in bounded_bilinear) tendsto_left_zero: |
| 44195 | 329 |
"(f ---> 0) F \<Longrightarrow> ((\<lambda>x. f x ** c) ---> 0) F" |
|
44194
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
330 |
by (rule bounded_linear.tendsto_zero [OF bounded_linear_left]) |
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
331 |
|
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
332 |
lemma (in bounded_bilinear) tendsto_right_zero: |
| 44195 | 333 |
"(f ---> 0) F \<Longrightarrow> ((\<lambda>x. c ** f x) ---> 0) F" |
|
44194
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
334 |
by (rule bounded_linear.tendsto_zero [OF bounded_linear_right]) |
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
335 |
|
|
44282
f0de18b62d63
remove bounded_(bi)linear locale interpretations, to avoid duplicating so many lemmas
huffman
parents:
44253
diff
changeset
|
336 |
lemmas tendsto_of_real [tendsto_intros] = |
|
f0de18b62d63
remove bounded_(bi)linear locale interpretations, to avoid duplicating so many lemmas
huffman
parents:
44253
diff
changeset
|
337 |
bounded_linear.tendsto [OF bounded_linear_of_real] |
|
f0de18b62d63
remove bounded_(bi)linear locale interpretations, to avoid duplicating so many lemmas
huffman
parents:
44253
diff
changeset
|
338 |
|
|
f0de18b62d63
remove bounded_(bi)linear locale interpretations, to avoid duplicating so many lemmas
huffman
parents:
44253
diff
changeset
|
339 |
lemmas tendsto_scaleR [tendsto_intros] = |
|
f0de18b62d63
remove bounded_(bi)linear locale interpretations, to avoid duplicating so many lemmas
huffman
parents:
44253
diff
changeset
|
340 |
bounded_bilinear.tendsto [OF bounded_bilinear_scaleR] |
|
f0de18b62d63
remove bounded_(bi)linear locale interpretations, to avoid duplicating so many lemmas
huffman
parents:
44253
diff
changeset
|
341 |
|
|
f0de18b62d63
remove bounded_(bi)linear locale interpretations, to avoid duplicating so many lemmas
huffman
parents:
44253
diff
changeset
|
342 |
lemmas tendsto_mult [tendsto_intros] = |
|
f0de18b62d63
remove bounded_(bi)linear locale interpretations, to avoid duplicating so many lemmas
huffman
parents:
44253
diff
changeset
|
343 |
bounded_bilinear.tendsto [OF bounded_bilinear_mult] |
|
44194
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
344 |
|
|
44568
e6f291cb5810
discontinue many legacy theorems about LIM and LIMSEQ, in favor of tendsto theorems
huffman
parents:
44342
diff
changeset
|
345 |
lemmas tendsto_mult_zero = |
|
e6f291cb5810
discontinue many legacy theorems about LIM and LIMSEQ, in favor of tendsto theorems
huffman
parents:
44342
diff
changeset
|
346 |
bounded_bilinear.tendsto_zero [OF bounded_bilinear_mult] |
|
e6f291cb5810
discontinue many legacy theorems about LIM and LIMSEQ, in favor of tendsto theorems
huffman
parents:
44342
diff
changeset
|
347 |
|
|
e6f291cb5810
discontinue many legacy theorems about LIM and LIMSEQ, in favor of tendsto theorems
huffman
parents:
44342
diff
changeset
|
348 |
lemmas tendsto_mult_left_zero = |
|
e6f291cb5810
discontinue many legacy theorems about LIM and LIMSEQ, in favor of tendsto theorems
huffman
parents:
44342
diff
changeset
|
349 |
bounded_bilinear.tendsto_left_zero [OF bounded_bilinear_mult] |
|
e6f291cb5810
discontinue many legacy theorems about LIM and LIMSEQ, in favor of tendsto theorems
huffman
parents:
44342
diff
changeset
|
350 |
|
|
e6f291cb5810
discontinue many legacy theorems about LIM and LIMSEQ, in favor of tendsto theorems
huffman
parents:
44342
diff
changeset
|
351 |
lemmas tendsto_mult_right_zero = |
|
e6f291cb5810
discontinue many legacy theorems about LIM and LIMSEQ, in favor of tendsto theorems
huffman
parents:
44342
diff
changeset
|
352 |
bounded_bilinear.tendsto_right_zero [OF bounded_bilinear_mult] |
|
e6f291cb5810
discontinue many legacy theorems about LIM and LIMSEQ, in favor of tendsto theorems
huffman
parents:
44342
diff
changeset
|
353 |
|
|
44194
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
354 |
lemma tendsto_power [tendsto_intros]: |
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
355 |
fixes f :: "'a \<Rightarrow> 'b::{power,real_normed_algebra}"
|
| 44195 | 356 |
shows "(f ---> a) F \<Longrightarrow> ((\<lambda>x. f x ^ n) ---> a ^ n) F" |
|
44194
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
357 |
by (induct n) (simp_all add: tendsto_const tendsto_mult) |
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
358 |
|
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
359 |
lemma tendsto_setprod [tendsto_intros]: |
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
360 |
fixes f :: "'a \<Rightarrow> 'b \<Rightarrow> 'c::{real_normed_algebra,comm_ring_1}"
|
| 44195 | 361 |
assumes "\<And>i. i \<in> S \<Longrightarrow> (f i ---> L i) F" |
362 |
shows "((\<lambda>x. \<Prod>i\<in>S. f i x) ---> (\<Prod>i\<in>S. L i)) F" |
|
|
44194
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
363 |
proof (cases "finite S") |
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
364 |
assume "finite S" thus ?thesis using assms |
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
365 |
by (induct, simp add: tendsto_const, simp add: tendsto_mult) |
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
366 |
next |
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
367 |
assume "\<not> finite S" thus ?thesis |
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
368 |
by (simp add: tendsto_const) |
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
369 |
qed |
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
370 |
|
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
371 |
subsubsection {* Inverse and division *}
|
| 31355 | 372 |
|
373 |
lemma (in bounded_bilinear) Zfun_prod_Bfun: |
|
| 44195 | 374 |
assumes f: "Zfun f F" |
375 |
assumes g: "Bfun g F" |
|
376 |
shows "Zfun (\<lambda>x. f x ** g x) F" |
|
| 31355 | 377 |
proof - |
378 |
obtain K where K: "0 \<le> K" |
|
379 |
and norm_le: "\<And>x y. norm (x ** y) \<le> norm x * norm y * K" |
|
380 |
using nonneg_bounded by fast |
|
381 |
obtain B where B: "0 < B" |
|
| 44195 | 382 |
and norm_g: "eventually (\<lambda>x. norm (g x) \<le> B) F" |
|
31487
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
383 |
using g by (rule BfunE) |
| 44195 | 384 |
have "eventually (\<lambda>x. norm (f x ** g x) \<le> norm (f x) * (B * K)) F" |
| 46887 | 385 |
using norm_g proof eventually_elim |
386 |
case (elim x) |
|
|
31487
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
387 |
have "norm (f x ** g x) \<le> norm (f x) * norm (g x) * K" |
| 31355 | 388 |
by (rule norm_le) |
|
31487
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
389 |
also have "\<dots> \<le> norm (f x) * B * K" |
|
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
390 |
by (intro mult_mono' order_refl norm_g norm_ge_zero |
| 46887 | 391 |
mult_nonneg_nonneg K elim) |
|
31487
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
392 |
also have "\<dots> = norm (f x) * (B * K)" |
| 31355 | 393 |
by (rule mult_assoc) |
|
31487
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
394 |
finally show "norm (f x ** g x) \<le> norm (f x) * (B * K)" . |
| 31355 | 395 |
qed |
|
31487
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
396 |
with f show ?thesis |
|
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
397 |
by (rule Zfun_imp_Zfun) |
| 31355 | 398 |
qed |
399 |
||
400 |
lemma (in bounded_bilinear) flip: |
|
401 |
"bounded_bilinear (\<lambda>x y. y ** x)" |
|
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
402 |
apply default |
|
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
403 |
apply (rule add_right) |
|
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
404 |
apply (rule add_left) |
|
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
405 |
apply (rule scaleR_right) |
|
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
406 |
apply (rule scaleR_left) |
|
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
407 |
apply (subst mult_commute) |
|
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
408 |
using bounded by fast |
| 31355 | 409 |
|
410 |
lemma (in bounded_bilinear) Bfun_prod_Zfun: |
|
| 44195 | 411 |
assumes f: "Bfun f F" |
412 |
assumes g: "Zfun g F" |
|
413 |
shows "Zfun (\<lambda>x. f x ** g x) F" |
|
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
414 |
using flip g f by (rule bounded_bilinear.Zfun_prod_Bfun) |
| 31355 | 415 |
|
416 |
lemma Bfun_inverse_lemma: |
|
417 |
fixes x :: "'a::real_normed_div_algebra" |
|
418 |
shows "\<lbrakk>r \<le> norm x; 0 < r\<rbrakk> \<Longrightarrow> norm (inverse x) \<le> inverse r" |
|
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
419 |
apply (subst nonzero_norm_inverse, clarsimp) |
|
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
420 |
apply (erule (1) le_imp_inverse_le) |
|
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44079
diff
changeset
|
421 |
done |
| 31355 | 422 |
|
423 |
lemma Bfun_inverse: |
|
424 |
fixes a :: "'a::real_normed_div_algebra" |
|
| 44195 | 425 |
assumes f: "(f ---> a) F" |
| 31355 | 426 |
assumes a: "a \<noteq> 0" |
| 44195 | 427 |
shows "Bfun (\<lambda>x. inverse (f x)) F" |
| 31355 | 428 |
proof - |
429 |
from a have "0 < norm a" by simp |
|
430 |
hence "\<exists>r>0. r < norm a" by (rule dense) |
|
431 |
then obtain r where r1: "0 < r" and r2: "r < norm a" by fast |
|
| 44195 | 432 |
have "eventually (\<lambda>x. dist (f x) a < r) F" |
|
31487
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
433 |
using tendstoD [OF f r1] by fast |
| 44195 | 434 |
hence "eventually (\<lambda>x. norm (inverse (f x)) \<le> inverse (norm a - r)) F" |
| 46887 | 435 |
proof eventually_elim |
436 |
case (elim x) |
|
|
31487
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
437 |
hence 1: "norm (f x - a) < r" |
| 31355 | 438 |
by (simp add: dist_norm) |
|
31487
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
439 |
hence 2: "f x \<noteq> 0" using r2 by auto |
|
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
440 |
hence "norm (inverse (f x)) = inverse (norm (f x))" |
| 31355 | 441 |
by (rule nonzero_norm_inverse) |
442 |
also have "\<dots> \<le> inverse (norm a - r)" |
|
443 |
proof (rule le_imp_inverse_le) |
|
444 |
show "0 < norm a - r" using r2 by simp |
|
445 |
next |
|
|
31487
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
446 |
have "norm a - norm (f x) \<le> norm (a - f x)" |
| 31355 | 447 |
by (rule norm_triangle_ineq2) |
|
31487
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
448 |
also have "\<dots> = norm (f x - a)" |
| 31355 | 449 |
by (rule norm_minus_commute) |
450 |
also have "\<dots> < r" using 1 . |
|
|
31487
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
451 |
finally show "norm a - r \<le> norm (f x)" by simp |
| 31355 | 452 |
qed |
|
31487
93938cafc0e6
put syntax for tendsto in Limits.thy; rename variables
huffman
parents:
31447
diff
changeset
|
453 |
finally show "norm (inverse (f x)) \<le> inverse (norm a - r)" . |
| 31355 | 454 |
qed |
455 |
thus ?thesis by (rule BfunI) |
|
456 |
qed |
|
457 |
||
| 31565 | 458 |
lemma tendsto_inverse [tendsto_intros]: |
| 31355 | 459 |
fixes a :: "'a::real_normed_div_algebra" |
| 44195 | 460 |
assumes f: "(f ---> a) F" |
| 31355 | 461 |
assumes a: "a \<noteq> 0" |
| 44195 | 462 |
shows "((\<lambda>x. inverse (f x)) ---> inverse a) F" |
| 31355 | 463 |
proof - |
464 |
from a have "0 < norm a" by simp |
|
| 44195 | 465 |
with f have "eventually (\<lambda>x. dist (f x) a < norm a) F" |
| 31355 | 466 |
by (rule tendstoD) |
| 44195 | 467 |
then have "eventually (\<lambda>x. f x \<noteq> 0) F" |
| 31355 | 468 |
unfolding dist_norm by (auto elim!: eventually_elim1) |
| 44627 | 469 |
with a have "eventually (\<lambda>x. inverse (f x) - inverse a = |
470 |
- (inverse (f x) * (f x - a) * inverse a)) F" |
|
471 |
by (auto elim!: eventually_elim1 simp: inverse_diff_inverse) |
|
472 |
moreover have "Zfun (\<lambda>x. - (inverse (f x) * (f x - a) * inverse a)) F" |
|
473 |
by (intro Zfun_minus Zfun_mult_left |
|
474 |
bounded_bilinear.Bfun_prod_Zfun [OF bounded_bilinear_mult] |
|
475 |
Bfun_inverse [OF f a] f [unfolded tendsto_Zfun_iff]) |
|
476 |
ultimately show ?thesis |
|
477 |
unfolding tendsto_Zfun_iff by (rule Zfun_ssubst) |
|
| 31355 | 478 |
qed |
479 |
||
| 31565 | 480 |
lemma tendsto_divide [tendsto_intros]: |
| 31355 | 481 |
fixes a b :: "'a::real_normed_field" |
| 44195 | 482 |
shows "\<lbrakk>(f ---> a) F; (g ---> b) F; b \<noteq> 0\<rbrakk> |
483 |
\<Longrightarrow> ((\<lambda>x. f x / g x) ---> a / b) F" |
|
|
44282
f0de18b62d63
remove bounded_(bi)linear locale interpretations, to avoid duplicating so many lemmas
huffman
parents:
44253
diff
changeset
|
484 |
by (simp add: tendsto_mult tendsto_inverse divide_inverse) |
| 31355 | 485 |
|
|
44194
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
486 |
lemma tendsto_sgn [tendsto_intros]: |
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
487 |
fixes l :: "'a::real_normed_vector" |
| 44195 | 488 |
shows "\<lbrakk>(f ---> l) F; l \<noteq> 0\<rbrakk> \<Longrightarrow> ((\<lambda>x. sgn (f x)) ---> sgn l) F" |
|
44194
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
489 |
unfolding sgn_div_norm by (simp add: tendsto_intros) |
|
0639898074ae
generalize lemmas about LIM and LIMSEQ to tendsto
huffman
parents:
44081
diff
changeset
|
490 |
|
| 50325 | 491 |
lemma filterlim_at_infinity: |
492 |
fixes f :: "_ \<Rightarrow> 'a\<Colon>real_normed_vector" |
|
493 |
assumes "0 \<le> c" |
|
494 |
shows "(LIM x F. f x :> at_infinity) \<longleftrightarrow> (\<forall>r>c. eventually (\<lambda>x. r \<le> norm (f x)) F)" |
|
495 |
unfolding filterlim_iff eventually_at_infinity |
|
496 |
proof safe |
|
497 |
fix P :: "'a \<Rightarrow> bool" and b |
|
498 |
assume *: "\<forall>r>c. eventually (\<lambda>x. r \<le> norm (f x)) F" |
|
499 |
and P: "\<forall>x. b \<le> norm x \<longrightarrow> P x" |
|
500 |
have "max b (c + 1) > c" by auto |
|
501 |
with * have "eventually (\<lambda>x. max b (c + 1) \<le> norm (f x)) F" |
|
502 |
by auto |
|
503 |
then show "eventually (\<lambda>x. P (f x)) F" |
|
504 |
proof eventually_elim |
|
505 |
fix x assume "max b (c + 1) \<le> norm (f x)" |
|
506 |
with P show "P (f x)" by auto |
|
507 |
qed |
|
508 |
qed force |
|
509 |
||
| 50347 | 510 |
subsection {* Relate @{const at}, @{const at_left} and @{const at_right} *}
|
511 |
||
512 |
text {*
|
|
513 |
||
514 |
This lemmas are useful for conversion between @{term "at x"} to @{term "at_left x"} and
|
|
515 |
@{term "at_right x"} and also @{term "at_right 0"}.
|
|
516 |
||
517 |
*} |
|
518 |
||
| 51471 | 519 |
lemmas filterlim_split_at_real = filterlim_split_at[where 'a=real] |
| 50323 | 520 |
|
| 50347 | 521 |
lemma filtermap_nhds_shift: "filtermap (\<lambda>x. x - d) (nhds a) = nhds (a - d::real)" |
522 |
unfolding filter_eq_iff eventually_filtermap eventually_nhds_metric |
|
523 |
by (intro allI ex_cong) (auto simp: dist_real_def field_simps) |
|
524 |
||
525 |
lemma filtermap_nhds_minus: "filtermap (\<lambda>x. - x) (nhds a) = nhds (- a::real)" |
|
526 |
unfolding filter_eq_iff eventually_filtermap eventually_nhds_metric |
|
527 |
apply (intro allI ex_cong) |
|
528 |
apply (auto simp: dist_real_def field_simps) |
|
529 |
apply (erule_tac x="-x" in allE) |
|
530 |
apply simp |
|
531 |
done |
|
532 |
||
533 |
lemma filtermap_at_shift: "filtermap (\<lambda>x. x - d) (at a) = at (a - d::real)" |
|
534 |
unfolding at_def filtermap_nhds_shift[symmetric] |
|
535 |
by (simp add: filter_eq_iff eventually_filtermap eventually_within) |
|
536 |
||
537 |
lemma filtermap_at_right_shift: "filtermap (\<lambda>x. x - d) (at_right a) = at_right (a - d::real)" |
|
538 |
unfolding filtermap_at_shift[symmetric] |
|
539 |
by (simp add: filter_eq_iff eventually_filtermap eventually_within) |
|
| 50323 | 540 |
|
| 50347 | 541 |
lemma at_right_to_0: "at_right (a::real) = filtermap (\<lambda>x. x + a) (at_right 0)" |
542 |
using filtermap_at_right_shift[of "-a" 0] by simp |
|
543 |
||
544 |
lemma filterlim_at_right_to_0: |
|
545 |
"filterlim f F (at_right (a::real)) \<longleftrightarrow> filterlim (\<lambda>x. f (x + a)) F (at_right 0)" |
|
546 |
unfolding filterlim_def filtermap_filtermap at_right_to_0[of a] .. |
|
547 |
||
548 |
lemma eventually_at_right_to_0: |
|
549 |
"eventually P (at_right (a::real)) \<longleftrightarrow> eventually (\<lambda>x. P (x + a)) (at_right 0)" |
|
550 |
unfolding at_right_to_0[of a] by (simp add: eventually_filtermap) |
|
551 |
||
552 |
lemma filtermap_at_minus: "filtermap (\<lambda>x. - x) (at a) = at (- a::real)" |
|
553 |
unfolding at_def filtermap_nhds_minus[symmetric] |
|
554 |
by (simp add: filter_eq_iff eventually_filtermap eventually_within) |
|
555 |
||
556 |
lemma at_left_minus: "at_left (a::real) = filtermap (\<lambda>x. - x) (at_right (- a))" |
|
557 |
by (simp add: filter_eq_iff eventually_filtermap eventually_within filtermap_at_minus[symmetric]) |
|
| 50323 | 558 |
|
| 50347 | 559 |
lemma at_right_minus: "at_right (a::real) = filtermap (\<lambda>x. - x) (at_left (- a))" |
560 |
by (simp add: filter_eq_iff eventually_filtermap eventually_within filtermap_at_minus[symmetric]) |
|
561 |
||
562 |
lemma filterlim_at_left_to_right: |
|
563 |
"filterlim f F (at_left (a::real)) \<longleftrightarrow> filterlim (\<lambda>x. f (- x)) F (at_right (-a))" |
|
564 |
unfolding filterlim_def filtermap_filtermap at_left_minus[of a] .. |
|
565 |
||
566 |
lemma eventually_at_left_to_right: |
|
567 |
"eventually P (at_left (a::real)) \<longleftrightarrow> eventually (\<lambda>x. P (- x)) (at_right (-a))" |
|
568 |
unfolding at_left_minus[of a] by (simp add: eventually_filtermap) |
|
569 |
||
|
50346
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
570 |
lemma at_top_mirror: "at_top = filtermap uminus (at_bot :: real filter)" |
|
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
571 |
unfolding filter_eq_iff eventually_filtermap eventually_at_top_linorder eventually_at_bot_linorder |
|
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
572 |
by (metis le_minus_iff minus_minus) |
|
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
573 |
|
|
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
574 |
lemma at_bot_mirror: "at_bot = filtermap uminus (at_top :: real filter)" |
|
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
575 |
unfolding at_top_mirror filtermap_filtermap by (simp add: filtermap_ident) |
|
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
576 |
|
|
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
577 |
lemma filterlim_at_top_mirror: "(LIM x at_top. f x :> F) \<longleftrightarrow> (LIM x at_bot. f (-x::real) :> F)" |
|
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
578 |
unfolding filterlim_def at_top_mirror filtermap_filtermap .. |
|
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
579 |
|
|
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
580 |
lemma filterlim_at_bot_mirror: "(LIM x at_bot. f x :> F) \<longleftrightarrow> (LIM x at_top. f (-x::real) :> F)" |
|
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
581 |
unfolding filterlim_def at_bot_mirror filtermap_filtermap .. |
|
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
582 |
|
| 50323 | 583 |
lemma filterlim_uminus_at_top_at_bot: "LIM x at_bot. - x :: real :> at_top" |
584 |
unfolding filterlim_at_top eventually_at_bot_dense |
|
|
50346
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
585 |
by (metis leI minus_less_iff order_less_asym) |
| 50323 | 586 |
|
587 |
lemma filterlim_uminus_at_bot_at_top: "LIM x at_top. - x :: real :> at_bot" |
|
588 |
unfolding filterlim_at_bot eventually_at_top_dense |
|
|
50346
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
589 |
by (metis leI less_minus_iff order_less_asym) |
| 50323 | 590 |
|
|
50346
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
591 |
lemma filterlim_uminus_at_top: "(LIM x F. f x :> at_top) \<longleftrightarrow> (LIM x F. - (f x) :: real :> at_bot)" |
|
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
592 |
using filterlim_compose[OF filterlim_uminus_at_bot_at_top, of f F] |
|
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
593 |
using filterlim_compose[OF filterlim_uminus_at_top_at_bot, of "\<lambda>x. - f x" F] |
|
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
594 |
by auto |
|
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
595 |
|
|
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
596 |
lemma filterlim_uminus_at_bot: "(LIM x F. f x :> at_bot) \<longleftrightarrow> (LIM x F. - (f x) :: real :> at_top)" |
|
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
597 |
unfolding filterlim_uminus_at_top by simp |
| 50323 | 598 |
|
| 50347 | 599 |
lemma filterlim_inverse_at_top_right: "LIM x at_right (0::real). inverse x :> at_top" |
600 |
unfolding filterlim_at_top_gt[where c=0] eventually_within at_def |
|
601 |
proof safe |
|
602 |
fix Z :: real assume [arith]: "0 < Z" |
|
603 |
then have "eventually (\<lambda>x. x < inverse Z) (nhds 0)" |
|
604 |
by (auto simp add: eventually_nhds_metric dist_real_def intro!: exI[of _ "\<bar>inverse Z\<bar>"]) |
|
605 |
then show "eventually (\<lambda>x. x \<in> - {0} \<longrightarrow> x \<in> {0<..} \<longrightarrow> Z \<le> inverse x) (nhds 0)"
|
|
606 |
by (auto elim!: eventually_elim1 simp: inverse_eq_divide field_simps) |
|
607 |
qed |
|
608 |
||
609 |
lemma filterlim_inverse_at_top: |
|
610 |
"(f ---> (0 :: real)) F \<Longrightarrow> eventually (\<lambda>x. 0 < f x) F \<Longrightarrow> LIM x F. inverse (f x) :> at_top" |
|
611 |
by (intro filterlim_compose[OF filterlim_inverse_at_top_right]) |
|
612 |
(simp add: filterlim_def eventually_filtermap le_within_iff at_def eventually_elim1) |
|
613 |
||
614 |
lemma filterlim_inverse_at_bot_neg: |
|
615 |
"LIM x (at_left (0::real)). inverse x :> at_bot" |
|
616 |
by (simp add: filterlim_inverse_at_top_right filterlim_uminus_at_bot filterlim_at_left_to_right) |
|
617 |
||
618 |
lemma filterlim_inverse_at_bot: |
|
619 |
"(f ---> (0 :: real)) F \<Longrightarrow> eventually (\<lambda>x. f x < 0) F \<Longrightarrow> LIM x F. inverse (f x) :> at_bot" |
|
620 |
unfolding filterlim_uminus_at_bot inverse_minus_eq[symmetric] |
|
621 |
by (rule filterlim_inverse_at_top) (simp_all add: tendsto_minus_cancel_left[symmetric]) |
|
622 |
||
| 50325 | 623 |
lemma tendsto_inverse_0: |
624 |
fixes x :: "_ \<Rightarrow> 'a\<Colon>real_normed_div_algebra" |
|
625 |
shows "(inverse ---> (0::'a)) at_infinity" |
|
626 |
unfolding tendsto_Zfun_iff diff_0_right Zfun_def eventually_at_infinity |
|
627 |
proof safe |
|
628 |
fix r :: real assume "0 < r" |
|
629 |
show "\<exists>b. \<forall>x. b \<le> norm x \<longrightarrow> norm (inverse x :: 'a) < r" |
|
630 |
proof (intro exI[of _ "inverse (r / 2)"] allI impI) |
|
631 |
fix x :: 'a |
|
632 |
from `0 < r` have "0 < inverse (r / 2)" by simp |
|
633 |
also assume *: "inverse (r / 2) \<le> norm x" |
|
634 |
finally show "norm (inverse x) < r" |
|
635 |
using * `0 < r` by (subst nonzero_norm_inverse) (simp_all add: inverse_eq_divide field_simps) |
|
636 |
qed |
|
637 |
qed |
|
638 |
||
| 50347 | 639 |
lemma at_right_to_top: "(at_right (0::real)) = filtermap inverse at_top" |
640 |
proof (rule antisym) |
|
641 |
have "(inverse ---> (0::real)) at_top" |
|
642 |
by (metis tendsto_inverse_0 filterlim_mono at_top_le_at_infinity order_refl) |
|
643 |
then show "filtermap inverse at_top \<le> at_right (0::real)" |
|
644 |
unfolding at_within_eq |
|
645 |
by (intro le_withinI) (simp_all add: eventually_filtermap eventually_gt_at_top filterlim_def) |
|
646 |
next |
|
647 |
have "filtermap inverse (filtermap inverse (at_right (0::real))) \<le> filtermap inverse at_top" |
|
648 |
using filterlim_inverse_at_top_right unfolding filterlim_def by (rule filtermap_mono) |
|
649 |
then show "at_right (0::real) \<le> filtermap inverse at_top" |
|
650 |
by (simp add: filtermap_ident filtermap_filtermap) |
|
651 |
qed |
|
652 |
||
653 |
lemma eventually_at_right_to_top: |
|
654 |
"eventually P (at_right (0::real)) \<longleftrightarrow> eventually (\<lambda>x. P (inverse x)) at_top" |
|
655 |
unfolding at_right_to_top eventually_filtermap .. |
|
656 |
||
657 |
lemma filterlim_at_right_to_top: |
|
658 |
"filterlim f F (at_right (0::real)) \<longleftrightarrow> (LIM x at_top. f (inverse x) :> F)" |
|
659 |
unfolding filterlim_def at_right_to_top filtermap_filtermap .. |
|
660 |
||
661 |
lemma at_top_to_right: "at_top = filtermap inverse (at_right (0::real))" |
|
662 |
unfolding at_right_to_top filtermap_filtermap inverse_inverse_eq filtermap_ident .. |
|
663 |
||
664 |
lemma eventually_at_top_to_right: |
|
665 |
"eventually P at_top \<longleftrightarrow> eventually (\<lambda>x. P (inverse x)) (at_right (0::real))" |
|
666 |
unfolding at_top_to_right eventually_filtermap .. |
|
667 |
||
668 |
lemma filterlim_at_top_to_right: |
|
669 |
"filterlim f F at_top \<longleftrightarrow> (LIM x (at_right (0::real)). f (inverse x) :> F)" |
|
670 |
unfolding filterlim_def at_top_to_right filtermap_filtermap .. |
|
671 |
||
| 50325 | 672 |
lemma filterlim_inverse_at_infinity: |
673 |
fixes x :: "_ \<Rightarrow> 'a\<Colon>{real_normed_div_algebra, division_ring_inverse_zero}"
|
|
674 |
shows "filterlim inverse at_infinity (at (0::'a))" |
|
675 |
unfolding filterlim_at_infinity[OF order_refl] |
|
676 |
proof safe |
|
677 |
fix r :: real assume "0 < r" |
|
678 |
then show "eventually (\<lambda>x::'a. r \<le> norm (inverse x)) (at 0)" |
|
679 |
unfolding eventually_at norm_inverse |
|
680 |
by (intro exI[of _ "inverse r"]) |
|
681 |
(auto simp: norm_conv_dist[symmetric] field_simps inverse_eq_divide) |
|
682 |
qed |
|
683 |
||
684 |
lemma filterlim_inverse_at_iff: |
|
685 |
fixes g :: "'a \<Rightarrow> 'b\<Colon>{real_normed_div_algebra, division_ring_inverse_zero}"
|
|
686 |
shows "(LIM x F. inverse (g x) :> at 0) \<longleftrightarrow> (LIM x F. g x :> at_infinity)" |
|
687 |
unfolding filterlim_def filtermap_filtermap[symmetric] |
|
688 |
proof |
|
689 |
assume "filtermap g F \<le> at_infinity" |
|
690 |
then have "filtermap inverse (filtermap g F) \<le> filtermap inverse at_infinity" |
|
691 |
by (rule filtermap_mono) |
|
692 |
also have "\<dots> \<le> at 0" |
|
693 |
using tendsto_inverse_0 |
|
694 |
by (auto intro!: le_withinI exI[of _ 1] |
|
695 |
simp: eventually_filtermap eventually_at_infinity filterlim_def at_def) |
|
696 |
finally show "filtermap inverse (filtermap g F) \<le> at 0" . |
|
697 |
next |
|
698 |
assume "filtermap inverse (filtermap g F) \<le> at 0" |
|
699 |
then have "filtermap inverse (filtermap inverse (filtermap g F)) \<le> filtermap inverse (at 0)" |
|
700 |
by (rule filtermap_mono) |
|
701 |
with filterlim_inverse_at_infinity show "filtermap g F \<le> at_infinity" |
|
702 |
by (auto intro: order_trans simp: filterlim_def filtermap_filtermap) |
|
703 |
qed |
|
704 |
||
| 50419 | 705 |
lemma tendsto_inverse_0_at_top: |
706 |
"LIM x F. f x :> at_top \<Longrightarrow> ((\<lambda>x. inverse (f x) :: real) ---> 0) F" |
|
707 |
by (metis at_top_le_at_infinity filterlim_at filterlim_inverse_at_iff filterlim_mono order_refl) |
|
708 |
||
|
50324
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
709 |
text {*
|
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
710 |
|
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
711 |
We only show rules for multiplication and addition when the functions are either against a real |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
712 |
value or against infinity. Further rules are easy to derive by using @{thm filterlim_uminus_at_top}.
|
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
713 |
|
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
714 |
*} |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
715 |
|
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
716 |
lemma filterlim_tendsto_pos_mult_at_top: |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
717 |
assumes f: "(f ---> c) F" and c: "0 < c" |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
718 |
assumes g: "LIM x F. g x :> at_top" |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
719 |
shows "LIM x F. (f x * g x :: real) :> at_top" |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
720 |
unfolding filterlim_at_top_gt[where c=0] |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
721 |
proof safe |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
722 |
fix Z :: real assume "0 < Z" |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
723 |
from f `0 < c` have "eventually (\<lambda>x. c / 2 < f x) F" |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
724 |
by (auto dest!: tendstoD[where e="c / 2"] elim!: eventually_elim1 |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
725 |
simp: dist_real_def abs_real_def split: split_if_asm) |
|
50346
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
726 |
moreover from g have "eventually (\<lambda>x. (Z / c * 2) \<le> g x) F" |
|
50324
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
727 |
unfolding filterlim_at_top by auto |
|
50346
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
728 |
ultimately show "eventually (\<lambda>x. Z \<le> f x * g x) F" |
|
50324
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
729 |
proof eventually_elim |
|
50346
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
730 |
fix x assume "c / 2 < f x" "Z / c * 2 \<le> g x" |
|
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
731 |
with `0 < Z` `0 < c` have "c / 2 * (Z / c * 2) \<le> f x * g x" |
|
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
732 |
by (intro mult_mono) (auto simp: zero_le_divide_iff) |
|
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
733 |
with `0 < c` show "Z \<le> f x * g x" |
|
50324
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
734 |
by simp |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
735 |
qed |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
736 |
qed |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
737 |
|
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
738 |
lemma filterlim_at_top_mult_at_top: |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
739 |
assumes f: "LIM x F. f x :> at_top" |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
740 |
assumes g: "LIM x F. g x :> at_top" |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
741 |
shows "LIM x F. (f x * g x :: real) :> at_top" |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
742 |
unfolding filterlim_at_top_gt[where c=0] |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
743 |
proof safe |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
744 |
fix Z :: real assume "0 < Z" |
|
50346
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
745 |
from f have "eventually (\<lambda>x. 1 \<le> f x) F" |
|
50324
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
746 |
unfolding filterlim_at_top by auto |
|
50346
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
747 |
moreover from g have "eventually (\<lambda>x. Z \<le> g x) F" |
|
50324
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
748 |
unfolding filterlim_at_top by auto |
|
50346
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
749 |
ultimately show "eventually (\<lambda>x. Z \<le> f x * g x) F" |
|
50324
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
750 |
proof eventually_elim |
|
50346
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
751 |
fix x assume "1 \<le> f x" "Z \<le> g x" |
|
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
752 |
with `0 < Z` have "1 * Z \<le> f x * g x" |
|
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
753 |
by (intro mult_mono) (auto simp: zero_le_divide_iff) |
|
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
754 |
then show "Z \<le> f x * g x" |
|
50324
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
755 |
by simp |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
756 |
qed |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
757 |
qed |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
758 |
|
| 50419 | 759 |
lemma filterlim_tendsto_pos_mult_at_bot: |
760 |
assumes "(f ---> c) F" "0 < (c::real)" "filterlim g at_bot F" |
|
761 |
shows "LIM x F. f x * g x :> at_bot" |
|
762 |
using filterlim_tendsto_pos_mult_at_top[OF assms(1,2), of "\<lambda>x. - g x"] assms(3) |
|
763 |
unfolding filterlim_uminus_at_bot by simp |
|
764 |
||
|
50324
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
765 |
lemma filterlim_tendsto_add_at_top: |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
766 |
assumes f: "(f ---> c) F" |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
767 |
assumes g: "LIM x F. g x :> at_top" |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
768 |
shows "LIM x F. (f x + g x :: real) :> at_top" |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
769 |
unfolding filterlim_at_top_gt[where c=0] |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
770 |
proof safe |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
771 |
fix Z :: real assume "0 < Z" |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
772 |
from f have "eventually (\<lambda>x. c - 1 < f x) F" |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
773 |
by (auto dest!: tendstoD[where e=1] elim!: eventually_elim1 simp: dist_real_def) |
|
50346
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
774 |
moreover from g have "eventually (\<lambda>x. Z - (c - 1) \<le> g x) F" |
|
50324
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
775 |
unfolding filterlim_at_top by auto |
|
50346
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
776 |
ultimately show "eventually (\<lambda>x. Z \<le> f x + g x) F" |
|
50324
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
777 |
by eventually_elim simp |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
778 |
qed |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
779 |
|
| 50347 | 780 |
lemma LIM_at_top_divide: |
781 |
fixes f g :: "'a \<Rightarrow> real" |
|
782 |
assumes f: "(f ---> a) F" "0 < a" |
|
783 |
assumes g: "(g ---> 0) F" "eventually (\<lambda>x. 0 < g x) F" |
|
784 |
shows "LIM x F. f x / g x :> at_top" |
|
785 |
unfolding divide_inverse |
|
786 |
by (rule filterlim_tendsto_pos_mult_at_top[OF f]) (rule filterlim_inverse_at_top[OF g]) |
|
787 |
||
|
50324
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
788 |
lemma filterlim_at_top_add_at_top: |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
789 |
assumes f: "LIM x F. f x :> at_top" |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
790 |
assumes g: "LIM x F. g x :> at_top" |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
791 |
shows "LIM x F. (f x + g x :: real) :> at_top" |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
792 |
unfolding filterlim_at_top_gt[where c=0] |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
793 |
proof safe |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
794 |
fix Z :: real assume "0 < Z" |
|
50346
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
795 |
from f have "eventually (\<lambda>x. 0 \<le> f x) F" |
|
50324
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
796 |
unfolding filterlim_at_top by auto |
|
50346
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
797 |
moreover from g have "eventually (\<lambda>x. Z \<le> g x) F" |
|
50324
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
798 |
unfolding filterlim_at_top by auto |
|
50346
a75c6429c3c3
add filterlim rules for eventually monotone bijective functions; mirror rules for at_top, at_bot; apply them to prove convergence of arctan at infinity and tan at pi/2
hoelzl
parents:
50331
diff
changeset
|
799 |
ultimately show "eventually (\<lambda>x. Z \<le> f x + g x) F" |
|
50324
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
800 |
by eventually_elim simp |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
801 |
qed |
|
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
802 |
|
| 50331 | 803 |
lemma tendsto_divide_0: |
804 |
fixes f :: "_ \<Rightarrow> 'a\<Colon>{real_normed_div_algebra, division_ring_inverse_zero}"
|
|
805 |
assumes f: "(f ---> c) F" |
|
806 |
assumes g: "LIM x F. g x :> at_infinity" |
|
807 |
shows "((\<lambda>x. f x / g x) ---> 0) F" |
|
808 |
using tendsto_mult[OF f filterlim_compose[OF tendsto_inverse_0 g]] by (simp add: divide_inverse) |
|
809 |
||
810 |
lemma linear_plus_1_le_power: |
|
811 |
fixes x :: real |
|
812 |
assumes x: "0 \<le> x" |
|
813 |
shows "real n * x + 1 \<le> (x + 1) ^ n" |
|
814 |
proof (induct n) |
|
815 |
case (Suc n) |
|
816 |
have "real (Suc n) * x + 1 \<le> (x + 1) * (real n * x + 1)" |
|
817 |
by (simp add: field_simps real_of_nat_Suc mult_nonneg_nonneg x) |
|
818 |
also have "\<dots> \<le> (x + 1)^Suc n" |
|
819 |
using Suc x by (simp add: mult_left_mono) |
|
820 |
finally show ?case . |
|
821 |
qed simp |
|
822 |
||
823 |
lemma filterlim_realpow_sequentially_gt1: |
|
824 |
fixes x :: "'a :: real_normed_div_algebra" |
|
825 |
assumes x[arith]: "1 < norm x" |
|
826 |
shows "LIM n sequentially. x ^ n :> at_infinity" |
|
827 |
proof (intro filterlim_at_infinity[THEN iffD2] allI impI) |
|
828 |
fix y :: real assume "0 < y" |
|
829 |
have "0 < norm x - 1" by simp |
|
830 |
then obtain N::nat where "y < real N * (norm x - 1)" by (blast dest: reals_Archimedean3) |
|
831 |
also have "\<dots> \<le> real N * (norm x - 1) + 1" by simp |
|
832 |
also have "\<dots> \<le> (norm x - 1 + 1) ^ N" by (rule linear_plus_1_le_power) simp |
|
833 |
also have "\<dots> = norm x ^ N" by simp |
|
834 |
finally have "\<forall>n\<ge>N. y \<le> norm x ^ n" |
|
835 |
by (metis order_less_le_trans power_increasing order_less_imp_le x) |
|
836 |
then show "eventually (\<lambda>n. y \<le> norm (x ^ n)) sequentially" |
|
837 |
unfolding eventually_sequentially |
|
838 |
by (auto simp: norm_power) |
|
839 |
qed simp |
|
840 |
||
| 51471 | 841 |
|
842 |
(* Unfortunately eventually_within was overwritten by Multivariate_Analysis. |
|
843 |
Hence it was references as Limits.within, but now it is Basic_Topology.eventually_within *) |
|
844 |
lemmas eventually_within = eventually_within |
|
845 |
||
|
31349
2261c8781f73
new theory of filters and limits; prove LIMSEQ and LIM lemmas using filters
huffman
parents:
diff
changeset
|
846 |
end |
|
50324
0a1242d5e7d4
add filterlim rules for diverging multiplication and addition; move at_infinity to the HOL image
hoelzl
parents:
50323
diff
changeset
|
847 |