| author | wenzelm |
| Sat, 19 Dec 2015 23:19:10 +0100 | |
| changeset 61872 | fcb4d24c384c |
| parent 61810 | 3c5040d5694a |
| child 61973 | 0c7e865fa7cb |
| permissions | -rw-r--r-- |
| 41983 | 1 |
(* Title: HOL/Multivariate_Analysis/Extended_Real_Limits.thy |
2 |
Author: Johannes Hölzl, TU München |
|
3 |
Author: Robert Himmelmann, TU München |
|
4 |
Author: Armin Heller, TU München |
|
5 |
Author: Bogdan Grechuk, University of Edinburgh |
|
6 |
*) |
|
|
41980
28b51effc5ed
split Extended_Reals into parts for Library and Multivariate_Analysis
hoelzl
parents:
diff
changeset
|
7 |
|
| 60420 | 8 |
section \<open>Limits on the Extended real number line\<close> |
|
41980
28b51effc5ed
split Extended_Reals into parts for Library and Multivariate_Analysis
hoelzl
parents:
diff
changeset
|
9 |
|
|
28b51effc5ed
split Extended_Reals into parts for Library and Multivariate_Analysis
hoelzl
parents:
diff
changeset
|
10 |
theory Extended_Real_Limits |
| 61560 | 11 |
imports |
12 |
Topology_Euclidean_Space |
|
13 |
"~~/src/HOL/Library/Extended_Real" |
|
14 |
"~~/src/HOL/Library/Indicator_Function" |
|
|
41980
28b51effc5ed
split Extended_Reals into parts for Library and Multivariate_Analysis
hoelzl
parents:
diff
changeset
|
15 |
begin |
|
28b51effc5ed
split Extended_Reals into parts for Library and Multivariate_Analysis
hoelzl
parents:
diff
changeset
|
16 |
|
| 53788 | 17 |
lemma compact_UNIV: |
18 |
"compact (UNIV :: 'a::{complete_linorder,linorder_topology,second_countable_topology} set)"
|
|
| 51351 | 19 |
using compact_complete_linorder |
20 |
by (auto simp: seq_compact_eq_compact[symmetric] seq_compact_def) |
|
21 |
||
22 |
lemma compact_eq_closed: |
|
| 53788 | 23 |
fixes S :: "'a::{complete_linorder,linorder_topology,second_countable_topology} set"
|
| 51351 | 24 |
shows "compact S \<longleftrightarrow> closed S" |
| 53788 | 25 |
using closed_inter_compact[of S, OF _ compact_UNIV] compact_imp_closed |
26 |
by auto |
|
| 51351 | 27 |
|
28 |
lemma closed_contains_Sup_cl: |
|
| 53788 | 29 |
fixes S :: "'a::{complete_linorder,linorder_topology,second_countable_topology} set"
|
30 |
assumes "closed S" |
|
31 |
and "S \<noteq> {}"
|
|
32 |
shows "Sup S \<in> S" |
|
| 51351 | 33 |
proof - |
34 |
from compact_eq_closed[of S] compact_attains_sup[of S] assms |
|
| 53788 | 35 |
obtain s where S: "s \<in> S" "\<forall>t\<in>S. t \<le> s" |
36 |
by auto |
|
|
53374
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
51641
diff
changeset
|
37 |
then have "Sup S = s" |
| 51351 | 38 |
by (auto intro!: Sup_eqI) |
|
53374
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
51641
diff
changeset
|
39 |
with S show ?thesis |
| 51351 | 40 |
by simp |
41 |
qed |
|
42 |
||
43 |
lemma closed_contains_Inf_cl: |
|
| 53788 | 44 |
fixes S :: "'a::{complete_linorder,linorder_topology,second_countable_topology} set"
|
45 |
assumes "closed S" |
|
46 |
and "S \<noteq> {}"
|
|
47 |
shows "Inf S \<in> S" |
|
| 51351 | 48 |
proof - |
49 |
from compact_eq_closed[of S] compact_attains_inf[of S] assms |
|
| 53788 | 50 |
obtain s where S: "s \<in> S" "\<forall>t\<in>S. s \<le> t" |
51 |
by auto |
|
|
53374
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
51641
diff
changeset
|
52 |
then have "Inf S = s" |
| 51351 | 53 |
by (auto intro!: Inf_eqI) |
|
53374
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
51641
diff
changeset
|
54 |
with S show ?thesis |
| 51351 | 55 |
by simp |
56 |
qed |
|
57 |
||
58 |
instance ereal :: second_countable_topology |
|
| 61169 | 59 |
proof (standard, intro exI conjI) |
| 51351 | 60 |
let ?B = "(\<Union>r\<in>\<rat>. {{..< r}, {r <..}} :: ereal set set)"
|
| 53788 | 61 |
show "countable ?B" |
62 |
by (auto intro: countable_rat) |
|
| 51351 | 63 |
show "open = generate_topology ?B" |
64 |
proof (intro ext iffI) |
|
| 53788 | 65 |
fix S :: "ereal set" |
66 |
assume "open S" |
|
| 51351 | 67 |
then show "generate_topology ?B S" |
68 |
unfolding open_generated_order |
|
69 |
proof induct |
|
70 |
case (Basis b) |
|
| 53788 | 71 |
then obtain e where "b = {..<e} \<or> b = {e<..}"
|
72 |
by auto |
|
| 51351 | 73 |
moreover have "{..<e} = \<Union>{{..<x}|x. x \<in> \<rat> \<and> x < e}" "{e<..} = \<Union>{{x<..}|x. x \<in> \<rat> \<and> e < x}"
|
74 |
by (auto dest: ereal_dense3 |
|
75 |
simp del: ex_simps |
|
76 |
simp add: ex_simps[symmetric] conj_commute Rats_def image_iff) |
|
77 |
ultimately show ?case |
|
78 |
by (auto intro: generate_topology.intros) |
|
79 |
qed (auto intro: generate_topology.intros) |
|
80 |
next |
|
| 53788 | 81 |
fix S |
82 |
assume "generate_topology ?B S" |
|
83 |
then show "open S" |
|
84 |
by induct auto |
|
| 51351 | 85 |
qed |
86 |
qed |
|
87 |
||
| 43920 | 88 |
lemma ereal_open_closed_aux: |
89 |
fixes S :: "ereal set" |
|
| 53788 | 90 |
assumes "open S" |
91 |
and "closed S" |
|
92 |
and S: "(-\<infinity>) \<notin> S" |
|
|
41980
28b51effc5ed
split Extended_Reals into parts for Library and Multivariate_Analysis
hoelzl
parents:
diff
changeset
|
93 |
shows "S = {}"
|
| 49664 | 94 |
proof (rule ccontr) |
| 53788 | 95 |
assume "\<not> ?thesis" |
96 |
then have *: "Inf S \<in> S" |
|
| 60771 | 97 |
|
| 53788 | 98 |
by (metis assms(2) closed_contains_Inf_cl) |
99 |
{
|
|
100 |
assume "Inf S = -\<infinity>" |
|
101 |
then have False |
|
102 |
using * assms(3) by auto |
|
103 |
} |
|
|
41980
28b51effc5ed
split Extended_Reals into parts for Library and Multivariate_Analysis
hoelzl
parents:
diff
changeset
|
104 |
moreover |
| 53788 | 105 |
{
|
106 |
assume "Inf S = \<infinity>" |
|
107 |
then have "S = {\<infinity>}"
|
|
| 60420 | 108 |
by (metis Inf_eq_PInfty \<open>S \<noteq> {}\<close>)
|
| 53788 | 109 |
then have False |
110 |
by (metis assms(1) not_open_singleton) |
|
111 |
} |
|
|
41980
28b51effc5ed
split Extended_Reals into parts for Library and Multivariate_Analysis
hoelzl
parents:
diff
changeset
|
112 |
moreover |
| 53788 | 113 |
{
|
114 |
assume fin: "\<bar>Inf S\<bar> \<noteq> \<infinity>" |
|
115 |
from ereal_open_cont_interval[OF assms(1) * fin] |
|
116 |
obtain e where e: "e > 0" "{Inf S - e<..<Inf S + e} \<subseteq> S" .
|
|
117 |
then obtain b where b: "Inf S - e < b" "b < Inf S" |
|
118 |
using fin ereal_between[of "Inf S" e] dense[of "Inf S - e"] |
|
| 44918 | 119 |
by auto |
| 53788 | 120 |
then have "b: {Inf S - e <..< Inf S + e}"
|
121 |
using e fin ereal_between[of "Inf S" e] |
|
122 |
by auto |
|
123 |
then have "b \<in> S" |
|
124 |
using e by auto |
|
125 |
then have False |
|
126 |
using b by (metis complete_lattice_class.Inf_lower leD) |
|
127 |
} |
|
128 |
ultimately show False |
|
129 |
by auto |
|
|
41980
28b51effc5ed
split Extended_Reals into parts for Library and Multivariate_Analysis
hoelzl
parents:
diff
changeset
|
130 |
qed |
|
28b51effc5ed
split Extended_Reals into parts for Library and Multivariate_Analysis
hoelzl
parents:
diff
changeset
|
131 |
|
| 43920 | 132 |
lemma ereal_open_closed: |
133 |
fixes S :: "ereal set" |
|
| 53788 | 134 |
shows "open S \<and> closed S \<longleftrightarrow> S = {} \<or> S = UNIV"
|
| 49664 | 135 |
proof - |
| 53788 | 136 |
{
|
137 |
assume lhs: "open S \<and> closed S" |
|
138 |
{
|
|
139 |
assume "-\<infinity> \<notin> S" |
|
140 |
then have "S = {}"
|
|
141 |
using lhs ereal_open_closed_aux by auto |
|
142 |
} |
|
| 49664 | 143 |
moreover |
| 53788 | 144 |
{
|
145 |
assume "-\<infinity> \<in> S" |
|
146 |
then have "- S = {}"
|
|
147 |
using lhs ereal_open_closed_aux[of "-S"] by auto |
|
148 |
} |
|
149 |
ultimately have "S = {} \<or> S = UNIV"
|
|
150 |
by auto |
|
151 |
} |
|
152 |
then show ?thesis |
|
153 |
by auto |
|
|
41980
28b51effc5ed
split Extended_Reals into parts for Library and Multivariate_Analysis
hoelzl
parents:
diff
changeset
|
154 |
qed |
|
28b51effc5ed
split Extended_Reals into parts for Library and Multivariate_Analysis
hoelzl
parents:
diff
changeset
|
155 |
|
| 53788 | 156 |
lemma ereal_open_atLeast: |
157 |
fixes x :: ereal |
|
158 |
shows "open {x..} \<longleftrightarrow> x = -\<infinity>"
|
|
|
41980
28b51effc5ed
split Extended_Reals into parts for Library and Multivariate_Analysis
hoelzl
parents:
diff
changeset
|
159 |
proof |
| 53788 | 160 |
assume "x = -\<infinity>" |
161 |
then have "{x..} = UNIV"
|
|
162 |
by auto |
|
163 |
then show "open {x..}"
|
|
164 |
by auto |
|
|
41980
28b51effc5ed
split Extended_Reals into parts for Library and Multivariate_Analysis
hoelzl
parents:
diff
changeset
|
165 |
next |
|
28b51effc5ed
split Extended_Reals into parts for Library and Multivariate_Analysis
hoelzl
parents:
diff
changeset
|
166 |
assume "open {x..}"
|
| 53788 | 167 |
then have "open {x..} \<and> closed {x..}"
|
168 |
by auto |
|
169 |
then have "{x..} = UNIV"
|
|
170 |
unfolding ereal_open_closed by auto |
|
171 |
then show "x = -\<infinity>" |
|
172 |
by (simp add: bot_ereal_def atLeast_eq_UNIV_iff) |
|
|
41980
28b51effc5ed
split Extended_Reals into parts for Library and Multivariate_Analysis
hoelzl
parents:
diff
changeset
|
173 |
qed |
|
28b51effc5ed
split Extended_Reals into parts for Library and Multivariate_Analysis
hoelzl
parents:
diff
changeset
|
174 |
|
|
28b51effc5ed
split Extended_Reals into parts for Library and Multivariate_Analysis
hoelzl
parents:
diff
changeset
|
175 |
lemma mono_closed_real: |
|
28b51effc5ed
split Extended_Reals into parts for Library and Multivariate_Analysis
hoelzl
parents:
diff
changeset
|
176 |
fixes S :: "real set" |
| 53788 | 177 |
assumes mono: "\<forall>y z. y \<in> S \<and> y \<le> z \<longrightarrow> z \<in> S" |
| 49664 | 178 |
and "closed S" |
| 53788 | 179 |
shows "S = {} \<or> S = UNIV \<or> (\<exists>a. S = {a..})"
|
| 49664 | 180 |
proof - |
| 53788 | 181 |
{
|
182 |
assume "S \<noteq> {}"
|
|
183 |
{ assume ex: "\<exists>B. \<forall>x\<in>S. B \<le> x"
|
|
184 |
then have *: "\<forall>x\<in>S. Inf S \<le> x" |
|
|
54258
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54257
diff
changeset
|
185 |
using cInf_lower[of _ S] ex by (metis bdd_below_def) |
| 53788 | 186 |
then have "Inf S \<in> S" |
187 |
apply (subst closed_contains_Inf) |
|
| 60420 | 188 |
using ex \<open>S \<noteq> {}\<close> \<open>closed S\<close>
|
| 53788 | 189 |
apply auto |
190 |
done |
|
191 |
then have "\<forall>x. Inf S \<le> x \<longleftrightarrow> x \<in> S" |
|
192 |
using mono[rule_format, of "Inf S"] * |
|
193 |
by auto |
|
194 |
then have "S = {Inf S ..}"
|
|
195 |
by auto |
|
196 |
then have "\<exists>a. S = {a ..}"
|
|
197 |
by auto |
|
| 49664 | 198 |
} |
199 |
moreover |
|
| 53788 | 200 |
{
|
201 |
assume "\<not> (\<exists>B. \<forall>x\<in>S. B \<le> x)" |
|
202 |
then have nex: "\<forall>B. \<exists>x\<in>S. x < B" |
|
203 |
by (simp add: not_le) |
|
204 |
{
|
|
205 |
fix y |
|
206 |
obtain x where "x\<in>S" and "x < y" |
|
207 |
using nex by auto |
|
208 |
then have "y \<in> S" |
|
209 |
using mono[rule_format, of x y] by auto |
|
210 |
} |
|
211 |
then have "S = UNIV" |
|
212 |
by auto |
|
| 49664 | 213 |
} |
| 53788 | 214 |
ultimately have "S = UNIV \<or> (\<exists>a. S = {a ..})"
|
215 |
by blast |
|
216 |
} |
|
217 |
then show ?thesis |
|
218 |
by blast |
|
|
41980
28b51effc5ed
split Extended_Reals into parts for Library and Multivariate_Analysis
hoelzl
parents:
diff
changeset
|
219 |
qed |
|
28b51effc5ed
split Extended_Reals into parts for Library and Multivariate_Analysis
hoelzl
parents:
diff
changeset
|
220 |
|
| 43920 | 221 |
lemma mono_closed_ereal: |
|
41980
28b51effc5ed
split Extended_Reals into parts for Library and Multivariate_Analysis
hoelzl
parents:
diff
changeset
|
222 |
fixes S :: "real set" |
| 53788 | 223 |
assumes mono: "\<forall>y z. y \<in> S \<and> y \<le> z \<longrightarrow> z \<in> S" |
| 49664 | 224 |
and "closed S" |
| 53788 | 225 |
shows "\<exists>a. S = {x. a \<le> ereal x}"
|
| 49664 | 226 |
proof - |
| 53788 | 227 |
{
|
228 |
assume "S = {}"
|
|
229 |
then have ?thesis |
|
230 |
apply (rule_tac x=PInfty in exI) |
|
231 |
apply auto |
|
232 |
done |
|
233 |
} |
|
| 49664 | 234 |
moreover |
| 53788 | 235 |
{
|
236 |
assume "S = UNIV" |
|
237 |
then have ?thesis |
|
238 |
apply (rule_tac x="-\<infinity>" in exI) |
|
239 |
apply auto |
|
240 |
done |
|
241 |
} |
|
| 49664 | 242 |
moreover |
| 53788 | 243 |
{
|
244 |
assume "\<exists>a. S = {a ..}"
|
|
245 |
then obtain a where "S = {a ..}"
|
|
246 |
by auto |
|
247 |
then have ?thesis |
|
248 |
apply (rule_tac x="ereal a" in exI) |
|
249 |
apply auto |
|
250 |
done |
|
| 49664 | 251 |
} |
| 53788 | 252 |
ultimately show ?thesis |
253 |
using mono_closed_real[of S] assms by auto |
|
|
41980
28b51effc5ed
split Extended_Reals into parts for Library and Multivariate_Analysis
hoelzl
parents:
diff
changeset
|
254 |
qed |
|
28b51effc5ed
split Extended_Reals into parts for Library and Multivariate_Analysis
hoelzl
parents:
diff
changeset
|
255 |
|
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
256 |
lemma Liminf_within: |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
257 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::complete_lattice" |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
258 |
shows "Liminf (at x within S) f = (SUP e:{0<..}. INF y:(S \<inter> ball x e - {x}). f y)"
|
|
51641
cd05e9fcc63d
remove the within-filter, replace "at" by "at _ within UNIV" (This allows to remove a couple of redundant lemmas)
hoelzl
parents:
51530
diff
changeset
|
259 |
unfolding Liminf_def eventually_at |
|
56212
3253aaf73a01
consolidated theorem names containing INFI and SUPR: have INF and SUP instead uniformly
haftmann
parents:
56166
diff
changeset
|
260 |
proof (rule SUP_eq, simp_all add: Ball_def Bex_def, safe) |
| 53788 | 261 |
fix P d |
262 |
assume "0 < d" and "\<forall>y. y \<in> S \<longrightarrow> y \<noteq> x \<and> dist y x < d \<longrightarrow> P y" |
|
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
263 |
then have "S \<inter> ball x d - {x} \<subseteq> {x. P x}"
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
264 |
by (auto simp: zero_less_dist_iff dist_commute) |
|
56218
1c3f1f2431f9
elongated INFI and SUPR, to reduced risk of confusing theorems names in the future while still being consistent with INTER and UNION
haftmann
parents:
56212
diff
changeset
|
265 |
then show "\<exists>r>0. INFIMUM (Collect P) f \<le> INFIMUM (S \<inter> ball x r - {x}) f"
|
| 60420 | 266 |
by (intro exI[of _ d] INF_mono conjI \<open>0 < d\<close>) auto |
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
267 |
next |
| 53788 | 268 |
fix d :: real |
269 |
assume "0 < d" |
|
|
51641
cd05e9fcc63d
remove the within-filter, replace "at" by "at _ within UNIV" (This allows to remove a couple of redundant lemmas)
hoelzl
parents:
51530
diff
changeset
|
270 |
then show "\<exists>P. (\<exists>d>0. \<forall>xa. xa \<in> S \<longrightarrow> xa \<noteq> x \<and> dist xa x < d \<longrightarrow> P xa) \<and> |
|
56218
1c3f1f2431f9
elongated INFI and SUPR, to reduced risk of confusing theorems names in the future while still being consistent with INTER and UNION
haftmann
parents:
56212
diff
changeset
|
271 |
INFIMUM (S \<inter> ball x d - {x}) f \<le> INFIMUM (Collect P) f"
|
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
272 |
by (intro exI[of _ "\<lambda>y. y \<in> S \<inter> ball x d - {x}"])
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
273 |
(auto intro!: INF_mono exI[of _ d] simp: dist_commute) |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
274 |
qed |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
275 |
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
276 |
lemma Limsup_within: |
| 53788 | 277 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::complete_lattice" |
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
278 |
shows "Limsup (at x within S) f = (INF e:{0<..}. SUP y:(S \<inter> ball x e - {x}). f y)"
|
|
51641
cd05e9fcc63d
remove the within-filter, replace "at" by "at _ within UNIV" (This allows to remove a couple of redundant lemmas)
hoelzl
parents:
51530
diff
changeset
|
279 |
unfolding Limsup_def eventually_at |
|
56212
3253aaf73a01
consolidated theorem names containing INFI and SUPR: have INF and SUP instead uniformly
haftmann
parents:
56166
diff
changeset
|
280 |
proof (rule INF_eq, simp_all add: Ball_def Bex_def, safe) |
| 53788 | 281 |
fix P d |
282 |
assume "0 < d" and "\<forall>y. y \<in> S \<longrightarrow> y \<noteq> x \<and> dist y x < d \<longrightarrow> P y" |
|
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
283 |
then have "S \<inter> ball x d - {x} \<subseteq> {x. P x}"
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
284 |
by (auto simp: zero_less_dist_iff dist_commute) |
|
56218
1c3f1f2431f9
elongated INFI and SUPR, to reduced risk of confusing theorems names in the future while still being consistent with INTER and UNION
haftmann
parents:
56212
diff
changeset
|
285 |
then show "\<exists>r>0. SUPREMUM (S \<inter> ball x r - {x}) f \<le> SUPREMUM (Collect P) f"
|
| 60420 | 286 |
by (intro exI[of _ d] SUP_mono conjI \<open>0 < d\<close>) auto |
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
287 |
next |
| 53788 | 288 |
fix d :: real |
289 |
assume "0 < d" |
|
|
51641
cd05e9fcc63d
remove the within-filter, replace "at" by "at _ within UNIV" (This allows to remove a couple of redundant lemmas)
hoelzl
parents:
51530
diff
changeset
|
290 |
then show "\<exists>P. (\<exists>d>0. \<forall>xa. xa \<in> S \<longrightarrow> xa \<noteq> x \<and> dist xa x < d \<longrightarrow> P xa) \<and> |
|
56218
1c3f1f2431f9
elongated INFI and SUPR, to reduced risk of confusing theorems names in the future while still being consistent with INTER and UNION
haftmann
parents:
56212
diff
changeset
|
291 |
SUPREMUM (Collect P) f \<le> SUPREMUM (S \<inter> ball x d - {x}) f"
|
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
292 |
by (intro exI[of _ "\<lambda>y. y \<in> S \<inter> ball x d - {x}"])
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
293 |
(auto intro!: SUP_mono exI[of _ d] simp: dist_commute) |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
294 |
qed |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
295 |
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
296 |
lemma Liminf_at: |
|
54257
5c7a3b6b05a9
generalize SUP and INF to the syntactic type classes Sup and Inf
hoelzl
parents:
53788
diff
changeset
|
297 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::complete_lattice" |
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
298 |
shows "Liminf (at x) f = (SUP e:{0<..}. INF y:(ball x e - {x}). f y)"
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
299 |
using Liminf_within[of x UNIV f] by simp |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
300 |
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
301 |
lemma Limsup_at: |
|
54257
5c7a3b6b05a9
generalize SUP and INF to the syntactic type classes Sup and Inf
hoelzl
parents:
53788
diff
changeset
|
302 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::complete_lattice" |
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
303 |
shows "Limsup (at x) f = (INF e:{0<..}. SUP y:(ball x e - {x}). f y)"
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
304 |
using Limsup_within[of x UNIV f] by simp |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
305 |
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
306 |
lemma min_Liminf_at: |
| 53788 | 307 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::complete_linorder" |
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
308 |
shows "min (f x) (Liminf (at x) f) = (SUP e:{0<..}. INF y:ball x e. f y)"
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
309 |
unfolding inf_min[symmetric] Liminf_at |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
310 |
apply (subst inf_commute) |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
311 |
apply (subst SUP_inf) |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
312 |
apply (intro SUP_cong[OF refl]) |
|
54260
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54258
diff
changeset
|
313 |
apply (cut_tac A="ball x xa - {x}" and B="{x}" and M=f in INF_union)
|
| 56166 | 314 |
apply (drule sym) |
315 |
apply auto |
|
| 57865 | 316 |
apply (metis INF_absorb centre_in_ball) |
317 |
done |
|
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
318 |
|
| 61245 | 319 |
lemma continuous_on_inverse_ereal: "continuous_on {0::ereal ..} inverse"
|
320 |
unfolding continuous_on_def |
|
321 |
proof clarsimp |
|
322 |
fix x :: ereal assume "0 \<le> x" |
|
323 |
moreover have "at 0 within {0 ..} = at_right (0::ereal)"
|
|
324 |
by (auto simp: filter_eq_iff eventually_at_filter le_less) |
|
325 |
moreover have "0 < x \<Longrightarrow> at x within {0 ..} = at x"
|
|
326 |
using at_within_interior[of x "{0 ..}"] by (simp add: interior_Ici[of "- \<infinity>"])
|
|
327 |
ultimately show "(inverse ---> inverse x) (at x within {0..})"
|
|
328 |
by (auto simp: le_less inverse_ereal_tendsto_at_right_0 inverse_ereal_tendsto_pos) |
|
329 |
qed |
|
330 |
||
331 |
||
332 |
lemma Liminf_inverse_ereal: |
|
333 |
assumes nneg: "\<forall>\<^sub>F x in F. f x \<ge> (0 :: ereal)" and "F \<noteq> bot" |
|
334 |
shows "Liminf F (\<lambda>n. inverse (f n)) = inverse (Limsup F f)" |
|
335 |
proof - |
|
336 |
def I \<equiv> "\<lambda>x::ereal. if x \<le> 0 then \<infinity> else inverse x" |
|
337 |
have "Liminf F (\<lambda>n. I (f n)) = I (Limsup F f)" |
|
338 |
proof (rule Liminf_compose_continuous_antimono) |
|
339 |
have "continuous_on ({.. 0} \<union> {0 ..}) I"
|
|
340 |
unfolding I_def by (intro continuous_on_cases) (auto intro: continuous_on_const continuous_on_inverse_ereal) |
|
341 |
also have "{.. 0} \<union> {0::ereal ..} = UNIV"
|
|
342 |
by auto |
|
343 |
finally show "continuous_on UNIV I" . |
|
344 |
show "antimono I" |
|
345 |
unfolding antimono_def I_def by (auto intro: ereal_inverse_antimono) |
|
346 |
qed fact |
|
347 |
also have "Liminf F (\<lambda>n. I (f n)) = Liminf F (\<lambda>n. inverse (f n))" |
|
348 |
proof (rule Liminf_eq) |
|
349 |
show "\<forall>\<^sub>F x in F. I (f x) = inverse (f x)" |
|
350 |
using nneg by eventually_elim (auto simp: I_def) |
|
351 |
qed |
|
352 |
also have "0 \<le> Limsup F f" |
|
353 |
by (intro le_Limsup) fact+ |
|
354 |
then have "I (Limsup F f) = inverse (Limsup F f)" |
|
355 |
by (auto simp: I_def) |
|
356 |
finally show ?thesis . |
|
357 |
qed |
|
358 |
||
| 60420 | 359 |
subsection \<open>monoset\<close> |
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
360 |
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
361 |
definition (in order) mono_set: |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
362 |
"mono_set S \<longleftrightarrow> (\<forall>x y. x \<le> y \<longrightarrow> x \<in> S \<longrightarrow> y \<in> S)" |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
363 |
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
364 |
lemma (in order) mono_greaterThan [intro, simp]: "mono_set {B<..}" unfolding mono_set by auto
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
365 |
lemma (in order) mono_atLeast [intro, simp]: "mono_set {B..}" unfolding mono_set by auto
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
366 |
lemma (in order) mono_UNIV [intro, simp]: "mono_set UNIV" unfolding mono_set by auto |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
367 |
lemma (in order) mono_empty [intro, simp]: "mono_set {}" unfolding mono_set by auto
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
368 |
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
369 |
lemma (in complete_linorder) mono_set_iff: |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
370 |
fixes S :: "'a set" |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
371 |
defines "a \<equiv> Inf S" |
| 53788 | 372 |
shows "mono_set S \<longleftrightarrow> S = {a <..} \<or> S = {a..}" (is "_ = ?c")
|
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
373 |
proof |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
374 |
assume "mono_set S" |
| 53788 | 375 |
then have mono: "\<And>x y. x \<le> y \<Longrightarrow> x \<in> S \<Longrightarrow> y \<in> S" |
376 |
by (auto simp: mono_set) |
|
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
377 |
show ?c |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
378 |
proof cases |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
379 |
assume "a \<in> S" |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
380 |
show ?c |
| 60420 | 381 |
using mono[OF _ \<open>a \<in> S\<close>] |
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
382 |
by (auto intro: Inf_lower simp: a_def) |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
383 |
next |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
384 |
assume "a \<notin> S" |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
385 |
have "S = {a <..}"
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
386 |
proof safe |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
387 |
fix x assume "x \<in> S" |
| 53788 | 388 |
then have "a \<le> x" |
389 |
unfolding a_def by (rule Inf_lower) |
|
390 |
then show "a < x" |
|
| 60420 | 391 |
using \<open>x \<in> S\<close> \<open>a \<notin> S\<close> by (cases "a = x") auto |
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
392 |
next |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
393 |
fix x assume "a < x" |
| 53788 | 394 |
then obtain y where "y < x" "y \<in> S" |
395 |
unfolding a_def Inf_less_iff .. |
|
396 |
with mono[of y x] show "x \<in> S" |
|
397 |
by auto |
|
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
398 |
qed |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
399 |
then show ?c .. |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
400 |
qed |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
401 |
qed auto |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
402 |
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
403 |
lemma ereal_open_mono_set: |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
404 |
fixes S :: "ereal set" |
| 53788 | 405 |
shows "open S \<and> mono_set S \<longleftrightarrow> S = UNIV \<or> S = {Inf S <..}"
|
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
406 |
by (metis Inf_UNIV atLeast_eq_UNIV_iff ereal_open_atLeast |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
407 |
ereal_open_closed mono_set_iff open_ereal_greaterThan) |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
408 |
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
409 |
lemma ereal_closed_mono_set: |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
410 |
fixes S :: "ereal set" |
| 53788 | 411 |
shows "closed S \<and> mono_set S \<longleftrightarrow> S = {} \<or> S = {Inf S ..}"
|
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
412 |
by (metis Inf_UNIV atLeast_eq_UNIV_iff closed_ereal_atLeast |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
413 |
ereal_open_closed mono_empty mono_set_iff open_ereal_greaterThan) |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
414 |
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
415 |
lemma ereal_Liminf_Sup_monoset: |
| 53788 | 416 |
fixes f :: "'a \<Rightarrow> ereal" |
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
417 |
shows "Liminf net f = |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
418 |
Sup {l. \<forall>S. open S \<longrightarrow> mono_set S \<longrightarrow> l \<in> S \<longrightarrow> eventually (\<lambda>x. f x \<in> S) net}"
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
419 |
(is "_ = Sup ?A") |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
420 |
proof (safe intro!: Liminf_eqI complete_lattice_class.Sup_upper complete_lattice_class.Sup_least) |
| 53788 | 421 |
fix P |
422 |
assume P: "eventually P net" |
|
423 |
fix S |
|
|
56218
1c3f1f2431f9
elongated INFI and SUPR, to reduced risk of confusing theorems names in the future while still being consistent with INTER and UNION
haftmann
parents:
56212
diff
changeset
|
424 |
assume S: "mono_set S" "INFIMUM (Collect P) f \<in> S" |
| 53788 | 425 |
{
|
426 |
fix x |
|
427 |
assume "P x" |
|
|
56218
1c3f1f2431f9
elongated INFI and SUPR, to reduced risk of confusing theorems names in the future while still being consistent with INTER and UNION
haftmann
parents:
56212
diff
changeset
|
428 |
then have "INFIMUM (Collect P) f \<le> f x" |
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
429 |
by (intro complete_lattice_class.INF_lower) simp |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
430 |
with S have "f x \<in> S" |
| 53788 | 431 |
by (simp add: mono_set) |
432 |
} |
|
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
433 |
with P show "eventually (\<lambda>x. f x \<in> S) net" |
| 61810 | 434 |
by (auto elim: eventually_mono) |
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
435 |
next |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
436 |
fix y l |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
437 |
assume S: "\<forall>S. open S \<longrightarrow> mono_set S \<longrightarrow> l \<in> S \<longrightarrow> eventually (\<lambda>x. f x \<in> S) net" |
|
56218
1c3f1f2431f9
elongated INFI and SUPR, to reduced risk of confusing theorems names in the future while still being consistent with INTER and UNION
haftmann
parents:
56212
diff
changeset
|
438 |
assume P: "\<forall>P. eventually P net \<longrightarrow> INFIMUM (Collect P) f \<le> y" |
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
439 |
show "l \<le> y" |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
440 |
proof (rule dense_le) |
| 53788 | 441 |
fix B |
442 |
assume "B < l" |
|
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
443 |
then have "eventually (\<lambda>x. f x \<in> {B <..}) net"
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
444 |
by (intro S[rule_format]) auto |
|
56218
1c3f1f2431f9
elongated INFI and SUPR, to reduced risk of confusing theorems names in the future while still being consistent with INTER and UNION
haftmann
parents:
56212
diff
changeset
|
445 |
then have "INFIMUM {x. B < f x} f \<le> y"
|
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
446 |
using P by auto |
|
56218
1c3f1f2431f9
elongated INFI and SUPR, to reduced risk of confusing theorems names in the future while still being consistent with INTER and UNION
haftmann
parents:
56212
diff
changeset
|
447 |
moreover have "B \<le> INFIMUM {x. B < f x} f"
|
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
448 |
by (intro INF_greatest) auto |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
449 |
ultimately show "B \<le> y" |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
450 |
by simp |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
451 |
qed |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
452 |
qed |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
453 |
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
454 |
lemma ereal_Limsup_Inf_monoset: |
| 53788 | 455 |
fixes f :: "'a \<Rightarrow> ereal" |
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
456 |
shows "Limsup net f = |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
457 |
Inf {l. \<forall>S. open S \<longrightarrow> mono_set (uminus ` S) \<longrightarrow> l \<in> S \<longrightarrow> eventually (\<lambda>x. f x \<in> S) net}"
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
458 |
(is "_ = Inf ?A") |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
459 |
proof (safe intro!: Limsup_eqI complete_lattice_class.Inf_lower complete_lattice_class.Inf_greatest) |
| 53788 | 460 |
fix P |
461 |
assume P: "eventually P net" |
|
462 |
fix S |
|
|
56218
1c3f1f2431f9
elongated INFI and SUPR, to reduced risk of confusing theorems names in the future while still being consistent with INTER and UNION
haftmann
parents:
56212
diff
changeset
|
463 |
assume S: "mono_set (uminus`S)" "SUPREMUM (Collect P) f \<in> S" |
| 53788 | 464 |
{
|
465 |
fix x |
|
466 |
assume "P x" |
|
|
56218
1c3f1f2431f9
elongated INFI and SUPR, to reduced risk of confusing theorems names in the future while still being consistent with INTER and UNION
haftmann
parents:
56212
diff
changeset
|
467 |
then have "f x \<le> SUPREMUM (Collect P) f" |
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
468 |
by (intro complete_lattice_class.SUP_upper) simp |
|
56218
1c3f1f2431f9
elongated INFI and SUPR, to reduced risk of confusing theorems names in the future while still being consistent with INTER and UNION
haftmann
parents:
56212
diff
changeset
|
469 |
with S(1)[unfolded mono_set, rule_format, of "- SUPREMUM (Collect P) f" "- f x"] S(2) |
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
470 |
have "f x \<in> S" |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
471 |
by (simp add: inj_image_mem_iff) } |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
472 |
with P show "eventually (\<lambda>x. f x \<in> S) net" |
| 61810 | 473 |
by (auto elim: eventually_mono) |
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
474 |
next |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
475 |
fix y l |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
476 |
assume S: "\<forall>S. open S \<longrightarrow> mono_set (uminus ` S) \<longrightarrow> l \<in> S \<longrightarrow> eventually (\<lambda>x. f x \<in> S) net" |
|
56218
1c3f1f2431f9
elongated INFI and SUPR, to reduced risk of confusing theorems names in the future while still being consistent with INTER and UNION
haftmann
parents:
56212
diff
changeset
|
477 |
assume P: "\<forall>P. eventually P net \<longrightarrow> y \<le> SUPREMUM (Collect P) f" |
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
478 |
show "y \<le> l" |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
479 |
proof (rule dense_ge) |
| 53788 | 480 |
fix B |
481 |
assume "l < B" |
|
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
482 |
then have "eventually (\<lambda>x. f x \<in> {..< B}) net"
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
483 |
by (intro S[rule_format]) auto |
|
56218
1c3f1f2431f9
elongated INFI and SUPR, to reduced risk of confusing theorems names in the future while still being consistent with INTER and UNION
haftmann
parents:
56212
diff
changeset
|
484 |
then have "y \<le> SUPREMUM {x. f x < B} f"
|
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
485 |
using P by auto |
|
56218
1c3f1f2431f9
elongated INFI and SUPR, to reduced risk of confusing theorems names in the future while still being consistent with INTER and UNION
haftmann
parents:
56212
diff
changeset
|
486 |
moreover have "SUPREMUM {x. f x < B} f \<le> B"
|
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
487 |
by (intro SUP_least) auto |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
488 |
ultimately show "y \<le> B" |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
489 |
by simp |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
490 |
qed |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
491 |
qed |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
492 |
|
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
493 |
lemma liminf_bounded_open: |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
494 |
fixes x :: "nat \<Rightarrow> ereal" |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
495 |
shows "x0 \<le> liminf x \<longleftrightarrow> (\<forall>S. open S \<longrightarrow> mono_set S \<longrightarrow> x0 \<in> S \<longrightarrow> (\<exists>N. \<forall>n\<ge>N. x n \<in> S))" |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
496 |
(is "_ \<longleftrightarrow> ?P x0") |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
497 |
proof |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
498 |
assume "?P x0" |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
499 |
then show "x0 \<le> liminf x" |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
500 |
unfolding ereal_Liminf_Sup_monoset eventually_sequentially |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
501 |
by (intro complete_lattice_class.Sup_upper) auto |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
502 |
next |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
503 |
assume "x0 \<le> liminf x" |
| 53788 | 504 |
{
|
505 |
fix S :: "ereal set" |
|
506 |
assume om: "open S" "mono_set S" "x0 \<in> S" |
|
507 |
{
|
|
508 |
assume "S = UNIV" |
|
509 |
then have "\<exists>N. \<forall>n\<ge>N. x n \<in> S" |
|
510 |
by auto |
|
511 |
} |
|
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
512 |
moreover |
| 53788 | 513 |
{
|
514 |
assume "S \<noteq> UNIV" |
|
515 |
then obtain B where B: "S = {B<..}"
|
|
516 |
using om ereal_open_mono_set by auto |
|
517 |
then have "B < x0" |
|
518 |
using om by auto |
|
519 |
then have "\<exists>N. \<forall>n\<ge>N. x n \<in> S" |
|
520 |
unfolding B |
|
| 60420 | 521 |
using \<open>x0 \<le> liminf x\<close> liminf_bounded_iff |
| 53788 | 522 |
by auto |
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
523 |
} |
| 53788 | 524 |
ultimately have "\<exists>N. \<forall>n\<ge>N. x n \<in> S" |
525 |
by auto |
|
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
526 |
} |
| 53788 | 527 |
then show "?P x0" |
528 |
by auto |
|
|
51340
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
529 |
qed |
|
5e6296afe08d
move Liminf / Limsup lemmas on complete_lattices to its own file
hoelzl
parents:
51329
diff
changeset
|
530 |
|
|
57446
06e195515deb
some lemmas about the indicator function; removed lemma sums_def2
hoelzl
parents:
57418
diff
changeset
|
531 |
subsection "Relate extended reals and the indicator function" |
|
06e195515deb
some lemmas about the indicator function; removed lemma sums_def2
hoelzl
parents:
57418
diff
changeset
|
532 |
|
| 59000 | 533 |
lemma ereal_indicator_le_0: "(indicator S x::ereal) \<le> 0 \<longleftrightarrow> x \<notin> S" |
534 |
by (auto split: split_indicator simp: one_ereal_def) |
|
535 |
||
|
57446
06e195515deb
some lemmas about the indicator function; removed lemma sums_def2
hoelzl
parents:
57418
diff
changeset
|
536 |
lemma ereal_indicator: "ereal (indicator A x) = indicator A x" |
|
06e195515deb
some lemmas about the indicator function; removed lemma sums_def2
hoelzl
parents:
57418
diff
changeset
|
537 |
by (auto simp: indicator_def one_ereal_def) |
|
06e195515deb
some lemmas about the indicator function; removed lemma sums_def2
hoelzl
parents:
57418
diff
changeset
|
538 |
|
|
06e195515deb
some lemmas about the indicator function; removed lemma sums_def2
hoelzl
parents:
57418
diff
changeset
|
539 |
lemma ereal_mult_indicator: "ereal (x * indicator A y) = ereal x * indicator A y" |
|
06e195515deb
some lemmas about the indicator function; removed lemma sums_def2
hoelzl
parents:
57418
diff
changeset
|
540 |
by (simp split: split_indicator) |
|
06e195515deb
some lemmas about the indicator function; removed lemma sums_def2
hoelzl
parents:
57418
diff
changeset
|
541 |
|
|
06e195515deb
some lemmas about the indicator function; removed lemma sums_def2
hoelzl
parents:
57418
diff
changeset
|
542 |
lemma ereal_indicator_mult: "ereal (indicator A y * x) = indicator A y * ereal x" |
|
06e195515deb
some lemmas about the indicator function; removed lemma sums_def2
hoelzl
parents:
57418
diff
changeset
|
543 |
by (simp split: split_indicator) |
|
06e195515deb
some lemmas about the indicator function; removed lemma sums_def2
hoelzl
parents:
57418
diff
changeset
|
544 |
|
|
06e195515deb
some lemmas about the indicator function; removed lemma sums_def2
hoelzl
parents:
57418
diff
changeset
|
545 |
lemma ereal_indicator_nonneg[simp, intro]: "0 \<le> (indicator A x ::ereal)" |
|
06e195515deb
some lemmas about the indicator function; removed lemma sums_def2
hoelzl
parents:
57418
diff
changeset
|
546 |
unfolding indicator_def by auto |
|
06e195515deb
some lemmas about the indicator function; removed lemma sums_def2
hoelzl
parents:
57418
diff
changeset
|
547 |
|
| 59425 | 548 |
lemma indicator_inter_arith_ereal: "indicator A x * indicator B x = (indicator (A \<inter> B) x :: ereal)" |
549 |
by (simp split: split_indicator) |
|
550 |
||
| 44125 | 551 |
end |