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