author | wenzelm |
Mon, 25 Apr 2016 16:09:26 +0200 | |
changeset 63040 | eb4ddd18d635 |
parent 63007 | aa894a49f77d |
child 63075 | 60a42a4166af |
permissions | -rw-r--r-- |
33714
eb2574ac4173
Added new lemmas to Euclidean Space by Robert Himmelmann
hoelzl
parents:
33324
diff
changeset
|
1 |
(* title: HOL/Library/Topology_Euclidian_Space.thy |
33175 | 2 |
Author: Amine Chaieb, University of Cambridge |
3 |
Author: Robert Himmelmann, TU Muenchen |
|
44075 | 4 |
Author: Brian Huffman, Portland State University |
33175 | 5 |
*) |
6 |
||
60420 | 7 |
section \<open>Elementary topology in Euclidean space.\<close> |
33175 | 8 |
|
9 |
theory Topology_Euclidean_Space |
|
50087 | 10 |
imports |
61880
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
11 |
"~~/src/HOL/Library/Indicator_Function" |
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
12 |
"~~/src/HOL/Library/Countable_Set" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
13 |
"~~/src/HOL/Library/FuncSet" |
50938 | 14 |
Linear_Algebra |
50087 | 15 |
Norm_Arith |
16 |
begin |
|
17 |
||
61738
c4f6031f1310
New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents:
61699
diff
changeset
|
18 |
lemma image_affinity_interval: |
c4f6031f1310
New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents:
61699
diff
changeset
|
19 |
fixes c :: "'a::ordered_real_vector" |
c4f6031f1310
New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents:
61699
diff
changeset
|
20 |
shows "((\<lambda>x. m *\<^sub>R x + c) ` {a..b}) = (if {a..b}={} then {} |
c4f6031f1310
New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents:
61699
diff
changeset
|
21 |
else if 0 <= m then {m *\<^sub>R a + c .. m *\<^sub>R b + c} |
c4f6031f1310
New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents:
61699
diff
changeset
|
22 |
else {m *\<^sub>R b + c .. m *\<^sub>R a + c})" |
c4f6031f1310
New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents:
61699
diff
changeset
|
23 |
apply (case_tac "m=0", force) |
c4f6031f1310
New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents:
61699
diff
changeset
|
24 |
apply (auto simp: scaleR_left_mono) |
c4f6031f1310
New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents:
61699
diff
changeset
|
25 |
apply (rule_tac x="inverse m *\<^sub>R (x-c)" in rev_image_eqI, auto simp: pos_le_divideR_eq le_diff_eq scaleR_left_mono_neg) |
c4f6031f1310
New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents:
61699
diff
changeset
|
26 |
apply (metis diff_le_eq inverse_inverse_eq order.not_eq_order_implies_strict pos_le_divideR_eq positive_imp_inverse_positive) |
c4f6031f1310
New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents:
61699
diff
changeset
|
27 |
apply (rule_tac x="inverse m *\<^sub>R (x-c)" in rev_image_eqI, auto simp: not_le neg_le_divideR_eq diff_le_eq) |
c4f6031f1310
New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents:
61699
diff
changeset
|
28 |
using le_diff_eq scaleR_le_cancel_left_neg |
c4f6031f1310
New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents:
61699
diff
changeset
|
29 |
apply fastforce |
c4f6031f1310
New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents:
61699
diff
changeset
|
30 |
done |
c4f6031f1310
New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents:
61699
diff
changeset
|
31 |
|
53282 | 32 |
lemma countable_PiE: |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
33 |
"finite I \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> countable (F i)) \<Longrightarrow> countable (PiE I F)" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
34 |
by (induct I arbitrary: F rule: finite_induct) (auto simp: PiE_insert_eq) |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
35 |
|
51481
ef949192e5d6
move continuous_on_inv to HOL image (simplifies isCont_inverse_function)
hoelzl
parents:
51480
diff
changeset
|
36 |
lemma continuous_on_cases: |
ef949192e5d6
move continuous_on_inv to HOL image (simplifies isCont_inverse_function)
hoelzl
parents:
51480
diff
changeset
|
37 |
"closed s \<Longrightarrow> closed t \<Longrightarrow> continuous_on s f \<Longrightarrow> continuous_on t g \<Longrightarrow> |
ef949192e5d6
move continuous_on_inv to HOL image (simplifies isCont_inverse_function)
hoelzl
parents:
51480
diff
changeset
|
38 |
\<forall>x. (x\<in>s \<and> \<not> P x) \<or> (x \<in> t \<and> P x) \<longrightarrow> f x = g x \<Longrightarrow> |
ef949192e5d6
move continuous_on_inv to HOL image (simplifies isCont_inverse_function)
hoelzl
parents:
51480
diff
changeset
|
39 |
continuous_on (s \<union> t) (\<lambda>x. if P x then f x else g x)" |
ef949192e5d6
move continuous_on_inv to HOL image (simplifies isCont_inverse_function)
hoelzl
parents:
51480
diff
changeset
|
40 |
by (rule continuous_on_If) auto |
ef949192e5d6
move continuous_on_inv to HOL image (simplifies isCont_inverse_function)
hoelzl
parents:
51480
diff
changeset
|
41 |
|
53255 | 42 |
|
60420 | 43 |
subsection \<open>Topological Basis\<close> |
50087 | 44 |
|
45 |
context topological_space |
|
46 |
begin |
|
47 |
||
53291 | 48 |
definition "topological_basis B \<longleftrightarrow> |
49 |
(\<forall>b\<in>B. open b) \<and> (\<forall>x. open x \<longrightarrow> (\<exists>B'. B' \<subseteq> B \<and> \<Union>B' = x))" |
|
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
50 |
|
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
51 |
lemma topological_basis: |
53291 | 52 |
"topological_basis B \<longleftrightarrow> (\<forall>x. open x \<longleftrightarrow> (\<exists>B'. B' \<subseteq> B \<and> \<Union>B' = x))" |
50998 | 53 |
unfolding topological_basis_def |
54 |
apply safe |
|
55 |
apply fastforce |
|
56 |
apply fastforce |
|
57 |
apply (erule_tac x="x" in allE) |
|
58 |
apply simp |
|
59 |
apply (rule_tac x="{x}" in exI) |
|
60 |
apply auto |
|
61 |
done |
|
62 |
||
50087 | 63 |
lemma topological_basis_iff: |
64 |
assumes "\<And>B'. B' \<in> B \<Longrightarrow> open B'" |
|
65 |
shows "topological_basis B \<longleftrightarrow> (\<forall>O'. open O' \<longrightarrow> (\<forall>x\<in>O'. \<exists>B'\<in>B. x \<in> B' \<and> B' \<subseteq> O'))" |
|
66 |
(is "_ \<longleftrightarrow> ?rhs") |
|
67 |
proof safe |
|
68 |
fix O' and x::'a |
|
69 |
assume H: "topological_basis B" "open O'" "x \<in> O'" |
|
53282 | 70 |
then have "(\<exists>B'\<subseteq>B. \<Union>B' = O')" by (simp add: topological_basis_def) |
50087 | 71 |
then obtain B' where "B' \<subseteq> B" "O' = \<Union>B'" by auto |
53282 | 72 |
then show "\<exists>B'\<in>B. x \<in> B' \<and> B' \<subseteq> O'" using H by auto |
50087 | 73 |
next |
74 |
assume H: ?rhs |
|
53282 | 75 |
show "topological_basis B" |
76 |
using assms unfolding topological_basis_def |
|
50087 | 77 |
proof safe |
53640 | 78 |
fix O' :: "'a set" |
53282 | 79 |
assume "open O'" |
50087 | 80 |
with H obtain f where "\<forall>x\<in>O'. f x \<in> B \<and> x \<in> f x \<and> f x \<subseteq> O'" |
81 |
by (force intro: bchoice simp: Bex_def) |
|
53282 | 82 |
then show "\<exists>B'\<subseteq>B. \<Union>B' = O'" |
50087 | 83 |
by (auto intro: exI[where x="{f x |x. x \<in> O'}"]) |
84 |
qed |
|
85 |
qed |
|
86 |
||
87 |
lemma topological_basisI: |
|
88 |
assumes "\<And>B'. B' \<in> B \<Longrightarrow> open B'" |
|
53282 | 89 |
and "\<And>O' x. open O' \<Longrightarrow> x \<in> O' \<Longrightarrow> \<exists>B'\<in>B. x \<in> B' \<and> B' \<subseteq> O'" |
50087 | 90 |
shows "topological_basis B" |
91 |
using assms by (subst topological_basis_iff) auto |
|
92 |
||
93 |
lemma topological_basisE: |
|
94 |
fixes O' |
|
95 |
assumes "topological_basis B" |
|
53282 | 96 |
and "open O'" |
97 |
and "x \<in> O'" |
|
50087 | 98 |
obtains B' where "B' \<in> B" "x \<in> B'" "B' \<subseteq> O'" |
99 |
proof atomize_elim |
|
53282 | 100 |
from assms have "\<And>B'. B'\<in>B \<Longrightarrow> open B'" |
101 |
by (simp add: topological_basis_def) |
|
50087 | 102 |
with topological_basis_iff assms |
53282 | 103 |
show "\<exists>B'. B' \<in> B \<and> x \<in> B' \<and> B' \<subseteq> O'" |
104 |
using assms by (simp add: Bex_def) |
|
50087 | 105 |
qed |
106 |
||
50094
84ddcf5364b4
allow arbitrary enumerations of basis in locale for generation of borel sets
immler
parents:
50087
diff
changeset
|
107 |
lemma topological_basis_open: |
84ddcf5364b4
allow arbitrary enumerations of basis in locale for generation of borel sets
immler
parents:
50087
diff
changeset
|
108 |
assumes "topological_basis B" |
53282 | 109 |
and "X \<in> B" |
50094
84ddcf5364b4
allow arbitrary enumerations of basis in locale for generation of borel sets
immler
parents:
50087
diff
changeset
|
110 |
shows "open X" |
53282 | 111 |
using assms by (simp add: topological_basis_def) |
50094
84ddcf5364b4
allow arbitrary enumerations of basis in locale for generation of borel sets
immler
parents:
50087
diff
changeset
|
112 |
|
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
113 |
lemma topological_basis_imp_subbasis: |
53255 | 114 |
assumes B: "topological_basis B" |
115 |
shows "open = generate_topology B" |
|
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
116 |
proof (intro ext iffI) |
53255 | 117 |
fix S :: "'a set" |
118 |
assume "open S" |
|
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
119 |
with B obtain B' where "B' \<subseteq> B" "S = \<Union>B'" |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
120 |
unfolding topological_basis_def by blast |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
121 |
then show "generate_topology B S" |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
122 |
by (auto intro: generate_topology.intros dest: topological_basis_open) |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
123 |
next |
53255 | 124 |
fix S :: "'a set" |
125 |
assume "generate_topology B S" |
|
126 |
then show "open S" |
|
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
127 |
by induct (auto dest: topological_basis_open[OF B]) |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
128 |
qed |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
129 |
|
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
130 |
lemma basis_dense: |
53640 | 131 |
fixes B :: "'a set set" |
132 |
and f :: "'a set \<Rightarrow> 'a" |
|
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
133 |
assumes "topological_basis B" |
53255 | 134 |
and choosefrom_basis: "\<And>B'. B' \<noteq> {} \<Longrightarrow> f B' \<in> B'" |
55522 | 135 |
shows "\<forall>X. open X \<longrightarrow> X \<noteq> {} \<longrightarrow> (\<exists>B' \<in> B. f B' \<in> X)" |
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
136 |
proof (intro allI impI) |
53640 | 137 |
fix X :: "'a set" |
138 |
assume "open X" and "X \<noteq> {}" |
|
60420 | 139 |
from topological_basisE[OF \<open>topological_basis B\<close> \<open>open X\<close> choosefrom_basis[OF \<open>X \<noteq> {}\<close>]] |
55522 | 140 |
obtain B' where "B' \<in> B" "f X \<in> B'" "B' \<subseteq> X" . |
53255 | 141 |
then show "\<exists>B'\<in>B. f B' \<in> X" |
142 |
by (auto intro!: choosefrom_basis) |
|
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
143 |
qed |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
144 |
|
50087 | 145 |
end |
146 |
||
50882
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
147 |
lemma topological_basis_prod: |
53255 | 148 |
assumes A: "topological_basis A" |
149 |
and B: "topological_basis B" |
|
50882
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
150 |
shows "topological_basis ((\<lambda>(a, b). a \<times> b) ` (A \<times> B))" |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
151 |
unfolding topological_basis_def |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
152 |
proof (safe, simp_all del: ex_simps add: subset_image_iff ex_simps(1)[symmetric]) |
53255 | 153 |
fix S :: "('a \<times> 'b) set" |
154 |
assume "open S" |
|
50882
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
155 |
then show "\<exists>X\<subseteq>A \<times> B. (\<Union>(a,b)\<in>X. a \<times> b) = S" |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
156 |
proof (safe intro!: exI[of _ "{x\<in>A \<times> B. fst x \<times> snd x \<subseteq> S}"]) |
53255 | 157 |
fix x y |
158 |
assume "(x, y) \<in> S" |
|
60420 | 159 |
from open_prod_elim[OF \<open>open S\<close> this] |
50882
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
160 |
obtain a b where a: "open a""x \<in> a" and b: "open b" "y \<in> b" and "a \<times> b \<subseteq> S" |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
161 |
by (metis mem_Sigma_iff) |
55522 | 162 |
moreover |
163 |
from A a obtain A0 where "A0 \<in> A" "x \<in> A0" "A0 \<subseteq> a" |
|
164 |
by (rule topological_basisE) |
|
165 |
moreover |
|
166 |
from B b obtain B0 where "B0 \<in> B" "y \<in> B0" "B0 \<subseteq> b" |
|
167 |
by (rule topological_basisE) |
|
50882
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
168 |
ultimately show "(x, y) \<in> (\<Union>(a, b)\<in>{X \<in> A \<times> B. fst X \<times> snd X \<subseteq> S}. a \<times> b)" |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
169 |
by (intro UN_I[of "(A0, B0)"]) auto |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
170 |
qed auto |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
171 |
qed (metis A B topological_basis_open open_Times) |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
172 |
|
53255 | 173 |
|
60420 | 174 |
subsection \<open>Countable Basis\<close> |
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
175 |
|
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
176 |
locale countable_basis = |
53640 | 177 |
fixes B :: "'a::topological_space set set" |
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
178 |
assumes is_basis: "topological_basis B" |
53282 | 179 |
and countable_basis: "countable B" |
33175 | 180 |
begin |
181 |
||
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
182 |
lemma open_countable_basis_ex: |
50087 | 183 |
assumes "open X" |
61952 | 184 |
shows "\<exists>B' \<subseteq> B. X = \<Union>B'" |
53255 | 185 |
using assms countable_basis is_basis |
186 |
unfolding topological_basis_def by blast |
|
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
187 |
|
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
188 |
lemma open_countable_basisE: |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
189 |
assumes "open X" |
61952 | 190 |
obtains B' where "B' \<subseteq> B" "X = \<Union>B'" |
53255 | 191 |
using assms open_countable_basis_ex |
192 |
by (atomize_elim) simp |
|
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
193 |
|
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
194 |
lemma countable_dense_exists: |
53291 | 195 |
"\<exists>D::'a set. countable D \<and> (\<forall>X. open X \<longrightarrow> X \<noteq> {} \<longrightarrow> (\<exists>d \<in> D. d \<in> X))" |
50087 | 196 |
proof - |
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
197 |
let ?f = "(\<lambda>B'. SOME x. x \<in> B')" |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
198 |
have "countable (?f ` B)" using countable_basis by simp |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
199 |
with basis_dense[OF is_basis, of ?f] show ?thesis |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
200 |
by (intro exI[where x="?f ` B"]) (metis (mono_tags) all_not_in_conv imageI someI) |
50087 | 201 |
qed |
202 |
||
203 |
lemma countable_dense_setE: |
|
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
204 |
obtains D :: "'a set" |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
205 |
where "countable D" "\<And>X. open X \<Longrightarrow> X \<noteq> {} \<Longrightarrow> \<exists>d \<in> D. d \<in> X" |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
206 |
using countable_dense_exists by blast |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
207 |
|
50087 | 208 |
end |
209 |
||
50883 | 210 |
lemma (in first_countable_topology) first_countable_basisE: |
211 |
obtains A where "countable A" "\<And>a. a \<in> A \<Longrightarrow> x \<in> a" "\<And>a. a \<in> A \<Longrightarrow> open a" |
|
212 |
"\<And>S. open S \<Longrightarrow> x \<in> S \<Longrightarrow> (\<exists>a\<in>A. a \<subseteq> S)" |
|
213 |
using first_countable_basis[of x] |
|
51473 | 214 |
apply atomize_elim |
215 |
apply (elim exE) |
|
216 |
apply (rule_tac x="range A" in exI) |
|
217 |
apply auto |
|
218 |
done |
|
50883 | 219 |
|
51105 | 220 |
lemma (in first_countable_topology) first_countable_basis_Int_stableE: |
221 |
obtains A where "countable A" "\<And>a. a \<in> A \<Longrightarrow> x \<in> a" "\<And>a. a \<in> A \<Longrightarrow> open a" |
|
222 |
"\<And>S. open S \<Longrightarrow> x \<in> S \<Longrightarrow> (\<exists>a\<in>A. a \<subseteq> S)" |
|
223 |
"\<And>a b. a \<in> A \<Longrightarrow> b \<in> A \<Longrightarrow> a \<inter> b \<in> A" |
|
224 |
proof atomize_elim |
|
55522 | 225 |
obtain A' where A': |
226 |
"countable A'" |
|
227 |
"\<And>a. a \<in> A' \<Longrightarrow> x \<in> a" |
|
228 |
"\<And>a. a \<in> A' \<Longrightarrow> open a" |
|
229 |
"\<And>S. open S \<Longrightarrow> x \<in> S \<Longrightarrow> \<exists>a\<in>A'. a \<subseteq> S" |
|
230 |
by (rule first_countable_basisE) blast |
|
63040 | 231 |
define A where [abs_def]: |
232 |
"A = (\<lambda>N. \<Inter>((\<lambda>n. from_nat_into A' n) ` N)) ` (Collect finite::nat set set)" |
|
53255 | 233 |
then show "\<exists>A. countable A \<and> (\<forall>a. a \<in> A \<longrightarrow> x \<in> a) \<and> (\<forall>a. a \<in> A \<longrightarrow> open a) \<and> |
51105 | 234 |
(\<forall>S. open S \<longrightarrow> x \<in> S \<longrightarrow> (\<exists>a\<in>A. a \<subseteq> S)) \<and> (\<forall>a b. a \<in> A \<longrightarrow> b \<in> A \<longrightarrow> a \<inter> b \<in> A)" |
235 |
proof (safe intro!: exI[where x=A]) |
|
53255 | 236 |
show "countable A" |
237 |
unfolding A_def by (intro countable_image countable_Collect_finite) |
|
238 |
fix a |
|
239 |
assume "a \<in> A" |
|
240 |
then show "x \<in> a" "open a" |
|
241 |
using A'(4)[OF open_UNIV] by (auto simp: A_def intro: A' from_nat_into) |
|
51105 | 242 |
next |
52141
eff000cab70f
weaker precendence of syntax for big intersection and union on sets
haftmann
parents:
51773
diff
changeset
|
243 |
let ?int = "\<lambda>N. \<Inter>(from_nat_into A' ` N)" |
53255 | 244 |
fix a b |
245 |
assume "a \<in> A" "b \<in> A" |
|
246 |
then obtain N M where "a = ?int N" "b = ?int M" "finite (N \<union> M)" |
|
247 |
by (auto simp: A_def) |
|
248 |
then show "a \<inter> b \<in> A" |
|
249 |
by (auto simp: A_def intro!: image_eqI[where x="N \<union> M"]) |
|
51105 | 250 |
next |
53255 | 251 |
fix S |
252 |
assume "open S" "x \<in> S" |
|
253 |
then obtain a where a: "a\<in>A'" "a \<subseteq> S" using A' by blast |
|
254 |
then show "\<exists>a\<in>A. a \<subseteq> S" using a A' |
|
51105 | 255 |
by (intro bexI[where x=a]) (auto simp: A_def intro: image_eqI[where x="{to_nat_on A' a}"]) |
256 |
qed |
|
257 |
qed |
|
258 |
||
51473 | 259 |
lemma (in topological_space) first_countableI: |
53255 | 260 |
assumes "countable A" |
261 |
and 1: "\<And>a. a \<in> A \<Longrightarrow> x \<in> a" "\<And>a. a \<in> A \<Longrightarrow> open a" |
|
262 |
and 2: "\<And>S. open S \<Longrightarrow> x \<in> S \<Longrightarrow> \<exists>a\<in>A. a \<subseteq> S" |
|
51473 | 263 |
shows "\<exists>A::nat \<Rightarrow> 'a set. (\<forall>i. x \<in> A i \<and> open (A i)) \<and> (\<forall>S. open S \<and> x \<in> S \<longrightarrow> (\<exists>i. A i \<subseteq> S))" |
264 |
proof (safe intro!: exI[of _ "from_nat_into A"]) |
|
53255 | 265 |
fix i |
51473 | 266 |
have "A \<noteq> {}" using 2[of UNIV] by auto |
53255 | 267 |
show "x \<in> from_nat_into A i" "open (from_nat_into A i)" |
60420 | 268 |
using range_from_nat_into_subset[OF \<open>A \<noteq> {}\<close>] 1 by auto |
53255 | 269 |
next |
270 |
fix S |
|
271 |
assume "open S" "x\<in>S" from 2[OF this] |
|
272 |
show "\<exists>i. from_nat_into A i \<subseteq> S" |
|
60420 | 273 |
using subset_range_from_nat_into[OF \<open>countable A\<close>] by auto |
51473 | 274 |
qed |
51350 | 275 |
|
50883 | 276 |
instance prod :: (first_countable_topology, first_countable_topology) first_countable_topology |
277 |
proof |
|
278 |
fix x :: "'a \<times> 'b" |
|
55522 | 279 |
obtain A where A: |
280 |
"countable A" |
|
281 |
"\<And>a. a \<in> A \<Longrightarrow> fst x \<in> a" |
|
282 |
"\<And>a. a \<in> A \<Longrightarrow> open a" |
|
283 |
"\<And>S. open S \<Longrightarrow> fst x \<in> S \<Longrightarrow> \<exists>a\<in>A. a \<subseteq> S" |
|
284 |
by (rule first_countable_basisE[of "fst x"]) blast |
|
285 |
obtain B where B: |
|
286 |
"countable B" |
|
287 |
"\<And>a. a \<in> B \<Longrightarrow> snd x \<in> a" |
|
288 |
"\<And>a. a \<in> B \<Longrightarrow> open a" |
|
289 |
"\<And>S. open S \<Longrightarrow> snd x \<in> S \<Longrightarrow> \<exists>a\<in>B. a \<subseteq> S" |
|
290 |
by (rule first_countable_basisE[of "snd x"]) blast |
|
53282 | 291 |
show "\<exists>A::nat \<Rightarrow> ('a \<times> 'b) set. |
292 |
(\<forall>i. x \<in> A i \<and> open (A i)) \<and> (\<forall>S. open S \<and> x \<in> S \<longrightarrow> (\<exists>i. A i \<subseteq> S))" |
|
51473 | 293 |
proof (rule first_countableI[of "(\<lambda>(a, b). a \<times> b) ` (A \<times> B)"], safe) |
53255 | 294 |
fix a b |
295 |
assume x: "a \<in> A" "b \<in> B" |
|
53640 | 296 |
with A(2, 3)[of a] B(2, 3)[of b] show "x \<in> a \<times> b" and "open (a \<times> b)" |
297 |
unfolding mem_Times_iff |
|
298 |
by (auto intro: open_Times) |
|
50883 | 299 |
next |
53255 | 300 |
fix S |
301 |
assume "open S" "x \<in> S" |
|
55522 | 302 |
then obtain a' b' where a'b': "open a'" "open b'" "x \<in> a' \<times> b'" "a' \<times> b' \<subseteq> S" |
303 |
by (rule open_prod_elim) |
|
304 |
moreover |
|
305 |
from a'b' A(4)[of a'] B(4)[of b'] |
|
306 |
obtain a b where "a \<in> A" "a \<subseteq> a'" "b \<in> B" "b \<subseteq> b'" |
|
307 |
by auto |
|
308 |
ultimately |
|
309 |
show "\<exists>a\<in>(\<lambda>(a, b). a \<times> b) ` (A \<times> B). a \<subseteq> S" |
|
50883 | 310 |
by (auto intro!: bexI[of _ "a \<times> b"] bexI[of _ a] bexI[of _ b]) |
311 |
qed (simp add: A B) |
|
312 |
qed |
|
313 |
||
50881
ae630bab13da
renamed countable_basis_space to second_countable_topology
hoelzl
parents:
50526
diff
changeset
|
314 |
class second_countable_topology = topological_space + |
53282 | 315 |
assumes ex_countable_subbasis: |
316 |
"\<exists>B::'a::topological_space set set. countable B \<and> open = generate_topology B" |
|
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
317 |
begin |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
318 |
|
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
319 |
lemma ex_countable_basis: "\<exists>B::'a set set. countable B \<and> topological_basis B" |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
320 |
proof - |
53255 | 321 |
from ex_countable_subbasis obtain B where B: "countable B" "open = generate_topology B" |
322 |
by blast |
|
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
323 |
let ?B = "Inter ` {b. finite b \<and> b \<subseteq> B }" |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
324 |
|
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
325 |
show ?thesis |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
326 |
proof (intro exI conjI) |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
327 |
show "countable ?B" |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
328 |
by (intro countable_image countable_Collect_finite_subset B) |
53255 | 329 |
{ |
330 |
fix S |
|
331 |
assume "open S" |
|
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
332 |
then have "\<exists>B'\<subseteq>{b. finite b \<and> b \<subseteq> B}. (\<Union>b\<in>B'. \<Inter>b) = S" |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
333 |
unfolding B |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
334 |
proof induct |
53255 | 335 |
case UNIV |
336 |
show ?case by (intro exI[of _ "{{}}"]) simp |
|
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
337 |
next |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
338 |
case (Int a b) |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
339 |
then obtain x y where x: "a = UNION x Inter" "\<And>i. i \<in> x \<Longrightarrow> finite i \<and> i \<subseteq> B" |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
340 |
and y: "b = UNION y Inter" "\<And>i. i \<in> y \<Longrightarrow> finite i \<and> i \<subseteq> B" |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
341 |
by blast |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
342 |
show ?case |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
343 |
unfolding x y Int_UN_distrib2 |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
344 |
by (intro exI[of _ "{i \<union> j| i j. i \<in> x \<and> j \<in> y}"]) (auto dest: x(2) y(2)) |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
345 |
next |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
346 |
case (UN K) |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
347 |
then have "\<forall>k\<in>K. \<exists>B'\<subseteq>{b. finite b \<and> b \<subseteq> B}. UNION B' Inter = k" by auto |
55522 | 348 |
then obtain k where |
349 |
"\<forall>ka\<in>K. k ka \<subseteq> {b. finite b \<and> b \<subseteq> B} \<and> UNION (k ka) Inter = ka" |
|
350 |
unfolding bchoice_iff .. |
|
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
351 |
then show "\<exists>B'\<subseteq>{b. finite b \<and> b \<subseteq> B}. UNION B' Inter = \<Union>K" |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
352 |
by (intro exI[of _ "UNION K k"]) auto |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
353 |
next |
53255 | 354 |
case (Basis S) |
355 |
then show ?case |
|
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
356 |
by (intro exI[of _ "{{S}}"]) auto |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
357 |
qed |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
358 |
then have "(\<exists>B'\<subseteq>Inter ` {b. finite b \<and> b \<subseteq> B}. \<Union>B' = S)" |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
359 |
unfolding subset_image_iff by blast } |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
360 |
then show "topological_basis ?B" |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
361 |
unfolding topological_space_class.topological_basis_def |
53282 | 362 |
by (safe intro!: topological_space_class.open_Inter) |
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
363 |
(simp_all add: B generate_topology.Basis subset_eq) |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
364 |
qed |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
365 |
qed |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
366 |
|
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
367 |
end |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
368 |
|
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
369 |
sublocale second_countable_topology < |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
370 |
countable_basis "SOME B. countable B \<and> topological_basis B" |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
371 |
using someI_ex[OF ex_countable_basis] |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
372 |
by unfold_locales safe |
50094
84ddcf5364b4
allow arbitrary enumerations of basis in locale for generation of borel sets
immler
parents:
50087
diff
changeset
|
373 |
|
50882
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
374 |
instance prod :: (second_countable_topology, second_countable_topology) second_countable_topology |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
375 |
proof |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
376 |
obtain A :: "'a set set" where "countable A" "topological_basis A" |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
377 |
using ex_countable_basis by auto |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
378 |
moreover |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
379 |
obtain B :: "'b set set" where "countable B" "topological_basis B" |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
380 |
using ex_countable_basis by auto |
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
381 |
ultimately show "\<exists>B::('a \<times> 'b) set set. countable B \<and> open = generate_topology B" |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
382 |
by (auto intro!: exI[of _ "(\<lambda>(a, b). a \<times> b) ` (A \<times> B)"] topological_basis_prod |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
383 |
topological_basis_imp_subbasis) |
50882
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
384 |
qed |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
385 |
|
50883 | 386 |
instance second_countable_topology \<subseteq> first_countable_topology |
387 |
proof |
|
388 |
fix x :: 'a |
|
63040 | 389 |
define B :: "'a set set" where "B = (SOME B. countable B \<and> topological_basis B)" |
50883 | 390 |
then have B: "countable B" "topological_basis B" |
391 |
using countable_basis is_basis |
|
392 |
by (auto simp: countable_basis is_basis) |
|
53282 | 393 |
then show "\<exists>A::nat \<Rightarrow> 'a set. |
394 |
(\<forall>i. x \<in> A i \<and> open (A i)) \<and> (\<forall>S. open S \<and> x \<in> S \<longrightarrow> (\<exists>i. A i \<subseteq> S))" |
|
51473 | 395 |
by (intro first_countableI[of "{b\<in>B. x \<in> b}"]) |
396 |
(fastforce simp: topological_space_class.topological_basis_def)+ |
|
50883 | 397 |
qed |
398 |
||
53255 | 399 |
|
60420 | 400 |
subsection \<open>Polish spaces\<close> |
401 |
||
402 |
text \<open>Textbooks define Polish spaces as completely metrizable. |
|
403 |
We assume the topology to be complete for a given metric.\<close> |
|
50087 | 404 |
|
50881
ae630bab13da
renamed countable_basis_space to second_countable_topology
hoelzl
parents:
50526
diff
changeset
|
405 |
class polish_space = complete_space + second_countable_topology |
50087 | 406 |
|
60420 | 407 |
subsection \<open>General notion of a topology as a value\<close> |
33175 | 408 |
|
53255 | 409 |
definition "istopology L \<longleftrightarrow> |
60585 | 410 |
L {} \<and> (\<forall>S T. L S \<longrightarrow> L T \<longrightarrow> L (S \<inter> T)) \<and> (\<forall>K. Ball K L \<longrightarrow> L (\<Union>K))" |
53255 | 411 |
|
49834 | 412 |
typedef 'a topology = "{L::('a set) \<Rightarrow> bool. istopology L}" |
33175 | 413 |
morphisms "openin" "topology" |
414 |
unfolding istopology_def by blast |
|
415 |
||
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
416 |
lemma istopology_openin[intro]: "istopology(openin U)" |
33175 | 417 |
using openin[of U] by blast |
418 |
||
419 |
lemma topology_inverse': "istopology U \<Longrightarrow> openin (topology U) = U" |
|
44170
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
420 |
using topology_inverse[unfolded mem_Collect_eq] . |
33175 | 421 |
|
422 |
lemma topology_inverse_iff: "istopology U \<longleftrightarrow> openin (topology U) = U" |
|
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
423 |
using topology_inverse[of U] istopology_openin[of "topology U"] by auto |
33175 | 424 |
|
425 |
lemma topology_eq: "T1 = T2 \<longleftrightarrow> (\<forall>S. openin T1 S \<longleftrightarrow> openin T2 S)" |
|
53255 | 426 |
proof |
427 |
assume "T1 = T2" |
|
428 |
then show "\<forall>S. openin T1 S \<longleftrightarrow> openin T2 S" by simp |
|
429 |
next |
|
430 |
assume H: "\<forall>S. openin T1 S \<longleftrightarrow> openin T2 S" |
|
431 |
then have "openin T1 = openin T2" by (simp add: fun_eq_iff) |
|
432 |
then have "topology (openin T1) = topology (openin T2)" by simp |
|
433 |
then show "T1 = T2" unfolding openin_inverse . |
|
33175 | 434 |
qed |
435 |
||
60420 | 436 |
text\<open>Infer the "universe" from union of all sets in the topology.\<close> |
33175 | 437 |
|
53640 | 438 |
definition "topspace T = \<Union>{S. openin T S}" |
33175 | 439 |
|
60420 | 440 |
subsubsection \<open>Main properties of open sets\<close> |
33175 | 441 |
|
442 |
lemma openin_clauses: |
|
443 |
fixes U :: "'a topology" |
|
53282 | 444 |
shows |
445 |
"openin U {}" |
|
446 |
"\<And>S T. openin U S \<Longrightarrow> openin U T \<Longrightarrow> openin U (S\<inter>T)" |
|
447 |
"\<And>K. (\<forall>S \<in> K. openin U S) \<Longrightarrow> openin U (\<Union>K)" |
|
448 |
using openin[of U] unfolding istopology_def mem_Collect_eq by fast+ |
|
33175 | 449 |
|
450 |
lemma openin_subset[intro]: "openin U S \<Longrightarrow> S \<subseteq> topspace U" |
|
451 |
unfolding topspace_def by blast |
|
53255 | 452 |
|
453 |
lemma openin_empty[simp]: "openin U {}" |
|
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
454 |
by (rule openin_clauses) |
33175 | 455 |
|
456 |
lemma openin_Int[intro]: "openin U S \<Longrightarrow> openin U T \<Longrightarrow> openin U (S \<inter> T)" |
|
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
457 |
by (rule openin_clauses) |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
458 |
|
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
459 |
lemma openin_Union[intro]: "(\<And>S. S \<in> K \<Longrightarrow> openin U S) \<Longrightarrow> openin U (\<Union>K)" |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
460 |
using openin_clauses by blast |
33175 | 461 |
|
462 |
lemma openin_Un[intro]: "openin U S \<Longrightarrow> openin U T \<Longrightarrow> openin U (S \<union> T)" |
|
463 |
using openin_Union[of "{S,T}" U] by auto |
|
464 |
||
53255 | 465 |
lemma openin_topspace[intro, simp]: "openin U (topspace U)" |
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
466 |
by (force simp add: openin_Union topspace_def) |
33175 | 467 |
|
49711 | 468 |
lemma openin_subopen: "openin U S \<longleftrightarrow> (\<forall>x \<in> S. \<exists>T. openin U T \<and> x \<in> T \<and> T \<subseteq> S)" |
469 |
(is "?lhs \<longleftrightarrow> ?rhs") |
|
36584 | 470 |
proof |
49711 | 471 |
assume ?lhs |
472 |
then show ?rhs by auto |
|
36584 | 473 |
next |
474 |
assume H: ?rhs |
|
475 |
let ?t = "\<Union>{T. openin U T \<and> T \<subseteq> S}" |
|
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
476 |
have "openin U ?t" by (force simp add: openin_Union) |
36584 | 477 |
also have "?t = S" using H by auto |
478 |
finally show "openin U S" . |
|
33175 | 479 |
qed |
480 |
||
49711 | 481 |
|
60420 | 482 |
subsubsection \<open>Closed sets\<close> |
33175 | 483 |
|
484 |
definition "closedin U S \<longleftrightarrow> S \<subseteq> topspace U \<and> openin U (topspace U - S)" |
|
485 |
||
53255 | 486 |
lemma closedin_subset: "closedin U S \<Longrightarrow> S \<subseteq> topspace U" |
487 |
by (metis closedin_def) |
|
488 |
||
489 |
lemma closedin_empty[simp]: "closedin U {}" |
|
490 |
by (simp add: closedin_def) |
|
491 |
||
492 |
lemma closedin_topspace[intro, simp]: "closedin U (topspace U)" |
|
493 |
by (simp add: closedin_def) |
|
494 |
||
33175 | 495 |
lemma closedin_Un[intro]: "closedin U S \<Longrightarrow> closedin U T \<Longrightarrow> closedin U (S \<union> T)" |
496 |
by (auto simp add: Diff_Un closedin_def) |
|
497 |
||
60585 | 498 |
lemma Diff_Inter[intro]: "A - \<Inter>S = \<Union>{A - s|s. s\<in>S}" |
53255 | 499 |
by auto |
500 |
||
501 |
lemma closedin_Inter[intro]: |
|
502 |
assumes Ke: "K \<noteq> {}" |
|
62131
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
503 |
and Kc: "\<And>S. S \<in>K \<Longrightarrow> closedin U S" |
60585 | 504 |
shows "closedin U (\<Inter>K)" |
53255 | 505 |
using Ke Kc unfolding closedin_def Diff_Inter by auto |
33175 | 506 |
|
62131
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
507 |
lemma closedin_INT[intro]: |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
508 |
assumes "A \<noteq> {}" "\<And>x. x \<in> A \<Longrightarrow> closedin U (B x)" |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
509 |
shows "closedin U (\<Inter>x\<in>A. B x)" |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
510 |
apply (rule closedin_Inter) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
511 |
using assms |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
512 |
apply auto |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
513 |
done |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
514 |
|
33175 | 515 |
lemma closedin_Int[intro]: "closedin U S \<Longrightarrow> closedin U T \<Longrightarrow> closedin U (S \<inter> T)" |
516 |
using closedin_Inter[of "{S,T}" U] by auto |
|
517 |
||
518 |
lemma openin_closedin_eq: "openin U S \<longleftrightarrow> S \<subseteq> topspace U \<and> closedin U (topspace U - S)" |
|
519 |
apply (auto simp add: closedin_def Diff_Diff_Int inf_absorb2) |
|
520 |
apply (metis openin_subset subset_eq) |
|
521 |
done |
|
522 |
||
53255 | 523 |
lemma openin_closedin: "S \<subseteq> topspace U \<Longrightarrow> (openin U S \<longleftrightarrow> closedin U (topspace U - S))" |
33175 | 524 |
by (simp add: openin_closedin_eq) |
525 |
||
53255 | 526 |
lemma openin_diff[intro]: |
527 |
assumes oS: "openin U S" |
|
528 |
and cT: "closedin U T" |
|
529 |
shows "openin U (S - T)" |
|
530 |
proof - |
|
33175 | 531 |
have "S - T = S \<inter> (topspace U - T)" using openin_subset[of U S] oS cT |
532 |
by (auto simp add: topspace_def openin_subset) |
|
53282 | 533 |
then show ?thesis using oS cT |
534 |
by (auto simp add: closedin_def) |
|
33175 | 535 |
qed |
536 |
||
53255 | 537 |
lemma closedin_diff[intro]: |
538 |
assumes oS: "closedin U S" |
|
539 |
and cT: "openin U T" |
|
540 |
shows "closedin U (S - T)" |
|
541 |
proof - |
|
542 |
have "S - T = S \<inter> (topspace U - T)" |
|
53282 | 543 |
using closedin_subset[of U S] oS cT by (auto simp add: topspace_def) |
53255 | 544 |
then show ?thesis |
545 |
using oS cT by (auto simp add: openin_closedin_eq) |
|
546 |
qed |
|
547 |
||
33175 | 548 |
|
60420 | 549 |
subsubsection \<open>Subspace topology\<close> |
44170
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
550 |
|
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
551 |
definition "subtopology U V = topology (\<lambda>T. \<exists>S. T = S \<inter> V \<and> openin U S)" |
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
552 |
|
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
553 |
lemma istopology_subtopology: "istopology (\<lambda>T. \<exists>S. T = S \<inter> V \<and> openin U S)" |
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
554 |
(is "istopology ?L") |
53255 | 555 |
proof - |
44170
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
556 |
have "?L {}" by blast |
53255 | 557 |
{ |
558 |
fix A B |
|
559 |
assume A: "?L A" and B: "?L B" |
|
560 |
from A B obtain Sa and Sb where Sa: "openin U Sa" "A = Sa \<inter> V" and Sb: "openin U Sb" "B = Sb \<inter> V" |
|
561 |
by blast |
|
562 |
have "A \<inter> B = (Sa \<inter> Sb) \<inter> V" "openin U (Sa \<inter> Sb)" |
|
563 |
using Sa Sb by blast+ |
|
564 |
then have "?L (A \<inter> B)" by blast |
|
565 |
} |
|
33175 | 566 |
moreover |
53255 | 567 |
{ |
53282 | 568 |
fix K |
569 |
assume K: "K \<subseteq> Collect ?L" |
|
44170
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
570 |
have th0: "Collect ?L = (\<lambda>S. S \<inter> V) ` Collect (openin U)" |
55775 | 571 |
by blast |
33175 | 572 |
from K[unfolded th0 subset_image_iff] |
53255 | 573 |
obtain Sk where Sk: "Sk \<subseteq> Collect (openin U)" "K = (\<lambda>S. S \<inter> V) ` Sk" |
574 |
by blast |
|
575 |
have "\<Union>K = (\<Union>Sk) \<inter> V" |
|
576 |
using Sk by auto |
|
60585 | 577 |
moreover have "openin U (\<Union>Sk)" |
53255 | 578 |
using Sk by (auto simp add: subset_eq) |
579 |
ultimately have "?L (\<Union>K)" by blast |
|
580 |
} |
|
44170
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
581 |
ultimately show ?thesis |
62343
24106dc44def
prefer abbreviations for compound operators INFIMUM and SUPREMUM
haftmann
parents:
62131
diff
changeset
|
582 |
unfolding subset_eq mem_Collect_eq istopology_def by auto |
33175 | 583 |
qed |
584 |
||
53255 | 585 |
lemma openin_subtopology: "openin (subtopology U V) S \<longleftrightarrow> (\<exists>T. openin U T \<and> S = T \<inter> V)" |
33175 | 586 |
unfolding subtopology_def topology_inverse'[OF istopology_subtopology] |
44170
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
587 |
by auto |
33175 | 588 |
|
53255 | 589 |
lemma topspace_subtopology: "topspace (subtopology U V) = topspace U \<inter> V" |
33175 | 590 |
by (auto simp add: topspace_def openin_subtopology) |
591 |
||
53255 | 592 |
lemma closedin_subtopology: "closedin (subtopology U V) S \<longleftrightarrow> (\<exists>T. closedin U T \<and> S = T \<inter> V)" |
33175 | 593 |
unfolding closedin_def topspace_subtopology |
55775 | 594 |
by (auto simp add: openin_subtopology) |
33175 | 595 |
|
596 |
lemma openin_subtopology_refl: "openin (subtopology U V) V \<longleftrightarrow> V \<subseteq> topspace U" |
|
597 |
unfolding openin_subtopology |
|
55775 | 598 |
by auto (metis IntD1 in_mono openin_subset) |
49711 | 599 |
|
600 |
lemma subtopology_superset: |
|
601 |
assumes UV: "topspace U \<subseteq> V" |
|
33175 | 602 |
shows "subtopology U V = U" |
53255 | 603 |
proof - |
604 |
{ |
|
605 |
fix S |
|
606 |
{ |
|
607 |
fix T |
|
608 |
assume T: "openin U T" "S = T \<inter> V" |
|
609 |
from T openin_subset[OF T(1)] UV have eq: "S = T" |
|
610 |
by blast |
|
611 |
have "openin U S" |
|
612 |
unfolding eq using T by blast |
|
613 |
} |
|
33175 | 614 |
moreover |
53255 | 615 |
{ |
616 |
assume S: "openin U S" |
|
617 |
then have "\<exists>T. openin U T \<and> S = T \<inter> V" |
|
618 |
using openin_subset[OF S] UV by auto |
|
619 |
} |
|
620 |
ultimately have "(\<exists>T. openin U T \<and> S = T \<inter> V) \<longleftrightarrow> openin U S" |
|
621 |
by blast |
|
622 |
} |
|
623 |
then show ?thesis |
|
624 |
unfolding topology_eq openin_subtopology by blast |
|
33175 | 625 |
qed |
626 |
||
627 |
lemma subtopology_topspace[simp]: "subtopology U (topspace U) = U" |
|
628 |
by (simp add: subtopology_superset) |
|
629 |
||
630 |
lemma subtopology_UNIV[simp]: "subtopology U UNIV = U" |
|
631 |
by (simp add: subtopology_superset) |
|
632 |
||
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
633 |
lemma openin_subtopology_empty: |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
634 |
"openin (subtopology U {}) s \<longleftrightarrow> s = {}" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
635 |
by (metis Int_empty_right openin_empty openin_subtopology) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
636 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
637 |
lemma closedin_subtopology_empty: |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
638 |
"closedin (subtopology U {}) s \<longleftrightarrow> s = {}" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
639 |
by (metis Int_empty_right closedin_empty closedin_subtopology) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
640 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
641 |
lemma closedin_subtopology_refl: |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
642 |
"closedin (subtopology U u) u \<longleftrightarrow> u \<subseteq> topspace U" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
643 |
by (metis closedin_def closedin_topspace inf.absorb_iff2 le_inf_iff topspace_subtopology) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
644 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
645 |
lemma openin_imp_subset: |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
646 |
"openin (subtopology U s) t \<Longrightarrow> t \<subseteq> s" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
647 |
by (metis Int_iff openin_subtopology subsetI) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
648 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
649 |
lemma closedin_imp_subset: |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
650 |
"closedin (subtopology U s) t \<Longrightarrow> t \<subseteq> s" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
651 |
by (simp add: closedin_def topspace_subtopology) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
652 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
653 |
lemma openin_subtopology_Un: |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
654 |
"openin (subtopology U t) s \<and> openin (subtopology U u) s |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
655 |
\<Longrightarrow> openin (subtopology U (t \<union> u)) s" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
656 |
by (simp add: openin_subtopology) blast |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
657 |
|
53255 | 658 |
|
60420 | 659 |
subsubsection \<open>The standard Euclidean topology\<close> |
33175 | 660 |
|
53255 | 661 |
definition euclidean :: "'a::topological_space topology" |
662 |
where "euclidean = topology open" |
|
33175 | 663 |
|
664 |
lemma open_openin: "open S \<longleftrightarrow> openin euclidean S" |
|
665 |
unfolding euclidean_def |
|
666 |
apply (rule cong[where x=S and y=S]) |
|
667 |
apply (rule topology_inverse[symmetric]) |
|
668 |
apply (auto simp add: istopology_def) |
|
44170
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
669 |
done |
33175 | 670 |
|
671 |
lemma topspace_euclidean: "topspace euclidean = UNIV" |
|
672 |
apply (simp add: topspace_def) |
|
39302
d7728f65b353
renamed lemmas: ext_iff -> fun_eq_iff, set_ext_iff -> set_eq_iff, set_ext -> set_eqI
nipkow
parents:
39198
diff
changeset
|
673 |
apply (rule set_eqI) |
53255 | 674 |
apply (auto simp add: open_openin[symmetric]) |
675 |
done |
|
33175 | 676 |
|
677 |
lemma topspace_euclidean_subtopology[simp]: "topspace (subtopology euclidean S) = S" |
|
678 |
by (simp add: topspace_euclidean topspace_subtopology) |
|
679 |
||
680 |
lemma closed_closedin: "closed S \<longleftrightarrow> closedin euclidean S" |
|
681 |
by (simp add: closed_def closedin_def topspace_euclidean open_openin Compl_eq_Diff_UNIV) |
|
682 |
||
683 |
lemma open_subopen: "open S \<longleftrightarrow> (\<forall>x\<in>S. \<exists>T. open T \<and> x \<in> T \<and> T \<subseteq> S)" |
|
684 |
by (simp add: open_openin openin_subopen[symmetric]) |
|
685 |
||
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
686 |
lemma openin_subtopology_self [simp]: "openin (subtopology euclidean S) S" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
687 |
by (metis openin_topspace topspace_euclidean_subtopology) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
688 |
|
60420 | 689 |
text \<open>Basic "localization" results are handy for connectedness.\<close> |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
690 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
691 |
lemma openin_open: "openin (subtopology euclidean U) S \<longleftrightarrow> (\<exists>T. open T \<and> (S = U \<inter> T))" |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
692 |
by (auto simp add: openin_subtopology open_openin[symmetric]) |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
693 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
694 |
lemma openin_open_Int[intro]: "open S \<Longrightarrow> openin (subtopology euclidean U) (U \<inter> S)" |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
695 |
by (auto simp add: openin_open) |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
696 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
697 |
lemma open_openin_trans[trans]: |
53255 | 698 |
"open S \<Longrightarrow> open T \<Longrightarrow> T \<subseteq> S \<Longrightarrow> openin (subtopology euclidean S) T" |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
699 |
by (metis Int_absorb1 openin_open_Int) |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
700 |
|
53255 | 701 |
lemma open_subset: "S \<subseteq> T \<Longrightarrow> open S \<Longrightarrow> openin (subtopology euclidean T) S" |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
702 |
by (auto simp add: openin_open) |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
703 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
704 |
lemma closedin_closed: "closedin (subtopology euclidean U) S \<longleftrightarrow> (\<exists>T. closed T \<and> S = U \<inter> T)" |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
705 |
by (simp add: closedin_subtopology closed_closedin Int_ac) |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
706 |
|
53291 | 707 |
lemma closedin_closed_Int: "closed S \<Longrightarrow> closedin (subtopology euclidean U) (U \<inter> S)" |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
708 |
by (metis closedin_closed) |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
709 |
|
53282 | 710 |
lemma closed_closedin_trans: |
711 |
"closed S \<Longrightarrow> closed T \<Longrightarrow> T \<subseteq> S \<Longrightarrow> closedin (subtopology euclidean S) T" |
|
55775 | 712 |
by (metis closedin_closed inf.absorb2) |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
713 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
714 |
lemma closed_subset: "S \<subseteq> T \<Longrightarrow> closed S \<Longrightarrow> closedin (subtopology euclidean T) S" |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
715 |
by (auto simp add: closedin_closed) |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
716 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
717 |
lemma openin_euclidean_subtopology_iff: |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
718 |
fixes S U :: "'a::metric_space set" |
53255 | 719 |
shows "openin (subtopology euclidean U) S \<longleftrightarrow> |
720 |
S \<subseteq> U \<and> (\<forall>x\<in>S. \<exists>e>0. \<forall>x'\<in>U. dist x' x < e \<longrightarrow> x'\<in> S)" |
|
721 |
(is "?lhs \<longleftrightarrow> ?rhs") |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
722 |
proof |
53255 | 723 |
assume ?lhs |
53282 | 724 |
then show ?rhs |
725 |
unfolding openin_open open_dist by blast |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
726 |
next |
63040 | 727 |
define T where "T = {x. \<exists>a\<in>S. \<exists>d>0. (\<forall>y\<in>U. dist y a < d \<longrightarrow> y \<in> S) \<and> dist x a < d}" |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
728 |
have 1: "\<forall>x\<in>T. \<exists>e>0. \<forall>y. dist y x < e \<longrightarrow> y \<in> T" |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
729 |
unfolding T_def |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
730 |
apply clarsimp |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
731 |
apply (rule_tac x="d - dist x a" in exI) |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
732 |
apply (clarsimp simp add: less_diff_eq) |
55775 | 733 |
by (metis dist_commute dist_triangle_lt) |
53282 | 734 |
assume ?rhs then have 2: "S = U \<inter> T" |
60141
833adf7db7d8
New material, mostly about limits. Consolidation.
paulson <lp15@cam.ac.uk>
parents:
60040
diff
changeset
|
735 |
unfolding T_def |
55775 | 736 |
by auto (metis dist_self) |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
737 |
from 1 2 show ?lhs |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
738 |
unfolding openin_open open_dist by fast |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
739 |
qed |
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61552
diff
changeset
|
740 |
|
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
741 |
lemma connected_openin: |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
742 |
"connected s \<longleftrightarrow> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
743 |
~(\<exists>e1 e2. openin (subtopology euclidean s) e1 \<and> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
744 |
openin (subtopology euclidean s) e2 \<and> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
745 |
s \<subseteq> e1 \<union> e2 \<and> e1 \<inter> e2 = {} \<and> e1 \<noteq> {} \<and> e2 \<noteq> {})" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
746 |
apply (simp add: connected_def openin_open, safe) |
61808 | 747 |
apply (simp_all, blast+) \<comment>\<open>slow\<close> |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
748 |
done |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
749 |
|
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
750 |
lemma connected_openin_eq: |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
751 |
"connected s \<longleftrightarrow> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
752 |
~(\<exists>e1 e2. openin (subtopology euclidean s) e1 \<and> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
753 |
openin (subtopology euclidean s) e2 \<and> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
754 |
e1 \<union> e2 = s \<and> e1 \<inter> e2 = {} \<and> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
755 |
e1 \<noteq> {} \<and> e2 \<noteq> {})" |
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
756 |
apply (simp add: connected_openin, safe) |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
757 |
apply blast |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
758 |
by (metis Int_lower1 Un_subset_iff openin_open subset_antisym) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
759 |
|
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
760 |
lemma connected_closedin: |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
761 |
"connected s \<longleftrightarrow> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
762 |
~(\<exists>e1 e2. |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
763 |
closedin (subtopology euclidean s) e1 \<and> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
764 |
closedin (subtopology euclidean s) e2 \<and> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
765 |
s \<subseteq> e1 \<union> e2 \<and> e1 \<inter> e2 = {} \<and> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
766 |
e1 \<noteq> {} \<and> e2 \<noteq> {})" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
767 |
proof - |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
768 |
{ fix A B x x' |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
769 |
assume s_sub: "s \<subseteq> A \<union> B" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
770 |
and disj: "A \<inter> B \<inter> s = {}" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
771 |
and x: "x \<in> s" "x \<in> B" and x': "x' \<in> s" "x' \<in> A" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
772 |
and cl: "closed A" "closed B" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
773 |
assume "\<forall>e1. (\<forall>T. closed T \<longrightarrow> e1 \<noteq> s \<inter> T) \<or> (\<forall>e2. e1 \<inter> e2 = {} \<longrightarrow> s \<subseteq> e1 \<union> e2 \<longrightarrow> (\<forall>T. closed T \<longrightarrow> e2 \<noteq> s \<inter> T) \<or> e1 = {} \<or> e2 = {})" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
774 |
then have "\<And>C D. s \<inter> C = {} \<or> s \<inter> D = {} \<or> s \<inter> (C \<inter> (s \<inter> D)) \<noteq> {} \<or> \<not> s \<subseteq> s \<inter> (C \<union> D) \<or> \<not> closed C \<or> \<not> closed D" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
775 |
by (metis (no_types) Int_Un_distrib Int_assoc) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
776 |
moreover have "s \<inter> (A \<inter> B) = {}" "s \<inter> (A \<union> B) = s" "s \<inter> B \<noteq> {}" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
777 |
using disj s_sub x by blast+ |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
778 |
ultimately have "s \<inter> A = {}" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
779 |
using cl by (metis inf.left_commute inf_bot_right order_refl) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
780 |
then have False |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
781 |
using x' by blast |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
782 |
} note * = this |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
783 |
show ?thesis |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
784 |
apply (simp add: connected_closed closedin_closed) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
785 |
apply (safe; simp) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
786 |
apply blast |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
787 |
apply (blast intro: *) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
788 |
done |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
789 |
qed |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
790 |
|
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
791 |
lemma connected_closedin_eq: |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
792 |
"connected s \<longleftrightarrow> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
793 |
~(\<exists>e1 e2. |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
794 |
closedin (subtopology euclidean s) e1 \<and> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
795 |
closedin (subtopology euclidean s) e2 \<and> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
796 |
e1 \<union> e2 = s \<and> e1 \<inter> e2 = {} \<and> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
797 |
e1 \<noteq> {} \<and> e2 \<noteq> {})" |
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
798 |
apply (simp add: connected_closedin, safe) |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
799 |
apply blast |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
800 |
by (metis Int_lower1 Un_subset_iff closedin_closed subset_antisym) |
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61552
diff
changeset
|
801 |
|
60420 | 802 |
text \<open>These "transitivity" results are handy too\<close> |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
803 |
|
53255 | 804 |
lemma openin_trans[trans]: |
805 |
"openin (subtopology euclidean T) S \<Longrightarrow> openin (subtopology euclidean U) T \<Longrightarrow> |
|
806 |
openin (subtopology euclidean U) S" |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
807 |
unfolding open_openin openin_open by blast |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
808 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
809 |
lemma openin_open_trans: "openin (subtopology euclidean T) S \<Longrightarrow> open T \<Longrightarrow> open S" |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
810 |
by (auto simp add: openin_open intro: openin_trans) |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
811 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
812 |
lemma closedin_trans[trans]: |
53255 | 813 |
"closedin (subtopology euclidean T) S \<Longrightarrow> closedin (subtopology euclidean U) T \<Longrightarrow> |
814 |
closedin (subtopology euclidean U) S" |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
815 |
by (auto simp add: closedin_closed closed_closedin closed_Inter Int_assoc) |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
816 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
817 |
lemma closedin_closed_trans: "closedin (subtopology euclidean T) S \<Longrightarrow> closed T \<Longrightarrow> closed S" |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
818 |
by (auto simp add: closedin_closed intro: closedin_trans) |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
819 |
|
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
820 |
lemma openin_subtopology_Int_subset: |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
821 |
"\<lbrakk>openin (subtopology euclidean u) (u \<inter> S); v \<subseteq> u\<rbrakk> \<Longrightarrow> openin (subtopology euclidean v) (v \<inter> S)" |
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
822 |
by (auto simp: openin_subtopology) |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
823 |
|
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
824 |
lemma openin_open_eq: "open s \<Longrightarrow> (openin (subtopology euclidean s) t \<longleftrightarrow> open t \<and> t \<subseteq> s)" |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
825 |
using open_subset openin_open_trans openin_subset by fastforce |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
826 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
827 |
|
60420 | 828 |
subsection \<open>Open and closed balls\<close> |
33175 | 829 |
|
53255 | 830 |
definition ball :: "'a::metric_space \<Rightarrow> real \<Rightarrow> 'a set" |
831 |
where "ball x e = {y. dist x y < e}" |
|
832 |
||
833 |
definition cball :: "'a::metric_space \<Rightarrow> real \<Rightarrow> 'a set" |
|
834 |
where "cball x e = {y. dist x y \<le> e}" |
|
33175 | 835 |
|
61762
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
836 |
definition sphere :: "'a::metric_space \<Rightarrow> real \<Rightarrow> 'a set" |
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
837 |
where "sphere x e = {y. dist x y = e}" |
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
838 |
|
45776
714100f5fda4
remove mem_(c)ball_0 and centre_in_(c)ball from simpset, as rules mem_(c)ball always match instead
huffman
parents:
45548
diff
changeset
|
839 |
lemma mem_ball [simp]: "y \<in> ball x e \<longleftrightarrow> dist x y < e" |
714100f5fda4
remove mem_(c)ball_0 and centre_in_(c)ball from simpset, as rules mem_(c)ball always match instead
huffman
parents:
45548
diff
changeset
|
840 |
by (simp add: ball_def) |
714100f5fda4
remove mem_(c)ball_0 and centre_in_(c)ball from simpset, as rules mem_(c)ball always match instead
huffman
parents:
45548
diff
changeset
|
841 |
|
714100f5fda4
remove mem_(c)ball_0 and centre_in_(c)ball from simpset, as rules mem_(c)ball always match instead
huffman
parents:
45548
diff
changeset
|
842 |
lemma mem_cball [simp]: "y \<in> cball x e \<longleftrightarrow> dist x y \<le> e" |
714100f5fda4
remove mem_(c)ball_0 and centre_in_(c)ball from simpset, as rules mem_(c)ball always match instead
huffman
parents:
45548
diff
changeset
|
843 |
by (simp add: cball_def) |
714100f5fda4
remove mem_(c)ball_0 and centre_in_(c)ball from simpset, as rules mem_(c)ball always match instead
huffman
parents:
45548
diff
changeset
|
844 |
|
61848 | 845 |
lemma mem_sphere [simp]: "y \<in> sphere x e \<longleftrightarrow> dist x y = e" |
846 |
by (simp add: sphere_def) |
|
847 |
||
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
848 |
lemma ball_trivial [simp]: "ball x 0 = {}" |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
849 |
by (simp add: ball_def) |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
850 |
|
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
851 |
lemma cball_trivial [simp]: "cball x 0 = {x}" |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
852 |
by (simp add: cball_def) |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
853 |
|
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
854 |
lemma mem_ball_0 [simp]: |
33175 | 855 |
fixes x :: "'a::real_normed_vector" |
856 |
shows "x \<in> ball 0 e \<longleftrightarrow> norm x < e" |
|
857 |
by (simp add: dist_norm) |
|
858 |
||
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
859 |
lemma mem_cball_0 [simp]: |
33175 | 860 |
fixes x :: "'a::real_normed_vector" |
861 |
shows "x \<in> cball 0 e \<longleftrightarrow> norm x \<le> e" |
|
862 |
by (simp add: dist_norm) |
|
863 |
||
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
864 |
lemma centre_in_ball [simp]: "x \<in> ball x e \<longleftrightarrow> 0 < e" |
45776
714100f5fda4
remove mem_(c)ball_0 and centre_in_(c)ball from simpset, as rules mem_(c)ball always match instead
huffman
parents:
45548
diff
changeset
|
865 |
by simp |
714100f5fda4
remove mem_(c)ball_0 and centre_in_(c)ball from simpset, as rules mem_(c)ball always match instead
huffman
parents:
45548
diff
changeset
|
866 |
|
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
867 |
lemma centre_in_cball [simp]: "x \<in> cball x e \<longleftrightarrow> 0 \<le> e" |
45776
714100f5fda4
remove mem_(c)ball_0 and centre_in_(c)ball from simpset, as rules mem_(c)ball always match instead
huffman
parents:
45548
diff
changeset
|
868 |
by simp |
714100f5fda4
remove mem_(c)ball_0 and centre_in_(c)ball from simpset, as rules mem_(c)ball always match instead
huffman
parents:
45548
diff
changeset
|
869 |
|
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
870 |
lemma ball_subset_cball [simp,intro]: "ball x e \<subseteq> cball x e" |
53255 | 871 |
by (simp add: subset_eq) |
872 |
||
61907
f0c894ab18c9
Liouville theorem, Fundamental Theorem of Algebra, etc.
paulson <lp15@cam.ac.uk>
parents:
61880
diff
changeset
|
873 |
lemma sphere_cball [simp,intro]: "sphere z r \<subseteq> cball z r" |
f0c894ab18c9
Liouville theorem, Fundamental Theorem of Algebra, etc.
paulson <lp15@cam.ac.uk>
parents:
61880
diff
changeset
|
874 |
by force |
f0c894ab18c9
Liouville theorem, Fundamental Theorem of Algebra, etc.
paulson <lp15@cam.ac.uk>
parents:
61880
diff
changeset
|
875 |
|
53282 | 876 |
lemma subset_ball[intro]: "d \<le> e \<Longrightarrow> ball x d \<subseteq> ball x e" |
53255 | 877 |
by (simp add: subset_eq) |
878 |
||
53282 | 879 |
lemma subset_cball[intro]: "d \<le> e \<Longrightarrow> cball x d \<subseteq> cball x e" |
53255 | 880 |
by (simp add: subset_eq) |
881 |
||
33175 | 882 |
lemma ball_max_Un: "ball a (max r s) = ball a r \<union> ball a s" |
39302
d7728f65b353
renamed lemmas: ext_iff -> fun_eq_iff, set_ext_iff -> set_eq_iff, set_ext -> set_eqI
nipkow
parents:
39198
diff
changeset
|
883 |
by (simp add: set_eq_iff) arith |
33175 | 884 |
|
885 |
lemma ball_min_Int: "ball a (min r s) = ball a r \<inter> ball a s" |
|
39302
d7728f65b353
renamed lemmas: ext_iff -> fun_eq_iff, set_ext_iff -> set_eq_iff, set_ext -> set_eqI
nipkow
parents:
39198
diff
changeset
|
886 |
by (simp add: set_eq_iff) |
33175 | 887 |
|
61426
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
888 |
lemma cball_diff_eq_sphere: "cball a r - ball a r = {x. dist x a = r}" |
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
889 |
by (auto simp: cball_def ball_def dist_commute) |
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
890 |
|
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
891 |
lemma image_add_ball [simp]: |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
892 |
fixes a :: "'a::real_normed_vector" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
893 |
shows "op + b ` ball a r = ball (a+b) r" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
894 |
apply (intro equalityI subsetI) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
895 |
apply (force simp: dist_norm) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
896 |
apply (rule_tac x="x-b" in image_eqI) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
897 |
apply (auto simp: dist_norm algebra_simps) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
898 |
done |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
899 |
|
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
900 |
lemma image_add_cball [simp]: |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
901 |
fixes a :: "'a::real_normed_vector" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
902 |
shows "op + b ` cball a r = cball (a+b) r" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
903 |
apply (intro equalityI subsetI) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
904 |
apply (force simp: dist_norm) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
905 |
apply (rule_tac x="x-b" in image_eqI) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
906 |
apply (auto simp: dist_norm algebra_simps) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
907 |
done |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
908 |
|
54070 | 909 |
lemma open_ball [intro, simp]: "open (ball x e)" |
910 |
proof - |
|
911 |
have "open (dist x -` {..<e})" |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
912 |
by (intro open_vimage open_lessThan continuous_intros) |
54070 | 913 |
also have "dist x -` {..<e} = ball x e" |
914 |
by auto |
|
915 |
finally show ?thesis . |
|
916 |
qed |
|
33175 | 917 |
|
918 |
lemma open_contains_ball: "open S \<longleftrightarrow> (\<forall>x\<in>S. \<exists>e>0. ball x e \<subseteq> S)" |
|
919 |
unfolding open_dist subset_eq mem_ball Ball_def dist_commute .. |
|
920 |
||
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
921 |
lemma openI [intro?]: "(\<And>x. x\<in>S \<Longrightarrow> \<exists>e>0. ball x e \<subseteq> S) \<Longrightarrow> open S" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
922 |
by (auto simp: open_contains_ball) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
923 |
|
33714
eb2574ac4173
Added new lemmas to Euclidean Space by Robert Himmelmann
hoelzl
parents:
33324
diff
changeset
|
924 |
lemma openE[elim?]: |
53282 | 925 |
assumes "open S" "x\<in>S" |
33714
eb2574ac4173
Added new lemmas to Euclidean Space by Robert Himmelmann
hoelzl
parents:
33324
diff
changeset
|
926 |
obtains e where "e>0" "ball x e \<subseteq> S" |
eb2574ac4173
Added new lemmas to Euclidean Space by Robert Himmelmann
hoelzl
parents:
33324
diff
changeset
|
927 |
using assms unfolding open_contains_ball by auto |
eb2574ac4173
Added new lemmas to Euclidean Space by Robert Himmelmann
hoelzl
parents:
33324
diff
changeset
|
928 |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
929 |
lemma open_contains_ball_eq: "open S \<Longrightarrow> x\<in>S \<longleftrightarrow> (\<exists>e>0. ball x e \<subseteq> S)" |
33175 | 930 |
by (metis open_contains_ball subset_eq centre_in_ball) |
931 |
||
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
932 |
lemma openin_contains_ball: |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
933 |
"openin (subtopology euclidean t) s \<longleftrightarrow> |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
934 |
s \<subseteq> t \<and> (\<forall>x \<in> s. \<exists>e. 0 < e \<and> ball x e \<inter> t \<subseteq> s)" |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
935 |
(is "?lhs = ?rhs") |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
936 |
proof |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
937 |
assume ?lhs |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
938 |
then show ?rhs |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
939 |
apply (simp add: openin_open) |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
940 |
apply (metis Int_commute Int_mono inf.cobounded2 open_contains_ball order_refl subsetCE) |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
941 |
done |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
942 |
next |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
943 |
assume ?rhs |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
944 |
then show ?lhs |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
945 |
apply (simp add: openin_euclidean_subtopology_iff) |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
946 |
by (metis (no_types) Int_iff dist_commute inf.absorb_iff2 mem_ball) |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
947 |
qed |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
948 |
|
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
949 |
lemma openin_contains_cball: |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
950 |
"openin (subtopology euclidean t) s \<longleftrightarrow> |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
951 |
s \<subseteq> t \<and> |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
952 |
(\<forall>x \<in> s. \<exists>e. 0 < e \<and> cball x e \<inter> t \<subseteq> s)" |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
953 |
apply (simp add: openin_contains_ball) |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
954 |
apply (rule iffI) |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
955 |
apply (auto dest!: bspec) |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
956 |
apply (rule_tac x="e/2" in exI) |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
957 |
apply force+ |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
958 |
done |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
959 |
|
33175 | 960 |
lemma ball_eq_empty[simp]: "ball x e = {} \<longleftrightarrow> e \<le> 0" |
39302
d7728f65b353
renamed lemmas: ext_iff -> fun_eq_iff, set_ext_iff -> set_eq_iff, set_ext -> set_eqI
nipkow
parents:
39198
diff
changeset
|
961 |
unfolding mem_ball set_eq_iff |
33175 | 962 |
apply (simp add: not_less) |
52624 | 963 |
apply (metis zero_le_dist order_trans dist_self) |
964 |
done |
|
33175 | 965 |
|
61694
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
966 |
lemma ball_empty: "e \<le> 0 \<Longrightarrow> ball x e = {}" by simp |
33175 | 967 |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
968 |
lemma euclidean_dist_l2: |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
969 |
fixes x y :: "'a :: euclidean_space" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
970 |
shows "dist x y = setL2 (\<lambda>i. dist (x \<bullet> i) (y \<bullet> i)) Basis" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
971 |
unfolding dist_norm norm_eq_sqrt_inner setL2_def |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
972 |
by (subst euclidean_inner) (simp add: power2_eq_square inner_diff_left) |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
973 |
|
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
974 |
lemma eventually_nhds_ball: "d > 0 \<Longrightarrow> eventually (\<lambda>x. x \<in> ball z d) (nhds z)" |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
975 |
by (rule eventually_nhds_in_open) simp_all |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
976 |
|
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
977 |
lemma eventually_at_ball: "d > 0 \<Longrightarrow> eventually (\<lambda>t. t \<in> ball z d \<and> t \<in> A) (at z within A)" |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
978 |
unfolding eventually_at by (intro exI[of _ d]) (simp_all add: dist_commute) |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
979 |
|
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
980 |
lemma eventually_at_ball': "d > 0 \<Longrightarrow> eventually (\<lambda>t. t \<in> ball z d \<and> t \<noteq> z \<and> t \<in> A) (at z within A)" |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
981 |
unfolding eventually_at by (intro exI[of _ d]) (simp_all add: dist_commute) |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
982 |
|
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
983 |
|
60420 | 984 |
subsection \<open>Boxes\<close> |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
985 |
|
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
986 |
abbreviation One :: "'a::euclidean_space" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
987 |
where "One \<equiv> \<Sum>Basis" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
988 |
|
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54489
diff
changeset
|
989 |
definition (in euclidean_space) eucl_less (infix "<e" 50) |
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54489
diff
changeset
|
990 |
where "eucl_less a b \<longleftrightarrow> (\<forall>i\<in>Basis. a \<bullet> i < b \<bullet> i)" |
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54489
diff
changeset
|
991 |
|
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54489
diff
changeset
|
992 |
definition box_eucl_less: "box a b = {x. a <e x \<and> x <e b}" |
56188 | 993 |
definition "cbox a b = {x. \<forall>i\<in>Basis. a \<bullet> i \<le> x \<bullet> i \<and> x \<bullet> i \<le> b \<bullet> i}" |
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54489
diff
changeset
|
994 |
|
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54489
diff
changeset
|
995 |
lemma box_def: "box a b = {x. \<forall>i\<in>Basis. a \<bullet> i < x \<bullet> i \<and> x \<bullet> i < b \<bullet> i}" |
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54489
diff
changeset
|
996 |
and in_box_eucl_less: "x \<in> box a b \<longleftrightarrow> a <e x \<and> x <e b" |
56188 | 997 |
and mem_box: "x \<in> box a b \<longleftrightarrow> (\<forall>i\<in>Basis. a \<bullet> i < x \<bullet> i \<and> x \<bullet> i < b \<bullet> i)" |
998 |
"x \<in> cbox a b \<longleftrightarrow> (\<forall>i\<in>Basis. a \<bullet> i \<le> x \<bullet> i \<and> x \<bullet> i \<le> b \<bullet> i)" |
|
999 |
by (auto simp: box_eucl_less eucl_less_def cbox_def) |
|
1000 |
||
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1001 |
lemma cbox_Pair_eq: "cbox (a, c) (b, d) = cbox a b \<times> cbox c d" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1002 |
by (force simp: cbox_def Basis_prod_def) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1003 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1004 |
lemma cbox_Pair_iff [iff]: "(x, y) \<in> cbox (a, c) (b, d) \<longleftrightarrow> x \<in> cbox a b \<and> y \<in> cbox c d" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1005 |
by (force simp: cbox_Pair_eq) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1006 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1007 |
lemma cbox_Pair_eq_0: "cbox (a, c) (b, d) = {} \<longleftrightarrow> cbox a b = {} \<or> cbox c d = {}" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1008 |
by (force simp: cbox_Pair_eq) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1009 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1010 |
lemma swap_cbox_Pair [simp]: "prod.swap ` cbox (c, a) (d, b) = cbox (a,c) (b,d)" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1011 |
by auto |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1012 |
|
56188 | 1013 |
lemma mem_box_real[simp]: |
1014 |
"(x::real) \<in> box a b \<longleftrightarrow> a < x \<and> x < b" |
|
1015 |
"(x::real) \<in> cbox a b \<longleftrightarrow> a \<le> x \<and> x \<le> b" |
|
1016 |
by (auto simp: mem_box) |
|
1017 |
||
1018 |
lemma box_real[simp]: |
|
1019 |
fixes a b:: real |
|
1020 |
shows "box a b = {a <..< b}" "cbox a b = {a .. b}" |
|
1021 |
by auto |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
1022 |
|
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
1023 |
lemma box_Int_box: |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
1024 |
fixes a :: "'a::euclidean_space" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
1025 |
shows "box a b \<inter> box c d = |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
1026 |
box (\<Sum>i\<in>Basis. max (a\<bullet>i) (c\<bullet>i) *\<^sub>R i) (\<Sum>i\<in>Basis. min (b\<bullet>i) (d\<bullet>i) *\<^sub>R i)" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
1027 |
unfolding set_eq_iff and Int_iff and mem_box by auto |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
1028 |
|
50087 | 1029 |
lemma rational_boxes: |
61076 | 1030 |
fixes x :: "'a::euclidean_space" |
53291 | 1031 |
assumes "e > 0" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
1032 |
shows "\<exists>a b. (\<forall>i\<in>Basis. a \<bullet> i \<in> \<rat> \<and> b \<bullet> i \<in> \<rat> ) \<and> x \<in> box a b \<and> box a b \<subseteq> ball x e" |
50087 | 1033 |
proof - |
63040 | 1034 |
define e' where "e' = e / (2 * sqrt (real (DIM ('a))))" |
53291 | 1035 |
then have e: "e' > 0" |
56541 | 1036 |
using assms by (auto simp: DIM_positive) |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
1037 |
have "\<forall>i. \<exists>y. y \<in> \<rat> \<and> y < x \<bullet> i \<and> x \<bullet> i - y < e'" (is "\<forall>i. ?th i") |
50087 | 1038 |
proof |
53255 | 1039 |
fix i |
1040 |
from Rats_dense_in_real[of "x \<bullet> i - e'" "x \<bullet> i"] e |
|
1041 |
show "?th i" by auto |
|
50087 | 1042 |
qed |
55522 | 1043 |
from choice[OF this] obtain a where |
1044 |
a: "\<forall>xa. a xa \<in> \<rat> \<and> a xa < x \<bullet> xa \<and> x \<bullet> xa - a xa < e'" .. |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
1045 |
have "\<forall>i. \<exists>y. y \<in> \<rat> \<and> x \<bullet> i < y \<and> y - x \<bullet> i < e'" (is "\<forall>i. ?th i") |
50087 | 1046 |
proof |
53255 | 1047 |
fix i |
1048 |
from Rats_dense_in_real[of "x \<bullet> i" "x \<bullet> i + e'"] e |
|
1049 |
show "?th i" by auto |
|
50087 | 1050 |
qed |
55522 | 1051 |
from choice[OF this] obtain b where |
1052 |
b: "\<forall>xa. b xa \<in> \<rat> \<and> x \<bullet> xa < b xa \<and> b xa - x \<bullet> xa < e'" .. |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
1053 |
let ?a = "\<Sum>i\<in>Basis. a i *\<^sub>R i" and ?b = "\<Sum>i\<in>Basis. b i *\<^sub>R i" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
1054 |
show ?thesis |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
1055 |
proof (rule exI[of _ ?a], rule exI[of _ ?b], safe) |
53255 | 1056 |
fix y :: 'a |
1057 |
assume *: "y \<in> box ?a ?b" |
|
53015
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
wenzelm
parents:
52625
diff
changeset
|
1058 |
have "dist x y = sqrt (\<Sum>i\<in>Basis. (dist (x \<bullet> i) (y \<bullet> i))\<^sup>2)" |
50087 | 1059 |
unfolding setL2_def[symmetric] by (rule euclidean_dist_l2) |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
1060 |
also have "\<dots> < sqrt (\<Sum>(i::'a)\<in>Basis. e^2 / real (DIM('a)))" |
50087 | 1061 |
proof (rule real_sqrt_less_mono, rule setsum_strict_mono) |
53255 | 1062 |
fix i :: "'a" |
1063 |
assume i: "i \<in> Basis" |
|
1064 |
have "a i < y\<bullet>i \<and> y\<bullet>i < b i" |
|
1065 |
using * i by (auto simp: box_def) |
|
1066 |
moreover have "a i < x\<bullet>i" "x\<bullet>i - a i < e'" |
|
1067 |
using a by auto |
|
1068 |
moreover have "x\<bullet>i < b i" "b i - x\<bullet>i < e'" |
|
1069 |
using b by auto |
|
1070 |
ultimately have "\<bar>x\<bullet>i - y\<bullet>i\<bar> < 2 * e'" |
|
1071 |
by auto |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
1072 |
then have "dist (x \<bullet> i) (y \<bullet> i) < e/sqrt (real (DIM('a)))" |
50087 | 1073 |
unfolding e'_def by (auto simp: dist_real_def) |
53015
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
wenzelm
parents:
52625
diff
changeset
|
1074 |
then have "(dist (x \<bullet> i) (y \<bullet> i))\<^sup>2 < (e/sqrt (real (DIM('a))))\<^sup>2" |
50087 | 1075 |
by (rule power_strict_mono) auto |
53015
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
wenzelm
parents:
52625
diff
changeset
|
1076 |
then show "(dist (x \<bullet> i) (y \<bullet> i))\<^sup>2 < e\<^sup>2 / real DIM('a)" |
50087 | 1077 |
by (simp add: power_divide) |
1078 |
qed auto |
|
53255 | 1079 |
also have "\<dots> = e" |
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61552
diff
changeset
|
1080 |
using \<open>0 < e\<close> by simp |
53255 | 1081 |
finally show "y \<in> ball x e" |
1082 |
by (auto simp: ball_def) |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
1083 |
qed (insert a b, auto simp: box_def) |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
1084 |
qed |
51103 | 1085 |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
1086 |
lemma open_UNION_box: |
61076 | 1087 |
fixes M :: "'a::euclidean_space set" |
53282 | 1088 |
assumes "open M" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
1089 |
defines "a' \<equiv> \<lambda>f :: 'a \<Rightarrow> real \<times> real. (\<Sum>(i::'a)\<in>Basis. fst (f i) *\<^sub>R i)" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
1090 |
defines "b' \<equiv> \<lambda>f :: 'a \<Rightarrow> real \<times> real. (\<Sum>(i::'a)\<in>Basis. snd (f i) *\<^sub>R i)" |
53015
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
wenzelm
parents:
52625
diff
changeset
|
1091 |
defines "I \<equiv> {f\<in>Basis \<rightarrow>\<^sub>E \<rat> \<times> \<rat>. box (a' f) (b' f) \<subseteq> M}" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
1092 |
shows "M = (\<Union>f\<in>I. box (a' f) (b' f))" |
52624 | 1093 |
proof - |
60462 | 1094 |
have "x \<in> (\<Union>f\<in>I. box (a' f) (b' f))" if "x \<in> M" for x |
1095 |
proof - |
|
52624 | 1096 |
obtain e where e: "e > 0" "ball x e \<subseteq> M" |
60420 | 1097 |
using openE[OF \<open>open M\<close> \<open>x \<in> M\<close>] by auto |
53282 | 1098 |
moreover obtain a b where ab: |
1099 |
"x \<in> box a b" |
|
1100 |
"\<forall>i \<in> Basis. a \<bullet> i \<in> \<rat>" |
|
1101 |
"\<forall>i\<in>Basis. b \<bullet> i \<in> \<rat>" |
|
1102 |
"box a b \<subseteq> ball x e" |
|
52624 | 1103 |
using rational_boxes[OF e(1)] by metis |
60462 | 1104 |
ultimately show ?thesis |
52624 | 1105 |
by (intro UN_I[of "\<lambda>i\<in>Basis. (a \<bullet> i, b \<bullet> i)"]) |
1106 |
(auto simp: euclidean_representation I_def a'_def b'_def) |
|
60462 | 1107 |
qed |
52624 | 1108 |
then show ?thesis by (auto simp: I_def) |
1109 |
qed |
|
1110 |
||
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1111 |
lemma box_eq_empty: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1112 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1113 |
shows "(box a b = {} \<longleftrightarrow> (\<exists>i\<in>Basis. b\<bullet>i \<le> a\<bullet>i))" (is ?th1) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1114 |
and "(cbox a b = {} \<longleftrightarrow> (\<exists>i\<in>Basis. b\<bullet>i < a\<bullet>i))" (is ?th2) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1115 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1116 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1117 |
fix i x |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1118 |
assume i: "i\<in>Basis" and as:"b\<bullet>i \<le> a\<bullet>i" and x:"x\<in>box a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1119 |
then have "a \<bullet> i < x \<bullet> i \<and> x \<bullet> i < b \<bullet> i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1120 |
unfolding mem_box by (auto simp: box_def) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1121 |
then have "a\<bullet>i < b\<bullet>i" by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1122 |
then have False using as by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1123 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1124 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1125 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1126 |
assume as: "\<forall>i\<in>Basis. \<not> (b\<bullet>i \<le> a\<bullet>i)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1127 |
let ?x = "(1/2) *\<^sub>R (a + b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1128 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1129 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1130 |
assume i: "i \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1131 |
have "a\<bullet>i < b\<bullet>i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1132 |
using as[THEN bspec[where x=i]] i by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1133 |
then have "a\<bullet>i < ((1/2) *\<^sub>R (a+b)) \<bullet> i" "((1/2) *\<^sub>R (a+b)) \<bullet> i < b\<bullet>i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1134 |
by (auto simp: inner_add_left) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1135 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1136 |
then have "box a b \<noteq> {}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1137 |
using mem_box(1)[of "?x" a b] by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1138 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1139 |
ultimately show ?th1 by blast |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1140 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1141 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1142 |
fix i x |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1143 |
assume i: "i \<in> Basis" and as:"b\<bullet>i < a\<bullet>i" and x:"x\<in>cbox a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1144 |
then have "a \<bullet> i \<le> x \<bullet> i \<and> x \<bullet> i \<le> b \<bullet> i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1145 |
unfolding mem_box by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1146 |
then have "a\<bullet>i \<le> b\<bullet>i" by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1147 |
then have False using as by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1148 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1149 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1150 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1151 |
assume as:"\<forall>i\<in>Basis. \<not> (b\<bullet>i < a\<bullet>i)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1152 |
let ?x = "(1/2) *\<^sub>R (a + b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1153 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1154 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1155 |
assume i:"i \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1156 |
have "a\<bullet>i \<le> b\<bullet>i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1157 |
using as[THEN bspec[where x=i]] i by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1158 |
then have "a\<bullet>i \<le> ((1/2) *\<^sub>R (a+b)) \<bullet> i" "((1/2) *\<^sub>R (a+b)) \<bullet> i \<le> b\<bullet>i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1159 |
by (auto simp: inner_add_left) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1160 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1161 |
then have "cbox a b \<noteq> {}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1162 |
using mem_box(2)[of "?x" a b] by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1163 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1164 |
ultimately show ?th2 by blast |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1165 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1166 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1167 |
lemma box_ne_empty: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1168 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1169 |
shows "cbox a b \<noteq> {} \<longleftrightarrow> (\<forall>i\<in>Basis. a\<bullet>i \<le> b\<bullet>i)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1170 |
and "box a b \<noteq> {} \<longleftrightarrow> (\<forall>i\<in>Basis. a\<bullet>i < b\<bullet>i)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1171 |
unfolding box_eq_empty[of a b] by fastforce+ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1172 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1173 |
lemma |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1174 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1175 |
shows cbox_sing: "cbox a a = {a}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1176 |
and box_sing: "box a a = {}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1177 |
unfolding set_eq_iff mem_box eq_iff [symmetric] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1178 |
by (auto intro!: euclidean_eqI[where 'a='a]) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1179 |
(metis all_not_in_conv nonempty_Basis) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1180 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1181 |
lemma subset_box_imp: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1182 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1183 |
shows "(\<forall>i\<in>Basis. a\<bullet>i \<le> c\<bullet>i \<and> d\<bullet>i \<le> b\<bullet>i) \<Longrightarrow> cbox c d \<subseteq> cbox a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1184 |
and "(\<forall>i\<in>Basis. a\<bullet>i < c\<bullet>i \<and> d\<bullet>i < b\<bullet>i) \<Longrightarrow> cbox c d \<subseteq> box a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1185 |
and "(\<forall>i\<in>Basis. a\<bullet>i \<le> c\<bullet>i \<and> d\<bullet>i \<le> b\<bullet>i) \<Longrightarrow> box c d \<subseteq> cbox a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1186 |
and "(\<forall>i\<in>Basis. a\<bullet>i \<le> c\<bullet>i \<and> d\<bullet>i \<le> b\<bullet>i) \<Longrightarrow> box c d \<subseteq> box a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1187 |
unfolding subset_eq[unfolded Ball_def] unfolding mem_box |
58757 | 1188 |
by (best intro: order_trans less_le_trans le_less_trans less_imp_le)+ |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1189 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1190 |
lemma box_subset_cbox: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1191 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1192 |
shows "box a b \<subseteq> cbox a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1193 |
unfolding subset_eq [unfolded Ball_def] mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1194 |
by (fast intro: less_imp_le) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1195 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1196 |
lemma subset_box: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1197 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1198 |
shows "cbox c d \<subseteq> cbox a b \<longleftrightarrow> (\<forall>i\<in>Basis. c\<bullet>i \<le> d\<bullet>i) --> (\<forall>i\<in>Basis. a\<bullet>i \<le> c\<bullet>i \<and> d\<bullet>i \<le> b\<bullet>i)" (is ?th1) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1199 |
and "cbox c d \<subseteq> box a b \<longleftrightarrow> (\<forall>i\<in>Basis. c\<bullet>i \<le> d\<bullet>i) --> (\<forall>i\<in>Basis. a\<bullet>i < c\<bullet>i \<and> d\<bullet>i < b\<bullet>i)" (is ?th2) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1200 |
and "box c d \<subseteq> cbox a b \<longleftrightarrow> (\<forall>i\<in>Basis. c\<bullet>i < d\<bullet>i) --> (\<forall>i\<in>Basis. a\<bullet>i \<le> c\<bullet>i \<and> d\<bullet>i \<le> b\<bullet>i)" (is ?th3) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1201 |
and "box c d \<subseteq> box a b \<longleftrightarrow> (\<forall>i\<in>Basis. c\<bullet>i < d\<bullet>i) --> (\<forall>i\<in>Basis. a\<bullet>i \<le> c\<bullet>i \<and> d\<bullet>i \<le> b\<bullet>i)" (is ?th4) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1202 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1203 |
show ?th1 |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1204 |
unfolding subset_eq and Ball_def and mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1205 |
by (auto intro: order_trans) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1206 |
show ?th2 |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1207 |
unfolding subset_eq and Ball_def and mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1208 |
by (auto intro: le_less_trans less_le_trans order_trans less_imp_le) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1209 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1210 |
assume as: "box c d \<subseteq> cbox a b" "\<forall>i\<in>Basis. c\<bullet>i < d\<bullet>i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1211 |
then have "box c d \<noteq> {}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1212 |
unfolding box_eq_empty by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1213 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1214 |
assume i: "i \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1215 |
(** TODO combine the following two parts as done in the HOL_light version. **) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1216 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1217 |
let ?x = "(\<Sum>j\<in>Basis. (if j=i then ((min (a\<bullet>j) (d\<bullet>j))+c\<bullet>j)/2 else (c\<bullet>j+d\<bullet>j)/2) *\<^sub>R j)::'a" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1218 |
assume as2: "a\<bullet>i > c\<bullet>i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1219 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1220 |
fix j :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1221 |
assume j: "j \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1222 |
then have "c \<bullet> j < ?x \<bullet> j \<and> ?x \<bullet> j < d \<bullet> j" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1223 |
apply (cases "j = i") |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1224 |
using as(2)[THEN bspec[where x=j]] i |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1225 |
apply (auto simp add: as2) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1226 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1227 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1228 |
then have "?x\<in>box c d" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1229 |
using i unfolding mem_box by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1230 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1231 |
have "?x \<notin> cbox a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1232 |
unfolding mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1233 |
apply auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1234 |
apply (rule_tac x=i in bexI) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1235 |
using as(2)[THEN bspec[where x=i]] and as2 i |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1236 |
apply auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1237 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1238 |
ultimately have False using as by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1239 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1240 |
then have "a\<bullet>i \<le> c\<bullet>i" by (rule ccontr) auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1241 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1242 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1243 |
let ?x = "(\<Sum>j\<in>Basis. (if j=i then ((max (b\<bullet>j) (c\<bullet>j))+d\<bullet>j)/2 else (c\<bullet>j+d\<bullet>j)/2) *\<^sub>R j)::'a" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1244 |
assume as2: "b\<bullet>i < d\<bullet>i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1245 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1246 |
fix j :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1247 |
assume "j\<in>Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1248 |
then have "d \<bullet> j > ?x \<bullet> j \<and> ?x \<bullet> j > c \<bullet> j" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1249 |
apply (cases "j = i") |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1250 |
using as(2)[THEN bspec[where x=j]] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1251 |
apply (auto simp add: as2) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1252 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1253 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1254 |
then have "?x\<in>box c d" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1255 |
unfolding mem_box by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1256 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1257 |
have "?x\<notin>cbox a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1258 |
unfolding mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1259 |
apply auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1260 |
apply (rule_tac x=i in bexI) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1261 |
using as(2)[THEN bspec[where x=i]] and as2 using i |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1262 |
apply auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1263 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1264 |
ultimately have False using as by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1265 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1266 |
then have "b\<bullet>i \<ge> d\<bullet>i" by (rule ccontr) auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1267 |
ultimately |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1268 |
have "a\<bullet>i \<le> c\<bullet>i \<and> d\<bullet>i \<le> b\<bullet>i" by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1269 |
} note part1 = this |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1270 |
show ?th3 |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1271 |
unfolding subset_eq and Ball_def and mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1272 |
apply (rule, rule, rule, rule) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1273 |
apply (rule part1) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1274 |
unfolding subset_eq and Ball_def and mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1275 |
prefer 4 |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1276 |
apply auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1277 |
apply (erule_tac x=xa in allE, erule_tac x=xa in allE, fastforce)+ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1278 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1279 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1280 |
assume as: "box c d \<subseteq> box a b" "\<forall>i\<in>Basis. c\<bullet>i < d\<bullet>i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1281 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1282 |
assume i:"i\<in>Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1283 |
from as(1) have "box c d \<subseteq> cbox a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1284 |
using box_subset_cbox[of a b] by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1285 |
then have "a\<bullet>i \<le> c\<bullet>i \<and> d\<bullet>i \<le> b\<bullet>i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1286 |
using part1 and as(2) using i by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1287 |
} note * = this |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1288 |
show ?th4 |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1289 |
unfolding subset_eq and Ball_def and mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1290 |
apply (rule, rule, rule, rule) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1291 |
apply (rule *) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1292 |
unfolding subset_eq and Ball_def and mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1293 |
prefer 4 |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1294 |
apply auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1295 |
apply (erule_tac x=xa in allE, simp)+ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1296 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1297 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1298 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1299 |
lemma inter_interval: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1300 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1301 |
shows "cbox a b \<inter> cbox c d = |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1302 |
cbox (\<Sum>i\<in>Basis. max (a\<bullet>i) (c\<bullet>i) *\<^sub>R i) (\<Sum>i\<in>Basis. min (b\<bullet>i) (d\<bullet>i) *\<^sub>R i)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1303 |
unfolding set_eq_iff and Int_iff and mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1304 |
by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1305 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1306 |
lemma disjoint_interval: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1307 |
fixes a::"'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1308 |
shows "cbox a b \<inter> cbox c d = {} \<longleftrightarrow> (\<exists>i\<in>Basis. (b\<bullet>i < a\<bullet>i \<or> d\<bullet>i < c\<bullet>i \<or> b\<bullet>i < c\<bullet>i \<or> d\<bullet>i < a\<bullet>i))" (is ?th1) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1309 |
and "cbox a b \<inter> box c d = {} \<longleftrightarrow> (\<exists>i\<in>Basis. (b\<bullet>i < a\<bullet>i \<or> d\<bullet>i \<le> c\<bullet>i \<or> b\<bullet>i \<le> c\<bullet>i \<or> d\<bullet>i \<le> a\<bullet>i))" (is ?th2) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1310 |
and "box a b \<inter> cbox c d = {} \<longleftrightarrow> (\<exists>i\<in>Basis. (b\<bullet>i \<le> a\<bullet>i \<or> d\<bullet>i < c\<bullet>i \<or> b\<bullet>i \<le> c\<bullet>i \<or> d\<bullet>i \<le> a\<bullet>i))" (is ?th3) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1311 |
and "box a b \<inter> box c d = {} \<longleftrightarrow> (\<exists>i\<in>Basis. (b\<bullet>i \<le> a\<bullet>i \<or> d\<bullet>i \<le> c\<bullet>i \<or> b\<bullet>i \<le> c\<bullet>i \<or> d\<bullet>i \<le> a\<bullet>i))" (is ?th4) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1312 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1313 |
let ?z = "(\<Sum>i\<in>Basis. (((max (a\<bullet>i) (c\<bullet>i)) + (min (b\<bullet>i) (d\<bullet>i))) / 2) *\<^sub>R i)::'a" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1314 |
have **: "\<And>P Q. (\<And>i :: 'a. i \<in> Basis \<Longrightarrow> Q ?z i \<Longrightarrow> P i) \<Longrightarrow> |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1315 |
(\<And>i x :: 'a. i \<in> Basis \<Longrightarrow> P i \<Longrightarrow> Q x i) \<Longrightarrow> (\<forall>x. \<exists>i\<in>Basis. Q x i) \<longleftrightarrow> (\<exists>i\<in>Basis. P i)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1316 |
by blast |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1317 |
note * = set_eq_iff Int_iff empty_iff mem_box ball_conj_distrib[symmetric] eq_False ball_simps(10) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1318 |
show ?th1 unfolding * by (intro **) auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1319 |
show ?th2 unfolding * by (intro **) auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1320 |
show ?th3 unfolding * by (intro **) auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1321 |
show ?th4 unfolding * by (intro **) auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1322 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1323 |
|
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
1324 |
lemma UN_box_eq_UNIV: "(\<Union>i::nat. box (- (real i *\<^sub>R One)) (real i *\<^sub>R One)) = UNIV" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
1325 |
proof - |
61942 | 1326 |
have "\<bar>x \<bullet> b\<bar> < real_of_int (\<lceil>Max ((\<lambda>b. \<bar>x \<bullet> b\<bar>)`Basis)\<rceil> + 1)" |
60462 | 1327 |
if [simp]: "b \<in> Basis" for x b :: 'a |
1328 |
proof - |
|
61942 | 1329 |
have "\<bar>x \<bullet> b\<bar> \<le> real_of_int \<lceil>\<bar>x \<bullet> b\<bar>\<rceil>" |
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61552
diff
changeset
|
1330 |
by (rule le_of_int_ceiling) |
61942 | 1331 |
also have "\<dots> \<le> real_of_int \<lceil>Max ((\<lambda>b. \<bar>x \<bullet> b\<bar>)`Basis)\<rceil>" |
59587
8ea7b22525cb
Removed the obsolete functions "natfloor" and "natceiling"
nipkow
parents:
58877
diff
changeset
|
1332 |
by (auto intro!: ceiling_mono) |
61942 | 1333 |
also have "\<dots> < real_of_int (\<lceil>Max ((\<lambda>b. \<bar>x \<bullet> b\<bar>)`Basis)\<rceil> + 1)" |
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
1334 |
by simp |
60462 | 1335 |
finally show ?thesis . |
1336 |
qed |
|
1337 |
then have "\<exists>n::nat. \<forall>b\<in>Basis. \<bar>x \<bullet> b\<bar> < real n" for x :: 'a |
|
59587
8ea7b22525cb
Removed the obsolete functions "natfloor" and "natceiling"
nipkow
parents:
58877
diff
changeset
|
1338 |
by (metis order.strict_trans reals_Archimedean2) |
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
1339 |
moreover have "\<And>x b::'a. \<And>n::nat. \<bar>x \<bullet> b\<bar> < real n \<longleftrightarrow> - real n < x \<bullet> b \<and> x \<bullet> b < real n" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
1340 |
by auto |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
1341 |
ultimately show ?thesis |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
1342 |
by (auto simp: box_def inner_setsum_left inner_Basis setsum.If_cases) |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
1343 |
qed |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
1344 |
|
60420 | 1345 |
text \<open>Intervals in general, including infinite and mixtures of open and closed.\<close> |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1346 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1347 |
definition "is_interval (s::('a::euclidean_space) set) \<longleftrightarrow> |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1348 |
(\<forall>a\<in>s. \<forall>b\<in>s. \<forall>x. (\<forall>i\<in>Basis. ((a\<bullet>i \<le> x\<bullet>i \<and> x\<bullet>i \<le> b\<bullet>i) \<or> (b\<bullet>i \<le> x\<bullet>i \<and> x\<bullet>i \<le> a\<bullet>i))) \<longrightarrow> x \<in> s)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1349 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1350 |
lemma is_interval_cbox: "is_interval (cbox a (b::'a::euclidean_space))" (is ?th1) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1351 |
and is_interval_box: "is_interval (box a b)" (is ?th2) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1352 |
unfolding is_interval_def mem_box Ball_def atLeastAtMost_iff |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1353 |
by (meson order_trans le_less_trans less_le_trans less_trans)+ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1354 |
|
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61552
diff
changeset
|
1355 |
lemma is_interval_empty [iff]: "is_interval {}" |
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61552
diff
changeset
|
1356 |
unfolding is_interval_def by simp |
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61552
diff
changeset
|
1357 |
|
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61552
diff
changeset
|
1358 |
lemma is_interval_univ [iff]: "is_interval UNIV" |
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61552
diff
changeset
|
1359 |
unfolding is_interval_def by simp |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1360 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1361 |
lemma mem_is_intervalI: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1362 |
assumes "is_interval s" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1363 |
assumes "a \<in> s" "b \<in> s" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1364 |
assumes "\<And>i. i \<in> Basis \<Longrightarrow> a \<bullet> i \<le> x \<bullet> i \<and> x \<bullet> i \<le> b \<bullet> i \<or> b \<bullet> i \<le> x \<bullet> i \<and> x \<bullet> i \<le> a \<bullet> i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1365 |
shows "x \<in> s" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1366 |
by (rule assms(1)[simplified is_interval_def, rule_format, OF assms(2,3,4)]) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1367 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1368 |
lemma interval_subst: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1369 |
fixes S::"'a::euclidean_space set" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1370 |
assumes "is_interval S" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1371 |
assumes "x \<in> S" "y j \<in> S" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1372 |
assumes "j \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1373 |
shows "(\<Sum>i\<in>Basis. (if i = j then y i \<bullet> i else x \<bullet> i) *\<^sub>R i) \<in> S" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1374 |
by (rule mem_is_intervalI[OF assms(1,2)]) (auto simp: assms) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1375 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1376 |
lemma mem_box_componentwiseI: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1377 |
fixes S::"'a::euclidean_space set" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1378 |
assumes "is_interval S" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1379 |
assumes "\<And>i. i \<in> Basis \<Longrightarrow> x \<bullet> i \<in> ((\<lambda>x. x \<bullet> i) ` S)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1380 |
shows "x \<in> S" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1381 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1382 |
from assms have "\<forall>i \<in> Basis. \<exists>s \<in> S. x \<bullet> i = s \<bullet> i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1383 |
by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1384 |
with finite_Basis obtain s and bs::"'a list" where |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1385 |
s: "\<And>i. i \<in> Basis \<Longrightarrow> x \<bullet> i = s i \<bullet> i" "\<And>i. i \<in> Basis \<Longrightarrow> s i \<in> S" and |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1386 |
bs: "set bs = Basis" "distinct bs" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1387 |
by (metis finite_distinct_list) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1388 |
from nonempty_Basis s obtain j where j: "j \<in> Basis" "s j \<in> S" by blast |
63040 | 1389 |
define y where |
1390 |
"y = rec_list (s j) (\<lambda>j _ Y. (\<Sum>i\<in>Basis. (if i = j then s i \<bullet> i else Y \<bullet> i) *\<^sub>R i))" |
|
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1391 |
have "x = (\<Sum>i\<in>Basis. (if i \<in> set bs then s i \<bullet> i else s j \<bullet> i) *\<^sub>R i)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1392 |
using bs by (auto simp add: s(1)[symmetric] euclidean_representation) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1393 |
also have [symmetric]: "y bs = \<dots>" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1394 |
using bs(2) bs(1)[THEN equalityD1] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1395 |
by (induct bs) (auto simp: y_def euclidean_representation intro!: euclidean_eqI[where 'a='a]) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1396 |
also have "y bs \<in> S" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1397 |
using bs(1)[THEN equalityD1] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1398 |
apply (induct bs) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1399 |
apply (auto simp: y_def j) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1400 |
apply (rule interval_subst[OF assms(1)]) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1401 |
apply (auto simp: s) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1402 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1403 |
finally show ?thesis . |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1404 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1405 |
|
63007
aa894a49f77d
new theorems about convex hulls, etc.; also, renamed some theorems
paulson <lp15@cam.ac.uk>
parents:
62948
diff
changeset
|
1406 |
lemma cbox01_nonempty [simp]: "cbox 0 One \<noteq> {}" |
aa894a49f77d
new theorems about convex hulls, etc.; also, renamed some theorems
paulson <lp15@cam.ac.uk>
parents:
62948
diff
changeset
|
1407 |
by (simp add: box_ne_empty inner_Basis inner_setsum_left setsum_nonneg) |
aa894a49f77d
new theorems about convex hulls, etc.; also, renamed some theorems
paulson <lp15@cam.ac.uk>
parents:
62948
diff
changeset
|
1408 |
|
aa894a49f77d
new theorems about convex hulls, etc.; also, renamed some theorems
paulson <lp15@cam.ac.uk>
parents:
62948
diff
changeset
|
1409 |
lemma box01_nonempty [simp]: "box 0 One \<noteq> {}" |
aa894a49f77d
new theorems about convex hulls, etc.; also, renamed some theorems
paulson <lp15@cam.ac.uk>
parents:
62948
diff
changeset
|
1410 |
by (simp add: box_ne_empty inner_Basis inner_setsum_left) (simp add: setsum.remove) |
aa894a49f77d
new theorems about convex hulls, etc.; also, renamed some theorems
paulson <lp15@cam.ac.uk>
parents:
62948
diff
changeset
|
1411 |
|
33175 | 1412 |
|
60420 | 1413 |
subsection\<open>Connectedness\<close> |
33175 | 1414 |
|
1415 |
lemma connected_local: |
|
53255 | 1416 |
"connected S \<longleftrightarrow> |
1417 |
\<not> (\<exists>e1 e2. |
|
1418 |
openin (subtopology euclidean S) e1 \<and> |
|
1419 |
openin (subtopology euclidean S) e2 \<and> |
|
1420 |
S \<subseteq> e1 \<union> e2 \<and> |
|
1421 |
e1 \<inter> e2 = {} \<and> |
|
1422 |
e1 \<noteq> {} \<and> |
|
1423 |
e2 \<noteq> {})" |
|
53282 | 1424 |
unfolding connected_def openin_open |
59765
26d1c71784f1
tweaked a few slow or very ugly proofs
paulson <lp15@cam.ac.uk>
parents:
59587
diff
changeset
|
1425 |
by safe blast+ |
33175 | 1426 |
|
34105 | 1427 |
lemma exists_diff: |
1428 |
fixes P :: "'a set \<Rightarrow> bool" |
|
60462 | 1429 |
shows "(\<exists>S. P (- S)) \<longleftrightarrow> (\<exists>S. P S)" (is "?lhs \<longleftrightarrow> ?rhs") |
53255 | 1430 |
proof - |
1431 |
{ |
|
1432 |
assume "?lhs" |
|
1433 |
then have ?rhs by blast |
|
1434 |
} |
|
33175 | 1435 |
moreover |
53255 | 1436 |
{ |
1437 |
fix S |
|
1438 |
assume H: "P S" |
|
34105 | 1439 |
have "S = - (- S)" by auto |
53255 | 1440 |
with H have "P (- (- S))" by metis |
1441 |
} |
|
33175 | 1442 |
ultimately show ?thesis by metis |
1443 |
qed |
|
1444 |
||
1445 |
lemma connected_clopen: "connected S \<longleftrightarrow> |
|
53255 | 1446 |
(\<forall>T. openin (subtopology euclidean S) T \<and> |
1447 |
closedin (subtopology euclidean S) T \<longrightarrow> T = {} \<or> T = S)" (is "?lhs \<longleftrightarrow> ?rhs") |
|
1448 |
proof - |
|
1449 |
have "\<not> connected S \<longleftrightarrow> |
|
1450 |
(\<exists>e1 e2. open e1 \<and> open (- e2) \<and> S \<subseteq> e1 \<union> (- e2) \<and> e1 \<inter> (- e2) \<inter> S = {} \<and> e1 \<inter> S \<noteq> {} \<and> (- e2) \<inter> S \<noteq> {})" |
|
33175 | 1451 |
unfolding connected_def openin_open closedin_closed |
55775 | 1452 |
by (metis double_complement) |
53282 | 1453 |
then have th0: "connected S \<longleftrightarrow> |
53255 | 1454 |
\<not> (\<exists>e2 e1. closed e2 \<and> open e1 \<and> S \<subseteq> e1 \<union> (- e2) \<and> e1 \<inter> (- e2) \<inter> S = {} \<and> e1 \<inter> S \<noteq> {} \<and> (- e2) \<inter> S \<noteq> {})" |
52624 | 1455 |
(is " _ \<longleftrightarrow> \<not> (\<exists>e2 e1. ?P e2 e1)") |
1456 |
apply (simp add: closed_def) |
|
1457 |
apply metis |
|
1458 |
done |
|
33175 | 1459 |
have th1: "?rhs \<longleftrightarrow> \<not> (\<exists>t' t. closed t'\<and>t = S\<inter>t' \<and> t\<noteq>{} \<and> t\<noteq>S \<and> (\<exists>t'. open t' \<and> t = S \<inter> t'))" |
1460 |
(is "_ \<longleftrightarrow> \<not> (\<exists>t' t. ?Q t' t)") |
|
1461 |
unfolding connected_def openin_open closedin_closed by auto |
|
53255 | 1462 |
{ |
1463 |
fix e2 |
|
1464 |
{ |
|
1465 |
fix e1 |
|
53282 | 1466 |
have "?P e2 e1 \<longleftrightarrow> (\<exists>t. closed e2 \<and> t = S\<inter>e2 \<and> open e1 \<and> t = S\<inter>e1 \<and> t\<noteq>{} \<and> t \<noteq> S)" |
53255 | 1467 |
by auto |
1468 |
} |
|
1469 |
then have "(\<exists>e1. ?P e2 e1) \<longleftrightarrow> (\<exists>t. ?Q e2 t)" |
|
1470 |
by metis |
|
1471 |
} |
|
1472 |
then have "\<forall>e2. (\<exists>e1. ?P e2 e1) \<longleftrightarrow> (\<exists>t. ?Q e2 t)" |
|
1473 |
by blast |
|
1474 |
then show ?thesis |
|
1475 |
unfolding th0 th1 by simp |
|
33175 | 1476 |
qed |
1477 |
||
60420 | 1478 |
subsection\<open>Limit points\<close> |
33175 | 1479 |
|
53282 | 1480 |
definition (in topological_space) islimpt:: "'a \<Rightarrow> 'a set \<Rightarrow> bool" (infixr "islimpt" 60) |
53255 | 1481 |
where "x islimpt S \<longleftrightarrow> (\<forall>T. x\<in>T \<longrightarrow> open T \<longrightarrow> (\<exists>y\<in>S. y\<in>T \<and> y\<noteq>x))" |
33175 | 1482 |
|
1483 |
lemma islimptI: |
|
1484 |
assumes "\<And>T. x \<in> T \<Longrightarrow> open T \<Longrightarrow> \<exists>y\<in>S. y \<in> T \<and> y \<noteq> x" |
|
1485 |
shows "x islimpt S" |
|
1486 |
using assms unfolding islimpt_def by auto |
|
1487 |
||
1488 |
lemma islimptE: |
|
1489 |
assumes "x islimpt S" and "x \<in> T" and "open T" |
|
1490 |
obtains y where "y \<in> S" and "y \<in> T" and "y \<noteq> x" |
|
1491 |
using assms unfolding islimpt_def by auto |
|
1492 |
||
44584 | 1493 |
lemma islimpt_iff_eventually: "x islimpt S \<longleftrightarrow> \<not> eventually (\<lambda>y. y \<notin> S) (at x)" |
1494 |
unfolding islimpt_def eventually_at_topological by auto |
|
1495 |
||
53255 | 1496 |
lemma islimpt_subset: "x islimpt S \<Longrightarrow> S \<subseteq> T \<Longrightarrow> x islimpt T" |
44584 | 1497 |
unfolding islimpt_def by fast |
33175 | 1498 |
|
1499 |
lemma islimpt_approachable: |
|
1500 |
fixes x :: "'a::metric_space" |
|
1501 |
shows "x islimpt S \<longleftrightarrow> (\<forall>e>0. \<exists>x'\<in>S. x' \<noteq> x \<and> dist x' x < e)" |
|
44584 | 1502 |
unfolding islimpt_iff_eventually eventually_at by fast |
33175 | 1503 |
|
1504 |
lemma islimpt_approachable_le: |
|
1505 |
fixes x :: "'a::metric_space" |
|
53640 | 1506 |
shows "x islimpt S \<longleftrightarrow> (\<forall>e>0. \<exists>x'\<in> S. x' \<noteq> x \<and> dist x' x \<le> e)" |
33175 | 1507 |
unfolding islimpt_approachable |
44584 | 1508 |
using approachable_lt_le [where f="\<lambda>y. dist y x" and P="\<lambda>y. y \<notin> S \<or> y = x", |
1509 |
THEN arg_cong [where f=Not]] |
|
1510 |
by (simp add: Bex_def conj_commute conj_left_commute) |
|
33175 | 1511 |
|
44571 | 1512 |
lemma islimpt_UNIV_iff: "x islimpt UNIV \<longleftrightarrow> \<not> open {x}" |
1513 |
unfolding islimpt_def by (safe, fast, case_tac "T = {x}", fast, fast) |
|
1514 |
||
51351 | 1515 |
lemma islimpt_punctured: "x islimpt S = x islimpt (S-{x})" |
1516 |
unfolding islimpt_def by blast |
|
1517 |
||
60420 | 1518 |
text \<open>A perfect space has no isolated points.\<close> |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
1519 |
|
44571 | 1520 |
lemma islimpt_UNIV [simp, intro]: "(x::'a::perfect_space) islimpt UNIV" |
1521 |
unfolding islimpt_UNIV_iff by (rule not_open_singleton) |
|
33175 | 1522 |
|
1523 |
lemma perfect_choose_dist: |
|
44072
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
1524 |
fixes x :: "'a::{perfect_space, metric_space}" |
33175 | 1525 |
shows "0 < r \<Longrightarrow> \<exists>a. a \<noteq> x \<and> dist a x < r" |
53255 | 1526 |
using islimpt_UNIV [of x] |
1527 |
by (simp add: islimpt_approachable) |
|
33175 | 1528 |
|
1529 |
lemma closed_limpt: "closed S \<longleftrightarrow> (\<forall>x. x islimpt S \<longrightarrow> x \<in> S)" |
|
1530 |
unfolding closed_def |
|
1531 |
apply (subst open_subopen) |
|
34105 | 1532 |
apply (simp add: islimpt_def subset_eq) |
52624 | 1533 |
apply (metis ComplE ComplI) |
1534 |
done |
|
33175 | 1535 |
|
1536 |
lemma islimpt_EMPTY[simp]: "\<not> x islimpt {}" |
|
1537 |
unfolding islimpt_def by auto |
|
1538 |
||
1539 |
lemma finite_set_avoid: |
|
1540 |
fixes a :: "'a::metric_space" |
|
53255 | 1541 |
assumes fS: "finite S" |
53640 | 1542 |
shows "\<exists>d>0. \<forall>x\<in>S. x \<noteq> a \<longrightarrow> d \<le> dist a x" |
53255 | 1543 |
proof (induct rule: finite_induct[OF fS]) |
1544 |
case 1 |
|
1545 |
then show ?case by (auto intro: zero_less_one) |
|
33175 | 1546 |
next |
1547 |
case (2 x F) |
|
60462 | 1548 |
from 2 obtain d where d: "d > 0" "\<forall>x\<in>F. x \<noteq> a \<longrightarrow> d \<le> dist a x" |
53255 | 1549 |
by blast |
1550 |
show ?case |
|
1551 |
proof (cases "x = a") |
|
1552 |
case True |
|
1553 |
then show ?thesis using d by auto |
|
1554 |
next |
|
1555 |
case False |
|
33175 | 1556 |
let ?d = "min d (dist a x)" |
53255 | 1557 |
have dp: "?d > 0" |
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
1558 |
using False d(1) by auto |
60462 | 1559 |
from d have d': "\<forall>x\<in>F. x \<noteq> a \<longrightarrow> ?d \<le> dist a x" |
53255 | 1560 |
by auto |
1561 |
with dp False show ?thesis |
|
1562 |
by (auto intro!: exI[where x="?d"]) |
|
1563 |
qed |
|
33175 | 1564 |
qed |
1565 |
||
1566 |
lemma islimpt_Un: "x islimpt (S \<union> T) \<longleftrightarrow> x islimpt S \<or> x islimpt T" |
|
50897
078590669527
generalize lemma islimpt_finite to class t1_space
huffman
parents:
50884
diff
changeset
|
1567 |
by (simp add: islimpt_iff_eventually eventually_conj_iff) |
33175 | 1568 |
|
1569 |
lemma discrete_imp_closed: |
|
1570 |
fixes S :: "'a::metric_space set" |
|
53255 | 1571 |
assumes e: "0 < e" |
1572 |
and d: "\<forall>x \<in> S. \<forall>y \<in> S. dist y x < e \<longrightarrow> y = x" |
|
33175 | 1573 |
shows "closed S" |
53255 | 1574 |
proof - |
1575 |
{ |
|
1576 |
fix x |
|
1577 |
assume C: "\<forall>e>0. \<exists>x'\<in>S. x' \<noteq> x \<and> dist x' x < e" |
|
33175 | 1578 |
from e have e2: "e/2 > 0" by arith |
53282 | 1579 |
from C[rule_format, OF e2] obtain y where y: "y \<in> S" "y \<noteq> x" "dist y x < e/2" |
53255 | 1580 |
by blast |
33175 | 1581 |
let ?m = "min (e/2) (dist x y) " |
53255 | 1582 |
from e2 y(2) have mp: "?m > 0" |
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
1583 |
by simp |
53282 | 1584 |
from C[rule_format, OF mp] obtain z where z: "z \<in> S" "z \<noteq> x" "dist z x < ?m" |
53255 | 1585 |
by blast |
33175 | 1586 |
have th: "dist z y < e" using z y |
1587 |
by (intro dist_triangle_lt [where z=x], simp) |
|
1588 |
from d[rule_format, OF y(1) z(1) th] y z |
|
1589 |
have False by (auto simp add: dist_commute)} |
|
53255 | 1590 |
then show ?thesis |
1591 |
by (metis islimpt_approachable closed_limpt [where 'a='a]) |
|
33175 | 1592 |
qed |
1593 |
||
61524
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61518
diff
changeset
|
1594 |
lemma closed_of_nat_image: "closed (of_nat ` A :: 'a :: real_normed_algebra_1 set)" |
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61518
diff
changeset
|
1595 |
by (rule discrete_imp_closed[of 1]) (auto simp: dist_of_nat) |
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61518
diff
changeset
|
1596 |
|
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61518
diff
changeset
|
1597 |
lemma closed_of_int_image: "closed (of_int ` A :: 'a :: real_normed_algebra_1 set)" |
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61518
diff
changeset
|
1598 |
by (rule discrete_imp_closed[of 1]) (auto simp: dist_of_int) |
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61518
diff
changeset
|
1599 |
|
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61518
diff
changeset
|
1600 |
lemma closed_Nats [simp]: "closed (\<nat> :: 'a :: real_normed_algebra_1 set)" |
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61518
diff
changeset
|
1601 |
unfolding Nats_def by (rule closed_of_nat_image) |
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61518
diff
changeset
|
1602 |
|
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61518
diff
changeset
|
1603 |
lemma closed_Ints [simp]: "closed (\<int> :: 'a :: real_normed_algebra_1 set)" |
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61518
diff
changeset
|
1604 |
unfolding Ints_def by (rule closed_of_int_image) |
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61518
diff
changeset
|
1605 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
1606 |
|
60420 | 1607 |
subsection \<open>Interior of a Set\<close> |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
1608 |
|
44519 | 1609 |
definition "interior S = \<Union>{T. open T \<and> T \<subseteq> S}" |
1610 |
||
1611 |
lemma interiorI [intro?]: |
|
1612 |
assumes "open T" and "x \<in> T" and "T \<subseteq> S" |
|
1613 |
shows "x \<in> interior S" |
|
1614 |
using assms unfolding interior_def by fast |
|
1615 |
||
1616 |
lemma interiorE [elim?]: |
|
1617 |
assumes "x \<in> interior S" |
|
1618 |
obtains T where "open T" and "x \<in> T" and "T \<subseteq> S" |
|
1619 |
using assms unfolding interior_def by fast |
|
1620 |
||
1621 |
lemma open_interior [simp, intro]: "open (interior S)" |
|
1622 |
by (simp add: interior_def open_Union) |
|
1623 |
||
1624 |
lemma interior_subset: "interior S \<subseteq> S" |
|
1625 |
by (auto simp add: interior_def) |
|
1626 |
||
1627 |
lemma interior_maximal: "T \<subseteq> S \<Longrightarrow> open T \<Longrightarrow> T \<subseteq> interior S" |
|
1628 |
by (auto simp add: interior_def) |
|
1629 |
||
1630 |
lemma interior_open: "open S \<Longrightarrow> interior S = S" |
|
1631 |
by (intro equalityI interior_subset interior_maximal subset_refl) |
|
33175 | 1632 |
|
1633 |
lemma interior_eq: "interior S = S \<longleftrightarrow> open S" |
|
44519 | 1634 |
by (metis open_interior interior_open) |
1635 |
||
1636 |
lemma open_subset_interior: "open S \<Longrightarrow> S \<subseteq> interior T \<longleftrightarrow> S \<subseteq> T" |
|
33175 | 1637 |
by (metis interior_maximal interior_subset subset_trans) |
1638 |
||
44519 | 1639 |
lemma interior_empty [simp]: "interior {} = {}" |
1640 |
using open_empty by (rule interior_open) |
|
1641 |
||
44522
2f7e9d890efe
rename subset_{interior,closure} to {interior,closure}_mono;
huffman
parents:
44519
diff
changeset
|
1642 |
lemma interior_UNIV [simp]: "interior UNIV = UNIV" |
2f7e9d890efe
rename subset_{interior,closure} to {interior,closure}_mono;
huffman
parents:
44519
diff
changeset
|
1643 |
using open_UNIV by (rule interior_open) |
2f7e9d890efe
rename subset_{interior,closure} to {interior,closure}_mono;
huffman
parents:
44519
diff
changeset
|
1644 |
|
44519 | 1645 |
lemma interior_interior [simp]: "interior (interior S) = interior S" |
1646 |
using open_interior by (rule interior_open) |
|
1647 |
||
44522
2f7e9d890efe
rename subset_{interior,closure} to {interior,closure}_mono;
huffman
parents:
44519
diff
changeset
|
1648 |
lemma interior_mono: "S \<subseteq> T \<Longrightarrow> interior S \<subseteq> interior T" |
2f7e9d890efe
rename subset_{interior,closure} to {interior,closure}_mono;
huffman
parents:
44519
diff
changeset
|
1649 |
by (auto simp add: interior_def) |
44519 | 1650 |
|
1651 |
lemma interior_unique: |
|
1652 |
assumes "T \<subseteq> S" and "open T" |
|
1653 |
assumes "\<And>T'. T' \<subseteq> S \<Longrightarrow> open T' \<Longrightarrow> T' \<subseteq> T" |
|
1654 |
shows "interior S = T" |
|
1655 |
by (intro equalityI assms interior_subset open_interior interior_maximal) |
|
1656 |
||
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1657 |
lemma interior_singleton [simp]: |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1658 |
fixes a :: "'a::perfect_space" shows "interior {a} = {}" |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1659 |
apply (rule interior_unique, simp_all) |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1660 |
using not_open_singleton subset_singletonD by fastforce |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1661 |
|
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1662 |
lemma interior_Int [simp]: "interior (S \<inter> T) = interior S \<inter> interior T" |
44522
2f7e9d890efe
rename subset_{interior,closure} to {interior,closure}_mono;
huffman
parents:
44519
diff
changeset
|
1663 |
by (intro equalityI Int_mono Int_greatest interior_mono Int_lower1 |
44519 | 1664 |
Int_lower2 interior_maximal interior_subset open_Int open_interior) |
1665 |
||
1666 |
lemma mem_interior: "x \<in> interior S \<longleftrightarrow> (\<exists>e>0. ball x e \<subseteq> S)" |
|
1667 |
using open_contains_ball_eq [where S="interior S"] |
|
1668 |
by (simp add: open_subset_interior) |
|
33175 | 1669 |
|
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1670 |
lemma eventually_nhds_in_nhd: "x \<in> interior s \<Longrightarrow> eventually (\<lambda>y. y \<in> s) (nhds x)" |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1671 |
using interior_subset[of s] by (subst eventually_nhds) blast |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1672 |
|
33175 | 1673 |
lemma interior_limit_point [intro]: |
1674 |
fixes x :: "'a::perfect_space" |
|
53255 | 1675 |
assumes x: "x \<in> interior S" |
1676 |
shows "x islimpt S" |
|
44072
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
1677 |
using x islimpt_UNIV [of x] |
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
1678 |
unfolding interior_def islimpt_def |
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
1679 |
apply (clarsimp, rename_tac T T') |
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
1680 |
apply (drule_tac x="T \<inter> T'" in spec) |
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
1681 |
apply (auto simp add: open_Int) |
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
1682 |
done |
33175 | 1683 |
|
1684 |
lemma interior_closed_Un_empty_interior: |
|
53255 | 1685 |
assumes cS: "closed S" |
1686 |
and iT: "interior T = {}" |
|
44519 | 1687 |
shows "interior (S \<union> T) = interior S" |
33175 | 1688 |
proof |
44519 | 1689 |
show "interior S \<subseteq> interior (S \<union> T)" |
53255 | 1690 |
by (rule interior_mono) (rule Un_upper1) |
33175 | 1691 |
show "interior (S \<union> T) \<subseteq> interior S" |
1692 |
proof |
|
53255 | 1693 |
fix x |
1694 |
assume "x \<in> interior (S \<union> T)" |
|
44519 | 1695 |
then obtain R where "open R" "x \<in> R" "R \<subseteq> S \<union> T" .. |
33175 | 1696 |
show "x \<in> interior S" |
1697 |
proof (rule ccontr) |
|
1698 |
assume "x \<notin> interior S" |
|
60420 | 1699 |
with \<open>x \<in> R\<close> \<open>open R\<close> obtain y where "y \<in> R - S" |
44519 | 1700 |
unfolding interior_def by fast |
60420 | 1701 |
from \<open>open R\<close> \<open>closed S\<close> have "open (R - S)" |
53282 | 1702 |
by (rule open_Diff) |
60420 | 1703 |
from \<open>R \<subseteq> S \<union> T\<close> have "R - S \<subseteq> T" |
53282 | 1704 |
by fast |
60420 | 1705 |
from \<open>y \<in> R - S\<close> \<open>open (R - S)\<close> \<open>R - S \<subseteq> T\<close> \<open>interior T = {}\<close> show False |
53282 | 1706 |
unfolding interior_def by fast |
33175 | 1707 |
qed |
1708 |
qed |
|
1709 |
qed |
|
1710 |
||
44365 | 1711 |
lemma interior_Times: "interior (A \<times> B) = interior A \<times> interior B" |
1712 |
proof (rule interior_unique) |
|
1713 |
show "interior A \<times> interior B \<subseteq> A \<times> B" |
|
1714 |
by (intro Sigma_mono interior_subset) |
|
1715 |
show "open (interior A \<times> interior B)" |
|
1716 |
by (intro open_Times open_interior) |
|
53255 | 1717 |
fix T |
1718 |
assume "T \<subseteq> A \<times> B" and "open T" |
|
1719 |
then show "T \<subseteq> interior A \<times> interior B" |
|
53282 | 1720 |
proof safe |
53255 | 1721 |
fix x y |
1722 |
assume "(x, y) \<in> T" |
|
44519 | 1723 |
then obtain C D where "open C" "open D" "C \<times> D \<subseteq> T" "x \<in> C" "y \<in> D" |
60420 | 1724 |
using \<open>open T\<close> unfolding open_prod_def by fast |
53255 | 1725 |
then have "open C" "open D" "C \<subseteq> A" "D \<subseteq> B" "x \<in> C" "y \<in> D" |
60420 | 1726 |
using \<open>T \<subseteq> A \<times> B\<close> by auto |
53255 | 1727 |
then show "x \<in> interior A" and "y \<in> interior B" |
44519 | 1728 |
by (auto intro: interiorI) |
1729 |
qed |
|
44365 | 1730 |
qed |
1731 |
||
61245 | 1732 |
lemma interior_Ici: |
1733 |
fixes x :: "'a :: {dense_linorder, linorder_topology}" |
|
1734 |
assumes "b < x" |
|
1735 |
shows "interior { x ..} = { x <..}" |
|
1736 |
proof (rule interior_unique) |
|
1737 |
fix T assume "T \<subseteq> {x ..}" "open T" |
|
1738 |
moreover have "x \<notin> T" |
|
1739 |
proof |
|
1740 |
assume "x \<in> T" |
|
1741 |
obtain y where "y < x" "{y <.. x} \<subseteq> T" |
|
1742 |
using open_left[OF \<open>open T\<close> \<open>x \<in> T\<close> \<open>b < x\<close>] by auto |
|
1743 |
with dense[OF \<open>y < x\<close>] obtain z where "z \<in> T" "z < x" |
|
1744 |
by (auto simp: subset_eq Ball_def) |
|
1745 |
with \<open>T \<subseteq> {x ..}\<close> show False by auto |
|
1746 |
qed |
|
1747 |
ultimately show "T \<subseteq> {x <..}" |
|
1748 |
by (auto simp: subset_eq less_le) |
|
1749 |
qed auto |
|
1750 |
||
1751 |
lemma interior_Iic: |
|
1752 |
fixes x :: "'a :: {dense_linorder, linorder_topology}" |
|
1753 |
assumes "x < b" |
|
1754 |
shows "interior {.. x} = {..< x}" |
|
1755 |
proof (rule interior_unique) |
|
1756 |
fix T assume "T \<subseteq> {.. x}" "open T" |
|
1757 |
moreover have "x \<notin> T" |
|
1758 |
proof |
|
1759 |
assume "x \<in> T" |
|
1760 |
obtain y where "x < y" "{x ..< y} \<subseteq> T" |
|
1761 |
using open_right[OF \<open>open T\<close> \<open>x \<in> T\<close> \<open>x < b\<close>] by auto |
|
1762 |
with dense[OF \<open>x < y\<close>] obtain z where "z \<in> T" "x < z" |
|
1763 |
by (auto simp: subset_eq Ball_def less_le) |
|
1764 |
with \<open>T \<subseteq> {.. x}\<close> show False by auto |
|
1765 |
qed |
|
1766 |
ultimately show "T \<subseteq> {..< x}" |
|
1767 |
by (auto simp: subset_eq less_le) |
|
1768 |
qed auto |
|
33175 | 1769 |
|
60420 | 1770 |
subsection \<open>Closure of a Set\<close> |
33175 | 1771 |
|
1772 |
definition "closure S = S \<union> {x | x. x islimpt S}" |
|
1773 |
||
44518 | 1774 |
lemma interior_closure: "interior S = - (closure (- S))" |
1775 |
unfolding interior_def closure_def islimpt_def by auto |
|
1776 |
||
34105 | 1777 |
lemma closure_interior: "closure S = - interior (- S)" |
44518 | 1778 |
unfolding interior_closure by simp |
33175 | 1779 |
|
1780 |
lemma closed_closure[simp, intro]: "closed (closure S)" |
|
44518 | 1781 |
unfolding closure_interior by (simp add: closed_Compl) |
1782 |
||
1783 |
lemma closure_subset: "S \<subseteq> closure S" |
|
1784 |
unfolding closure_def by simp |
|
33175 | 1785 |
|
1786 |
lemma closure_hull: "closure S = closed hull S" |
|
44519 | 1787 |
unfolding hull_def closure_interior interior_def by auto |
33175 | 1788 |
|
1789 |
lemma closure_eq: "closure S = S \<longleftrightarrow> closed S" |
|
44519 | 1790 |
unfolding closure_hull using closed_Inter by (rule hull_eq) |
1791 |
||
1792 |
lemma closure_closed [simp]: "closed S \<Longrightarrow> closure S = S" |
|
1793 |
unfolding closure_eq . |
|
1794 |
||
1795 |
lemma closure_closure [simp]: "closure (closure S) = closure S" |
|
44518 | 1796 |
unfolding closure_hull by (rule hull_hull) |
33175 | 1797 |
|
44522
2f7e9d890efe
rename subset_{interior,closure} to {interior,closure}_mono;
huffman
parents:
44519
diff
changeset
|
1798 |
lemma closure_mono: "S \<subseteq> T \<Longrightarrow> closure S \<subseteq> closure T" |
44518 | 1799 |
unfolding closure_hull by (rule hull_mono) |
33175 | 1800 |
|
44519 | 1801 |
lemma closure_minimal: "S \<subseteq> T \<Longrightarrow> closed T \<Longrightarrow> closure S \<subseteq> T" |
44518 | 1802 |
unfolding closure_hull by (rule hull_minimal) |
33175 | 1803 |
|
44519 | 1804 |
lemma closure_unique: |
53255 | 1805 |
assumes "S \<subseteq> T" |
1806 |
and "closed T" |
|
1807 |
and "\<And>T'. S \<subseteq> T' \<Longrightarrow> closed T' \<Longrightarrow> T \<subseteq> T'" |
|
44519 | 1808 |
shows "closure S = T" |
1809 |
using assms unfolding closure_hull by (rule hull_unique) |
|
1810 |
||
1811 |
lemma closure_empty [simp]: "closure {} = {}" |
|
44518 | 1812 |
using closed_empty by (rule closure_closed) |
33175 | 1813 |
|
44522
2f7e9d890efe
rename subset_{interior,closure} to {interior,closure}_mono;
huffman
parents:
44519
diff
changeset
|
1814 |
lemma closure_UNIV [simp]: "closure UNIV = UNIV" |
44518 | 1815 |
using closed_UNIV by (rule closure_closed) |
1816 |
||
1817 |
lemma closure_union [simp]: "closure (S \<union> T) = closure S \<union> closure T" |
|
1818 |
unfolding closure_interior by simp |
|
33175 | 1819 |
|
60974
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
1820 |
lemma closure_eq_empty [iff]: "closure S = {} \<longleftrightarrow> S = {}" |
33175 | 1821 |
using closure_empty closure_subset[of S] |
1822 |
by blast |
|
1823 |
||
1824 |
lemma closure_subset_eq: "closure S \<subseteq> S \<longleftrightarrow> closed S" |
|
1825 |
using closure_eq[of S] closure_subset[of S] |
|
1826 |
by simp |
|
1827 |
||
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
1828 |
lemma open_Int_closure_eq_empty: |
33175 | 1829 |
"open S \<Longrightarrow> (S \<inter> closure T) = {} \<longleftrightarrow> S \<inter> T = {}" |
34105 | 1830 |
using open_subset_interior[of S "- T"] |
1831 |
using interior_subset[of "- T"] |
|
33175 | 1832 |
unfolding closure_interior |
1833 |
by auto |
|
1834 |
||
1835 |
lemma open_inter_closure_subset: |
|
1836 |
"open S \<Longrightarrow> (S \<inter> (closure T)) \<subseteq> closure(S \<inter> T)" |
|
1837 |
proof |
|
1838 |
fix x |
|
1839 |
assume as: "open S" "x \<in> S \<inter> closure T" |
|
53255 | 1840 |
{ |
53282 | 1841 |
assume *: "x islimpt T" |
33175 | 1842 |
have "x islimpt (S \<inter> T)" |
1843 |
proof (rule islimptI) |
|
1844 |
fix A |
|
1845 |
assume "x \<in> A" "open A" |
|
1846 |
with as have "x \<in> A \<inter> S" "open (A \<inter> S)" |
|
1847 |
by (simp_all add: open_Int) |
|
1848 |
with * obtain y where "y \<in> T" "y \<in> A \<inter> S" "y \<noteq> x" |
|
1849 |
by (rule islimptE) |
|
53255 | 1850 |
then have "y \<in> S \<inter> T" "y \<in> A \<and> y \<noteq> x" |
33175 | 1851 |
by simp_all |
53255 | 1852 |
then show "\<exists>y\<in>(S \<inter> T). y \<in> A \<and> y \<noteq> x" .. |
33175 | 1853 |
qed |
1854 |
} |
|
1855 |
then show "x \<in> closure (S \<inter> T)" using as |
|
1856 |
unfolding closure_def |
|
1857 |
by blast |
|
1858 |
qed |
|
1859 |
||
44519 | 1860 |
lemma closure_complement: "closure (- S) = - interior S" |
44518 | 1861 |
unfolding closure_interior by simp |
33175 | 1862 |
|
44519 | 1863 |
lemma interior_complement: "interior (- S) = - closure S" |
44518 | 1864 |
unfolding closure_interior by simp |
33175 | 1865 |
|
44365 | 1866 |
lemma closure_Times: "closure (A \<times> B) = closure A \<times> closure B" |
44519 | 1867 |
proof (rule closure_unique) |
44365 | 1868 |
show "A \<times> B \<subseteq> closure A \<times> closure B" |
1869 |
by (intro Sigma_mono closure_subset) |
|
1870 |
show "closed (closure A \<times> closure B)" |
|
1871 |
by (intro closed_Times closed_closure) |
|
53282 | 1872 |
fix T |
1873 |
assume "A \<times> B \<subseteq> T" and "closed T" |
|
1874 |
then show "closure A \<times> closure B \<subseteq> T" |
|
44365 | 1875 |
apply (simp add: closed_def open_prod_def, clarify) |
1876 |
apply (rule ccontr) |
|
1877 |
apply (drule_tac x="(a, b)" in bspec, simp, clarify, rename_tac C D) |
|
1878 |
apply (simp add: closure_interior interior_def) |
|
1879 |
apply (drule_tac x=C in spec) |
|
1880 |
apply (drule_tac x=D in spec) |
|
1881 |
apply auto |
|
1882 |
done |
|
1883 |
qed |
|
1884 |
||
51351 | 1885 |
lemma islimpt_in_closure: "(x islimpt S) = (x:closure(S-{x}))" |
1886 |
unfolding closure_def using islimpt_punctured by blast |
|
1887 |
||
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1888 |
lemma connected_imp_connected_closure: "connected s \<Longrightarrow> connected (closure s)" |
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
1889 |
by (rule connectedI) (meson closure_subset open_Int open_Int_closure_eq_empty subset_trans connectedD) |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1890 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1891 |
lemma limpt_of_limpts: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1892 |
fixes x :: "'a::metric_space" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1893 |
shows "x islimpt {y. y islimpt s} \<Longrightarrow> x islimpt s" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1894 |
apply (clarsimp simp add: islimpt_approachable) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1895 |
apply (drule_tac x="e/2" in spec) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1896 |
apply (auto simp: simp del: less_divide_eq_numeral1) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1897 |
apply (drule_tac x="dist x' x" in spec) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1898 |
apply (auto simp: zero_less_dist_iff simp del: less_divide_eq_numeral1) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1899 |
apply (erule rev_bexI) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1900 |
by (metis dist_commute dist_triangle_half_r less_trans less_irrefl) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1901 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1902 |
lemma closed_limpts: "closed {x::'a::metric_space. x islimpt s}" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1903 |
using closed_limpt limpt_of_limpts by blast |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1904 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1905 |
lemma limpt_of_closure: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1906 |
fixes x :: "'a::metric_space" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1907 |
shows "x islimpt closure s \<longleftrightarrow> x islimpt s" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1908 |
by (auto simp: closure_def islimpt_Un dest: limpt_of_limpts) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1909 |
|
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
1910 |
lemma closedin_limpt: |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1911 |
"closedin (subtopology euclidean t) s \<longleftrightarrow> s \<subseteq> t \<and> (\<forall>x. x islimpt s \<and> x \<in> t \<longrightarrow> x \<in> s)" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1912 |
apply (simp add: closedin_closed, safe) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1913 |
apply (simp add: closed_limpt islimpt_subset) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1914 |
apply (rule_tac x="closure s" in exI) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1915 |
apply simp |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1916 |
apply (force simp: closure_def) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1917 |
done |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1918 |
|
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1919 |
lemma closedin_closed_eq: |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1920 |
"closed s \<Longrightarrow> (closedin (subtopology euclidean s) t \<longleftrightarrow> closed t \<and> t \<subseteq> s)" |
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
1921 |
by (meson closedin_limpt closed_subset closedin_closed_trans) |
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1922 |
|
62083 | 1923 |
lemma bdd_below_closure: |
1924 |
fixes A :: "real set" |
|
1925 |
assumes "bdd_below A" |
|
1926 |
shows "bdd_below (closure A)" |
|
1927 |
proof - |
|
1928 |
from assms obtain m where "\<And>x. x \<in> A \<Longrightarrow> m \<le> x" unfolding bdd_below_def by auto |
|
1929 |
hence "A \<subseteq> {m..}" by auto |
|
1930 |
hence "closure A \<subseteq> {m..}" using closed_real_atLeast by (rule closure_minimal) |
|
1931 |
thus ?thesis unfolding bdd_below_def by auto |
|
1932 |
qed |
|
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1933 |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1934 |
subsection\<open>Connected components, considered as a connectedness relation or a set\<close> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1935 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1936 |
definition |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1937 |
"connected_component s x y \<equiv> \<exists>t. connected t \<and> t \<subseteq> s \<and> x \<in> t \<and> y \<in> t" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1938 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1939 |
abbreviation |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1940 |
"connected_component_set s x \<equiv> Collect (connected_component s x)" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1941 |
|
61426
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
1942 |
lemma connected_componentI: |
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
1943 |
"\<lbrakk>connected t; t \<subseteq> s; x \<in> t; y \<in> t\<rbrakk> \<Longrightarrow> connected_component s x y" |
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
1944 |
by (auto simp: connected_component_def) |
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
1945 |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1946 |
lemma connected_component_in: "connected_component s x y \<Longrightarrow> x \<in> s \<and> y \<in> s" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1947 |
by (auto simp: connected_component_def) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1948 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1949 |
lemma connected_component_refl: "x \<in> s \<Longrightarrow> connected_component s x x" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1950 |
apply (auto simp: connected_component_def) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1951 |
using connected_sing by blast |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1952 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1953 |
lemma connected_component_refl_eq [simp]: "connected_component s x x \<longleftrightarrow> x \<in> s" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1954 |
by (auto simp: connected_component_refl) (auto simp: connected_component_def) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1955 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1956 |
lemma connected_component_sym: "connected_component s x y \<Longrightarrow> connected_component s y x" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1957 |
by (auto simp: connected_component_def) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1958 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1959 |
lemma connected_component_trans: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1960 |
"\<lbrakk>connected_component s x y; connected_component s y z\<rbrakk> \<Longrightarrow> connected_component s x z" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1961 |
unfolding connected_component_def |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1962 |
by (metis Int_iff Un_iff Un_subset_iff equals0D connected_Un) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1963 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1964 |
lemma connected_component_of_subset: "\<lbrakk>connected_component s x y; s \<subseteq> t\<rbrakk> \<Longrightarrow> connected_component t x y" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1965 |
by (auto simp: connected_component_def) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1966 |
|
61952 | 1967 |
lemma connected_component_Union: "connected_component_set s x = \<Union>{t. connected t \<and> x \<in> t \<and> t \<subseteq> s}" |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1968 |
by (auto simp: connected_component_def) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1969 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1970 |
lemma connected_connected_component [iff]: "connected (connected_component_set s x)" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1971 |
by (auto simp: connected_component_Union intro: connected_Union) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1972 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1973 |
lemma connected_iff_eq_connected_component_set: "connected s \<longleftrightarrow> (\<forall>x \<in> s. connected_component_set s x = s)" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1974 |
proof (cases "s={}") |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1975 |
case True then show ?thesis by simp |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1976 |
next |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1977 |
case False |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1978 |
then obtain x where "x \<in> s" by auto |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1979 |
show ?thesis |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1980 |
proof |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1981 |
assume "connected s" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1982 |
then show "\<forall>x \<in> s. connected_component_set s x = s" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1983 |
by (force simp: connected_component_def) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1984 |
next |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1985 |
assume "\<forall>x \<in> s. connected_component_set s x = s" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1986 |
then show "connected s" |
61808 | 1987 |
by (metis \<open>x \<in> s\<close> connected_connected_component) |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1988 |
qed |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1989 |
qed |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1990 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1991 |
lemma connected_component_subset: "connected_component_set s x \<subseteq> s" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1992 |
using connected_component_in by blast |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1993 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1994 |
lemma connected_component_eq_self: "\<lbrakk>connected s; x \<in> s\<rbrakk> \<Longrightarrow> connected_component_set s x = s" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1995 |
by (simp add: connected_iff_eq_connected_component_set) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1996 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1997 |
lemma connected_iff_connected_component: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1998 |
"connected s \<longleftrightarrow> (\<forall>x \<in> s. \<forall>y \<in> s. connected_component s x y)" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1999 |
using connected_component_in by (auto simp: connected_iff_eq_connected_component_set) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2000 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2001 |
lemma connected_component_maximal: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2002 |
"\<lbrakk>x \<in> t; connected t; t \<subseteq> s\<rbrakk> \<Longrightarrow> t \<subseteq> (connected_component_set s x)" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2003 |
using connected_component_eq_self connected_component_of_subset by blast |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2004 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2005 |
lemma connected_component_mono: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2006 |
"s \<subseteq> t \<Longrightarrow> (connected_component_set s x) \<subseteq> (connected_component_set t x)" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2007 |
by (simp add: Collect_mono connected_component_of_subset) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2008 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2009 |
lemma connected_component_eq_empty [simp]: "connected_component_set s x = {} \<longleftrightarrow> (x \<notin> s)" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2010 |
using connected_component_refl by (fastforce simp: connected_component_in) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2011 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2012 |
lemma connected_component_set_empty [simp]: "connected_component_set {} x = {}" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2013 |
using connected_component_eq_empty by blast |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2014 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2015 |
lemma connected_component_eq: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2016 |
"y \<in> connected_component_set s x |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2017 |
\<Longrightarrow> (connected_component_set s y = connected_component_set s x)" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2018 |
by (metis (no_types, lifting) Collect_cong connected_component_sym connected_component_trans mem_Collect_eq) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2019 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2020 |
lemma closed_connected_component: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2021 |
assumes s: "closed s" shows "closed (connected_component_set s x)" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2022 |
proof (cases "x \<in> s") |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2023 |
case False then show ?thesis |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2024 |
by (metis connected_component_eq_empty closed_empty) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2025 |
next |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2026 |
case True |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2027 |
show ?thesis |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2028 |
unfolding closure_eq [symmetric] |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2029 |
proof |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2030 |
show "closure (connected_component_set s x) \<subseteq> connected_component_set s x" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2031 |
apply (rule connected_component_maximal) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2032 |
apply (simp add: closure_def True) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2033 |
apply (simp add: connected_imp_connected_closure) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2034 |
apply (simp add: s closure_minimal connected_component_subset) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2035 |
done |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2036 |
next |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2037 |
show "connected_component_set s x \<subseteq> closure (connected_component_set s x)" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2038 |
by (simp add: closure_subset) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2039 |
qed |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2040 |
qed |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2041 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2042 |
lemma connected_component_disjoint: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2043 |
"(connected_component_set s a) \<inter> (connected_component_set s b) = {} \<longleftrightarrow> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2044 |
a \<notin> connected_component_set s b" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2045 |
apply (auto simp: connected_component_eq) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2046 |
using connected_component_eq connected_component_sym by blast |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2047 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2048 |
lemma connected_component_nonoverlap: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2049 |
"(connected_component_set s a) \<inter> (connected_component_set s b) = {} \<longleftrightarrow> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2050 |
(a \<notin> s \<or> b \<notin> s \<or> connected_component_set s a \<noteq> connected_component_set s b)" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2051 |
apply (auto simp: connected_component_in) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2052 |
using connected_component_refl_eq apply blast |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2053 |
apply (metis connected_component_eq mem_Collect_eq) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2054 |
apply (metis connected_component_eq mem_Collect_eq) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2055 |
done |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2056 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2057 |
lemma connected_component_overlap: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2058 |
"(connected_component_set s a \<inter> connected_component_set s b \<noteq> {}) = |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2059 |
(a \<in> s \<and> b \<in> s \<and> connected_component_set s a = connected_component_set s b)" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2060 |
by (auto simp: connected_component_nonoverlap) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2061 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2062 |
lemma connected_component_sym_eq: "connected_component s x y \<longleftrightarrow> connected_component s y x" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2063 |
using connected_component_sym by blast |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2064 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2065 |
lemma connected_component_eq_eq: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2066 |
"connected_component_set s x = connected_component_set s y \<longleftrightarrow> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2067 |
x \<notin> s \<and> y \<notin> s \<or> x \<in> s \<and> y \<in> s \<and> connected_component s x y" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2068 |
apply (case_tac "y \<in> s") |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2069 |
apply (simp add:) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2070 |
apply (metis connected_component_eq connected_component_eq_empty connected_component_refl_eq mem_Collect_eq) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2071 |
apply (case_tac "x \<in> s") |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2072 |
apply (simp add:) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2073 |
apply (metis connected_component_eq_empty) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2074 |
using connected_component_eq_empty by blast |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2075 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2076 |
lemma connected_iff_connected_component_eq: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2077 |
"connected s \<longleftrightarrow> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2078 |
(\<forall>x \<in> s. \<forall>y \<in> s. connected_component_set s x = connected_component_set s y)" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2079 |
by (simp add: connected_component_eq_eq connected_iff_connected_component) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2080 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2081 |
lemma connected_component_idemp: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2082 |
"connected_component_set (connected_component_set s x) x = connected_component_set s x" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2083 |
apply (rule subset_antisym) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2084 |
apply (simp add: connected_component_subset) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2085 |
by (metis connected_component_eq_empty connected_component_maximal connected_component_refl_eq connected_connected_component mem_Collect_eq set_eq_subset) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2086 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2087 |
lemma connected_component_unique: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2088 |
"\<lbrakk>x \<in> c; c \<subseteq> s; connected c; |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2089 |
\<And>c'. x \<in> c' \<and> c' \<subseteq> s \<and> connected c' |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2090 |
\<Longrightarrow> c' \<subseteq> c\<rbrakk> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2091 |
\<Longrightarrow> connected_component_set s x = c" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2092 |
apply (rule subset_antisym) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2093 |
apply (meson connected_component_maximal connected_component_subset connected_connected_component contra_subsetD) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2094 |
by (simp add: connected_component_maximal) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2095 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2096 |
lemma joinable_connected_component_eq: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2097 |
"\<lbrakk>connected t; t \<subseteq> s; |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2098 |
connected_component_set s x \<inter> t \<noteq> {}; |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2099 |
connected_component_set s y \<inter> t \<noteq> {}\<rbrakk> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2100 |
\<Longrightarrow> connected_component_set s x = connected_component_set s y" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2101 |
apply (simp add: ex_in_conv [symmetric]) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2102 |
apply (rule connected_component_eq) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2103 |
by (metis (no_types, hide_lams) connected_component_eq_eq connected_component_in connected_component_maximal subsetD mem_Collect_eq) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2104 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2105 |
|
61952 | 2106 |
lemma Union_connected_component: "\<Union>(connected_component_set s ` s) = s" |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2107 |
apply (rule subset_antisym) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2108 |
apply (simp add: SUP_least connected_component_subset) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2109 |
using connected_component_refl_eq |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2110 |
by force |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2111 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2112 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2113 |
lemma complement_connected_component_unions: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2114 |
"s - connected_component_set s x = |
61952 | 2115 |
\<Union>(connected_component_set s ` s - {connected_component_set s x})" |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2116 |
apply (subst Union_connected_component [symmetric], auto) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2117 |
apply (metis connected_component_eq_eq connected_component_in) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2118 |
by (metis connected_component_eq mem_Collect_eq) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2119 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2120 |
lemma connected_component_intermediate_subset: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2121 |
"\<lbrakk>connected_component_set u a \<subseteq> t; t \<subseteq> u\<rbrakk> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2122 |
\<Longrightarrow> connected_component_set t a = connected_component_set u a" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2123 |
apply (case_tac "a \<in> u") |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2124 |
apply (simp add: connected_component_maximal connected_component_mono subset_antisym) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2125 |
using connected_component_eq_empty by blast |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2126 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2127 |
subsection\<open>The set of connected components of a set\<close> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2128 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2129 |
definition components:: "'a::topological_space set \<Rightarrow> 'a set set" where |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2130 |
"components s \<equiv> connected_component_set s ` s" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2131 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2132 |
lemma components_iff: "s \<in> components u \<longleftrightarrow> (\<exists>x. x \<in> u \<and> s = connected_component_set u x)" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2133 |
by (auto simp: components_def) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2134 |
|
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
2135 |
lemma Union_components [simp]: "\<Union>(components u) = u" |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2136 |
apply (rule subset_antisym) |
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
2137 |
using Union_connected_component components_def apply fastforce |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2138 |
apply (metis Union_connected_component components_def set_eq_subset) |
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
2139 |
done |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2140 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2141 |
lemma pairwise_disjoint_components: "pairwise (\<lambda>X Y. X \<inter> Y = {}) (components u)" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2142 |
apply (simp add: pairwise_def) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2143 |
apply (auto simp: components_iff) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2144 |
apply (metis connected_component_eq_eq connected_component_in)+ |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2145 |
done |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2146 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2147 |
lemma in_components_nonempty: "c \<in> components s \<Longrightarrow> c \<noteq> {}" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2148 |
by (metis components_iff connected_component_eq_empty) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2149 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2150 |
lemma in_components_subset: "c \<in> components s \<Longrightarrow> c \<subseteq> s" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2151 |
using Union_components by blast |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2152 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2153 |
lemma in_components_connected: "c \<in> components s \<Longrightarrow> connected c" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2154 |
by (metis components_iff connected_connected_component) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2155 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2156 |
lemma in_components_maximal: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2157 |
"c \<in> components s \<longleftrightarrow> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2158 |
(c \<noteq> {} \<and> c \<subseteq> s \<and> connected c \<and> (\<forall>d. d \<noteq> {} \<and> c \<subseteq> d \<and> d \<subseteq> s \<and> connected d \<longrightarrow> d = c))" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2159 |
apply (rule iffI) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2160 |
apply (simp add: in_components_nonempty in_components_connected) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2161 |
apply (metis (full_types) components_iff connected_component_eq_self connected_component_intermediate_subset connected_component_refl in_components_subset mem_Collect_eq rev_subsetD) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2162 |
by (metis bot.extremum_uniqueI components_iff connected_component_eq_empty connected_component_maximal connected_component_subset connected_connected_component subset_emptyI) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2163 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2164 |
lemma joinable_components_eq: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2165 |
"connected t \<and> t \<subseteq> s \<and> c1 \<in> components s \<and> c2 \<in> components s \<and> c1 \<inter> t \<noteq> {} \<and> c2 \<inter> t \<noteq> {} \<Longrightarrow> c1 = c2" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2166 |
by (metis (full_types) components_iff joinable_connected_component_eq) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2167 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2168 |
lemma closed_components: "\<lbrakk>closed s; c \<in> components s\<rbrakk> \<Longrightarrow> closed c" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2169 |
by (metis closed_connected_component components_iff) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2170 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2171 |
lemma components_nonoverlap: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2172 |
"\<lbrakk>c \<in> components s; c' \<in> components s\<rbrakk> \<Longrightarrow> (c \<inter> c' = {}) \<longleftrightarrow> (c \<noteq> c')" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2173 |
apply (auto simp: in_components_nonempty components_iff) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2174 |
using connected_component_refl apply blast |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2175 |
apply (metis connected_component_eq_eq connected_component_in) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2176 |
by (metis connected_component_eq mem_Collect_eq) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2177 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2178 |
lemma components_eq: "\<lbrakk>c \<in> components s; c' \<in> components s\<rbrakk> \<Longrightarrow> (c = c' \<longleftrightarrow> c \<inter> c' \<noteq> {})" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2179 |
by (metis components_nonoverlap) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2180 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2181 |
lemma components_eq_empty [simp]: "components s = {} \<longleftrightarrow> s = {}" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2182 |
by (simp add: components_def) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2183 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2184 |
lemma components_empty [simp]: "components {} = {}" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2185 |
by simp |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2186 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2187 |
lemma connected_eq_connected_components_eq: "connected s \<longleftrightarrow> (\<forall>c \<in> components s. \<forall>c' \<in> components s. c = c')" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2188 |
by (metis (no_types, hide_lams) components_iff connected_component_eq_eq connected_iff_connected_component) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2189 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2190 |
lemma components_eq_sing_iff: "components s = {s} \<longleftrightarrow> connected s \<and> s \<noteq> {}" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2191 |
apply (rule iffI) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2192 |
using in_components_connected apply fastforce |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2193 |
apply safe |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2194 |
using Union_components apply fastforce |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2195 |
apply (metis components_iff connected_component_eq_self) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2196 |
using in_components_maximal by auto |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2197 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2198 |
lemma components_eq_sing_exists: "(\<exists>a. components s = {a}) \<longleftrightarrow> connected s \<and> s \<noteq> {}" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2199 |
apply (rule iffI) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2200 |
using connected_eq_connected_components_eq apply fastforce |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2201 |
by (metis components_eq_sing_iff) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2202 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2203 |
lemma connected_eq_components_subset_sing: "connected s \<longleftrightarrow> components s \<subseteq> {s}" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2204 |
by (metis Union_components components_empty components_eq_sing_iff connected_empty insert_subset order_refl subset_singletonD) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2205 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2206 |
lemma connected_eq_components_subset_sing_exists: "connected s \<longleftrightarrow> (\<exists>a. components s \<subseteq> {a})" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2207 |
by (metis components_eq_sing_exists connected_eq_components_subset_sing empty_iff subset_iff subset_singletonD) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2208 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2209 |
lemma in_components_self: "s \<in> components s \<longleftrightarrow> connected s \<and> s \<noteq> {}" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2210 |
by (metis components_empty components_eq_sing_iff empty_iff in_components_connected insertI1) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2211 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2212 |
lemma components_maximal: "\<lbrakk>c \<in> components s; connected t; t \<subseteq> s; c \<inter> t \<noteq> {}\<rbrakk> \<Longrightarrow> t \<subseteq> c" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2213 |
apply (simp add: components_def ex_in_conv [symmetric], clarify) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2214 |
by (meson connected_component_def connected_component_trans) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2215 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2216 |
lemma exists_component_superset: "\<lbrakk>t \<subseteq> s; s \<noteq> {}; connected t\<rbrakk> \<Longrightarrow> \<exists>c. c \<in> components s \<and> t \<subseteq> c" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2217 |
apply (case_tac "t = {}") |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2218 |
apply force |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2219 |
by (metis components_def ex_in_conv connected_component_maximal contra_subsetD image_eqI) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2220 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2221 |
lemma components_intermediate_subset: "\<lbrakk>s \<in> components u; s \<subseteq> t; t \<subseteq> u\<rbrakk> \<Longrightarrow> s \<in> components t" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2222 |
apply (auto simp: components_iff) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2223 |
by (metis connected_component_eq_empty connected_component_intermediate_subset) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2224 |
|
61952 | 2225 |
lemma in_components_unions_complement: "c \<in> components s \<Longrightarrow> s - c = \<Union>(components s - {c})" |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2226 |
by (metis complement_connected_component_unions components_def components_iff) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2227 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2228 |
lemma connected_intermediate_closure: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2229 |
assumes cs: "connected s" and st: "s \<subseteq> t" and ts: "t \<subseteq> closure s" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2230 |
shows "connected t" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2231 |
proof (rule connectedI) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2232 |
fix A B |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2233 |
assume A: "open A" and B: "open B" and Alap: "A \<inter> t \<noteq> {}" and Blap: "B \<inter> t \<noteq> {}" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2234 |
and disj: "A \<inter> B \<inter> t = {}" and cover: "t \<subseteq> A \<union> B" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2235 |
have disjs: "A \<inter> B \<inter> s = {}" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2236 |
using disj st by auto |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2237 |
have "A \<inter> closure s \<noteq> {}" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2238 |
using Alap Int_absorb1 ts by blast |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2239 |
then have Alaps: "A \<inter> s \<noteq> {}" |
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
2240 |
by (simp add: A open_Int_closure_eq_empty) |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2241 |
have "B \<inter> closure s \<noteq> {}" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2242 |
using Blap Int_absorb1 ts by blast |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2243 |
then have Blaps: "B \<inter> s \<noteq> {}" |
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
2244 |
by (simp add: B open_Int_closure_eq_empty) |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2245 |
then show False |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2246 |
using cs [unfolded connected_def] A B disjs Alaps Blaps cover st |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2247 |
by blast |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2248 |
qed |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2249 |
|
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
2250 |
lemma closedin_connected_component: "closedin (subtopology euclidean s) (connected_component_set s x)" |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2251 |
proof (cases "connected_component_set s x = {}") |
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61552
diff
changeset
|
2252 |
case True then show ?thesis |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2253 |
by (metis closedin_empty) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2254 |
next |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2255 |
case False |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2256 |
then obtain y where y: "connected_component s x y" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2257 |
by blast |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2258 |
have 1: "connected_component_set s x \<subseteq> s \<inter> closure (connected_component_set s x)" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2259 |
by (auto simp: closure_def connected_component_in) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2260 |
have 2: "connected_component s x y \<Longrightarrow> s \<inter> closure (connected_component_set s x) \<subseteq> connected_component_set s x" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2261 |
apply (rule connected_component_maximal) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2262 |
apply (simp add:) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2263 |
using closure_subset connected_component_in apply fastforce |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2264 |
using "1" connected_intermediate_closure apply blast+ |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2265 |
done |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2266 |
show ?thesis using y |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2267 |
apply (simp add: Topology_Euclidean_Space.closedin_closed) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2268 |
using 1 2 by auto |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2269 |
qed |
51351 | 2270 |
|
60420 | 2271 |
subsection \<open>Frontier (aka boundary)\<close> |
33175 | 2272 |
|
2273 |
definition "frontier S = closure S - interior S" |
|
2274 |
||
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
2275 |
lemma frontier_closed [iff]: "closed (frontier S)" |
33175 | 2276 |
by (simp add: frontier_def closed_Diff) |
2277 |
||
34105 | 2278 |
lemma frontier_closures: "frontier S = (closure S) \<inter> (closure(- S))" |
33175 | 2279 |
by (auto simp add: frontier_def interior_closure) |
2280 |
||
2281 |
lemma frontier_straddle: |
|
2282 |
fixes a :: "'a::metric_space" |
|
44909 | 2283 |
shows "a \<in> frontier S \<longleftrightarrow> (\<forall>e>0. (\<exists>x\<in>S. dist a x < e) \<and> (\<exists>x. x \<notin> S \<and> dist a x < e))" |
2284 |
unfolding frontier_def closure_interior |
|
2285 |
by (auto simp add: mem_interior subset_eq ball_def) |
|
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
2286 |
|
33175 | 2287 |
lemma frontier_subset_closed: "closed S \<Longrightarrow> frontier S \<subseteq> S" |
2288 |
by (metis frontier_def closure_closed Diff_subset) |
|
2289 |
||
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
2290 |
lemma frontier_empty [simp]: "frontier {} = {}" |
36362
06475a1547cb
fix lots of looping simp calls and other warnings
huffman
parents:
36360
diff
changeset
|
2291 |
by (simp add: frontier_def) |
33175 | 2292 |
|
2293 |
lemma frontier_subset_eq: "frontier S \<subseteq> S \<longleftrightarrow> closed S" |
|
58757 | 2294 |
proof - |
53255 | 2295 |
{ |
2296 |
assume "frontier S \<subseteq> S" |
|
2297 |
then have "closure S \<subseteq> S" |
|
2298 |
using interior_subset unfolding frontier_def by auto |
|
2299 |
then have "closed S" |
|
2300 |
using closure_subset_eq by auto |
|
33175 | 2301 |
} |
53255 | 2302 |
then show ?thesis using frontier_subset_closed[of S] .. |
33175 | 2303 |
qed |
2304 |
||
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
2305 |
lemma frontier_complement [simp]: "frontier (- S) = frontier S" |
33175 | 2306 |
by (auto simp add: frontier_def closure_complement interior_complement) |
2307 |
||
2308 |
lemma frontier_disjoint_eq: "frontier S \<inter> S = {} \<longleftrightarrow> open S" |
|
34105 | 2309 |
using frontier_complement frontier_subset_eq[of "- S"] |
2310 |
unfolding open_closed by auto |
|
33175 | 2311 |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2312 |
lemma frontier_UNIV [simp]: "frontier UNIV = {}" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2313 |
using frontier_complement frontier_empty by fastforce |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2314 |
|
58757 | 2315 |
|
60420 | 2316 |
subsection \<open>Filters and the ``eventually true'' quantifier\<close> |
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44076
diff
changeset
|
2317 |
|
52624 | 2318 |
definition indirection :: "'a::real_normed_vector \<Rightarrow> 'a \<Rightarrow> 'a filter" |
2319 |
(infixr "indirection" 70) |
|
2320 |
where "a indirection v = at a within {b. \<exists>c\<ge>0. b - a = scaleR c v}" |
|
33175 | 2321 |
|
60420 | 2322 |
text \<open>Identify Trivial limits, where we can't approach arbitrarily closely.\<close> |
33175 | 2323 |
|
52624 | 2324 |
lemma trivial_limit_within: "trivial_limit (at a within S) \<longleftrightarrow> \<not> a islimpt S" |
33175 | 2325 |
proof |
2326 |
assume "trivial_limit (at a within S)" |
|
53255 | 2327 |
then show "\<not> a islimpt S" |
33175 | 2328 |
unfolding trivial_limit_def |
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
|
2329 |
unfolding eventually_at_topological |
33175 | 2330 |
unfolding islimpt_def |
39302
d7728f65b353
renamed lemmas: ext_iff -> fun_eq_iff, set_ext_iff -> set_eq_iff, set_ext -> set_eqI
nipkow
parents:
39198
diff
changeset
|
2331 |
apply (clarsimp simp add: set_eq_iff) |
33175 | 2332 |
apply (rename_tac T, rule_tac x=T in exI) |
36358
246493d61204
define nets directly as filters, instead of as filter bases
huffman
parents:
36336
diff
changeset
|
2333 |
apply (clarsimp, drule_tac x=y in bspec, simp_all) |
33175 | 2334 |
done |
2335 |
next |
|
2336 |
assume "\<not> a islimpt S" |
|
53255 | 2337 |
then show "trivial_limit (at a within S)" |
55775 | 2338 |
unfolding trivial_limit_def eventually_at_topological islimpt_def |
2339 |
by metis |
|
33175 | 2340 |
qed |
2341 |
||
2342 |
lemma trivial_limit_at_iff: "trivial_limit (at a) \<longleftrightarrow> \<not> a islimpt UNIV" |
|
45031 | 2343 |
using trivial_limit_within [of a UNIV] by simp |
33175 | 2344 |
|
2345 |
lemma trivial_limit_at: |
|
2346 |
fixes a :: "'a::perfect_space" |
|
2347 |
shows "\<not> trivial_limit (at a)" |
|
44571 | 2348 |
by (rule at_neq_bot) |
33175 | 2349 |
|
2350 |
lemma trivial_limit_at_infinity: |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44076
diff
changeset
|
2351 |
"\<not> trivial_limit (at_infinity :: ('a::{real_normed_vector,perfect_space}) filter)" |
36358
246493d61204
define nets directly as filters, instead of as filter bases
huffman
parents:
36336
diff
changeset
|
2352 |
unfolding trivial_limit_def eventually_at_infinity |
246493d61204
define nets directly as filters, instead of as filter bases
huffman
parents:
36336
diff
changeset
|
2353 |
apply clarsimp |
44072
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
2354 |
apply (subgoal_tac "\<exists>x::'a. x \<noteq> 0", clarify) |
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
2355 |
apply (rule_tac x="scaleR (b / norm x) x" in exI, simp) |
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
2356 |
apply (cut_tac islimpt_UNIV [of "0::'a", unfolded islimpt_def]) |
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
2357 |
apply (drule_tac x=UNIV in spec, simp) |
33175 | 2358 |
done |
2359 |
||
53640 | 2360 |
lemma not_trivial_limit_within: "\<not> trivial_limit (at x within S) = (x \<in> closure (S - {x}))" |
2361 |
using islimpt_in_closure |
|
2362 |
by (metis trivial_limit_within) |
|
51351 | 2363 |
|
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2364 |
lemma at_within_eq_bot_iff: "(at c within A = bot) \<longleftrightarrow> (c \<notin> closure (A - {c}))" |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2365 |
using not_trivial_limit_within[of c A] by blast |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2366 |
|
60420 | 2367 |
text \<open>Some property holds "sufficiently close" to the limit point.\<close> |
33175 | 2368 |
|
2369 |
lemma trivial_limit_eventually: "trivial_limit net \<Longrightarrow> eventually P net" |
|
45031 | 2370 |
by simp |
33175 | 2371 |
|
2372 |
lemma trivial_limit_eq: "trivial_limit net \<longleftrightarrow> (\<forall>P. eventually P net)" |
|
44342
8321948340ea
redefine constant 'trivial_limit' as an abbreviation
huffman
parents:
44286
diff
changeset
|
2373 |
by (simp add: filter_eq_iff) |
33175 | 2374 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2375 |
|
60420 | 2376 |
subsection \<open>Limits\<close> |
33175 | 2377 |
|
2378 |
lemma Lim: |
|
61973 | 2379 |
"(f \<longlongrightarrow> l) net \<longleftrightarrow> |
33175 | 2380 |
trivial_limit net \<or> |
2381 |
(\<forall>e>0. eventually (\<lambda>x. dist (f x) l < e) net)" |
|
2382 |
unfolding tendsto_iff trivial_limit_eq by auto |
|
2383 |
||
60420 | 2384 |
text\<open>Show that they yield usual definitions in the various cases.\<close> |
33175 | 2385 |
|
61973 | 2386 |
lemma Lim_within_le: "(f \<longlongrightarrow> l)(at a within S) \<longleftrightarrow> |
53640 | 2387 |
(\<forall>e>0. \<exists>d>0. \<forall>x\<in>S. 0 < dist x a \<and> dist x a \<le> d \<longrightarrow> dist (f x) l < e)" |
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
2388 |
by (auto simp add: tendsto_iff eventually_at_le) |
33175 | 2389 |
|
61973 | 2390 |
lemma Lim_within: "(f \<longlongrightarrow> l) (at a within S) \<longleftrightarrow> |
53640 | 2391 |
(\<forall>e >0. \<exists>d>0. \<forall>x \<in> S. 0 < dist x a \<and> dist x a < d \<longrightarrow> dist (f x) l < e)" |
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
2392 |
by (auto simp add: tendsto_iff eventually_at) |
33175 | 2393 |
|
62131
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
2394 |
corollary Lim_withinI [intro?]: |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
2395 |
assumes "\<And>e. e > 0 \<Longrightarrow> \<exists>d>0. \<forall>x \<in> S. 0 < dist x a \<and> dist x a < d \<longrightarrow> dist (f x) l \<le> e" |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
2396 |
shows "(f \<longlongrightarrow> l) (at a within S)" |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
2397 |
apply (simp add: Lim_within, clarify) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
2398 |
apply (rule ex_forward [OF assms [OF half_gt_zero]], auto) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
2399 |
done |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
2400 |
|
61973 | 2401 |
lemma Lim_at: "(f \<longlongrightarrow> l) (at a) \<longleftrightarrow> |
53640 | 2402 |
(\<forall>e >0. \<exists>d>0. \<forall>x. 0 < dist x a \<and> dist x a < d \<longrightarrow> dist (f x) l < e)" |
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2403 |
by (auto simp add: tendsto_iff eventually_at) |
33175 | 2404 |
|
2405 |
lemma Lim_at_infinity: |
|
61973 | 2406 |
"(f \<longlongrightarrow> l) at_infinity \<longleftrightarrow> (\<forall>e>0. \<exists>b. \<forall>x. norm x \<ge> b \<longrightarrow> dist (f x) l < e)" |
33175 | 2407 |
by (auto simp add: tendsto_iff eventually_at_infinity) |
2408 |
||
62131
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
2409 |
corollary Lim_at_infinityI [intro?]: |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
2410 |
assumes "\<And>e. e > 0 \<Longrightarrow> \<exists>B. \<forall>x. norm x \<ge> B \<longrightarrow> dist (f x) l \<le> e" |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
2411 |
shows "(f \<longlongrightarrow> l) at_infinity" |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
2412 |
apply (simp add: Lim_at_infinity, clarify) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
2413 |
apply (rule ex_forward [OF assms [OF half_gt_zero]], auto) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
2414 |
done |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
2415 |
|
61973 | 2416 |
lemma Lim_eventually: "eventually (\<lambda>x. f x = l) net \<Longrightarrow> (f \<longlongrightarrow> l) net" |
61810 | 2417 |
by (rule topological_tendstoI, auto elim: eventually_mono) |
33175 | 2418 |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2419 |
lemma Lim_transform_within_set: |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2420 |
fixes a l :: "'a::real_normed_vector" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2421 |
shows "\<lbrakk>(f \<longlongrightarrow> l) (at a within s); eventually (\<lambda>x. x \<in> s \<longleftrightarrow> x \<in> t) (at a)\<rbrakk> |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2422 |
\<Longrightarrow> (f \<longlongrightarrow> l) (at a within t)" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2423 |
apply (clarsimp simp: eventually_at Lim_within) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2424 |
apply (drule_tac x=e in spec, clarify) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2425 |
apply (rename_tac k) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2426 |
apply (rule_tac x="min d k" in exI) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2427 |
apply (simp add:) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2428 |
done |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2429 |
|
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2430 |
lemma Lim_transform_within_set_eq: |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2431 |
fixes a l :: "'a::real_normed_vector" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2432 |
shows "eventually (\<lambda>x. x \<in> s \<longleftrightarrow> x \<in> t) (at a) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2433 |
\<Longrightarrow> ((f \<longlongrightarrow> l) (at a within s) \<longleftrightarrow> (f \<longlongrightarrow> l) (at a within t))" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2434 |
by (force intro: Lim_transform_within_set elim: eventually_mono) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2435 |
|
60420 | 2436 |
text\<open>The expected monotonicity property.\<close> |
33175 | 2437 |
|
53255 | 2438 |
lemma Lim_Un: |
61973 | 2439 |
assumes "(f \<longlongrightarrow> l) (at x within S)" "(f \<longlongrightarrow> l) (at x within T)" |
2440 |
shows "(f \<longlongrightarrow> l) (at x within (S \<union> T))" |
|
53860 | 2441 |
using assms unfolding at_within_union by (rule filterlim_sup) |
33175 | 2442 |
|
2443 |
lemma Lim_Un_univ: |
|
61973 | 2444 |
"(f \<longlongrightarrow> l) (at x within S) \<Longrightarrow> (f \<longlongrightarrow> l) (at x within T) \<Longrightarrow> |
2445 |
S \<union> T = UNIV \<Longrightarrow> (f \<longlongrightarrow> l) (at x)" |
|
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
|
2446 |
by (metis Lim_Un) |
33175 | 2447 |
|
60420 | 2448 |
text\<open>Interrelations between restricted and unrestricted limits.\<close> |
33175 | 2449 |
|
60974
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
2450 |
lemma Lim_at_imp_Lim_at_within: |
61973 | 2451 |
"(f \<longlongrightarrow> l) (at x) \<Longrightarrow> (f \<longlongrightarrow> l) (at x within S)" |
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
|
2452 |
by (metis order_refl filterlim_mono subset_UNIV at_le) |
33175 | 2453 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2454 |
lemma eventually_within_interior: |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2455 |
assumes "x \<in> interior S" |
53255 | 2456 |
shows "eventually P (at x within S) \<longleftrightarrow> eventually P (at x)" |
2457 |
(is "?lhs = ?rhs") |
|
2458 |
proof |
|
44519 | 2459 |
from assms obtain T where T: "open T" "x \<in> T" "T \<subseteq> S" .. |
53255 | 2460 |
{ |
2461 |
assume "?lhs" |
|
53640 | 2462 |
then obtain A where "open A" and "x \<in> A" and "\<forall>y\<in>A. y \<noteq> x \<longrightarrow> y \<in> S \<longrightarrow> P 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
|
2463 |
unfolding eventually_at_topological |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2464 |
by auto |
53640 | 2465 |
with T have "open (A \<inter> T)" and "x \<in> A \<inter> T" and "\<forall>y \<in> A \<inter> T. y \<noteq> x \<longrightarrow> P y" |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2466 |
by auto |
53255 | 2467 |
then show "?rhs" |
51471 | 2468 |
unfolding eventually_at_topological by auto |
53255 | 2469 |
next |
2470 |
assume "?rhs" |
|
2471 |
then show "?lhs" |
|
61810 | 2472 |
by (auto elim: eventually_mono simp: eventually_at_filter) |
52624 | 2473 |
} |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2474 |
qed |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2475 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2476 |
lemma at_within_interior: |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2477 |
"x \<in> interior S \<Longrightarrow> at x within S = at x" |
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
|
2478 |
unfolding filter_eq_iff by (intro allI eventually_within_interior) |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2479 |
|
43338 | 2480 |
lemma Lim_within_LIMSEQ: |
53862 | 2481 |
fixes a :: "'a::first_countable_topology" |
61969 | 2482 |
assumes "\<forall>S. (\<forall>n. S n \<noteq> a \<and> S n \<in> T) \<and> S \<longlonglongrightarrow> a \<longrightarrow> (\<lambda>n. X (S n)) \<longlonglongrightarrow> L" |
61973 | 2483 |
shows "(X \<longlongrightarrow> L) (at a within T)" |
44584 | 2484 |
using assms unfolding tendsto_def [where l=L] |
2485 |
by (simp add: sequentially_imp_eventually_within) |
|
43338 | 2486 |
|
2487 |
lemma Lim_right_bound: |
|
51773 | 2488 |
fixes f :: "'a :: {linorder_topology, conditionally_complete_linorder, no_top} \<Rightarrow> |
2489 |
'b::{linorder_topology, conditionally_complete_linorder}" |
|
43338 | 2490 |
assumes mono: "\<And>a b. a \<in> I \<Longrightarrow> b \<in> I \<Longrightarrow> x < a \<Longrightarrow> a \<le> b \<Longrightarrow> f a \<le> f b" |
53255 | 2491 |
and bnd: "\<And>a. a \<in> I \<Longrightarrow> x < a \<Longrightarrow> K \<le> f a" |
61973 | 2492 |
shows "(f \<longlongrightarrow> Inf (f ` ({x<..} \<inter> I))) (at x within ({x<..} \<inter> I))" |
53640 | 2493 |
proof (cases "{x<..} \<inter> I = {}") |
2494 |
case True |
|
53859 | 2495 |
then show ?thesis by simp |
43338 | 2496 |
next |
53640 | 2497 |
case False |
43338 | 2498 |
show ?thesis |
51518
6a56b7088a6a
separate SupInf into Conditional_Complete_Lattice, move instantiation of real to RealDef
hoelzl
parents:
51481
diff
changeset
|
2499 |
proof (rule order_tendstoI) |
53282 | 2500 |
fix a |
2501 |
assume a: "a < Inf (f ` ({x<..} \<inter> I))" |
|
53255 | 2502 |
{ |
2503 |
fix y |
|
2504 |
assume "y \<in> {x<..} \<inter> I" |
|
53640 | 2505 |
with False bnd have "Inf (f ` ({x<..} \<inter> I)) \<le> f y" |
62343
24106dc44def
prefer abbreviations for compound operators INFIMUM and SUPREMUM
haftmann
parents:
62131
diff
changeset
|
2506 |
by (auto intro!: cInf_lower bdd_belowI2) |
53255 | 2507 |
with a have "a < f y" |
2508 |
by (blast intro: less_le_trans) |
|
2509 |
} |
|
51518
6a56b7088a6a
separate SupInf into Conditional_Complete_Lattice, move instantiation of real to RealDef
hoelzl
parents:
51481
diff
changeset
|
2510 |
then show "eventually (\<lambda>x. a < f x) (at x within ({x<..} \<inter> I))" |
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
|
2511 |
by (auto simp: eventually_at_filter intro: exI[of _ 1] zero_less_one) |
51518
6a56b7088a6a
separate SupInf into Conditional_Complete_Lattice, move instantiation of real to RealDef
hoelzl
parents:
51481
diff
changeset
|
2512 |
next |
53255 | 2513 |
fix a |
2514 |
assume "Inf (f ` ({x<..} \<inter> I)) < a" |
|
53640 | 2515 |
from cInf_lessD[OF _ this] False obtain y where y: "x < y" "y \<in> I" "f y < a" |
53255 | 2516 |
by auto |
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
|
2517 |
then have "eventually (\<lambda>x. x \<in> I \<longrightarrow> f x < a) (at_right x)" |
60420 | 2518 |
unfolding eventually_at_right[OF \<open>x < y\<close>] by (metis less_imp_le le_less_trans mono) |
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
|
2519 |
then show "eventually (\<lambda>x. f x < a) (at x within ({x<..} \<inter> I))" |
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
|
2520 |
unfolding eventually_at_filter by eventually_elim simp |
43338 | 2521 |
qed |
2522 |
qed |
|
2523 |
||
60420 | 2524 |
text\<open>Another limit point characterization.\<close> |
33175 | 2525 |
|
2526 |
lemma islimpt_sequential: |
|
50883 | 2527 |
fixes x :: "'a::first_countable_topology" |
61973 | 2528 |
shows "x islimpt S \<longleftrightarrow> (\<exists>f. (\<forall>n::nat. f n \<in> S - {x}) \<and> (f \<longlongrightarrow> x) sequentially)" |
33175 | 2529 |
(is "?lhs = ?rhs") |
2530 |
proof |
|
2531 |
assume ?lhs |
|
55522 | 2532 |
from countable_basis_at_decseq[of x] obtain A where A: |
2533 |
"\<And>i. open (A i)" |
|
2534 |
"\<And>i. x \<in> A i" |
|
2535 |
"\<And>S. open S \<Longrightarrow> x \<in> S \<Longrightarrow> eventually (\<lambda>i. A i \<subseteq> S) sequentially" |
|
2536 |
by blast |
|
63040 | 2537 |
define f where "f n = (SOME y. y \<in> S \<and> y \<in> A n \<and> x \<noteq> y)" for n |
53255 | 2538 |
{ |
2539 |
fix n |
|
60420 | 2540 |
from \<open>?lhs\<close> have "\<exists>y. y \<in> S \<and> y \<in> A n \<and> x \<noteq> y" |
50883 | 2541 |
unfolding islimpt_def using A(1,2)[of n] by auto |
2542 |
then have "f n \<in> S \<and> f n \<in> A n \<and> x \<noteq> f n" |
|
2543 |
unfolding f_def by (rule someI_ex) |
|
53255 | 2544 |
then have "f n \<in> S" "f n \<in> A n" "x \<noteq> f n" by auto |
2545 |
} |
|
50883 | 2546 |
then have "\<forall>n. f n \<in> S - {x}" by auto |
61969 | 2547 |
moreover have "(\<lambda>n. f n) \<longlonglongrightarrow> x" |
50883 | 2548 |
proof (rule topological_tendstoI) |
53255 | 2549 |
fix S |
2550 |
assume "open S" "x \<in> S" |
|
60420 | 2551 |
from A(3)[OF this] \<open>\<And>n. f n \<in> A n\<close> |
53255 | 2552 |
show "eventually (\<lambda>x. f x \<in> S) sequentially" |
61810 | 2553 |
by (auto elim!: eventually_mono) |
44584 | 2554 |
qed |
2555 |
ultimately show ?rhs by fast |
|
33175 | 2556 |
next |
2557 |
assume ?rhs |
|
61969 | 2558 |
then obtain f :: "nat \<Rightarrow> 'a" where f: "\<And>n. f n \<in> S - {x}" and lim: "f \<longlonglongrightarrow> x" |
53255 | 2559 |
by auto |
50883 | 2560 |
show ?lhs |
2561 |
unfolding islimpt_def |
|
2562 |
proof safe |
|
53255 | 2563 |
fix T |
2564 |
assume "open T" "x \<in> T" |
|
50883 | 2565 |
from lim[THEN topological_tendstoD, OF this] f |
2566 |
show "\<exists>y\<in>S. y \<in> T \<and> y \<noteq> x" |
|
2567 |
unfolding eventually_sequentially by auto |
|
2568 |
qed |
|
33175 | 2569 |
qed |
2570 |
||
2571 |
lemma Lim_null: |
|
2572 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
|
61973 | 2573 |
shows "(f \<longlongrightarrow> l) net \<longleftrightarrow> ((\<lambda>x. f(x) - l) \<longlongrightarrow> 0) net" |
33175 | 2574 |
by (simp add: Lim dist_norm) |
2575 |
||
2576 |
lemma Lim_null_comparison: |
|
2577 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
|
61973 | 2578 |
assumes "eventually (\<lambda>x. norm (f x) \<le> g x) net" "(g \<longlongrightarrow> 0) net" |
2579 |
shows "(f \<longlongrightarrow> 0) net" |
|
53282 | 2580 |
using assms(2) |
44252
10362a07eb7c
Topology_Euclidean_Space.thy: simplify some proofs
huffman
parents:
44250
diff
changeset
|
2581 |
proof (rule metric_tendsto_imp_tendsto) |
10362a07eb7c
Topology_Euclidean_Space.thy: simplify some proofs
huffman
parents:
44250
diff
changeset
|
2582 |
show "eventually (\<lambda>x. dist (f x) 0 \<le> dist (g x) 0) net" |
61810 | 2583 |
using assms(1) by (rule eventually_mono) (simp add: dist_norm) |
33175 | 2584 |
qed |
2585 |
||
2586 |
lemma Lim_transform_bound: |
|
2587 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
|
53255 | 2588 |
and g :: "'a \<Rightarrow> 'c::real_normed_vector" |
53640 | 2589 |
assumes "eventually (\<lambda>n. norm (f n) \<le> norm (g n)) net" |
61973 | 2590 |
and "(g \<longlongrightarrow> 0) net" |
2591 |
shows "(f \<longlongrightarrow> 0) net" |
|
44252
10362a07eb7c
Topology_Euclidean_Space.thy: simplify some proofs
huffman
parents:
44250
diff
changeset
|
2592 |
using assms(1) tendsto_norm_zero [OF assms(2)] |
10362a07eb7c
Topology_Euclidean_Space.thy: simplify some proofs
huffman
parents:
44250
diff
changeset
|
2593 |
by (rule Lim_null_comparison) |
33175 | 2594 |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2595 |
lemma lim_null_mult_right_bounded: |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2596 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_div_algebra" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2597 |
assumes f: "(f \<longlongrightarrow> 0) F" and g: "eventually (\<lambda>x. norm(g x) \<le> B) F" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2598 |
shows "((\<lambda>z. f z * g z) \<longlongrightarrow> 0) F" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2599 |
proof - |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2600 |
have *: "((\<lambda>x. norm (f x) * B) \<longlongrightarrow> 0) F" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2601 |
by (simp add: f tendsto_mult_left_zero tendsto_norm_zero) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2602 |
have "((\<lambda>x. norm (f x) * norm (g x)) \<longlongrightarrow> 0) F" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2603 |
apply (rule Lim_null_comparison [OF _ *]) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2604 |
apply (simp add: eventually_mono [OF g] mult_left_mono) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2605 |
done |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2606 |
then show ?thesis |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2607 |
by (subst tendsto_norm_zero_iff [symmetric]) (simp add: norm_mult) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2608 |
qed |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2609 |
|
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2610 |
lemma lim_null_mult_left_bounded: |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2611 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_div_algebra" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2612 |
assumes g: "eventually (\<lambda>x. norm(g x) \<le> B) F" and f: "(f \<longlongrightarrow> 0) F" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2613 |
shows "((\<lambda>z. g z * f z) \<longlongrightarrow> 0) F" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2614 |
proof - |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2615 |
have *: "((\<lambda>x. B * norm (f x)) \<longlongrightarrow> 0) F" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2616 |
by (simp add: f tendsto_mult_right_zero tendsto_norm_zero) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2617 |
have "((\<lambda>x. norm (g x) * norm (f x)) \<longlongrightarrow> 0) F" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2618 |
apply (rule Lim_null_comparison [OF _ *]) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2619 |
apply (simp add: eventually_mono [OF g] mult_right_mono) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2620 |
done |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2621 |
then show ?thesis |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2622 |
by (subst tendsto_norm_zero_iff [symmetric]) (simp add: norm_mult) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2623 |
qed |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2624 |
|
60420 | 2625 |
text\<open>Deducing things about the limit from the elements.\<close> |
33175 | 2626 |
|
2627 |
lemma Lim_in_closed_set: |
|
53255 | 2628 |
assumes "closed S" |
2629 |
and "eventually (\<lambda>x. f(x) \<in> S) net" |
|
61973 | 2630 |
and "\<not> trivial_limit net" "(f \<longlongrightarrow> l) net" |
33175 | 2631 |
shows "l \<in> S" |
2632 |
proof (rule ccontr) |
|
2633 |
assume "l \<notin> S" |
|
60420 | 2634 |
with \<open>closed S\<close> have "open (- S)" "l \<in> - S" |
33175 | 2635 |
by (simp_all add: open_Compl) |
2636 |
with assms(4) have "eventually (\<lambda>x. f x \<in> - S) net" |
|
2637 |
by (rule topological_tendstoD) |
|
2638 |
with assms(2) have "eventually (\<lambda>x. False) net" |
|
2639 |
by (rule eventually_elim2) simp |
|
2640 |
with assms(3) show "False" |
|
2641 |
by (simp add: eventually_False) |
|
2642 |
qed |
|
2643 |
||
60420 | 2644 |
text\<open>Need to prove closed(cball(x,e)) before deducing this as a corollary.\<close> |
33175 | 2645 |
|
2646 |
lemma Lim_dist_ubound: |
|
53255 | 2647 |
assumes "\<not>(trivial_limit net)" |
61973 | 2648 |
and "(f \<longlongrightarrow> l) net" |
53640 | 2649 |
and "eventually (\<lambda>x. dist a (f x) \<le> e) net" |
2650 |
shows "dist a l \<le> e" |
|
56290 | 2651 |
using assms by (fast intro: tendsto_le tendsto_intros) |
33175 | 2652 |
|
2653 |
lemma Lim_norm_ubound: |
|
2654 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
|
61973 | 2655 |
assumes "\<not>(trivial_limit net)" "(f \<longlongrightarrow> l) net" "eventually (\<lambda>x. norm(f x) \<le> e) net" |
53255 | 2656 |
shows "norm(l) \<le> e" |
56290 | 2657 |
using assms by (fast intro: tendsto_le tendsto_intros) |
33175 | 2658 |
|
2659 |
lemma Lim_norm_lbound: |
|
2660 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
|
53640 | 2661 |
assumes "\<not> trivial_limit net" |
61973 | 2662 |
and "(f \<longlongrightarrow> l) net" |
53640 | 2663 |
and "eventually (\<lambda>x. e \<le> norm (f x)) net" |
33175 | 2664 |
shows "e \<le> norm l" |
56290 | 2665 |
using assms by (fast intro: tendsto_le tendsto_intros) |
33175 | 2666 |
|
60420 | 2667 |
text\<open>Limit under bilinear function\<close> |
33175 | 2668 |
|
2669 |
lemma Lim_bilinear: |
|
61973 | 2670 |
assumes "(f \<longlongrightarrow> l) net" |
2671 |
and "(g \<longlongrightarrow> m) net" |
|
53282 | 2672 |
and "bounded_bilinear h" |
61973 | 2673 |
shows "((\<lambda>x. h (f x) (g x)) \<longlongrightarrow> (h l m)) net" |
2674 |
using \<open>bounded_bilinear h\<close> \<open>(f \<longlongrightarrow> l) net\<close> \<open>(g \<longlongrightarrow> m) net\<close> |
|
52624 | 2675 |
by (rule bounded_bilinear.tendsto) |
33175 | 2676 |
|
60420 | 2677 |
text\<open>These are special for limits out of the same vector space.\<close> |
33175 | 2678 |
|
61973 | 2679 |
lemma Lim_within_id: "(id \<longlongrightarrow> a) (at a within s)" |
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
|
2680 |
unfolding id_def by (rule tendsto_ident_at) |
33175 | 2681 |
|
61973 | 2682 |
lemma Lim_at_id: "(id \<longlongrightarrow> a) (at a)" |
45031 | 2683 |
unfolding id_def by (rule tendsto_ident_at) |
33175 | 2684 |
|
2685 |
lemma Lim_at_zero: |
|
2686 |
fixes a :: "'a::real_normed_vector" |
|
53291 | 2687 |
and l :: "'b::topological_space" |
61973 | 2688 |
shows "(f \<longlongrightarrow> l) (at a) \<longleftrightarrow> ((\<lambda>x. f(a + x)) \<longlongrightarrow> l) (at 0)" |
44252
10362a07eb7c
Topology_Euclidean_Space.thy: simplify some proofs
huffman
parents:
44250
diff
changeset
|
2689 |
using LIM_offset_zero LIM_offset_zero_cancel .. |
33175 | 2690 |
|
60420 | 2691 |
text\<open>It's also sometimes useful to extract the limit point from the filter.\<close> |
33175 | 2692 |
|
52624 | 2693 |
abbreviation netlimit :: "'a::t2_space filter \<Rightarrow> 'a" |
2694 |
where "netlimit F \<equiv> Lim F (\<lambda>x. x)" |
|
33175 | 2695 |
|
53282 | 2696 |
lemma netlimit_within: "\<not> trivial_limit (at a within S) \<Longrightarrow> netlimit (at a within S) = a" |
51365 | 2697 |
by (rule tendsto_Lim) (auto intro: tendsto_intros) |
33175 | 2698 |
|
2699 |
lemma netlimit_at: |
|
44072
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
2700 |
fixes a :: "'a::{perfect_space,t2_space}" |
33175 | 2701 |
shows "netlimit (at a) = a" |
45031 | 2702 |
using netlimit_within [of a UNIV] by simp |
33175 | 2703 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2704 |
lemma lim_within_interior: |
61973 | 2705 |
"x \<in> interior S \<Longrightarrow> (f \<longlongrightarrow> l) (at x within S) \<longleftrightarrow> (f \<longlongrightarrow> l) (at x)" |
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
|
2706 |
by (metis at_within_interior) |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2707 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2708 |
lemma netlimit_within_interior: |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2709 |
fixes x :: "'a::{t2_space,perfect_space}" |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2710 |
assumes "x \<in> interior S" |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2711 |
shows "netlimit (at x within S) = x" |
52624 | 2712 |
using assms by (metis at_within_interior netlimit_at) |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2713 |
|
61824
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
2714 |
lemma netlimit_at_vector: |
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
2715 |
fixes a :: "'a::real_normed_vector" |
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
2716 |
shows "netlimit (at a) = a" |
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
2717 |
proof (cases "\<exists>x. x \<noteq> a") |
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
2718 |
case True then obtain x where x: "x \<noteq> a" .. |
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
2719 |
have "\<not> trivial_limit (at a)" |
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
2720 |
unfolding trivial_limit_def eventually_at dist_norm |
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
2721 |
apply clarsimp |
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
2722 |
apply (rule_tac x="a + scaleR (d / 2) (sgn (x - a))" in exI) |
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
2723 |
apply (simp add: norm_sgn sgn_zero_iff x) |
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
2724 |
done |
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
2725 |
then show ?thesis |
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
2726 |
by (rule netlimit_within [of a UNIV]) |
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
2727 |
qed simp |
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
2728 |
|
33175 | 2729 |
|
60420 | 2730 |
text\<open>Useful lemmas on closure and set of possible sequential limits.\<close> |
33175 | 2731 |
|
2732 |
lemma closure_sequential: |
|
50883 | 2733 |
fixes l :: "'a::first_countable_topology" |
61973 | 2734 |
shows "l \<in> closure S \<longleftrightarrow> (\<exists>x. (\<forall>n. x n \<in> S) \<and> (x \<longlongrightarrow> l) sequentially)" |
53291 | 2735 |
(is "?lhs = ?rhs") |
33175 | 2736 |
proof |
53282 | 2737 |
assume "?lhs" |
2738 |
moreover |
|
2739 |
{ |
|
2740 |
assume "l \<in> S" |
|
2741 |
then have "?rhs" using tendsto_const[of l sequentially] by auto |
|
52624 | 2742 |
} |
2743 |
moreover |
|
53282 | 2744 |
{ |
2745 |
assume "l islimpt S" |
|
2746 |
then have "?rhs" unfolding islimpt_sequential by auto |
|
52624 | 2747 |
} |
2748 |
ultimately show "?rhs" |
|
2749 |
unfolding closure_def by auto |
|
33175 | 2750 |
next |
2751 |
assume "?rhs" |
|
53282 | 2752 |
then show "?lhs" unfolding closure_def islimpt_sequential by auto |
33175 | 2753 |
qed |
2754 |
||
2755 |
lemma closed_sequential_limits: |
|
50883 | 2756 |
fixes S :: "'a::first_countable_topology set" |
61973 | 2757 |
shows "closed S \<longleftrightarrow> (\<forall>x l. (\<forall>n. x n \<in> S) \<and> (x \<longlongrightarrow> l) sequentially \<longrightarrow> l \<in> S)" |
55775 | 2758 |
by (metis closure_sequential closure_subset_eq subset_iff) |
33175 | 2759 |
|
2760 |
lemma closure_approachable: |
|
2761 |
fixes S :: "'a::metric_space set" |
|
2762 |
shows "x \<in> closure S \<longleftrightarrow> (\<forall>e>0. \<exists>y\<in>S. dist y x < e)" |
|
2763 |
apply (auto simp add: closure_def islimpt_approachable) |
|
52624 | 2764 |
apply (metis dist_self) |
2765 |
done |
|
33175 | 2766 |
|
2767 |
lemma closed_approachable: |
|
2768 |
fixes S :: "'a::metric_space set" |
|
53291 | 2769 |
shows "closed S \<Longrightarrow> (\<forall>e>0. \<exists>y\<in>S. dist y x < e) \<longleftrightarrow> x \<in> S" |
33175 | 2770 |
by (metis closure_closed closure_approachable) |
2771 |
||
51351 | 2772 |
lemma closure_contains_Inf: |
2773 |
fixes S :: "real set" |
|
54258
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
2774 |
assumes "S \<noteq> {}" "bdd_below S" |
51351 | 2775 |
shows "Inf S \<in> closure S" |
52624 | 2776 |
proof - |
51351 | 2777 |
have *: "\<forall>x\<in>S. Inf S \<le> x" |
54258
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
2778 |
using cInf_lower[of _ S] assms by metis |
52624 | 2779 |
{ |
53282 | 2780 |
fix e :: real |
2781 |
assume "e > 0" |
|
52624 | 2782 |
then have "Inf S < Inf S + e" by simp |
2783 |
with assms obtain x where "x \<in> S" "x < Inf S + e" |
|
54258
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
2784 |
by (subst (asm) cInf_less_iff) auto |
52624 | 2785 |
with * have "\<exists>x\<in>S. dist x (Inf S) < e" |
2786 |
by (intro bexI[of _ x]) (auto simp add: dist_real_def) |
|
2787 |
} |
|
2788 |
then show ?thesis unfolding closure_approachable by auto |
|
51351 | 2789 |
qed |
2790 |
||
2791 |
lemma closed_contains_Inf: |
|
2792 |
fixes S :: "real set" |
|
54258
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
2793 |
shows "S \<noteq> {} \<Longrightarrow> bdd_below S \<Longrightarrow> closed S \<Longrightarrow> Inf S \<in> S" |
51351 | 2794 |
by (metis closure_contains_Inf closure_closed assms) |
2795 |
||
62083 | 2796 |
lemma closed_subset_contains_Inf: |
2797 |
fixes A C :: "real set" |
|
2798 |
shows "closed C \<Longrightarrow> A \<subseteq> C \<Longrightarrow> A \<noteq> {} \<Longrightarrow> bdd_below A \<Longrightarrow> Inf A \<in> C" |
|
2799 |
by (metis closure_contains_Inf closure_minimal subset_eq) |
|
2800 |
||
2801 |
lemma atLeastAtMost_subset_contains_Inf: |
|
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
2802 |
fixes A :: "real set" and a b :: real |
62083 | 2803 |
shows "A \<noteq> {} \<Longrightarrow> a \<le> b \<Longrightarrow> A \<subseteq> {a..b} \<Longrightarrow> Inf A \<in> {a..b}" |
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
2804 |
by (rule closed_subset_contains_Inf) |
62083 | 2805 |
(auto intro: closed_real_atLeastAtMost intro!: bdd_belowI[of A a]) |
2806 |
||
51351 | 2807 |
lemma not_trivial_limit_within_ball: |
53640 | 2808 |
"\<not> trivial_limit (at x within S) \<longleftrightarrow> (\<forall>e>0. S \<inter> ball x e - {x} \<noteq> {})" |
60462 | 2809 |
(is "?lhs \<longleftrightarrow> ?rhs") |
2810 |
proof |
|
2811 |
show ?rhs if ?lhs |
|
2812 |
proof - |
|
53282 | 2813 |
{ |
2814 |
fix e :: real |
|
2815 |
assume "e > 0" |
|
53640 | 2816 |
then obtain y where "y \<in> S - {x}" and "dist y x < e" |
60420 | 2817 |
using \<open>?lhs\<close> not_trivial_limit_within[of x S] closure_approachable[of x "S - {x}"] |
51351 | 2818 |
by auto |
53640 | 2819 |
then have "y \<in> S \<inter> ball x e - {x}" |
51351 | 2820 |
unfolding ball_def by (simp add: dist_commute) |
53640 | 2821 |
then have "S \<inter> ball x e - {x} \<noteq> {}" by blast |
52624 | 2822 |
} |
60462 | 2823 |
then show ?thesis by auto |
2824 |
qed |
|
2825 |
show ?lhs if ?rhs |
|
2826 |
proof - |
|
53282 | 2827 |
{ |
2828 |
fix e :: real |
|
2829 |
assume "e > 0" |
|
53640 | 2830 |
then obtain y where "y \<in> S \<inter> ball x e - {x}" |
60420 | 2831 |
using \<open>?rhs\<close> by blast |
53640 | 2832 |
then have "y \<in> S - {x}" and "dist y x < e" |
2833 |
unfolding ball_def by (simp_all add: dist_commute) |
|
2834 |
then have "\<exists>y \<in> S - {x}. dist y x < e" |
|
53282 | 2835 |
by auto |
51351 | 2836 |
} |
60462 | 2837 |
then show ?thesis |
53282 | 2838 |
using not_trivial_limit_within[of x S] closure_approachable[of x "S - {x}"] |
2839 |
by auto |
|
60462 | 2840 |
qed |
51351 | 2841 |
qed |
2842 |
||
52624 | 2843 |
|
60420 | 2844 |
subsection \<open>Infimum Distance\<close> |
50087 | 2845 |
|
54260
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
2846 |
definition "infdist x A = (if A = {} then 0 else INF a:A. dist x a)" |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
2847 |
|
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
2848 |
lemma bdd_below_infdist[intro, simp]: "bdd_below (dist x`A)" |
54258
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
2849 |
by (auto intro!: zero_le_dist) |
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
2850 |
|
54260
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
2851 |
lemma infdist_notempty: "A \<noteq> {} \<Longrightarrow> infdist x A = (INF a:A. dist x a)" |
50087 | 2852 |
by (simp add: infdist_def) |
2853 |
||
52624 | 2854 |
lemma infdist_nonneg: "0 \<le> infdist x A" |
54260
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
2855 |
by (auto simp add: infdist_def intro: cINF_greatest) |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
2856 |
|
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
2857 |
lemma infdist_le: "a \<in> A \<Longrightarrow> infdist x A \<le> dist x a" |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
2858 |
by (auto intro: cINF_lower simp add: infdist_def) |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
2859 |
|
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
2860 |
lemma infdist_le2: "a \<in> A \<Longrightarrow> dist x a \<le> d \<Longrightarrow> infdist x A \<le> d" |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
2861 |
by (auto intro!: cINF_lower2 simp add: infdist_def) |
54258
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
2862 |
|
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
2863 |
lemma infdist_zero[simp]: "a \<in> A \<Longrightarrow> infdist a A = 0" |
54260
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
2864 |
by (auto intro!: antisym infdist_nonneg infdist_le2) |
50087 | 2865 |
|
52624 | 2866 |
lemma infdist_triangle: "infdist x A \<le> infdist y A + dist x y" |
53640 | 2867 |
proof (cases "A = {}") |
2868 |
case True |
|
53282 | 2869 |
then show ?thesis by (simp add: infdist_def) |
50087 | 2870 |
next |
53640 | 2871 |
case False |
52624 | 2872 |
then obtain a where "a \<in> A" by auto |
50087 | 2873 |
have "infdist x A \<le> Inf {dist x y + dist y a |a. a \<in> A}" |
51475
ebf9d4fd00ba
introduct the conditional_complete_lattice type class; generalize theorems about real Sup and Inf to it
hoelzl
parents:
51473
diff
changeset
|
2874 |
proof (rule cInf_greatest) |
60420 | 2875 |
from \<open>A \<noteq> {}\<close> show "{dist x y + dist y a |a. a \<in> A} \<noteq> {}" |
53282 | 2876 |
by simp |
2877 |
fix d |
|
2878 |
assume "d \<in> {dist x y + dist y a |a. a \<in> A}" |
|
2879 |
then obtain a where d: "d = dist x y + dist y a" "a \<in> A" |
|
2880 |
by auto |
|
50087 | 2881 |
show "infdist x A \<le> d" |
60420 | 2882 |
unfolding infdist_notempty[OF \<open>A \<noteq> {}\<close>] |
54260
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
2883 |
proof (rule cINF_lower2) |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
2884 |
show "a \<in> A" by fact |
53282 | 2885 |
show "dist x a \<le> d" |
2886 |
unfolding d by (rule dist_triangle) |
|
54258
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
2887 |
qed simp |
50087 | 2888 |
qed |
2889 |
also have "\<dots> = dist x y + infdist y A" |
|
51475
ebf9d4fd00ba
introduct the conditional_complete_lattice type class; generalize theorems about real Sup and Inf to it
hoelzl
parents:
51473
diff
changeset
|
2890 |
proof (rule cInf_eq, safe) |
53282 | 2891 |
fix a |
2892 |
assume "a \<in> A" |
|
2893 |
then show "dist x y + infdist y A \<le> dist x y + dist y a" |
|
2894 |
by (auto intro: infdist_le) |
|
50087 | 2895 |
next |
53282 | 2896 |
fix i |
2897 |
assume inf: "\<And>d. d \<in> {dist x y + dist y a |a. a \<in> A} \<Longrightarrow> i \<le> d" |
|
2898 |
then have "i - dist x y \<le> infdist y A" |
|
60420 | 2899 |
unfolding infdist_notempty[OF \<open>A \<noteq> {}\<close>] using \<open>a \<in> A\<close> |
54260
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
2900 |
by (intro cINF_greatest) (auto simp: field_simps) |
53282 | 2901 |
then show "i \<le> dist x y + infdist y A" |
2902 |
by simp |
|
50087 | 2903 |
qed |
2904 |
finally show ?thesis by simp |
|
2905 |
qed |
|
2906 |
||
51475
ebf9d4fd00ba
introduct the conditional_complete_lattice type class; generalize theorems about real Sup and Inf to it
hoelzl
parents:
51473
diff
changeset
|
2907 |
lemma in_closure_iff_infdist_zero: |
50087 | 2908 |
assumes "A \<noteq> {}" |
2909 |
shows "x \<in> closure A \<longleftrightarrow> infdist x A = 0" |
|
2910 |
proof |
|
2911 |
assume "x \<in> closure A" |
|
2912 |
show "infdist x A = 0" |
|
2913 |
proof (rule ccontr) |
|
2914 |
assume "infdist x A \<noteq> 0" |
|
53282 | 2915 |
with infdist_nonneg[of x A] have "infdist x A > 0" |
2916 |
by auto |
|
2917 |
then have "ball x (infdist x A) \<inter> closure A = {}" |
|
52624 | 2918 |
apply auto |
60420 | 2919 |
apply (metis \<open>x \<in> closure A\<close> closure_approachable dist_commute infdist_le not_less) |
52624 | 2920 |
done |
53282 | 2921 |
then have "x \<notin> closure A" |
60420 | 2922 |
by (metis \<open>0 < infdist x A\<close> centre_in_ball disjoint_iff_not_equal) |
2923 |
then show False using \<open>x \<in> closure A\<close> by simp |
|
50087 | 2924 |
qed |
2925 |
next |
|
2926 |
assume x: "infdist x A = 0" |
|
53282 | 2927 |
then obtain a where "a \<in> A" |
2928 |
by atomize_elim (metis all_not_in_conv assms) |
|
2929 |
show "x \<in> closure A" |
|
2930 |
unfolding closure_approachable |
|
2931 |
apply safe |
|
2932 |
proof (rule ccontr) |
|
2933 |
fix e :: real |
|
2934 |
assume "e > 0" |
|
50087 | 2935 |
assume "\<not> (\<exists>y\<in>A. dist y x < e)" |
60420 | 2936 |
then have "infdist x A \<ge> e" using \<open>a \<in> A\<close> |
50087 | 2937 |
unfolding infdist_def |
54260
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
2938 |
by (force simp: dist_commute intro: cINF_greatest) |
60420 | 2939 |
with x \<open>e > 0\<close> show False by auto |
50087 | 2940 |
qed |
2941 |
qed |
|
2942 |
||
51475
ebf9d4fd00ba
introduct the conditional_complete_lattice type class; generalize theorems about real Sup and Inf to it
hoelzl
parents:
51473
diff
changeset
|
2943 |
lemma in_closed_iff_infdist_zero: |
50087 | 2944 |
assumes "closed A" "A \<noteq> {}" |
2945 |
shows "x \<in> A \<longleftrightarrow> infdist x A = 0" |
|
2946 |
proof - |
|
2947 |
have "x \<in> closure A \<longleftrightarrow> infdist x A = 0" |
|
2948 |
by (rule in_closure_iff_infdist_zero) fact |
|
2949 |
with assms show ?thesis by simp |
|
2950 |
qed |
|
2951 |
||
2952 |
lemma tendsto_infdist [tendsto_intros]: |
|
61973 | 2953 |
assumes f: "(f \<longlongrightarrow> l) F" |
2954 |
shows "((\<lambda>x. infdist (f x) A) \<longlongrightarrow> infdist l A) F" |
|
50087 | 2955 |
proof (rule tendstoI) |
53282 | 2956 |
fix e ::real |
2957 |
assume "e > 0" |
|
50087 | 2958 |
from tendstoD[OF f this] |
2959 |
show "eventually (\<lambda>x. dist (infdist (f x) A) (infdist l A) < e) F" |
|
2960 |
proof (eventually_elim) |
|
2961 |
fix x |
|
2962 |
from infdist_triangle[of l A "f x"] infdist_triangle[of "f x" A l] |
|
2963 |
have "dist (infdist (f x) A) (infdist l A) \<le> dist (f x) l" |
|
2964 |
by (simp add: dist_commute dist_real_def) |
|
2965 |
also assume "dist (f x) l < e" |
|
2966 |
finally show "dist (infdist (f x) A) (infdist l A) < e" . |
|
2967 |
qed |
|
2968 |
qed |
|
2969 |
||
60420 | 2970 |
text\<open>Some other lemmas about sequences.\<close> |
33175 | 2971 |
|
53597 | 2972 |
lemma sequentially_offset: (* TODO: move to Topological_Spaces.thy *) |
36441 | 2973 |
assumes "eventually (\<lambda>i. P i) sequentially" |
2974 |
shows "eventually (\<lambda>i. P (i + k)) sequentially" |
|
53597 | 2975 |
using assms by (rule eventually_sequentially_seg [THEN iffD2]) |
2976 |
||
2977 |
lemma seq_offset_neg: (* TODO: move to Topological_Spaces.thy *) |
|
61973 | 2978 |
"(f \<longlongrightarrow> l) sequentially \<Longrightarrow> ((\<lambda>i. f(i - k)) \<longlongrightarrow> l) sequentially" |
53597 | 2979 |
apply (erule filterlim_compose) |
2980 |
apply (simp add: filterlim_def le_sequentially eventually_filtermap eventually_sequentially) |
|
52624 | 2981 |
apply arith |
2982 |
done |
|
33175 | 2983 |
|
61973 | 2984 |
lemma seq_harmonic: "((\<lambda>n. inverse (real n)) \<longlongrightarrow> 0) sequentially" |
53597 | 2985 |
using LIMSEQ_inverse_real_of_nat by (rule LIMSEQ_imp_Suc) (* TODO: move to Limits.thy *) |
33175 | 2986 |
|
60420 | 2987 |
subsection \<open>More properties of closed balls\<close> |
33175 | 2988 |
|
61204 | 2989 |
lemma closed_cball [iff]: "closed (cball x e)" |
54070 | 2990 |
proof - |
2991 |
have "closed (dist x -` {..e})" |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
2992 |
by (intro closed_vimage closed_atMost continuous_intros) |
54070 | 2993 |
also have "dist x -` {..e} = cball x e" |
2994 |
by auto |
|
2995 |
finally show ?thesis . |
|
2996 |
qed |
|
33175 | 2997 |
|
2998 |
lemma open_contains_cball: "open S \<longleftrightarrow> (\<forall>x\<in>S. \<exists>e>0. cball x e \<subseteq> S)" |
|
52624 | 2999 |
proof - |
3000 |
{ |
|
3001 |
fix x and e::real |
|
3002 |
assume "x\<in>S" "e>0" "ball x e \<subseteq> S" |
|
53282 | 3003 |
then have "\<exists>d>0. cball x d \<subseteq> S" unfolding subset_eq by (rule_tac x="e/2" in exI, auto) |
52624 | 3004 |
} |
3005 |
moreover |
|
3006 |
{ |
|
3007 |
fix x and e::real |
|
3008 |
assume "x\<in>S" "e>0" "cball x e \<subseteq> S" |
|
53282 | 3009 |
then have "\<exists>d>0. ball x d \<subseteq> S" |
52624 | 3010 |
unfolding subset_eq |
3011 |
apply(rule_tac x="e/2" in exI) |
|
3012 |
apply auto |
|
3013 |
done |
|
3014 |
} |
|
3015 |
ultimately show ?thesis |
|
3016 |
unfolding open_contains_ball by auto |
|
33175 | 3017 |
qed |
3018 |
||
53291 | 3019 |
lemma open_contains_cball_eq: "open S \<Longrightarrow> (\<forall>x. x \<in> S \<longleftrightarrow> (\<exists>e>0. cball x e \<subseteq> S))" |
44170
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
3020 |
by (metis open_contains_cball subset_eq order_less_imp_le centre_in_cball) |
33175 | 3021 |
|
3022 |
lemma mem_interior_cball: "x \<in> interior S \<longleftrightarrow> (\<exists>e>0. cball x e \<subseteq> S)" |
|
3023 |
apply (simp add: interior_def, safe) |
|
3024 |
apply (force simp add: open_contains_cball) |
|
3025 |
apply (rule_tac x="ball x e" in exI) |
|
36362
06475a1547cb
fix lots of looping simp calls and other warnings
huffman
parents:
36360
diff
changeset
|
3026 |
apply (simp add: subset_trans [OF ball_subset_cball]) |
33175 | 3027 |
done |
3028 |
||
3029 |
lemma islimpt_ball: |
|
3030 |
fixes x y :: "'a::{real_normed_vector,perfect_space}" |
|
53291 | 3031 |
shows "y islimpt ball x e \<longleftrightarrow> 0 < e \<and> y \<in> cball x e" |
60462 | 3032 |
(is "?lhs \<longleftrightarrow> ?rhs") |
33175 | 3033 |
proof |
60462 | 3034 |
show ?rhs if ?lhs |
3035 |
proof |
|
3036 |
{ |
|
3037 |
assume "e \<le> 0" |
|
3038 |
then have *: "ball x e = {}" |
|
3039 |
using ball_eq_empty[of x e] by auto |
|
3040 |
have False using \<open>?lhs\<close> |
|
3041 |
unfolding * using islimpt_EMPTY[of y] by auto |
|
3042 |
} |
|
3043 |
then show "e > 0" by (metis not_less) |
|
3044 |
show "y \<in> cball x e" |
|
3045 |
using closed_cball[of x e] islimpt_subset[of y "ball x e" "cball x e"] |
|
3046 |
ball_subset_cball[of x e] \<open>?lhs\<close> |
|
3047 |
unfolding closed_limpt by auto |
|
3048 |
qed |
|
3049 |
show ?lhs if ?rhs |
|
3050 |
proof - |
|
3051 |
from that have "e > 0" by auto |
|
3052 |
{ |
|
3053 |
fix d :: real |
|
3054 |
assume "d > 0" |
|
3055 |
have "\<exists>x'\<in>ball x e. x' \<noteq> y \<and> dist x' y < d" |
|
3056 |
proof (cases "d \<le> dist x y") |
|
53282 | 3057 |
case True |
3058 |
then show "\<exists>x'\<in>ball x e. x' \<noteq> y \<and> dist x' y < d" |
|
60462 | 3059 |
proof (cases "x = y") |
3060 |
case True |
|
3061 |
then have False |
|
3062 |
using \<open>d \<le> dist x y\<close> \<open>d>0\<close> by auto |
|
3063 |
then show "\<exists>x'\<in>ball x e. x' \<noteq> y \<and> dist x' y < d" |
|
3064 |
by auto |
|
3065 |
next |
|
3066 |
case False |
|
3067 |
have "dist x (y - (d / (2 * dist y x)) *\<^sub>R (y - x)) = |
|
3068 |
norm (x - y + (d / (2 * norm (y - x))) *\<^sub>R (y - x))" |
|
3069 |
unfolding mem_cball mem_ball dist_norm diff_diff_eq2 diff_add_eq[symmetric] |
|
3070 |
by auto |
|
3071 |
also have "\<dots> = \<bar>- 1 + d / (2 * norm (x - y))\<bar> * norm (x - y)" |
|
3072 |
using scaleR_left_distrib[of "- 1" "d / (2 * norm (y - x))", symmetric, of "y - x"] |
|
3073 |
unfolding scaleR_minus_left scaleR_one |
|
3074 |
by (auto simp add: norm_minus_commute) |
|
3075 |
also have "\<dots> = \<bar>- norm (x - y) + d / 2\<bar>" |
|
3076 |
unfolding abs_mult_pos[of "norm (x - y)", OF norm_ge_zero[of "x - y"]] |
|
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
3077 |
unfolding distrib_right using \<open>x\<noteq>y\<close> by auto |
60462 | 3078 |
also have "\<dots> \<le> e - d/2" using \<open>d \<le> dist x y\<close> and \<open>d>0\<close> and \<open>?rhs\<close> |
3079 |
by (auto simp add: dist_norm) |
|
3080 |
finally have "y - (d / (2 * dist y x)) *\<^sub>R (y - x) \<in> ball x e" using \<open>d>0\<close> |
|
3081 |
by auto |
|
3082 |
moreover |
|
3083 |
have "(d / (2*dist y x)) *\<^sub>R (y - x) \<noteq> 0" |
|
3084 |
using \<open>x\<noteq>y\<close>[unfolded dist_nz] \<open>d>0\<close> unfolding scaleR_eq_0_iff |
|
3085 |
by (auto simp add: dist_commute) |
|
3086 |
moreover |
|
3087 |
have "dist (y - (d / (2 * dist y x)) *\<^sub>R (y - x)) y < d" |
|
3088 |
unfolding dist_norm |
|
3089 |
apply simp |
|
3090 |
unfolding norm_minus_cancel |
|
3091 |
using \<open>d > 0\<close> \<open>x\<noteq>y\<close>[unfolded dist_nz] dist_commute[of x y] |
|
3092 |
unfolding dist_norm |
|
3093 |
apply auto |
|
3094 |
done |
|
3095 |
ultimately show "\<exists>x'\<in>ball x e. x' \<noteq> y \<and> dist x' y < d" |
|
3096 |
apply (rule_tac x = "y - (d / (2*dist y x)) *\<^sub>R (y - x)" in bexI) |
|
3097 |
apply auto |
|
3098 |
done |
|
3099 |
qed |
|
33175 | 3100 |
next |
3101 |
case False |
|
60462 | 3102 |
then have "d > dist x y" by auto |
3103 |
show "\<exists>x' \<in> ball x e. x' \<noteq> y \<and> dist x' y < d" |
|
3104 |
proof (cases "x = y") |
|
3105 |
case True |
|
3106 |
obtain z where **: "z \<noteq> y" "dist z y < min e d" |
|
3107 |
using perfect_choose_dist[of "min e d" y] |
|
3108 |
using \<open>d > 0\<close> \<open>e>0\<close> by auto |
|
3109 |
show "\<exists>x'\<in>ball x e. x' \<noteq> y \<and> dist x' y < d" |
|
3110 |
unfolding \<open>x = y\<close> |
|
3111 |
using \<open>z \<noteq> y\<close> ** |
|
3112 |
apply (rule_tac x=z in bexI) |
|
3113 |
apply (auto simp add: dist_commute) |
|
3114 |
done |
|
3115 |
next |
|
3116 |
case False |
|
3117 |
then show "\<exists>x'\<in>ball x e. x' \<noteq> y \<and> dist x' y < d" |
|
3118 |
using \<open>d>0\<close> \<open>d > dist x y\<close> \<open>?rhs\<close> |
|
3119 |
apply (rule_tac x=x in bexI) |
|
3120 |
apply auto |
|
3121 |
done |
|
3122 |
qed |
|
33175 | 3123 |
qed |
60462 | 3124 |
} |
3125 |
then show ?thesis |
|
3126 |
unfolding mem_cball islimpt_approachable mem_ball by auto |
|
3127 |
qed |
|
33175 | 3128 |
qed |
3129 |
||
3130 |
lemma closure_ball_lemma: |
|
3131 |
fixes x y :: "'a::real_normed_vector" |
|
53282 | 3132 |
assumes "x \<noteq> y" |
3133 |
shows "y islimpt ball x (dist x y)" |
|
33175 | 3134 |
proof (rule islimptI) |
53282 | 3135 |
fix T |
3136 |
assume "y \<in> T" "open T" |
|
33175 | 3137 |
then obtain r where "0 < r" "\<forall>z. dist z y < r \<longrightarrow> z \<in> T" |
3138 |
unfolding open_dist by fast |
|
3139 |
(* choose point between x and y, within distance r of y. *) |
|
63040 | 3140 |
define k where "k = min 1 (r / (2 * dist x y))" |
3141 |
define z where "z = y + scaleR k (x - y)" |
|
33175 | 3142 |
have z_def2: "z = x + scaleR (1 - k) (y - x)" |
3143 |
unfolding z_def by (simp add: algebra_simps) |
|
3144 |
have "dist z y < r" |
|
60420 | 3145 |
unfolding z_def k_def using \<open>0 < r\<close> |
33175 | 3146 |
by (simp add: dist_norm min_def) |
53282 | 3147 |
then have "z \<in> T" |
60420 | 3148 |
using \<open>\<forall>z. dist z y < r \<longrightarrow> z \<in> T\<close> by simp |
33175 | 3149 |
have "dist x z < dist x y" |
3150 |
unfolding z_def2 dist_norm |
|
3151 |
apply (simp add: norm_minus_commute) |
|
3152 |
apply (simp only: dist_norm [symmetric]) |
|
3153 |
apply (subgoal_tac "\<bar>1 - k\<bar> * dist x y < 1 * dist x y", simp) |
|
3154 |
apply (rule mult_strict_right_mono) |
|
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
3155 |
apply (simp add: k_def \<open>0 < r\<close> \<open>x \<noteq> y\<close>) |
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
3156 |
apply (simp add: \<open>x \<noteq> y\<close>) |
33175 | 3157 |
done |
53282 | 3158 |
then have "z \<in> ball x (dist x y)" |
3159 |
by simp |
|
33175 | 3160 |
have "z \<noteq> y" |
60420 | 3161 |
unfolding z_def k_def using \<open>x \<noteq> y\<close> \<open>0 < r\<close> |
33175 | 3162 |
by (simp add: min_def) |
3163 |
show "\<exists>z\<in>ball x (dist x y). z \<in> T \<and> z \<noteq> y" |
|
60420 | 3164 |
using \<open>z \<in> ball x (dist x y)\<close> \<open>z \<in> T\<close> \<open>z \<noteq> y\<close> |
33175 | 3165 |
by fast |
3166 |
qed |
|
3167 |
||
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3168 |
lemma closure_ball [simp]: |
33175 | 3169 |
fixes x :: "'a::real_normed_vector" |
3170 |
shows "0 < e \<Longrightarrow> closure (ball x e) = cball x e" |
|
52624 | 3171 |
apply (rule equalityI) |
3172 |
apply (rule closure_minimal) |
|
3173 |
apply (rule ball_subset_cball) |
|
3174 |
apply (rule closed_cball) |
|
3175 |
apply (rule subsetI, rename_tac y) |
|
3176 |
apply (simp add: le_less [where 'a=real]) |
|
3177 |
apply (erule disjE) |
|
3178 |
apply (rule subsetD [OF closure_subset], simp) |
|
3179 |
apply (simp add: closure_def) |
|
3180 |
apply clarify |
|
3181 |
apply (rule closure_ball_lemma) |
|
3182 |
apply (simp add: zero_less_dist_iff) |
|
3183 |
done |
|
33175 | 3184 |
|
3185 |
(* In a trivial vector space, this fails for e = 0. *) |
|
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3186 |
lemma interior_cball [simp]: |
33175 | 3187 |
fixes x :: "'a::{real_normed_vector, perfect_space}" |
3188 |
shows "interior (cball x e) = ball x e" |
|
53640 | 3189 |
proof (cases "e \<ge> 0") |
33175 | 3190 |
case False note cs = this |
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
3191 |
from cs have null: "ball x e = {}" |
53282 | 3192 |
using ball_empty[of e x] by auto |
3193 |
moreover |
|
3194 |
{ |
|
3195 |
fix y |
|
3196 |
assume "y \<in> cball x e" |
|
3197 |
then have False |
|
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
3198 |
by (metis ball_eq_empty null cs dist_eq_0_iff dist_le_zero_iff empty_subsetI mem_cball subset_antisym subset_ball) |
53282 | 3199 |
} |
3200 |
then have "cball x e = {}" by auto |
|
3201 |
then have "interior (cball x e) = {}" |
|
3202 |
using interior_empty by auto |
|
33175 | 3203 |
ultimately show ?thesis by blast |
3204 |
next |
|
3205 |
case True note cs = this |
|
53282 | 3206 |
have "ball x e \<subseteq> cball x e" |
3207 |
using ball_subset_cball by auto |
|
3208 |
moreover |
|
3209 |
{ |
|
3210 |
fix S y |
|
3211 |
assume as: "S \<subseteq> cball x e" "open S" "y\<in>S" |
|
3212 |
then obtain d where "d>0" and d: "\<forall>x'. dist x' y < d \<longrightarrow> x' \<in> S" |
|
3213 |
unfolding open_dist by blast |
|
33175 | 3214 |
then obtain xa where xa_y: "xa \<noteq> y" and xa: "dist xa y < d" |
3215 |
using perfect_choose_dist [of d] by auto |
|
53282 | 3216 |
have "xa \<in> S" |
3217 |
using d[THEN spec[where x = xa]] |
|
3218 |
using xa by (auto simp add: dist_commute) |
|
3219 |
then have xa_cball: "xa \<in> cball x e" |
|
3220 |
using as(1) by auto |
|
3221 |
then have "y \<in> ball x e" |
|
3222 |
proof (cases "x = y") |
|
33175 | 3223 |
case True |
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
3224 |
then have "e > 0" using cs order.order_iff_strict xa_cball xa_y by fastforce |
53282 | 3225 |
then show "y \<in> ball x e" |
60420 | 3226 |
using \<open>x = y \<close> by simp |
33175 | 3227 |
next |
3228 |
case False |
|
53282 | 3229 |
have "dist (y + (d / 2 / dist y x) *\<^sub>R (y - x)) y < d" |
3230 |
unfolding dist_norm |
|
60420 | 3231 |
using \<open>d>0\<close> norm_ge_zero[of "y - x"] \<open>x \<noteq> y\<close> by auto |
53282 | 3232 |
then have *: "y + (d / 2 / dist y x) *\<^sub>R (y - x) \<in> cball x e" |
52624 | 3233 |
using d as(1)[unfolded subset_eq] by blast |
60420 | 3234 |
have "y - x \<noteq> 0" using \<open>x \<noteq> y\<close> by auto |
56541 | 3235 |
hence **:"d / (2 * norm (y - x)) > 0" |
60420 | 3236 |
unfolding zero_less_norm_iff[symmetric] using \<open>d>0\<close> by auto |
53282 | 3237 |
have "dist (y + (d / 2 / dist y x) *\<^sub>R (y - x)) x = |
3238 |
norm (y + (d / (2 * norm (y - x))) *\<^sub>R y - (d / (2 * norm (y - x))) *\<^sub>R x - x)" |
|
33175 | 3239 |
by (auto simp add: dist_norm algebra_simps) |
3240 |
also have "\<dots> = norm ((1 + d / (2 * norm (y - x))) *\<^sub>R (y - x))" |
|
3241 |
by (auto simp add: algebra_simps) |
|
3242 |
also have "\<dots> = \<bar>1 + d / (2 * norm (y - x))\<bar> * norm (y - x)" |
|
3243 |
using ** by auto |
|
53282 | 3244 |
also have "\<dots> = (dist y x) + d/2" |
3245 |
using ** by (auto simp add: distrib_right dist_norm) |
|
3246 |
finally have "e \<ge> dist x y +d/2" |
|
3247 |
using *[unfolded mem_cball] by (auto simp add: dist_commute) |
|
3248 |
then show "y \<in> ball x e" |
|
60420 | 3249 |
unfolding mem_ball using \<open>d>0\<close> by auto |
52624 | 3250 |
qed |
3251 |
} |
|
53282 | 3252 |
then have "\<forall>S \<subseteq> cball x e. open S \<longrightarrow> S \<subseteq> ball x e" |
3253 |
by auto |
|
52624 | 3254 |
ultimately show ?thesis |
53640 | 3255 |
using interior_unique[of "ball x e" "cball x e"] |
3256 |
using open_ball[of x e] |
|
3257 |
by auto |
|
33175 | 3258 |
qed |
3259 |
||
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3260 |
lemma interior_ball [simp]: "interior (ball x e) = ball x e" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3261 |
by (simp add: interior_open) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3262 |
|
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3263 |
lemma frontier_ball [simp]: |
33175 | 3264 |
fixes a :: "'a::real_normed_vector" |
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3265 |
shows "0 < e \<Longrightarrow> frontier (ball a e) = sphere a e" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3266 |
by (force simp: frontier_def) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3267 |
|
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3268 |
lemma frontier_cball [simp]: |
33175 | 3269 |
fixes a :: "'a::{real_normed_vector, perfect_space}" |
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3270 |
shows "frontier (cball a e) = sphere a e" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3271 |
by (force simp: frontier_def) |
33175 | 3272 |
|
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3273 |
lemma cball_eq_empty [simp]: "cball x e = {} \<longleftrightarrow> e < 0" |
39302
d7728f65b353
renamed lemmas: ext_iff -> fun_eq_iff, set_ext_iff -> set_eq_iff, set_ext -> set_eqI
nipkow
parents:
39198
diff
changeset
|
3274 |
apply (simp add: set_eq_iff not_le) |
52624 | 3275 |
apply (metis zero_le_dist dist_self order_less_le_trans) |
3276 |
done |
|
3277 |
||
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3278 |
lemma cball_empty [simp]: "e < 0 \<Longrightarrow> cball x e = {}" |
52624 | 3279 |
by (simp add: cball_eq_empty) |
33175 | 3280 |
|
3281 |
lemma cball_eq_sing: |
|
44072
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
3282 |
fixes x :: "'a::{metric_space,perfect_space}" |
53640 | 3283 |
shows "cball x e = {x} \<longleftrightarrow> e = 0" |
33175 | 3284 |
proof (rule linorder_cases) |
3285 |
assume e: "0 < e" |
|
3286 |
obtain a where "a \<noteq> x" "dist a x < e" |
|
3287 |
using perfect_choose_dist [OF e] by auto |
|
53282 | 3288 |
then have "a \<noteq> x" "dist x a \<le> e" |
3289 |
by (auto simp add: dist_commute) |
|
39302
d7728f65b353
renamed lemmas: ext_iff -> fun_eq_iff, set_ext_iff -> set_eq_iff, set_ext -> set_eqI
nipkow
parents:
39198
diff
changeset
|
3290 |
with e show ?thesis by (auto simp add: set_eq_iff) |
33175 | 3291 |
qed auto |
3292 |
||
3293 |
lemma cball_sing: |
|
3294 |
fixes x :: "'a::metric_space" |
|
53291 | 3295 |
shows "e = 0 \<Longrightarrow> cball x e = {x}" |
39302
d7728f65b353
renamed lemmas: ext_iff -> fun_eq_iff, set_ext_iff -> set_eq_iff, set_ext -> set_eqI
nipkow
parents:
39198
diff
changeset
|
3296 |
by (auto simp add: set_eq_iff) |
33175 | 3297 |
|
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3298 |
lemma ball_divide_subset: "d \<ge> 1 \<Longrightarrow> ball x (e/d) \<subseteq> ball x e" |
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3299 |
apply (cases "e \<le> 0") |
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3300 |
apply (simp add: ball_empty divide_simps) |
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3301 |
apply (rule subset_ball) |
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3302 |
apply (simp add: divide_simps) |
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3303 |
done |
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3304 |
|
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3305 |
lemma ball_divide_subset_numeral: "ball x (e / numeral w) \<subseteq> ball x e" |
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3306 |
using ball_divide_subset one_le_numeral by blast |
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3307 |
|
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3308 |
lemma cball_divide_subset: "d \<ge> 1 \<Longrightarrow> cball x (e/d) \<subseteq> cball x e" |
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3309 |
apply (cases "e < 0") |
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3310 |
apply (simp add: divide_simps) |
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3311 |
apply (rule subset_cball) |
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3312 |
apply (metis divide_1 frac_le not_le order_refl zero_less_one) |
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3313 |
done |
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3314 |
|
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3315 |
lemma cball_divide_subset_numeral: "cball x (e / numeral w) \<subseteq> cball x e" |
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3316 |
using cball_divide_subset one_le_numeral by blast |
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3317 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
3318 |
|
60420 | 3319 |
subsection \<open>Boundedness\<close> |
33175 | 3320 |
|
3321 |
(* FIXME: This has to be unified with BSEQ!! *) |
|
52624 | 3322 |
definition (in metric_space) bounded :: "'a set \<Rightarrow> bool" |
3323 |
where "bounded S \<longleftrightarrow> (\<exists>x e. \<forall>y\<in>S. dist x y \<le> e)" |
|
33175 | 3324 |
|
61426
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
3325 |
lemma bounded_subset_cball: "bounded S \<longleftrightarrow> (\<exists>e x. S \<subseteq> cball x e \<and> 0 \<le> e)" |
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
3326 |
unfolding bounded_def subset_eq by auto (meson order_trans zero_le_dist) |
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
3327 |
|
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
3328 |
lemma bounded_subset_ballD: |
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
3329 |
assumes "bounded S" shows "\<exists>r. 0 < r \<and> S \<subseteq> ball x r" |
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
3330 |
proof - |
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
3331 |
obtain e::real and y where "S \<subseteq> cball y e" "0 \<le> e" |
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
3332 |
using assms by (auto simp: bounded_subset_cball) |
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
3333 |
then show ?thesis |
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
3334 |
apply (rule_tac x="dist x y + e + 1" in exI) |
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
3335 |
apply (simp add: add.commute add_pos_nonneg) |
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
3336 |
apply (erule subset_trans) |
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
3337 |
apply (clarsimp simp add: cball_def) |
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
3338 |
by (metis add_le_cancel_right add_strict_increasing dist_commute dist_triangle_le zero_less_one) |
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
3339 |
qed |
50998 | 3340 |
|
33175 | 3341 |
lemma bounded_any_center: "bounded S \<longleftrightarrow> (\<exists>e. \<forall>y\<in>S. dist a y \<le> e)" |
52624 | 3342 |
unfolding bounded_def |
57512
cc97b347b301
reduced name variants for assoc and commute on plus and mult
haftmann
parents:
57448
diff
changeset
|
3343 |
by auto (metis add.commute add_le_cancel_right dist_commute dist_triangle_le) |
33175 | 3344 |
|
3345 |
lemma bounded_iff: "bounded S \<longleftrightarrow> (\<exists>a. \<forall>x\<in>S. norm x \<le> a)" |
|
52624 | 3346 |
unfolding bounded_any_center [where a=0] |
3347 |
by (simp add: dist_norm) |
|
33175 | 3348 |
|
61552
980dd46a03fb
Added binomial identities to CONTRIBUTORS; small lemmas on of_int/pochhammer
eberlm
parents:
61531
diff
changeset
|
3349 |
lemma bdd_above_norm: "bdd_above (norm ` X) \<longleftrightarrow> bounded X" |
980dd46a03fb
Added binomial identities to CONTRIBUTORS; small lemmas on of_int/pochhammer
eberlm
parents:
61531
diff
changeset
|
3350 |
by (simp add: bounded_iff bdd_above_def) |
980dd46a03fb
Added binomial identities to CONTRIBUTORS; small lemmas on of_int/pochhammer
eberlm
parents:
61531
diff
changeset
|
3351 |
|
53282 | 3352 |
lemma bounded_realI: |
61945 | 3353 |
assumes "\<forall>x\<in>s. \<bar>x::real\<bar> \<le> B" |
53282 | 3354 |
shows "bounded s" |
3355 |
unfolding bounded_def dist_real_def |
|
55775 | 3356 |
by (metis abs_minus_commute assms diff_0_right) |
50104 | 3357 |
|
50948 | 3358 |
lemma bounded_empty [simp]: "bounded {}" |
3359 |
by (simp add: bounded_def) |
|
3360 |
||
53291 | 3361 |
lemma bounded_subset: "bounded T \<Longrightarrow> S \<subseteq> T \<Longrightarrow> bounded S" |
33175 | 3362 |
by (metis bounded_def subset_eq) |
3363 |
||
53291 | 3364 |
lemma bounded_interior[intro]: "bounded S \<Longrightarrow> bounded(interior S)" |
33175 | 3365 |
by (metis bounded_subset interior_subset) |
3366 |
||
52624 | 3367 |
lemma bounded_closure[intro]: |
3368 |
assumes "bounded S" |
|
3369 |
shows "bounded (closure S)" |
|
3370 |
proof - |
|
3371 |
from assms obtain x and a where a: "\<forall>y\<in>S. dist x y \<le> a" |
|
3372 |
unfolding bounded_def by auto |
|
3373 |
{ |
|
3374 |
fix y |
|
3375 |
assume "y \<in> closure S" |
|
61973 | 3376 |
then obtain f where f: "\<forall>n. f n \<in> S" "(f \<longlongrightarrow> y) sequentially" |
33175 | 3377 |
unfolding closure_sequential by auto |
3378 |
have "\<forall>n. f n \<in> S \<longrightarrow> dist x (f n) \<le> a" using a by simp |
|
53282 | 3379 |
then have "eventually (\<lambda>n. dist x (f n) \<le> a) sequentially" |
61810 | 3380 |
by (simp add: f(1)) |
33175 | 3381 |
have "dist x y \<le> a" |
3382 |
apply (rule Lim_dist_ubound [of sequentially f]) |
|
3383 |
apply (rule trivial_limit_sequentially) |
|
3384 |
apply (rule f(2)) |
|
3385 |
apply fact |
|
3386 |
done |
|
3387 |
} |
|
53282 | 3388 |
then show ?thesis |
3389 |
unfolding bounded_def by auto |
|
33175 | 3390 |
qed |
3391 |
||
3392 |
lemma bounded_cball[simp,intro]: "bounded (cball x e)" |
|
3393 |
apply (simp add: bounded_def) |
|
3394 |
apply (rule_tac x=x in exI) |
|
3395 |
apply (rule_tac x=e in exI) |
|
3396 |
apply auto |
|
3397 |
done |
|
3398 |
||
53640 | 3399 |
lemma bounded_ball[simp,intro]: "bounded (ball x e)" |
33175 | 3400 |
by (metis ball_subset_cball bounded_cball bounded_subset) |
3401 |
||
3402 |
lemma bounded_Un[simp]: "bounded (S \<union> T) \<longleftrightarrow> bounded S \<and> bounded T" |
|
3403 |
apply (auto simp add: bounded_def) |
|
55775 | 3404 |
by (metis Un_iff add_le_cancel_left dist_triangle le_max_iff_disj max.order_iff) |
33175 | 3405 |
|
53640 | 3406 |
lemma bounded_Union[intro]: "finite F \<Longrightarrow> \<forall>S\<in>F. bounded S \<Longrightarrow> bounded (\<Union>F)" |
52624 | 3407 |
by (induct rule: finite_induct[of F]) auto |
33175 | 3408 |
|
50955 | 3409 |
lemma bounded_UN [intro]: "finite A \<Longrightarrow> \<forall>x\<in>A. bounded (B x) \<Longrightarrow> bounded (\<Union>x\<in>A. B x)" |
52624 | 3410 |
by (induct set: finite) auto |
50955 | 3411 |
|
50948 | 3412 |
lemma bounded_insert [simp]: "bounded (insert x S) \<longleftrightarrow> bounded S" |
3413 |
proof - |
|
53640 | 3414 |
have "\<forall>y\<in>{x}. dist x y \<le> 0" |
3415 |
by simp |
|
3416 |
then have "bounded {x}" |
|
3417 |
unfolding bounded_def by fast |
|
3418 |
then show ?thesis |
|
3419 |
by (metis insert_is_Un bounded_Un) |
|
50948 | 3420 |
qed |
3421 |
||
3422 |
lemma finite_imp_bounded [intro]: "finite S \<Longrightarrow> bounded S" |
|
52624 | 3423 |
by (induct set: finite) simp_all |
50948 | 3424 |
|
53640 | 3425 |
lemma bounded_pos: "bounded S \<longleftrightarrow> (\<exists>b>0. \<forall>x\<in> S. norm x \<le> b)" |
33175 | 3426 |
apply (simp add: bounded_iff) |
61945 | 3427 |
apply (subgoal_tac "\<And>x (y::real). 0 < 1 + \<bar>y\<bar> \<and> (x \<le> y \<longrightarrow> x \<le> 1 + \<bar>y\<bar>)") |
52624 | 3428 |
apply metis |
3429 |
apply arith |
|
3430 |
done |
|
33175 | 3431 |
|
60762 | 3432 |
lemma bounded_pos_less: "bounded S \<longleftrightarrow> (\<exists>b>0. \<forall>x\<in> S. norm x < b)" |
3433 |
apply (simp add: bounded_pos) |
|
3434 |
apply (safe; rule_tac x="b+1" in exI; force) |
|
3435 |
done |
|
3436 |
||
53640 | 3437 |
lemma Bseq_eq_bounded: |
3438 |
fixes f :: "nat \<Rightarrow> 'a::real_normed_vector" |
|
3439 |
shows "Bseq f \<longleftrightarrow> bounded (range f)" |
|
50972 | 3440 |
unfolding Bseq_def bounded_pos by auto |
3441 |
||
33175 | 3442 |
lemma bounded_Int[intro]: "bounded S \<or> bounded T \<Longrightarrow> bounded (S \<inter> T)" |
3443 |
by (metis Int_lower1 Int_lower2 bounded_subset) |
|
3444 |
||
53291 | 3445 |
lemma bounded_diff[intro]: "bounded S \<Longrightarrow> bounded (S - T)" |
52624 | 3446 |
by (metis Diff_subset bounded_subset) |
33175 | 3447 |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3448 |
lemma not_bounded_UNIV[simp]: |
33175 | 3449 |
"\<not> bounded (UNIV :: 'a::{real_normed_vector, perfect_space} set)" |
53640 | 3450 |
proof (auto simp add: bounded_pos not_le) |
33175 | 3451 |
obtain x :: 'a where "x \<noteq> 0" |
3452 |
using perfect_choose_dist [OF zero_less_one] by fast |
|
53640 | 3453 |
fix b :: real |
3454 |
assume b: "b >0" |
|
3455 |
have b1: "b +1 \<ge> 0" |
|
3456 |
using b by simp |
|
60420 | 3457 |
with \<open>x \<noteq> 0\<close> have "b < norm (scaleR (b + 1) (sgn x))" |
33175 | 3458 |
by (simp add: norm_sgn) |
3459 |
then show "\<exists>x::'a. b < norm x" .. |
|
3460 |
qed |
|
3461 |
||
61426
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
3462 |
corollary cobounded_imp_unbounded: |
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
3463 |
fixes S :: "'a::{real_normed_vector, perfect_space} set" |
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
3464 |
shows "bounded (- S) \<Longrightarrow> ~ (bounded S)" |
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
3465 |
using bounded_Un [of S "-S"] by (simp add: sup_compl_top) |
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
3466 |
|
33175 | 3467 |
lemma bounded_linear_image: |
53291 | 3468 |
assumes "bounded S" |
3469 |
and "bounded_linear f" |
|
3470 |
shows "bounded (f ` S)" |
|
52624 | 3471 |
proof - |
53640 | 3472 |
from assms(1) obtain b where b: "b > 0" "\<forall>x\<in>S. norm x \<le> b" |
52624 | 3473 |
unfolding bounded_pos by auto |
53640 | 3474 |
from assms(2) obtain B where B: "B > 0" "\<forall>x. norm (f x) \<le> B * norm x" |
57514
bdc2c6b40bf2
prefer ac_simps collections over separate name bindings for add and mult
haftmann
parents:
57512
diff
changeset
|
3475 |
using bounded_linear.pos_bounded by (auto simp add: ac_simps) |
52624 | 3476 |
{ |
53282 | 3477 |
fix x |
53640 | 3478 |
assume "x \<in> S" |
3479 |
then have "norm x \<le> b" |
|
3480 |
using b by auto |
|
3481 |
then have "norm (f x) \<le> B * b" |
|
3482 |
using B(2) |
|
52624 | 3483 |
apply (erule_tac x=x in allE) |
3484 |
apply (metis B(1) B(2) order_trans mult_le_cancel_left_pos) |
|
3485 |
done |
|
33175 | 3486 |
} |
53282 | 3487 |
then show ?thesis |
3488 |
unfolding bounded_pos |
|
52624 | 3489 |
apply (rule_tac x="b*B" in exI) |
57512
cc97b347b301
reduced name variants for assoc and commute on plus and mult
haftmann
parents:
57448
diff
changeset
|
3490 |
using b B by (auto simp add: mult.commute) |
33175 | 3491 |
qed |
3492 |
||
3493 |
lemma bounded_scaling: |
|
3494 |
fixes S :: "'a::real_normed_vector set" |
|
3495 |
shows "bounded S \<Longrightarrow> bounded ((\<lambda>x. c *\<^sub>R x) ` S)" |
|
53291 | 3496 |
apply (rule bounded_linear_image) |
3497 |
apply assumption |
|
44282
f0de18b62d63
remove bounded_(bi)linear locale interpretations, to avoid duplicating so many lemmas
huffman
parents:
44252
diff
changeset
|
3498 |
apply (rule bounded_linear_scaleR_right) |
33175 | 3499 |
done |
3500 |
||
3501 |
lemma bounded_translation: |
|
3502 |
fixes S :: "'a::real_normed_vector set" |
|
52624 | 3503 |
assumes "bounded S" |
3504 |
shows "bounded ((\<lambda>x. a + x) ` S)" |
|
53282 | 3505 |
proof - |
53640 | 3506 |
from assms obtain b where b: "b > 0" "\<forall>x\<in>S. norm x \<le> b" |
52624 | 3507 |
unfolding bounded_pos by auto |
3508 |
{ |
|
3509 |
fix x |
|
53640 | 3510 |
assume "x \<in> S" |
53282 | 3511 |
then have "norm (a + x) \<le> b + norm a" |
52624 | 3512 |
using norm_triangle_ineq[of a x] b by auto |
33175 | 3513 |
} |
53282 | 3514 |
then show ?thesis |
52624 | 3515 |
unfolding bounded_pos |
3516 |
using norm_ge_zero[of a] b(1) and add_strict_increasing[of b 0 "norm a"] |
|
48048
87b94fb75198
remove stray reference to no-longer-existing theorem 'add'
huffman
parents:
47108
diff
changeset
|
3517 |
by (auto intro!: exI[of _ "b + norm a"]) |
33175 | 3518 |
qed |
3519 |
||
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
3520 |
lemma bounded_translation_minus: |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
3521 |
fixes S :: "'a::real_normed_vector set" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
3522 |
shows "bounded S \<Longrightarrow> bounded ((\<lambda>x. x - a) ` S)" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
3523 |
using bounded_translation [of S "-a"] by simp |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
3524 |
|
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
3525 |
lemma bounded_uminus [simp]: |
62466 | 3526 |
fixes X :: "'a::real_normed_vector set" |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
3527 |
shows "bounded (uminus ` X) \<longleftrightarrow> bounded X" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
3528 |
by (auto simp: bounded_def dist_norm; rule_tac x="-x" in exI; force simp add: add.commute norm_minus_commute) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
3529 |
|
60420 | 3530 |
text\<open>Some theorems on sups and infs using the notion "bounded".\<close> |
33175 | 3531 |
|
54258
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
3532 |
lemma bounded_real: "bounded (S::real set) \<longleftrightarrow> (\<exists>a. \<forall>x\<in>S. \<bar>x\<bar> \<le> a)" |
33175 | 3533 |
by (simp add: bounded_iff) |
3534 |
||
54258
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
3535 |
lemma bounded_imp_bdd_above: "bounded S \<Longrightarrow> bdd_above (S :: real set)" |
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
3536 |
by (auto simp: bounded_def bdd_above_def dist_real_def) |
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
3537 |
(metis abs_le_D1 abs_minus_commute diff_le_eq) |
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
3538 |
|
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
3539 |
lemma bounded_imp_bdd_below: "bounded S \<Longrightarrow> bdd_below (S :: real set)" |
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
3540 |
by (auto simp: bounded_def bdd_below_def dist_real_def) |
57512
cc97b347b301
reduced name variants for assoc and commute on plus and mult
haftmann
parents:
57448
diff
changeset
|
3541 |
(metis abs_le_D1 add.commute diff_le_eq) |
54258
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
3542 |
|
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
3543 |
lemma bounded_inner_imp_bdd_above: |
60974
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
3544 |
assumes "bounded s" |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
3545 |
shows "bdd_above ((\<lambda>x. x \<bullet> a) ` s)" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
3546 |
by (simp add: assms bounded_imp_bdd_above bounded_linear_image bounded_linear_inner_left) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
3547 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
3548 |
lemma bounded_inner_imp_bdd_below: |
60974
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
3549 |
assumes "bounded s" |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
3550 |
shows "bdd_below ((\<lambda>x. x \<bullet> a) ` s)" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
3551 |
by (simp add: assms bounded_imp_bdd_below bounded_linear_image bounded_linear_inner_left) |
54258
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
3552 |
|
33270 | 3553 |
lemma bounded_has_Sup: |
3554 |
fixes S :: "real set" |
|
53640 | 3555 |
assumes "bounded S" |
3556 |
and "S \<noteq> {}" |
|
53282 | 3557 |
shows "\<forall>x\<in>S. x \<le> Sup S" |
3558 |
and "\<forall>b. (\<forall>x\<in>S. x \<le> b) \<longrightarrow> Sup S \<le> b" |
|
33270 | 3559 |
proof |
53282 | 3560 |
show "\<forall>b. (\<forall>x\<in>S. x \<le> b) \<longrightarrow> Sup S \<le> b" |
3561 |
using assms by (metis cSup_least) |
|
54258
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
3562 |
qed (metis cSup_upper assms(1) bounded_imp_bdd_above) |
33270 | 3563 |
|
3564 |
lemma Sup_insert: |
|
3565 |
fixes S :: "real set" |
|
53291 | 3566 |
shows "bounded S \<Longrightarrow> Sup (insert x S) = (if S = {} then x else max x (Sup S))" |
54258
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
3567 |
by (auto simp: bounded_imp_bdd_above sup_max cSup_insert_If) |
33270 | 3568 |
|
3569 |
lemma Sup_insert_finite: |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
3570 |
fixes S :: "'a::conditionally_complete_linorder set" |
53291 | 3571 |
shows "finite S \<Longrightarrow> Sup (insert x S) = (if S = {} then x else max x (Sup S))" |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
3572 |
by (simp add: cSup_insert sup_max) |
33270 | 3573 |
|
3574 |
lemma bounded_has_Inf: |
|
3575 |
fixes S :: "real set" |
|
53640 | 3576 |
assumes "bounded S" |
3577 |
and "S \<noteq> {}" |
|
53282 | 3578 |
shows "\<forall>x\<in>S. x \<ge> Inf S" |
3579 |
and "\<forall>b. (\<forall>x\<in>S. x \<ge> b) \<longrightarrow> Inf S \<ge> b" |
|
33175 | 3580 |
proof |
53640 | 3581 |
show "\<forall>b. (\<forall>x\<in>S. x \<ge> b) \<longrightarrow> Inf S \<ge> b" |
53282 | 3582 |
using assms by (metis cInf_greatest) |
54258
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
3583 |
qed (metis cInf_lower assms(1) bounded_imp_bdd_below) |
33270 | 3584 |
|
3585 |
lemma Inf_insert: |
|
3586 |
fixes S :: "real set" |
|
53291 | 3587 |
shows "bounded S \<Longrightarrow> Inf (insert x S) = (if S = {} then x else min x (Inf S))" |
54259
71c701dc5bf9
add SUP and INF for conditionally complete lattices
hoelzl
parents:
54258
diff
changeset
|
3588 |
by (auto simp: bounded_imp_bdd_below inf_min cInf_insert_If) |
50944 | 3589 |
|
33270 | 3590 |
lemma Inf_insert_finite: |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
3591 |
fixes S :: "'a::conditionally_complete_linorder set" |
53291 | 3592 |
shows "finite S \<Longrightarrow> Inf (insert x S) = (if S = {} then x else min x (Inf S))" |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
3593 |
by (simp add: cInf_eq_Min) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
3594 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
3595 |
lemma finite_imp_less_Inf: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
3596 |
fixes a :: "'a::conditionally_complete_linorder" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
3597 |
shows "\<lbrakk>finite X; x \<in> X; \<And>x. x\<in>X \<Longrightarrow> a < x\<rbrakk> \<Longrightarrow> a < Inf X" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
3598 |
by (induction X rule: finite_induct) (simp_all add: cInf_eq_Min Inf_insert_finite) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
3599 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
3600 |
lemma finite_less_Inf_iff: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
3601 |
fixes a :: "'a :: conditionally_complete_linorder" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
3602 |
shows "\<lbrakk>finite X; X \<noteq> {}\<rbrakk> \<Longrightarrow> a < Inf X \<longleftrightarrow> (\<forall>x \<in> X. a < x)" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
3603 |
by (auto simp: cInf_eq_Min) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
3604 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
3605 |
lemma finite_imp_Sup_less: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
3606 |
fixes a :: "'a::conditionally_complete_linorder" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
3607 |
shows "\<lbrakk>finite X; x \<in> X; \<And>x. x\<in>X \<Longrightarrow> a > x\<rbrakk> \<Longrightarrow> a > Sup X" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
3608 |
by (induction X rule: finite_induct) (simp_all add: cSup_eq_Max Sup_insert_finite) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
3609 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
3610 |
lemma finite_Sup_less_iff: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
3611 |
fixes a :: "'a :: conditionally_complete_linorder" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
3612 |
shows "\<lbrakk>finite X; X \<noteq> {}\<rbrakk> \<Longrightarrow> a > Sup X \<longleftrightarrow> (\<forall>x \<in> X. a > x)" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
3613 |
by (auto simp: cSup_eq_Max) |
33270 | 3614 |
|
60420 | 3615 |
subsection \<open>Compactness\<close> |
3616 |
||
3617 |
subsubsection \<open>Bolzano-Weierstrass property\<close> |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3618 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3619 |
lemma heine_borel_imp_bolzano_weierstrass: |
53640 | 3620 |
assumes "compact s" |
3621 |
and "infinite t" |
|
3622 |
and "t \<subseteq> s" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3623 |
shows "\<exists>x \<in> s. x islimpt t" |
53291 | 3624 |
proof (rule ccontr) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3625 |
assume "\<not> (\<exists>x \<in> s. x islimpt t)" |
53640 | 3626 |
then obtain f where f: "\<forall>x\<in>s. x \<in> f x \<and> open (f x) \<and> (\<forall>y\<in>t. y \<in> f x \<longrightarrow> y = x)" |
52624 | 3627 |
unfolding islimpt_def |
53282 | 3628 |
using bchoice[of s "\<lambda> x T. x \<in> T \<and> open T \<and> (\<forall>y\<in>t. y \<in> T \<longrightarrow> y = x)"] |
3629 |
by auto |
|
53640 | 3630 |
obtain g where g: "g \<subseteq> {t. \<exists>x. x \<in> s \<and> t = f x}" "finite g" "s \<subseteq> \<Union>g" |
52624 | 3631 |
using assms(1)[unfolded compact_eq_heine_borel, THEN spec[where x="{t. \<exists>x. x\<in>s \<and> t = f x}"]] |
3632 |
using f by auto |
|
53640 | 3633 |
from g(1,3) have g':"\<forall>x\<in>g. \<exists>xa \<in> s. x = f xa" |
3634 |
by auto |
|
52624 | 3635 |
{ |
3636 |
fix x y |
|
53640 | 3637 |
assume "x \<in> t" "y \<in> t" "f x = f y" |
53282 | 3638 |
then have "x \<in> f x" "y \<in> f x \<longrightarrow> y = x" |
60420 | 3639 |
using f[THEN bspec[where x=x]] and \<open>t \<subseteq> s\<close> by auto |
53282 | 3640 |
then have "x = y" |
60420 | 3641 |
using \<open>f x = f y\<close> and f[THEN bspec[where x=y]] and \<open>y \<in> t\<close> and \<open>t \<subseteq> s\<close> |
53640 | 3642 |
by auto |
52624 | 3643 |
} |
53282 | 3644 |
then have "inj_on f t" |
52624 | 3645 |
unfolding inj_on_def by simp |
53282 | 3646 |
then have "infinite (f ` t)" |
52624 | 3647 |
using assms(2) using finite_imageD by auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3648 |
moreover |
52624 | 3649 |
{ |
3650 |
fix x |
|
53640 | 3651 |
assume "x \<in> t" "f x \<notin> g" |
60420 | 3652 |
from g(3) assms(3) \<open>x \<in> t\<close> obtain h where "h \<in> g" and "x \<in> h" |
53640 | 3653 |
by auto |
3654 |
then obtain y where "y \<in> s" "h = f y" |
|
52624 | 3655 |
using g'[THEN bspec[where x=h]] by auto |
53282 | 3656 |
then have "y = x" |
60420 | 3657 |
using f[THEN bspec[where x=y]] and \<open>x\<in>t\<close> and \<open>x\<in>h\<close>[unfolded \<open>h = f y\<close>] |
53640 | 3658 |
by auto |
53282 | 3659 |
then have False |
60420 | 3660 |
using \<open>f x \<notin> g\<close> \<open>h \<in> g\<close> unfolding \<open>h = f y\<close> |
53640 | 3661 |
by auto |
52624 | 3662 |
} |
53282 | 3663 |
then have "f ` t \<subseteq> g" by auto |
52624 | 3664 |
ultimately show False |
3665 |
using g(2) using finite_subset by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3666 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3667 |
|
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3668 |
lemma acc_point_range_imp_convergent_subsequence: |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3669 |
fixes l :: "'a :: first_countable_topology" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3670 |
assumes l: "\<forall>U. l\<in>U \<longrightarrow> open U \<longrightarrow> infinite (U \<inter> range f)" |
61969 | 3671 |
shows "\<exists>r. subseq r \<and> (f \<circ> r) \<longlonglongrightarrow> l" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3672 |
proof - |
55522 | 3673 |
from countable_basis_at_decseq[of l] |
3674 |
obtain A where A: |
|
3675 |
"\<And>i. open (A i)" |
|
3676 |
"\<And>i. l \<in> A i" |
|
3677 |
"\<And>S. open S \<Longrightarrow> l \<in> S \<Longrightarrow> eventually (\<lambda>i. A i \<subseteq> S) sequentially" |
|
3678 |
by blast |
|
63040 | 3679 |
define s where "s n i = (SOME j. i < j \<and> f j \<in> A (Suc n))" for n i |
52624 | 3680 |
{ |
3681 |
fix n i |
|
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3682 |
have "infinite (A (Suc n) \<inter> range f - f`{.. i})" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3683 |
using l A by auto |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3684 |
then have "\<exists>x. x \<in> A (Suc n) \<inter> range f - f`{.. i}" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3685 |
unfolding ex_in_conv by (intro notI) simp |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3686 |
then have "\<exists>j. f j \<in> A (Suc n) \<and> j \<notin> {.. i}" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3687 |
by auto |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3688 |
then have "\<exists>a. i < a \<and> f a \<in> A (Suc n)" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3689 |
by (auto simp: not_le) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3690 |
then have "i < s n i" "f (s n i) \<in> A (Suc n)" |
52624 | 3691 |
unfolding s_def by (auto intro: someI2_ex) |
3692 |
} |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3693 |
note s = this |
63040 | 3694 |
define r where "r = rec_nat (s 0 0) s" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3695 |
have "subseq r" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3696 |
by (auto simp: r_def s subseq_Suc_iff) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3697 |
moreover |
61969 | 3698 |
have "(\<lambda>n. f (r n)) \<longlonglongrightarrow> l" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3699 |
proof (rule topological_tendstoI) |
53282 | 3700 |
fix S |
3701 |
assume "open S" "l \<in> S" |
|
53640 | 3702 |
with A(3) have "eventually (\<lambda>i. A i \<subseteq> S) sequentially" |
3703 |
by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3704 |
moreover |
52624 | 3705 |
{ |
3706 |
fix i |
|
53282 | 3707 |
assume "Suc 0 \<le> i" |
3708 |
then have "f (r i) \<in> A i" |
|
52624 | 3709 |
by (cases i) (simp_all add: r_def s) |
3710 |
} |
|
3711 |
then have "eventually (\<lambda>i. f (r i) \<in> A i) sequentially" |
|
3712 |
by (auto simp: eventually_sequentially) |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3713 |
ultimately show "eventually (\<lambda>i. f (r i) \<in> S) sequentially" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3714 |
by eventually_elim auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3715 |
qed |
61969 | 3716 |
ultimately show "\<exists>r. subseq r \<and> (f \<circ> r) \<longlonglongrightarrow> l" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3717 |
by (auto simp: convergent_def comp_def) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3718 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3719 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3720 |
lemma sequence_infinite_lemma: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3721 |
fixes f :: "nat \<Rightarrow> 'a::t1_space" |
53282 | 3722 |
assumes "\<forall>n. f n \<noteq> l" |
61973 | 3723 |
and "(f \<longlongrightarrow> l) sequentially" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3724 |
shows "infinite (range f)" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3725 |
proof |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3726 |
assume "finite (range f)" |
53640 | 3727 |
then have "closed (range f)" |
3728 |
by (rule finite_imp_closed) |
|
3729 |
then have "open (- range f)" |
|
3730 |
by (rule open_Compl) |
|
3731 |
from assms(1) have "l \<in> - range f" |
|
3732 |
by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3733 |
from assms(2) have "eventually (\<lambda>n. f n \<in> - range f) sequentially" |
60420 | 3734 |
using \<open>open (- range f)\<close> \<open>l \<in> - range f\<close> |
53640 | 3735 |
by (rule topological_tendstoD) |
3736 |
then show False |
|
3737 |
unfolding eventually_sequentially |
|
3738 |
by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3739 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3740 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3741 |
lemma closure_insert: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3742 |
fixes x :: "'a::t1_space" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3743 |
shows "closure (insert x s) = insert x (closure s)" |
52624 | 3744 |
apply (rule closure_unique) |
3745 |
apply (rule insert_mono [OF closure_subset]) |
|
3746 |
apply (rule closed_insert [OF closed_closure]) |
|
3747 |
apply (simp add: closure_minimal) |
|
3748 |
done |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3749 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3750 |
lemma islimpt_insert: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3751 |
fixes x :: "'a::t1_space" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3752 |
shows "x islimpt (insert a s) \<longleftrightarrow> x islimpt s" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3753 |
proof |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3754 |
assume *: "x islimpt (insert a s)" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3755 |
show "x islimpt s" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3756 |
proof (rule islimptI) |
53282 | 3757 |
fix t |
3758 |
assume t: "x \<in> t" "open t" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3759 |
show "\<exists>y\<in>s. y \<in> t \<and> y \<noteq> x" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3760 |
proof (cases "x = a") |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3761 |
case True |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3762 |
obtain y where "y \<in> insert a s" "y \<in> t" "y \<noteq> x" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3763 |
using * t by (rule islimptE) |
60420 | 3764 |
with \<open>x = a\<close> show ?thesis by auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3765 |
next |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3766 |
case False |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3767 |
with t have t': "x \<in> t - {a}" "open (t - {a})" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3768 |
by (simp_all add: open_Diff) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3769 |
obtain y where "y \<in> insert a s" "y \<in> t - {a}" "y \<noteq> x" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3770 |
using * t' by (rule islimptE) |
53282 | 3771 |
then show ?thesis by auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3772 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3773 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3774 |
next |
53282 | 3775 |
assume "x islimpt s" |
3776 |
then show "x islimpt (insert a s)" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3777 |
by (rule islimpt_subset) auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3778 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3779 |
|
50897
078590669527
generalize lemma islimpt_finite to class t1_space
huffman
parents:
50884
diff
changeset
|
3780 |
lemma islimpt_finite: |
078590669527
generalize lemma islimpt_finite to class t1_space
huffman
parents:
50884
diff
changeset
|
3781 |
fixes x :: "'a::t1_space" |
078590669527
generalize lemma islimpt_finite to class t1_space
huffman
parents:
50884
diff
changeset
|
3782 |
shows "finite s \<Longrightarrow> \<not> x islimpt s" |
52624 | 3783 |
by (induct set: finite) (simp_all add: islimpt_insert) |
50897
078590669527
generalize lemma islimpt_finite to class t1_space
huffman
parents:
50884
diff
changeset
|
3784 |
|
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
3785 |
lemma islimpt_Un_finite: |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3786 |
fixes x :: "'a::t1_space" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3787 |
shows "finite s \<Longrightarrow> x islimpt (s \<union> t) \<longleftrightarrow> x islimpt t" |
52624 | 3788 |
by (simp add: islimpt_Un islimpt_finite) |
50897
078590669527
generalize lemma islimpt_finite to class t1_space
huffman
parents:
50884
diff
changeset
|
3789 |
|
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3790 |
lemma islimpt_eq_acc_point: |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3791 |
fixes l :: "'a :: t1_space" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3792 |
shows "l islimpt S \<longleftrightarrow> (\<forall>U. l\<in>U \<longrightarrow> open U \<longrightarrow> infinite (U \<inter> S))" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3793 |
proof (safe intro!: islimptI) |
53282 | 3794 |
fix U |
3795 |
assume "l islimpt S" "l \<in> U" "open U" "finite (U \<inter> S)" |
|
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3796 |
then have "l islimpt S" "l \<in> (U - (U \<inter> S - {l}))" "open (U - (U \<inter> S - {l}))" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3797 |
by (auto intro: finite_imp_closed) |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3798 |
then show False |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3799 |
by (rule islimptE) auto |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3800 |
next |
53282 | 3801 |
fix T |
3802 |
assume *: "\<forall>U. l\<in>U \<longrightarrow> open U \<longrightarrow> infinite (U \<inter> S)" "l \<in> T" "open T" |
|
3803 |
then have "infinite (T \<inter> S - {l})" |
|
3804 |
by auto |
|
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3805 |
then have "\<exists>x. x \<in> (T \<inter> S - {l})" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3806 |
unfolding ex_in_conv by (intro notI) simp |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3807 |
then show "\<exists>y\<in>S. y \<in> T \<and> y \<noteq> l" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3808 |
by auto |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3809 |
qed |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3810 |
|
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3811 |
lemma islimpt_range_imp_convergent_subsequence: |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3812 |
fixes l :: "'a :: {t1_space, first_countable_topology}" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3813 |
assumes l: "l islimpt (range f)" |
61969 | 3814 |
shows "\<exists>r. subseq r \<and> (f \<circ> r) \<longlonglongrightarrow> l" |
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3815 |
using l unfolding islimpt_eq_acc_point |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3816 |
by (rule acc_point_range_imp_convergent_subsequence) |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
3817 |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3818 |
lemma sequence_unique_limpt: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3819 |
fixes f :: "nat \<Rightarrow> 'a::t2_space" |
61973 | 3820 |
assumes "(f \<longlongrightarrow> l) sequentially" |
53282 | 3821 |
and "l' islimpt (range f)" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3822 |
shows "l' = l" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3823 |
proof (rule ccontr) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3824 |
assume "l' \<noteq> l" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3825 |
obtain s t where "open s" "open t" "l' \<in> s" "l \<in> t" "s \<inter> t = {}" |
60420 | 3826 |
using hausdorff [OF \<open>l' \<noteq> l\<close>] by auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3827 |
have "eventually (\<lambda>n. f n \<in> t) sequentially" |
60420 | 3828 |
using assms(1) \<open>open t\<close> \<open>l \<in> t\<close> by (rule topological_tendstoD) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3829 |
then obtain N where "\<forall>n\<ge>N. f n \<in> t" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3830 |
unfolding eventually_sequentially by auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3831 |
|
53282 | 3832 |
have "UNIV = {..<N} \<union> {N..}" |
3833 |
by auto |
|
3834 |
then have "l' islimpt (f ` ({..<N} \<union> {N..}))" |
|
3835 |
using assms(2) by simp |
|
3836 |
then have "l' islimpt (f ` {..<N} \<union> f ` {N..})" |
|
3837 |
by (simp add: image_Un) |
|
3838 |
then have "l' islimpt (f ` {N..})" |
|
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
3839 |
by (simp add: islimpt_Un_finite) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3840 |
then obtain y where "y \<in> f ` {N..}" "y \<in> s" "y \<noteq> l'" |
60420 | 3841 |
using \<open>l' \<in> s\<close> \<open>open s\<close> by (rule islimptE) |
53282 | 3842 |
then obtain n where "N \<le> n" "f n \<in> s" "f n \<noteq> l'" |
3843 |
by auto |
|
60420 | 3844 |
with \<open>\<forall>n\<ge>N. f n \<in> t\<close> have "f n \<in> s \<inter> t" |
53282 | 3845 |
by simp |
60420 | 3846 |
with \<open>s \<inter> t = {}\<close> show False |
53282 | 3847 |
by simp |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3848 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3849 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3850 |
lemma bolzano_weierstrass_imp_closed: |
53640 | 3851 |
fixes s :: "'a::{first_countable_topology,t2_space} set" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3852 |
assumes "\<forall>t. infinite t \<and> t \<subseteq> s --> (\<exists>x \<in> s. x islimpt t)" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3853 |
shows "closed s" |
52624 | 3854 |
proof - |
3855 |
{ |
|
3856 |
fix x l |
|
61973 | 3857 |
assume as: "\<forall>n::nat. x n \<in> s" "(x \<longlongrightarrow> l) sequentially" |
53282 | 3858 |
then have "l \<in> s" |
52624 | 3859 |
proof (cases "\<forall>n. x n \<noteq> l") |
3860 |
case False |
|
53282 | 3861 |
then show "l\<in>s" using as(1) by auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3862 |
next |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3863 |
case True note cas = this |
52624 | 3864 |
with as(2) have "infinite (range x)" |
3865 |
using sequence_infinite_lemma[of x l] by auto |
|
3866 |
then obtain l' where "l'\<in>s" "l' islimpt (range x)" |
|
3867 |
using assms[THEN spec[where x="range x"]] as(1) by auto |
|
53282 | 3868 |
then show "l\<in>s" using sequence_unique_limpt[of x l l'] |
52624 | 3869 |
using as cas by auto |
3870 |
qed |
|
3871 |
} |
|
53282 | 3872 |
then show ?thesis |
3873 |
unfolding closed_sequential_limits by fast |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3874 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3875 |
|
50944 | 3876 |
lemma compact_imp_bounded: |
52624 | 3877 |
assumes "compact U" |
3878 |
shows "bounded U" |
|
50944 | 3879 |
proof - |
52624 | 3880 |
have "compact U" "\<forall>x\<in>U. open (ball x 1)" "U \<subseteq> (\<Union>x\<in>U. ball x 1)" |
3881 |
using assms by auto |
|
50944 | 3882 |
then obtain D where D: "D \<subseteq> U" "finite D" "U \<subseteq> (\<Union>x\<in>D. ball x 1)" |
52624 | 3883 |
by (rule compactE_image) |
60420 | 3884 |
from \<open>finite D\<close> have "bounded (\<Union>x\<in>D. ball x 1)" |
50955 | 3885 |
by (simp add: bounded_UN) |
60420 | 3886 |
then show "bounded U" using \<open>U \<subseteq> (\<Union>x\<in>D. ball x 1)\<close> |
50955 | 3887 |
by (rule bounded_subset) |
50944 | 3888 |
qed |
3889 |
||
60420 | 3890 |
text\<open>In particular, some common special cases.\<close> |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3891 |
|
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
3892 |
lemma compact_Un [intro]: |
53291 | 3893 |
assumes "compact s" |
3894 |
and "compact t" |
|
53282 | 3895 |
shows " compact (s \<union> t)" |
50898 | 3896 |
proof (rule compactI) |
52624 | 3897 |
fix f |
3898 |
assume *: "Ball f open" "s \<union> t \<subseteq> \<Union>f" |
|
60420 | 3899 |
from * \<open>compact s\<close> obtain s' where "s' \<subseteq> f \<and> finite s' \<and> s \<subseteq> \<Union>s'" |
56073
29e308b56d23
enhanced simplifier solver for preconditions of rewrite rule, can now deal with conjunctions
nipkow
parents:
55927
diff
changeset
|
3900 |
unfolding compact_eq_heine_borel by (auto elim!: allE[of _ f]) |
52624 | 3901 |
moreover |
60420 | 3902 |
from * \<open>compact t\<close> obtain t' where "t' \<subseteq> f \<and> finite t' \<and> t \<subseteq> \<Union>t'" |
56073
29e308b56d23
enhanced simplifier solver for preconditions of rewrite rule, can now deal with conjunctions
nipkow
parents:
55927
diff
changeset
|
3903 |
unfolding compact_eq_heine_borel by (auto elim!: allE[of _ f]) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3904 |
ultimately show "\<exists>f'\<subseteq>f. finite f' \<and> s \<union> t \<subseteq> \<Union>f'" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3905 |
by (auto intro!: exI[of _ "s' \<union> t'"]) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3906 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3907 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3908 |
lemma compact_Union [intro]: "finite S \<Longrightarrow> (\<And>T. T \<in> S \<Longrightarrow> compact T) \<Longrightarrow> compact (\<Union>S)" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3909 |
by (induct set: finite) auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3910 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3911 |
lemma compact_UN [intro]: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3912 |
"finite A \<Longrightarrow> (\<And>x. x \<in> A \<Longrightarrow> compact (B x)) \<Longrightarrow> compact (\<Union>x\<in>A. B x)" |
62343
24106dc44def
prefer abbreviations for compound operators INFIMUM and SUPREMUM
haftmann
parents:
62131
diff
changeset
|
3913 |
by (rule compact_Union) auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3914 |
|
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
3915 |
lemma closed_Int_compact [intro]: |
53282 | 3916 |
assumes "closed s" |
3917 |
and "compact t" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3918 |
shows "compact (s \<inter> t)" |
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
3919 |
using compact_Int_closed [of t s] assms |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3920 |
by (simp add: Int_commute) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3921 |
|
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
3922 |
lemma compact_Int [intro]: |
50898 | 3923 |
fixes s t :: "'a :: t2_space set" |
53282 | 3924 |
assumes "compact s" |
3925 |
and "compact t" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3926 |
shows "compact (s \<inter> t)" |
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
3927 |
using assms by (intro compact_Int_closed compact_imp_closed) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3928 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3929 |
lemma compact_sing [simp]: "compact {a}" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3930 |
unfolding compact_eq_heine_borel by auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3931 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3932 |
lemma compact_insert [simp]: |
53282 | 3933 |
assumes "compact s" |
3934 |
shows "compact (insert x s)" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3935 |
proof - |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3936 |
have "compact ({x} \<union> s)" |
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
3937 |
using compact_sing assms by (rule compact_Un) |
53282 | 3938 |
then show ?thesis by simp |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3939 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3940 |
|
52624 | 3941 |
lemma finite_imp_compact: "finite s \<Longrightarrow> compact s" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3942 |
by (induct set: finite) simp_all |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3943 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3944 |
lemma open_delete: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3945 |
fixes s :: "'a::t1_space set" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3946 |
shows "open s \<Longrightarrow> open (s - {x})" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3947 |
by (simp add: open_Diff) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3948 |
|
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
3949 |
lemma openin_delete: |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
3950 |
fixes a :: "'a :: t1_space" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
3951 |
shows "openin (subtopology euclidean u) s |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
3952 |
\<Longrightarrow> openin (subtopology euclidean u) (s - {a})" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
3953 |
by (metis Int_Diff open_delete openin_open) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
3954 |
|
60420 | 3955 |
text\<open>Compactness expressed with filters\<close> |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3956 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3957 |
lemma closure_iff_nhds_not_empty: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3958 |
"x \<in> closure X \<longleftrightarrow> (\<forall>A. \<forall>S\<subseteq>A. open S \<longrightarrow> x \<in> S \<longrightarrow> X \<inter> A \<noteq> {})" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3959 |
proof safe |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3960 |
assume x: "x \<in> closure X" |
53282 | 3961 |
fix S A |
3962 |
assume "open S" "x \<in> S" "X \<inter> A = {}" "S \<subseteq> A" |
|
3963 |
then have "x \<notin> closure (-S)" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3964 |
by (auto simp: closure_complement subset_eq[symmetric] intro: interiorI) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3965 |
with x have "x \<in> closure X - closure (-S)" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3966 |
by auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3967 |
also have "\<dots> \<subseteq> closure (X \<inter> S)" |
60420 | 3968 |
using \<open>open S\<close> open_inter_closure_subset[of S X] by (simp add: closed_Compl ac_simps) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3969 |
finally have "X \<inter> S \<noteq> {}" by auto |
60420 | 3970 |
then show False using \<open>X \<inter> A = {}\<close> \<open>S \<subseteq> A\<close> by auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3971 |
next |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3972 |
assume "\<forall>A S. S \<subseteq> A \<longrightarrow> open S \<longrightarrow> x \<in> S \<longrightarrow> X \<inter> A \<noteq> {}" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3973 |
from this[THEN spec, of "- X", THEN spec, of "- closure X"] |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3974 |
show "x \<in> closure X" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3975 |
by (simp add: closure_subset open_Compl) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3976 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3977 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3978 |
lemma compact_filter: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3979 |
"compact U \<longleftrightarrow> (\<forall>F. F \<noteq> bot \<longrightarrow> eventually (\<lambda>x. x \<in> U) F \<longrightarrow> (\<exists>x\<in>U. inf (nhds x) F \<noteq> bot))" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3980 |
proof (intro allI iffI impI compact_fip[THEN iffD2] notI) |
53282 | 3981 |
fix F |
3982 |
assume "compact U" |
|
3983 |
assume F: "F \<noteq> bot" "eventually (\<lambda>x. x \<in> U) F" |
|
3984 |
then have "U \<noteq> {}" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3985 |
by (auto simp: eventually_False) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3986 |
|
63040 | 3987 |
define Z where "Z = closure ` {A. eventually (\<lambda>x. x \<in> A) F}" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3988 |
then have "\<forall>z\<in>Z. closed z" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3989 |
by auto |
53282 | 3990 |
moreover |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3991 |
have ev_Z: "\<And>z. z \<in> Z \<Longrightarrow> eventually (\<lambda>x. x \<in> z) F" |
61810 | 3992 |
unfolding Z_def by (auto elim: eventually_mono intro: set_mp[OF closure_subset]) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3993 |
have "(\<forall>B \<subseteq> Z. finite B \<longrightarrow> U \<inter> \<Inter>B \<noteq> {})" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3994 |
proof (intro allI impI) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3995 |
fix B assume "finite B" "B \<subseteq> Z" |
60420 | 3996 |
with \<open>finite B\<close> ev_Z F(2) have "eventually (\<lambda>x. x \<in> U \<inter> (\<Inter>B)) F" |
60040
1fa1023b13b9
move MOST and INFM in Infinite_Set to Filter; change them to abbreviations over the cofinite filter
hoelzl
parents:
60017
diff
changeset
|
3997 |
by (auto simp: eventually_ball_finite_distrib eventually_conj_iff) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3998 |
with F show "U \<inter> \<Inter>B \<noteq> {}" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3999 |
by (intro notI) (simp add: eventually_False) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4000 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4001 |
ultimately have "U \<inter> \<Inter>Z \<noteq> {}" |
60420 | 4002 |
using \<open>compact U\<close> unfolding compact_fip by blast |
53282 | 4003 |
then obtain x where "x \<in> U" and x: "\<And>z. z \<in> Z \<Longrightarrow> x \<in> z" |
4004 |
by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4005 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4006 |
have "\<And>P. eventually P (inf (nhds x) F) \<Longrightarrow> P \<noteq> bot" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4007 |
unfolding eventually_inf eventually_nhds |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4008 |
proof safe |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4009 |
fix P Q R S |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4010 |
assume "eventually R F" "open S" "x \<in> S" |
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
4011 |
with open_Int_closure_eq_empty[of S "{x. R x}"] x[of "closure {x. R x}"] |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4012 |
have "S \<inter> {x. R x} \<noteq> {}" by (auto simp: Z_def) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4013 |
moreover assume "Ball S Q" "\<forall>x. Q x \<and> R x \<longrightarrow> bot x" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4014 |
ultimately show False by (auto simp: set_eq_iff) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4015 |
qed |
60420 | 4016 |
with \<open>x \<in> U\<close> show "\<exists>x\<in>U. inf (nhds x) F \<noteq> bot" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4017 |
by (metis eventually_bot) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4018 |
next |
53282 | 4019 |
fix A |
4020 |
assume A: "\<forall>a\<in>A. closed a" "\<forall>B\<subseteq>A. finite B \<longrightarrow> U \<inter> \<Inter>B \<noteq> {}" "U \<inter> \<Inter>A = {}" |
|
63040 | 4021 |
define F where "F = (INF a:insert U A. principal a)" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4022 |
have "F \<noteq> bot" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4023 |
unfolding F_def |
57276 | 4024 |
proof (rule INF_filter_not_bot) |
4025 |
fix X assume "X \<subseteq> insert U A" "finite X" |
|
4026 |
moreover with A(2)[THEN spec, of "X - {U}"] have "U \<inter> \<Inter>(X - {U}) \<noteq> {}" |
|
53282 | 4027 |
by auto |
57276 | 4028 |
ultimately show "(INF a:X. principal a) \<noteq> bot" |
4029 |
by (auto simp add: INF_principal_finite principal_eq_bot_iff) |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4030 |
qed |
57276 | 4031 |
moreover |
4032 |
have "F \<le> principal U" |
|
4033 |
unfolding F_def by auto |
|
4034 |
then have "eventually (\<lambda>x. x \<in> U) F" |
|
4035 |
by (auto simp: le_filter_def eventually_principal) |
|
53282 | 4036 |
moreover |
4037 |
assume "\<forall>F. F \<noteq> bot \<longrightarrow> eventually (\<lambda>x. x \<in> U) F \<longrightarrow> (\<exists>x\<in>U. inf (nhds x) F \<noteq> bot)" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4038 |
ultimately obtain x where "x \<in> U" and x: "inf (nhds x) F \<noteq> bot" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4039 |
by auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4040 |
|
57276 | 4041 |
{ fix V assume "V \<in> A" |
4042 |
then have "F \<le> principal V" |
|
4043 |
unfolding F_def by (intro INF_lower2[of V]) auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4044 |
then have V: "eventually (\<lambda>x. x \<in> V) F" |
57276 | 4045 |
by (auto simp: le_filter_def eventually_principal) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4046 |
have "x \<in> closure V" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4047 |
unfolding closure_iff_nhds_not_empty |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4048 |
proof (intro impI allI) |
53282 | 4049 |
fix S A |
4050 |
assume "open S" "x \<in> S" "S \<subseteq> A" |
|
4051 |
then have "eventually (\<lambda>x. x \<in> A) (nhds x)" |
|
4052 |
by (auto simp: eventually_nhds) |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4053 |
with V have "eventually (\<lambda>x. x \<in> V \<inter> A) (inf (nhds x) F)" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4054 |
by (auto simp: eventually_inf) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4055 |
with x show "V \<inter> A \<noteq> {}" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4056 |
by (auto simp del: Int_iff simp add: trivial_limit_def) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4057 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4058 |
then have "x \<in> V" |
60420 | 4059 |
using \<open>V \<in> A\<close> A(1) by simp |
53282 | 4060 |
} |
60420 | 4061 |
with \<open>x\<in>U\<close> have "x \<in> U \<inter> \<Inter>A" by auto |
4062 |
with \<open>U \<inter> \<Inter>A = {}\<close> show False by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4063 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4064 |
|
50941
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4065 |
definition "countably_compact U \<longleftrightarrow> |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4066 |
(\<forall>A. countable A \<longrightarrow> (\<forall>a\<in>A. open a) \<longrightarrow> U \<subseteq> \<Union>A \<longrightarrow> (\<exists>T\<subseteq>A. finite T \<and> U \<subseteq> \<Union>T))" |
50941
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4067 |
|
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4068 |
lemma countably_compactE: |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4069 |
assumes "countably_compact s" and "\<forall>t\<in>C. open t" and "s \<subseteq> \<Union>C" "countable C" |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4070 |
obtains C' where "C' \<subseteq> C" and "finite C'" and "s \<subseteq> \<Union>C'" |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4071 |
using assms unfolding countably_compact_def by metis |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4072 |
|
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4073 |
lemma countably_compactI: |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4074 |
assumes "\<And>C. \<forall>t\<in>C. open t \<Longrightarrow> s \<subseteq> \<Union>C \<Longrightarrow> countable C \<Longrightarrow> (\<exists>C'\<subseteq>C. finite C' \<and> s \<subseteq> \<Union>C')" |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4075 |
shows "countably_compact s" |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4076 |
using assms unfolding countably_compact_def by metis |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4077 |
|
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4078 |
lemma compact_imp_countably_compact: "compact U \<Longrightarrow> countably_compact U" |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4079 |
by (auto simp: compact_eq_heine_borel countably_compact_def) |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4080 |
|
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4081 |
lemma countably_compact_imp_compact: |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4082 |
assumes "countably_compact U" |
53282 | 4083 |
and ccover: "countable B" "\<forall>b\<in>B. open b" |
4084 |
and basis: "\<And>T x. open T \<Longrightarrow> x \<in> T \<Longrightarrow> x \<in> U \<Longrightarrow> \<exists>b\<in>B. x \<in> b \<and> b \<inter> U \<subseteq> T" |
|
50941
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4085 |
shows "compact U" |
60420 | 4086 |
using \<open>countably_compact U\<close> |
53282 | 4087 |
unfolding compact_eq_heine_borel countably_compact_def |
50941
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4088 |
proof safe |
53282 | 4089 |
fix A |
4090 |
assume A: "\<forall>a\<in>A. open a" "U \<subseteq> \<Union>A" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4091 |
assume *: "\<forall>A. countable A \<longrightarrow> (\<forall>a\<in>A. open a) \<longrightarrow> U \<subseteq> \<Union>A \<longrightarrow> (\<exists>T\<subseteq>A. finite T \<and> U \<subseteq> \<Union>T)" |
63040 | 4092 |
moreover define C where "C = {b\<in>B. \<exists>a\<in>A. b \<inter> U \<subseteq> a}" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4093 |
ultimately have "countable C" "\<forall>a\<in>C. open a" |
50941
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4094 |
unfolding C_def using ccover by auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4095 |
moreover |
50941
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4096 |
have "\<Union>A \<inter> U \<subseteq> \<Union>C" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4097 |
proof safe |
53282 | 4098 |
fix x a |
4099 |
assume "x \<in> U" "x \<in> a" "a \<in> A" |
|
4100 |
with basis[of a x] A obtain b where "b \<in> B" "x \<in> b" "b \<inter> U \<subseteq> a" |
|
4101 |
by blast |
|
60420 | 4102 |
with \<open>a \<in> A\<close> show "x \<in> \<Union>C" |
53282 | 4103 |
unfolding C_def by auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4104 |
qed |
60420 | 4105 |
then have "U \<subseteq> \<Union>C" using \<open>U \<subseteq> \<Union>A\<close> by auto |
53374
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
53291
diff
changeset
|
4106 |
ultimately obtain T where T: "T\<subseteq>C" "finite T" "U \<subseteq> \<Union>T" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4107 |
using * by metis |
53374
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
53291
diff
changeset
|
4108 |
then have "\<forall>t\<in>T. \<exists>a\<in>A. t \<inter> U \<subseteq> a" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4109 |
by (auto simp: C_def) |
55522 | 4110 |
then obtain f where "\<forall>t\<in>T. f t \<in> A \<and> t \<inter> U \<subseteq> f t" |
4111 |
unfolding bchoice_iff Bex_def .. |
|
53374
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
53291
diff
changeset
|
4112 |
with T show "\<exists>T\<subseteq>A. finite T \<and> U \<subseteq> \<Union>T" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4113 |
unfolding C_def by (intro exI[of _ "f`T"]) fastforce |
50941
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4114 |
qed |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4115 |
|
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4116 |
lemma countably_compact_imp_compact_second_countable: |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4117 |
"countably_compact U \<Longrightarrow> compact (U :: 'a :: second_countable_topology set)" |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4118 |
proof (rule countably_compact_imp_compact) |
53282 | 4119 |
fix T and x :: 'a |
4120 |
assume "open T" "x \<in> T" |
|
55522 | 4121 |
from topological_basisE[OF is_basis this] obtain b where |
4122 |
"b \<in> (SOME B. countable B \<and> topological_basis B)" "x \<in> b" "b \<subseteq> T" . |
|
53282 | 4123 |
then show "\<exists>b\<in>SOME B. countable B \<and> topological_basis B. x \<in> b \<and> b \<inter> U \<subseteq> T" |
55522 | 4124 |
by blast |
50941
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4125 |
qed (insert countable_basis topological_basis_open[OF is_basis], auto) |
36437 | 4126 |
|
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4127 |
lemma countably_compact_eq_compact: |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4128 |
"countably_compact U \<longleftrightarrow> compact (U :: 'a :: second_countable_topology set)" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4129 |
using countably_compact_imp_compact_second_countable compact_imp_countably_compact by blast |
53282 | 4130 |
|
60420 | 4131 |
subsubsection\<open>Sequential compactness\<close> |
33175 | 4132 |
|
53282 | 4133 |
definition seq_compact :: "'a::topological_space set \<Rightarrow> bool" |
4134 |
where "seq_compact S \<longleftrightarrow> |
|
61973 | 4135 |
(\<forall>f. (\<forall>n. f n \<in> S) \<longrightarrow> (\<exists>l\<in>S. \<exists>r. subseq r \<and> ((f \<circ> r) \<longlongrightarrow> l) sequentially))" |
33175 | 4136 |
|
54070 | 4137 |
lemma seq_compactI: |
61973 | 4138 |
assumes "\<And>f. \<forall>n. f n \<in> S \<Longrightarrow> \<exists>l\<in>S. \<exists>r. subseq r \<and> ((f \<circ> r) \<longlongrightarrow> l) sequentially" |
54070 | 4139 |
shows "seq_compact S" |
4140 |
unfolding seq_compact_def using assms by fast |
|
4141 |
||
4142 |
lemma seq_compactE: |
|
4143 |
assumes "seq_compact S" "\<forall>n. f n \<in> S" |
|
61973 | 4144 |
obtains l r where "l \<in> S" "subseq r" "((f \<circ> r) \<longlongrightarrow> l) sequentially" |
54070 | 4145 |
using assms unfolding seq_compact_def by fast |
4146 |
||
4147 |
lemma closed_sequentially: (* TODO: move upwards *) |
|
61969 | 4148 |
assumes "closed s" and "\<forall>n. f n \<in> s" and "f \<longlonglongrightarrow> l" |
54070 | 4149 |
shows "l \<in> s" |
4150 |
proof (rule ccontr) |
|
4151 |
assume "l \<notin> s" |
|
61969 | 4152 |
with \<open>closed s\<close> and \<open>f \<longlonglongrightarrow> l\<close> have "eventually (\<lambda>n. f n \<in> - s) sequentially" |
54070 | 4153 |
by (fast intro: topological_tendstoD) |
60420 | 4154 |
with \<open>\<forall>n. f n \<in> s\<close> show "False" |
54070 | 4155 |
by simp |
4156 |
qed |
|
4157 |
||
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
4158 |
lemma seq_compact_Int_closed: |
54070 | 4159 |
assumes "seq_compact s" and "closed t" |
4160 |
shows "seq_compact (s \<inter> t)" |
|
4161 |
proof (rule seq_compactI) |
|
4162 |
fix f assume "\<forall>n::nat. f n \<in> s \<inter> t" |
|
4163 |
hence "\<forall>n. f n \<in> s" and "\<forall>n. f n \<in> t" |
|
4164 |
by simp_all |
|
60420 | 4165 |
from \<open>seq_compact s\<close> and \<open>\<forall>n. f n \<in> s\<close> |
61969 | 4166 |
obtain l r where "l \<in> s" and r: "subseq r" and l: "(f \<circ> r) \<longlonglongrightarrow> l" |
54070 | 4167 |
by (rule seq_compactE) |
60420 | 4168 |
from \<open>\<forall>n. f n \<in> t\<close> have "\<forall>n. (f \<circ> r) n \<in> t" |
54070 | 4169 |
by simp |
60420 | 4170 |
from \<open>closed t\<close> and this and l have "l \<in> t" |
54070 | 4171 |
by (rule closed_sequentially) |
61969 | 4172 |
with \<open>l \<in> s\<close> and r and l show "\<exists>l\<in>s \<inter> t. \<exists>r. subseq r \<and> (f \<circ> r) \<longlonglongrightarrow> l" |
54070 | 4173 |
by fast |
4174 |
qed |
|
4175 |
||
4176 |
lemma seq_compact_closed_subset: |
|
4177 |
assumes "closed s" and "s \<subseteq> t" and "seq_compact t" |
|
4178 |
shows "seq_compact s" |
|
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
4179 |
using assms seq_compact_Int_closed [of t s] by (simp add: Int_absorb1) |
54070 | 4180 |
|
50941
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4181 |
lemma seq_compact_imp_countably_compact: |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4182 |
fixes U :: "'a :: first_countable_topology set" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4183 |
assumes "seq_compact U" |
50941
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4184 |
shows "countably_compact U" |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4185 |
proof (safe intro!: countably_compactI) |
52624 | 4186 |
fix A |
4187 |
assume A: "\<forall>a\<in>A. open a" "U \<subseteq> \<Union>A" "countable A" |
|
61969 | 4188 |
have subseq: "\<And>X. range X \<subseteq> U \<Longrightarrow> \<exists>r x. x \<in> U \<and> subseq r \<and> (X \<circ> r) \<longlonglongrightarrow> x" |
60420 | 4189 |
using \<open>seq_compact U\<close> by (fastforce simp: seq_compact_def subset_eq) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4190 |
show "\<exists>T\<subseteq>A. finite T \<and> U \<subseteq> \<Union>T" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4191 |
proof cases |
52624 | 4192 |
assume "finite A" |
4193 |
with A show ?thesis by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4194 |
next |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4195 |
assume "infinite A" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4196 |
then have "A \<noteq> {}" by auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4197 |
show ?thesis |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4198 |
proof (rule ccontr) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4199 |
assume "\<not> (\<exists>T\<subseteq>A. finite T \<and> U \<subseteq> \<Union>T)" |
53282 | 4200 |
then have "\<forall>T. \<exists>x. T \<subseteq> A \<and> finite T \<longrightarrow> (x \<in> U - \<Union>T)" |
4201 |
by auto |
|
4202 |
then obtain X' where T: "\<And>T. T \<subseteq> A \<Longrightarrow> finite T \<Longrightarrow> X' T \<in> U - \<Union>T" |
|
4203 |
by metis |
|
63040 | 4204 |
define X where "X n = X' (from_nat_into A ` {.. n})" for n |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4205 |
have X: "\<And>n. X n \<in> U - (\<Union>i\<le>n. from_nat_into A i)" |
62343
24106dc44def
prefer abbreviations for compound operators INFIMUM and SUPREMUM
haftmann
parents:
62131
diff
changeset
|
4206 |
using \<open>A \<noteq> {}\<close> unfolding X_def by (intro T) (auto intro: from_nat_into) |
53282 | 4207 |
then have "range X \<subseteq> U" |
4208 |
by auto |
|
61969 | 4209 |
with subseq[of X] obtain r x where "x \<in> U" and r: "subseq r" "(X \<circ> r) \<longlonglongrightarrow> x" |
53282 | 4210 |
by auto |
60420 | 4211 |
from \<open>x\<in>U\<close> \<open>U \<subseteq> \<Union>A\<close> from_nat_into_surj[OF \<open>countable A\<close>] |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4212 |
obtain n where "x \<in> from_nat_into A n" by auto |
60420 | 4213 |
with r(2) A(1) from_nat_into[OF \<open>A \<noteq> {}\<close>, of n] |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4214 |
have "eventually (\<lambda>i. X (r i) \<in> from_nat_into A n) sequentially" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4215 |
unfolding tendsto_def by (auto simp: comp_def) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4216 |
then obtain N where "\<And>i. N \<le> i \<Longrightarrow> X (r i) \<in> from_nat_into A n" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4217 |
by (auto simp: eventually_sequentially) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4218 |
moreover from X have "\<And>i. n \<le> r i \<Longrightarrow> X (r i) \<notin> from_nat_into A n" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4219 |
by auto |
60420 | 4220 |
moreover from \<open>subseq r\<close>[THEN seq_suble, of "max n N"] have "\<exists>i. n \<le> r i \<and> N \<le> i" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4221 |
by (auto intro!: exI[of _ "max n N"]) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4222 |
ultimately show False |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4223 |
by auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4224 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4225 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4226 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4227 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4228 |
lemma compact_imp_seq_compact: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4229 |
fixes U :: "'a :: first_countable_topology set" |
53282 | 4230 |
assumes "compact U" |
4231 |
shows "seq_compact U" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4232 |
unfolding seq_compact_def |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4233 |
proof safe |
52624 | 4234 |
fix X :: "nat \<Rightarrow> 'a" |
4235 |
assume "\<forall>n. X n \<in> U" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4236 |
then have "eventually (\<lambda>x. x \<in> U) (filtermap X sequentially)" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4237 |
by (auto simp: eventually_filtermap) |
52624 | 4238 |
moreover |
4239 |
have "filtermap X sequentially \<noteq> bot" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4240 |
by (simp add: trivial_limit_def eventually_filtermap) |
52624 | 4241 |
ultimately |
4242 |
obtain x where "x \<in> U" and x: "inf (nhds x) (filtermap X sequentially) \<noteq> bot" (is "?F \<noteq> _") |
|
60420 | 4243 |
using \<open>compact U\<close> by (auto simp: compact_filter) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4244 |
|
55522 | 4245 |
from countable_basis_at_decseq[of x] |
4246 |
obtain A where A: |
|
4247 |
"\<And>i. open (A i)" |
|
4248 |
"\<And>i. x \<in> A i" |
|
4249 |
"\<And>S. open S \<Longrightarrow> x \<in> S \<Longrightarrow> eventually (\<lambda>i. A i \<subseteq> S) sequentially" |
|
4250 |
by blast |
|
63040 | 4251 |
define s where "s n i = (SOME j. i < j \<and> X j \<in> A (Suc n))" for n i |
52624 | 4252 |
{ |
4253 |
fix n i |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4254 |
have "\<exists>a. i < a \<and> X a \<in> A (Suc n)" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4255 |
proof (rule ccontr) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4256 |
assume "\<not> (\<exists>a>i. X a \<in> A (Suc n))" |
53282 | 4257 |
then have "\<And>a. Suc i \<le> a \<Longrightarrow> X a \<notin> A (Suc n)" |
4258 |
by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4259 |
then have "eventually (\<lambda>x. x \<notin> A (Suc n)) (filtermap X sequentially)" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4260 |
by (auto simp: eventually_filtermap eventually_sequentially) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4261 |
moreover have "eventually (\<lambda>x. x \<in> A (Suc n)) (nhds x)" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4262 |
using A(1,2)[of "Suc n"] by (auto simp: eventually_nhds) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4263 |
ultimately have "eventually (\<lambda>x. False) ?F" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4264 |
by (auto simp add: eventually_inf) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4265 |
with x show False |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4266 |
by (simp add: eventually_False) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4267 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4268 |
then have "i < s n i" "X (s n i) \<in> A (Suc n)" |
52624 | 4269 |
unfolding s_def by (auto intro: someI2_ex) |
4270 |
} |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4271 |
note s = this |
63040 | 4272 |
define r where "r = rec_nat (s 0 0) s" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4273 |
have "subseq r" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4274 |
by (auto simp: r_def s subseq_Suc_iff) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4275 |
moreover |
61969 | 4276 |
have "(\<lambda>n. X (r n)) \<longlonglongrightarrow> x" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4277 |
proof (rule topological_tendstoI) |
52624 | 4278 |
fix S |
4279 |
assume "open S" "x \<in> S" |
|
53282 | 4280 |
with A(3) have "eventually (\<lambda>i. A i \<subseteq> S) sequentially" |
4281 |
by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4282 |
moreover |
52624 | 4283 |
{ |
4284 |
fix i |
|
4285 |
assume "Suc 0 \<le> i" |
|
4286 |
then have "X (r i) \<in> A i" |
|
4287 |
by (cases i) (simp_all add: r_def s) |
|
4288 |
} |
|
4289 |
then have "eventually (\<lambda>i. X (r i) \<in> A i) sequentially" |
|
4290 |
by (auto simp: eventually_sequentially) |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4291 |
ultimately show "eventually (\<lambda>i. X (r i) \<in> S) sequentially" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4292 |
by eventually_elim auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4293 |
qed |
61969 | 4294 |
ultimately show "\<exists>x \<in> U. \<exists>r. subseq r \<and> (X \<circ> r) \<longlonglongrightarrow> x" |
60420 | 4295 |
using \<open>x \<in> U\<close> by (auto simp: convergent_def comp_def) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4296 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4297 |
|
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4298 |
lemma countably_compact_imp_acc_point: |
53291 | 4299 |
assumes "countably_compact s" |
4300 |
and "countable t" |
|
4301 |
and "infinite t" |
|
4302 |
and "t \<subseteq> s" |
|
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4303 |
shows "\<exists>x\<in>s. \<forall>U. x\<in>U \<and> open U \<longrightarrow> infinite (U \<inter> t)" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4304 |
proof (rule ccontr) |
63040 | 4305 |
define C where "C = (\<lambda>F. interior (F \<union> (- t))) ` {F. finite F \<and> F \<subseteq> t }" |
60420 | 4306 |
note \<open>countably_compact s\<close> |
53282 | 4307 |
moreover have "\<forall>t\<in>C. open t" |
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4308 |
by (auto simp: C_def) |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4309 |
moreover |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4310 |
assume "\<not> (\<exists>x\<in>s. \<forall>U. x\<in>U \<and> open U \<longrightarrow> infinite (U \<inter> t))" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4311 |
then have s: "\<And>x. x \<in> s \<Longrightarrow> \<exists>U. x\<in>U \<and> open U \<and> finite (U \<inter> t)" by metis |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4312 |
have "s \<subseteq> \<Union>C" |
60420 | 4313 |
using \<open>t \<subseteq> s\<close> |
62343
24106dc44def
prefer abbreviations for compound operators INFIMUM and SUPREMUM
haftmann
parents:
62131
diff
changeset
|
4314 |
unfolding C_def |
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4315 |
apply (safe dest!: s) |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4316 |
apply (rule_tac a="U \<inter> t" in UN_I) |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4317 |
apply (auto intro!: interiorI simp add: finite_subset) |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4318 |
done |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4319 |
moreover |
60420 | 4320 |
from \<open>countable t\<close> have "countable C" |
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4321 |
unfolding C_def by (auto intro: countable_Collect_finite_subset) |
55522 | 4322 |
ultimately |
4323 |
obtain D where "D \<subseteq> C" "finite D" "s \<subseteq> \<Union>D" |
|
4324 |
by (rule countably_compactE) |
|
53282 | 4325 |
then obtain E where E: "E \<subseteq> {F. finite F \<and> F \<subseteq> t }" "finite E" |
4326 |
and s: "s \<subseteq> (\<Union>F\<in>E. interior (F \<union> (- t)))" |
|
62343
24106dc44def
prefer abbreviations for compound operators INFIMUM and SUPREMUM
haftmann
parents:
62131
diff
changeset
|
4327 |
by (metis (lifting) finite_subset_image C_def) |
60420 | 4328 |
from s \<open>t \<subseteq> s\<close> have "t \<subseteq> \<Union>E" |
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4329 |
using interior_subset by blast |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4330 |
moreover have "finite (\<Union>E)" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4331 |
using E by auto |
60420 | 4332 |
ultimately show False using \<open>infinite t\<close> |
53282 | 4333 |
by (auto simp: finite_subset) |
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4334 |
qed |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4335 |
|
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4336 |
lemma countable_acc_point_imp_seq_compact: |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4337 |
fixes s :: "'a::first_countable_topology set" |
53291 | 4338 |
assumes "\<forall>t. infinite t \<and> countable t \<and> t \<subseteq> s \<longrightarrow> |
4339 |
(\<exists>x\<in>s. \<forall>U. x\<in>U \<and> open U \<longrightarrow> infinite (U \<inter> t))" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4340 |
shows "seq_compact s" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4341 |
proof - |
52624 | 4342 |
{ |
4343 |
fix f :: "nat \<Rightarrow> 'a" |
|
4344 |
assume f: "\<forall>n. f n \<in> s" |
|
61973 | 4345 |
have "\<exists>l\<in>s. \<exists>r. subseq r \<and> ((f \<circ> r) \<longlongrightarrow> l) sequentially" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4346 |
proof (cases "finite (range f)") |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4347 |
case True |
50941
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4348 |
obtain l where "infinite {n. f n = f l}" |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4349 |
using pigeonhole_infinite[OF _ True] by auto |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4350 |
then obtain r where "subseq r" and fr: "\<forall>n. f (r n) = f l" |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4351 |
using infinite_enumerate by blast |
61969 | 4352 |
then have "subseq r \<and> (f \<circ> r) \<longlonglongrightarrow> f l" |
58729
e8ecc79aee43
add tendsto_const and tendsto_ident_at as simp and intro rules
hoelzl
parents:
58184
diff
changeset
|
4353 |
by (simp add: fr o_def) |
61969 | 4354 |
with f show "\<exists>l\<in>s. \<exists>r. subseq r \<and> (f \<circ> r) \<longlonglongrightarrow> l" |
50941
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4355 |
by auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4356 |
next |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4357 |
case False |
53282 | 4358 |
with f assms have "\<exists>x\<in>s. \<forall>U. x\<in>U \<and> open U \<longrightarrow> infinite (U \<inter> range f)" |
4359 |
by auto |
|
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4360 |
then obtain l where "l \<in> s" "\<forall>U. l\<in>U \<and> open U \<longrightarrow> infinite (U \<inter> range f)" .. |
61973 | 4361 |
from this(2) have "\<exists>r. subseq r \<and> ((f \<circ> r) \<longlongrightarrow> l) sequentially" |
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4362 |
using acc_point_range_imp_convergent_subsequence[of l f] by auto |
61973 | 4363 |
with \<open>l \<in> s\<close> show "\<exists>l\<in>s. \<exists>r. subseq r \<and> ((f \<circ> r) \<longlongrightarrow> l) sequentially" .. |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4364 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4365 |
} |
53282 | 4366 |
then show ?thesis |
4367 |
unfolding seq_compact_def by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4368 |
qed |
44075 | 4369 |
|
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4370 |
lemma seq_compact_eq_countably_compact: |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4371 |
fixes U :: "'a :: first_countable_topology set" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4372 |
shows "seq_compact U \<longleftrightarrow> countably_compact U" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4373 |
using |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4374 |
countable_acc_point_imp_seq_compact |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4375 |
countably_compact_imp_acc_point |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4376 |
seq_compact_imp_countably_compact |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4377 |
by metis |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4378 |
|
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4379 |
lemma seq_compact_eq_acc_point: |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4380 |
fixes s :: "'a :: first_countable_topology set" |
53291 | 4381 |
shows "seq_compact s \<longleftrightarrow> |
4382 |
(\<forall>t. infinite t \<and> countable t \<and> t \<subseteq> s --> (\<exists>x\<in>s. \<forall>U. x\<in>U \<and> open U \<longrightarrow> infinite (U \<inter> t)))" |
|
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4383 |
using |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4384 |
countable_acc_point_imp_seq_compact[of s] |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4385 |
countably_compact_imp_acc_point[of s] |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4386 |
seq_compact_imp_countably_compact[of s] |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4387 |
by metis |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4388 |
|
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4389 |
lemma seq_compact_eq_compact: |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4390 |
fixes U :: "'a :: second_countable_topology set" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4391 |
shows "seq_compact U \<longleftrightarrow> compact U" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4392 |
using seq_compact_eq_countably_compact countably_compact_eq_compact by blast |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4393 |
|
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4394 |
lemma bolzano_weierstrass_imp_seq_compact: |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4395 |
fixes s :: "'a::{t1_space, first_countable_topology} set" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4396 |
shows "\<forall>t. infinite t \<and> t \<subseteq> s --> (\<exists>x \<in> s. x islimpt t) \<Longrightarrow> seq_compact s" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4397 |
by (rule countable_acc_point_imp_seq_compact) (metis islimpt_eq_acc_point) |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4398 |
|
60420 | 4399 |
subsubsection\<open>Totally bounded\<close> |
50940
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4400 |
|
53282 | 4401 |
lemma cauchy_def: "Cauchy s \<longleftrightarrow> (\<forall>e>0. \<exists>N. \<forall>m n. m \<ge> N \<and> n \<ge> N --> dist(s m)(s n) < e)" |
52624 | 4402 |
unfolding Cauchy_def by metis |
4403 |
||
50940
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4404 |
lemma seq_compact_imp_totally_bounded: |
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4405 |
assumes "seq_compact s" |
58184
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4406 |
shows "\<forall>e>0. \<exists>k. finite k \<and> k \<subseteq> s \<and> s \<subseteq> (\<Union>x\<in>k. ball x e)" |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4407 |
proof - |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4408 |
{ fix e::real assume "e > 0" assume *: "\<And>k. finite k \<Longrightarrow> k \<subseteq> s \<Longrightarrow> \<not> s \<subseteq> (\<Union>x\<in>k. ball x e)" |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4409 |
let ?Q = "\<lambda>x n r. r \<in> s \<and> (\<forall>m < (n::nat). \<not> (dist (x m) r < e))" |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4410 |
have "\<exists>x. \<forall>n::nat. ?Q x n (x n)" |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4411 |
proof (rule dependent_wellorder_choice) |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4412 |
fix n x assume "\<And>y. y < n \<Longrightarrow> ?Q x y (x y)" |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4413 |
then have "\<not> s \<subseteq> (\<Union>x\<in>x ` {0..<n}. ball x e)" |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4414 |
using *[of "x ` {0 ..< n}"] by (auto simp: subset_eq) |
52624 | 4415 |
then obtain z where z:"z\<in>s" "z \<notin> (\<Union>x\<in>x ` {0..<n}. ball x e)" |
4416 |
unfolding subset_eq by auto |
|
58184
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4417 |
show "\<exists>r. ?Q x n r" |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4418 |
using z by auto |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4419 |
qed simp |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4420 |
then obtain x where "\<forall>n::nat. x n \<in> s" and x:"\<And>n m. m < n \<Longrightarrow> \<not> (dist (x m) (x n) < e)" |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4421 |
by blast |
61973 | 4422 |
then obtain l r where "l \<in> s" and r:"subseq r" and "((x \<circ> r) \<longlongrightarrow> l) sequentially" |
58184
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4423 |
using assms by (metis seq_compact_def) |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4424 |
from this(3) have "Cauchy (x \<circ> r)" |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4425 |
using LIMSEQ_imp_Cauchy by auto |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4426 |
then obtain N::nat where "\<And>m n. N \<le> m \<Longrightarrow> N \<le> n \<Longrightarrow> dist ((x \<circ> r) m) ((x \<circ> r) n) < e" |
60420 | 4427 |
unfolding cauchy_def using \<open>e > 0\<close> by blast |
58184
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4428 |
then have False |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4429 |
using x[of "r N" "r (N+1)"] r by (auto simp: subseq_def) } |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4430 |
then show ?thesis |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4431 |
by metis |
50940
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4432 |
qed |
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4433 |
|
60420 | 4434 |
subsubsection\<open>Heine-Borel theorem\<close> |
50940
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4435 |
|
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4436 |
lemma seq_compact_imp_heine_borel: |
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4437 |
fixes s :: "'a :: metric_space set" |
53282 | 4438 |
assumes "seq_compact s" |
4439 |
shows "compact s" |
|
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4440 |
proof - |
60420 | 4441 |
from seq_compact_imp_totally_bounded[OF \<open>seq_compact s\<close>] |
58184
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4442 |
obtain f where f: "\<forall>e>0. finite (f e) \<and> f e \<subseteq> s \<and> s \<subseteq> (\<Union>x\<in>f e. ball x e)" |
55522 | 4443 |
unfolding choice_iff' .. |
63040 | 4444 |
define K where "K = (\<lambda>(x, r). ball x r) ` ((\<Union>e \<in> \<rat> \<inter> {0 <..}. f e) \<times> \<rat>)" |
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4445 |
have "countably_compact s" |
60420 | 4446 |
using \<open>seq_compact s\<close> by (rule seq_compact_imp_countably_compact) |
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4447 |
then show "compact s" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4448 |
proof (rule countably_compact_imp_compact) |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4449 |
show "countable K" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4450 |
unfolding K_def using f |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4451 |
by (auto intro: countable_finite countable_subset countable_rat |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4452 |
intro!: countable_image countable_SIGMA countable_UN) |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4453 |
show "\<forall>b\<in>K. open b" by (auto simp: K_def) |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4454 |
next |
53282 | 4455 |
fix T x |
4456 |
assume T: "open T" "x \<in> T" and x: "x \<in> s" |
|
4457 |
from openE[OF T] obtain e where "0 < e" "ball x e \<subseteq> T" |
|
4458 |
by auto |
|
4459 |
then have "0 < e / 2" "ball x (e / 2) \<subseteq> T" |
|
4460 |
by auto |
|
60420 | 4461 |
from Rats_dense_in_real[OF \<open>0 < e / 2\<close>] obtain r where "r \<in> \<rat>" "0 < r" "r < e / 2" |
53282 | 4462 |
by auto |
60420 | 4463 |
from f[rule_format, of r] \<open>0 < r\<close> \<open>x \<in> s\<close> obtain k where "k \<in> f r" "x \<in> ball k r" |
62343
24106dc44def
prefer abbreviations for compound operators INFIMUM and SUPREMUM
haftmann
parents:
62131
diff
changeset
|
4464 |
by auto |
60420 | 4465 |
from \<open>r \<in> \<rat>\<close> \<open>0 < r\<close> \<open>k \<in> f r\<close> have "ball k r \<in> K" |
53282 | 4466 |
by (auto simp: K_def) |
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4467 |
then show "\<exists>b\<in>K. x \<in> b \<and> b \<inter> s \<subseteq> T" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4468 |
proof (rule bexI[rotated], safe) |
53282 | 4469 |
fix y |
4470 |
assume "y \<in> ball k r" |
|
60420 | 4471 |
with \<open>r < e / 2\<close> \<open>x \<in> ball k r\<close> have "dist x y < e" |
62397
5ae24f33d343
Substantial new material for multivariate analysis. Also removal of some duplicates.
paulson <lp15@cam.ac.uk>
parents:
62381
diff
changeset
|
4472 |
by (intro dist_triangle_half_r [of k _ e]) (auto simp: dist_commute) |
60420 | 4473 |
with \<open>ball x e \<subseteq> T\<close> show "y \<in> T" |
53282 | 4474 |
by auto |
4475 |
next |
|
4476 |
show "x \<in> ball k r" by fact |
|
4477 |
qed |
|
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
4478 |
qed |
50940
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4479 |
qed |
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4480 |
|
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4481 |
lemma compact_eq_seq_compact_metric: |
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4482 |
"compact (s :: 'a::metric_space set) \<longleftrightarrow> seq_compact s" |
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4483 |
using compact_imp_seq_compact seq_compact_imp_heine_borel by blast |
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4484 |
|
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4485 |
lemma compact_def: |
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4486 |
"compact (S :: 'a::metric_space set) \<longleftrightarrow> |
61969 | 4487 |
(\<forall>f. (\<forall>n. f n \<in> S) \<longrightarrow> (\<exists>l\<in>S. \<exists>r. subseq r \<and> (f \<circ> r) \<longlonglongrightarrow> l))" |
50940
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4488 |
unfolding compact_eq_seq_compact_metric seq_compact_def by auto |
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4489 |
|
60420 | 4490 |
subsubsection \<open>Complete the chain of compactness variants\<close> |
50944 | 4491 |
|
4492 |
lemma compact_eq_bolzano_weierstrass: |
|
4493 |
fixes s :: "'a::metric_space set" |
|
53282 | 4494 |
shows "compact s \<longleftrightarrow> (\<forall>t. infinite t \<and> t \<subseteq> s --> (\<exists>x \<in> s. x islimpt t))" |
4495 |
(is "?lhs = ?rhs") |
|
50944 | 4496 |
proof |
52624 | 4497 |
assume ?lhs |
53282 | 4498 |
then show ?rhs |
4499 |
using heine_borel_imp_bolzano_weierstrass[of s] by auto |
|
50944 | 4500 |
next |
52624 | 4501 |
assume ?rhs |
53282 | 4502 |
then show ?lhs |
50944 | 4503 |
unfolding compact_eq_seq_compact_metric by (rule bolzano_weierstrass_imp_seq_compact) |
4504 |
qed |
|
4505 |
||
4506 |
lemma bolzano_weierstrass_imp_bounded: |
|
53282 | 4507 |
"\<forall>t. infinite t \<and> t \<subseteq> s \<longrightarrow> (\<exists>x \<in> s. x islimpt t) \<Longrightarrow> bounded s" |
50944 | 4508 |
using compact_imp_bounded unfolding compact_eq_bolzano_weierstrass . |
4509 |
||
60420 | 4510 |
subsection \<open>Metric spaces with the Heine-Borel property\<close> |
4511 |
||
4512 |
text \<open> |
|
33175 | 4513 |
A metric space (or topological vector space) is said to have the |
4514 |
Heine-Borel property if every closed and bounded subset is compact. |
|
60420 | 4515 |
\<close> |
33175 | 4516 |
|
44207
ea99698c2070
locale-ize some definitions, so perfect_space and heine_borel can inherit from the proper superclasses
huffman
parents:
44170
diff
changeset
|
4517 |
class heine_borel = metric_space + |
33175 | 4518 |
assumes bounded_imp_convergent_subsequence: |
61973 | 4519 |
"bounded (range f) \<Longrightarrow> \<exists>l r. subseq r \<and> ((f \<circ> r) \<longlongrightarrow> l) sequentially" |
33175 | 4520 |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4521 |
lemma bounded_closed_imp_seq_compact: |
33175 | 4522 |
fixes s::"'a::heine_borel set" |
53282 | 4523 |
assumes "bounded s" |
4524 |
and "closed s" |
|
4525 |
shows "seq_compact s" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4526 |
proof (unfold seq_compact_def, clarify) |
53282 | 4527 |
fix f :: "nat \<Rightarrow> 'a" |
4528 |
assume f: "\<forall>n. f n \<in> s" |
|
60420 | 4529 |
with \<open>bounded s\<close> have "bounded (range f)" |
53282 | 4530 |
by (auto intro: bounded_subset) |
61973 | 4531 |
obtain l r where r: "subseq r" and l: "((f \<circ> r) \<longlongrightarrow> l) sequentially" |
60420 | 4532 |
using bounded_imp_convergent_subsequence [OF \<open>bounded (range f)\<close>] by auto |
53282 | 4533 |
from f have fr: "\<forall>n. (f \<circ> r) n \<in> s" |
4534 |
by simp |
|
60420 | 4535 |
have "l \<in> s" using \<open>closed s\<close> fr l |
54070 | 4536 |
by (rule closed_sequentially) |
61973 | 4537 |
show "\<exists>l\<in>s. \<exists>r. subseq r \<and> ((f \<circ> r) \<longlongrightarrow> l) sequentially" |
60420 | 4538 |
using \<open>l \<in> s\<close> r l by blast |
33175 | 4539 |
qed |
4540 |
||
50944 | 4541 |
lemma compact_eq_bounded_closed: |
4542 |
fixes s :: "'a::heine_borel set" |
|
53291 | 4543 |
shows "compact s \<longleftrightarrow> bounded s \<and> closed s" |
4544 |
(is "?lhs = ?rhs") |
|
50944 | 4545 |
proof |
52624 | 4546 |
assume ?lhs |
53282 | 4547 |
then show ?rhs |
52624 | 4548 |
using compact_imp_closed compact_imp_bounded |
4549 |
by blast |
|
50944 | 4550 |
next |
52624 | 4551 |
assume ?rhs |
53282 | 4552 |
then show ?lhs |
52624 | 4553 |
using bounded_closed_imp_seq_compact[of s] |
4554 |
unfolding compact_eq_seq_compact_metric |
|
4555 |
by auto |
|
50944 | 4556 |
qed |
4557 |
||
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
4558 |
lemma compact_closure [simp]: |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
4559 |
fixes S :: "'a::heine_borel set" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
4560 |
shows "compact(closure S) \<longleftrightarrow> bounded S" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
4561 |
by (meson bounded_closure bounded_subset closed_closure closure_subset compact_eq_bounded_closed) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
4562 |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
4563 |
lemma compact_components: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
4564 |
fixes s :: "'a::heine_borel set" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
4565 |
shows "\<lbrakk>compact s; c \<in> components s\<rbrakk> \<Longrightarrow> compact c" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
4566 |
by (meson bounded_subset closed_components in_components_subset compact_eq_bounded_closed) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
4567 |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
4568 |
lemma not_compact_UNIV[simp]: |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
4569 |
fixes s :: "'a::{real_normed_vector,perfect_space,heine_borel} set" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
4570 |
shows "~ compact (UNIV::'a set)" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
4571 |
by (simp add: compact_eq_bounded_closed) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
4572 |
|
50973
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
4573 |
(* TODO: is this lemma necessary? *) |
50972 | 4574 |
lemma bounded_increasing_convergent: |
4575 |
fixes s :: "nat \<Rightarrow> real" |
|
61969 | 4576 |
shows "bounded {s n| n. True} \<Longrightarrow> \<forall>n. s n \<le> s (Suc n) \<Longrightarrow> \<exists>l. s \<longlonglongrightarrow> l" |
50972 | 4577 |
using Bseq_mono_convergent[of s] incseq_Suc_iff[of s] |
4578 |
by (auto simp: image_def Bseq_eq_bounded convergent_def incseq_def) |
|
33175 | 4579 |
|
4580 |
instance real :: heine_borel |
|
4581 |
proof |
|
50998 | 4582 |
fix f :: "nat \<Rightarrow> real" |
4583 |
assume f: "bounded (range f)" |
|
50972 | 4584 |
obtain r where r: "subseq r" "monoseq (f \<circ> r)" |
4585 |
unfolding comp_def by (metis seq_monosub) |
|
4586 |
then have "Bseq (f \<circ> r)" |
|
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61552
diff
changeset
|
4587 |
unfolding Bseq_eq_bounded using f by (force intro: bounded_subset) |
61969 | 4588 |
with r show "\<exists>l r. subseq r \<and> (f \<circ> r) \<longlonglongrightarrow> l" |
50972 | 4589 |
using Bseq_monoseq_convergent[of "f \<circ> r"] by (auto simp: convergent_def) |
33175 | 4590 |
qed |
4591 |
||
62127 | 4592 |
lemma compact_lemma_general: |
4593 |
fixes f :: "nat \<Rightarrow> 'a" |
|
4594 |
fixes proj::"'a \<Rightarrow> 'b \<Rightarrow> 'c::heine_borel" (infixl "proj" 60) |
|
4595 |
fixes unproj:: "('b \<Rightarrow> 'c) \<Rightarrow> 'a" |
|
4596 |
assumes finite_basis: "finite basis" |
|
4597 |
assumes bounded_proj: "\<And>k. k \<in> basis \<Longrightarrow> bounded ((\<lambda>x. x proj k) ` range f)" |
|
4598 |
assumes proj_unproj: "\<And>e k. k \<in> basis \<Longrightarrow> (unproj e) proj k = e k" |
|
4599 |
assumes unproj_proj: "\<And>x. unproj (\<lambda>k. x proj k) = x" |
|
4600 |
shows "\<forall>d\<subseteq>basis. \<exists>l::'a. \<exists> r. |
|
4601 |
subseq r \<and> (\<forall>e>0. eventually (\<lambda>n. \<forall>i\<in>d. dist (f (r n) proj i) (l proj i) < e) sequentially)" |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
4602 |
proof safe |
62127 | 4603 |
fix d :: "'b set" |
4604 |
assume d: "d \<subseteq> basis" |
|
4605 |
with finite_basis have "finite d" |
|
53282 | 4606 |
by (blast intro: finite_subset) |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
4607 |
from this d show "\<exists>l::'a. \<exists>r. subseq r \<and> |
62127 | 4608 |
(\<forall>e>0. eventually (\<lambda>n. \<forall>i\<in>d. dist (f (r n) proj i) (l proj i) < e) sequentially)" |
52624 | 4609 |
proof (induct d) |
4610 |
case empty |
|
53282 | 4611 |
then show ?case |
4612 |
unfolding subseq_def by auto |
|
52624 | 4613 |
next |
4614 |
case (insert k d) |
|
62127 | 4615 |
have k[intro]: "k \<in> basis" |
53282 | 4616 |
using insert by auto |
62127 | 4617 |
have s': "bounded ((\<lambda>x. x proj k) ` range f)" |
4618 |
using k |
|
4619 |
by (rule bounded_proj) |
|
53282 | 4620 |
obtain l1::"'a" and r1 where r1: "subseq r1" |
62127 | 4621 |
and lr1: "\<forall>e > 0. eventually (\<lambda>n. \<forall>i\<in>d. dist (f (r1 n) proj i) (l1 proj i) < e) sequentially" |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
37452
diff
changeset
|
4622 |
using insert(3) using insert(4) by auto |
62127 | 4623 |
have f': "\<forall>n. f (r1 n) proj k \<in> (\<lambda>x. x proj k) ` range f" |
53282 | 4624 |
by simp |
62127 | 4625 |
have "bounded (range (\<lambda>i. f (r1 i) proj k))" |
50998 | 4626 |
by (metis (lifting) bounded_subset f' image_subsetI s') |
62127 | 4627 |
then obtain l2 r2 where r2:"subseq r2" and lr2:"((\<lambda>i. f (r1 (r2 i)) proj k) \<longlongrightarrow> l2) sequentially" |
4628 |
using bounded_imp_convergent_subsequence[of "\<lambda>i. f (r1 i) proj k"] |
|
53282 | 4629 |
by (auto simp: o_def) |
63040 | 4630 |
define r where "r = r1 \<circ> r2" |
53282 | 4631 |
have r:"subseq r" |
33175 | 4632 |
using r1 and r2 unfolding r_def o_def subseq_def by auto |
4633 |
moreover |
|
63040 | 4634 |
define l where "l = unproj (\<lambda>i. if i = k then l2 else l1 proj i)" |
52624 | 4635 |
{ |
4636 |
fix e::real |
|
53282 | 4637 |
assume "e > 0" |
62127 | 4638 |
from lr1 \<open>e > 0\<close> have N1: "eventually (\<lambda>n. \<forall>i\<in>d. dist (f (r1 n) proj i) (l1 proj i) < e) sequentially" |
52624 | 4639 |
by blast |
62127 | 4640 |
from lr2 \<open>e > 0\<close> have N2:"eventually (\<lambda>n. dist (f (r1 (r2 n)) proj k) l2 < e) sequentially" |
52624 | 4641 |
by (rule tendstoD) |
62127 | 4642 |
from r2 N1 have N1': "eventually (\<lambda>n. \<forall>i\<in>d. dist (f (r1 (r2 n)) proj i) (l1 proj i) < e) sequentially" |
33175 | 4643 |
by (rule eventually_subseq) |
62127 | 4644 |
have "eventually (\<lambda>n. \<forall>i\<in>(insert k d). dist (f (r n) proj i) (l proj i) < e) sequentially" |
53282 | 4645 |
using N1' N2 |
62127 | 4646 |
by eventually_elim (insert insert.prems, auto simp: l_def r_def o_def proj_unproj) |
33175 | 4647 |
} |
4648 |
ultimately show ?case by auto |
|
4649 |
qed |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
37452
diff
changeset
|
4650 |
qed |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
37452
diff
changeset
|
4651 |
|
62127 | 4652 |
lemma compact_lemma: |
4653 |
fixes f :: "nat \<Rightarrow> 'a::euclidean_space" |
|
4654 |
assumes "bounded (range f)" |
|
4655 |
shows "\<forall>d\<subseteq>Basis. \<exists>l::'a. \<exists> r. |
|
4656 |
subseq r \<and> (\<forall>e>0. eventually (\<lambda>n. \<forall>i\<in>d. dist (f (r n) \<bullet> i) (l \<bullet> i) < e) sequentially)" |
|
4657 |
by (rule compact_lemma_general[where unproj="\<lambda>e. \<Sum>i\<in>Basis. e i *\<^sub>R i"]) |
|
4658 |
(auto intro!: assms bounded_linear_inner_left bounded_linear_image |
|
4659 |
simp: euclidean_representation) |
|
4660 |
||
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
37452
diff
changeset
|
4661 |
instance euclidean_space \<subseteq> heine_borel |
33175 | 4662 |
proof |
50998 | 4663 |
fix f :: "nat \<Rightarrow> 'a" |
4664 |
assume f: "bounded (range f)" |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
37452
diff
changeset
|
4665 |
then obtain l::'a and r where r: "subseq r" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
4666 |
and l: "\<forall>e>0. eventually (\<lambda>n. \<forall>i\<in>Basis. dist (f (r n) \<bullet> i) (l \<bullet> i) < e) sequentially" |
50998 | 4667 |
using compact_lemma [OF f] by blast |
52624 | 4668 |
{ |
4669 |
fix e::real |
|
53282 | 4670 |
assume "e > 0" |
56541 | 4671 |
hence "e / real_of_nat DIM('a) > 0" by (simp add: DIM_positive) |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
4672 |
with l have "eventually (\<lambda>n. \<forall>i\<in>Basis. dist (f (r n) \<bullet> i) (l \<bullet> i) < e / (real_of_nat DIM('a))) sequentially" |
33175 | 4673 |
by simp |
4674 |
moreover |
|
52624 | 4675 |
{ |
4676 |
fix n |
|
4677 |
assume n: "\<forall>i\<in>Basis. dist (f (r n) \<bullet> i) (l \<bullet> i) < e / (real_of_nat DIM('a))" |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
4678 |
have "dist (f (r n)) l \<le> (\<Sum>i\<in>Basis. dist (f (r n) \<bullet> i) (l \<bullet> i))" |
52624 | 4679 |
apply (subst euclidean_dist_l2) |
4680 |
using zero_le_dist |
|
53282 | 4681 |
apply (rule setL2_le_setsum) |
4682 |
done |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
4683 |
also have "\<dots> < (\<Sum>i\<in>(Basis::'a set). e / (real_of_nat DIM('a)))" |
52624 | 4684 |
apply (rule setsum_strict_mono) |
4685 |
using n |
|
53282 | 4686 |
apply auto |
4687 |
done |
|
4688 |
finally have "dist (f (r n)) l < e" |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
4689 |
by auto |
33175 | 4690 |
} |
4691 |
ultimately have "eventually (\<lambda>n. dist (f (r n)) l < e) sequentially" |
|
61810 | 4692 |
by (rule eventually_mono) |
33175 | 4693 |
} |
61973 | 4694 |
then have *: "((f \<circ> r) \<longlongrightarrow> l) sequentially" |
52624 | 4695 |
unfolding o_def tendsto_iff by simp |
61973 | 4696 |
with r show "\<exists>l r. subseq r \<and> ((f \<circ> r) \<longlongrightarrow> l) sequentially" |
52624 | 4697 |
by auto |
33175 | 4698 |
qed |
4699 |
||
4700 |
lemma bounded_fst: "bounded s \<Longrightarrow> bounded (fst ` s)" |
|
52624 | 4701 |
unfolding bounded_def |
55775 | 4702 |
by (metis (erased, hide_lams) dist_fst_le image_iff order_trans) |
33175 | 4703 |
|
4704 |
lemma bounded_snd: "bounded s \<Longrightarrow> bounded (snd ` s)" |
|
52624 | 4705 |
unfolding bounded_def |
55775 | 4706 |
by (metis (no_types, hide_lams) dist_snd_le image_iff order.trans) |
33175 | 4707 |
|
37678
0040bafffdef
"prod" and "sum" replace "*" and "+" respectively
haftmann
parents:
37649
diff
changeset
|
4708 |
instance prod :: (heine_borel, heine_borel) heine_borel |
33175 | 4709 |
proof |
50998 | 4710 |
fix f :: "nat \<Rightarrow> 'a \<times> 'b" |
4711 |
assume f: "bounded (range f)" |
|
56154
f0a927235162
more complete set of lemmas wrt. image and composition
haftmann
parents:
56073
diff
changeset
|
4712 |
then have "bounded (fst ` range f)" |
f0a927235162
more complete set of lemmas wrt. image and composition
haftmann
parents:
56073
diff
changeset
|
4713 |
by (rule bounded_fst) |
f0a927235162
more complete set of lemmas wrt. image and composition
haftmann
parents:
56073
diff
changeset
|
4714 |
then have s1: "bounded (range (fst \<circ> f))" |
f0a927235162
more complete set of lemmas wrt. image and composition
haftmann
parents:
56073
diff
changeset
|
4715 |
by (simp add: image_comp) |
61969 | 4716 |
obtain l1 r1 where r1: "subseq r1" and l1: "(\<lambda>n. fst (f (r1 n))) \<longlonglongrightarrow> l1" |
50998 | 4717 |
using bounded_imp_convergent_subsequence [OF s1] unfolding o_def by fast |
4718 |
from f have s2: "bounded (range (snd \<circ> f \<circ> r1))" |
|
4719 |
by (auto simp add: image_comp intro: bounded_snd bounded_subset) |
|
61973 | 4720 |
obtain l2 r2 where r2: "subseq r2" and l2: "((\<lambda>n. snd (f (r1 (r2 n)))) \<longlongrightarrow> l2) sequentially" |
50998 | 4721 |
using bounded_imp_convergent_subsequence [OF s2] |
33175 | 4722 |
unfolding o_def by fast |
61973 | 4723 |
have l1': "((\<lambda>n. fst (f (r1 (r2 n)))) \<longlongrightarrow> l1) sequentially" |
50972 | 4724 |
using LIMSEQ_subseq_LIMSEQ [OF l1 r2] unfolding o_def . |
61973 | 4725 |
have l: "((f \<circ> (r1 \<circ> r2)) \<longlongrightarrow> (l1, l2)) sequentially" |
33175 | 4726 |
using tendsto_Pair [OF l1' l2] unfolding o_def by simp |
4727 |
have r: "subseq (r1 \<circ> r2)" |
|
4728 |
using r1 r2 unfolding subseq_def by simp |
|
61973 | 4729 |
show "\<exists>l r. subseq r \<and> ((f \<circ> r) \<longlongrightarrow> l) sequentially" |
33175 | 4730 |
using l r by fast |
4731 |
qed |
|
4732 |
||
60420 | 4733 |
subsubsection \<open>Completeness\<close> |
33175 | 4734 |
|
62101 | 4735 |
lemma (in metric_space) completeI: |
61969 | 4736 |
assumes "\<And>f. \<forall>n. f n \<in> s \<Longrightarrow> Cauchy f \<Longrightarrow> \<exists>l\<in>s. f \<longlonglongrightarrow> l" |
54070 | 4737 |
shows "complete s" |
4738 |
using assms unfolding complete_def by fast |
|
4739 |
||
62101 | 4740 |
lemma (in metric_space) completeE: |
54070 | 4741 |
assumes "complete s" and "\<forall>n. f n \<in> s" and "Cauchy f" |
61969 | 4742 |
obtains l where "l \<in> s" and "f \<longlonglongrightarrow> l" |
54070 | 4743 |
using assms unfolding complete_def by fast |
4744 |
||
62101 | 4745 |
(* TODO: generalize to uniform spaces *) |
52624 | 4746 |
lemma compact_imp_complete: |
62101 | 4747 |
fixes s :: "'a::metric_space set" |
52624 | 4748 |
assumes "compact s" |
4749 |
shows "complete s" |
|
4750 |
proof - |
|
4751 |
{ |
|
4752 |
fix f |
|
4753 |
assume as: "(\<forall>n::nat. f n \<in> s)" "Cauchy f" |
|
61969 | 4754 |
from as(1) obtain l r where lr: "l\<in>s" "subseq r" "(f \<circ> r) \<longlonglongrightarrow> l" |
50971 | 4755 |
using assms unfolding compact_def by blast |
4756 |
||
4757 |
note lr' = seq_suble [OF lr(2)] |
|
52624 | 4758 |
{ |
53282 | 4759 |
fix e :: real |
4760 |
assume "e > 0" |
|
52624 | 4761 |
from as(2) obtain N where N:"\<forall>m n. N \<le> m \<and> N \<le> n \<longrightarrow> dist (f m) (f n) < e/2" |
4762 |
unfolding cauchy_def |
|
60420 | 4763 |
using \<open>e > 0\<close> |
53282 | 4764 |
apply (erule_tac x="e/2" in allE) |
52624 | 4765 |
apply auto |
4766 |
done |
|
60017
b785d6d06430
Overloading of ln and powr, but "approximation" no longer works for powr. Code generation also fails due to type ambiguity in scala.
paulson <lp15@cam.ac.uk>
parents:
59815
diff
changeset
|
4767 |
from lr(3)[unfolded lim_sequentially, THEN spec[where x="e/2"]] |
53282 | 4768 |
obtain M where M:"\<forall>n\<ge>M. dist ((f \<circ> r) n) l < e/2" |
60420 | 4769 |
using \<open>e > 0\<close> by auto |
52624 | 4770 |
{ |
53282 | 4771 |
fix n :: nat |
4772 |
assume n: "n \<ge> max N M" |
|
4773 |
have "dist ((f \<circ> r) n) l < e/2" |
|
4774 |
using n M by auto |
|
4775 |
moreover have "r n \<ge> N" |
|
4776 |
using lr'[of n] n by auto |
|
4777 |
then have "dist (f n) ((f \<circ> r) n) < e / 2" |
|
4778 |
using N and n by auto |
|
52624 | 4779 |
ultimately have "dist (f n) l < e" |
53282 | 4780 |
using dist_triangle_half_r[of "f (r n)" "f n" e l] |
4781 |
by (auto simp add: dist_commute) |
|
52624 | 4782 |
} |
53282 | 4783 |
then have "\<exists>N. \<forall>n\<ge>N. dist (f n) l < e" by blast |
52624 | 4784 |
} |
61973 | 4785 |
then have "\<exists>l\<in>s. (f \<longlongrightarrow> l) sequentially" using \<open>l\<in>s\<close> |
60017
b785d6d06430
Overloading of ln and powr, but "approximation" no longer works for powr. Code generation also fails due to type ambiguity in scala.
paulson <lp15@cam.ac.uk>
parents:
59815
diff
changeset
|
4786 |
unfolding lim_sequentially by auto |
52624 | 4787 |
} |
53282 | 4788 |
then show ?thesis unfolding complete_def by auto |
50971 | 4789 |
qed |
4790 |
||
4791 |
lemma nat_approx_posE: |
|
4792 |
fixes e::real |
|
4793 |
assumes "0 < e" |
|
53282 | 4794 |
obtains n :: nat where "1 / (Suc n) < e" |
50971 | 4795 |
proof atomize_elim |
61942 | 4796 |
have "1 / real (Suc (nat \<lceil>1/e\<rceil>)) < 1 / \<lceil>1/e\<rceil>" |
60420 | 4797 |
by (rule divide_strict_left_mono) (auto simp: \<open>0 < e\<close>) |
61942 | 4798 |
also have "1 / \<lceil>1/e\<rceil> \<le> 1 / (1/e)" |
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61552
diff
changeset
|
4799 |
by (rule divide_left_mono) (auto simp: \<open>0 < e\<close> ceiling_correct) |
50971 | 4800 |
also have "\<dots> = e" by simp |
4801 |
finally show "\<exists>n. 1 / real (Suc n) < e" .. |
|
4802 |
qed |
|
4803 |
||
4804 |
lemma compact_eq_totally_bounded: |
|
58184
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4805 |
"compact s \<longleftrightarrow> complete s \<and> (\<forall>e>0. \<exists>k. finite k \<and> s \<subseteq> (\<Union>x\<in>k. ball x e))" |
50971 | 4806 |
(is "_ \<longleftrightarrow> ?rhs") |
4807 |
proof |
|
4808 |
assume assms: "?rhs" |
|
4809 |
then obtain k where k: "\<And>e. 0 < e \<Longrightarrow> finite (k e)" "\<And>e. 0 < e \<Longrightarrow> s \<subseteq> (\<Union>x\<in>k e. ball x e)" |
|
4810 |
by (auto simp: choice_iff') |
|
4811 |
||
4812 |
show "compact s" |
|
4813 |
proof cases |
|
53282 | 4814 |
assume "s = {}" |
4815 |
then show "compact s" by (simp add: compact_def) |
|
50971 | 4816 |
next |
4817 |
assume "s \<noteq> {}" |
|
4818 |
show ?thesis |
|
4819 |
unfolding compact_def |
|
4820 |
proof safe |
|
53282 | 4821 |
fix f :: "nat \<Rightarrow> 'a" |
4822 |
assume f: "\<forall>n. f n \<in> s" |
|
4823 |
||
63040 | 4824 |
define e where "e n = 1 / (2 * Suc n)" for n |
50971 | 4825 |
then have [simp]: "\<And>n. 0 < e n" by auto |
63040 | 4826 |
define B where "B n U = (SOME b. infinite {n. f n \<in> b} \<and> (\<exists>x. b \<subseteq> ball x (e n) \<inter> U))" for n U |
53282 | 4827 |
{ |
4828 |
fix n U |
|
4829 |
assume "infinite {n. f n \<in> U}" |
|
50971 | 4830 |
then have "\<exists>b\<in>k (e n). infinite {i\<in>{n. f n \<in> U}. f i \<in> ball b (e n)}" |
4831 |
using k f by (intro pigeonhole_infinite_rel) (auto simp: subset_eq) |
|
55522 | 4832 |
then obtain a where |
4833 |
"a \<in> k (e n)" |
|
4834 |
"infinite {i \<in> {n. f n \<in> U}. f i \<in> ball a (e n)}" .. |
|
50971 | 4835 |
then have "\<exists>b. infinite {i. f i \<in> b} \<and> (\<exists>x. b \<subseteq> ball x (e n) \<inter> U)" |
4836 |
by (intro exI[of _ "ball a (e n) \<inter> U"] exI[of _ a]) (auto simp: ac_simps) |
|
4837 |
from someI_ex[OF this] |
|
4838 |
have "infinite {i. f i \<in> B n U}" "\<exists>x. B n U \<subseteq> ball x (e n) \<inter> U" |
|
53282 | 4839 |
unfolding B_def by auto |
4840 |
} |
|
50971 | 4841 |
note B = this |
4842 |
||
63040 | 4843 |
define F where "F = rec_nat (B 0 UNIV) B" |
53282 | 4844 |
{ |
4845 |
fix n |
|
4846 |
have "infinite {i. f i \<in> F n}" |
|
4847 |
by (induct n) (auto simp: F_def B) |
|
4848 |
} |
|
50971 | 4849 |
then have F: "\<And>n. \<exists>x. F (Suc n) \<subseteq> ball x (e n) \<inter> F n" |
4850 |
using B by (simp add: F_def) |
|
4851 |
then have F_dec: "\<And>m n. m \<le> n \<Longrightarrow> F n \<subseteq> F m" |
|
4852 |
using decseq_SucI[of F] by (auto simp: decseq_def) |
|
4853 |
||
4854 |
obtain sel where sel: "\<And>k i. i < sel k i" "\<And>k i. f (sel k i) \<in> F k" |
|
4855 |
proof (atomize_elim, unfold all_conj_distrib[symmetric], intro choice allI) |
|
4856 |
fix k i |
|
4857 |
have "infinite ({n. f n \<in> F k} - {.. i})" |
|
60420 | 4858 |
using \<open>infinite {n. f n \<in> F k}\<close> by auto |
50971 | 4859 |
from infinite_imp_nonempty[OF this] |
4860 |
show "\<exists>x>i. f x \<in> F k" |
|
4861 |
by (simp add: set_eq_iff not_le conj_commute) |
|
4862 |
qed |
|
4863 |
||
63040 | 4864 |
define t where "t = rec_nat (sel 0 0) (\<lambda>n i. sel (Suc n) i)" |
50971 | 4865 |
have "subseq t" |
4866 |
unfolding subseq_Suc_iff by (simp add: t_def sel) |
|
4867 |
moreover have "\<forall>i. (f \<circ> t) i \<in> s" |
|
4868 |
using f by auto |
|
4869 |
moreover |
|
53282 | 4870 |
{ |
4871 |
fix n |
|
4872 |
have "(f \<circ> t) n \<in> F n" |
|
4873 |
by (cases n) (simp_all add: t_def sel) |
|
4874 |
} |
|
50971 | 4875 |
note t = this |
4876 |
||
4877 |
have "Cauchy (f \<circ> t)" |
|
4878 |
proof (safe intro!: metric_CauchyI exI elim!: nat_approx_posE) |
|
53282 | 4879 |
fix r :: real and N n m |
4880 |
assume "1 / Suc N < r" "Suc N \<le> n" "Suc N \<le> m" |
|
50971 | 4881 |
then have "(f \<circ> t) n \<in> F (Suc N)" "(f \<circ> t) m \<in> F (Suc N)" "2 * e N < r" |
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61552
diff
changeset
|
4882 |
using F_dec t by (auto simp: e_def field_simps of_nat_Suc) |
50971 | 4883 |
with F[of N] obtain x where "dist x ((f \<circ> t) n) < e N" "dist x ((f \<circ> t) m) < e N" |
4884 |
by (auto simp: subset_eq) |
|
60420 | 4885 |
with dist_triangle[of "(f \<circ> t) m" "(f \<circ> t) n" x] \<open>2 * e N < r\<close> |
50971 | 4886 |
show "dist ((f \<circ> t) m) ((f \<circ> t) n) < r" |
4887 |
by (simp add: dist_commute) |
|
4888 |
qed |
|
4889 |
||
61969 | 4890 |
ultimately show "\<exists>l\<in>s. \<exists>r. subseq r \<and> (f \<circ> r) \<longlonglongrightarrow> l" |
50971 | 4891 |
using assms unfolding complete_def by blast |
4892 |
qed |
|
4893 |
qed |
|
4894 |
qed (metis compact_imp_complete compact_imp_seq_compact seq_compact_imp_totally_bounded) |
|
33175 | 4895 |
|
4896 |
lemma cauchy: "Cauchy s \<longleftrightarrow> (\<forall>e>0.\<exists> N::nat. \<forall>n\<ge>N. dist(s n)(s N) < e)" (is "?lhs = ?rhs") |
|
53282 | 4897 |
proof - |
4898 |
{ |
|
4899 |
assume ?rhs |
|
4900 |
{ |
|
4901 |
fix e::real |
|
33175 | 4902 |
assume "e>0" |
60420 | 4903 |
with \<open>?rhs\<close> obtain N where N:"\<forall>n\<ge>N. dist (s n) (s N) < e/2" |
33175 | 4904 |
by (erule_tac x="e/2" in allE) auto |
53282 | 4905 |
{ |
4906 |
fix n m |
|
33175 | 4907 |
assume nm:"N \<le> m \<and> N \<le> n" |
53282 | 4908 |
then have "dist (s m) (s n) < e" using N |
33175 | 4909 |
using dist_triangle_half_l[of "s m" "s N" "e" "s n"] |
4910 |
by blast |
|
4911 |
} |
|
53282 | 4912 |
then have "\<exists>N. \<forall>m n. N \<le> m \<and> N \<le> n \<longrightarrow> dist (s m) (s n) < e" |
33175 | 4913 |
by blast |
4914 |
} |
|
53282 | 4915 |
then have ?lhs |
33175 | 4916 |
unfolding cauchy_def |
4917 |
by blast |
|
4918 |
} |
|
53282 | 4919 |
then show ?thesis |
33175 | 4920 |
unfolding cauchy_def |
4921 |
using dist_triangle_half_l |
|
4922 |
by blast |
|
4923 |
qed |
|
4924 |
||
53282 | 4925 |
lemma cauchy_imp_bounded: |
4926 |
assumes "Cauchy s" |
|
4927 |
shows "bounded (range s)" |
|
4928 |
proof - |
|
4929 |
from assms obtain N :: nat where "\<forall>m n. N \<le> m \<and> N \<le> n \<longrightarrow> dist (s m) (s n) < 1" |
|
52624 | 4930 |
unfolding cauchy_def |
4931 |
apply (erule_tac x= 1 in allE) |
|
4932 |
apply auto |
|
4933 |
done |
|
53282 | 4934 |
then have N:"\<forall>n. N \<le> n \<longrightarrow> dist (s N) (s n) < 1" by auto |
33175 | 4935 |
moreover |
52624 | 4936 |
have "bounded (s ` {0..N})" |
4937 |
using finite_imp_bounded[of "s ` {1..N}"] by auto |
|
33175 | 4938 |
then obtain a where a:"\<forall>x\<in>s ` {0..N}. dist (s N) x \<le> a" |
4939 |
unfolding bounded_any_center [where a="s N"] by auto |
|
4940 |
ultimately show "?thesis" |
|
4941 |
unfolding bounded_any_center [where a="s N"] |
|
52624 | 4942 |
apply (rule_tac x="max a 1" in exI) |
4943 |
apply auto |
|
4944 |
apply (erule_tac x=y in allE) |
|
4945 |
apply (erule_tac x=y in ballE) |
|
4946 |
apply auto |
|
4947 |
done |
|
33175 | 4948 |
qed |
4949 |
||
4950 |
instance heine_borel < complete_space |
|
4951 |
proof |
|
4952 |
fix f :: "nat \<Rightarrow> 'a" assume "Cauchy f" |
|
53282 | 4953 |
then have "bounded (range f)" |
34104 | 4954 |
by (rule cauchy_imp_bounded) |
53282 | 4955 |
then have "compact (closure (range f))" |
50971 | 4956 |
unfolding compact_eq_bounded_closed by auto |
53282 | 4957 |
then have "complete (closure (range f))" |
50971 | 4958 |
by (rule compact_imp_complete) |
33175 | 4959 |
moreover have "\<forall>n. f n \<in> closure (range f)" |
4960 |
using closure_subset [of "range f"] by auto |
|
61973 | 4961 |
ultimately have "\<exists>l\<in>closure (range f). (f \<longlongrightarrow> l) sequentially" |
60420 | 4962 |
using \<open>Cauchy f\<close> unfolding complete_def by auto |
33175 | 4963 |
then show "convergent f" |
36660
1cc4ab4b7ff7
make (X ----> L) an abbreviation for (X ---> L) sequentially
huffman
parents:
36659
diff
changeset
|
4964 |
unfolding convergent_def by auto |
33175 | 4965 |
qed |
4966 |
||
44632 | 4967 |
instance euclidean_space \<subseteq> banach .. |
4968 |
||
54070 | 4969 |
lemma complete_UNIV: "complete (UNIV :: ('a::complete_space) set)" |
4970 |
proof (rule completeI) |
|
4971 |
fix f :: "nat \<Rightarrow> 'a" assume "Cauchy f" |
|
53282 | 4972 |
then have "convergent f" by (rule Cauchy_convergent) |
61969 | 4973 |
then show "\<exists>l\<in>UNIV. f \<longlonglongrightarrow> l" unfolding convergent_def by simp |
53282 | 4974 |
qed |
4975 |
||
4976 |
lemma complete_imp_closed: |
|
62101 | 4977 |
fixes s :: "'a::metric_space set" |
53282 | 4978 |
assumes "complete s" |
4979 |
shows "closed s" |
|
54070 | 4980 |
proof (unfold closed_sequential_limits, clarify) |
61969 | 4981 |
fix f x assume "\<forall>n. f n \<in> s" and "f \<longlonglongrightarrow> x" |
4982 |
from \<open>f \<longlonglongrightarrow> x\<close> have "Cauchy f" |
|
54070 | 4983 |
by (rule LIMSEQ_imp_Cauchy) |
61969 | 4984 |
with \<open>complete s\<close> and \<open>\<forall>n. f n \<in> s\<close> obtain l where "l \<in> s" and "f \<longlonglongrightarrow> l" |
54070 | 4985 |
by (rule completeE) |
61969 | 4986 |
from \<open>f \<longlonglongrightarrow> x\<close> and \<open>f \<longlonglongrightarrow> l\<close> have "x = l" |
54070 | 4987 |
by (rule LIMSEQ_unique) |
60420 | 4988 |
with \<open>l \<in> s\<close> show "x \<in> s" |
54070 | 4989 |
by simp |
4990 |
qed |
|
4991 |
||
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
4992 |
lemma complete_Int_closed: |
62101 | 4993 |
fixes s :: "'a::metric_space set" |
54070 | 4994 |
assumes "complete s" and "closed t" |
4995 |
shows "complete (s \<inter> t)" |
|
4996 |
proof (rule completeI) |
|
4997 |
fix f assume "\<forall>n. f n \<in> s \<inter> t" and "Cauchy f" |
|
4998 |
then have "\<forall>n. f n \<in> s" and "\<forall>n. f n \<in> t" |
|
4999 |
by simp_all |
|
61969 | 5000 |
from \<open>complete s\<close> obtain l where "l \<in> s" and "f \<longlonglongrightarrow> l" |
60420 | 5001 |
using \<open>\<forall>n. f n \<in> s\<close> and \<open>Cauchy f\<close> by (rule completeE) |
61969 | 5002 |
from \<open>closed t\<close> and \<open>\<forall>n. f n \<in> t\<close> and \<open>f \<longlonglongrightarrow> l\<close> have "l \<in> t" |
54070 | 5003 |
by (rule closed_sequentially) |
61969 | 5004 |
with \<open>l \<in> s\<close> and \<open>f \<longlonglongrightarrow> l\<close> show "\<exists>l\<in>s \<inter> t. f \<longlonglongrightarrow> l" |
54070 | 5005 |
by fast |
5006 |
qed |
|
5007 |
||
5008 |
lemma complete_closed_subset: |
|
62101 | 5009 |
fixes s :: "'a::metric_space set" |
54070 | 5010 |
assumes "closed s" and "s \<subseteq> t" and "complete t" |
5011 |
shows "complete s" |
|
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
5012 |
using assms complete_Int_closed [of t s] by (simp add: Int_absorb1) |
33175 | 5013 |
|
5014 |
lemma complete_eq_closed: |
|
54070 | 5015 |
fixes s :: "('a::complete_space) set" |
5016 |
shows "complete s \<longleftrightarrow> closed s" |
|
33175 | 5017 |
proof |
54070 | 5018 |
assume "closed s" then show "complete s" |
5019 |
using subset_UNIV complete_UNIV by (rule complete_closed_subset) |
|
33175 | 5020 |
next |
54070 | 5021 |
assume "complete s" then show "closed s" |
5022 |
by (rule complete_imp_closed) |
|
33175 | 5023 |
qed |
5024 |
||
5025 |
lemma convergent_eq_cauchy: |
|
5026 |
fixes s :: "nat \<Rightarrow> 'a::complete_space" |
|
61973 | 5027 |
shows "(\<exists>l. (s \<longlongrightarrow> l) sequentially) \<longleftrightarrow> Cauchy s" |
44632 | 5028 |
unfolding Cauchy_convergent_iff convergent_def .. |
33175 | 5029 |
|
5030 |
lemma convergent_imp_bounded: |
|
5031 |
fixes s :: "nat \<Rightarrow> 'a::metric_space" |
|
61973 | 5032 |
shows "(s \<longlongrightarrow> l) sequentially \<Longrightarrow> bounded (range s)" |
50939
ae7cd20ed118
replace convergent_imp_cauchy by LIMSEQ_imp_Cauchy
hoelzl
parents:
50938
diff
changeset
|
5033 |
by (intro cauchy_imp_bounded LIMSEQ_imp_Cauchy) |
33175 | 5034 |
|
5035 |
lemma compact_cball[simp]: |
|
5036 |
fixes x :: "'a::heine_borel" |
|
54070 | 5037 |
shows "compact (cball x e)" |
33175 | 5038 |
using compact_eq_bounded_closed bounded_cball closed_cball |
5039 |
by blast |
|
5040 |
||
5041 |
lemma compact_frontier_bounded[intro]: |
|
5042 |
fixes s :: "'a::heine_borel set" |
|
54070 | 5043 |
shows "bounded s \<Longrightarrow> compact (frontier s)" |
33175 | 5044 |
unfolding frontier_def |
5045 |
using compact_eq_bounded_closed |
|
5046 |
by blast |
|
5047 |
||
5048 |
lemma compact_frontier[intro]: |
|
5049 |
fixes s :: "'a::heine_borel set" |
|
53291 | 5050 |
shows "compact s \<Longrightarrow> compact (frontier s)" |
33175 | 5051 |
using compact_eq_bounded_closed compact_frontier_bounded |
5052 |
by blast |
|
5053 |
||
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
5054 |
corollary compact_sphere: |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
5055 |
fixes a :: "'a::{real_normed_vector,perfect_space,heine_borel}" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
5056 |
shows "compact (sphere a r)" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
5057 |
using compact_frontier [of "cball a r"] by simp |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
5058 |
|
33175 | 5059 |
lemma frontier_subset_compact: |
5060 |
fixes s :: "'a::heine_borel set" |
|
53291 | 5061 |
shows "compact s \<Longrightarrow> frontier s \<subseteq> s" |
33175 | 5062 |
using frontier_subset_closed compact_eq_bounded_closed |
5063 |
by blast |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
5064 |
|
62131
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5065 |
subsection\<open>Relations among convergence and absolute convergence for power series.\<close> |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5066 |
|
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5067 |
lemma summable_imp_bounded: |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5068 |
fixes f :: "nat \<Rightarrow> 'a::real_normed_vector" |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5069 |
shows "summable f \<Longrightarrow> bounded (range f)" |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5070 |
by (frule summable_LIMSEQ_zero) (simp add: convergent_imp_bounded) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5071 |
|
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5072 |
lemma summable_imp_sums_bounded: |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5073 |
"summable f \<Longrightarrow> bounded (range (\<lambda>n. setsum f {..<n}))" |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5074 |
by (auto simp: summable_def sums_def dest: convergent_imp_bounded) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5075 |
|
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5076 |
lemma power_series_conv_imp_absconv_weak: |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5077 |
fixes a:: "nat \<Rightarrow> 'a::{real_normed_div_algebra,banach}" and w :: 'a |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5078 |
assumes sum: "summable (\<lambda>n. a n * z ^ n)" and no: "norm w < norm z" |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5079 |
shows "summable (\<lambda>n. of_real(norm(a n)) * w ^ n)" |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5080 |
proof - |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5081 |
obtain M where M: "\<And>x. norm (a x * z ^ x) \<le> M" |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5082 |
using summable_imp_bounded [OF sum] by (force simp add: bounded_iff) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5083 |
then have *: "summable (\<lambda>n. norm (a n) * norm w ^ n)" |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5084 |
by (rule_tac M=M in Abel_lemma) (auto simp: norm_mult norm_power intro: no) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5085 |
show ?thesis |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5086 |
apply (rule series_comparison_complex [of "(\<lambda>n. of_real(norm(a n) * norm w ^ n))"]) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5087 |
apply (simp only: summable_complex_of_real *) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5088 |
apply (auto simp: norm_mult norm_power) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5089 |
done |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5090 |
qed |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5091 |
|
60420 | 5092 |
subsection \<open>Bounded closed nest property (proof does not use Heine-Borel)\<close> |
33175 | 5093 |
|
5094 |
lemma bounded_closed_nest: |
|
54070 | 5095 |
fixes s :: "nat \<Rightarrow> ('a::heine_borel) set" |
5096 |
assumes "\<forall>n. closed (s n)" |
|
5097 |
and "\<forall>n. s n \<noteq> {}" |
|
5098 |
and "\<forall>m n. m \<le> n \<longrightarrow> s n \<subseteq> s m" |
|
5099 |
and "bounded (s 0)" |
|
5100 |
shows "\<exists>a. \<forall>n. a \<in> s n" |
|
52624 | 5101 |
proof - |
54070 | 5102 |
from assms(2) obtain x where x: "\<forall>n. x n \<in> s n" |
5103 |
using choice[of "\<lambda>n x. x \<in> s n"] by auto |
|
5104 |
from assms(4,1) have "seq_compact (s 0)" |
|
5105 |
by (simp add: bounded_closed_imp_seq_compact) |
|
61969 | 5106 |
then obtain l r where lr: "l \<in> s 0" "subseq r" "(x \<circ> r) \<longlonglongrightarrow> l" |
54070 | 5107 |
using x and assms(3) unfolding seq_compact_def by blast |
5108 |
have "\<forall>n. l \<in> s n" |
|
5109 |
proof |
|
53282 | 5110 |
fix n :: nat |
54070 | 5111 |
have "closed (s n)" |
5112 |
using assms(1) by simp |
|
5113 |
moreover have "\<forall>i. (x \<circ> r) i \<in> s i" |
|
5114 |
using x and assms(3) and lr(2) [THEN seq_suble] by auto |
|
5115 |
then have "\<forall>i. (x \<circ> r) (i + n) \<in> s n" |
|
5116 |
using assms(3) by (fast intro!: le_add2) |
|
61969 | 5117 |
moreover have "(\<lambda>i. (x \<circ> r) (i + n)) \<longlonglongrightarrow> l" |
54070 | 5118 |
using lr(3) by (rule LIMSEQ_ignore_initial_segment) |
5119 |
ultimately show "l \<in> s n" |
|
5120 |
by (rule closed_sequentially) |
|
5121 |
qed |
|
5122 |
then show ?thesis .. |
|
33175 | 5123 |
qed |
5124 |
||
60420 | 5125 |
text \<open>Decreasing case does not even need compactness, just completeness.\<close> |
33175 | 5126 |
|
5127 |
lemma decreasing_closed_nest: |
|
54070 | 5128 |
fixes s :: "nat \<Rightarrow> ('a::complete_space) set" |
53282 | 5129 |
assumes |
54070 | 5130 |
"\<forall>n. closed (s n)" |
5131 |
"\<forall>n. s n \<noteq> {}" |
|
5132 |
"\<forall>m n. m \<le> n \<longrightarrow> s n \<subseteq> s m" |
|
5133 |
"\<forall>e>0. \<exists>n. \<forall>x\<in>s n. \<forall>y\<in>s n. dist x y < e" |
|
5134 |
shows "\<exists>a. \<forall>n. a \<in> s n" |
|
5135 |
proof - |
|
5136 |
have "\<forall>n. \<exists>x. x \<in> s n" |
|
53282 | 5137 |
using assms(2) by auto |
5138 |
then have "\<exists>t. \<forall>n. t n \<in> s n" |
|
54070 | 5139 |
using choice[of "\<lambda>n x. x \<in> s n"] by auto |
33175 | 5140 |
then obtain t where t: "\<forall>n. t n \<in> s n" by auto |
53282 | 5141 |
{ |
5142 |
fix e :: real |
|
5143 |
assume "e > 0" |
|
5144 |
then obtain N where N:"\<forall>x\<in>s N. \<forall>y\<in>s N. dist x y < e" |
|
5145 |
using assms(4) by auto |
|
5146 |
{ |
|
5147 |
fix m n :: nat |
|
5148 |
assume "N \<le> m \<and> N \<le> n" |
|
5149 |
then have "t m \<in> s N" "t n \<in> s N" |
|
5150 |
using assms(3) t unfolding subset_eq t by blast+ |
|
5151 |
then have "dist (t m) (t n) < e" |
|
5152 |
using N by auto |
|
33175 | 5153 |
} |
53282 | 5154 |
then have "\<exists>N. \<forall>m n. N \<le> m \<and> N \<le> n \<longrightarrow> dist (t m) (t n) < e" |
5155 |
by auto |
|
33175 | 5156 |
} |
53282 | 5157 |
then have "Cauchy t" |
5158 |
unfolding cauchy_def by auto |
|
61973 | 5159 |
then obtain l where l:"(t \<longlongrightarrow> l) sequentially" |
54070 | 5160 |
using complete_UNIV unfolding complete_def by auto |
53282 | 5161 |
{ |
5162 |
fix n :: nat |
|
5163 |
{ |
|
5164 |
fix e :: real |
|
5165 |
assume "e > 0" |
|
5166 |
then obtain N :: nat where N: "\<forall>n\<ge>N. dist (t n) l < e" |
|
60017
b785d6d06430
Overloading of ln and powr, but "approximation" no longer works for powr. Code generation also fails due to type ambiguity in scala.
paulson <lp15@cam.ac.uk>
parents:
59815
diff
changeset
|
5167 |
using l[unfolded lim_sequentially] by auto |
53282 | 5168 |
have "t (max n N) \<in> s n" |
5169 |
using assms(3) |
|
5170 |
unfolding subset_eq |
|
5171 |
apply (erule_tac x=n in allE) |
|
5172 |
apply (erule_tac x="max n N" in allE) |
|
5173 |
using t |
|
5174 |
apply auto |
|
5175 |
done |
|
5176 |
then have "\<exists>y\<in>s n. dist y l < e" |
|
5177 |
apply (rule_tac x="t (max n N)" in bexI) |
|
5178 |
using N |
|
5179 |
apply auto |
|
5180 |
done |
|
33175 | 5181 |
} |
53282 | 5182 |
then have "l \<in> s n" |
5183 |
using closed_approachable[of "s n" l] assms(1) by auto |
|
33175 | 5184 |
} |
5185 |
then show ?thesis by auto |
|
5186 |
qed |
|
5187 |
||
60420 | 5188 |
text \<open>Strengthen it to the intersection actually being a singleton.\<close> |
33175 | 5189 |
|
5190 |
lemma decreasing_closed_nest_sing: |
|
44632 | 5191 |
fixes s :: "nat \<Rightarrow> 'a::complete_space set" |
53282 | 5192 |
assumes |
5193 |
"\<forall>n. closed(s n)" |
|
5194 |
"\<forall>n. s n \<noteq> {}" |
|
54070 | 5195 |
"\<forall>m n. m \<le> n \<longrightarrow> s n \<subseteq> s m" |
53282 | 5196 |
"\<forall>e>0. \<exists>n. \<forall>x \<in> (s n). \<forall> y\<in>(s n). dist x y < e" |
34104 | 5197 |
shows "\<exists>a. \<Inter>(range s) = {a}" |
53282 | 5198 |
proof - |
5199 |
obtain a where a: "\<forall>n. a \<in> s n" |
|
5200 |
using decreasing_closed_nest[of s] using assms by auto |
|
5201 |
{ |
|
5202 |
fix b |
|
5203 |
assume b: "b \<in> \<Inter>(range s)" |
|
5204 |
{ |
|
5205 |
fix e :: real |
|
5206 |
assume "e > 0" |
|
5207 |
then have "dist a b < e" |
|
5208 |
using assms(4) and b and a by blast |
|
33175 | 5209 |
} |
53282 | 5210 |
then have "dist a b = 0" |
5211 |
by (metis dist_eq_0_iff dist_nz less_le) |
|
33175 | 5212 |
} |
53282 | 5213 |
with a have "\<Inter>(range s) = {a}" |
5214 |
unfolding image_def by auto |
|
5215 |
then show ?thesis .. |
|
33175 | 5216 |
qed |
5217 |
||
60420 | 5218 |
text\<open>Cauchy-type criteria for uniform convergence.\<close> |
33175 | 5219 |
|
53282 | 5220 |
lemma uniformly_convergent_eq_cauchy: |
5221 |
fixes s::"nat \<Rightarrow> 'b \<Rightarrow> 'a::complete_space" |
|
5222 |
shows |
|
53291 | 5223 |
"(\<exists>l. \<forall>e>0. \<exists>N. \<forall>n x. N \<le> n \<and> P x \<longrightarrow> dist(s n x)(l x) < e) \<longleftrightarrow> |
5224 |
(\<forall>e>0. \<exists>N. \<forall>m n x. N \<le> m \<and> N \<le> n \<and> P x \<longrightarrow> dist (s m x) (s n x) < e)" |
|
53282 | 5225 |
(is "?lhs = ?rhs") |
5226 |
proof |
|
33175 | 5227 |
assume ?lhs |
53282 | 5228 |
then obtain l where l:"\<forall>e>0. \<exists>N. \<forall>n x. N \<le> n \<and> P x \<longrightarrow> dist (s n x) (l x) < e" |
5229 |
by auto |
|
5230 |
{ |
|
5231 |
fix e :: real |
|
5232 |
assume "e > 0" |
|
5233 |
then obtain N :: nat where N: "\<forall>n x. N \<le> n \<and> P x \<longrightarrow> dist (s n x) (l x) < e / 2" |
|
5234 |
using l[THEN spec[where x="e/2"]] by auto |
|
5235 |
{ |
|
5236 |
fix n m :: nat and x :: "'b" |
|
5237 |
assume "N \<le> m \<and> N \<le> n \<and> P x" |
|
5238 |
then have "dist (s m x) (s n x) < e" |
|
33175 | 5239 |
using N[THEN spec[where x=m], THEN spec[where x=x]] |
5240 |
using N[THEN spec[where x=n], THEN spec[where x=x]] |
|
53282 | 5241 |
using dist_triangle_half_l[of "s m x" "l x" e "s n x"] by auto |
5242 |
} |
|
5243 |
then have "\<exists>N. \<forall>m n x. N \<le> m \<and> N \<le> n \<and> P x --> dist (s m x) (s n x) < e" by auto |
|
5244 |
} |
|
5245 |
then show ?rhs by auto |
|
33175 | 5246 |
next |
5247 |
assume ?rhs |
|
53282 | 5248 |
then have "\<forall>x. P x \<longrightarrow> Cauchy (\<lambda>n. s n x)" |
5249 |
unfolding cauchy_def |
|
5250 |
apply auto |
|
5251 |
apply (erule_tac x=e in allE) |
|
5252 |
apply auto |
|
5253 |
done |
|
61973 | 5254 |
then obtain l where l: "\<forall>x. P x \<longrightarrow> ((\<lambda>n. s n x) \<longlongrightarrow> l x) sequentially" |
53291 | 5255 |
unfolding convergent_eq_cauchy[symmetric] |
61973 | 5256 |
using choice[of "\<lambda>x l. P x \<longrightarrow> ((\<lambda>n. s n x) \<longlongrightarrow> l) sequentially"] |
53282 | 5257 |
by auto |
5258 |
{ |
|
5259 |
fix e :: real |
|
5260 |
assume "e > 0" |
|
33175 | 5261 |
then obtain N where N:"\<forall>m n x. N \<le> m \<and> N \<le> n \<and> P x \<longrightarrow> dist (s m x) (s n x) < e/2" |
60420 | 5262 |
using \<open>?rhs\<close>[THEN spec[where x="e/2"]] by auto |
53282 | 5263 |
{ |
5264 |
fix x |
|
5265 |
assume "P x" |
|
33175 | 5266 |
then obtain M where M:"\<forall>n\<ge>M. dist (s n x) (l x) < e/2" |
60420 | 5267 |
using l[THEN spec[where x=x], unfolded lim_sequentially] and \<open>e > 0\<close> |
53282 | 5268 |
by (auto elim!: allE[where x="e/2"]) |
5269 |
fix n :: nat |
|
5270 |
assume "n \<ge> N" |
|
5271 |
then have "dist(s n x)(l x) < e" |
|
60420 | 5272 |
using \<open>P x\<close>and N[THEN spec[where x=n], THEN spec[where x="N+M"], THEN spec[where x=x]] |
53282 | 5273 |
using M[THEN spec[where x="N+M"]] and dist_triangle_half_l[of "s n x" "s (N+M) x" e "l x"] |
5274 |
by (auto simp add: dist_commute) |
|
5275 |
} |
|
5276 |
then have "\<exists>N. \<forall>n x. N \<le> n \<and> P x \<longrightarrow> dist(s n x)(l x) < e" |
|
5277 |
by auto |
|
5278 |
} |
|
5279 |
then show ?lhs by auto |
|
33175 | 5280 |
qed |
5281 |
||
5282 |
lemma uniformly_cauchy_imp_uniformly_convergent: |
|
51102 | 5283 |
fixes s :: "nat \<Rightarrow> 'a \<Rightarrow> 'b::complete_space" |
33175 | 5284 |
assumes "\<forall>e>0.\<exists>N. \<forall>m (n::nat) x. N \<le> m \<and> N \<le> n \<and> P x --> dist(s m x)(s n x) < e" |
53291 | 5285 |
and "\<forall>x. P x --> (\<forall>e>0. \<exists>N. \<forall>n. N \<le> n \<longrightarrow> dist(s n x)(l x) < e)" |
5286 |
shows "\<forall>e>0. \<exists>N. \<forall>n x. N \<le> n \<and> P x \<longrightarrow> dist(s n x)(l x) < e" |
|
53282 | 5287 |
proof - |
33175 | 5288 |
obtain l' where l:"\<forall>e>0. \<exists>N. \<forall>n x. N \<le> n \<and> P x \<longrightarrow> dist (s n x) (l' x) < e" |
53291 | 5289 |
using assms(1) unfolding uniformly_convergent_eq_cauchy[symmetric] by auto |
33175 | 5290 |
moreover |
53282 | 5291 |
{ |
5292 |
fix x |
|
5293 |
assume "P x" |
|
5294 |
then have "l x = l' x" |
|
5295 |
using tendsto_unique[OF trivial_limit_sequentially, of "\<lambda>n. s n x" "l x" "l' x"] |
|
60017
b785d6d06430
Overloading of ln and powr, but "approximation" no longer works for powr. Code generation also fails due to type ambiguity in scala.
paulson <lp15@cam.ac.uk>
parents:
59815
diff
changeset
|
5296 |
using l and assms(2) unfolding lim_sequentially by blast |
53282 | 5297 |
} |
33175 | 5298 |
ultimately show ?thesis by auto |
5299 |
qed |
|
5300 |
||
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
5301 |
|
60420 | 5302 |
subsection \<open>Continuity\<close> |
5303 |
||
5304 |
text\<open>Derive the epsilon-delta forms, which we often use as "definitions"\<close> |
|
33175 | 5305 |
|
5306 |
lemma continuous_within_eps_delta: |
|
5307 |
"continuous (at x within s) f \<longleftrightarrow> (\<forall>e>0. \<exists>d>0. \<forall>x'\<in> s. dist x' x < d --> dist (f x') (f x) < e)" |
|
5308 |
unfolding continuous_within and Lim_within |
|
53282 | 5309 |
apply auto |
55775 | 5310 |
apply (metis dist_nz dist_self) |
5311 |
apply blast |
|
53282 | 5312 |
done |
5313 |
||
62131
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5314 |
corollary continuous_at_eps_delta: |
53282 | 5315 |
"continuous (at x) f \<longleftrightarrow> (\<forall>e > 0. \<exists>d > 0. \<forall>x'. dist x' x < d \<longrightarrow> dist (f x') (f x) < e)" |
45031 | 5316 |
using continuous_within_eps_delta [of x UNIV f] by simp |
33175 | 5317 |
|
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
5318 |
lemma continuous_at_right_real_increasing: |
57448
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5319 |
fixes f :: "real \<Rightarrow> real" |
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5320 |
assumes nondecF: "\<And>x y. x \<le> y \<Longrightarrow> f x \<le> f y" |
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5321 |
shows "continuous (at_right a) f \<longleftrightarrow> (\<forall>e>0. \<exists>d>0. f (a + d) - f a < e)" |
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5322 |
apply (simp add: greaterThan_def dist_real_def continuous_within Lim_within_le) |
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5323 |
apply (intro all_cong ex_cong) |
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5324 |
apply safe |
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5325 |
apply (erule_tac x="a + d" in allE) |
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5326 |
apply simp |
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5327 |
apply (simp add: nondecF field_simps) |
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5328 |
apply (drule nondecF) |
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5329 |
apply simp |
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5330 |
done |
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
5331 |
|
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
5332 |
lemma continuous_at_left_real_increasing: |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
5333 |
assumes nondecF: "\<And> x y. x \<le> y \<Longrightarrow> f x \<le> ((f y) :: real)" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
5334 |
shows "(continuous (at_left (a :: real)) f) = (\<forall>e > 0. \<exists>delta > 0. f a - f (a - delta) < e)" |
57448
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5335 |
apply (simp add: lessThan_def dist_real_def continuous_within Lim_within_le) |
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5336 |
apply (intro all_cong ex_cong) |
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5337 |
apply safe |
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5338 |
apply (erule_tac x="a - d" in allE) |
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5339 |
apply simp |
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5340 |
apply (simp add: nondecF field_simps) |
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5341 |
apply (cut_tac x="a - d" and y="x" in nondecF) |
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5342 |
apply simp_all |
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5343 |
done |
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
5344 |
|
60420 | 5345 |
text\<open>Versions in terms of open balls.\<close> |
33175 | 5346 |
|
5347 |
lemma continuous_within_ball: |
|
53282 | 5348 |
"continuous (at x within s) f \<longleftrightarrow> |
5349 |
(\<forall>e > 0. \<exists>d > 0. f ` (ball x d \<inter> s) \<subseteq> ball (f x) e)" |
|
5350 |
(is "?lhs = ?rhs") |
|
33175 | 5351 |
proof |
5352 |
assume ?lhs |
|
53282 | 5353 |
{ |
5354 |
fix e :: real |
|
5355 |
assume "e > 0" |
|
33175 | 5356 |
then obtain d where d: "d>0" "\<forall>xa\<in>s. 0 < dist xa x \<and> dist xa x < d \<longrightarrow> dist (f xa) (f x) < e" |
60420 | 5357 |
using \<open>?lhs\<close>[unfolded continuous_within Lim_within] by auto |
53282 | 5358 |
{ |
5359 |
fix y |
|
5360 |
assume "y \<in> f ` (ball x d \<inter> s)" |
|
5361 |
then have "y \<in> ball (f x) e" |
|
5362 |
using d(2) |
|
5363 |
apply (auto simp add: dist_commute) |
|
5364 |
apply (erule_tac x=xa in ballE) |
|
5365 |
apply auto |
|
60420 | 5366 |
using \<open>e > 0\<close> |
53282 | 5367 |
apply auto |
5368 |
done |
|
33175 | 5369 |
} |
53282 | 5370 |
then have "\<exists>d>0. f ` (ball x d \<inter> s) \<subseteq> ball (f x) e" |
60420 | 5371 |
using \<open>d > 0\<close> |
53282 | 5372 |
unfolding subset_eq ball_def by (auto simp add: dist_commute) |
5373 |
} |
|
5374 |
then show ?rhs by auto |
|
33175 | 5375 |
next |
53282 | 5376 |
assume ?rhs |
5377 |
then show ?lhs |
|
5378 |
unfolding continuous_within Lim_within ball_def subset_eq |
|
5379 |
apply (auto simp add: dist_commute) |
|
5380 |
apply (erule_tac x=e in allE) |
|
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61552
diff
changeset
|
5381 |
apply auto |
53282 | 5382 |
done |
33175 | 5383 |
qed |
5384 |
||
5385 |
lemma continuous_at_ball: |
|
5386 |
"continuous (at x) f \<longleftrightarrow> (\<forall>e>0. \<exists>d>0. f ` (ball x d) \<subseteq> ball (f x) e)" (is "?lhs = ?rhs") |
|
5387 |
proof |
|
53282 | 5388 |
assume ?lhs |
5389 |
then show ?rhs |
|
5390 |
unfolding continuous_at Lim_at subset_eq Ball_def Bex_def image_iff mem_ball |
|
5391 |
apply auto |
|
5392 |
apply (erule_tac x=e in allE) |
|
5393 |
apply auto |
|
5394 |
apply (rule_tac x=d in exI) |
|
5395 |
apply auto |
|
5396 |
apply (erule_tac x=xa in allE) |
|
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
5397 |
apply (auto simp add: dist_commute) |
53282 | 5398 |
done |
33175 | 5399 |
next |
53282 | 5400 |
assume ?rhs |
5401 |
then show ?lhs |
|
5402 |
unfolding continuous_at Lim_at subset_eq Ball_def Bex_def image_iff mem_ball |
|
5403 |
apply auto |
|
5404 |
apply (erule_tac x=e in allE) |
|
5405 |
apply auto |
|
5406 |
apply (rule_tac x=d in exI) |
|
5407 |
apply auto |
|
5408 |
apply (erule_tac x="f xa" in allE) |
|
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
5409 |
apply (auto simp add: dist_commute) |
53282 | 5410 |
done |
33175 | 5411 |
qed |
5412 |
||
60420 | 5413 |
text\<open>Define setwise continuity in terms of limits within the set.\<close> |
33175 | 5414 |
|
36359 | 5415 |
lemma continuous_on_iff: |
5416 |
"continuous_on s f \<longleftrightarrow> |
|
36440
89a70297564d
simplify definition of continuous_on; generalize some lemmas
huffman
parents:
36439
diff
changeset
|
5417 |
(\<forall>x\<in>s. \<forall>e>0. \<exists>d>0. \<forall>x'\<in>s. dist x' x < d \<longrightarrow> dist (f x') (f x) < e)" |
53282 | 5418 |
unfolding continuous_on_def Lim_within |
55775 | 5419 |
by (metis dist_pos_lt dist_self) |
53282 | 5420 |
|
62131
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5421 |
lemma continuous_within_E: |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5422 |
assumes "continuous (at x within s) f" "e>0" |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5423 |
obtains d where "d>0" "\<And>x'. \<lbrakk>x'\<in> s; dist x' x \<le> d\<rbrakk> \<Longrightarrow> dist (f x') (f x) < e" |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5424 |
using assms apply (simp add: continuous_within_eps_delta) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5425 |
apply (drule spec [of _ e], clarify) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5426 |
apply (rule_tac d="d/2" in that, auto) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5427 |
done |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5428 |
|
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5429 |
lemma continuous_onI [intro?]: |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5430 |
assumes "\<And>x e. \<lbrakk>e > 0; x \<in> s\<rbrakk> \<Longrightarrow> \<exists>d>0. \<forall>x'\<in>s. dist x' x < d \<longrightarrow> dist (f x') (f x) \<le> e" |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5431 |
shows "continuous_on s f" |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5432 |
apply (simp add: continuous_on_iff, clarify) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5433 |
apply (rule ex_forward [OF assms [OF half_gt_zero]], auto) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5434 |
done |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5435 |
|
62101 | 5436 |
lemma uniformly_continuous_on_def: |
5437 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::metric_space" |
|
5438 |
shows "uniformly_continuous_on s f \<longleftrightarrow> |
|
36440
89a70297564d
simplify definition of continuous_on; generalize some lemmas
huffman
parents:
36439
diff
changeset
|
5439 |
(\<forall>e>0. \<exists>d>0. \<forall>x\<in>s. \<forall>x'\<in>s. dist x' x < d \<longrightarrow> dist (f x') (f x) < e)" |
62101 | 5440 |
unfolding uniformly_continuous_on_uniformity |
5441 |
uniformity_dist filterlim_INF filterlim_principal eventually_inf_principal |
|
5442 |
by (force simp: Ball_def uniformity_dist[symmetric] eventually_uniformity_metric) |
|
35172
579dd5570f96
Added integration to Multivariate-Analysis (upto FTC)
himmelma
parents:
35028
diff
changeset
|
5443 |
|
60420 | 5444 |
text\<open>Some simple consequential lemmas.\<close> |
33175 | 5445 |
|
62397
5ae24f33d343
Substantial new material for multivariate analysis. Also removal of some duplicates.
paulson <lp15@cam.ac.uk>
parents:
62381
diff
changeset
|
5446 |
lemma continuous_onE: |
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
5447 |
assumes "continuous_on s f" "x\<in>s" "e>0" |
62397
5ae24f33d343
Substantial new material for multivariate analysis. Also removal of some duplicates.
paulson <lp15@cam.ac.uk>
parents:
62381
diff
changeset
|
5448 |
obtains d where "d>0" "\<And>x'. \<lbrakk>x' \<in> s; dist x' x \<le> d\<rbrakk> \<Longrightarrow> dist (f x') (f x) < e" |
5ae24f33d343
Substantial new material for multivariate analysis. Also removal of some duplicates.
paulson <lp15@cam.ac.uk>
parents:
62381
diff
changeset
|
5449 |
using assms |
5ae24f33d343
Substantial new material for multivariate analysis. Also removal of some duplicates.
paulson <lp15@cam.ac.uk>
parents:
62381
diff
changeset
|
5450 |
apply (simp add: continuous_on_iff) |
5ae24f33d343
Substantial new material for multivariate analysis. Also removal of some duplicates.
paulson <lp15@cam.ac.uk>
parents:
62381
diff
changeset
|
5451 |
apply (elim ballE allE) |
5ae24f33d343
Substantial new material for multivariate analysis. Also removal of some duplicates.
paulson <lp15@cam.ac.uk>
parents:
62381
diff
changeset
|
5452 |
apply (auto intro: that [where d="d/2" for d]) |
5ae24f33d343
Substantial new material for multivariate analysis. Also removal of some duplicates.
paulson <lp15@cam.ac.uk>
parents:
62381
diff
changeset
|
5453 |
done |
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
5454 |
|
60974
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
5455 |
lemma uniformly_continuous_onE: |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
5456 |
assumes "uniformly_continuous_on s f" "0 < e" |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
5457 |
obtains d where "d>0" "\<And>x x'. \<lbrakk>x\<in>s; x'\<in>s; dist x' x < d\<rbrakk> \<Longrightarrow> dist (f x') (f x) < e" |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
5458 |
using assms |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
5459 |
by (auto simp: uniformly_continuous_on_def) |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
5460 |
|
33175 | 5461 |
lemma continuous_at_imp_continuous_within: |
53282 | 5462 |
"continuous (at x) f \<Longrightarrow> continuous (at x within s) f" |
60762 | 5463 |
unfolding continuous_within continuous_at using Lim_at_imp_Lim_at_within by auto |
33175 | 5464 |
|
61973 | 5465 |
lemma Lim_trivial_limit: "trivial_limit net \<Longrightarrow> (f \<longlongrightarrow> l) net" |
51478
270b21f3ae0a
move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents:
51475
diff
changeset
|
5466 |
by simp |
36440
89a70297564d
simplify definition of continuous_on; generalize some lemmas
huffman
parents:
36439
diff
changeset
|
5467 |
|
61808 | 5468 |
lemmas continuous_on = continuous_on_def \<comment> "legacy theorem name" |
33175 | 5469 |
|
5470 |
lemma continuous_within_subset: |
|
53282 | 5471 |
"continuous (at x within s) f \<Longrightarrow> t \<subseteq> s \<Longrightarrow> continuous (at x within t) f" |
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
|
5472 |
unfolding continuous_within by(metis tendsto_within_subset) |
33175 | 5473 |
|
5474 |
lemma continuous_on_interior: |
|
53282 | 5475 |
"continuous_on s f \<Longrightarrow> x \<in> interior s \<Longrightarrow> continuous (at x) f" |
55775 | 5476 |
by (metis continuous_on_eq_continuous_at continuous_on_subset interiorE) |
33175 | 5477 |
|
5478 |
lemma continuous_on_eq: |
|
61204 | 5479 |
"\<lbrakk>continuous_on s f; \<And>x. x \<in> s \<Longrightarrow> f x = g x\<rbrakk> \<Longrightarrow> continuous_on s g" |
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
|
5480 |
unfolding continuous_on_def tendsto_def eventually_at_topological |
36440
89a70297564d
simplify definition of continuous_on; generalize some lemmas
huffman
parents:
36439
diff
changeset
|
5481 |
by simp |
33175 | 5482 |
|
60420 | 5483 |
text \<open>Characterization of various kinds of continuity in terms of sequences.\<close> |
33175 | 5484 |
|
5485 |
lemma continuous_within_sequentially: |
|
44533
7abe4a59f75d
generalize and simplify proof of continuous_within_sequentially
huffman
parents:
44531
diff
changeset
|
5486 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::topological_space" |
33175 | 5487 |
shows "continuous (at a within s) f \<longleftrightarrow> |
61973 | 5488 |
(\<forall>x. (\<forall>n::nat. x n \<in> s) \<and> (x \<longlongrightarrow> a) sequentially |
5489 |
\<longrightarrow> ((f \<circ> x) \<longlongrightarrow> f a) sequentially)" |
|
53282 | 5490 |
(is "?lhs = ?rhs") |
33175 | 5491 |
proof |
5492 |
assume ?lhs |
|
53282 | 5493 |
{ |
5494 |
fix x :: "nat \<Rightarrow> 'a" |
|
5495 |
assume x: "\<forall>n. x n \<in> s" "\<forall>e>0. eventually (\<lambda>n. dist (x n) a < e) sequentially" |
|
5496 |
fix T :: "'b set" |
|
5497 |
assume "open T" and "f a \<in> T" |
|
60420 | 5498 |
with \<open>?lhs\<close> obtain d where "d>0" and d:"\<forall>x\<in>s. 0 < dist x a \<and> dist x a < d \<longrightarrow> f x \<in> T" |
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
5499 |
unfolding continuous_within tendsto_def eventually_at by auto |
44533
7abe4a59f75d
generalize and simplify proof of continuous_within_sequentially
huffman
parents:
44531
diff
changeset
|
5500 |
have "eventually (\<lambda>n. dist (x n) a < d) sequentially" |
60420 | 5501 |
using x(2) \<open>d>0\<close> by simp |
53282 | 5502 |
then have "eventually (\<lambda>n. (f \<circ> x) n \<in> T) sequentially" |
46887 | 5503 |
proof eventually_elim |
53282 | 5504 |
case (elim n) |
5505 |
then show ?case |
|
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
5506 |
using d x(1) \<open>f a \<in> T\<close> by auto |
44533
7abe4a59f75d
generalize and simplify proof of continuous_within_sequentially
huffman
parents:
44531
diff
changeset
|
5507 |
qed |
33175 | 5508 |
} |
53282 | 5509 |
then show ?rhs |
5510 |
unfolding tendsto_iff tendsto_def by simp |
|
33175 | 5511 |
next |
53282 | 5512 |
assume ?rhs |
5513 |
then show ?lhs |
|
44533
7abe4a59f75d
generalize and simplify proof of continuous_within_sequentially
huffman
parents:
44531
diff
changeset
|
5514 |
unfolding continuous_within tendsto_def [where l="f a"] |
7abe4a59f75d
generalize and simplify proof of continuous_within_sequentially
huffman
parents:
44531
diff
changeset
|
5515 |
by (simp add: sequentially_imp_eventually_within) |
33175 | 5516 |
qed |
5517 |
||
5518 |
lemma continuous_at_sequentially: |
|
44533
7abe4a59f75d
generalize and simplify proof of continuous_within_sequentially
huffman
parents:
44531
diff
changeset
|
5519 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::topological_space" |
53291 | 5520 |
shows "continuous (at a) f \<longleftrightarrow> |
61973 | 5521 |
(\<forall>x. (x \<longlongrightarrow> a) sequentially --> ((f \<circ> x) \<longlongrightarrow> f a) sequentially)" |
45031 | 5522 |
using continuous_within_sequentially[of a UNIV f] by simp |
33175 | 5523 |
|
5524 |
lemma continuous_on_sequentially: |
|
44533
7abe4a59f75d
generalize and simplify proof of continuous_within_sequentially
huffman
parents:
44531
diff
changeset
|
5525 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::topological_space" |
36359 | 5526 |
shows "continuous_on s f \<longleftrightarrow> |
61973 | 5527 |
(\<forall>x. \<forall>a \<in> s. (\<forall>n. x(n) \<in> s) \<and> (x \<longlongrightarrow> a) sequentially |
5528 |
--> ((f \<circ> x) \<longlongrightarrow> f a) sequentially)" |
|
53291 | 5529 |
(is "?lhs = ?rhs") |
33175 | 5530 |
proof |
53282 | 5531 |
assume ?rhs |
5532 |
then show ?lhs |
|
5533 |
using continuous_within_sequentially[of _ s f] |
|
5534 |
unfolding continuous_on_eq_continuous_within |
|
5535 |
by auto |
|
33175 | 5536 |
next |
53282 | 5537 |
assume ?lhs |
5538 |
then show ?rhs |
|
5539 |
unfolding continuous_on_eq_continuous_within |
|
5540 |
using continuous_within_sequentially[of _ s f] |
|
5541 |
by auto |
|
33175 | 5542 |
qed |
5543 |
||
44648
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5544 |
lemma uniformly_continuous_on_sequentially: |
36441 | 5545 |
"uniformly_continuous_on s f \<longleftrightarrow> (\<forall>x y. (\<forall>n. x n \<in> s) \<and> (\<forall>n. y n \<in> s) \<and> |
62101 | 5546 |
(\<lambda>n. dist (x n) (y n)) \<longlonglongrightarrow> 0 \<longrightarrow> (\<lambda>n. dist (f(x n)) (f(y n))) \<longlonglongrightarrow> 0)" (is "?lhs = ?rhs") |
33175 | 5547 |
proof |
5548 |
assume ?lhs |
|
53282 | 5549 |
{ |
5550 |
fix x y |
|
5551 |
assume x: "\<forall>n. x n \<in> s" |
|
5552 |
and y: "\<forall>n. y n \<in> s" |
|
61973 | 5553 |
and xy: "((\<lambda>n. dist (x n) (y n)) \<longlongrightarrow> 0) sequentially" |
53282 | 5554 |
{ |
5555 |
fix e :: real |
|
5556 |
assume "e > 0" |
|
5557 |
then obtain d where "d > 0" and d: "\<forall>x\<in>s. \<forall>x'\<in>s. dist x' x < d \<longrightarrow> dist (f x') (f x) < e" |
|
60420 | 5558 |
using \<open>?lhs\<close>[unfolded uniformly_continuous_on_def, THEN spec[where x=e]] by auto |
53282 | 5559 |
obtain N where N: "\<forall>n\<ge>N. dist (x n) (y n) < d" |
60420 | 5560 |
using xy[unfolded lim_sequentially dist_norm] and \<open>d>0\<close> by auto |
53282 | 5561 |
{ |
5562 |
fix n |
|
5563 |
assume "n\<ge>N" |
|
5564 |
then have "dist (f (x n)) (f (y n)) < e" |
|
5565 |
using N[THEN spec[where x=n]] |
|
5566 |
using d[THEN bspec[where x="x n"], THEN bspec[where x="y n"]] |
|
5567 |
using x and y |
|
5568 |
unfolding dist_commute |
|
5569 |
by simp |
|
5570 |
} |
|
5571 |
then have "\<exists>N. \<forall>n\<ge>N. dist (f (x n)) (f (y n)) < e" |
|
5572 |
by auto |
|
5573 |
} |
|
61973 | 5574 |
then have "((\<lambda>n. dist (f(x n)) (f(y n))) \<longlongrightarrow> 0) sequentially" |
60017
b785d6d06430
Overloading of ln and powr, but "approximation" no longer works for powr. Code generation also fails due to type ambiguity in scala.
paulson <lp15@cam.ac.uk>
parents:
59815
diff
changeset
|
5575 |
unfolding lim_sequentially and dist_real_def by auto |
53282 | 5576 |
} |
5577 |
then show ?rhs by auto |
|
33175 | 5578 |
next |
5579 |
assume ?rhs |
|
53282 | 5580 |
{ |
5581 |
assume "\<not> ?lhs" |
|
5582 |
then obtain e where "e > 0" "\<forall>d>0. \<exists>x\<in>s. \<exists>x'\<in>s. dist x' x < d \<and> \<not> dist (f x') (f x) < e" |
|
5583 |
unfolding uniformly_continuous_on_def by auto |
|
5584 |
then obtain fa where fa: |
|
5585 |
"\<forall>x. 0 < x \<longrightarrow> fst (fa x) \<in> s \<and> snd (fa x) \<in> s \<and> dist (fst (fa x)) (snd (fa x)) < x \<and> \<not> dist (f (fst (fa x))) (f (snd (fa x))) < e" |
|
5586 |
using choice[of "\<lambda>d x. d>0 \<longrightarrow> fst x \<in> s \<and> snd x \<in> s \<and> dist (snd x) (fst x) < d \<and> \<not> dist (f (snd x)) (f (fst x)) < e"] |
|
5587 |
unfolding Bex_def |
|
33175 | 5588 |
by (auto simp add: dist_commute) |
63040 | 5589 |
define x where "x n = fst (fa (inverse (real n + 1)))" for n |
5590 |
define y where "y n = snd (fa (inverse (real n + 1)))" for n |
|
53282 | 5591 |
have xyn: "\<forall>n. x n \<in> s \<and> y n \<in> s" |
5592 |
and xy0: "\<forall>n. dist (x n) (y n) < inverse (real n + 1)" |
|
5593 |
and fxy:"\<forall>n. \<not> dist (f (x n)) (f (y n)) < e" |
|
5594 |
unfolding x_def and y_def using fa |
|
5595 |
by auto |
|
5596 |
{ |
|
5597 |
fix e :: real |
|
5598 |
assume "e > 0" |
|
5599 |
then obtain N :: nat where "N \<noteq> 0" and N: "0 < inverse (real N) \<and> inverse (real N) < e" |
|
62623
dbc62f86a1a9
rationalisation of theorem names esp about "real Archimedian" etc.
paulson <lp15@cam.ac.uk>
parents:
62620
diff
changeset
|
5600 |
unfolding real_arch_inverse[of e] by auto |
53282 | 5601 |
{ |
5602 |
fix n :: nat |
|
5603 |
assume "n \<ge> N" |
|
5604 |
then have "inverse (real n + 1) < inverse (real N)" |
|
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61552
diff
changeset
|
5605 |
using of_nat_0_le_iff and \<open>N\<noteq>0\<close> by auto |
33175 | 5606 |
also have "\<dots> < e" using N by auto |
5607 |
finally have "inverse (real n + 1) < e" by auto |
|
53282 | 5608 |
then have "dist (x n) (y n) < e" |
5609 |
using xy0[THEN spec[where x=n]] by auto |
|
5610 |
} |
|
5611 |
then have "\<exists>N. \<forall>n\<ge>N. dist (x n) (y n) < e" by auto |
|
5612 |
} |
|
5613 |
then have "\<forall>e>0. \<exists>N. \<forall>n\<ge>N. dist (f (x n)) (f (y n)) < e" |
|
60420 | 5614 |
using \<open>?rhs\<close>[THEN spec[where x=x], THEN spec[where x=y]] and xyn |
60017
b785d6d06430
Overloading of ln and powr, but "approximation" no longer works for powr. Code generation also fails due to type ambiguity in scala.
paulson <lp15@cam.ac.uk>
parents:
59815
diff
changeset
|
5615 |
unfolding lim_sequentially dist_real_def by auto |
60420 | 5616 |
then have False using fxy and \<open>e>0\<close> by auto |
53282 | 5617 |
} |
5618 |
then show ?lhs |
|
5619 |
unfolding uniformly_continuous_on_def by blast |
|
33175 | 5620 |
qed |
5621 |
||
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61907
diff
changeset
|
5622 |
|
60420 | 5623 |
text\<open>The usual transformation theorems.\<close> |
33175 | 5624 |
|
5625 |
lemma continuous_transform_within: |
|
36667 | 5626 |
fixes f g :: "'a::metric_space \<Rightarrow> 'b::topological_space" |
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
5627 |
assumes "continuous (at x within s) f" |
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
5628 |
and "0 < d" |
53282 | 5629 |
and "x \<in> s" |
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
5630 |
and "\<And>x'. \<lbrakk>x' \<in> s; dist x' x < d\<rbrakk> \<Longrightarrow> f x' = g x'" |
33175 | 5631 |
shows "continuous (at x within s) g" |
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
5632 |
using assms |
53282 | 5633 |
unfolding continuous_within |
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
5634 |
by (force simp add: intro: Lim_transform_within) |
62101 | 5635 |
|
53282 | 5636 |
|
60420 | 5637 |
subsubsection \<open>Structural rules for pointwise continuity\<close> |
33175 | 5638 |
|
51361
21e5b6efb317
changed continuous_intros into a named theorems collection
hoelzl
parents:
51351
diff
changeset
|
5639 |
lemma continuous_infdist[continuous_intros]: |
50087 | 5640 |
assumes "continuous F f" |
5641 |
shows "continuous F (\<lambda>x. infdist (f x) A)" |
|
5642 |
using assms unfolding continuous_def by (rule tendsto_infdist) |
|
5643 |
||
51361
21e5b6efb317
changed continuous_intros into a named theorems collection
hoelzl
parents:
51351
diff
changeset
|
5644 |
lemma continuous_infnorm[continuous_intros]: |
53282 | 5645 |
"continuous F f \<Longrightarrow> continuous F (\<lambda>x. infnorm (f x))" |
44647
e4de7750cdeb
modernize lemmas about 'continuous' and 'continuous_on';
huffman
parents:
44632
diff
changeset
|
5646 |
unfolding continuous_def by (rule tendsto_infnorm) |
33175 | 5647 |
|
51361
21e5b6efb317
changed continuous_intros into a named theorems collection
hoelzl
parents:
51351
diff
changeset
|
5648 |
lemma continuous_inner[continuous_intros]: |
53282 | 5649 |
assumes "continuous F f" |
5650 |
and "continuous F g" |
|
44647
e4de7750cdeb
modernize lemmas about 'continuous' and 'continuous_on';
huffman
parents:
44632
diff
changeset
|
5651 |
shows "continuous F (\<lambda>x. inner (f x) (g x))" |
e4de7750cdeb
modernize lemmas about 'continuous' and 'continuous_on';
huffman
parents:
44632
diff
changeset
|
5652 |
using assms unfolding continuous_def by (rule tendsto_inner) |
e4de7750cdeb
modernize lemmas about 'continuous' and 'continuous_on';
huffman
parents:
44632
diff
changeset
|
5653 |
|
51478
270b21f3ae0a
move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents:
51475
diff
changeset
|
5654 |
lemmas continuous_at_inverse = isCont_inverse |
44647
e4de7750cdeb
modernize lemmas about 'continuous' and 'continuous_on';
huffman
parents:
44632
diff
changeset
|
5655 |
|
60420 | 5656 |
subsubsection \<open>Structural rules for setwise continuity\<close> |
33175 | 5657 |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
5658 |
lemma continuous_on_infnorm[continuous_intros]: |
53282 | 5659 |
"continuous_on s f \<Longrightarrow> continuous_on s (\<lambda>x. infnorm (f x))" |
44647
e4de7750cdeb
modernize lemmas about 'continuous' and 'continuous_on';
huffman
parents:
44632
diff
changeset
|
5660 |
unfolding continuous_on by (fast intro: tendsto_infnorm) |
e4de7750cdeb
modernize lemmas about 'continuous' and 'continuous_on';
huffman
parents:
44632
diff
changeset
|
5661 |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
5662 |
lemma continuous_on_inner[continuous_intros]: |
44531
1d477a2b1572
replace some continuous_on lemmas with more general versions
huffman
parents:
44530
diff
changeset
|
5663 |
fixes g :: "'a::topological_space \<Rightarrow> 'b::real_inner" |
53282 | 5664 |
assumes "continuous_on s f" |
5665 |
and "continuous_on s g" |
|
44531
1d477a2b1572
replace some continuous_on lemmas with more general versions
huffman
parents:
44530
diff
changeset
|
5666 |
shows "continuous_on s (\<lambda>x. inner (f x) (g x))" |
1d477a2b1572
replace some continuous_on lemmas with more general versions
huffman
parents:
44530
diff
changeset
|
5667 |
using bounded_bilinear_inner assms |
1d477a2b1572
replace some continuous_on lemmas with more general versions
huffman
parents:
44530
diff
changeset
|
5668 |
by (rule bounded_bilinear.continuous_on) |
1d477a2b1572
replace some continuous_on lemmas with more general versions
huffman
parents:
44530
diff
changeset
|
5669 |
|
60420 | 5670 |
subsubsection \<open>Structural rules for uniform continuity\<close> |
33175 | 5671 |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
5672 |
lemma uniformly_continuous_on_dist[continuous_intros]: |
44648
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5673 |
fixes f g :: "'a::metric_space \<Rightarrow> 'b::metric_space" |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5674 |
assumes "uniformly_continuous_on s f" |
53282 | 5675 |
and "uniformly_continuous_on s g" |
44648
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5676 |
shows "uniformly_continuous_on s (\<lambda>x. dist (f x) (g x))" |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5677 |
proof - |
53282 | 5678 |
{ |
5679 |
fix a b c d :: 'b |
|
5680 |
have "\<bar>dist a b - dist c d\<bar> \<le> dist a c + dist b d" |
|
44648
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5681 |
using dist_triangle2 [of a b c] dist_triangle2 [of b c d] |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5682 |
using dist_triangle3 [of c d a] dist_triangle [of a d b] |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5683 |
by arith |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5684 |
} note le = this |
53282 | 5685 |
{ |
5686 |
fix x y |
|
61969 | 5687 |
assume f: "(\<lambda>n. dist (f (x n)) (f (y n))) \<longlonglongrightarrow> 0" |
5688 |
assume g: "(\<lambda>n. dist (g (x n)) (g (y n))) \<longlonglongrightarrow> 0" |
|
5689 |
have "(\<lambda>n. \<bar>dist (f (x n)) (g (x n)) - dist (f (y n)) (g (y n))\<bar>) \<longlonglongrightarrow> 0" |
|
44648
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5690 |
by (rule Lim_transform_bound [OF _ tendsto_add_zero [OF f g]], |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5691 |
simp add: le) |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5692 |
} |
53282 | 5693 |
then show ?thesis |
5694 |
using assms unfolding uniformly_continuous_on_sequentially |
|
44648
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5695 |
unfolding dist_real_def by simp |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5696 |
qed |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5697 |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
5698 |
lemma uniformly_continuous_on_norm[continuous_intros]: |
62101 | 5699 |
fixes f :: "'a :: metric_space \<Rightarrow> 'b :: real_normed_vector" |
44648
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5700 |
assumes "uniformly_continuous_on s f" |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5701 |
shows "uniformly_continuous_on s (\<lambda>x. norm (f x))" |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5702 |
unfolding norm_conv_dist using assms |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5703 |
by (intro uniformly_continuous_on_dist uniformly_continuous_on_const) |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5704 |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
5705 |
lemma (in bounded_linear) uniformly_continuous_on[continuous_intros]: |
62101 | 5706 |
fixes g :: "_::metric_space \<Rightarrow> _" |
44648
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5707 |
assumes "uniformly_continuous_on s g" |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5708 |
shows "uniformly_continuous_on s (\<lambda>x. f (g x))" |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5709 |
using assms unfolding uniformly_continuous_on_sequentially |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5710 |
unfolding dist_norm tendsto_norm_zero_iff diff[symmetric] |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5711 |
by (auto intro: tendsto_zero) |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5712 |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
5713 |
lemma uniformly_continuous_on_cmul[continuous_intros]: |
36441 | 5714 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::real_normed_vector" |
33175 | 5715 |
assumes "uniformly_continuous_on s f" |
5716 |
shows "uniformly_continuous_on s (\<lambda>x. c *\<^sub>R f(x))" |
|
44648
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5717 |
using bounded_linear_scaleR_right assms |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5718 |
by (rule bounded_linear.uniformly_continuous_on) |
33175 | 5719 |
|
5720 |
lemma dist_minus: |
|
5721 |
fixes x y :: "'a::real_normed_vector" |
|
5722 |
shows "dist (- x) (- y) = dist x y" |
|
5723 |
unfolding dist_norm minus_diff_minus norm_minus_cancel .. |
|
5724 |
||
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
5725 |
lemma uniformly_continuous_on_minus[continuous_intros]: |
33175 | 5726 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::real_normed_vector" |
44648
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5727 |
shows "uniformly_continuous_on s f \<Longrightarrow> uniformly_continuous_on s (\<lambda>x. - f x)" |
33175 | 5728 |
unfolding uniformly_continuous_on_def dist_minus . |
5729 |
||
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
5730 |
lemma uniformly_continuous_on_add[continuous_intros]: |
36441 | 5731 |
fixes f g :: "'a::metric_space \<Rightarrow> 'b::real_normed_vector" |
44648
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5732 |
assumes "uniformly_continuous_on s f" |
53282 | 5733 |
and "uniformly_continuous_on s g" |
33175 | 5734 |
shows "uniformly_continuous_on s (\<lambda>x. f x + g x)" |
53282 | 5735 |
using assms |
5736 |
unfolding uniformly_continuous_on_sequentially |
|
44648
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5737 |
unfolding dist_norm tendsto_norm_zero_iff add_diff_add |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5738 |
by (auto intro: tendsto_add_zero) |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5739 |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
5740 |
lemma uniformly_continuous_on_diff[continuous_intros]: |
36441 | 5741 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::real_normed_vector" |
53282 | 5742 |
assumes "uniformly_continuous_on s f" |
5743 |
and "uniformly_continuous_on s g" |
|
44648
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5744 |
shows "uniformly_continuous_on s (\<lambda>x. f x - g x)" |
54230
b1d955791529
more simplification rules on unary and binary minus
haftmann
parents:
54070
diff
changeset
|
5745 |
using assms uniformly_continuous_on_add [of s f "- g"] |
b1d955791529
more simplification rules on unary and binary minus
haftmann
parents:
54070
diff
changeset
|
5746 |
by (simp add: fun_Compl_def uniformly_continuous_on_minus) |
33175 | 5747 |
|
51478
270b21f3ae0a
move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents:
51475
diff
changeset
|
5748 |
lemmas continuous_at_compose = isCont_o |
33175 | 5749 |
|
62101 | 5750 |
text \<open>Continuity in terms of open preimages.\<close> |
33175 | 5751 |
|
5752 |
lemma continuous_at_open: |
|
53282 | 5753 |
"continuous (at x) f \<longleftrightarrow> (\<forall>t. open t \<and> f x \<in> t --> (\<exists>s. open s \<and> x \<in> s \<and> (\<forall>x' \<in> s. (f x') \<in> t)))" |
5754 |
unfolding continuous_within_topological [of x UNIV f] |
|
5755 |
unfolding imp_conjL |
|
5756 |
by (intro all_cong imp_cong ex_cong conj_cong refl) auto |
|
33175 | 5757 |
|
51351 | 5758 |
lemma continuous_imp_tendsto: |
53282 | 5759 |
assumes "continuous (at x0) f" |
61969 | 5760 |
and "x \<longlonglongrightarrow> x0" |
5761 |
shows "(f \<circ> x) \<longlonglongrightarrow> (f x0)" |
|
51351 | 5762 |
proof (rule topological_tendstoI) |
5763 |
fix S |
|
5764 |
assume "open S" "f x0 \<in> S" |
|
5765 |
then obtain T where T_def: "open T" "x0 \<in> T" "\<forall>x\<in>T. f x \<in> S" |
|
5766 |
using assms continuous_at_open by metis |
|
5767 |
then have "eventually (\<lambda>n. x n \<in> T) sequentially" |
|
5768 |
using assms T_def by (auto simp: tendsto_def) |
|
5769 |
then show "eventually (\<lambda>n. (f \<circ> x) n \<in> S) sequentially" |
|
61810 | 5770 |
using T_def by (auto elim!: eventually_mono) |
51351 | 5771 |
qed |
5772 |
||
33175 | 5773 |
lemma continuous_on_open: |
51481
ef949192e5d6
move continuous_on_inv to HOL image (simplifies isCont_inverse_function)
hoelzl
parents:
51480
diff
changeset
|
5774 |
"continuous_on s f \<longleftrightarrow> |
53282 | 5775 |
(\<forall>t. openin (subtopology euclidean (f ` s)) t \<longrightarrow> |
5776 |
openin (subtopology euclidean s) {x \<in> s. f x \<in> t})" |
|
51481
ef949192e5d6
move continuous_on_inv to HOL image (simplifies isCont_inverse_function)
hoelzl
parents:
51480
diff
changeset
|
5777 |
unfolding continuous_on_open_invariant openin_open Int_def vimage_def Int_commute |
ef949192e5d6
move continuous_on_inv to HOL image (simplifies isCont_inverse_function)
hoelzl
parents:
51480
diff
changeset
|
5778 |
by (simp add: imp_ex imageI conj_commute eq_commute cong: conj_cong) |
36441 | 5779 |
|
60420 | 5780 |
text \<open>Similarly in terms of closed sets.\<close> |
33175 | 5781 |
|
5782 |
lemma continuous_on_closed: |
|
53282 | 5783 |
"continuous_on s f \<longleftrightarrow> |
5784 |
(\<forall>t. closedin (subtopology euclidean (f ` s)) t \<longrightarrow> |
|
5785 |
closedin (subtopology euclidean s) {x \<in> s. f x \<in> t})" |
|
51481
ef949192e5d6
move continuous_on_inv to HOL image (simplifies isCont_inverse_function)
hoelzl
parents:
51480
diff
changeset
|
5786 |
unfolding continuous_on_closed_invariant closedin_closed Int_def vimage_def Int_commute |
ef949192e5d6
move continuous_on_inv to HOL image (simplifies isCont_inverse_function)
hoelzl
parents:
51480
diff
changeset
|
5787 |
by (simp add: imp_ex imageI conj_commute eq_commute cong: conj_cong) |
33175 | 5788 |
|
60420 | 5789 |
text \<open>Half-global and completely global cases.\<close> |
33175 | 5790 |
|
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
5791 |
lemma continuous_openin_preimage: |
33175 | 5792 |
assumes "continuous_on s f" "open t" |
5793 |
shows "openin (subtopology euclidean s) {x \<in> s. f x \<in> t}" |
|
53282 | 5794 |
proof - |
5795 |
have *: "\<forall>x. x \<in> s \<and> f x \<in> t \<longleftrightarrow> x \<in> s \<and> f x \<in> (t \<inter> f ` s)" |
|
5796 |
by auto |
|
33175 | 5797 |
have "openin (subtopology euclidean (f ` s)) (t \<inter> f ` s)" |
5798 |
using openin_open_Int[of t "f ` s", OF assms(2)] unfolding openin_open by auto |
|
53282 | 5799 |
then show ?thesis |
5800 |
using assms(1)[unfolded continuous_on_open, THEN spec[where x="t \<inter> f ` s"]] |
|
5801 |
using * by auto |
|
33175 | 5802 |
qed |
5803 |
||
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
5804 |
lemma continuous_closedin_preimage: |
53291 | 5805 |
assumes "continuous_on s f" and "closed t" |
33175 | 5806 |
shows "closedin (subtopology euclidean s) {x \<in> s. f x \<in> t}" |
53282 | 5807 |
proof - |
5808 |
have *: "\<forall>x. x \<in> s \<and> f x \<in> t \<longleftrightarrow> x \<in> s \<and> f x \<in> (t \<inter> f ` s)" |
|
5809 |
by auto |
|
33175 | 5810 |
have "closedin (subtopology euclidean (f ` s)) (t \<inter> f ` s)" |
53282 | 5811 |
using closedin_closed_Int[of t "f ` s", OF assms(2)] unfolding Int_commute |
5812 |
by auto |
|
5813 |
then show ?thesis |
|
5814 |
using assms(1)[unfolded continuous_on_closed, THEN spec[where x="t \<inter> f ` s"]] |
|
5815 |
using * by auto |
|
33175 | 5816 |
qed |
5817 |
||
5818 |
lemma continuous_open_preimage: |
|
53291 | 5819 |
assumes "continuous_on s f" |
5820 |
and "open s" |
|
5821 |
and "open t" |
|
33175 | 5822 |
shows "open {x \<in> s. f x \<in> t}" |
5823 |
proof- |
|
5824 |
obtain T where T: "open T" "{x \<in> s. f x \<in> t} = s \<inter> T" |
|
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
5825 |
using continuous_openin_preimage[OF assms(1,3)] unfolding openin_open by auto |
53282 | 5826 |
then show ?thesis |
5827 |
using open_Int[of s T, OF assms(2)] by auto |
|
33175 | 5828 |
qed |
5829 |
||
5830 |
lemma continuous_closed_preimage: |
|
53291 | 5831 |
assumes "continuous_on s f" |
5832 |
and "closed s" |
|
5833 |
and "closed t" |
|
33175 | 5834 |
shows "closed {x \<in> s. f x \<in> t}" |
5835 |
proof- |
|
53282 | 5836 |
obtain T where "closed T" "{x \<in> s. f x \<in> t} = s \<inter> T" |
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
5837 |
using continuous_closedin_preimage[OF assms(1,3)] |
53282 | 5838 |
unfolding closedin_closed by auto |
5839 |
then show ?thesis using closed_Int[of s T, OF assms(2)] by auto |
|
33175 | 5840 |
qed |
5841 |
||
5842 |
lemma continuous_open_preimage_univ: |
|
53282 | 5843 |
"\<forall>x. continuous (at x) f \<Longrightarrow> open s \<Longrightarrow> open {x. f x \<in> s}" |
33175 | 5844 |
using continuous_open_preimage[of UNIV f s] open_UNIV continuous_at_imp_continuous_on by auto |
5845 |
||
5846 |
lemma continuous_closed_preimage_univ: |
|
53291 | 5847 |
"(\<forall>x. continuous (at x) f) \<Longrightarrow> closed s \<Longrightarrow> closed {x. f x \<in> s}" |
33175 | 5848 |
using continuous_closed_preimage[of UNIV f s] closed_UNIV continuous_at_imp_continuous_on by auto |
5849 |
||
53282 | 5850 |
lemma continuous_open_vimage: "\<forall>x. continuous (at x) f \<Longrightarrow> open s \<Longrightarrow> open (f -` s)" |
33175 | 5851 |
unfolding vimage_def by (rule continuous_open_preimage_univ) |
5852 |
||
53282 | 5853 |
lemma continuous_closed_vimage: "\<forall>x. continuous (at x) f \<Longrightarrow> closed s \<Longrightarrow> closed (f -` s)" |
33175 | 5854 |
unfolding vimage_def by (rule continuous_closed_preimage_univ) |
5855 |
||
36441 | 5856 |
lemma interior_image_subset: |
53291 | 5857 |
assumes "\<forall>x. continuous (at x) f" |
5858 |
and "inj f" |
|
35172
579dd5570f96
Added integration to Multivariate-Analysis (upto FTC)
himmelma
parents:
35028
diff
changeset
|
5859 |
shows "interior (f ` s) \<subseteq> f ` (interior s)" |
44519 | 5860 |
proof |
5861 |
fix x assume "x \<in> interior (f ` s)" |
|
5862 |
then obtain T where as: "open T" "x \<in> T" "T \<subseteq> f ` s" .. |
|
53282 | 5863 |
then have "x \<in> f ` s" by auto |
44519 | 5864 |
then obtain y where y: "y \<in> s" "x = f y" by auto |
5865 |
have "open (vimage f T)" |
|
60420 | 5866 |
using assms(1) \<open>open T\<close> by (rule continuous_open_vimage) |
44519 | 5867 |
moreover have "y \<in> vimage f T" |
60420 | 5868 |
using \<open>x = f y\<close> \<open>x \<in> T\<close> by simp |
44519 | 5869 |
moreover have "vimage f T \<subseteq> s" |
60420 | 5870 |
using \<open>T \<subseteq> image f s\<close> \<open>inj f\<close> unfolding inj_on_def subset_eq by auto |
44519 | 5871 |
ultimately have "y \<in> interior s" .. |
60420 | 5872 |
with \<open>x = f y\<close> show "x \<in> f ` interior s" .. |
5873 |
qed |
|
5874 |
||
5875 |
text \<open>Equality of continuous functions on closure and related results.\<close> |
|
33175 | 5876 |
|
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
5877 |
lemma continuous_closedin_preimage_constant: |
36668
941ba2da372e
simplify definition of t1_space; generalize lemma closed_sing and related lemmas
huffman
parents:
36667
diff
changeset
|
5878 |
fixes f :: "_ \<Rightarrow> 'b::t1_space" |
53291 | 5879 |
shows "continuous_on s f \<Longrightarrow> closedin (subtopology euclidean s) {x \<in> s. f x = a}" |
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
5880 |
using continuous_closedin_preimage[of s f "{a}"] by auto |
33175 | 5881 |
|
5882 |
lemma continuous_closed_preimage_constant: |
|
36668
941ba2da372e
simplify definition of t1_space; generalize lemma closed_sing and related lemmas
huffman
parents:
36667
diff
changeset
|
5883 |
fixes f :: "_ \<Rightarrow> 'b::t1_space" |
53291 | 5884 |
shows "continuous_on s f \<Longrightarrow> closed s \<Longrightarrow> closed {x \<in> s. f x = a}" |
36668
941ba2da372e
simplify definition of t1_space; generalize lemma closed_sing and related lemmas
huffman
parents:
36667
diff
changeset
|
5885 |
using continuous_closed_preimage[of s f "{a}"] by auto |
33175 | 5886 |
|
5887 |
lemma continuous_constant_on_closure: |
|
36668
941ba2da372e
simplify definition of t1_space; generalize lemma closed_sing and related lemmas
huffman
parents:
36667
diff
changeset
|
5888 |
fixes f :: "_ \<Rightarrow> 'b::t1_space" |
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
5889 |
assumes "continuous_on (closure S) f" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
5890 |
and "\<And>x. x \<in> S \<Longrightarrow> f x = a" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
5891 |
and "x \<in> closure S" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
5892 |
shows "f x = a" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
5893 |
using continuous_closed_preimage_constant[of "closure S" f a] |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
5894 |
assms closure_minimal[of S "{x \<in> closure S. f x = a}"] closure_subset |
53282 | 5895 |
unfolding subset_eq |
5896 |
by auto |
|
33175 | 5897 |
|
5898 |
lemma image_closure_subset: |
|
53291 | 5899 |
assumes "continuous_on (closure s) f" |
5900 |
and "closed t" |
|
5901 |
and "(f ` s) \<subseteq> t" |
|
33175 | 5902 |
shows "f ` (closure s) \<subseteq> t" |
53282 | 5903 |
proof - |
5904 |
have "s \<subseteq> {x \<in> closure s. f x \<in> t}" |
|
5905 |
using assms(3) closure_subset by auto |
|
33175 | 5906 |
moreover have "closed {x \<in> closure s. f x \<in> t}" |
5907 |
using continuous_closed_preimage[OF assms(1)] and assms(2) by auto |
|
5908 |
ultimately have "closure s = {x \<in> closure s . f x \<in> t}" |
|
5909 |
using closure_minimal[of s "{x \<in> closure s. f x \<in> t}"] by auto |
|
53282 | 5910 |
then show ?thesis by auto |
33175 | 5911 |
qed |
5912 |
||
5913 |
lemma continuous_on_closure_norm_le: |
|
5914 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::real_normed_vector" |
|
53282 | 5915 |
assumes "continuous_on (closure s) f" |
5916 |
and "\<forall>y \<in> s. norm(f y) \<le> b" |
|
5917 |
and "x \<in> (closure s)" |
|
53291 | 5918 |
shows "norm (f x) \<le> b" |
53282 | 5919 |
proof - |
5920 |
have *: "f ` s \<subseteq> cball 0 b" |
|
53291 | 5921 |
using assms(2)[unfolded mem_cball_0[symmetric]] by auto |
33175 | 5922 |
show ?thesis |
5923 |
using image_closure_subset[OF assms(1) closed_cball[of 0 b] *] assms(3) |
|
53282 | 5924 |
unfolding subset_eq |
5925 |
apply (erule_tac x="f x" in ballE) |
|
5926 |
apply (auto simp add: dist_norm) |
|
5927 |
done |
|
33175 | 5928 |
qed |
5929 |
||
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
5930 |
lemma isCont_indicator: |
61880
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5931 |
fixes x :: "'a::t2_space" |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5932 |
shows "isCont (indicator A :: 'a \<Rightarrow> real) x = (x \<notin> frontier A)" |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5933 |
proof auto |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5934 |
fix x |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5935 |
assume cts_at: "isCont (indicator A :: 'a \<Rightarrow> real) x" and fr: "x \<in> frontier A" |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5936 |
with continuous_at_open have 1: "\<forall>V::real set. open V \<and> indicator A x \<in> V \<longrightarrow> |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5937 |
(\<exists>U::'a set. open U \<and> x \<in> U \<and> (\<forall>y\<in>U. indicator A y \<in> V))" by auto |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5938 |
show False |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5939 |
proof (cases "x \<in> A") |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5940 |
assume x: "x \<in> A" |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5941 |
hence "indicator A x \<in> ({0<..<2} :: real set)" by simp |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5942 |
hence "\<exists>U. open U \<and> x \<in> U \<and> (\<forall>y\<in>U. indicator A y \<in> ({0<..<2} :: real set))" |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5943 |
using 1 open_greaterThanLessThan by blast |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5944 |
then guess U .. note U = this |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5945 |
hence "\<forall>y\<in>U. indicator A y > (0::real)" |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5946 |
unfolding greaterThanLessThan_def by auto |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5947 |
hence "U \<subseteq> A" using indicator_eq_0_iff by force |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5948 |
hence "x \<in> interior A" using U interiorI by auto |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5949 |
thus ?thesis using fr unfolding frontier_def by simp |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5950 |
next |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5951 |
assume x: "x \<notin> A" |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5952 |
hence "indicator A x \<in> ({-1<..<1} :: real set)" by simp |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5953 |
hence "\<exists>U. open U \<and> x \<in> U \<and> (\<forall>y\<in>U. indicator A y \<in> ({-1<..<1} :: real set))" |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5954 |
using 1 open_greaterThanLessThan by blast |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5955 |
then guess U .. note U = this |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5956 |
hence "\<forall>y\<in>U. indicator A y < (1::real)" |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5957 |
unfolding greaterThanLessThan_def by auto |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5958 |
hence "U \<subseteq> -A" by auto |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5959 |
hence "x \<in> interior (-A)" using U interiorI by auto |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5960 |
thus ?thesis using fr interior_complement unfolding frontier_def by auto |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5961 |
qed |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5962 |
next |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5963 |
assume nfr: "x \<notin> frontier A" |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5964 |
hence "x \<in> interior A \<or> x \<in> interior (-A)" |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5965 |
by (auto simp: frontier_def closure_interior) |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5966 |
thus "isCont ((indicator A)::'a \<Rightarrow> real) x" |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5967 |
proof |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5968 |
assume int: "x \<in> interior A" |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5969 |
hence "\<exists>U. open U \<and> x \<in> U \<and> U \<subseteq> A" unfolding interior_def by auto |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5970 |
then guess U .. note U = this |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5971 |
hence "\<forall>y\<in>U. indicator A y = (1::real)" unfolding indicator_def by auto |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5972 |
hence "continuous_on U (indicator A)" by (simp add: continuous_on_const indicator_eq_1_iff) |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5973 |
thus ?thesis using U continuous_on_eq_continuous_at by auto |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5974 |
next |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5975 |
assume ext: "x \<in> interior (-A)" |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5976 |
hence "\<exists>U. open U \<and> x \<in> U \<and> U \<subseteq> -A" unfolding interior_def by auto |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5977 |
then guess U .. note U = this |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5978 |
hence "\<forall>y\<in>U. indicator A y = (0::real)" unfolding indicator_def by auto |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5979 |
hence "continuous_on U (indicator A)" by (smt U continuous_on_topological indicator_def) |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5980 |
thus ?thesis using U continuous_on_eq_continuous_at by auto |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5981 |
qed |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5982 |
qed |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
5983 |
|
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
5984 |
subsection\<open> Theorems relating continuity and uniform continuity to closures\<close> |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
5985 |
|
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
5986 |
lemma continuous_on_closure: |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
5987 |
"continuous_on (closure S) f \<longleftrightarrow> |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
5988 |
(\<forall>x e. x \<in> closure S \<and> 0 < e |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
5989 |
\<longrightarrow> (\<exists>d. 0 < d \<and> (\<forall>y. y \<in> S \<and> dist y x < d \<longrightarrow> dist (f y) (f x) < e)))" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
5990 |
(is "?lhs = ?rhs") |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
5991 |
proof |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
5992 |
assume ?lhs then show ?rhs |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
5993 |
unfolding continuous_on_iff by (metis Un_iff closure_def) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
5994 |
next |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
5995 |
assume R [rule_format]: ?rhs |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
5996 |
show ?lhs |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
5997 |
proof |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
5998 |
fix x and e::real |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
5999 |
assume "0 < e" and x: "x \<in> closure S" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6000 |
obtain \<delta>::real where "\<delta> > 0" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6001 |
and \<delta>: "\<And>y. \<lbrakk>y \<in> S; dist y x < \<delta>\<rbrakk> \<Longrightarrow> dist (f y) (f x) < e/2" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6002 |
using R [of x "e/2"] \<open>0 < e\<close> x by auto |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6003 |
have "dist (f y) (f x) \<le> e" if y: "y \<in> closure S" and dyx: "dist y x < \<delta>/2" for y |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6004 |
proof - |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6005 |
obtain \<delta>'::real where "\<delta>' > 0" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6006 |
and \<delta>': "\<And>z. \<lbrakk>z \<in> S; dist z y < \<delta>'\<rbrakk> \<Longrightarrow> dist (f z) (f y) < e/2" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6007 |
using R [of y "e/2"] \<open>0 < e\<close> y by auto |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6008 |
obtain z where "z \<in> S" and z: "dist z y < min \<delta>' \<delta> / 2" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6009 |
using closure_approachable y |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6010 |
by (metis \<open>0 < \<delta>'\<close> \<open>0 < \<delta>\<close> divide_pos_pos min_less_iff_conj zero_less_numeral) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6011 |
have "dist (f z) (f y) < e/2" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6012 |
apply (rule \<delta>' [OF \<open>z \<in> S\<close>]) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6013 |
using z \<open>0 < \<delta>'\<close> by linarith |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6014 |
moreover have "dist (f z) (f x) < e/2" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6015 |
apply (rule \<delta> [OF \<open>z \<in> S\<close>]) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6016 |
using z \<open>0 < \<delta>\<close> dist_commute[of y z] dist_triangle_half_r [of y] dyx by auto |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6017 |
ultimately show ?thesis |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6018 |
by (metis dist_commute dist_triangle_half_l less_imp_le) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6019 |
qed |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6020 |
then show "\<exists>d>0. \<forall>x'\<in>closure S. dist x' x < d \<longrightarrow> dist (f x') (f x) \<le> e" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6021 |
by (rule_tac x="\<delta>/2" in exI) (simp add: \<open>\<delta> > 0\<close>) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6022 |
qed |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6023 |
qed |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6024 |
|
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6025 |
lemma continuous_on_closure_sequentially: |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6026 |
fixes f :: "'a::metric_space \<Rightarrow> 'b :: metric_space" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6027 |
shows |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6028 |
"continuous_on (closure S) f \<longleftrightarrow> |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6029 |
(\<forall>x a. a \<in> closure S \<and> (\<forall>n. x n \<in> S) \<and> x \<longlonglongrightarrow> a \<longrightarrow> (f \<circ> x) \<longlonglongrightarrow> f a)" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6030 |
(is "?lhs = ?rhs") |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6031 |
proof - |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6032 |
have "continuous_on (closure S) f \<longleftrightarrow> |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6033 |
(\<forall>x \<in> closure S. continuous (at x within S) f)" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6034 |
by (force simp: continuous_on_closure Topology_Euclidean_Space.continuous_within_eps_delta) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6035 |
also have "... = ?rhs" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6036 |
by (force simp: continuous_within_sequentially) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6037 |
finally show ?thesis . |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6038 |
qed |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6039 |
|
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6040 |
lemma uniformly_continuous_on_closure: |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6041 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::metric_space" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6042 |
assumes ucont: "uniformly_continuous_on S f" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6043 |
and cont: "continuous_on (closure S) f" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6044 |
shows "uniformly_continuous_on (closure S) f" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6045 |
unfolding uniformly_continuous_on_def |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6046 |
proof (intro allI impI) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6047 |
fix e::real |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6048 |
assume "0 < e" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6049 |
then obtain d::real |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6050 |
where "d>0" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6051 |
and d: "\<And>x x'. \<lbrakk>x\<in>S; x'\<in>S; dist x' x < d\<rbrakk> \<Longrightarrow> dist (f x') (f x) < e/3" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6052 |
using ucont [unfolded uniformly_continuous_on_def, rule_format, of "e/3"] by auto |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6053 |
show "\<exists>d>0. \<forall>x\<in>closure S. \<forall>x'\<in>closure S. dist x' x < d \<longrightarrow> dist (f x') (f x) < e" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6054 |
proof (rule exI [where x="d/3"], clarsimp simp: \<open>d > 0\<close>) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6055 |
fix x y |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6056 |
assume x: "x \<in> closure S" and y: "y \<in> closure S" and dyx: "dist y x * 3 < d" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6057 |
obtain d1::real where "d1 > 0" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6058 |
and d1: "\<And>w. \<lbrakk>w \<in> closure S; dist w x < d1\<rbrakk> \<Longrightarrow> dist (f w) (f x) < e/3" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6059 |
using cont [unfolded continuous_on_iff, rule_format, of "x" "e/3"] \<open>0 < e\<close> x by auto |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6060 |
obtain x' where "x' \<in> S" and x': "dist x' x < min d1 (d / 3)" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6061 |
using closure_approachable [of x S] |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6062 |
by (metis \<open>0 < d1\<close> \<open>0 < d\<close> divide_pos_pos min_less_iff_conj x zero_less_numeral) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6063 |
obtain d2::real where "d2 > 0" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6064 |
and d2: "\<forall>w \<in> closure S. dist w y < d2 \<longrightarrow> dist (f w) (f y) < e/3" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6065 |
using cont [unfolded continuous_on_iff, rule_format, of "y" "e/3"] \<open>0 < e\<close> y by auto |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6066 |
obtain y' where "y' \<in> S" and y': "dist y' y < min d2 (d / 3)" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6067 |
using closure_approachable [of y S] |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6068 |
by (metis \<open>0 < d2\<close> \<open>0 < d\<close> divide_pos_pos min_less_iff_conj y zero_less_numeral) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6069 |
have "dist x' x < d/3" using x' by auto |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6070 |
moreover have "dist x y < d/3" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6071 |
by (metis dist_commute dyx less_divide_eq_numeral1(1)) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6072 |
moreover have "dist y y' < d/3" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6073 |
by (metis (no_types) dist_commute min_less_iff_conj y') |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6074 |
ultimately have "dist x' y' < d/3 + d/3 + d/3" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6075 |
by (meson dist_commute_lessI dist_triangle_lt add_strict_mono) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6076 |
then have "dist x' y' < d" by simp |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6077 |
then have "dist (f x') (f y') < e/3" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6078 |
by (rule d [OF \<open>y' \<in> S\<close> \<open>x' \<in> S\<close>]) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6079 |
moreover have "dist (f x') (f x) < e/3" using \<open>x' \<in> S\<close> closure_subset x' d1 |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6080 |
by (simp add: closure_def) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6081 |
moreover have "dist (f y') (f y) < e/3" using \<open>y' \<in> S\<close> closure_subset y' d2 |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6082 |
by (simp add: closure_def) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6083 |
ultimately have "dist (f y) (f x) < e/3 + e/3 + e/3" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6084 |
by (meson dist_commute_lessI dist_triangle_lt add_strict_mono) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6085 |
then show "dist (f y) (f x) < e" by simp |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6086 |
qed |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6087 |
qed |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6088 |
|
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6089 |
subsection\<open>Quotient maps\<close> |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6090 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6091 |
lemma quotient_map_imp_continuous_open: |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6092 |
assumes t: "f ` s \<subseteq> t" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6093 |
and ope: "\<And>u. u \<subseteq> t |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6094 |
\<Longrightarrow> (openin (subtopology euclidean s) {x. x \<in> s \<and> f x \<in> u} \<longleftrightarrow> |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6095 |
openin (subtopology euclidean t) u)" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6096 |
shows "continuous_on s f" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6097 |
proof - |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6098 |
have [simp]: "{x \<in> s. f x \<in> f ` s} = s" by auto |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6099 |
show ?thesis |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6100 |
using ope [OF t] |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6101 |
apply (simp add: continuous_on_open) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6102 |
by (metis (no_types, lifting) "ope" openin_imp_subset openin_trans) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6103 |
qed |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6104 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6105 |
lemma quotient_map_imp_continuous_closed: |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6106 |
assumes t: "f ` s \<subseteq> t" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6107 |
and ope: "\<And>u. u \<subseteq> t |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6108 |
\<Longrightarrow> (closedin (subtopology euclidean s) {x. x \<in> s \<and> f x \<in> u} \<longleftrightarrow> |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6109 |
closedin (subtopology euclidean t) u)" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6110 |
shows "continuous_on s f" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6111 |
proof - |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6112 |
have [simp]: "{x \<in> s. f x \<in> f ` s} = s" by auto |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6113 |
show ?thesis |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6114 |
using ope [OF t] |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6115 |
apply (simp add: continuous_on_closed) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6116 |
by (metis (no_types, lifting) "ope" closedin_imp_subset closedin_subtopology_refl closedin_trans openin_subtopology_refl openin_subtopology_self) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6117 |
qed |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6118 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6119 |
lemma open_map_imp_quotient_map: |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6120 |
assumes contf: "continuous_on s f" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6121 |
and t: "t \<subseteq> f ` s" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6122 |
and ope: "\<And>t. openin (subtopology euclidean s) t |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6123 |
\<Longrightarrow> openin (subtopology euclidean (f ` s)) (f ` t)" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6124 |
shows "openin (subtopology euclidean s) {x \<in> s. f x \<in> t} = |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6125 |
openin (subtopology euclidean (f ` s)) t" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6126 |
proof - |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6127 |
have "t = image f {x. x \<in> s \<and> f x \<in> t}" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6128 |
using t by blast |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6129 |
then show ?thesis |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6130 |
using "ope" contf continuous_on_open by fastforce |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6131 |
qed |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6132 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6133 |
lemma closed_map_imp_quotient_map: |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6134 |
assumes contf: "continuous_on s f" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6135 |
and t: "t \<subseteq> f ` s" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6136 |
and ope: "\<And>t. closedin (subtopology euclidean s) t |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6137 |
\<Longrightarrow> closedin (subtopology euclidean (f ` s)) (f ` t)" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6138 |
shows "openin (subtopology euclidean s) {x \<in> s. f x \<in> t} \<longleftrightarrow> |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6139 |
openin (subtopology euclidean (f ` s)) t" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6140 |
(is "?lhs = ?rhs") |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6141 |
proof |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6142 |
assume ?lhs |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6143 |
then have *: "closedin (subtopology euclidean s) (s - {x \<in> s. f x \<in> t})" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6144 |
using closedin_diff by fastforce |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6145 |
have [simp]: "(f ` s - f ` (s - {x \<in> s. f x \<in> t})) = t" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6146 |
using t by blast |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6147 |
show ?rhs |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6148 |
using ope [OF *, unfolded closedin_def] by auto |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6149 |
next |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6150 |
assume ?rhs |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6151 |
with contf show ?lhs |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6152 |
by (auto simp: continuous_on_open) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6153 |
qed |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6154 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6155 |
lemma continuous_right_inverse_imp_quotient_map: |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6156 |
assumes contf: "continuous_on s f" and imf: "f ` s \<subseteq> t" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6157 |
and contg: "continuous_on t g" and img: "g ` t \<subseteq> s" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6158 |
and fg [simp]: "\<And>y. y \<in> t \<Longrightarrow> f(g y) = y" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6159 |
and u: "u \<subseteq> t" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6160 |
shows "openin (subtopology euclidean s) {x. x \<in> s \<and> f x \<in> u} \<longleftrightarrow> |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6161 |
openin (subtopology euclidean t) u" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6162 |
(is "?lhs = ?rhs") |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6163 |
proof - |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6164 |
have f: "\<And>z. openin (subtopology euclidean (f ` s)) z \<Longrightarrow> |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6165 |
openin (subtopology euclidean s) {x \<in> s. f x \<in> z}" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6166 |
and g: "\<And>z. openin (subtopology euclidean (g ` t)) z \<Longrightarrow> |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6167 |
openin (subtopology euclidean t) {x \<in> t. g x \<in> z}" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6168 |
using contf contg by (auto simp: continuous_on_open) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6169 |
show ?thesis |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6170 |
proof |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6171 |
have "{x \<in> t. g x \<in> g ` t \<and> g x \<in> s \<and> f (g x) \<in> u} = {x \<in> t. f (g x) \<in> u}" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6172 |
using imf img by blast |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6173 |
also have "... = u" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6174 |
using u by auto |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6175 |
finally have [simp]: "{x \<in> t. g x \<in> g ` t \<and> g x \<in> s \<and> f (g x) \<in> u} = u" . |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6176 |
assume ?lhs |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6177 |
then have *: "openin (subtopology euclidean (g ` t)) (g ` t \<inter> {x \<in> s. f x \<in> u})" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6178 |
by (meson img openin_Int openin_subtopology_Int_subset openin_subtopology_self) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6179 |
show ?rhs |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6180 |
using g [OF *] by simp |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6181 |
next |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6182 |
assume rhs: ?rhs |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6183 |
show ?lhs |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6184 |
apply (rule f) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6185 |
by (metis fg image_eqI image_subset_iff imf img openin_subopen openin_subtopology_self openin_trans rhs) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6186 |
qed |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6187 |
qed |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6188 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6189 |
lemma continuous_left_inverse_imp_quotient_map: |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6190 |
assumes "continuous_on s f" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6191 |
and "continuous_on (f ` s) g" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6192 |
and "\<And>x. x \<in> s \<Longrightarrow> g(f x) = x" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6193 |
and "u \<subseteq> f ` s" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6194 |
shows "openin (subtopology euclidean s) {x. x \<in> s \<and> f x \<in> u} \<longleftrightarrow> |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6195 |
openin (subtopology euclidean (f ` s)) u" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6196 |
apply (rule continuous_right_inverse_imp_quotient_map) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6197 |
using assms |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6198 |
apply force+ |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6199 |
done |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6200 |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6201 |
subsection \<open>A function constant on a set\<close> |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6202 |
|
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6203 |
definition constant_on (infixl "(constant'_on)" 50) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6204 |
where "f constant_on A \<equiv> \<exists>y. \<forall>x\<in>A. f x = y" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6205 |
|
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6206 |
lemma constant_on_subset: "\<lbrakk>f constant_on A; B \<subseteq> A\<rbrakk> \<Longrightarrow> f constant_on B" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6207 |
unfolding constant_on_def by blast |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6208 |
|
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6209 |
lemma injective_not_constant: |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6210 |
fixes S :: "'a::{perfect_space} set" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6211 |
shows "\<lbrakk>open S; inj_on f S; f constant_on S\<rbrakk> \<Longrightarrow> S = {}" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6212 |
unfolding constant_on_def |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6213 |
by (metis equals0I inj_on_contraD islimpt_UNIV islimpt_def) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6214 |
|
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6215 |
lemma constant_on_closureI: |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6216 |
fixes f :: "_ \<Rightarrow> 'b::t1_space" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6217 |
assumes cof: "f constant_on S" and contf: "continuous_on (closure S) f" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6218 |
shows "f constant_on (closure S)" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6219 |
using continuous_constant_on_closure [OF contf] cof unfolding constant_on_def |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6220 |
by metis |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6221 |
|
60420 | 6222 |
text \<open>Making a continuous function avoid some value in a neighbourhood.\<close> |
33175 | 6223 |
|
6224 |
lemma continuous_within_avoid: |
|
50898 | 6225 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::t1_space" |
53282 | 6226 |
assumes "continuous (at x within s) f" |
6227 |
and "f x \<noteq> a" |
|
33175 | 6228 |
shows "\<exists>e>0. \<forall>y \<in> s. dist x y < e --> f y \<noteq> a" |
53291 | 6229 |
proof - |
50898 | 6230 |
obtain U where "open U" and "f x \<in> U" and "a \<notin> U" |
60420 | 6231 |
using t1_space [OF \<open>f x \<noteq> a\<close>] by fast |
61973 | 6232 |
have "(f \<longlongrightarrow> f x) (at x within s)" |
50898 | 6233 |
using assms(1) by (simp add: continuous_within) |
53282 | 6234 |
then have "eventually (\<lambda>y. f y \<in> U) (at x within s)" |
60420 | 6235 |
using \<open>open U\<close> and \<open>f x \<in> U\<close> |
50898 | 6236 |
unfolding tendsto_def by fast |
53282 | 6237 |
then have "eventually (\<lambda>y. f y \<noteq> a) (at x within s)" |
61810 | 6238 |
using \<open>a \<notin> U\<close> by (fast elim: eventually_mono) |
53282 | 6239 |
then show ?thesis |
60420 | 6240 |
using \<open>f x \<noteq> a\<close> by (auto simp: dist_commute zero_less_dist_iff eventually_at) |
33175 | 6241 |
qed |
6242 |
||
6243 |
lemma continuous_at_avoid: |
|
50898 | 6244 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::t1_space" |
53282 | 6245 |
assumes "continuous (at x) f" |
6246 |
and "f x \<noteq> a" |
|
33175 | 6247 |
shows "\<exists>e>0. \<forall>y. dist x y < e \<longrightarrow> f y \<noteq> a" |
45031 | 6248 |
using assms continuous_within_avoid[of x UNIV f a] by simp |
33175 | 6249 |
|
6250 |
lemma continuous_on_avoid: |
|
50898 | 6251 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::t1_space" |
53282 | 6252 |
assumes "continuous_on s f" |
6253 |
and "x \<in> s" |
|
6254 |
and "f x \<noteq> a" |
|
33175 | 6255 |
shows "\<exists>e>0. \<forall>y \<in> s. dist x y < e \<longrightarrow> f y \<noteq> a" |
53282 | 6256 |
using assms(1)[unfolded continuous_on_eq_continuous_within, THEN bspec[where x=x], |
6257 |
OF assms(2)] continuous_within_avoid[of x s f a] |
|
6258 |
using assms(3) |
|
6259 |
by auto |
|
33175 | 6260 |
|
6261 |
lemma continuous_on_open_avoid: |
|
50898 | 6262 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::t1_space" |
53291 | 6263 |
assumes "continuous_on s f" |
6264 |
and "open s" |
|
6265 |
and "x \<in> s" |
|
6266 |
and "f x \<noteq> a" |
|
33175 | 6267 |
shows "\<exists>e>0. \<forall>y. dist x y < e \<longrightarrow> f y \<noteq> a" |
53282 | 6268 |
using assms(1)[unfolded continuous_on_eq_continuous_at[OF assms(2)], THEN bspec[where x=x], OF assms(3)] |
6269 |
using continuous_at_avoid[of x f a] assms(4) |
|
6270 |
by auto |
|
33175 | 6271 |
|
60420 | 6272 |
text \<open>Proving a function is constant by proving open-ness of level set.\<close> |
33175 | 6273 |
|
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
6274 |
lemma continuous_levelset_openin_cases: |
36668
941ba2da372e
simplify definition of t1_space; generalize lemma closed_sing and related lemmas
huffman
parents:
36667
diff
changeset
|
6275 |
fixes f :: "_ \<Rightarrow> 'b::t1_space" |
36359 | 6276 |
shows "connected s \<Longrightarrow> continuous_on s f \<Longrightarrow> |
33175 | 6277 |
openin (subtopology euclidean s) {x \<in> s. f x = a} |
53282 | 6278 |
\<Longrightarrow> (\<forall>x \<in> s. f x \<noteq> a) \<or> (\<forall>x \<in> s. f x = a)" |
6279 |
unfolding connected_clopen |
|
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
6280 |
using continuous_closedin_preimage_constant by auto |
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
6281 |
|
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
6282 |
lemma continuous_levelset_openin: |
36668
941ba2da372e
simplify definition of t1_space; generalize lemma closed_sing and related lemmas
huffman
parents:
36667
diff
changeset
|
6283 |
fixes f :: "_ \<Rightarrow> 'b::t1_space" |
36359 | 6284 |
shows "connected s \<Longrightarrow> continuous_on s f \<Longrightarrow> |
33175 | 6285 |
openin (subtopology euclidean s) {x \<in> s. f x = a} \<Longrightarrow> |
53291 | 6286 |
(\<exists>x \<in> s. f x = a) \<Longrightarrow> (\<forall>x \<in> s. f x = a)" |
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
6287 |
using continuous_levelset_openin_cases[of s f ] |
53282 | 6288 |
by meson |
33175 | 6289 |
|
6290 |
lemma continuous_levelset_open: |
|
36668
941ba2da372e
simplify definition of t1_space; generalize lemma closed_sing and related lemmas
huffman
parents:
36667
diff
changeset
|
6291 |
fixes f :: "_ \<Rightarrow> 'b::t1_space" |
53282 | 6292 |
assumes "connected s" |
6293 |
and "continuous_on s f" |
|
6294 |
and "open {x \<in> s. f x = a}" |
|
6295 |
and "\<exists>x \<in> s. f x = a" |
|
33175 | 6296 |
shows "\<forall>x \<in> s. f x = a" |
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
6297 |
using continuous_levelset_openin[OF assms(1,2), of a, unfolded openin_open] |
53282 | 6298 |
using assms (3,4) |
6299 |
by fast |
|
33175 | 6300 |
|
60420 | 6301 |
text \<open>Some arithmetical combinations (more to prove).\<close> |
33175 | 6302 |
|
6303 |
lemma open_scaling[intro]: |
|
6304 |
fixes s :: "'a::real_normed_vector set" |
|
53291 | 6305 |
assumes "c \<noteq> 0" |
6306 |
and "open s" |
|
33175 | 6307 |
shows "open((\<lambda>x. c *\<^sub>R x) ` s)" |
53282 | 6308 |
proof - |
6309 |
{ |
|
6310 |
fix x |
|
6311 |
assume "x \<in> s" |
|
6312 |
then obtain e where "e>0" |
|
6313 |
and e:"\<forall>x'. dist x' x < e \<longrightarrow> x' \<in> s" using assms(2)[unfolded open_dist, THEN bspec[where x=x]] |
|
6314 |
by auto |
|
61945 | 6315 |
have "e * \<bar>c\<bar> > 0" |
60420 | 6316 |
using assms(1)[unfolded zero_less_abs_iff[symmetric]] \<open>e>0\<close> by auto |
33175 | 6317 |
moreover |
53282 | 6318 |
{ |
6319 |
fix y |
|
6320 |
assume "dist y (c *\<^sub>R x) < e * \<bar>c\<bar>" |
|
6321 |
then have "norm ((1 / c) *\<^sub>R y - x) < e" |
|
6322 |
unfolding dist_norm |
|
33175 | 6323 |
using norm_scaleR[of c "(1 / c) *\<^sub>R y - x", unfolded scaleR_right_diff_distrib, unfolded scaleR_scaleR] assms(1) |
53291 | 6324 |
assms(1)[unfolded zero_less_abs_iff[symmetric]] by (simp del:zero_less_abs_iff) |
53282 | 6325 |
then have "y \<in> op *\<^sub>R c ` s" |
6326 |
using rev_image_eqI[of "(1 / c) *\<^sub>R y" s y "op *\<^sub>R c"] |
|
6327 |
using e[THEN spec[where x="(1 / c) *\<^sub>R y"]] |
|
6328 |
using assms(1) |
|
6329 |
unfolding dist_norm scaleR_scaleR |
|
6330 |
by auto |
|
6331 |
} |
|
6332 |
ultimately have "\<exists>e>0. \<forall>x'. dist x' (c *\<^sub>R x) < e \<longrightarrow> x' \<in> op *\<^sub>R c ` s" |
|
61945 | 6333 |
apply (rule_tac x="e * \<bar>c\<bar>" in exI) |
53282 | 6334 |
apply auto |
6335 |
done |
|
6336 |
} |
|
6337 |
then show ?thesis unfolding open_dist by auto |
|
33175 | 6338 |
qed |
6339 |
||
6340 |
lemma minus_image_eq_vimage: |
|
6341 |
fixes A :: "'a::ab_group_add set" |
|
6342 |
shows "(\<lambda>x. - x) ` A = (\<lambda>x. - x) -` A" |
|
6343 |
by (auto intro!: image_eqI [where f="\<lambda>x. - x"]) |
|
6344 |
||
6345 |
lemma open_negations: |
|
6346 |
fixes s :: "'a::real_normed_vector set" |
|
54489
03ff4d1e6784
eliminiated neg_numeral in favour of - (numeral _)
haftmann
parents:
54263
diff
changeset
|
6347 |
shows "open s \<Longrightarrow> open ((\<lambda>x. - x) ` s)" |
03ff4d1e6784
eliminiated neg_numeral in favour of - (numeral _)
haftmann
parents:
54263
diff
changeset
|
6348 |
using open_scaling [of "- 1" s] by simp |
33175 | 6349 |
|
6350 |
lemma open_translation: |
|
6351 |
fixes s :: "'a::real_normed_vector set" |
|
53291 | 6352 |
assumes "open s" |
6353 |
shows "open((\<lambda>x. a + x) ` s)" |
|
53282 | 6354 |
proof - |
6355 |
{ |
|
6356 |
fix x |
|
6357 |
have "continuous (at x) (\<lambda>x. x - a)" |
|
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6358 |
by (intro continuous_diff continuous_ident continuous_const) |
53282 | 6359 |
} |
6360 |
moreover have "{x. x - a \<in> s} = op + a ` s" |
|
6361 |
by force |
|
6362 |
ultimately show ?thesis using continuous_open_preimage_univ[of "\<lambda>x. x - a" s] |
|
6363 |
using assms by auto |
|
33175 | 6364 |
qed |
6365 |
||
6366 |
lemma open_affinity: |
|
6367 |
fixes s :: "'a::real_normed_vector set" |
|
6368 |
assumes "open s" "c \<noteq> 0" |
|
6369 |
shows "open ((\<lambda>x. a + c *\<^sub>R x) ` s)" |
|
53282 | 6370 |
proof - |
6371 |
have *: "(\<lambda>x. a + c *\<^sub>R x) = (\<lambda>x. a + x) \<circ> (\<lambda>x. c *\<^sub>R x)" |
|
6372 |
unfolding o_def .. |
|
6373 |
have "op + a ` op *\<^sub>R c ` s = (op + a \<circ> op *\<^sub>R c) ` s" |
|
6374 |
by auto |
|
6375 |
then show ?thesis |
|
6376 |
using assms open_translation[of "op *\<^sub>R c ` s" a] |
|
6377 |
unfolding * |
|
6378 |
by auto |
|
33175 | 6379 |
qed |
6380 |
||
6381 |
lemma interior_translation: |
|
6382 |
fixes s :: "'a::real_normed_vector set" |
|
6383 |
shows "interior ((\<lambda>x. a + x) ` s) = (\<lambda>x. a + x) ` (interior s)" |
|
39302
d7728f65b353
renamed lemmas: ext_iff -> fun_eq_iff, set_ext_iff -> set_eq_iff, set_ext -> set_eqI
nipkow
parents:
39198
diff
changeset
|
6384 |
proof (rule set_eqI, rule) |
53282 | 6385 |
fix x |
6386 |
assume "x \<in> interior (op + a ` s)" |
|
6387 |
then obtain e where "e > 0" and e: "ball x e \<subseteq> op + a ` s" |
|
6388 |
unfolding mem_interior by auto |
|
6389 |
then have "ball (x - a) e \<subseteq> s" |
|
6390 |
unfolding subset_eq Ball_def mem_ball dist_norm |
|
59815
cce82e360c2f
explicit commutative additive inverse operation;
haftmann
parents:
59765
diff
changeset
|
6391 |
by (auto simp add: diff_diff_eq) |
53282 | 6392 |
then show "x \<in> op + a ` interior s" |
6393 |
unfolding image_iff |
|
6394 |
apply (rule_tac x="x - a" in bexI) |
|
6395 |
unfolding mem_interior |
|
60420 | 6396 |
using \<open>e > 0\<close> |
53282 | 6397 |
apply auto |
6398 |
done |
|
33175 | 6399 |
next |
53282 | 6400 |
fix x |
6401 |
assume "x \<in> op + a ` interior s" |
|
6402 |
then obtain y e where "e > 0" and e: "ball y e \<subseteq> s" and y: "x = a + y" |
|
6403 |
unfolding image_iff Bex_def mem_interior by auto |
|
6404 |
{ |
|
6405 |
fix z |
|
6406 |
have *: "a + y - z = y + a - z" by auto |
|
6407 |
assume "z \<in> ball x e" |
|
6408 |
then have "z - a \<in> s" |
|
6409 |
using e[unfolded subset_eq, THEN bspec[where x="z - a"]] |
|
6410 |
unfolding mem_ball dist_norm y group_add_class.diff_diff_eq2 * |
|
6411 |
by auto |
|
6412 |
then have "z \<in> op + a ` s" |
|
6413 |
unfolding image_iff by (auto intro!: bexI[where x="z - a"]) |
|
6414 |
} |
|
6415 |
then have "ball x e \<subseteq> op + a ` s" |
|
6416 |
unfolding subset_eq by auto |
|
6417 |
then show "x \<in> interior (op + a ` s)" |
|
60420 | 6418 |
unfolding mem_interior using \<open>e > 0\<close> by auto |
6419 |
qed |
|
6420 |
||
6421 |
text \<open>Topological properties of linear functions.\<close> |
|
36437 | 6422 |
|
6423 |
lemma linear_lim_0: |
|
53282 | 6424 |
assumes "bounded_linear f" |
61973 | 6425 |
shows "(f \<longlongrightarrow> 0) (at (0))" |
53282 | 6426 |
proof - |
36437 | 6427 |
interpret f: bounded_linear f by fact |
61973 | 6428 |
have "(f \<longlongrightarrow> f 0) (at 0)" |
36437 | 6429 |
using tendsto_ident_at by (rule f.tendsto) |
53282 | 6430 |
then show ?thesis unfolding f.zero . |
36437 | 6431 |
qed |
6432 |
||
6433 |
lemma linear_continuous_at: |
|
53282 | 6434 |
assumes "bounded_linear f" |
6435 |
shows "continuous (at a) f" |
|
36437 | 6436 |
unfolding continuous_at using assms |
6437 |
apply (rule bounded_linear.tendsto) |
|
6438 |
apply (rule tendsto_ident_at) |
|
6439 |
done |
|
6440 |
||
6441 |
lemma linear_continuous_within: |
|
53291 | 6442 |
"bounded_linear f \<Longrightarrow> continuous (at x within s) f" |
36437 | 6443 |
using continuous_at_imp_continuous_within[of x f s] using linear_continuous_at[of f] by auto |
6444 |
||
6445 |
lemma linear_continuous_on: |
|
53291 | 6446 |
"bounded_linear f \<Longrightarrow> continuous_on s f" |
36437 | 6447 |
using continuous_at_imp_continuous_on[of s f] using linear_continuous_at[of f] by auto |
6448 |
||
60420 | 6449 |
text \<open>Also bilinear functions, in composition form.\<close> |
36437 | 6450 |
|
6451 |
lemma bilinear_continuous_at_compose: |
|
53282 | 6452 |
"continuous (at x) f \<Longrightarrow> continuous (at x) g \<Longrightarrow> bounded_bilinear h \<Longrightarrow> |
6453 |
continuous (at x) (\<lambda>x. h (f x) (g x))" |
|
6454 |
unfolding continuous_at |
|
6455 |
using Lim_bilinear[of f "f x" "(at x)" g "g x" h] |
|
6456 |
by auto |
|
36437 | 6457 |
|
6458 |
lemma bilinear_continuous_within_compose: |
|
53282 | 6459 |
"continuous (at x within s) f \<Longrightarrow> continuous (at x within s) g \<Longrightarrow> bounded_bilinear h \<Longrightarrow> |
6460 |
continuous (at x within s) (\<lambda>x. h (f x) (g x))" |
|
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61552
diff
changeset
|
6461 |
by (rule Limits.bounded_bilinear.continuous) |
36437 | 6462 |
|
6463 |
lemma bilinear_continuous_on_compose: |
|
53282 | 6464 |
"continuous_on s f \<Longrightarrow> continuous_on s g \<Longrightarrow> bounded_bilinear h \<Longrightarrow> |
6465 |
continuous_on s (\<lambda>x. h (f x) (g x))" |
|
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61552
diff
changeset
|
6466 |
by (rule Limits.bounded_bilinear.continuous_on) |
36437 | 6467 |
|
60420 | 6468 |
text \<open>Preservation of compactness and connectedness under continuous function.\<close> |
33175 | 6469 |
|
50898 | 6470 |
lemma compact_eq_openin_cover: |
6471 |
"compact S \<longleftrightarrow> |
|
6472 |
(\<forall>C. (\<forall>c\<in>C. openin (subtopology euclidean S) c) \<and> S \<subseteq> \<Union>C \<longrightarrow> |
|
6473 |
(\<exists>D\<subseteq>C. finite D \<and> S \<subseteq> \<Union>D))" |
|
6474 |
proof safe |
|
6475 |
fix C |
|
6476 |
assume "compact S" and "\<forall>c\<in>C. openin (subtopology euclidean S) c" and "S \<subseteq> \<Union>C" |
|
53282 | 6477 |
then have "\<forall>c\<in>{T. open T \<and> S \<inter> T \<in> C}. open c" and "S \<subseteq> \<Union>{T. open T \<and> S \<inter> T \<in> C}" |
50898 | 6478 |
unfolding openin_open by force+ |
60420 | 6479 |
with \<open>compact S\<close> obtain D where "D \<subseteq> {T. open T \<and> S \<inter> T \<in> C}" and "finite D" and "S \<subseteq> \<Union>D" |
50898 | 6480 |
by (rule compactE) |
53282 | 6481 |
then have "image (\<lambda>T. S \<inter> T) D \<subseteq> C \<and> finite (image (\<lambda>T. S \<inter> T) D) \<and> S \<subseteq> \<Union>(image (\<lambda>T. S \<inter> T) D)" |
50898 | 6482 |
by auto |
53282 | 6483 |
then show "\<exists>D\<subseteq>C. finite D \<and> S \<subseteq> \<Union>D" .. |
50898 | 6484 |
next |
6485 |
assume 1: "\<forall>C. (\<forall>c\<in>C. openin (subtopology euclidean S) c) \<and> S \<subseteq> \<Union>C \<longrightarrow> |
|
6486 |
(\<exists>D\<subseteq>C. finite D \<and> S \<subseteq> \<Union>D)" |
|
6487 |
show "compact S" |
|
6488 |
proof (rule compactI) |
|
6489 |
fix C |
|
6490 |
let ?C = "image (\<lambda>T. S \<inter> T) C" |
|
6491 |
assume "\<forall>t\<in>C. open t" and "S \<subseteq> \<Union>C" |
|
53282 | 6492 |
then have "(\<forall>c\<in>?C. openin (subtopology euclidean S) c) \<and> S \<subseteq> \<Union>?C" |
50898 | 6493 |
unfolding openin_open by auto |
6494 |
with 1 obtain D where "D \<subseteq> ?C" and "finite D" and "S \<subseteq> \<Union>D" |
|
6495 |
by metis |
|
6496 |
let ?D = "inv_into C (\<lambda>T. S \<inter> T) ` D" |
|
6497 |
have "?D \<subseteq> C \<and> finite ?D \<and> S \<subseteq> \<Union>?D" |
|
6498 |
proof (intro conjI) |
|
60420 | 6499 |
from \<open>D \<subseteq> ?C\<close> show "?D \<subseteq> C" |
50898 | 6500 |
by (fast intro: inv_into_into) |
60420 | 6501 |
from \<open>finite D\<close> show "finite ?D" |
50898 | 6502 |
by (rule finite_imageI) |
60420 | 6503 |
from \<open>S \<subseteq> \<Union>D\<close> show "S \<subseteq> \<Union>?D" |
50898 | 6504 |
apply (rule subset_trans) |
6505 |
apply clarsimp |
|
60420 | 6506 |
apply (frule subsetD [OF \<open>D \<subseteq> ?C\<close>, THEN f_inv_into_f]) |
50898 | 6507 |
apply (erule rev_bexI, fast) |
6508 |
done |
|
6509 |
qed |
|
53282 | 6510 |
then show "\<exists>D\<subseteq>C. finite D \<and> S \<subseteq> \<Union>D" .. |
50898 | 6511 |
qed |
6512 |
qed |
|
6513 |
||
33175 | 6514 |
lemma connected_continuous_image: |
53291 | 6515 |
assumes "continuous_on s f" |
6516 |
and "connected s" |
|
33175 | 6517 |
shows "connected(f ` s)" |
53282 | 6518 |
proof - |
6519 |
{ |
|
6520 |
fix T |
|
53291 | 6521 |
assume as: |
6522 |
"T \<noteq> {}" |
|
6523 |
"T \<noteq> f ` s" |
|
6524 |
"openin (subtopology euclidean (f ` s)) T" |
|
6525 |
"closedin (subtopology euclidean (f ` s)) T" |
|
33175 | 6526 |
have "{x \<in> s. f x \<in> T} = {} \<or> {x \<in> s. f x \<in> T} = s" |
6527 |
using assms(1)[unfolded continuous_on_open, THEN spec[where x=T]] |
|
6528 |
using assms(1)[unfolded continuous_on_closed, THEN spec[where x=T]] |
|
6529 |
using assms(2)[unfolded connected_clopen, THEN spec[where x="{x \<in> s. f x \<in> T}"]] as(3,4) by auto |
|
53282 | 6530 |
then have False using as(1,2) |
6531 |
using as(4)[unfolded closedin_def topspace_euclidean_subtopology] by auto |
|
6532 |
} |
|
6533 |
then show ?thesis |
|
6534 |
unfolding connected_clopen by auto |
|
33175 | 6535 |
qed |
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61552
diff
changeset
|
6536 |
|
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
6537 |
lemma connected_linear_image: |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
6538 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
6539 |
assumes "linear f" and "connected s" |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
6540 |
shows "connected (f ` s)" |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
6541 |
using connected_continuous_image assms linear_continuous_on linear_conv_bounded_linear by blast |
33175 | 6542 |
|
60420 | 6543 |
text \<open>Continuity implies uniform continuity on a compact domain.\<close> |
53282 | 6544 |
|
33175 | 6545 |
lemma compact_uniformly_continuous: |
62101 | 6546 |
fixes f :: "'a :: metric_space \<Rightarrow> 'b :: metric_space" |
53291 | 6547 |
assumes f: "continuous_on s f" |
6548 |
and s: "compact s" |
|
33175 | 6549 |
shows "uniformly_continuous_on s f" |
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
6550 |
unfolding uniformly_continuous_on_def |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
6551 |
proof (cases, safe) |
53282 | 6552 |
fix e :: real |
6553 |
assume "0 < e" "s \<noteq> {}" |
|
63040 | 6554 |
define R where [simp]: |
6555 |
"R = {(y, d). y \<in> s \<and> 0 < d \<and> ball y d \<inter> s \<subseteq> {x \<in> s. f x \<in> ball (f y) (e/2)}}" |
|
50944 | 6556 |
let ?b = "(\<lambda>(y, d). ball y (d/2))" |
6557 |
have "(\<forall>r\<in>R. open (?b r))" "s \<subseteq> (\<Union>r\<in>R. ?b r)" |
|
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
6558 |
proof safe |
53282 | 6559 |
fix y |
6560 |
assume "y \<in> s" |
|
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
6561 |
from continuous_openin_preimage[OF f open_ball] |
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
6562 |
obtain T where "open T" and T: "{x \<in> s. f x \<in> ball (f y) (e/2)} = T \<inter> s" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
6563 |
unfolding openin_subtopology open_openin by metis |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
6564 |
then obtain d where "ball y d \<subseteq> T" "0 < d" |
60420 | 6565 |
using \<open>0 < e\<close> \<open>y \<in> s\<close> by (auto elim!: openE) |
6566 |
with T \<open>y \<in> s\<close> show "y \<in> (\<Union>r\<in>R. ?b r)" |
|
50944 | 6567 |
by (intro UN_I[of "(y, d)"]) auto |
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
6568 |
qed auto |
50944 | 6569 |
with s obtain D where D: "finite D" "D \<subseteq> R" "s \<subseteq> (\<Union>(y, d)\<in>D. ball y (d/2))" |
6570 |
by (rule compactE_image) |
|
60420 | 6571 |
with \<open>s \<noteq> {}\<close> have [simp]: "\<And>x. x < Min (snd ` D) \<longleftrightarrow> (\<forall>(y, d)\<in>D. x < d)" |
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
6572 |
by (subst Min_gr_iff) auto |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
6573 |
show "\<exists>d>0. \<forall>x\<in>s. \<forall>x'\<in>s. dist x' x < d \<longrightarrow> dist (f x') (f x) < e" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
6574 |
proof (rule, safe) |
53282 | 6575 |
fix x x' |
6576 |
assume in_s: "x' \<in> s" "x \<in> s" |
|
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
6577 |
with D obtain y d where x: "x \<in> ball y (d/2)" "(y, d) \<in> D" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
6578 |
by blast |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
6579 |
moreover assume "dist x x' < Min (snd`D) / 2" |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
6580 |
ultimately have "dist y x' < d" |
62397
5ae24f33d343
Substantial new material for multivariate analysis. Also removal of some duplicates.
paulson <lp15@cam.ac.uk>
parents:
62381
diff
changeset
|
6581 |
by (intro dist_triangle_half_r[of x _ d]) (auto simp: dist_commute) |
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
6582 |
with D x in_s show "dist (f x) (f x') < e" |
62397
5ae24f33d343
Substantial new material for multivariate analysis. Also removal of some duplicates.
paulson <lp15@cam.ac.uk>
parents:
62381
diff
changeset
|
6583 |
by (intro dist_triangle_half_r[of "f y" _ e]) (auto simp: dist_commute subset_eq) |
50943
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
6584 |
qed (insert D, auto) |
88a00a1c7c2c
use accumulation point characterization (avoids t1_space restriction for equivalence of countable and sequential compactness); remove heine_borel_lemma
hoelzl
parents:
50942
diff
changeset
|
6585 |
qed auto |
33175 | 6586 |
|
60420 | 6587 |
text \<open>A uniformly convergent limit of continuous functions is continuous.\<close> |
33175 | 6588 |
|
6589 |
lemma continuous_uniform_limit: |
|
44212
4d10e7f342b1
generalize lemma continuous_uniform_limit to class metric_space
huffman
parents:
44211
diff
changeset
|
6590 |
fixes f :: "'a \<Rightarrow> 'b::metric_space \<Rightarrow> 'c::metric_space" |
4d10e7f342b1
generalize lemma continuous_uniform_limit to class metric_space
huffman
parents:
44211
diff
changeset
|
6591 |
assumes "\<not> trivial_limit F" |
53282 | 6592 |
and "eventually (\<lambda>n. continuous_on s (f n)) F" |
6593 |
and "\<forall>e>0. eventually (\<lambda>n. \<forall>x\<in>s. dist (f n x) (g x) < e) F" |
|
33175 | 6594 |
shows "continuous_on s g" |
53282 | 6595 |
proof - |
6596 |
{ |
|
6597 |
fix x and e :: real |
|
6598 |
assume "x\<in>s" "e>0" |
|
44212
4d10e7f342b1
generalize lemma continuous_uniform_limit to class metric_space
huffman
parents:
44211
diff
changeset
|
6599 |
have "eventually (\<lambda>n. \<forall>x\<in>s. dist (f n x) (g x) < e / 3) F" |
60420 | 6600 |
using \<open>e>0\<close> assms(3)[THEN spec[where x="e/3"]] by auto |
44212
4d10e7f342b1
generalize lemma continuous_uniform_limit to class metric_space
huffman
parents:
44211
diff
changeset
|
6601 |
from eventually_happens [OF eventually_conj [OF this assms(2)]] |
4d10e7f342b1
generalize lemma continuous_uniform_limit to class metric_space
huffman
parents:
44211
diff
changeset
|
6602 |
obtain n where n:"\<forall>x\<in>s. dist (f n x) (g x) < e / 3" "continuous_on s (f n)" |
4d10e7f342b1
generalize lemma continuous_uniform_limit to class metric_space
huffman
parents:
44211
diff
changeset
|
6603 |
using assms(1) by blast |
60420 | 6604 |
have "e / 3 > 0" using \<open>e>0\<close> by auto |
33175 | 6605 |
then obtain d where "d>0" and d:"\<forall>x'\<in>s. dist x' x < d \<longrightarrow> dist (f n x') (f n x) < e / 3" |
60420 | 6606 |
using n(2)[unfolded continuous_on_iff, THEN bspec[where x=x], OF \<open>x\<in>s\<close>, THEN spec[where x="e/3"]] by blast |
53282 | 6607 |
{ |
6608 |
fix y |
|
6609 |
assume "y \<in> s" and "dist y x < d" |
|
6610 |
then have "dist (f n y) (f n x) < e / 3" |
|
44212
4d10e7f342b1
generalize lemma continuous_uniform_limit to class metric_space
huffman
parents:
44211
diff
changeset
|
6611 |
by (rule d [rule_format]) |
53282 | 6612 |
then have "dist (f n y) (g x) < 2 * e / 3" |
44212
4d10e7f342b1
generalize lemma continuous_uniform_limit to class metric_space
huffman
parents:
44211
diff
changeset
|
6613 |
using dist_triangle [of "f n y" "g x" "f n x"] |
60420 | 6614 |
using n(1)[THEN bspec[where x=x], OF \<open>x\<in>s\<close>] |
44212
4d10e7f342b1
generalize lemma continuous_uniform_limit to class metric_space
huffman
parents:
44211
diff
changeset
|
6615 |
by auto |
53282 | 6616 |
then have "dist (g y) (g x) < e" |
60420 | 6617 |
using n(1)[THEN bspec[where x=y], OF \<open>y\<in>s\<close>] |
44212
4d10e7f342b1
generalize lemma continuous_uniform_limit to class metric_space
huffman
parents:
44211
diff
changeset
|
6618 |
using dist_triangle3 [of "g y" "g x" "f n y"] |
53282 | 6619 |
by auto |
6620 |
} |
|
6621 |
then have "\<exists>d>0. \<forall>x'\<in>s. dist x' x < d \<longrightarrow> dist (g x') (g x) < e" |
|
60420 | 6622 |
using \<open>d>0\<close> by auto |
53282 | 6623 |
} |
6624 |
then show ?thesis |
|
6625 |
unfolding continuous_on_iff by auto |
|
33175 | 6626 |
qed |
6627 |
||
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
6628 |
|
60420 | 6629 |
subsection \<open>Topological stuff lifted from and dropped to R\<close> |
33175 | 6630 |
|
6631 |
lemma open_real: |
|
53282 | 6632 |
fixes s :: "real set" |
61945 | 6633 |
shows "open s \<longleftrightarrow> (\<forall>x \<in> s. \<exists>e>0. \<forall>x'. \<bar>x' - x\<bar> < e --> x' \<in> s)" |
33175 | 6634 |
unfolding open_dist dist_norm by simp |
6635 |
||
6636 |
lemma islimpt_approachable_real: |
|
6637 |
fixes s :: "real set" |
|
61945 | 6638 |
shows "x islimpt s \<longleftrightarrow> (\<forall>e>0. \<exists>x'\<in> s. x' \<noteq> x \<and> \<bar>x' - x\<bar> < e)" |
33175 | 6639 |
unfolding islimpt_approachable dist_norm by simp |
6640 |
||
6641 |
lemma closed_real: |
|
6642 |
fixes s :: "real set" |
|
61945 | 6643 |
shows "closed s \<longleftrightarrow> (\<forall>x. (\<forall>e>0. \<exists>x' \<in> s. x' \<noteq> x \<and> \<bar>x' - x\<bar> < e) \<longrightarrow> x \<in> s)" |
33175 | 6644 |
unfolding closed_limpt islimpt_approachable dist_norm by simp |
6645 |
||
6646 |
lemma continuous_at_real_range: |
|
6647 |
fixes f :: "'a::real_normed_vector \<Rightarrow> real" |
|
61945 | 6648 |
shows "continuous (at x) f \<longleftrightarrow> (\<forall>e>0. \<exists>d>0. \<forall>x'. norm(x' - x) < d --> \<bar>f x' - f x\<bar> < e)" |
53282 | 6649 |
unfolding continuous_at |
6650 |
unfolding Lim_at |
|
6651 |
unfolding dist_norm |
|
6652 |
apply auto |
|
6653 |
apply (erule_tac x=e in allE) |
|
6654 |
apply auto |
|
6655 |
apply (rule_tac x=d in exI) |
|
6656 |
apply auto |
|
6657 |
apply (erule_tac x=x' in allE) |
|
6658 |
apply auto |
|
6659 |
apply (erule_tac x=e in allE) |
|
6660 |
apply auto |
|
6661 |
done |
|
33175 | 6662 |
|
6663 |
lemma continuous_on_real_range: |
|
6664 |
fixes f :: "'a::real_normed_vector \<Rightarrow> real" |
|
53282 | 6665 |
shows "continuous_on s f \<longleftrightarrow> |
61945 | 6666 |
(\<forall>x \<in> s. \<forall>e>0. \<exists>d>0. (\<forall>x' \<in> s. norm(x' - x) < d \<longrightarrow> \<bar>f x' - f x\<bar> < e))" |
36359 | 6667 |
unfolding continuous_on_iff dist_norm by simp |
33175 | 6668 |
|
60420 | 6669 |
text \<open>Hence some handy theorems on distance, diameter etc. of/from a set.\<close> |
33175 | 6670 |
|
6671 |
lemma distance_attains_sup: |
|
6672 |
assumes "compact s" "s \<noteq> {}" |
|
51346
d33de22432e2
tuned proofs (used continuity of infdist, dist and continuous_attains_sup)
hoelzl
parents:
51345
diff
changeset
|
6673 |
shows "\<exists>x\<in>s. \<forall>y\<in>s. dist a y \<le> dist a x" |
33175 | 6674 |
proof (rule continuous_attains_sup [OF assms]) |
53282 | 6675 |
{ |
6676 |
fix x |
|
6677 |
assume "x\<in>s" |
|
61973 | 6678 |
have "(dist a \<longlongrightarrow> dist a x) (at x within s)" |
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
|
6679 |
by (intro tendsto_dist tendsto_const tendsto_ident_at) |
33175 | 6680 |
} |
53282 | 6681 |
then show "continuous_on s (dist a)" |
33175 | 6682 |
unfolding continuous_on .. |
6683 |
qed |
|
6684 |
||
60420 | 6685 |
text \<open>For \emph{minimal} distance, we only need closure, not compactness.\<close> |
33175 | 6686 |
|
6687 |
lemma distance_attains_inf: |
|
6688 |
fixes a :: "'a::heine_borel" |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6689 |
assumes "closed s" and "s \<noteq> {}" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6690 |
obtains x where "x\<in>s" "\<And>y. y \<in> s \<Longrightarrow> dist a x \<le> dist a y" |
53282 | 6691 |
proof - |
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6692 |
from assms obtain b where "b \<in> s" by auto |
51346
d33de22432e2
tuned proofs (used continuity of infdist, dist and continuous_attains_sup)
hoelzl
parents:
51345
diff
changeset
|
6693 |
let ?B = "s \<inter> cball a (dist b a)" |
60420 | 6694 |
have "?B \<noteq> {}" using \<open>b \<in> s\<close> |
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6695 |
by (auto simp: dist_commute) |
51346
d33de22432e2
tuned proofs (used continuity of infdist, dist and continuous_attains_sup)
hoelzl
parents:
51345
diff
changeset
|
6696 |
moreover have "continuous_on ?B (dist a)" |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6697 |
by (auto intro!: continuous_at_imp_continuous_on continuous_dist continuous_ident continuous_const) |
33175 | 6698 |
moreover have "compact ?B" |
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
6699 |
by (intro closed_Int_compact \<open>closed s\<close> compact_cball) |
51346
d33de22432e2
tuned proofs (used continuity of infdist, dist and continuous_attains_sup)
hoelzl
parents:
51345
diff
changeset
|
6700 |
ultimately obtain x where "x \<in> ?B" "\<forall>y\<in>?B. dist a x \<le> dist a y" |
d33de22432e2
tuned proofs (used continuity of infdist, dist and continuous_attains_sup)
hoelzl
parents:
51345
diff
changeset
|
6701 |
by (metis continuous_attains_inf) |
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6702 |
with that show ?thesis by fastforce |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6703 |
qed |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6704 |
|
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6705 |
|
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6706 |
subsection \<open>Cartesian products\<close> |
33175 | 6707 |
|
6708 |
lemma bounded_Times: |
|
53282 | 6709 |
assumes "bounded s" "bounded t" |
6710 |
shows "bounded (s \<times> t)" |
|
6711 |
proof - |
|
33175 | 6712 |
obtain x y a b where "\<forall>z\<in>s. dist x z \<le> a" "\<forall>z\<in>t. dist y z \<le> b" |
6713 |
using assms [unfolded bounded_def] by auto |
|
53015
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
wenzelm
parents:
52625
diff
changeset
|
6714 |
then have "\<forall>z\<in>s \<times> t. dist (x, y) z \<le> sqrt (a\<^sup>2 + b\<^sup>2)" |
33175 | 6715 |
by (auto simp add: dist_Pair_Pair real_sqrt_le_mono add_mono power_mono) |
53282 | 6716 |
then show ?thesis unfolding bounded_any_center [where a="(x, y)"] by auto |
33175 | 6717 |
qed |
6718 |
||
6719 |
lemma mem_Times_iff: "x \<in> A \<times> B \<longleftrightarrow> fst x \<in> A \<and> snd x \<in> B" |
|
53282 | 6720 |
by (induct x) simp |
33175 | 6721 |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
6722 |
lemma seq_compact_Times: "seq_compact s \<Longrightarrow> seq_compact t \<Longrightarrow> seq_compact (s \<times> t)" |
53282 | 6723 |
unfolding seq_compact_def |
6724 |
apply clarify |
|
6725 |
apply (drule_tac x="fst \<circ> f" in spec) |
|
6726 |
apply (drule mp, simp add: mem_Times_iff) |
|
6727 |
apply (clarify, rename_tac l1 r1) |
|
6728 |
apply (drule_tac x="snd \<circ> f \<circ> r1" in spec) |
|
6729 |
apply (drule mp, simp add: mem_Times_iff) |
|
6730 |
apply (clarify, rename_tac l2 r2) |
|
6731 |
apply (rule_tac x="(l1, l2)" in rev_bexI, simp) |
|
6732 |
apply (rule_tac x="r1 \<circ> r2" in exI) |
|
6733 |
apply (rule conjI, simp add: subseq_def) |
|
6734 |
apply (drule_tac f=r2 in LIMSEQ_subseq_LIMSEQ, assumption) |
|
6735 |
apply (drule (1) tendsto_Pair) back |
|
6736 |
apply (simp add: o_def) |
|
6737 |
done |
|
6738 |
||
6739 |
lemma compact_Times: |
|
51349 | 6740 |
assumes "compact s" "compact t" |
6741 |
shows "compact (s \<times> t)" |
|
6742 |
proof (rule compactI) |
|
53282 | 6743 |
fix C |
6744 |
assume C: "\<forall>t\<in>C. open t" "s \<times> t \<subseteq> \<Union>C" |
|
51349 | 6745 |
have "\<forall>x\<in>s. \<exists>a. open a \<and> x \<in> a \<and> (\<exists>d\<subseteq>C. finite d \<and> a \<times> t \<subseteq> \<Union>d)" |
6746 |
proof |
|
53282 | 6747 |
fix x |
6748 |
assume "x \<in> s" |
|
51349 | 6749 |
have "\<forall>y\<in>t. \<exists>a b c. c \<in> C \<and> open a \<and> open b \<and> x \<in> a \<and> y \<in> b \<and> a \<times> b \<subseteq> c" (is "\<forall>y\<in>t. ?P y") |
53282 | 6750 |
proof |
6751 |
fix y |
|
6752 |
assume "y \<in> t" |
|
60420 | 6753 |
with \<open>x \<in> s\<close> C obtain c where "c \<in> C" "(x, y) \<in> c" "open c" by auto |
51349 | 6754 |
then show "?P y" by (auto elim!: open_prod_elim) |
6755 |
qed |
|
6756 |
then obtain a b c where b: "\<And>y. y \<in> t \<Longrightarrow> open (b y)" |
|
6757 |
and c: "\<And>y. y \<in> t \<Longrightarrow> c y \<in> C \<and> open (a y) \<and> open (b y) \<and> x \<in> a y \<and> y \<in> b y \<and> a y \<times> b y \<subseteq> c y" |
|
6758 |
by metis |
|
6759 |
then have "\<forall>y\<in>t. open (b y)" "t \<subseteq> (\<Union>y\<in>t. b y)" by auto |
|
60420 | 6760 |
from compactE_image[OF \<open>compact t\<close> this] obtain D where D: "D \<subseteq> t" "finite D" "t \<subseteq> (\<Union>y\<in>D. b y)" |
51349 | 6761 |
by auto |
53374
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
53291
diff
changeset
|
6762 |
moreover from D c have "(\<Inter>y\<in>D. a y) \<times> t \<subseteq> (\<Union>y\<in>D. c y)" |
51349 | 6763 |
by (fastforce simp: subset_eq) |
6764 |
ultimately show "\<exists>a. open a \<and> x \<in> a \<and> (\<exists>d\<subseteq>C. finite d \<and> a \<times> t \<subseteq> \<Union>d)" |
|
52141
eff000cab70f
weaker precendence of syntax for big intersection and union on sets
haftmann
parents:
51773
diff
changeset
|
6765 |
using c by (intro exI[of _ "c`D"] exI[of _ "\<Inter>(a`D)"] conjI) (auto intro!: open_INT) |
51349 | 6766 |
qed |
6767 |
then obtain a d where a: "\<forall>x\<in>s. open (a x)" "s \<subseteq> (\<Union>x\<in>s. a x)" |
|
6768 |
and d: "\<And>x. x \<in> s \<Longrightarrow> d x \<subseteq> C \<and> finite (d x) \<and> a x \<times> t \<subseteq> \<Union>d x" |
|
6769 |
unfolding subset_eq UN_iff by metis |
|
53282 | 6770 |
moreover |
60420 | 6771 |
from compactE_image[OF \<open>compact s\<close> a] |
53282 | 6772 |
obtain e where e: "e \<subseteq> s" "finite e" and s: "s \<subseteq> (\<Union>x\<in>e. a x)" |
6773 |
by auto |
|
51349 | 6774 |
moreover |
53282 | 6775 |
{ |
6776 |
from s have "s \<times> t \<subseteq> (\<Union>x\<in>e. a x \<times> t)" |
|
6777 |
by auto |
|
6778 |
also have "\<dots> \<subseteq> (\<Union>x\<in>e. \<Union>d x)" |
|
60420 | 6779 |
using d \<open>e \<subseteq> s\<close> by (intro UN_mono) auto |
53282 | 6780 |
finally have "s \<times> t \<subseteq> (\<Union>x\<in>e. \<Union>d x)" . |
6781 |
} |
|
51349 | 6782 |
ultimately show "\<exists>C'\<subseteq>C. finite C' \<and> s \<times> t \<subseteq> \<Union>C'" |
6783 |
by (intro exI[of _ "(\<Union>x\<in>e. d x)"]) (auto simp add: subset_eq) |
|
6784 |
qed |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
6785 |
|
60420 | 6786 |
text\<open>Hence some useful properties follow quite easily.\<close> |
33175 | 6787 |
|
6788 |
lemma compact_scaling: |
|
6789 |
fixes s :: "'a::real_normed_vector set" |
|
53282 | 6790 |
assumes "compact s" |
6791 |
shows "compact ((\<lambda>x. c *\<^sub>R x) ` s)" |
|
6792 |
proof - |
|
33175 | 6793 |
let ?f = "\<lambda>x. scaleR c x" |
53282 | 6794 |
have *: "bounded_linear ?f" by (rule bounded_linear_scaleR_right) |
6795 |
show ?thesis |
|
6796 |
using compact_continuous_image[of s ?f] continuous_at_imp_continuous_on[of s ?f] |
|
6797 |
using linear_continuous_at[OF *] assms |
|
6798 |
by auto |
|
33175 | 6799 |
qed |
6800 |
||
6801 |
lemma compact_negations: |
|
6802 |
fixes s :: "'a::real_normed_vector set" |
|
53282 | 6803 |
assumes "compact s" |
53291 | 6804 |
shows "compact ((\<lambda>x. - x) ` s)" |
33175 | 6805 |
using compact_scaling [OF assms, of "- 1"] by auto |
6806 |
||
6807 |
lemma compact_sums: |
|
6808 |
fixes s t :: "'a::real_normed_vector set" |
|
53291 | 6809 |
assumes "compact s" |
6810 |
and "compact t" |
|
53282 | 6811 |
shows "compact {x + y | x y. x \<in> s \<and> y \<in> t}" |
6812 |
proof - |
|
6813 |
have *: "{x + y | x y. x \<in> s \<and> y \<in> t} = (\<lambda>z. fst z + snd z) ` (s \<times> t)" |
|
6814 |
apply auto |
|
6815 |
unfolding image_iff |
|
6816 |
apply (rule_tac x="(xa, y)" in bexI) |
|
6817 |
apply auto |
|
6818 |
done |
|
33175 | 6819 |
have "continuous_on (s \<times> t) (\<lambda>z. fst z + snd z)" |
6820 |
unfolding continuous_on by (rule ballI) (intro tendsto_intros) |
|
53282 | 6821 |
then show ?thesis |
6822 |
unfolding * using compact_continuous_image compact_Times [OF assms] by auto |
|
33175 | 6823 |
qed |
6824 |
||
6825 |
lemma compact_differences: |
|
6826 |
fixes s t :: "'a::real_normed_vector set" |
|
53291 | 6827 |
assumes "compact s" |
6828 |
and "compact t" |
|
6829 |
shows "compact {x - y | x y. x \<in> s \<and> y \<in> t}" |
|
33175 | 6830 |
proof- |
6831 |
have "{x - y | x y. x\<in>s \<and> y \<in> t} = {x + y | x y. x \<in> s \<and> y \<in> (uminus ` t)}" |
|
53282 | 6832 |
apply auto |
6833 |
apply (rule_tac x= xa in exI) |
|
6834 |
apply auto |
|
6835 |
done |
|
6836 |
then show ?thesis |
|
6837 |
using compact_sums[OF assms(1) compact_negations[OF assms(2)]] by auto |
|
33175 | 6838 |
qed |
6839 |
||
6840 |
lemma compact_translation: |
|
6841 |
fixes s :: "'a::real_normed_vector set" |
|
53282 | 6842 |
assumes "compact s" |
6843 |
shows "compact ((\<lambda>x. a + x) ` s)" |
|
6844 |
proof - |
|
6845 |
have "{x + y |x y. x \<in> s \<and> y \<in> {a}} = (\<lambda>x. a + x) ` s" |
|
6846 |
by auto |
|
6847 |
then show ?thesis |
|
6848 |
using compact_sums[OF assms compact_sing[of a]] by auto |
|
33175 | 6849 |
qed |
6850 |
||
6851 |
lemma compact_affinity: |
|
6852 |
fixes s :: "'a::real_normed_vector set" |
|
53282 | 6853 |
assumes "compact s" |
6854 |
shows "compact ((\<lambda>x. a + c *\<^sub>R x) ` s)" |
|
6855 |
proof - |
|
6856 |
have "op + a ` op *\<^sub>R c ` s = (\<lambda>x. a + c *\<^sub>R x) ` s" |
|
6857 |
by auto |
|
6858 |
then show ?thesis |
|
6859 |
using compact_translation[OF compact_scaling[OF assms], of a c] by auto |
|
33175 | 6860 |
qed |
6861 |
||
60420 | 6862 |
text \<open>Hence we get the following.\<close> |
33175 | 6863 |
|
6864 |
lemma compact_sup_maxdistance: |
|
50973
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6865 |
fixes s :: "'a::metric_space set" |
53291 | 6866 |
assumes "compact s" |
6867 |
and "s \<noteq> {}" |
|
50973
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6868 |
shows "\<exists>x\<in>s. \<exists>y\<in>s. \<forall>u\<in>s. \<forall>v\<in>s. dist u v \<le> dist x y" |
53282 | 6869 |
proof - |
6870 |
have "compact (s \<times> s)" |
|
60420 | 6871 |
using \<open>compact s\<close> by (intro compact_Times) |
53282 | 6872 |
moreover have "s \<times> s \<noteq> {}" |
60420 | 6873 |
using \<open>s \<noteq> {}\<close> by auto |
50973
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6874 |
moreover have "continuous_on (s \<times> s) (\<lambda>x. dist (fst x) (snd x))" |
51478
270b21f3ae0a
move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents:
51475
diff
changeset
|
6875 |
by (intro continuous_at_imp_continuous_on ballI continuous_intros) |
50973
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6876 |
ultimately show ?thesis |
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6877 |
using continuous_attains_sup[of "s \<times> s" "\<lambda>x. dist (fst x) (snd x)"] by auto |
33175 | 6878 |
qed |
6879 |
||
60420 | 6880 |
text \<open>We can state this in terms of diameter of a set.\<close> |
33175 | 6881 |
|
54260
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
6882 |
definition diameter :: "'a::metric_space set \<Rightarrow> real" where |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
6883 |
"diameter S = (if S = {} then 0 else SUP (x,y):S\<times>S. dist x y)" |
50973
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6884 |
|
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6885 |
lemma diameter_bounded_bound: |
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6886 |
fixes s :: "'a :: metric_space set" |
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6887 |
assumes s: "bounded s" "x \<in> s" "y \<in> s" |
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6888 |
shows "dist x y \<le> diameter s" |
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6889 |
proof - |
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6890 |
from s obtain z d where z: "\<And>x. x \<in> s \<Longrightarrow> dist z x \<le> d" |
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6891 |
unfolding bounded_def by auto |
61424
c3658c18b7bc
prod_case as canonical name for product type eliminator
haftmann
parents:
61306
diff
changeset
|
6892 |
have "bdd_above (case_prod dist ` (s\<times>s))" |
54260
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
6893 |
proof (intro bdd_aboveI, safe) |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
6894 |
fix a b |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
6895 |
assume "a \<in> s" "b \<in> s" |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
6896 |
with z[of a] z[of b] dist_triangle[of a b z] |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
6897 |
show "dist a b \<le> 2 * d" |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
6898 |
by (simp add: dist_commute) |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
6899 |
qed |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
6900 |
moreover have "(x,y) \<in> s\<times>s" using s by auto |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
6901 |
ultimately have "dist x y \<le> (SUP (x,y):s\<times>s. dist x y)" |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
6902 |
by (rule cSUP_upper2) simp |
60420 | 6903 |
with \<open>x \<in> s\<close> show ?thesis |
50973
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6904 |
by (auto simp add: diameter_def) |
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6905 |
qed |
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6906 |
|
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6907 |
lemma diameter_lower_bounded: |
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6908 |
fixes s :: "'a :: metric_space set" |
53282 | 6909 |
assumes s: "bounded s" |
6910 |
and d: "0 < d" "d < diameter s" |
|
50973
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6911 |
shows "\<exists>x\<in>s. \<exists>y\<in>s. d < dist x y" |
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6912 |
proof (rule ccontr) |
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6913 |
assume contr: "\<not> ?thesis" |
54260
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
6914 |
moreover have "s \<noteq> {}" |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
6915 |
using d by (auto simp add: diameter_def) |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
6916 |
ultimately have "diameter s \<le> d" |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
6917 |
by (auto simp: not_less diameter_def intro!: cSUP_least) |
60420 | 6918 |
with \<open>d < diameter s\<close> show False by auto |
50973
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6919 |
qed |
33175 | 6920 |
|
6921 |
lemma diameter_bounded: |
|
6922 |
assumes "bounded s" |
|
50973
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6923 |
shows "\<forall>x\<in>s. \<forall>y\<in>s. dist x y \<le> diameter s" |
53291 | 6924 |
and "\<forall>d>0. d < diameter s \<longrightarrow> (\<exists>x\<in>s. \<exists>y\<in>s. dist x y > d)" |
50973
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6925 |
using diameter_bounded_bound[of s] diameter_lower_bounded[of s] assms |
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6926 |
by auto |
33175 | 6927 |
|
6928 |
lemma diameter_compact_attained: |
|
53291 | 6929 |
assumes "compact s" |
6930 |
and "s \<noteq> {}" |
|
50973
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6931 |
shows "\<exists>x\<in>s. \<exists>y\<in>s. dist x y = diameter s" |
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6932 |
proof - |
53282 | 6933 |
have b: "bounded s" using assms(1) |
6934 |
by (rule compact_imp_bounded) |
|
53291 | 6935 |
then obtain x y where xys: "x\<in>s" "y\<in>s" |
6936 |
and xy: "\<forall>u\<in>s. \<forall>v\<in>s. dist u v \<le> dist x y" |
|
50973
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
6937 |
using compact_sup_maxdistance[OF assms] by auto |
53282 | 6938 |
then have "diameter s \<le> dist x y" |
6939 |
unfolding diameter_def |
|
6940 |
apply clarsimp |
|
54260
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
6941 |
apply (rule cSUP_least) |
53282 | 6942 |
apply fast+ |
6943 |
done |
|
6944 |
then show ?thesis |
|
36362
06475a1547cb
fix lots of looping simp calls and other warnings
huffman
parents:
36360
diff
changeset
|
6945 |
by (metis b diameter_bounded_bound order_antisym xys) |
33175 | 6946 |
qed |
6947 |
||
60420 | 6948 |
text \<open>Related results with closure as the conclusion.\<close> |
33175 | 6949 |
|
6950 |
lemma closed_scaling: |
|
6951 |
fixes s :: "'a::real_normed_vector set" |
|
53282 | 6952 |
assumes "closed s" |
6953 |
shows "closed ((\<lambda>x. c *\<^sub>R x) ` s)" |
|
53813 | 6954 |
proof (cases "c = 0") |
6955 |
case True then show ?thesis |
|
6956 |
by (auto simp add: image_constant_conv) |
|
33175 | 6957 |
next |
6958 |
case False |
|
53813 | 6959 |
from assms have "closed ((\<lambda>x. inverse c *\<^sub>R x) -` s)" |
6960 |
by (simp add: continuous_closed_vimage) |
|
6961 |
also have "(\<lambda>x. inverse c *\<^sub>R x) -` s = (\<lambda>x. c *\<^sub>R x) ` s" |
|
60420 | 6962 |
using \<open>c \<noteq> 0\<close> by (auto elim: image_eqI [rotated]) |
53813 | 6963 |
finally show ?thesis . |
33175 | 6964 |
qed |
6965 |
||
6966 |
lemma closed_negations: |
|
6967 |
fixes s :: "'a::real_normed_vector set" |
|
53282 | 6968 |
assumes "closed s" |
6969 |
shows "closed ((\<lambda>x. -x) ` s)" |
|
33175 | 6970 |
using closed_scaling[OF assms, of "- 1"] by simp |
6971 |
||
6972 |
lemma compact_closed_sums: |
|
6973 |
fixes s :: "'a::real_normed_vector set" |
|
53282 | 6974 |
assumes "compact s" and "closed t" |
6975 |
shows "closed {x + y | x y. x \<in> s \<and> y \<in> t}" |
|
6976 |
proof - |
|
33175 | 6977 |
let ?S = "{x + y |x y. x \<in> s \<and> y \<in> t}" |
53282 | 6978 |
{ |
6979 |
fix x l |
|
61973 | 6980 |
assume as: "\<forall>n. x n \<in> ?S" "(x \<longlongrightarrow> l) sequentially" |
53282 | 6981 |
from as(1) obtain f where f: "\<forall>n. x n = fst (f n) + snd (f n)" "\<forall>n. fst (f n) \<in> s" "\<forall>n. snd (f n) \<in> t" |
33175 | 6982 |
using choice[of "\<lambda>n y. x n = (fst y) + (snd y) \<and> fst y \<in> s \<and> snd y \<in> t"] by auto |
61973 | 6983 |
obtain l' r where "l'\<in>s" and r: "subseq r" and lr: "(((\<lambda>n. fst (f n)) \<circ> r) \<longlongrightarrow> l') sequentially" |
33175 | 6984 |
using assms(1)[unfolded compact_def, THEN spec[where x="\<lambda> n. fst (f n)"]] using f(2) by auto |
61973 | 6985 |
have "((\<lambda>n. snd (f (r n))) \<longlongrightarrow> l - l') sequentially" |
53282 | 6986 |
using tendsto_diff[OF LIMSEQ_subseq_LIMSEQ[OF as(2) r] lr] and f(1) |
6987 |
unfolding o_def |
|
6988 |
by auto |
|
6989 |
then have "l - l' \<in> t" |
|
53291 | 6990 |
using assms(2)[unfolded closed_sequential_limits, |
6991 |
THEN spec[where x="\<lambda> n. snd (f (r n))"], |
|
6992 |
THEN spec[where x="l - l'"]] |
|
53282 | 6993 |
using f(3) |
6994 |
by auto |
|
6995 |
then have "l \<in> ?S" |
|
60420 | 6996 |
using \<open>l' \<in> s\<close> |
53282 | 6997 |
apply auto |
6998 |
apply (rule_tac x=l' in exI) |
|
6999 |
apply (rule_tac x="l - l'" in exI) |
|
7000 |
apply auto |
|
7001 |
done |
|
33175 | 7002 |
} |
53282 | 7003 |
then show ?thesis |
7004 |
unfolding closed_sequential_limits by fast |
|
33175 | 7005 |
qed |
7006 |
||
7007 |
lemma closed_compact_sums: |
|
7008 |
fixes s t :: "'a::real_normed_vector set" |
|
53291 | 7009 |
assumes "closed s" |
7010 |
and "compact t" |
|
33175 | 7011 |
shows "closed {x + y | x y. x \<in> s \<and> y \<in> t}" |
53282 | 7012 |
proof - |
7013 |
have "{x + y |x y. x \<in> t \<and> y \<in> s} = {x + y |x y. x \<in> s \<and> y \<in> t}" |
|
7014 |
apply auto |
|
7015 |
apply (rule_tac x=y in exI) |
|
7016 |
apply auto |
|
7017 |
apply (rule_tac x=y in exI) |
|
7018 |
apply auto |
|
7019 |
done |
|
7020 |
then show ?thesis |
|
7021 |
using compact_closed_sums[OF assms(2,1)] by simp |
|
33175 | 7022 |
qed |
7023 |
||
7024 |
lemma compact_closed_differences: |
|
7025 |
fixes s t :: "'a::real_normed_vector set" |
|
53291 | 7026 |
assumes "compact s" |
7027 |
and "closed t" |
|
33175 | 7028 |
shows "closed {x - y | x y. x \<in> s \<and> y \<in> t}" |
53282 | 7029 |
proof - |
33175 | 7030 |
have "{x + y |x y. x \<in> s \<and> y \<in> uminus ` t} = {x - y |x y. x \<in> s \<and> y \<in> t}" |
53282 | 7031 |
apply auto |
7032 |
apply (rule_tac x=xa in exI) |
|
7033 |
apply auto |
|
7034 |
apply (rule_tac x=xa in exI) |
|
7035 |
apply auto |
|
7036 |
done |
|
7037 |
then show ?thesis |
|
7038 |
using compact_closed_sums[OF assms(1) closed_negations[OF assms(2)]] by auto |
|
33175 | 7039 |
qed |
7040 |
||
7041 |
lemma closed_compact_differences: |
|
7042 |
fixes s t :: "'a::real_normed_vector set" |
|
53291 | 7043 |
assumes "closed s" |
7044 |
and "compact t" |
|
33175 | 7045 |
shows "closed {x - y | x y. x \<in> s \<and> y \<in> t}" |
53282 | 7046 |
proof - |
33175 | 7047 |
have "{x + y |x y. x \<in> s \<and> y \<in> uminus ` t} = {x - y |x y. x \<in> s \<and> y \<in> t}" |
53282 | 7048 |
apply auto |
7049 |
apply (rule_tac x=xa in exI) |
|
7050 |
apply auto |
|
7051 |
apply (rule_tac x=xa in exI) |
|
7052 |
apply auto |
|
7053 |
done |
|
7054 |
then show ?thesis |
|
7055 |
using closed_compact_sums[OF assms(1) compact_negations[OF assms(2)]] by simp |
|
33175 | 7056 |
qed |
7057 |
||
7058 |
lemma closed_translation: |
|
7059 |
fixes a :: "'a::real_normed_vector" |
|
53282 | 7060 |
assumes "closed s" |
7061 |
shows "closed ((\<lambda>x. a + x) ` s)" |
|
7062 |
proof - |
|
33175 | 7063 |
have "{a + y |y. y \<in> s} = (op + a ` s)" by auto |
53282 | 7064 |
then show ?thesis |
7065 |
using compact_closed_sums[OF compact_sing[of a] assms] by auto |
|
33175 | 7066 |
qed |
7067 |
||
34105 | 7068 |
lemma translation_Compl: |
7069 |
fixes a :: "'a::ab_group_add" |
|
7070 |
shows "(\<lambda>x. a + x) ` (- t) = - ((\<lambda>x. a + x) ` t)" |
|
53282 | 7071 |
apply (auto simp add: image_iff) |
7072 |
apply (rule_tac x="x - a" in bexI) |
|
7073 |
apply auto |
|
7074 |
done |
|
34105 | 7075 |
|
33175 | 7076 |
lemma translation_UNIV: |
53282 | 7077 |
fixes a :: "'a::ab_group_add" |
7078 |
shows "range (\<lambda>x. a + x) = UNIV" |
|
7079 |
apply (auto simp add: image_iff) |
|
7080 |
apply (rule_tac x="x - a" in exI) |
|
7081 |
apply auto |
|
7082 |
done |
|
33175 | 7083 |
|
7084 |
lemma translation_diff: |
|
7085 |
fixes a :: "'a::ab_group_add" |
|
7086 |
shows "(\<lambda>x. a + x) ` (s - t) = ((\<lambda>x. a + x) ` s) - ((\<lambda>x. a + x) ` t)" |
|
7087 |
by auto |
|
7088 |
||
7089 |
lemma closure_translation: |
|
7090 |
fixes a :: "'a::real_normed_vector" |
|
7091 |
shows "closure ((\<lambda>x. a + x) ` s) = (\<lambda>x. a + x) ` (closure s)" |
|
53282 | 7092 |
proof - |
7093 |
have *: "op + a ` (- s) = - op + a ` s" |
|
7094 |
apply auto |
|
7095 |
unfolding image_iff |
|
7096 |
apply (rule_tac x="x - a" in bexI) |
|
7097 |
apply auto |
|
7098 |
done |
|
7099 |
show ?thesis |
|
7100 |
unfolding closure_interior translation_Compl |
|
7101 |
using interior_translation[of a "- s"] |
|
7102 |
unfolding * |
|
7103 |
by auto |
|
33175 | 7104 |
qed |
7105 |
||
7106 |
lemma frontier_translation: |
|
7107 |
fixes a :: "'a::real_normed_vector" |
|
7108 |
shows "frontier((\<lambda>x. a + x) ` s) = (\<lambda>x. a + x) ` (frontier s)" |
|
53282 | 7109 |
unfolding frontier_def translation_diff interior_translation closure_translation |
7110 |
by auto |
|
33175 | 7111 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
7112 |
|
60420 | 7113 |
subsection \<open>Separation between points and sets\<close> |
33175 | 7114 |
|
7115 |
lemma separate_point_closed: |
|
7116 |
fixes s :: "'a::heine_borel set" |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
7117 |
assumes "closed s" and "a \<notin> s" |
53282 | 7118 |
shows "\<exists>d>0. \<forall>x\<in>s. d \<le> dist a x" |
7119 |
proof (cases "s = {}") |
|
33175 | 7120 |
case True |
53282 | 7121 |
then show ?thesis by(auto intro!: exI[where x=1]) |
33175 | 7122 |
next |
7123 |
case False |
|
53282 | 7124 |
from assms obtain x where "x\<in>s" "\<forall>y\<in>s. dist a x \<le> dist a y" |
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
7125 |
using \<open>s \<noteq> {}\<close> by (blast intro: distance_attains_inf [of s a]) |
60420 | 7126 |
with \<open>x\<in>s\<close> show ?thesis using dist_pos_lt[of a x] and\<open>a \<notin> s\<close> |
53282 | 7127 |
by blast |
33175 | 7128 |
qed |
7129 |
||
7130 |
lemma separate_compact_closed: |
|
50949 | 7131 |
fixes s t :: "'a::heine_borel set" |
53282 | 7132 |
assumes "compact s" |
7133 |
and t: "closed t" "s \<inter> t = {}" |
|
33175 | 7134 |
shows "\<exists>d>0. \<forall>x\<in>s. \<forall>y\<in>t. d \<le> dist x y" |
51346
d33de22432e2
tuned proofs (used continuity of infdist, dist and continuous_attains_sup)
hoelzl
parents:
51345
diff
changeset
|
7135 |
proof cases |
d33de22432e2
tuned proofs (used continuity of infdist, dist and continuous_attains_sup)
hoelzl
parents:
51345
diff
changeset
|
7136 |
assume "s \<noteq> {} \<and> t \<noteq> {}" |
d33de22432e2
tuned proofs (used continuity of infdist, dist and continuous_attains_sup)
hoelzl
parents:
51345
diff
changeset
|
7137 |
then have "s \<noteq> {}" "t \<noteq> {}" by auto |
d33de22432e2
tuned proofs (used continuity of infdist, dist and continuous_attains_sup)
hoelzl
parents:
51345
diff
changeset
|
7138 |
let ?inf = "\<lambda>x. infdist x t" |
d33de22432e2
tuned proofs (used continuity of infdist, dist and continuous_attains_sup)
hoelzl
parents:
51345
diff
changeset
|
7139 |
have "continuous_on s ?inf" |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
7140 |
by (auto intro!: continuous_at_imp_continuous_on continuous_infdist continuous_ident) |
51346
d33de22432e2
tuned proofs (used continuity of infdist, dist and continuous_attains_sup)
hoelzl
parents:
51345
diff
changeset
|
7141 |
then obtain x where x: "x \<in> s" "\<forall>y\<in>s. ?inf x \<le> ?inf y" |
60420 | 7142 |
using continuous_attains_inf[OF \<open>compact s\<close> \<open>s \<noteq> {}\<close>] by auto |
51346
d33de22432e2
tuned proofs (used continuity of infdist, dist and continuous_attains_sup)
hoelzl
parents:
51345
diff
changeset
|
7143 |
then have "0 < ?inf x" |
60420 | 7144 |
using t \<open>t \<noteq> {}\<close> in_closed_iff_infdist_zero by (auto simp: less_le infdist_nonneg) |
51346
d33de22432e2
tuned proofs (used continuity of infdist, dist and continuous_attains_sup)
hoelzl
parents:
51345
diff
changeset
|
7145 |
moreover have "\<forall>x'\<in>s. \<forall>y\<in>t. ?inf x \<le> dist x' y" |
d33de22432e2
tuned proofs (used continuity of infdist, dist and continuous_attains_sup)
hoelzl
parents:
51345
diff
changeset
|
7146 |
using x by (auto intro: order_trans infdist_le) |
53282 | 7147 |
ultimately show ?thesis by auto |
51346
d33de22432e2
tuned proofs (used continuity of infdist, dist and continuous_attains_sup)
hoelzl
parents:
51345
diff
changeset
|
7148 |
qed (auto intro!: exI[of _ 1]) |
33175 | 7149 |
|
7150 |
lemma separate_closed_compact: |
|
50949 | 7151 |
fixes s t :: "'a::heine_borel set" |
53282 | 7152 |
assumes "closed s" |
7153 |
and "compact t" |
|
7154 |
and "s \<inter> t = {}" |
|
33175 | 7155 |
shows "\<exists>d>0. \<forall>x\<in>s. \<forall>y\<in>t. d \<le> dist x y" |
53282 | 7156 |
proof - |
7157 |
have *: "t \<inter> s = {}" |
|
7158 |
using assms(3) by auto |
|
7159 |
show ?thesis |
|
7160 |
using separate_compact_closed[OF assms(2,1) *] |
|
7161 |
apply auto |
|
7162 |
apply (rule_tac x=d in exI) |
|
7163 |
apply auto |
|
7164 |
apply (erule_tac x=y in ballE) |
|
7165 |
apply (auto simp add: dist_commute) |
|
7166 |
done |
|
33175 | 7167 |
qed |
7168 |
||
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
7169 |
|
60420 | 7170 |
subsection \<open>Closure of halfspaces and hyperplanes\<close> |
33175 | 7171 |
|
44219
f738e3200e24
generalize lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq to class topological_space
huffman
parents:
44216
diff
changeset
|
7172 |
lemma isCont_open_vimage: |
53282 | 7173 |
assumes "\<And>x. isCont f x" |
7174 |
and "open s" |
|
7175 |
shows "open (f -` s)" |
|
44219
f738e3200e24
generalize lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq to class topological_space
huffman
parents:
44216
diff
changeset
|
7176 |
proof - |
f738e3200e24
generalize lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq to class topological_space
huffman
parents:
44216
diff
changeset
|
7177 |
from assms(1) have "continuous_on UNIV f" |
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
|
7178 |
unfolding isCont_def continuous_on_def by simp |
53282 | 7179 |
then have "open {x \<in> UNIV. f x \<in> s}" |
60420 | 7180 |
using open_UNIV \<open>open s\<close> by (rule continuous_open_preimage) |
53282 | 7181 |
then show "open (f -` s)" |
44219
f738e3200e24
generalize lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq to class topological_space
huffman
parents:
44216
diff
changeset
|
7182 |
by (simp add: vimage_def) |
f738e3200e24
generalize lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq to class topological_space
huffman
parents:
44216
diff
changeset
|
7183 |
qed |
f738e3200e24
generalize lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq to class topological_space
huffman
parents:
44216
diff
changeset
|
7184 |
|
f738e3200e24
generalize lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq to class topological_space
huffman
parents:
44216
diff
changeset
|
7185 |
lemma isCont_closed_vimage: |
53282 | 7186 |
assumes "\<And>x. isCont f x" |
7187 |
and "closed s" |
|
7188 |
shows "closed (f -` s)" |
|
44219
f738e3200e24
generalize lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq to class topological_space
huffman
parents:
44216
diff
changeset
|
7189 |
using assms unfolding closed_def vimage_Compl [symmetric] |
f738e3200e24
generalize lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq to class topological_space
huffman
parents:
44216
diff
changeset
|
7190 |
by (rule isCont_open_vimage) |
f738e3200e24
generalize lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq to class topological_space
huffman
parents:
44216
diff
changeset
|
7191 |
|
44213
6fb54701a11b
add lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq;
huffman
parents:
44212
diff
changeset
|
7192 |
lemma open_Collect_less: |
51478
270b21f3ae0a
move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents:
51475
diff
changeset
|
7193 |
fixes f g :: "'a::t2_space \<Rightarrow> real" |
44219
f738e3200e24
generalize lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq to class topological_space
huffman
parents:
44216
diff
changeset
|
7194 |
assumes f: "\<And>x. isCont f x" |
53282 | 7195 |
and g: "\<And>x. isCont g x" |
44213
6fb54701a11b
add lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq;
huffman
parents:
44212
diff
changeset
|
7196 |
shows "open {x. f x < g x}" |
6fb54701a11b
add lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq;
huffman
parents:
44212
diff
changeset
|
7197 |
proof - |
6fb54701a11b
add lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq;
huffman
parents:
44212
diff
changeset
|
7198 |
have "open ((\<lambda>x. g x - f x) -` {0<..})" |
44219
f738e3200e24
generalize lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq to class topological_space
huffman
parents:
44216
diff
changeset
|
7199 |
using isCont_diff [OF g f] open_real_greaterThan |
f738e3200e24
generalize lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq to class topological_space
huffman
parents:
44216
diff
changeset
|
7200 |
by (rule isCont_open_vimage) |
44213
6fb54701a11b
add lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq;
huffman
parents:
44212
diff
changeset
|
7201 |
also have "((\<lambda>x. g x - f x) -` {0<..}) = {x. f x < g x}" |
6fb54701a11b
add lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq;
huffman
parents:
44212
diff
changeset
|
7202 |
by auto |
6fb54701a11b
add lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq;
huffman
parents:
44212
diff
changeset
|
7203 |
finally show ?thesis . |
6fb54701a11b
add lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq;
huffman
parents:
44212
diff
changeset
|
7204 |
qed |
6fb54701a11b
add lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq;
huffman
parents:
44212
diff
changeset
|
7205 |
|
6fb54701a11b
add lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq;
huffman
parents:
44212
diff
changeset
|
7206 |
lemma closed_Collect_le: |
51478
270b21f3ae0a
move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents:
51475
diff
changeset
|
7207 |
fixes f g :: "'a::t2_space \<Rightarrow> real" |
44219
f738e3200e24
generalize lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq to class topological_space
huffman
parents:
44216
diff
changeset
|
7208 |
assumes f: "\<And>x. isCont f x" |
53282 | 7209 |
and g: "\<And>x. isCont g x" |
44213
6fb54701a11b
add lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq;
huffman
parents:
44212
diff
changeset
|
7210 |
shows "closed {x. f x \<le> g x}" |
6fb54701a11b
add lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq;
huffman
parents:
44212
diff
changeset
|
7211 |
proof - |
6fb54701a11b
add lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq;
huffman
parents:
44212
diff
changeset
|
7212 |
have "closed ((\<lambda>x. g x - f x) -` {0..})" |
44219
f738e3200e24
generalize lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq to class topological_space
huffman
parents:
44216
diff
changeset
|
7213 |
using isCont_diff [OF g f] closed_real_atLeast |
f738e3200e24
generalize lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq to class topological_space
huffman
parents:
44216
diff
changeset
|
7214 |
by (rule isCont_closed_vimage) |
44213
6fb54701a11b
add lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq;
huffman
parents:
44212
diff
changeset
|
7215 |
also have "((\<lambda>x. g x - f x) -` {0..}) = {x. f x \<le> g x}" |
6fb54701a11b
add lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq;
huffman
parents:
44212
diff
changeset
|
7216 |
by auto |
6fb54701a11b
add lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq;
huffman
parents:
44212
diff
changeset
|
7217 |
finally show ?thesis . |
6fb54701a11b
add lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq;
huffman
parents:
44212
diff
changeset
|
7218 |
qed |
6fb54701a11b
add lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq;
huffman
parents:
44212
diff
changeset
|
7219 |
|
6fb54701a11b
add lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq;
huffman
parents:
44212
diff
changeset
|
7220 |
lemma closed_Collect_eq: |
51478
270b21f3ae0a
move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents:
51475
diff
changeset
|
7221 |
fixes f g :: "'a::t2_space \<Rightarrow> 'b::t2_space" |
44219
f738e3200e24
generalize lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq to class topological_space
huffman
parents:
44216
diff
changeset
|
7222 |
assumes f: "\<And>x. isCont f x" |
53282 | 7223 |
and g: "\<And>x. isCont g x" |
44213
6fb54701a11b
add lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq;
huffman
parents:
44212
diff
changeset
|
7224 |
shows "closed {x. f x = g x}" |
6fb54701a11b
add lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq;
huffman
parents:
44212
diff
changeset
|
7225 |
proof - |
44216 | 7226 |
have "open {(x::'b, y::'b). x \<noteq> y}" |
7227 |
unfolding open_prod_def by (auto dest!: hausdorff) |
|
53282 | 7228 |
then have "closed {(x::'b, y::'b). x = y}" |
44216 | 7229 |
unfolding closed_def split_def Collect_neg_eq . |
44219
f738e3200e24
generalize lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq to class topological_space
huffman
parents:
44216
diff
changeset
|
7230 |
with isCont_Pair [OF f g] |
44216 | 7231 |
have "closed ((\<lambda>x. (f x, g x)) -` {(x, y). x = y})" |
44219
f738e3200e24
generalize lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq to class topological_space
huffman
parents:
44216
diff
changeset
|
7232 |
by (rule isCont_closed_vimage) |
44216 | 7233 |
also have "\<dots> = {x. f x = g x}" by auto |
44213
6fb54701a11b
add lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq;
huffman
parents:
44212
diff
changeset
|
7234 |
finally show ?thesis . |
6fb54701a11b
add lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq;
huffman
parents:
44212
diff
changeset
|
7235 |
qed |
6fb54701a11b
add lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq;
huffman
parents:
44212
diff
changeset
|
7236 |
|
60974
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7237 |
lemma continuous_on_closed_Collect_le: |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7238 |
fixes f g :: "'a::t2_space \<Rightarrow> real" |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7239 |
assumes f: "continuous_on s f" and g: "continuous_on s g" and s: "closed s" |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7240 |
shows "closed {x \<in> s. f x \<le> g x}" |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7241 |
proof - |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7242 |
have "closed ((\<lambda>x. g x - f x) -` {0..} \<inter> s)" |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7243 |
using closed_real_atLeast continuous_on_diff [OF g f] |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7244 |
by (simp add: continuous_on_closed_vimage [OF s]) |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7245 |
also have "((\<lambda>x. g x - f x) -` {0..} \<inter> s) = {x\<in>s. f x \<le> g x}" |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7246 |
by auto |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7247 |
finally show ?thesis . |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7248 |
qed |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7249 |
|
33175 | 7250 |
lemma continuous_at_inner: "continuous (at x) (inner a)" |
7251 |
unfolding continuous_at by (intro tendsto_intros) |
|
7252 |
||
7253 |
lemma closed_halfspace_le: "closed {x. inner a x \<le> b}" |
|
44233 | 7254 |
by (simp add: closed_Collect_le) |
33175 | 7255 |
|
7256 |
lemma closed_halfspace_ge: "closed {x. inner a x \<ge> b}" |
|
44233 | 7257 |
by (simp add: closed_Collect_le) |
33175 | 7258 |
|
7259 |
lemma closed_hyperplane: "closed {x. inner a x = b}" |
|
44233 | 7260 |
by (simp add: closed_Collect_eq) |
33175 | 7261 |
|
53282 | 7262 |
lemma closed_halfspace_component_le: "closed {x::'a::euclidean_space. x\<bullet>i \<le> a}" |
44233 | 7263 |
by (simp add: closed_Collect_le) |
33175 | 7264 |
|
53282 | 7265 |
lemma closed_halfspace_component_ge: "closed {x::'a::euclidean_space. x\<bullet>i \<ge> a}" |
44233 | 7266 |
by (simp add: closed_Collect_le) |
33175 | 7267 |
|
53813 | 7268 |
lemma closed_interval_left: |
7269 |
fixes b :: "'a::euclidean_space" |
|
7270 |
shows "closed {x::'a. \<forall>i\<in>Basis. x\<bullet>i \<le> b\<bullet>i}" |
|
7271 |
by (simp add: Collect_ball_eq closed_INT closed_Collect_le) |
|
7272 |
||
7273 |
lemma closed_interval_right: |
|
7274 |
fixes a :: "'a::euclidean_space" |
|
7275 |
shows "closed {x::'a. \<forall>i\<in>Basis. a\<bullet>i \<le> x\<bullet>i}" |
|
7276 |
by (simp add: Collect_ball_eq closed_INT closed_Collect_le) |
|
7277 |
||
60974
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7278 |
lemma continuous_le_on_closure: |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7279 |
fixes a::real |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7280 |
assumes f: "continuous_on (closure s) f" |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7281 |
and x: "x \<in> closure(s)" |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7282 |
and xlo: "\<And>x. x \<in> s ==> f(x) \<le> a" |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7283 |
shows "f(x) \<le> a" |
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61552
diff
changeset
|
7284 |
using image_closure_subset [OF f] |
60974
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7285 |
using image_closure_subset [OF f] closed_halfspace_le [of "1::real" a] assms |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7286 |
by force |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7287 |
|
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7288 |
lemma continuous_ge_on_closure: |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7289 |
fixes a::real |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7290 |
assumes f: "continuous_on (closure s) f" |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7291 |
and x: "x \<in> closure(s)" |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7292 |
and xlo: "\<And>x. x \<in> s ==> f(x) \<ge> a" |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7293 |
shows "f(x) \<ge> a" |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7294 |
using image_closure_subset [OF f] closed_halfspace_ge [of a "1::real"] assms |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7295 |
by force |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
7296 |
|
60420 | 7297 |
text \<open>Openness of halfspaces.\<close> |
33175 | 7298 |
|
7299 |
lemma open_halfspace_lt: "open {x. inner a x < b}" |
|
44233 | 7300 |
by (simp add: open_Collect_less) |
33175 | 7301 |
|
7302 |
lemma open_halfspace_gt: "open {x. inner a x > b}" |
|
44233 | 7303 |
by (simp add: open_Collect_less) |
33175 | 7304 |
|
53282 | 7305 |
lemma open_halfspace_component_lt: "open {x::'a::euclidean_space. x\<bullet>i < a}" |
44233 | 7306 |
by (simp add: open_Collect_less) |
33175 | 7307 |
|
53282 | 7308 |
lemma open_halfspace_component_gt: "open {x::'a::euclidean_space. x\<bullet>i > a}" |
44233 | 7309 |
by (simp add: open_Collect_less) |
33175 | 7310 |
|
60420 | 7311 |
text \<open>This gives a simple derivation of limit component bounds.\<close> |
33175 | 7312 |
|
53282 | 7313 |
lemma Lim_component_le: |
7314 |
fixes f :: "'a \<Rightarrow> 'b::euclidean_space" |
|
61973 | 7315 |
assumes "(f \<longlongrightarrow> l) net" |
53282 | 7316 |
and "\<not> (trivial_limit net)" |
7317 |
and "eventually (\<lambda>x. f(x)\<bullet>i \<le> b) net" |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
7318 |
shows "l\<bullet>i \<le> b" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
7319 |
by (rule tendsto_le[OF assms(2) tendsto_const tendsto_inner[OF assms(1) tendsto_const] assms(3)]) |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
37452
diff
changeset
|
7320 |
|
53282 | 7321 |
lemma Lim_component_ge: |
7322 |
fixes f :: "'a \<Rightarrow> 'b::euclidean_space" |
|
61973 | 7323 |
assumes "(f \<longlongrightarrow> l) net" |
53282 | 7324 |
and "\<not> (trivial_limit net)" |
7325 |
and "eventually (\<lambda>x. b \<le> (f x)\<bullet>i) net" |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
7326 |
shows "b \<le> l\<bullet>i" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
7327 |
by (rule tendsto_le[OF assms(2) tendsto_inner[OF assms(1) tendsto_const] tendsto_const assms(3)]) |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
37452
diff
changeset
|
7328 |
|
53282 | 7329 |
lemma Lim_component_eq: |
7330 |
fixes f :: "'a \<Rightarrow> 'b::euclidean_space" |
|
61973 | 7331 |
assumes net: "(f \<longlongrightarrow> l) net" "\<not> trivial_limit net" |
53282 | 7332 |
and ev:"eventually (\<lambda>x. f(x)\<bullet>i = b) net" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
7333 |
shows "l\<bullet>i = b" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
7334 |
using ev[unfolded order_eq_iff eventually_conj_iff] |
53282 | 7335 |
using Lim_component_ge[OF net, of b i] |
7336 |
using Lim_component_le[OF net, of i b] |
|
7337 |
by auto |
|
7338 |
||
60420 | 7339 |
text \<open>Limits relative to a union.\<close> |
33175 | 7340 |
|
7341 |
lemma eventually_within_Un: |
|
53282 | 7342 |
"eventually P (at x within (s \<union> t)) \<longleftrightarrow> |
7343 |
eventually P (at x within s) \<and> eventually P (at x within t)" |
|
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
|
7344 |
unfolding eventually_at_filter |
33175 | 7345 |
by (auto elim!: eventually_rev_mp) |
7346 |
||
7347 |
lemma Lim_within_union: |
|
61973 | 7348 |
"(f \<longlongrightarrow> l) (at x within (s \<union> t)) \<longleftrightarrow> |
7349 |
(f \<longlongrightarrow> l) (at x within s) \<and> (f \<longlongrightarrow> l) (at x within t)" |
|
33175 | 7350 |
unfolding tendsto_def |
7351 |
by (auto simp add: eventually_within_Un) |
|
7352 |
||
36442 | 7353 |
lemma Lim_topological: |
61973 | 7354 |
"(f \<longlongrightarrow> l) net \<longleftrightarrow> |
53282 | 7355 |
trivial_limit net \<or> (\<forall>S. open S \<longrightarrow> l \<in> S \<longrightarrow> eventually (\<lambda>x. f x \<in> S) net)" |
36442 | 7356 |
unfolding tendsto_def trivial_limit_eq by auto |
7357 |
||
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
7358 |
text \<open>Continuity relative to a union.\<close> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
7359 |
|
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
7360 |
lemma continuous_on_Un_local: |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
7361 |
"\<lbrakk>closedin (subtopology euclidean (s \<union> t)) s; closedin (subtopology euclidean (s \<union> t)) t; |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
7362 |
continuous_on s f; continuous_on t f\<rbrakk> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
7363 |
\<Longrightarrow> continuous_on (s \<union> t) f" |
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
7364 |
unfolding continuous_on closedin_limpt |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
7365 |
by (metis Lim_trivial_limit Lim_within_union Un_iff trivial_limit_within) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
7366 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
7367 |
lemma continuous_on_cases_local: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
7368 |
"\<lbrakk>closedin (subtopology euclidean (s \<union> t)) s; closedin (subtopology euclidean (s \<union> t)) t; |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
7369 |
continuous_on s f; continuous_on t g; |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
7370 |
\<And>x. \<lbrakk>x \<in> s \<and> ~P x \<or> x \<in> t \<and> P x\<rbrakk> \<Longrightarrow> f x = g x\<rbrakk> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
7371 |
\<Longrightarrow> continuous_on (s \<union> t) (\<lambda>x. if P x then f x else g x)" |
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
7372 |
by (rule continuous_on_Un_local) (auto intro: continuous_on_eq) |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
7373 |
|
61694
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7374 |
lemma continuous_on_cases_le: |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7375 |
fixes h :: "'a :: topological_space \<Rightarrow> real" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7376 |
assumes "continuous_on {t \<in> s. h t \<le> a} f" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7377 |
and "continuous_on {t \<in> s. a \<le> h t} g" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7378 |
and h: "continuous_on s h" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7379 |
and "\<And>t. \<lbrakk>t \<in> s; h t = a\<rbrakk> \<Longrightarrow> f t = g t" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7380 |
shows "continuous_on s (\<lambda>t. if h t \<le> a then f(t) else g(t))" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7381 |
proof - |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7382 |
have s: "s = {t \<in> s. h t \<in> atMost a} \<union> {t \<in> s. h t \<in> atLeast a}" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7383 |
by force |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7384 |
have 1: "closedin (subtopology euclidean s) {t \<in> s. h t \<in> atMost a}" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7385 |
by (rule continuous_closedin_preimage [OF h closed_atMost]) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7386 |
have 2: "closedin (subtopology euclidean s) {t \<in> s. h t \<in> atLeast a}" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7387 |
by (rule continuous_closedin_preimage [OF h closed_atLeast]) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7388 |
show ?thesis |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7389 |
apply (rule continuous_on_subset [of s, OF _ order_refl]) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7390 |
apply (subst s) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7391 |
apply (rule continuous_on_cases_local) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7392 |
using 1 2 s assms apply auto |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7393 |
done |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7394 |
qed |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7395 |
|
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7396 |
lemma continuous_on_cases_1: |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7397 |
fixes s :: "real set" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7398 |
assumes "continuous_on {t \<in> s. t \<le> a} f" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7399 |
and "continuous_on {t \<in> s. a \<le> t} g" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7400 |
and "a \<in> s \<Longrightarrow> f a = g a" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7401 |
shows "continuous_on s (\<lambda>t. if t \<le> a then f(t) else g(t))" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7402 |
using assms |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7403 |
by (auto simp: continuous_on_id intro: continuous_on_cases_le [where h = id, simplified]) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
7404 |
|
60420 | 7405 |
text\<open>Some more convenient intermediate-value theorem formulations.\<close> |
33175 | 7406 |
|
7407 |
lemma connected_ivt_hyperplane: |
|
53291 | 7408 |
assumes "connected s" |
7409 |
and "x \<in> s" |
|
7410 |
and "y \<in> s" |
|
7411 |
and "inner a x \<le> b" |
|
7412 |
and "b \<le> inner a y" |
|
33175 | 7413 |
shows "\<exists>z \<in> s. inner a z = b" |
53282 | 7414 |
proof (rule ccontr) |
33175 | 7415 |
assume as:"\<not> (\<exists>z\<in>s. inner a z = b)" |
7416 |
let ?A = "{x. inner a x < b}" |
|
7417 |
let ?B = "{x. inner a x > b}" |
|
53282 | 7418 |
have "open ?A" "open ?B" |
7419 |
using open_halfspace_lt and open_halfspace_gt by auto |
|
53291 | 7420 |
moreover |
7421 |
have "?A \<inter> ?B = {}" by auto |
|
7422 |
moreover |
|
7423 |
have "s \<subseteq> ?A \<union> ?B" using as by auto |
|
7424 |
ultimately |
|
7425 |
show False |
|
53282 | 7426 |
using assms(1)[unfolded connected_def not_ex, |
7427 |
THEN spec[where x="?A"], THEN spec[where x="?B"]] |
|
7428 |
using assms(2-5) |
|
52625 | 7429 |
by auto |
7430 |
qed |
|
7431 |
||
7432 |
lemma connected_ivt_component: |
|
7433 |
fixes x::"'a::euclidean_space" |
|
7434 |
shows "connected s \<Longrightarrow> |
|
7435 |
x \<in> s \<Longrightarrow> y \<in> s \<Longrightarrow> |
|
7436 |
x\<bullet>k \<le> a \<Longrightarrow> a \<le> y\<bullet>k \<Longrightarrow> (\<exists>z\<in>s. z\<bullet>k = a)" |
|
7437 |
using connected_ivt_hyperplane[of s x y "k::'a" a] |
|
7438 |
by (auto simp: inner_commute) |
|
33175 | 7439 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
7440 |
|
60420 | 7441 |
subsection \<open>Intervals\<close> |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7442 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7443 |
lemma open_box[intro]: "open (box a b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7444 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7445 |
have "open (\<Inter>i\<in>Basis. (op \<bullet> i) -` {a \<bullet> i <..< b \<bullet> i})" |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
7446 |
by (auto intro!: continuous_open_vimage continuous_inner continuous_ident continuous_const) |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7447 |
also have "(\<Inter>i\<in>Basis. (op \<bullet> i) -` {a \<bullet> i <..< b \<bullet> i}) = box a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7448 |
by (auto simp add: box_def inner_commute) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7449 |
finally show ?thesis . |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7450 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7451 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7452 |
instance euclidean_space \<subseteq> second_countable_topology |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7453 |
proof |
63040 | 7454 |
define a where "a f = (\<Sum>i\<in>Basis. fst (f i) *\<^sub>R i)" for f :: "'a \<Rightarrow> real \<times> real" |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7455 |
then have a: "\<And>f. (\<Sum>i\<in>Basis. fst (f i) *\<^sub>R i) = a f" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7456 |
by simp |
63040 | 7457 |
define b where "b f = (\<Sum>i\<in>Basis. snd (f i) *\<^sub>R i)" for f :: "'a \<Rightarrow> real \<times> real" |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7458 |
then have b: "\<And>f. (\<Sum>i\<in>Basis. snd (f i) *\<^sub>R i) = b f" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7459 |
by simp |
63040 | 7460 |
define B where "B = (\<lambda>f. box (a f) (b f)) ` (Basis \<rightarrow>\<^sub>E (\<rat> \<times> \<rat>))" |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7461 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7462 |
have "Ball B open" by (simp add: B_def open_box) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7463 |
moreover have "(\<forall>A. open A \<longrightarrow> (\<exists>B'\<subseteq>B. \<Union>B' = A))" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7464 |
proof safe |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7465 |
fix A::"'a set" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7466 |
assume "open A" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7467 |
show "\<exists>B'\<subseteq>B. \<Union>B' = A" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7468 |
apply (rule exI[of _ "{b\<in>B. b \<subseteq> A}"]) |
60420 | 7469 |
apply (subst (3) open_UNION_box[OF \<open>open A\<close>]) |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7470 |
apply (auto simp add: a b B_def) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7471 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7472 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7473 |
ultimately |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7474 |
have "topological_basis B" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7475 |
unfolding topological_basis_def by blast |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7476 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7477 |
have "countable B" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7478 |
unfolding B_def |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7479 |
by (intro countable_image countable_PiE finite_Basis countable_SIGMA countable_rat) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7480 |
ultimately show "\<exists>B::'a set set. countable B \<and> open = generate_topology B" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7481 |
by (blast intro: topological_basis_imp_subbasis) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7482 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7483 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7484 |
instance euclidean_space \<subseteq> polish_space .. |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7485 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7486 |
lemma closed_cbox[intro]: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7487 |
fixes a b :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7488 |
shows "closed (cbox a b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7489 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7490 |
have "closed (\<Inter>i\<in>Basis. (\<lambda>x. x\<bullet>i) -` {a\<bullet>i .. b\<bullet>i})" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7491 |
by (intro closed_INT ballI continuous_closed_vimage allI |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7492 |
linear_continuous_at closed_real_atLeastAtMost finite_Basis bounded_linear_inner_left) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7493 |
also have "(\<Inter>i\<in>Basis. (\<lambda>x. x\<bullet>i) -` {a\<bullet>i .. b\<bullet>i}) = cbox a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7494 |
by (auto simp add: cbox_def) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7495 |
finally show "closed (cbox a b)" . |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7496 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7497 |
|
62618
f7f2467ab854
Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents:
62533
diff
changeset
|
7498 |
lemma interior_cbox [simp]: |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7499 |
fixes a b :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7500 |
shows "interior (cbox a b) = box a b" (is "?L = ?R") |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7501 |
proof(rule subset_antisym) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7502 |
show "?R \<subseteq> ?L" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7503 |
using box_subset_cbox open_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7504 |
by (rule interior_maximal) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7505 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7506 |
fix x |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7507 |
assume "x \<in> interior (cbox a b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7508 |
then obtain s where s: "open s" "x \<in> s" "s \<subseteq> cbox a b" .. |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7509 |
then obtain e where "e>0" and e:"\<forall>x'. dist x' x < e \<longrightarrow> x' \<in> cbox a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7510 |
unfolding open_dist and subset_eq by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7511 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7512 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7513 |
assume i: "i \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7514 |
have "dist (x - (e / 2) *\<^sub>R i) x < e" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7515 |
and "dist (x + (e / 2) *\<^sub>R i) x < e" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7516 |
unfolding dist_norm |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7517 |
apply auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7518 |
unfolding norm_minus_cancel |
60420 | 7519 |
using norm_Basis[OF i] \<open>e>0\<close> |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7520 |
apply auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7521 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7522 |
then have "a \<bullet> i \<le> (x - (e / 2) *\<^sub>R i) \<bullet> i" and "(x + (e / 2) *\<^sub>R i) \<bullet> i \<le> b \<bullet> i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7523 |
using e[THEN spec[where x="x - (e/2) *\<^sub>R i"]] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7524 |
and e[THEN spec[where x="x + (e/2) *\<^sub>R i"]] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7525 |
unfolding mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7526 |
using i |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7527 |
by blast+ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7528 |
then have "a \<bullet> i < x \<bullet> i" and "x \<bullet> i < b \<bullet> i" |
60420 | 7529 |
using \<open>e>0\<close> i |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7530 |
by (auto simp: inner_diff_left inner_Basis inner_add_left) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7531 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7532 |
then have "x \<in> box a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7533 |
unfolding mem_box by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7534 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7535 |
then show "?L \<subseteq> ?R" .. |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7536 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7537 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7538 |
lemma bounded_cbox: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7539 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7540 |
shows "bounded (cbox a b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7541 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7542 |
let ?b = "\<Sum>i\<in>Basis. \<bar>a\<bullet>i\<bar> + \<bar>b\<bullet>i\<bar>" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7543 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7544 |
fix x :: "'a" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7545 |
assume x: "\<forall>i\<in>Basis. a \<bullet> i \<le> x \<bullet> i \<and> x \<bullet> i \<le> b \<bullet> i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7546 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7547 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7548 |
assume "i \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7549 |
then have "\<bar>x\<bullet>i\<bar> \<le> \<bar>a\<bullet>i\<bar> + \<bar>b\<bullet>i\<bar>" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7550 |
using x[THEN bspec[where x=i]] by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7551 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7552 |
then have "(\<Sum>i\<in>Basis. \<bar>x \<bullet> i\<bar>) \<le> ?b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7553 |
apply - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7554 |
apply (rule setsum_mono) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7555 |
apply auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7556 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7557 |
then have "norm x \<le> ?b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7558 |
using norm_le_l1[of x] by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7559 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7560 |
then show ?thesis |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7561 |
unfolding cbox_def bounded_iff by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7562 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7563 |
|
62618
f7f2467ab854
Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents:
62533
diff
changeset
|
7564 |
lemma bounded_box [simp]: |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7565 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7566 |
shows "bounded (box a b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7567 |
using bounded_cbox[of a b] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7568 |
using box_subset_cbox[of a b] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7569 |
using bounded_subset[of "cbox a b" "box a b"] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7570 |
by simp |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7571 |
|
62618
f7f2467ab854
Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents:
62533
diff
changeset
|
7572 |
lemma not_interval_UNIV [simp]: |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7573 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7574 |
shows "cbox a b \<noteq> UNIV" "box a b \<noteq> UNIV" |
62618
f7f2467ab854
Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents:
62533
diff
changeset
|
7575 |
using bounded_box[of a b] bounded_cbox[of a b] by force+ |
f7f2467ab854
Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents:
62533
diff
changeset
|
7576 |
|
f7f2467ab854
Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents:
62533
diff
changeset
|
7577 |
lemma compact_cbox [simp]: |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7578 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7579 |
shows "compact (cbox a b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7580 |
using bounded_closed_imp_seq_compact[of "cbox a b"] using bounded_cbox[of a b] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7581 |
by (auto simp: compact_eq_seq_compact_metric) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7582 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7583 |
lemma box_midpoint: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7584 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7585 |
assumes "box a b \<noteq> {}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7586 |
shows "((1/2) *\<^sub>R (a + b)) \<in> box a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7587 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7588 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7589 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7590 |
assume "i \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7591 |
then have "a \<bullet> i < ((1 / 2) *\<^sub>R (a + b)) \<bullet> i \<and> ((1 / 2) *\<^sub>R (a + b)) \<bullet> i < b \<bullet> i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7592 |
using assms[unfolded box_ne_empty, THEN bspec[where x=i]] by (auto simp: inner_add_left) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7593 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7594 |
then show ?thesis unfolding mem_box by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7595 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7596 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7597 |
lemma open_cbox_convex: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7598 |
fixes x :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7599 |
assumes x: "x \<in> box a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7600 |
and y: "y \<in> cbox a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7601 |
and e: "0 < e" "e \<le> 1" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7602 |
shows "(e *\<^sub>R x + (1 - e) *\<^sub>R y) \<in> box a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7603 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7604 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7605 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7606 |
assume i: "i \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7607 |
have "a \<bullet> i = e * (a \<bullet> i) + (1 - e) * (a \<bullet> i)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7608 |
unfolding left_diff_distrib by simp |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7609 |
also have "\<dots> < e * (x \<bullet> i) + (1 - e) * (y \<bullet> i)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7610 |
apply (rule add_less_le_mono) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7611 |
using e unfolding mult_less_cancel_left and mult_le_cancel_left |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7612 |
apply simp_all |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7613 |
using x unfolding mem_box using i |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7614 |
apply simp |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7615 |
using y unfolding mem_box using i |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7616 |
apply simp |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7617 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7618 |
finally have "a \<bullet> i < (e *\<^sub>R x + (1 - e) *\<^sub>R y) \<bullet> i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7619 |
unfolding inner_simps by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7620 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7621 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7622 |
have "b \<bullet> i = e * (b\<bullet>i) + (1 - e) * (b\<bullet>i)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7623 |
unfolding left_diff_distrib by simp |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7624 |
also have "\<dots> > e * (x \<bullet> i) + (1 - e) * (y \<bullet> i)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7625 |
apply (rule add_less_le_mono) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7626 |
using e unfolding mult_less_cancel_left and mult_le_cancel_left |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7627 |
apply simp_all |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7628 |
using x |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7629 |
unfolding mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7630 |
using i |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7631 |
apply simp |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7632 |
using y |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7633 |
unfolding mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7634 |
using i |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7635 |
apply simp |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7636 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7637 |
finally have "(e *\<^sub>R x + (1 - e) *\<^sub>R y) \<bullet> i < b \<bullet> i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7638 |
unfolding inner_simps by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7639 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7640 |
ultimately have "a \<bullet> i < (e *\<^sub>R x + (1 - e) *\<^sub>R y) \<bullet> i \<and> (e *\<^sub>R x + (1 - e) *\<^sub>R y) \<bullet> i < b \<bullet> i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7641 |
by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7642 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7643 |
then show ?thesis |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7644 |
unfolding mem_box by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7645 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7646 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7647 |
lemma closure_box: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7648 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7649 |
assumes "box a b \<noteq> {}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7650 |
shows "closure (box a b) = cbox a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7651 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7652 |
have ab: "a <e b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7653 |
using assms by (simp add: eucl_less_def box_ne_empty) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7654 |
let ?c = "(1 / 2) *\<^sub>R (a + b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7655 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7656 |
fix x |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7657 |
assume as:"x \<in> cbox a b" |
63040 | 7658 |
define f where [abs_def]: "f n = x + (inverse (real n + 1)) *\<^sub>R (?c - x)" for n |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7659 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7660 |
fix n |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7661 |
assume fn: "f n <e b \<longrightarrow> a <e f n \<longrightarrow> f n = x" and xc: "x \<noteq> ?c" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7662 |
have *: "0 < inverse (real n + 1)" "inverse (real n + 1) \<le> 1" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7663 |
unfolding inverse_le_1_iff by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7664 |
have "(inverse (real n + 1)) *\<^sub>R ((1 / 2) *\<^sub>R (a + b)) + (1 - inverse (real n + 1)) *\<^sub>R x = |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7665 |
x + (inverse (real n + 1)) *\<^sub>R (((1 / 2) *\<^sub>R (a + b)) - x)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7666 |
by (auto simp add: algebra_simps) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7667 |
then have "f n <e b" and "a <e f n" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7668 |
using open_cbox_convex[OF box_midpoint[OF assms] as *] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7669 |
unfolding f_def by (auto simp: box_def eucl_less_def) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7670 |
then have False |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7671 |
using fn unfolding f_def using xc by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7672 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7673 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7674 |
{ |
61973 | 7675 |
assume "\<not> (f \<longlongrightarrow> x) sequentially" |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7676 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7677 |
fix e :: real |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7678 |
assume "e > 0" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7679 |
then have "\<exists>N::nat. inverse (real (N + 1)) < e" |
62623
dbc62f86a1a9
rationalisation of theorem names esp about "real Archimedian" etc.
paulson <lp15@cam.ac.uk>
parents:
62620
diff
changeset
|
7680 |
using real_arch_inverse[of e] |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7681 |
apply (auto simp add: Suc_pred') |
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61552
diff
changeset
|
7682 |
apply (metis Suc_pred' of_nat_Suc) |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7683 |
done |
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61552
diff
changeset
|
7684 |
then obtain N :: nat where N: "inverse (real (N + 1)) < e" |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7685 |
by auto |
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61552
diff
changeset
|
7686 |
have "inverse (real n + 1) < e" if "N \<le> n" for n |
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61552
diff
changeset
|
7687 |
by (auto intro!: that le_less_trans [OF _ N]) |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7688 |
then have "\<exists>N::nat. \<forall>n\<ge>N. inverse (real n + 1) < e" by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7689 |
} |
61973 | 7690 |
then have "((\<lambda>n. inverse (real n + 1)) \<longlongrightarrow> 0) sequentially" |
60017
b785d6d06430
Overloading of ln and powr, but "approximation" no longer works for powr. Code generation also fails due to type ambiguity in scala.
paulson <lp15@cam.ac.uk>
parents:
59815
diff
changeset
|
7691 |
unfolding lim_sequentially by(auto simp add: dist_norm) |
61973 | 7692 |
then have "(f \<longlongrightarrow> x) sequentially" |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7693 |
unfolding f_def |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7694 |
using tendsto_add[OF tendsto_const, of "\<lambda>n::nat. (inverse (real n + 1)) *\<^sub>R ((1 / 2) *\<^sub>R (a + b) - x)" 0 sequentially x] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7695 |
using tendsto_scaleR [OF _ tendsto_const, of "\<lambda>n::nat. inverse (real n + 1)" 0 sequentially "((1 / 2) *\<^sub>R (a + b) - x)"] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7696 |
by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7697 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7698 |
ultimately have "x \<in> closure (box a b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7699 |
using as and box_midpoint[OF assms] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7700 |
unfolding closure_def |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7701 |
unfolding islimpt_sequential |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7702 |
by (cases "x=?c") (auto simp: in_box_eucl_less) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7703 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7704 |
then show ?thesis |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7705 |
using closure_minimal[OF box_subset_cbox, of a b] by blast |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7706 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7707 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7708 |
lemma bounded_subset_box_symmetric: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7709 |
fixes s::"('a::euclidean_space) set" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7710 |
assumes "bounded s" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7711 |
shows "\<exists>a. s \<subseteq> box (-a) a" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7712 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7713 |
obtain b where "b>0" and b: "\<forall>x\<in>s. norm x \<le> b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7714 |
using assms[unfolded bounded_pos] by auto |
63040 | 7715 |
define a :: 'a where "a = (\<Sum>i\<in>Basis. (b + 1) *\<^sub>R i)" |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7716 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7717 |
fix x |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7718 |
assume "x \<in> s" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7719 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7720 |
assume i: "i \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7721 |
then have "(-a)\<bullet>i < x\<bullet>i" and "x\<bullet>i < a\<bullet>i" |
60420 | 7722 |
using b[THEN bspec[where x=x], OF \<open>x\<in>s\<close>] |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7723 |
using Basis_le_norm[OF i, of x] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7724 |
unfolding inner_simps and a_def |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7725 |
by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7726 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7727 |
then show ?thesis |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7728 |
by (auto intro: exI[where x=a] simp add: box_def) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7729 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7730 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7731 |
lemma bounded_subset_open_interval: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7732 |
fixes s :: "('a::euclidean_space) set" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7733 |
shows "bounded s \<Longrightarrow> (\<exists>a b. s \<subseteq> box a b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7734 |
by (auto dest!: bounded_subset_box_symmetric) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7735 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7736 |
lemma bounded_subset_cbox_symmetric: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7737 |
fixes s :: "('a::euclidean_space) set" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7738 |
assumes "bounded s" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7739 |
shows "\<exists>a. s \<subseteq> cbox (-a) a" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7740 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7741 |
obtain a where "s \<subseteq> box (-a) a" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7742 |
using bounded_subset_box_symmetric[OF assms] by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7743 |
then show ?thesis |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7744 |
using box_subset_cbox[of "-a" a] by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7745 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7746 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7747 |
lemma bounded_subset_cbox: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7748 |
fixes s :: "('a::euclidean_space) set" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7749 |
shows "bounded s \<Longrightarrow> \<exists>a b. s \<subseteq> cbox a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7750 |
using bounded_subset_cbox_symmetric[of s] by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7751 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7752 |
lemma frontier_cbox: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7753 |
fixes a b :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7754 |
shows "frontier (cbox a b) = cbox a b - box a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7755 |
unfolding frontier_def unfolding interior_cbox and closure_closed[OF closed_cbox] .. |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7756 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7757 |
lemma frontier_box: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7758 |
fixes a b :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7759 |
shows "frontier (box a b) = (if box a b = {} then {} else cbox a b - box a b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7760 |
proof (cases "box a b = {}") |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7761 |
case True |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7762 |
then show ?thesis |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7763 |
using frontier_empty by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7764 |
next |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7765 |
case False |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7766 |
then show ?thesis |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7767 |
unfolding frontier_def and closure_box[OF False] and interior_open[OF open_box] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7768 |
by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7769 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7770 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7771 |
lemma inter_interval_mixed_eq_empty: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7772 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7773 |
assumes "box c d \<noteq> {}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7774 |
shows "box a b \<inter> cbox c d = {} \<longleftrightarrow> box a b \<inter> box c d = {}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7775 |
unfolding closure_box[OF assms, symmetric] |
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
7776 |
unfolding open_Int_closure_eq_empty[OF open_box] .. |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7777 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7778 |
lemma diameter_cbox: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7779 |
fixes a b::"'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7780 |
shows "(\<forall>i \<in> Basis. a \<bullet> i \<le> b \<bullet> i) \<Longrightarrow> diameter (cbox a b) = dist a b" |
62343
24106dc44def
prefer abbreviations for compound operators INFIMUM and SUPREMUM
haftmann
parents:
62131
diff
changeset
|
7781 |
by (force simp add: diameter_def intro!: cSup_eq_maximum setL2_mono |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7782 |
simp: euclidean_dist_l2[where 'a='a] cbox_def dist_norm) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7783 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7784 |
lemma eucl_less_eq_halfspaces: |
61076 | 7785 |
fixes a :: "'a::euclidean_space" |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7786 |
shows "{x. x <e a} = (\<Inter>i\<in>Basis. {x. x \<bullet> i < a \<bullet> i})" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7787 |
"{x. a <e x} = (\<Inter>i\<in>Basis. {x. a \<bullet> i < x \<bullet> i})" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7788 |
by (auto simp: eucl_less_def) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7789 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7790 |
lemma eucl_le_eq_halfspaces: |
61076 | 7791 |
fixes a :: "'a::euclidean_space" |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7792 |
shows "{x. \<forall>i\<in>Basis. x \<bullet> i \<le> a \<bullet> i} = (\<Inter>i\<in>Basis. {x. x \<bullet> i \<le> a \<bullet> i})" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7793 |
"{x. \<forall>i\<in>Basis. a \<bullet> i \<le> x \<bullet> i} = (\<Inter>i\<in>Basis. {x. a \<bullet> i \<le> x \<bullet> i})" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7794 |
by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7795 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7796 |
lemma open_Collect_eucl_less[simp, intro]: |
61076 | 7797 |
fixes a :: "'a::euclidean_space" |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7798 |
shows "open {x. x <e a}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7799 |
"open {x. a <e x}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7800 |
by (auto simp: eucl_less_eq_halfspaces open_halfspace_component_lt open_halfspace_component_gt) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7801 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7802 |
lemma closed_Collect_eucl_le[simp, intro]: |
61076 | 7803 |
fixes a :: "'a::euclidean_space" |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7804 |
shows "closed {x. \<forall>i\<in>Basis. a \<bullet> i \<le> x \<bullet> i}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7805 |
"closed {x. \<forall>i\<in>Basis. x \<bullet> i \<le> a \<bullet> i}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7806 |
unfolding eucl_le_eq_halfspaces |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7807 |
by (simp_all add: closed_INT closed_Collect_le) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7808 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7809 |
lemma image_affinity_cbox: fixes m::real |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7810 |
fixes a b c :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7811 |
shows "(\<lambda>x. m *\<^sub>R x + c) ` cbox a b = |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7812 |
(if cbox a b = {} then {} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7813 |
else (if 0 \<le> m then cbox (m *\<^sub>R a + c) (m *\<^sub>R b + c) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7814 |
else cbox (m *\<^sub>R b + c) (m *\<^sub>R a + c)))" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7815 |
proof (cases "m = 0") |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7816 |
case True |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7817 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7818 |
fix x |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7819 |
assume "\<forall>i\<in>Basis. x \<bullet> i \<le> c \<bullet> i" "\<forall>i\<in>Basis. c \<bullet> i \<le> x \<bullet> i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7820 |
then have "x = c" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7821 |
apply - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7822 |
apply (subst euclidean_eq_iff) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7823 |
apply (auto intro: order_antisym) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7824 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7825 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7826 |
moreover have "c \<in> cbox (m *\<^sub>R a + c) (m *\<^sub>R b + c)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7827 |
unfolding True by (auto simp add: cbox_sing) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7828 |
ultimately show ?thesis using True by (auto simp: cbox_def) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7829 |
next |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7830 |
case False |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7831 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7832 |
fix y |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7833 |
assume "\<forall>i\<in>Basis. a \<bullet> i \<le> y \<bullet> i" "\<forall>i\<in>Basis. y \<bullet> i \<le> b \<bullet> i" "m > 0" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7834 |
then have "\<forall>i\<in>Basis. (m *\<^sub>R a + c) \<bullet> i \<le> (m *\<^sub>R y + c) \<bullet> i" and "\<forall>i\<in>Basis. (m *\<^sub>R y + c) \<bullet> i \<le> (m *\<^sub>R b + c) \<bullet> i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7835 |
by (auto simp: inner_distrib) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7836 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7837 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7838 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7839 |
fix y |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7840 |
assume "\<forall>i\<in>Basis. a \<bullet> i \<le> y \<bullet> i" "\<forall>i\<in>Basis. y \<bullet> i \<le> b \<bullet> i" "m < 0" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7841 |
then have "\<forall>i\<in>Basis. (m *\<^sub>R b + c) \<bullet> i \<le> (m *\<^sub>R y + c) \<bullet> i" and "\<forall>i\<in>Basis. (m *\<^sub>R y + c) \<bullet> i \<le> (m *\<^sub>R a + c) \<bullet> i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7842 |
by (auto simp add: mult_left_mono_neg inner_distrib) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7843 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7844 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7845 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7846 |
fix y |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7847 |
assume "m > 0" and "\<forall>i\<in>Basis. (m *\<^sub>R a + c) \<bullet> i \<le> y \<bullet> i" and "\<forall>i\<in>Basis. y \<bullet> i \<le> (m *\<^sub>R b + c) \<bullet> i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7848 |
then have "y \<in> (\<lambda>x. m *\<^sub>R x + c) ` cbox a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7849 |
unfolding image_iff Bex_def mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7850 |
apply (intro exI[where x="(1 / m) *\<^sub>R (y - c)"]) |
61762
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
7851 |
apply (auto simp add: pos_le_divide_eq pos_divide_le_eq mult.commute inner_distrib inner_diff_left) |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7852 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7853 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7854 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7855 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7856 |
fix y |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7857 |
assume "\<forall>i\<in>Basis. (m *\<^sub>R b + c) \<bullet> i \<le> y \<bullet> i" "\<forall>i\<in>Basis. y \<bullet> i \<le> (m *\<^sub>R a + c) \<bullet> i" "m < 0" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7858 |
then have "y \<in> (\<lambda>x. m *\<^sub>R x + c) ` cbox a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7859 |
unfolding image_iff Bex_def mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7860 |
apply (intro exI[where x="(1 / m) *\<^sub>R (y - c)"]) |
61762
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
7861 |
apply (auto simp add: neg_le_divide_eq neg_divide_le_eq mult.commute inner_distrib inner_diff_left) |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7862 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7863 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7864 |
ultimately show ?thesis using False by (auto simp: cbox_def) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7865 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7866 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7867 |
lemma image_smult_cbox:"(\<lambda>x. m *\<^sub>R (x::_::euclidean_space)) ` cbox a b = |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7868 |
(if cbox a b = {} then {} else if 0 \<le> m then cbox (m *\<^sub>R a) (m *\<^sub>R b) else cbox (m *\<^sub>R b) (m *\<^sub>R a))" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7869 |
using image_affinity_cbox[of m 0 a b] by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7870 |
|
60176 | 7871 |
lemma islimpt_greaterThanLessThan1: |
7872 |
fixes a b::"'a::{linorder_topology, dense_order}" |
|
7873 |
assumes "a < b" |
|
7874 |
shows "a islimpt {a<..<b}" |
|
7875 |
proof (rule islimptI) |
|
7876 |
fix T |
|
7877 |
assume "open T" "a \<in> T" |
|
60420 | 7878 |
from open_right[OF this \<open>a < b\<close>] |
60176 | 7879 |
obtain c where c: "a < c" "{a..<c} \<subseteq> T" by auto |
7880 |
with assms dense[of a "min c b"] |
|
7881 |
show "\<exists>y\<in>{a<..<b}. y \<in> T \<and> y \<noteq> a" |
|
7882 |
by (metis atLeastLessThan_iff greaterThanLessThan_iff min_less_iff_conj |
|
7883 |
not_le order.strict_implies_order subset_eq) |
|
7884 |
qed |
|
7885 |
||
7886 |
lemma islimpt_greaterThanLessThan2: |
|
7887 |
fixes a b::"'a::{linorder_topology, dense_order}" |
|
7888 |
assumes "a < b" |
|
7889 |
shows "b islimpt {a<..<b}" |
|
7890 |
proof (rule islimptI) |
|
7891 |
fix T |
|
7892 |
assume "open T" "b \<in> T" |
|
60420 | 7893 |
from open_left[OF this \<open>a < b\<close>] |
60176 | 7894 |
obtain c where c: "c < b" "{c<..b} \<subseteq> T" by auto |
7895 |
with assms dense[of "max a c" b] |
|
7896 |
show "\<exists>y\<in>{a<..<b}. y \<in> T \<and> y \<noteq> b" |
|
7897 |
by (metis greaterThanAtMost_iff greaterThanLessThan_iff max_less_iff_conj |
|
7898 |
not_le order.strict_implies_order subset_eq) |
|
7899 |
qed |
|
7900 |
||
7901 |
lemma closure_greaterThanLessThan[simp]: |
|
7902 |
fixes a b::"'a::{linorder_topology, dense_order}" |
|
7903 |
shows "a < b \<Longrightarrow> closure {a <..< b} = {a .. b}" (is "_ \<Longrightarrow> ?l = ?r") |
|
7904 |
proof |
|
7905 |
have "?l \<subseteq> closure ?r" |
|
7906 |
by (rule closure_mono) auto |
|
7907 |
thus "closure {a<..<b} \<subseteq> {a..b}" by simp |
|
7908 |
qed (auto simp: closure_def order.order_iff_strict islimpt_greaterThanLessThan1 |
|
7909 |
islimpt_greaterThanLessThan2) |
|
7910 |
||
7911 |
lemma closure_greaterThan[simp]: |
|
7912 |
fixes a b::"'a::{no_top, linorder_topology, dense_order}" |
|
7913 |
shows "closure {a<..} = {a..}" |
|
7914 |
proof - |
|
7915 |
from gt_ex obtain b where "a < b" by auto |
|
7916 |
hence "{a<..} = {a<..<b} \<union> {b..}" by auto |
|
60420 | 7917 |
also have "closure \<dots> = {a..}" using \<open>a < b\<close> unfolding closure_union |
60176 | 7918 |
by auto |
7919 |
finally show ?thesis . |
|
7920 |
qed |
|
7921 |
||
7922 |
lemma closure_lessThan[simp]: |
|
7923 |
fixes b::"'a::{no_bot, linorder_topology, dense_order}" |
|
7924 |
shows "closure {..<b} = {..b}" |
|
7925 |
proof - |
|
7926 |
from lt_ex obtain a where "a < b" by auto |
|
7927 |
hence "{..<b} = {a<..<b} \<union> {..a}" by auto |
|
60420 | 7928 |
also have "closure \<dots> = {..b}" using \<open>a < b\<close> unfolding closure_union |
60176 | 7929 |
by auto |
7930 |
finally show ?thesis . |
|
7931 |
qed |
|
7932 |
||
7933 |
lemma closure_atLeastLessThan[simp]: |
|
7934 |
fixes a b::"'a::{linorder_topology, dense_order}" |
|
7935 |
assumes "a < b" |
|
7936 |
shows "closure {a ..< b} = {a .. b}" |
|
7937 |
proof - |
|
7938 |
from assms have "{a ..< b} = {a} \<union> {a <..< b}" by auto |
|
7939 |
also have "closure \<dots> = {a .. b}" unfolding closure_union |
|
7940 |
by (auto simp add: assms less_imp_le) |
|
7941 |
finally show ?thesis . |
|
7942 |
qed |
|
7943 |
||
7944 |
lemma closure_greaterThanAtMost[simp]: |
|
7945 |
fixes a b::"'a::{linorder_topology, dense_order}" |
|
7946 |
assumes "a < b" |
|
7947 |
shows "closure {a <.. b} = {a .. b}" |
|
7948 |
proof - |
|
7949 |
from assms have "{a <.. b} = {b} \<union> {a <..< b}" by auto |
|
7950 |
also have "closure \<dots> = {a .. b}" unfolding closure_union |
|
7951 |
by (auto simp add: assms less_imp_le) |
|
7952 |
finally show ?thesis . |
|
7953 |
qed |
|
7954 |
||
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
7955 |
|
60420 | 7956 |
subsection \<open>Homeomorphisms\<close> |
33175 | 7957 |
|
52625 | 7958 |
definition "homeomorphism s t f g \<longleftrightarrow> |
7959 |
(\<forall>x\<in>s. (g(f x) = x)) \<and> (f ` s = t) \<and> continuous_on s f \<and> |
|
7960 |
(\<forall>y\<in>t. (f(g y) = y)) \<and> (g ` t = s) \<and> continuous_on t g" |
|
33175 | 7961 |
|
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
7962 |
lemma homeomorphism_translation: |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
7963 |
fixes a :: "'a :: real_normed_vector" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
7964 |
shows "homeomorphism (op + a ` S) S (op + (- a)) (op + a)" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
7965 |
unfolding homeomorphism_def by (auto simp: algebra_simps continuous_intros) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
7966 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
7967 |
lemma homeomorphism_symD: "homeomorphism S t f g \<Longrightarrow> homeomorphism t S g f" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
7968 |
by (simp add: homeomorphism_def) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
7969 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
7970 |
lemma homeomorphism_sym: "homeomorphism S t f g = homeomorphism t S g f" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
7971 |
by (force simp: homeomorphism_def) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
7972 |
|
53640 | 7973 |
definition homeomorphic :: "'a::topological_space set \<Rightarrow> 'b::topological_space set \<Rightarrow> bool" |
53282 | 7974 |
(infixr "homeomorphic" 60) |
7975 |
where "s homeomorphic t \<equiv> (\<exists>f g. homeomorphism s t f g)" |
|
33175 | 7976 |
|
7977 |
lemma homeomorphic_refl: "s homeomorphic s" |
|
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
7978 |
unfolding homeomorphic_def homeomorphism_def |
33175 | 7979 |
using continuous_on_id |
53282 | 7980 |
apply (rule_tac x = "(\<lambda>x. x)" in exI) |
7981 |
apply (rule_tac x = "(\<lambda>x. x)" in exI) |
|
52625 | 7982 |
apply blast |
7983 |
done |
|
7984 |
||
7985 |
lemma homeomorphic_sym: "s homeomorphic t \<longleftrightarrow> t homeomorphic s" |
|
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
7986 |
unfolding homeomorphic_def homeomorphism_def |
53282 | 7987 |
by blast |
33175 | 7988 |
|
62620
d21dab28b3f9
New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents:
62618
diff
changeset
|
7989 |
lemma homeomorphic_trans [trans]: |
53282 | 7990 |
assumes "s homeomorphic t" |
62620
d21dab28b3f9
New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents:
62618
diff
changeset
|
7991 |
and "t homeomorphic u" |
d21dab28b3f9
New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents:
62618
diff
changeset
|
7992 |
shows "s homeomorphic u" |
53282 | 7993 |
proof - |
7994 |
obtain f1 g1 where fg1: "\<forall>x\<in>s. g1 (f1 x) = x" "f1 ` s = t" |
|
7995 |
"continuous_on s f1" "\<forall>y\<in>t. f1 (g1 y) = y" "g1 ` t = s" "continuous_on t g1" |
|
33175 | 7996 |
using assms(1) unfolding homeomorphic_def homeomorphism_def by auto |
53282 | 7997 |
obtain f2 g2 where fg2: "\<forall>x\<in>t. g2 (f2 x) = x" "f2 ` t = u" "continuous_on t f2" |
7998 |
"\<forall>y\<in>u. f2 (g2 y) = y" "g2 ` u = t" "continuous_on u g2" |
|
33175 | 7999 |
using assms(2) unfolding homeomorphic_def homeomorphism_def by auto |
52625 | 8000 |
{ |
8001 |
fix x |
|
8002 |
assume "x\<in>s" |
|
53282 | 8003 |
then have "(g1 \<circ> g2) ((f2 \<circ> f1) x) = x" |
52625 | 8004 |
using fg1(1)[THEN bspec[where x=x]] and fg2(1)[THEN bspec[where x="f1 x"]] and fg1(2) |
8005 |
by auto |
|
8006 |
} |
|
8007 |
moreover have "(f2 \<circ> f1) ` s = u" |
|
8008 |
using fg1(2) fg2(2) by auto |
|
8009 |
moreover have "continuous_on s (f2 \<circ> f1)" |
|
8010 |
using continuous_on_compose[OF fg1(3)] and fg2(3) unfolding fg1(2) by auto |
|
53282 | 8011 |
moreover |
8012 |
{ |
|
52625 | 8013 |
fix y |
8014 |
assume "y\<in>u" |
|
53282 | 8015 |
then have "(f2 \<circ> f1) ((g1 \<circ> g2) y) = y" |
52625 | 8016 |
using fg2(4)[THEN bspec[where x=y]] and fg1(4)[THEN bspec[where x="g2 y"]] and fg2(5) |
8017 |
by auto |
|
8018 |
} |
|
33175 | 8019 |
moreover have "(g1 \<circ> g2) ` u = s" using fg1(5) fg2(5) by auto |
52625 | 8020 |
moreover have "continuous_on u (g1 \<circ> g2)" |
8021 |
using continuous_on_compose[OF fg2(6)] and fg1(6) |
|
8022 |
unfolding fg2(5) |
|
8023 |
by auto |
|
8024 |
ultimately show ?thesis |
|
8025 |
unfolding homeomorphic_def homeomorphism_def |
|
8026 |
apply (rule_tac x="f2 \<circ> f1" in exI) |
|
8027 |
apply (rule_tac x="g1 \<circ> g2" in exI) |
|
8028 |
apply auto |
|
8029 |
done |
|
33175 | 8030 |
qed |
8031 |
||
8032 |
lemma homeomorphic_minimal: |
|
52625 | 8033 |
"s homeomorphic t \<longleftrightarrow> |
33175 | 8034 |
(\<exists>f g. (\<forall>x\<in>s. f(x) \<in> t \<and> (g(f(x)) = x)) \<and> |
8035 |
(\<forall>y\<in>t. g(y) \<in> s \<and> (f(g(y)) = y)) \<and> |
|
8036 |
continuous_on s f \<and> continuous_on t g)" |
|
52625 | 8037 |
unfolding homeomorphic_def homeomorphism_def |
8038 |
apply auto |
|
8039 |
apply (rule_tac x=f in exI) |
|
8040 |
apply (rule_tac x=g in exI) |
|
8041 |
apply auto |
|
8042 |
apply (rule_tac x=f in exI) |
|
8043 |
apply (rule_tac x=g in exI) |
|
8044 |
apply auto |
|
8045 |
unfolding image_iff |
|
8046 |
apply (erule_tac x="g x" in ballE) |
|
8047 |
apply (erule_tac x="x" in ballE) |
|
8048 |
apply auto |
|
8049 |
apply (rule_tac x="g x" in bexI) |
|
8050 |
apply auto |
|
8051 |
apply (erule_tac x="f x" in ballE) |
|
8052 |
apply (erule_tac x="x" in ballE) |
|
8053 |
apply auto |
|
8054 |
apply (rule_tac x="f x" in bexI) |
|
8055 |
apply auto |
|
8056 |
done |
|
33175 | 8057 |
|
60420 | 8058 |
text \<open>Relatively weak hypotheses if a set is compact.\<close> |
33175 | 8059 |
|
8060 |
lemma homeomorphism_compact: |
|
50898 | 8061 |
fixes f :: "'a::topological_space \<Rightarrow> 'b::t2_space" |
33175 | 8062 |
assumes "compact s" "continuous_on s f" "f ` s = t" "inj_on f s" |
8063 |
shows "\<exists>g. homeomorphism s t f g" |
|
53282 | 8064 |
proof - |
63040 | 8065 |
define g where "g x = (SOME y. y\<in>s \<and> f y = x)" for x |
52625 | 8066 |
have g: "\<forall>x\<in>s. g (f x) = x" |
8067 |
using assms(3) assms(4)[unfolded inj_on_def] unfolding g_def by auto |
|
8068 |
{ |
|
53282 | 8069 |
fix y |
8070 |
assume "y \<in> t" |
|
8071 |
then obtain x where x:"f x = y" "x\<in>s" |
|
8072 |
using assms(3) by auto |
|
8073 |
then have "g (f x) = x" using g by auto |
|
53291 | 8074 |
then have "f (g y) = y" unfolding x(1)[symmetric] by auto |
52625 | 8075 |
} |
53282 | 8076 |
then have g':"\<forall>x\<in>t. f (g x) = x" by auto |
33175 | 8077 |
moreover |
52625 | 8078 |
{ |
8079 |
fix x |
|
8080 |
have "x\<in>s \<Longrightarrow> x \<in> g ` t" |
|
8081 |
using g[THEN bspec[where x=x]] |
|
8082 |
unfolding image_iff |
|
8083 |
using assms(3) |
|
8084 |
by (auto intro!: bexI[where x="f x"]) |
|
33175 | 8085 |
moreover |
52625 | 8086 |
{ |
8087 |
assume "x\<in>g ` t" |
|
33175 | 8088 |
then obtain y where y:"y\<in>t" "g y = x" by auto |
52625 | 8089 |
then obtain x' where x':"x'\<in>s" "f x' = y" |
8090 |
using assms(3) by auto |
|
53282 | 8091 |
then have "x \<in> s" |
52625 | 8092 |
unfolding g_def |
8093 |
using someI2[of "\<lambda>b. b\<in>s \<and> f b = y" x' "\<lambda>x. x\<in>s"] |
|
53291 | 8094 |
unfolding y(2)[symmetric] and g_def |
52625 | 8095 |
by auto |
8096 |
} |
|
8097 |
ultimately have "x\<in>s \<longleftrightarrow> x \<in> g ` t" .. |
|
8098 |
} |
|
53282 | 8099 |
then have "g ` t = s" by auto |
52625 | 8100 |
ultimately show ?thesis |
8101 |
unfolding homeomorphism_def homeomorphic_def |
|
8102 |
apply (rule_tac x=g in exI) |
|
8103 |
using g and assms(3) and continuous_on_inv[OF assms(2,1), of g, unfolded assms(3)] and assms(2) |
|
8104 |
apply auto |
|
8105 |
done |
|
33175 | 8106 |
qed |
8107 |
||
8108 |
lemma homeomorphic_compact: |
|
50898 | 8109 |
fixes f :: "'a::topological_space \<Rightarrow> 'b::t2_space" |
53282 | 8110 |
shows "compact s \<Longrightarrow> continuous_on s f \<Longrightarrow> (f ` s = t) \<Longrightarrow> inj_on f s \<Longrightarrow> s homeomorphic t" |
37486
b993fac7985b
beta-eta was too much, because it transformed SOME x. P x into Eps P, which caused problems later;
blanchet
parents:
37452
diff
changeset
|
8111 |
unfolding homeomorphic_def by (metis homeomorphism_compact) |
33175 | 8112 |
|
60420 | 8113 |
text\<open>Preservation of topological properties.\<close> |
33175 | 8114 |
|
52625 | 8115 |
lemma homeomorphic_compactness: "s homeomorphic t \<Longrightarrow> (compact s \<longleftrightarrow> compact t)" |
8116 |
unfolding homeomorphic_def homeomorphism_def |
|
8117 |
by (metis compact_continuous_image) |
|
33175 | 8118 |
|
60420 | 8119 |
text\<open>Results on translation, scaling etc.\<close> |
33175 | 8120 |
|
8121 |
lemma homeomorphic_scaling: |
|
8122 |
fixes s :: "'a::real_normed_vector set" |
|
53282 | 8123 |
assumes "c \<noteq> 0" |
8124 |
shows "s homeomorphic ((\<lambda>x. c *\<^sub>R x) ` s)" |
|
33175 | 8125 |
unfolding homeomorphic_minimal |
52625 | 8126 |
apply (rule_tac x="\<lambda>x. c *\<^sub>R x" in exI) |
8127 |
apply (rule_tac x="\<lambda>x. (1 / c) *\<^sub>R x" in exI) |
|
8128 |
using assms |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
8129 |
apply (auto simp add: continuous_intros) |
52625 | 8130 |
done |
33175 | 8131 |
|
8132 |
lemma homeomorphic_translation: |
|
8133 |
fixes s :: "'a::real_normed_vector set" |
|
8134 |
shows "s homeomorphic ((\<lambda>x. a + x) ` s)" |
|
8135 |
unfolding homeomorphic_minimal |
|
52625 | 8136 |
apply (rule_tac x="\<lambda>x. a + x" in exI) |
8137 |
apply (rule_tac x="\<lambda>x. -a + x" in exI) |
|
54230
b1d955791529
more simplification rules on unary and binary minus
haftmann
parents:
54070
diff
changeset
|
8138 |
using continuous_on_add [OF continuous_on_const continuous_on_id, of s a] |
b1d955791529
more simplification rules on unary and binary minus
haftmann
parents:
54070
diff
changeset
|
8139 |
continuous_on_add [OF continuous_on_const continuous_on_id, of "plus a ` s" "- a"] |
52625 | 8140 |
apply auto |
8141 |
done |
|
33175 | 8142 |
|
8143 |
lemma homeomorphic_affinity: |
|
8144 |
fixes s :: "'a::real_normed_vector set" |
|
52625 | 8145 |
assumes "c \<noteq> 0" |
8146 |
shows "s homeomorphic ((\<lambda>x. a + c *\<^sub>R x) ` s)" |
|
53282 | 8147 |
proof - |
52625 | 8148 |
have *: "op + a ` op *\<^sub>R c ` s = (\<lambda>x. a + c *\<^sub>R x) ` s" by auto |
33175 | 8149 |
show ?thesis |
8150 |
using homeomorphic_trans |
|
8151 |
using homeomorphic_scaling[OF assms, of s] |
|
52625 | 8152 |
using homeomorphic_translation[of "(\<lambda>x. c *\<^sub>R x) ` s" a] |
8153 |
unfolding * |
|
8154 |
by auto |
|
33175 | 8155 |
qed |
8156 |
||
8157 |
lemma homeomorphic_balls: |
|
50898 | 8158 |
fixes a b ::"'a::real_normed_vector" |
33175 | 8159 |
assumes "0 < d" "0 < e" |
8160 |
shows "(ball a d) homeomorphic (ball b e)" (is ?th) |
|
53282 | 8161 |
and "(cball a d) homeomorphic (cball b e)" (is ?cth) |
8162 |
proof - |
|
33175 | 8163 |
show ?th unfolding homeomorphic_minimal |
8164 |
apply(rule_tac x="\<lambda>x. b + (e/d) *\<^sub>R (x - a)" in exI) |
|
8165 |
apply(rule_tac x="\<lambda>x. a + (d/e) *\<^sub>R (x - b)" in exI) |
|
51364 | 8166 |
using assms |
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
8167 |
apply (auto intro!: continuous_intros |
52625 | 8168 |
simp: dist_commute dist_norm pos_divide_less_eq mult_strict_left_mono) |
51364 | 8169 |
done |
33175 | 8170 |
show ?cth unfolding homeomorphic_minimal |
8171 |
apply(rule_tac x="\<lambda>x. b + (e/d) *\<^sub>R (x - a)" in exI) |
|
8172 |
apply(rule_tac x="\<lambda>x. a + (d/e) *\<^sub>R (x - b)" in exI) |
|
51364 | 8173 |
using assms |
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
8174 |
apply (auto intro!: continuous_intros |
52625 | 8175 |
simp: dist_commute dist_norm pos_divide_le_eq mult_strict_left_mono) |
51364 | 8176 |
done |
33175 | 8177 |
qed |
8178 |
||
60420 | 8179 |
text\<open>"Isometry" (up to constant bounds) of injective linear map etc.\<close> |
33175 | 8180 |
|
8181 |
lemma cauchy_isometric: |
|
53640 | 8182 |
assumes e: "e > 0" |
52625 | 8183 |
and s: "subspace s" |
8184 |
and f: "bounded_linear f" |
|
53640 | 8185 |
and normf: "\<forall>x\<in>s. norm (f x) \<ge> e * norm x" |
8186 |
and xs: "\<forall>n. x n \<in> s" |
|
8187 |
and cf: "Cauchy (f \<circ> x)" |
|
33175 | 8188 |
shows "Cauchy x" |
52625 | 8189 |
proof - |
33175 | 8190 |
interpret f: bounded_linear f by fact |
52625 | 8191 |
{ |
53291 | 8192 |
fix d :: real |
8193 |
assume "d > 0" |
|
33175 | 8194 |
then obtain N where N:"\<forall>n\<ge>N. norm (f (x n) - f (x N)) < e * d" |
56544 | 8195 |
using cf[unfolded cauchy o_def dist_norm, THEN spec[where x="e*d"]] e |
52625 | 8196 |
by auto |
8197 |
{ |
|
8198 |
fix n |
|
8199 |
assume "n\<ge>N" |
|
45270
d5b5c9259afd
fix bug in cancel_factor simprocs so they will work on goals like 'x * y < x * z' where the common term is already on the left
huffman
parents:
45051
diff
changeset
|
8200 |
have "e * norm (x n - x N) \<le> norm (f (x n - x N))" |
52625 | 8201 |
using subspace_sub[OF s, of "x n" "x N"] |
8202 |
using xs[THEN spec[where x=N]] and xs[THEN spec[where x=n]] |
|
8203 |
using normf[THEN bspec[where x="x n - x N"]] |
|
8204 |
by auto |
|
45270
d5b5c9259afd
fix bug in cancel_factor simprocs so they will work on goals like 'x * y < x * z' where the common term is already on the left
huffman
parents:
45051
diff
changeset
|
8205 |
also have "norm (f (x n - x N)) < e * d" |
60420 | 8206 |
using \<open>N \<le> n\<close> N unfolding f.diff[symmetric] by auto |
8207 |
finally have "norm (x n - x N) < d" using \<open>e>0\<close> by simp |
|
52625 | 8208 |
} |
53282 | 8209 |
then have "\<exists>N. \<forall>n\<ge>N. norm (x n - x N) < d" by auto |
52625 | 8210 |
} |
53282 | 8211 |
then show ?thesis unfolding cauchy and dist_norm by auto |
33175 | 8212 |
qed |
8213 |
||
8214 |
lemma complete_isometric_image: |
|
52625 | 8215 |
assumes "0 < e" |
8216 |
and s: "subspace s" |
|
8217 |
and f: "bounded_linear f" |
|
8218 |
and normf: "\<forall>x\<in>s. norm(f x) \<ge> e * norm(x)" |
|
8219 |
and cs: "complete s" |
|
53291 | 8220 |
shows "complete (f ` s)" |
52625 | 8221 |
proof - |
8222 |
{ |
|
8223 |
fix g |
|
8224 |
assume as:"\<forall>n::nat. g n \<in> f ` s" and cfg:"Cauchy g" |
|
53282 | 8225 |
then obtain x where "\<forall>n. x n \<in> s \<and> g n = f (x n)" |
53640 | 8226 |
using choice[of "\<lambda> n xa. xa \<in> s \<and> g n = f xa"] |
8227 |
by auto |
|
8228 |
then have x:"\<forall>n. x n \<in> s" "\<forall>n. g n = f (x n)" |
|
8229 |
by auto |
|
8230 |
then have "f \<circ> x = g" |
|
8231 |
unfolding fun_eq_iff |
|
8232 |
by auto |
|
61973 | 8233 |
then obtain l where "l\<in>s" and l:"(x \<longlongrightarrow> l) sequentially" |
33175 | 8234 |
using cs[unfolded complete_def, THEN spec[where x="x"]] |
60420 | 8235 |
using cauchy_isometric[OF \<open>0 < e\<close> s f normf] and cfg and x(1) |
53640 | 8236 |
by auto |
61973 | 8237 |
then have "\<exists>l\<in>f ` s. (g \<longlongrightarrow> l) sequentially" |
33175 | 8238 |
using linear_continuous_at[OF f, unfolded continuous_at_sequentially, THEN spec[where x=x], of l] |
60420 | 8239 |
unfolding \<open>f \<circ> x = g\<close> |
53640 | 8240 |
by auto |
52625 | 8241 |
} |
53640 | 8242 |
then show ?thesis |
8243 |
unfolding complete_def by auto |
|
33175 | 8244 |
qed |
8245 |
||
52625 | 8246 |
lemma injective_imp_isometric: |
8247 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
|
8248 |
assumes s: "closed s" "subspace s" |
|
53640 | 8249 |
and f: "bounded_linear f" "\<forall>x\<in>s. f x = 0 \<longrightarrow> x = 0" |
8250 |
shows "\<exists>e>0. \<forall>x\<in>s. norm (f x) \<ge> e * norm x" |
|
52625 | 8251 |
proof (cases "s \<subseteq> {0::'a}") |
33175 | 8252 |
case True |
52625 | 8253 |
{ |
8254 |
fix x |
|
8255 |
assume "x \<in> s" |
|
53282 | 8256 |
then have "x = 0" using True by auto |
8257 |
then have "norm x \<le> norm (f x)" by auto |
|
52625 | 8258 |
} |
53282 | 8259 |
then show ?thesis by (auto intro!: exI[where x=1]) |
33175 | 8260 |
next |
8261 |
interpret f: bounded_linear f by fact |
|
8262 |
case False |
|
53640 | 8263 |
then obtain a where a: "a \<noteq> 0" "a \<in> s" |
8264 |
by auto |
|
8265 |
from False have "s \<noteq> {}" |
|
8266 |
by auto |
|
33175 | 8267 |
let ?S = "{f x| x. (x \<in> s \<and> norm x = norm a)}" |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
37452
diff
changeset
|
8268 |
let ?S' = "{x::'a. x\<in>s \<and> norm x = norm a}" |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
37452
diff
changeset
|
8269 |
let ?S'' = "{x::'a. norm x = norm a}" |
33175 | 8270 |
|
52625 | 8271 |
have "?S'' = frontier(cball 0 (norm a))" |
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
8272 |
by (simp add: sphere_def dist_norm) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
8273 |
then have "compact ?S''" by (metis compact_cball compact_frontier) |
33175 | 8274 |
moreover have "?S' = s \<inter> ?S''" by auto |
52625 | 8275 |
ultimately have "compact ?S'" |
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
8276 |
using closed_Int_compact[of s ?S''] using s(1) by auto |
33175 | 8277 |
moreover have *:"f ` ?S' = ?S" by auto |
52625 | 8278 |
ultimately have "compact ?S" |
8279 |
using compact_continuous_image[OF linear_continuous_on[OF f(1)], of ?S'] by auto |
|
53282 | 8280 |
then have "closed ?S" using compact_imp_closed by auto |
33175 | 8281 |
moreover have "?S \<noteq> {}" using a by auto |
52625 | 8282 |
ultimately obtain b' where "b'\<in>?S" "\<forall>y\<in>?S. norm b' \<le> norm y" |
8283 |
using distance_attains_inf[of ?S 0] unfolding dist_0_norm by auto |
|
53282 | 8284 |
then obtain b where "b\<in>s" |
8285 |
and ba: "norm b = norm a" |
|
8286 |
and b: "\<forall>x\<in>{x \<in> s. norm x = norm a}. norm (f b) \<le> norm (f x)" |
|
53291 | 8287 |
unfolding *[symmetric] unfolding image_iff by auto |
33175 | 8288 |
|
8289 |
let ?e = "norm (f b) / norm b" |
|
8290 |
have "norm b > 0" using ba and a and norm_ge_zero by auto |
|
52625 | 8291 |
moreover have "norm (f b) > 0" |
60420 | 8292 |
using f(2)[THEN bspec[where x=b], OF \<open>b\<in>s\<close>] |
8293 |
using \<open>norm b >0\<close> |
|
52625 | 8294 |
unfolding zero_less_norm_iff |
8295 |
by auto |
|
56541 | 8296 |
ultimately have "0 < norm (f b) / norm b" by simp |
33175 | 8297 |
moreover |
52625 | 8298 |
{ |
8299 |
fix x |
|
8300 |
assume "x\<in>s" |
|
53282 | 8301 |
then have "norm (f b) / norm b * norm x \<le> norm (f x)" |
52625 | 8302 |
proof (cases "x=0") |
8303 |
case True |
|
53282 | 8304 |
then show "norm (f b) / norm b * norm x \<le> norm (f x)" by auto |
33175 | 8305 |
next |
8306 |
case False |
|
53282 | 8307 |
then have *: "0 < norm a / norm x" |
60420 | 8308 |
using \<open>a\<noteq>0\<close> |
56541 | 8309 |
unfolding zero_less_norm_iff[symmetric] by simp |
52625 | 8310 |
have "\<forall>c. \<forall>x\<in>s. c *\<^sub>R x \<in> s" |
8311 |
using s[unfolded subspace_def] by auto |
|
53282 | 8312 |
then have "(norm a / norm x) *\<^sub>R x \<in> {x \<in> s. norm x = norm a}" |
60420 | 8313 |
using \<open>x\<in>s\<close> and \<open>x\<noteq>0\<close> by auto |
53282 | 8314 |
then show "norm (f b) / norm b * norm x \<le> norm (f x)" |
52625 | 8315 |
using b[THEN bspec[where x="(norm a / norm x) *\<^sub>R x"]] |
60420 | 8316 |
unfolding f.scaleR and ba using \<open>x\<noteq>0\<close> \<open>a\<noteq>0\<close> |
57512
cc97b347b301
reduced name variants for assoc and commute on plus and mult
haftmann
parents:
57448
diff
changeset
|
8317 |
by (auto simp add: mult.commute pos_le_divide_eq pos_divide_le_eq) |
52625 | 8318 |
qed |
8319 |
} |
|
8320 |
ultimately show ?thesis by auto |
|
33175 | 8321 |
qed |
8322 |
||
8323 |
lemma closed_injective_image_subspace: |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
37452
diff
changeset
|
8324 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
53282 | 8325 |
assumes "subspace s" "bounded_linear f" "\<forall>x\<in>s. f x = 0 \<longrightarrow> x = 0" "closed s" |
33175 | 8326 |
shows "closed(f ` s)" |
53282 | 8327 |
proof - |
8328 |
obtain e where "e > 0" and e: "\<forall>x\<in>s. e * norm x \<le> norm (f x)" |
|
52625 | 8329 |
using injective_imp_isometric[OF assms(4,1,2,3)] by auto |
8330 |
show ?thesis |
|
60420 | 8331 |
using complete_isometric_image[OF \<open>e>0\<close> assms(1,2) e] and assms(4) |
53291 | 8332 |
unfolding complete_eq_closed[symmetric] by auto |
33175 | 8333 |
qed |
8334 |
||
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
8335 |
|
60420 | 8336 |
subsection \<open>Some properties of a canonical subspace\<close> |
33175 | 8337 |
|
8338 |
lemma subspace_substandard: |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
8339 |
"subspace {x::'a::euclidean_space. (\<forall>i\<in>Basis. P i \<longrightarrow> x\<bullet>i = 0)}" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
8340 |
unfolding subspace_def by (auto simp: inner_add_left) |
33175 | 8341 |
|
8342 |
lemma closed_substandard: |
|
52625 | 8343 |
"closed {x::'a::euclidean_space. \<forall>i\<in>Basis. P i --> x\<bullet>i = 0}" (is "closed ?A") |
8344 |
proof - |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
8345 |
let ?D = "{i\<in>Basis. P i}" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
8346 |
have "closed (\<Inter>i\<in>?D. {x::'a. x\<bullet>i = 0})" |
44457
d366fa5551ef
declare euclidean_simps [simp] at the point they are proved;
huffman
parents:
44365
diff
changeset
|
8347 |
by (simp add: closed_INT closed_Collect_eq) |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
8348 |
also have "(\<Inter>i\<in>?D. {x::'a. x\<bullet>i = 0}) = ?A" |
44457
d366fa5551ef
declare euclidean_simps [simp] at the point they are proved;
huffman
parents:
44365
diff
changeset
|
8349 |
by auto |
d366fa5551ef
declare euclidean_simps [simp] at the point they are proved;
huffman
parents:
44365
diff
changeset
|
8350 |
finally show "closed ?A" . |
33175 | 8351 |
qed |
8352 |
||
52625 | 8353 |
lemma dim_substandard: |
8354 |
assumes d: "d \<subseteq> Basis" |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
8355 |
shows "dim {x::'a::euclidean_space. \<forall>i\<in>Basis. i \<notin> d \<longrightarrow> x\<bullet>i = 0} = card d" (is "dim ?A = _") |
53813 | 8356 |
proof (rule dim_unique) |
8357 |
show "d \<subseteq> ?A" |
|
8358 |
using d by (auto simp: inner_Basis) |
|
8359 |
show "independent d" |
|
8360 |
using independent_mono [OF independent_Basis d] . |
|
8361 |
show "?A \<subseteq> span d" |
|
8362 |
proof (clarify) |
|
8363 |
fix x assume x: "\<forall>i\<in>Basis. i \<notin> d \<longrightarrow> x \<bullet> i = 0" |
|
8364 |
have "finite d" |
|
8365 |
using finite_subset [OF d finite_Basis] . |
|
8366 |
then have "(\<Sum>i\<in>d. (x \<bullet> i) *\<^sub>R i) \<in> span d" |
|
8367 |
by (simp add: span_setsum span_clauses) |
|
8368 |
also have "(\<Sum>i\<in>d. (x \<bullet> i) *\<^sub>R i) = (\<Sum>i\<in>Basis. (x \<bullet> i) *\<^sub>R i)" |
|
57418 | 8369 |
by (rule setsum.mono_neutral_cong_left [OF finite_Basis d]) (auto simp add: x) |
53813 | 8370 |
finally show "x \<in> span d" |
8371 |
unfolding euclidean_representation . |
|
8372 |
qed |
|
8373 |
qed simp |
|
33175 | 8374 |
|
60420 | 8375 |
text\<open>Hence closure and completeness of all subspaces.\<close> |
53282 | 8376 |
|
8377 |
lemma ex_card: |
|
8378 |
assumes "n \<le> card A" |
|
8379 |
shows "\<exists>S\<subseteq>A. card S = n" |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
8380 |
proof cases |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
8381 |
assume "finite A" |
55522 | 8382 |
from ex_bij_betw_nat_finite[OF this] obtain f where f: "bij_betw f {0..<card A} A" .. |
60420 | 8383 |
moreover from f \<open>n \<le> card A\<close> have "{..< n} \<subseteq> {..< card A}" "inj_on f {..< n}" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
8384 |
by (auto simp: bij_betw_def intro: subset_inj_on) |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
8385 |
ultimately have "f ` {..< n} \<subseteq> A" "card (f ` {..< n}) = n" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
8386 |
by (auto simp: bij_betw_def card_image) |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
8387 |
then show ?thesis by blast |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
8388 |
next |
52625 | 8389 |
assume "\<not> finite A" |
60420 | 8390 |
with \<open>n \<le> card A\<close> show ?thesis by force |
52625 | 8391 |
qed |
8392 |
||
8393 |
lemma closed_subspace: |
|
53291 | 8394 |
fixes s :: "'a::euclidean_space set" |
52625 | 8395 |
assumes "subspace s" |
8396 |
shows "closed s" |
|
8397 |
proof - |
|
8398 |
have "dim s \<le> card (Basis :: 'a set)" |
|
8399 |
using dim_subset_UNIV by auto |
|
8400 |
with ex_card[OF this] obtain d :: "'a set" where t: "card d = dim s" and d: "d \<subseteq> Basis" |
|
8401 |
by auto |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
8402 |
let ?t = "{x::'a. \<forall>i\<in>Basis. i \<notin> d \<longrightarrow> x\<bullet>i = 0}" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
8403 |
have "\<exists>f. linear f \<and> f ` {x::'a. \<forall>i\<in>Basis. i \<notin> d \<longrightarrow> x \<bullet> i = 0} = s \<and> |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
8404 |
inj_on f {x::'a. \<forall>i\<in>Basis. i \<notin> d \<longrightarrow> x \<bullet> i = 0}" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
8405 |
using dim_substandard[of d] t d assms |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50324
diff
changeset
|
8406 |
by (intro subspace_isomorphism[OF subspace_substandard[of "\<lambda>i. i \<notin> d"]]) (auto simp: inner_Basis) |
55522 | 8407 |
then obtain f where f: |
8408 |
"linear f" |
|
8409 |
"f ` {x. \<forall>i\<in>Basis. i \<notin> d \<longrightarrow> x \<bullet> i = 0} = s" |
|
8410 |
"inj_on f {x. \<forall>i\<in>Basis. i \<notin> d \<longrightarrow> x \<bullet> i = 0}" |
|
8411 |
by blast |
|
52625 | 8412 |
interpret f: bounded_linear f |
8413 |
using f unfolding linear_conv_bounded_linear by auto |
|
8414 |
{ |
|
8415 |
fix x |
|
8416 |
have "x\<in>?t \<Longrightarrow> f x = 0 \<Longrightarrow> x = 0" |
|
8417 |
using f.zero d f(3)[THEN inj_onD, of x 0] by auto |
|
8418 |
} |
|
33175 | 8419 |
moreover have "closed ?t" using closed_substandard . |
8420 |
moreover have "subspace ?t" using subspace_substandard . |
|
52625 | 8421 |
ultimately show ?thesis |
8422 |
using closed_injective_image_subspace[of ?t f] |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
37452
diff
changeset
|
8423 |
unfolding f(2) using f(1) unfolding linear_conv_bounded_linear by auto |
33175 | 8424 |
qed |
8425 |
||
8426 |
lemma complete_subspace: |
|
52625 | 8427 |
fixes s :: "('a::euclidean_space) set" |
8428 |
shows "subspace s \<Longrightarrow> complete s" |
|
8429 |
using complete_eq_closed closed_subspace by auto |
|
33175 | 8430 |
|
63007
aa894a49f77d
new theorems about convex hulls, etc.; also, renamed some theorems
paulson <lp15@cam.ac.uk>
parents:
62948
diff
changeset
|
8431 |
lemma closed_span [iff]: |
aa894a49f77d
new theorems about convex hulls, etc.; also, renamed some theorems
paulson <lp15@cam.ac.uk>
parents:
62948
diff
changeset
|
8432 |
fixes s :: "'a::euclidean_space set" |
aa894a49f77d
new theorems about convex hulls, etc.; also, renamed some theorems
paulson <lp15@cam.ac.uk>
parents:
62948
diff
changeset
|
8433 |
shows "closed (span s)" |
aa894a49f77d
new theorems about convex hulls, etc.; also, renamed some theorems
paulson <lp15@cam.ac.uk>
parents:
62948
diff
changeset
|
8434 |
by (simp add: closed_subspace subspace_span) |
aa894a49f77d
new theorems about convex hulls, etc.; also, renamed some theorems
paulson <lp15@cam.ac.uk>
parents:
62948
diff
changeset
|
8435 |
|
33175 | 8436 |
lemma dim_closure: |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
37452
diff
changeset
|
8437 |
fixes s :: "('a::euclidean_space) set" |
33175 | 8438 |
shows "dim(closure s) = dim s" (is "?dc = ?d") |
52625 | 8439 |
proof - |
33175 | 8440 |
have "?dc \<le> ?d" using closure_minimal[OF span_inc, of s] |
8441 |
using closed_subspace[OF subspace_span, of s] |
|
52625 | 8442 |
using dim_subset[of "closure s" "span s"] |
8443 |
unfolding dim_span |
|
8444 |
by auto |
|
53282 | 8445 |
then show ?thesis using dim_subset[OF closure_subset, of s] |
52625 | 8446 |
by auto |
33175 | 8447 |
qed |
8448 |
||
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
8449 |
|
60420 | 8450 |
subsection \<open>Affine transformations of intervals\<close> |
33175 | 8451 |
|
8452 |
lemma real_affinity_le: |
|
53291 | 8453 |
"0 < (m::'a::linordered_field) \<Longrightarrow> (m * x + c \<le> y \<longleftrightarrow> x \<le> inverse(m) * y + -(c / m))" |
57865 | 8454 |
by (simp add: field_simps) |
33175 | 8455 |
|
8456 |
lemma real_le_affinity: |
|
53291 | 8457 |
"0 < (m::'a::linordered_field) \<Longrightarrow> (y \<le> m * x + c \<longleftrightarrow> inverse(m) * y + -(c / m) \<le> x)" |
57865 | 8458 |
by (simp add: field_simps) |
33175 | 8459 |
|
8460 |
lemma real_affinity_lt: |
|
53291 | 8461 |
"0 < (m::'a::linordered_field) \<Longrightarrow> (m * x + c < y \<longleftrightarrow> x < inverse(m) * y + -(c / m))" |
57865 | 8462 |
by (simp add: field_simps) |
33175 | 8463 |
|
8464 |
lemma real_lt_affinity: |
|
53291 | 8465 |
"0 < (m::'a::linordered_field) \<Longrightarrow> (y < m * x + c \<longleftrightarrow> inverse(m) * y + -(c / m) < x)" |
57865 | 8466 |
by (simp add: field_simps) |
33175 | 8467 |
|
8468 |
lemma real_affinity_eq: |
|
53291 | 8469 |
"(m::'a::linordered_field) \<noteq> 0 \<Longrightarrow> (m * x + c = y \<longleftrightarrow> x = inverse(m) * y + -(c / m))" |
57865 | 8470 |
by (simp add: field_simps) |
33175 | 8471 |
|
8472 |
lemma real_eq_affinity: |
|
53291 | 8473 |
"(m::'a::linordered_field) \<noteq> 0 \<Longrightarrow> (y = m * x + c \<longleftrightarrow> inverse(m) * y + -(c / m) = x)" |
57865 | 8474 |
by (simp add: field_simps) |
33175 | 8475 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
8476 |
|
60420 | 8477 |
subsection \<open>Banach fixed point theorem (not really topological...)\<close> |
33175 | 8478 |
|
60974
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
8479 |
theorem banach_fix: |
53282 | 8480 |
assumes s: "complete s" "s \<noteq> {}" |
8481 |
and c: "0 \<le> c" "c < 1" |
|
8482 |
and f: "(f ` s) \<subseteq> s" |
|
53291 | 8483 |
and lipschitz: "\<forall>x\<in>s. \<forall>y\<in>s. dist (f x) (f y) \<le> c * dist x y" |
8484 |
shows "\<exists>!x\<in>s. f x = x" |
|
53282 | 8485 |
proof - |
33175 | 8486 |
have "1 - c > 0" using c by auto |
8487 |
||
8488 |
from s(2) obtain z0 where "z0 \<in> s" by auto |
|
63040 | 8489 |
define z where "z n = (f ^^ n) z0" for n |
53282 | 8490 |
{ |
8491 |
fix n :: nat |
|
33175 | 8492 |
have "z n \<in> s" unfolding z_def |
52625 | 8493 |
proof (induct n) |
8494 |
case 0 |
|
60420 | 8495 |
then show ?case using \<open>z0 \<in> s\<close> by auto |
52625 | 8496 |
next |
8497 |
case Suc |
|
53282 | 8498 |
then show ?case using f by auto qed |
52625 | 8499 |
} note z_in_s = this |
33175 | 8500 |
|
63040 | 8501 |
define d where "d = dist (z 0) (z 1)" |
33175 | 8502 |
|
8503 |
have fzn:"\<And>n. f (z n) = z (Suc n)" unfolding z_def by auto |
|
52625 | 8504 |
{ |
53282 | 8505 |
fix n :: nat |
33175 | 8506 |
have "dist (z n) (z (Suc n)) \<le> (c ^ n) * d" |
52625 | 8507 |
proof (induct n) |
53282 | 8508 |
case 0 |
8509 |
then show ?case |
|
52625 | 8510 |
unfolding d_def by auto |
33175 | 8511 |
next |
8512 |
case (Suc m) |
|
53282 | 8513 |
then have "c * dist (z m) (z (Suc m)) \<le> c ^ Suc m * d" |
60420 | 8514 |
using \<open>0 \<le> c\<close> |
52625 | 8515 |
using mult_left_mono[of "dist (z m) (z (Suc m))" "c ^ m * d" c] |
8516 |
by auto |
|
53282 | 8517 |
then show ?case |
52625 | 8518 |
using lipschitz[THEN bspec[where x="z m"], OF z_in_s, THEN bspec[where x="z (Suc m)"], OF z_in_s] |
8519 |
unfolding fzn and mult_le_cancel_left |
|
8520 |
by auto |
|
33175 | 8521 |
qed |
8522 |
} note cf_z = this |
|
8523 |
||
52625 | 8524 |
{ |
53282 | 8525 |
fix n m :: nat |
33175 | 8526 |
have "(1 - c) * dist (z m) (z (m+n)) \<le> (c ^ m) * d * (1 - c ^ n)" |
52625 | 8527 |
proof (induct n) |
53282 | 8528 |
case 0 |
8529 |
show ?case by auto |
|
33175 | 8530 |
next |
8531 |
case (Suc k) |
|
52625 | 8532 |
have "(1 - c) * dist (z m) (z (m + Suc k)) \<le> |
8533 |
(1 - c) * (dist (z m) (z (m + k)) + dist (z (m + k)) (z (Suc (m + k))))" |
|
8534 |
using dist_triangle and c by (auto simp add: dist_triangle) |
|
33175 | 8535 |
also have "\<dots> \<le> (1 - c) * (dist (z m) (z (m + k)) + c ^ (m + k) * d)" |
8536 |
using cf_z[of "m + k"] and c by auto |
|
8537 |
also have "\<dots> \<le> c ^ m * d * (1 - c ^ k) + (1 - c) * c ^ (m + k) * d" |
|
36350 | 8538 |
using Suc by (auto simp add: field_simps) |
33175 | 8539 |
also have "\<dots> = (c ^ m) * (d * (1 - c ^ k) + (1 - c) * c ^ k * d)" |
36350 | 8540 |
unfolding power_add by (auto simp add: field_simps) |
33175 | 8541 |
also have "\<dots> \<le> (c ^ m) * d * (1 - c ^ Suc k)" |
36350 | 8542 |
using c by (auto simp add: field_simps) |
33175 | 8543 |
finally show ?case by auto |
8544 |
qed |
|
8545 |
} note cf_z2 = this |
|
52625 | 8546 |
{ |
53282 | 8547 |
fix e :: real |
8548 |
assume "e > 0" |
|
8549 |
then have "\<exists>N. \<forall>m n. N \<le> m \<and> N \<le> n \<longrightarrow> dist (z m) (z n) < e" |
|
52625 | 8550 |
proof (cases "d = 0") |
33175 | 8551 |
case True |
60420 | 8552 |
have *: "\<And>x. ((1 - c) * x \<le> 0) = (x \<le> 0)" using \<open>1 - c > 0\<close> |
57512
cc97b347b301
reduced name variants for assoc and commute on plus and mult
haftmann
parents:
57448
diff
changeset
|
8553 |
by (metis mult_zero_left mult.commute real_mult_le_cancel_iff1) |
41863 | 8554 |
from True have "\<And>n. z n = z0" using cf_z2[of 0] and c unfolding z_def |
8555 |
by (simp add: *) |
|
60420 | 8556 |
then show ?thesis using \<open>e>0\<close> by auto |
33175 | 8557 |
next |
52625 | 8558 |
case False |
53282 | 8559 |
then have "d>0" unfolding d_def using zero_le_dist[of "z 0" "z 1"] |
36778
739a9379e29b
avoid using real-specific versions of generic lemmas
huffman
parents:
36669
diff
changeset
|
8560 |
by (metis False d_def less_le) |
56541 | 8561 |
hence "0 < e * (1 - c) / d" |
60420 | 8562 |
using \<open>e>0\<close> and \<open>1-c>0\<close> by auto |
52625 | 8563 |
then obtain N where N:"c ^ N < e * (1 - c) / d" |
8564 |
using real_arch_pow_inv[of "e * (1 - c) / d" c] and c by auto |
|
8565 |
{ |
|
8566 |
fix m n::nat |
|
8567 |
assume "m>n" and as:"m\<ge>N" "n\<ge>N" |
|
60420 | 8568 |
have *:"c ^ n \<le> c ^ N" using \<open>n\<ge>N\<close> and c |
8569 |
using power_decreasing[OF \<open>n\<ge>N\<close>, of c] by auto |
|
52625 | 8570 |
have "1 - c ^ (m - n) > 0" |
60420 | 8571 |
using c and power_strict_mono[of c 1 "m - n"] using \<open>m>n\<close> by auto |
56541 | 8572 |
hence **: "d * (1 - c ^ (m - n)) / (1 - c) > 0" |
60420 | 8573 |
using \<open>d>0\<close> \<open>0 < 1 - c\<close> by auto |
33175 | 8574 |
|
8575 |
have "dist (z m) (z n) \<le> c ^ n * d * (1 - c ^ (m - n)) / (1 - c)" |
|
60420 | 8576 |
using cf_z2[of n "m - n"] and \<open>m>n\<close> |
8577 |
unfolding pos_le_divide_eq[OF \<open>1-c>0\<close>] |
|
57512
cc97b347b301
reduced name variants for assoc and commute on plus and mult
haftmann
parents:
57448
diff
changeset
|
8578 |
by (auto simp add: mult.commute dist_commute) |
33175 | 8579 |
also have "\<dots> \<le> c ^ N * d * (1 - c ^ (m - n)) / (1 - c)" |
8580 |
using mult_right_mono[OF * order_less_imp_le[OF **]] |
|
57512
cc97b347b301
reduced name variants for assoc and commute on plus and mult
haftmann
parents:
57448
diff
changeset
|
8581 |
unfolding mult.assoc by auto |
33175 | 8582 |
also have "\<dots> < (e * (1 - c) / d) * d * (1 - c ^ (m - n)) / (1 - c)" |
57512
cc97b347b301
reduced name variants for assoc and commute on plus and mult
haftmann
parents:
57448
diff
changeset
|
8583 |
using mult_strict_right_mono[OF N **] unfolding mult.assoc by auto |
53282 | 8584 |
also have "\<dots> = e * (1 - c ^ (m - n))" |
60420 | 8585 |
using c and \<open>d>0\<close> and \<open>1 - c > 0\<close> by auto |
8586 |
also have "\<dots> \<le> e" using c and \<open>1 - c ^ (m - n) > 0\<close> and \<open>e>0\<close> |
|
53282 | 8587 |
using mult_right_le_one_le[of e "1 - c ^ (m - n)"] by auto |
33175 | 8588 |
finally have "dist (z m) (z n) < e" by auto |
8589 |
} note * = this |
|
52625 | 8590 |
{ |
53282 | 8591 |
fix m n :: nat |
8592 |
assume as: "N \<le> m" "N \<le> n" |
|
8593 |
then have "dist (z n) (z m) < e" |
|
52625 | 8594 |
proof (cases "n = m") |
8595 |
case True |
|
60420 | 8596 |
then show ?thesis using \<open>e>0\<close> by auto |
33175 | 8597 |
next |
52625 | 8598 |
case False |
53282 | 8599 |
then show ?thesis using as and *[of n m] *[of m n] |
52625 | 8600 |
unfolding nat_neq_iff by (auto simp add: dist_commute) |
8601 |
qed |
|
8602 |
} |
|
53282 | 8603 |
then show ?thesis by auto |
33175 | 8604 |
qed |
8605 |
} |
|
53282 | 8606 |
then have "Cauchy z" |
8607 |
unfolding cauchy_def by auto |
|
61973 | 8608 |
then obtain x where "x\<in>s" and x:"(z \<longlongrightarrow> x) sequentially" |
52625 | 8609 |
using s(1)[unfolded compact_def complete_def, THEN spec[where x=z]] and z_in_s by auto |
33175 | 8610 |
|
63040 | 8611 |
define e where "e = dist (f x) x" |
52625 | 8612 |
have "e = 0" |
8613 |
proof (rule ccontr) |
|
8614 |
assume "e \<noteq> 0" |
|
53282 | 8615 |
then have "e > 0" |
8616 |
unfolding e_def using zero_le_dist[of "f x" x] |
|
33175 | 8617 |
by (metis dist_eq_0_iff dist_nz e_def) |
8618 |
then obtain N where N:"\<forall>n\<ge>N. dist (z n) x < e / 2" |
|
60017
b785d6d06430
Overloading of ln and powr, but "approximation" no longer works for powr. Code generation also fails due to type ambiguity in scala.
paulson <lp15@cam.ac.uk>
parents:
59815
diff
changeset
|
8619 |
using x[unfolded lim_sequentially, THEN spec[where x="e/2"]] by auto |
53282 | 8620 |
then have N':"dist (z N) x < e / 2" by auto |
8621 |
||
8622 |
have *: "c * dist (z N) x \<le> dist (z N) x" |
|
52625 | 8623 |
unfolding mult_le_cancel_right2 |
33175 | 8624 |
using zero_le_dist[of "z N" x] and c |
36778
739a9379e29b
avoid using real-specific versions of generic lemmas
huffman
parents:
36669
diff
changeset
|
8625 |
by (metis dist_eq_0_iff dist_nz order_less_asym less_le) |
52625 | 8626 |
have "dist (f (z N)) (f x) \<le> c * dist (z N) x" |
8627 |
using lipschitz[THEN bspec[where x="z N"], THEN bspec[where x=x]] |
|
60420 | 8628 |
using z_in_s[of N] \<open>x\<in>s\<close> |
52625 | 8629 |
using c |
8630 |
by auto |
|
8631 |
also have "\<dots> < e / 2" |
|
8632 |
using N' and c using * by auto |
|
8633 |
finally show False |
|
8634 |
unfolding fzn |
|
33175 | 8635 |
using N[THEN spec[where x="Suc N"]] and dist_triangle_half_r[of "z (Suc N)" "f x" e x] |
52625 | 8636 |
unfolding e_def |
8637 |
by auto |
|
33175 | 8638 |
qed |
53282 | 8639 |
then have "f x = x" unfolding e_def by auto |
33175 | 8640 |
moreover |
52625 | 8641 |
{ |
8642 |
fix y |
|
8643 |
assume "f y = y" "y\<in>s" |
|
53282 | 8644 |
then have "dist x y \<le> c * dist x y" |
52625 | 8645 |
using lipschitz[THEN bspec[where x=x], THEN bspec[where x=y]] |
60420 | 8646 |
using \<open>x\<in>s\<close> and \<open>f x = x\<close> |
52625 | 8647 |
by auto |
53282 | 8648 |
then have "dist x y = 0" |
52625 | 8649 |
unfolding mult_le_cancel_right1 |
8650 |
using c and zero_le_dist[of x y] |
|
8651 |
by auto |
|
53282 | 8652 |
then have "y = x" by auto |
33175 | 8653 |
} |
60420 | 8654 |
ultimately show ?thesis using \<open>x\<in>s\<close> by blast+ |
8655 |
qed |
|
8656 |
||
8657 |
||
8658 |
subsection \<open>Edelstein fixed point theorem\<close> |
|
33175 | 8659 |
|
60974
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
8660 |
theorem edelstein_fix: |
50970
3e5b67f85bf9
generalized theorem edelstein_fix to class metric_space
huffman
parents:
50955
diff
changeset
|
8661 |
fixes s :: "'a::metric_space set" |
52625 | 8662 |
assumes s: "compact s" "s \<noteq> {}" |
8663 |
and gs: "(g ` s) \<subseteq> s" |
|
8664 |
and dist: "\<forall>x\<in>s. \<forall>y\<in>s. x \<noteq> y \<longrightarrow> dist (g x) (g y) < dist x y" |
|
51347
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
8665 |
shows "\<exists>!x\<in>s. g x = x" |
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
8666 |
proof - |
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
8667 |
let ?D = "(\<lambda>x. (x, x)) ` s" |
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
8668 |
have D: "compact ?D" "?D \<noteq> {}" |
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
8669 |
by (rule compact_continuous_image) |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
8670 |
(auto intro!: s continuous_Pair continuous_ident simp: continuous_on_eq_continuous_within) |
51347
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
8671 |
|
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
8672 |
have "\<And>x y e. x \<in> s \<Longrightarrow> y \<in> s \<Longrightarrow> 0 < e \<Longrightarrow> dist y x < e \<Longrightarrow> dist (g y) (g x) < e" |
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
8673 |
using dist by fastforce |
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
8674 |
then have "continuous_on s g" |
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
8675 |
unfolding continuous_on_iff by auto |
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
8676 |
then have cont: "continuous_on ?D (\<lambda>x. dist ((g \<circ> fst) x) (snd x))" |
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
8677 |
unfolding continuous_on_eq_continuous_within |
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
8678 |
by (intro continuous_dist ballI continuous_within_compose) |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
8679 |
(auto intro!: continuous_fst continuous_snd continuous_ident simp: image_image) |
51347
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
8680 |
|
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
8681 |
obtain a where "a \<in> s" and le: "\<And>x. x \<in> s \<Longrightarrow> dist (g a) a \<le> dist (g x) x" |
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
8682 |
using continuous_attains_inf[OF D cont] by auto |
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
8683 |
|
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
8684 |
have "g a = a" |
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
8685 |
proof (rule ccontr) |
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
8686 |
assume "g a \<noteq> a" |
60420 | 8687 |
with \<open>a \<in> s\<close> gs have "dist (g (g a)) (g a) < dist (g a) a" |
51347
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
8688 |
by (intro dist[rule_format]) auto |
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
8689 |
moreover have "dist (g a) a \<le> dist (g (g a)) (g a)" |
60420 | 8690 |
using \<open>a \<in> s\<close> gs by (intro le) auto |
51347
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
8691 |
ultimately show False by auto |
33175 | 8692 |
qed |
51347
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
8693 |
moreover have "\<And>x. x \<in> s \<Longrightarrow> g x = x \<Longrightarrow> x = a" |
60420 | 8694 |
using dist[THEN bspec[where x=a]] \<open>g a = a\<close> and \<open>a\<in>s\<close> by auto |
8695 |
ultimately show "\<exists>!x\<in>s. g x = x" using \<open>a \<in> s\<close> by blast |
|
33175 | 8696 |
qed |
8697 |
||
61694
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8698 |
|
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8699 |
lemma cball_subset_cball_iff: |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8700 |
fixes a :: "'a :: euclidean_space" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8701 |
shows "cball a r \<subseteq> cball a' r' \<longleftrightarrow> dist a a' + r \<le> r' \<or> r < 0" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8702 |
(is "?lhs = ?rhs") |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8703 |
proof |
61762
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
8704 |
assume ?lhs |
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
8705 |
then show ?rhs |
61694
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8706 |
proof (cases "r < 0") |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8707 |
case True then show ?rhs by simp |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8708 |
next |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8709 |
case False |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8710 |
then have [simp]: "r \<ge> 0" by simp |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8711 |
have "norm (a - a') + r \<le> r'" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8712 |
proof (cases "a = a'") |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8713 |
case True then show ?thesis |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8714 |
using subsetD [where c = "a + r *\<^sub>R (SOME i. i \<in> Basis)", OF \<open>?lhs\<close>] subsetD [where c = "a", OF \<open>?lhs\<close>] |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8715 |
by (force simp add: SOME_Basis dist_norm) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8716 |
next |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8717 |
case False |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8718 |
have "norm (a' - (a + (r / norm (a - a')) *\<^sub>R (a - a'))) = norm (a' - a - (r / norm (a - a')) *\<^sub>R (a - a'))" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8719 |
by (simp add: algebra_simps) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8720 |
also have "... = norm ((-1 - (r / norm (a - a'))) *\<^sub>R (a - a'))" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8721 |
by (simp add: algebra_simps) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8722 |
also have "... = \<bar>- norm (a - a') - r\<bar>" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8723 |
using \<open>a \<noteq> a'\<close> by (simp add: abs_mult_pos field_simps) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8724 |
finally have [simp]: "norm (a' - (a + (r / norm (a - a')) *\<^sub>R (a - a'))) = \<bar>norm (a - a') + r\<bar>" by linarith |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8725 |
show ?thesis |
61762
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
8726 |
using subsetD [where c = "a' + (1 + r / norm(a - a')) *\<^sub>R (a - a')", OF \<open>?lhs\<close>] \<open>a \<noteq> a'\<close> |
61694
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8727 |
by (simp add: dist_norm scaleR_add_left) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8728 |
qed |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8729 |
then show ?rhs by (simp add: dist_norm) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8730 |
qed |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8731 |
next |
61762
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
8732 |
assume ?rhs then show ?lhs |
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
8733 |
apply (auto simp: ball_def dist_norm) |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
8734 |
apply (metis add.commute add_le_cancel_right dist_norm dist_triangle3 order_trans) |
61694
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8735 |
done |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8736 |
qed |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8737 |
|
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8738 |
lemma cball_subset_ball_iff: |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8739 |
fixes a :: "'a :: euclidean_space" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8740 |
shows "cball a r \<subseteq> ball a' r' \<longleftrightarrow> dist a a' + r < r' \<or> r < 0" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8741 |
(is "?lhs = ?rhs") |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8742 |
proof |
61762
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
8743 |
assume ?lhs |
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
8744 |
then show ?rhs |
61694
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8745 |
proof (cases "r < 0") |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8746 |
case True then show ?rhs by simp |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8747 |
next |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8748 |
case False |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8749 |
then have [simp]: "r \<ge> 0" by simp |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8750 |
have "norm (a - a') + r < r'" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8751 |
proof (cases "a = a'") |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8752 |
case True then show ?thesis |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8753 |
using subsetD [where c = "a + r *\<^sub>R (SOME i. i \<in> Basis)", OF \<open>?lhs\<close>] subsetD [where c = "a", OF \<open>?lhs\<close>] |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8754 |
by (force simp add: SOME_Basis dist_norm) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8755 |
next |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8756 |
case False |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8757 |
{ assume "norm (a - a') + r \<ge> r'" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8758 |
then have "\<bar>r' - norm (a - a')\<bar> \<le> r" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8759 |
apply (simp split: abs_split) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8760 |
by (metis \<open>0 \<le> r\<close> \<open>?lhs\<close> centre_in_cball dist_commute dist_norm less_asym mem_ball subset_eq) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8761 |
then have False |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8762 |
using subsetD [where c = "a + (r' / norm(a - a') - 1) *\<^sub>R (a - a')", OF \<open>?lhs\<close>] \<open>a \<noteq> a'\<close> |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8763 |
apply (simp add: dist_norm field_simps) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8764 |
apply (simp add: diff_divide_distrib scaleR_left_diff_distrib) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8765 |
done |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8766 |
} |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8767 |
then show ?thesis by force |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8768 |
qed |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8769 |
then show ?rhs by (simp add: dist_norm) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8770 |
qed |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8771 |
next |
61762
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
8772 |
assume ?rhs then show ?lhs |
61694
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8773 |
apply (auto simp: ball_def dist_norm ) |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
8774 |
apply (metis add.commute add_le_cancel_right dist_norm dist_triangle3 le_less_trans) |
61694
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8775 |
done |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8776 |
qed |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8777 |
|
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8778 |
lemma ball_subset_cball_iff: |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8779 |
fixes a :: "'a :: euclidean_space" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8780 |
shows "ball a r \<subseteq> cball a' r' \<longleftrightarrow> dist a a' + r \<le> r' \<or> r \<le> 0" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8781 |
(is "?lhs = ?rhs") |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8782 |
proof (cases "r \<le> 0") |
61762
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
8783 |
case True then show ?thesis |
61694
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8784 |
using dist_not_less_zero less_le_trans by force |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8785 |
next |
61762
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
8786 |
case False show ?thesis |
61694
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8787 |
proof |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8788 |
assume ?lhs |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8789 |
then have "(cball a r \<subseteq> cball a' r')" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8790 |
by (metis False closed_cball closure_ball closure_closed closure_mono not_less) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8791 |
then show ?rhs |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8792 |
using False cball_subset_cball_iff by fastforce |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8793 |
next |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8794 |
assume ?rhs with False show ?lhs |
61762
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
8795 |
using ball_subset_cball cball_subset_cball_iff by blast |
61694
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8796 |
qed |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8797 |
qed |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8798 |
|
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8799 |
lemma ball_subset_ball_iff: |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8800 |
fixes a :: "'a :: euclidean_space" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8801 |
shows "ball a r \<subseteq> ball a' r' \<longleftrightarrow> dist a a' + r \<le> r' \<or> r \<le> 0" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8802 |
(is "?lhs = ?rhs") |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8803 |
proof (cases "r \<le> 0") |
61762
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
8804 |
case True then show ?thesis |
61694
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8805 |
using dist_not_less_zero less_le_trans by force |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8806 |
next |
61762
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
8807 |
case False show ?thesis |
61694
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8808 |
proof |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8809 |
assume ?lhs |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8810 |
then have "0 < r'" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8811 |
by (metis (no_types) False \<open>?lhs\<close> centre_in_ball dist_norm le_less_trans mem_ball norm_ge_zero not_less set_mp) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8812 |
then have "(cball a r \<subseteq> cball a' r')" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8813 |
by (metis False\<open>?lhs\<close> closure_ball closure_mono not_less) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8814 |
then show ?rhs |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8815 |
using False cball_subset_cball_iff by fastforce |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8816 |
next |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8817 |
assume ?rhs then show ?lhs |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8818 |
apply (auto simp: ball_def) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8819 |
apply (metis add.commute add_le_cancel_right dist_commute dist_triangle_lt not_le order_trans) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8820 |
using dist_not_less_zero order.strict_trans2 apply blast |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8821 |
done |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8822 |
qed |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8823 |
qed |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8824 |
|
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8825 |
|
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8826 |
lemma ball_eq_ball_iff: |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8827 |
fixes x :: "'a :: euclidean_space" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8828 |
shows "ball x d = ball y e \<longleftrightarrow> d \<le> 0 \<and> e \<le> 0 \<or> x=y \<and> d=e" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8829 |
(is "?lhs = ?rhs") |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8830 |
proof |
61762
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
8831 |
assume ?lhs |
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
8832 |
then show ?rhs |
61694
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8833 |
proof (cases "d \<le> 0 \<or> e \<le> 0") |
61762
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
8834 |
case True |
61694
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8835 |
with \<open>?lhs\<close> show ?rhs |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8836 |
by safe (simp_all only: ball_eq_empty [of y e, symmetric] ball_eq_empty [of x d, symmetric]) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8837 |
next |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8838 |
case False |
61762
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
8839 |
with \<open>?lhs\<close> show ?rhs |
61694
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8840 |
apply (auto simp add: set_eq_subset ball_subset_ball_iff dist_norm norm_minus_commute algebra_simps) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8841 |
apply (metis add_le_same_cancel1 le_add_same_cancel1 norm_ge_zero norm_pths(2) order_trans) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8842 |
apply (metis add_increasing2 add_le_imp_le_right eq_iff norm_ge_zero) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8843 |
done |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8844 |
qed |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8845 |
next |
61762
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
8846 |
assume ?rhs then show ?lhs |
61694
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8847 |
by (auto simp add: set_eq_subset ball_subset_ball_iff) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8848 |
qed |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8849 |
|
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8850 |
lemma cball_eq_cball_iff: |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8851 |
fixes x :: "'a :: euclidean_space" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8852 |
shows "cball x d = cball y e \<longleftrightarrow> d < 0 \<and> e < 0 \<or> x=y \<and> d=e" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8853 |
(is "?lhs = ?rhs") |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8854 |
proof |
61762
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
8855 |
assume ?lhs |
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
8856 |
then show ?rhs |
61694
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8857 |
proof (cases "d < 0 \<or> e < 0") |
61762
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
8858 |
case True |
61694
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8859 |
with \<open>?lhs\<close> show ?rhs |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8860 |
by safe (simp_all only: cball_eq_empty [of y e, symmetric] cball_eq_empty [of x d, symmetric]) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8861 |
next |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8862 |
case False |
61762
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
8863 |
with \<open>?lhs\<close> show ?rhs |
61694
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8864 |
apply (auto simp add: set_eq_subset cball_subset_cball_iff dist_norm norm_minus_commute algebra_simps) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8865 |
apply (metis add_le_same_cancel1 le_add_same_cancel1 norm_ge_zero norm_pths(2) order_trans) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8866 |
apply (metis add_increasing2 add_le_imp_le_right eq_iff norm_ge_zero) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8867 |
done |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8868 |
qed |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8869 |
next |
61762
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
8870 |
assume ?rhs then show ?lhs |
61694
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8871 |
by (auto simp add: set_eq_subset cball_subset_cball_iff) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8872 |
qed |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8873 |
|
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8874 |
lemma ball_eq_cball_iff: |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8875 |
fixes x :: "'a :: euclidean_space" |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8876 |
shows "ball x d = cball y e \<longleftrightarrow> d \<le> 0 \<and> e < 0" (is "?lhs = ?rhs") |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8877 |
proof |
61762
d50b993b4fb9
Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents:
61738
diff
changeset
|
8878 |
assume ?lhs |
61694
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8879 |
then show ?rhs |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8880 |
apply (auto simp add: set_eq_subset ball_subset_cball_iff cball_subset_ball_iff algebra_simps) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8881 |
apply (metis add_increasing2 add_le_cancel_right add_less_same_cancel1 dist_not_less_zero less_le_trans zero_le_dist) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8882 |
apply (metis add_less_same_cancel1 dist_not_less_zero less_le_trans not_le) |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8883 |
using \<open>?lhs\<close> ball_eq_empty cball_eq_empty apply blast+ |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8884 |
done |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8885 |
next |
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
8886 |
assume ?rhs then show ?lhs by auto |
61694
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8887 |
qed |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8888 |
|
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8889 |
lemma cball_eq_ball_iff: |
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8890 |
fixes x :: "'a :: euclidean_space" |
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61907
diff
changeset
|
8891 |
shows "cball x d = ball y e \<longleftrightarrow> d < 0 \<and> e \<le> 0" |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61907
diff
changeset
|
8892 |
using ball_eq_cball_iff by blast |
61694
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8893 |
|
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54489
diff
changeset
|
8894 |
no_notation |
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54489
diff
changeset
|
8895 |
eucl_less (infix "<e" 50) |
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54489
diff
changeset
|
8896 |
|
33175 | 8897 |
end |