author | paulson <lp15@cam.ac.uk> |
Tue, 03 Jan 2017 16:48:49 +0000 | |
changeset 64758 | 3b33d2fc5fc0 |
parent 64539 | a868c83aa66e |
child 64773 | 223b2ebdda79 |
permissions | -rw-r--r-- |
63938 | 1 |
(* Author: L C Paulson, University of Cambridge |
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 |
||
63305
3b6975875633
Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents:
63301
diff
changeset
|
18 |
|
63593
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
19 |
(* FIXME: move elsewhere *) |
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
20 |
|
64122 | 21 |
lemma Times_eq_image_sum: |
22 |
fixes S :: "'a :: comm_monoid_add set" and T :: "'b :: comm_monoid_add set" |
|
23 |
shows "S \<times> T = {u + v |u v. u \<in> (\<lambda>x. (x, 0)) ` S \<and> v \<in> Pair 0 ` T}" |
|
24 |
by force |
|
25 |
||
63967
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
26 |
lemma halfspace_Int_eq: |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
27 |
"{x. a \<bullet> x \<le> b} \<inter> {x. b \<le> a \<bullet> x} = {x. a \<bullet> x = b}" |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
28 |
"{x. b \<le> a \<bullet> x} \<inter> {x. a \<bullet> x \<le> b} = {x. a \<bullet> x = b}" |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
29 |
by auto |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
30 |
|
63593
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
31 |
definition (in monoid_add) support_on :: "'b set \<Rightarrow> ('b \<Rightarrow> 'a) \<Rightarrow> 'b set" |
64539 | 32 |
where "support_on s f = {x\<in>s. f x \<noteq> 0}" |
63593
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
33 |
|
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
34 |
lemma in_support_on: "x \<in> support_on s f \<longleftrightarrow> x \<in> s \<and> f x \<noteq> 0" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
35 |
by (simp add: support_on_def) |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
36 |
|
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
37 |
lemma support_on_simps[simp]: |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
38 |
"support_on {} f = {}" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
39 |
"support_on (insert x s) f = |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
40 |
(if f x = 0 then support_on s f else insert x (support_on s f))" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
41 |
"support_on (s \<union> t) f = support_on s f \<union> support_on t f" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
42 |
"support_on (s \<inter> t) f = support_on s f \<inter> support_on t f" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
43 |
"support_on (s - t) f = support_on s f - support_on t f" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
44 |
"support_on (f ` s) g = f ` (support_on s (g \<circ> f))" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
45 |
unfolding support_on_def by auto |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
46 |
|
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
47 |
lemma support_on_cong: |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
48 |
"(\<And>x. x \<in> s \<Longrightarrow> f x = 0 \<longleftrightarrow> g x = 0) \<Longrightarrow> support_on s f = support_on s g" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
49 |
by (auto simp: support_on_def) |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
50 |
|
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
51 |
lemma support_on_if: "a \<noteq> 0 \<Longrightarrow> support_on A (\<lambda>x. if P x then a else 0) = {x\<in>A. P x}" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
52 |
by (auto simp: support_on_def) |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
53 |
|
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
54 |
lemma support_on_if_subset: "support_on A (\<lambda>x. if P x then a else 0) \<subseteq> {x \<in> A. P x}" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
55 |
by (auto simp: support_on_def) |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
56 |
|
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
57 |
lemma finite_support[intro]: "finite s \<Longrightarrow> finite (support_on s f)" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
58 |
unfolding support_on_def by auto |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
59 |
|
64267 | 60 |
(* TODO: is supp_sum really needed? TODO: Generalize to Finite_Set.fold *) |
61 |
definition (in comm_monoid_add) supp_sum :: "('b \<Rightarrow> 'a) \<Rightarrow> 'b set \<Rightarrow> 'a" |
|
64539 | 62 |
where "supp_sum f s = (\<Sum>x\<in>support_on s f. f x)" |
64267 | 63 |
|
64 |
lemma supp_sum_empty[simp]: "supp_sum f {} = 0" |
|
65 |
unfolding supp_sum_def by auto |
|
66 |
||
67 |
lemma supp_sum_insert[simp]: |
|
63593
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
68 |
"finite (support_on s f) \<Longrightarrow> |
64267 | 69 |
supp_sum f (insert x s) = (if x \<in> s then supp_sum f s else f x + supp_sum f s)" |
70 |
by (simp add: supp_sum_def in_support_on insert_absorb) |
|
71 |
||
72 |
lemma supp_sum_divide_distrib: "supp_sum f A / (r::'a::field) = supp_sum (\<lambda>n. f n / r) A" |
|
63593
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
73 |
by (cases "r = 0") |
64267 | 74 |
(auto simp: supp_sum_def sum_divide_distrib intro!: sum.cong support_on_cong) |
63305
3b6975875633
Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents:
63301
diff
changeset
|
75 |
|
3b6975875633
Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents:
63301
diff
changeset
|
76 |
(*END OF SUPPORT, ETC.*) |
3b6975875633
Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents:
63301
diff
changeset
|
77 |
|
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
|
78 |
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
|
79 |
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
|
80 |
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
|
81 |
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
|
82 |
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
|
83 |
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
|
84 |
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
|
85 |
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
|
86 |
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
|
87 |
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
|
88 |
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
|
89 |
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
|
90 |
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
|
91 |
|
53282 | 92 |
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
|
93 |
"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
|
94 |
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
|
95 |
|
51481
ef949192e5d6
move continuous_on_inv to HOL image (simplifies isCont_inverse_function)
hoelzl
parents:
51480
diff
changeset
|
96 |
lemma continuous_on_cases: |
ef949192e5d6
move continuous_on_inv to HOL image (simplifies isCont_inverse_function)
hoelzl
parents:
51480
diff
changeset
|
97 |
"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
|
98 |
\<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
|
99 |
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
|
100 |
by (rule continuous_on_If) auto |
ef949192e5d6
move continuous_on_inv to HOL image (simplifies isCont_inverse_function)
hoelzl
parents:
51480
diff
changeset
|
101 |
|
53255 | 102 |
|
60420 | 103 |
subsection \<open>Topological Basis\<close> |
50087 | 104 |
|
105 |
context topological_space |
|
106 |
begin |
|
107 |
||
53291 | 108 |
definition "topological_basis B \<longleftrightarrow> |
109 |
(\<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
|
110 |
|
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
111 |
lemma topological_basis: |
53291 | 112 |
"topological_basis B \<longleftrightarrow> (\<forall>x. open x \<longleftrightarrow> (\<exists>B'. B' \<subseteq> B \<and> \<Union>B' = x))" |
50998 | 113 |
unfolding topological_basis_def |
114 |
apply safe |
|
115 |
apply fastforce |
|
116 |
apply fastforce |
|
117 |
apply (erule_tac x="x" in allE) |
|
118 |
apply simp |
|
119 |
apply (rule_tac x="{x}" in exI) |
|
120 |
apply auto |
|
121 |
done |
|
122 |
||
50087 | 123 |
lemma topological_basis_iff: |
124 |
assumes "\<And>B'. B' \<in> B \<Longrightarrow> open B'" |
|
125 |
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'))" |
|
126 |
(is "_ \<longleftrightarrow> ?rhs") |
|
127 |
proof safe |
|
128 |
fix O' and x::'a |
|
129 |
assume H: "topological_basis B" "open O'" "x \<in> O'" |
|
53282 | 130 |
then have "(\<exists>B'\<subseteq>B. \<Union>B' = O')" by (simp add: topological_basis_def) |
50087 | 131 |
then obtain B' where "B' \<subseteq> B" "O' = \<Union>B'" by auto |
53282 | 132 |
then show "\<exists>B'\<in>B. x \<in> B' \<and> B' \<subseteq> O'" using H by auto |
50087 | 133 |
next |
134 |
assume H: ?rhs |
|
53282 | 135 |
show "topological_basis B" |
136 |
using assms unfolding topological_basis_def |
|
50087 | 137 |
proof safe |
53640 | 138 |
fix O' :: "'a set" |
53282 | 139 |
assume "open O'" |
50087 | 140 |
with H obtain f where "\<forall>x\<in>O'. f x \<in> B \<and> x \<in> f x \<and> f x \<subseteq> O'" |
141 |
by (force intro: bchoice simp: Bex_def) |
|
53282 | 142 |
then show "\<exists>B'\<subseteq>B. \<Union>B' = O'" |
50087 | 143 |
by (auto intro: exI[where x="{f x |x. x \<in> O'}"]) |
144 |
qed |
|
145 |
qed |
|
146 |
||
147 |
lemma topological_basisI: |
|
148 |
assumes "\<And>B'. B' \<in> B \<Longrightarrow> open B'" |
|
53282 | 149 |
and "\<And>O' x. open O' \<Longrightarrow> x \<in> O' \<Longrightarrow> \<exists>B'\<in>B. x \<in> B' \<and> B' \<subseteq> O'" |
50087 | 150 |
shows "topological_basis B" |
151 |
using assms by (subst topological_basis_iff) auto |
|
152 |
||
153 |
lemma topological_basisE: |
|
154 |
fixes O' |
|
155 |
assumes "topological_basis B" |
|
53282 | 156 |
and "open O'" |
157 |
and "x \<in> O'" |
|
50087 | 158 |
obtains B' where "B' \<in> B" "x \<in> B'" "B' \<subseteq> O'" |
159 |
proof atomize_elim |
|
53282 | 160 |
from assms have "\<And>B'. B'\<in>B \<Longrightarrow> open B'" |
161 |
by (simp add: topological_basis_def) |
|
50087 | 162 |
with topological_basis_iff assms |
53282 | 163 |
show "\<exists>B'. B' \<in> B \<and> x \<in> B' \<and> B' \<subseteq> O'" |
164 |
using assms by (simp add: Bex_def) |
|
50087 | 165 |
qed |
166 |
||
50094
84ddcf5364b4
allow arbitrary enumerations of basis in locale for generation of borel sets
immler
parents:
50087
diff
changeset
|
167 |
lemma topological_basis_open: |
84ddcf5364b4
allow arbitrary enumerations of basis in locale for generation of borel sets
immler
parents:
50087
diff
changeset
|
168 |
assumes "topological_basis B" |
53282 | 169 |
and "X \<in> B" |
50094
84ddcf5364b4
allow arbitrary enumerations of basis in locale for generation of borel sets
immler
parents:
50087
diff
changeset
|
170 |
shows "open X" |
53282 | 171 |
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
|
172 |
|
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
173 |
lemma topological_basis_imp_subbasis: |
53255 | 174 |
assumes B: "topological_basis B" |
175 |
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
|
176 |
proof (intro ext iffI) |
53255 | 177 |
fix S :: "'a set" |
178 |
assume "open S" |
|
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
179 |
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
|
180 |
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
|
181 |
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
|
182 |
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
|
183 |
next |
53255 | 184 |
fix S :: "'a set" |
185 |
assume "generate_topology B S" |
|
186 |
then show "open S" |
|
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
187 |
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
|
188 |
qed |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
189 |
|
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
190 |
lemma basis_dense: |
53640 | 191 |
fixes B :: "'a set set" |
192 |
and f :: "'a set \<Rightarrow> 'a" |
|
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
193 |
assumes "topological_basis B" |
53255 | 194 |
and choosefrom_basis: "\<And>B'. B' \<noteq> {} \<Longrightarrow> f B' \<in> B'" |
55522 | 195 |
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
|
196 |
proof (intro allI impI) |
53640 | 197 |
fix X :: "'a set" |
198 |
assume "open X" and "X \<noteq> {}" |
|
60420 | 199 |
from topological_basisE[OF \<open>topological_basis B\<close> \<open>open X\<close> choosefrom_basis[OF \<open>X \<noteq> {}\<close>]] |
55522 | 200 |
obtain B' where "B' \<in> B" "f X \<in> B'" "B' \<subseteq> X" . |
53255 | 201 |
then show "\<exists>B'\<in>B. f B' \<in> X" |
202 |
by (auto intro!: choosefrom_basis) |
|
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
203 |
qed |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
204 |
|
50087 | 205 |
end |
206 |
||
50882
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
207 |
lemma topological_basis_prod: |
53255 | 208 |
assumes A: "topological_basis A" |
209 |
and B: "topological_basis B" |
|
50882
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
210 |
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
|
211 |
unfolding topological_basis_def |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
212 |
proof (safe, simp_all del: ex_simps add: subset_image_iff ex_simps(1)[symmetric]) |
53255 | 213 |
fix S :: "('a \<times> 'b) set" |
214 |
assume "open S" |
|
50882
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
215 |
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
|
216 |
proof (safe intro!: exI[of _ "{x\<in>A \<times> B. fst x \<times> snd x \<subseteq> S}"]) |
53255 | 217 |
fix x y |
218 |
assume "(x, y) \<in> S" |
|
60420 | 219 |
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
|
220 |
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
|
221 |
by (metis mem_Sigma_iff) |
55522 | 222 |
moreover |
223 |
from A a obtain A0 where "A0 \<in> A" "x \<in> A0" "A0 \<subseteq> a" |
|
224 |
by (rule topological_basisE) |
|
225 |
moreover |
|
226 |
from B b obtain B0 where "B0 \<in> B" "y \<in> B0" "B0 \<subseteq> b" |
|
227 |
by (rule topological_basisE) |
|
50882
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
228 |
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
|
229 |
by (intro UN_I[of "(A0, B0)"]) auto |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
230 |
qed auto |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
231 |
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
|
232 |
|
53255 | 233 |
|
60420 | 234 |
subsection \<open>Countable Basis\<close> |
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
235 |
|
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
236 |
locale countable_basis = |
53640 | 237 |
fixes B :: "'a::topological_space set set" |
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
238 |
assumes is_basis: "topological_basis B" |
53282 | 239 |
and countable_basis: "countable B" |
33175 | 240 |
begin |
241 |
||
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
242 |
lemma open_countable_basis_ex: |
50087 | 243 |
assumes "open X" |
61952 | 244 |
shows "\<exists>B' \<subseteq> B. X = \<Union>B'" |
53255 | 245 |
using assms countable_basis is_basis |
246 |
unfolding topological_basis_def by blast |
|
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
247 |
|
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
248 |
lemma open_countable_basisE: |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
249 |
assumes "open X" |
61952 | 250 |
obtains B' where "B' \<subseteq> B" "X = \<Union>B'" |
53255 | 251 |
using assms open_countable_basis_ex |
252 |
by (atomize_elim) simp |
|
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
253 |
|
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
254 |
lemma countable_dense_exists: |
53291 | 255 |
"\<exists>D::'a set. countable D \<and> (\<forall>X. open X \<longrightarrow> X \<noteq> {} \<longrightarrow> (\<exists>d \<in> D. d \<in> X))" |
50087 | 256 |
proof - |
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
257 |
let ?f = "(\<lambda>B'. SOME x. x \<in> B')" |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
258 |
have "countable (?f ` B)" using countable_basis by simp |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
259 |
with basis_dense[OF is_basis, of ?f] show ?thesis |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
260 |
by (intro exI[where x="?f ` B"]) (metis (mono_tags) all_not_in_conv imageI someI) |
50087 | 261 |
qed |
262 |
||
263 |
lemma countable_dense_setE: |
|
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
264 |
obtains D :: "'a set" |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
265 |
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
|
266 |
using countable_dense_exists by blast |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
267 |
|
50087 | 268 |
end |
269 |
||
50883 | 270 |
lemma (in first_countable_topology) first_countable_basisE: |
271 |
obtains A where "countable A" "\<And>a. a \<in> A \<Longrightarrow> x \<in> a" "\<And>a. a \<in> A \<Longrightarrow> open a" |
|
272 |
"\<And>S. open S \<Longrightarrow> x \<in> S \<Longrightarrow> (\<exists>a\<in>A. a \<subseteq> S)" |
|
273 |
using first_countable_basis[of x] |
|
51473 | 274 |
apply atomize_elim |
275 |
apply (elim exE) |
|
276 |
apply (rule_tac x="range A" in exI) |
|
277 |
apply auto |
|
278 |
done |
|
50883 | 279 |
|
51105 | 280 |
lemma (in first_countable_topology) first_countable_basis_Int_stableE: |
281 |
obtains A where "countable A" "\<And>a. a \<in> A \<Longrightarrow> x \<in> a" "\<And>a. a \<in> A \<Longrightarrow> open a" |
|
282 |
"\<And>S. open S \<Longrightarrow> x \<in> S \<Longrightarrow> (\<exists>a\<in>A. a \<subseteq> S)" |
|
283 |
"\<And>a b. a \<in> A \<Longrightarrow> b \<in> A \<Longrightarrow> a \<inter> b \<in> A" |
|
284 |
proof atomize_elim |
|
55522 | 285 |
obtain A' where A': |
286 |
"countable A'" |
|
287 |
"\<And>a. a \<in> A' \<Longrightarrow> x \<in> a" |
|
288 |
"\<And>a. a \<in> A' \<Longrightarrow> open a" |
|
289 |
"\<And>S. open S \<Longrightarrow> x \<in> S \<Longrightarrow> \<exists>a\<in>A'. a \<subseteq> S" |
|
290 |
by (rule first_countable_basisE) blast |
|
63040 | 291 |
define A where [abs_def]: |
292 |
"A = (\<lambda>N. \<Inter>((\<lambda>n. from_nat_into A' n) ` N)) ` (Collect finite::nat set set)" |
|
53255 | 293 |
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 | 294 |
(\<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)" |
295 |
proof (safe intro!: exI[where x=A]) |
|
53255 | 296 |
show "countable A" |
297 |
unfolding A_def by (intro countable_image countable_Collect_finite) |
|
298 |
fix a |
|
299 |
assume "a \<in> A" |
|
300 |
then show "x \<in> a" "open a" |
|
301 |
using A'(4)[OF open_UNIV] by (auto simp: A_def intro: A' from_nat_into) |
|
51105 | 302 |
next |
52141
eff000cab70f
weaker precendence of syntax for big intersection and union on sets
haftmann
parents:
51773
diff
changeset
|
303 |
let ?int = "\<lambda>N. \<Inter>(from_nat_into A' ` N)" |
53255 | 304 |
fix a b |
305 |
assume "a \<in> A" "b \<in> A" |
|
306 |
then obtain N M where "a = ?int N" "b = ?int M" "finite (N \<union> M)" |
|
307 |
by (auto simp: A_def) |
|
308 |
then show "a \<inter> b \<in> A" |
|
309 |
by (auto simp: A_def intro!: image_eqI[where x="N \<union> M"]) |
|
51105 | 310 |
next |
53255 | 311 |
fix S |
312 |
assume "open S" "x \<in> S" |
|
313 |
then obtain a where a: "a\<in>A'" "a \<subseteq> S" using A' by blast |
|
314 |
then show "\<exists>a\<in>A. a \<subseteq> S" using a A' |
|
51105 | 315 |
by (intro bexI[where x=a]) (auto simp: A_def intro: image_eqI[where x="{to_nat_on A' a}"]) |
316 |
qed |
|
317 |
qed |
|
318 |
||
51473 | 319 |
lemma (in topological_space) first_countableI: |
53255 | 320 |
assumes "countable A" |
321 |
and 1: "\<And>a. a \<in> A \<Longrightarrow> x \<in> a" "\<And>a. a \<in> A \<Longrightarrow> open a" |
|
322 |
and 2: "\<And>S. open S \<Longrightarrow> x \<in> S \<Longrightarrow> \<exists>a\<in>A. a \<subseteq> S" |
|
51473 | 323 |
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))" |
324 |
proof (safe intro!: exI[of _ "from_nat_into A"]) |
|
53255 | 325 |
fix i |
51473 | 326 |
have "A \<noteq> {}" using 2[of UNIV] by auto |
53255 | 327 |
show "x \<in> from_nat_into A i" "open (from_nat_into A i)" |
60420 | 328 |
using range_from_nat_into_subset[OF \<open>A \<noteq> {}\<close>] 1 by auto |
53255 | 329 |
next |
330 |
fix S |
|
331 |
assume "open S" "x\<in>S" from 2[OF this] |
|
332 |
show "\<exists>i. from_nat_into A i \<subseteq> S" |
|
60420 | 333 |
using subset_range_from_nat_into[OF \<open>countable A\<close>] by auto |
51473 | 334 |
qed |
51350 | 335 |
|
50883 | 336 |
instance prod :: (first_countable_topology, first_countable_topology) first_countable_topology |
337 |
proof |
|
338 |
fix x :: "'a \<times> 'b" |
|
55522 | 339 |
obtain A where A: |
340 |
"countable A" |
|
341 |
"\<And>a. a \<in> A \<Longrightarrow> fst x \<in> a" |
|
342 |
"\<And>a. a \<in> A \<Longrightarrow> open a" |
|
343 |
"\<And>S. open S \<Longrightarrow> fst x \<in> S \<Longrightarrow> \<exists>a\<in>A. a \<subseteq> S" |
|
344 |
by (rule first_countable_basisE[of "fst x"]) blast |
|
345 |
obtain B where B: |
|
346 |
"countable B" |
|
347 |
"\<And>a. a \<in> B \<Longrightarrow> snd x \<in> a" |
|
348 |
"\<And>a. a \<in> B \<Longrightarrow> open a" |
|
349 |
"\<And>S. open S \<Longrightarrow> snd x \<in> S \<Longrightarrow> \<exists>a\<in>B. a \<subseteq> S" |
|
350 |
by (rule first_countable_basisE[of "snd x"]) blast |
|
53282 | 351 |
show "\<exists>A::nat \<Rightarrow> ('a \<times> 'b) set. |
352 |
(\<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 | 353 |
proof (rule first_countableI[of "(\<lambda>(a, b). a \<times> b) ` (A \<times> B)"], safe) |
53255 | 354 |
fix a b |
355 |
assume x: "a \<in> A" "b \<in> B" |
|
53640 | 356 |
with A(2, 3)[of a] B(2, 3)[of b] show "x \<in> a \<times> b" and "open (a \<times> b)" |
357 |
unfolding mem_Times_iff |
|
358 |
by (auto intro: open_Times) |
|
50883 | 359 |
next |
53255 | 360 |
fix S |
361 |
assume "open S" "x \<in> S" |
|
55522 | 362 |
then obtain a' b' where a'b': "open a'" "open b'" "x \<in> a' \<times> b'" "a' \<times> b' \<subseteq> S" |
363 |
by (rule open_prod_elim) |
|
364 |
moreover |
|
365 |
from a'b' A(4)[of a'] B(4)[of b'] |
|
366 |
obtain a b where "a \<in> A" "a \<subseteq> a'" "b \<in> B" "b \<subseteq> b'" |
|
367 |
by auto |
|
368 |
ultimately |
|
369 |
show "\<exists>a\<in>(\<lambda>(a, b). a \<times> b) ` (A \<times> B). a \<subseteq> S" |
|
50883 | 370 |
by (auto intro!: bexI[of _ "a \<times> b"] bexI[of _ a] bexI[of _ b]) |
371 |
qed (simp add: A B) |
|
372 |
qed |
|
373 |
||
50881
ae630bab13da
renamed countable_basis_space to second_countable_topology
hoelzl
parents:
50526
diff
changeset
|
374 |
class second_countable_topology = topological_space + |
53282 | 375 |
assumes ex_countable_subbasis: |
376 |
"\<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
|
377 |
begin |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
378 |
|
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
379 |
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
|
380 |
proof - |
53255 | 381 |
from ex_countable_subbasis obtain B where B: "countable B" "open = generate_topology B" |
382 |
by blast |
|
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
383 |
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
|
384 |
|
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
385 |
show ?thesis |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
386 |
proof (intro exI conjI) |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
387 |
show "countable ?B" |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
388 |
by (intro countable_image countable_Collect_finite_subset B) |
53255 | 389 |
{ |
390 |
fix S |
|
391 |
assume "open S" |
|
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
392 |
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
|
393 |
unfolding B |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
394 |
proof induct |
53255 | 395 |
case UNIV |
396 |
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
|
397 |
next |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
398 |
case (Int a b) |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
399 |
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
|
400 |
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
|
401 |
by blast |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
402 |
show ?case |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
403 |
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
|
404 |
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
|
405 |
next |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
406 |
case (UN K) |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
407 |
then have "\<forall>k\<in>K. \<exists>B'\<subseteq>{b. finite b \<and> b \<subseteq> B}. UNION B' Inter = k" by auto |
55522 | 408 |
then obtain k where |
409 |
"\<forall>ka\<in>K. k ka \<subseteq> {b. finite b \<and> b \<subseteq> B} \<and> UNION (k ka) Inter = ka" |
|
410 |
unfolding bchoice_iff .. |
|
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
411 |
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
|
412 |
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
|
413 |
next |
53255 | 414 |
case (Basis S) |
415 |
then show ?case |
|
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
416 |
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
|
417 |
qed |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
418 |
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
|
419 |
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
|
420 |
then show "topological_basis ?B" |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
421 |
unfolding topological_space_class.topological_basis_def |
53282 | 422 |
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
|
423 |
(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
|
424 |
qed |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
425 |
qed |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
426 |
|
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
427 |
end |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
428 |
|
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
429 |
sublocale second_countable_topology < |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
430 |
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
|
431 |
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
|
432 |
by unfold_locales safe |
50094
84ddcf5364b4
allow arbitrary enumerations of basis in locale for generation of borel sets
immler
parents:
50087
diff
changeset
|
433 |
|
50882
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
434 |
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
|
435 |
proof |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
436 |
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
|
437 |
using ex_countable_basis by auto |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
438 |
moreover |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
439 |
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
|
440 |
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
|
441 |
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
|
442 |
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
|
443 |
topological_basis_imp_subbasis) |
50882
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
444 |
qed |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
445 |
|
50883 | 446 |
instance second_countable_topology \<subseteq> first_countable_topology |
447 |
proof |
|
448 |
fix x :: 'a |
|
63040 | 449 |
define B :: "'a set set" where "B = (SOME B. countable B \<and> topological_basis B)" |
50883 | 450 |
then have B: "countable B" "topological_basis B" |
451 |
using countable_basis is_basis |
|
452 |
by (auto simp: countable_basis is_basis) |
|
53282 | 453 |
then show "\<exists>A::nat \<Rightarrow> 'a set. |
454 |
(\<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 | 455 |
by (intro first_countableI[of "{b\<in>B. x \<in> b}"]) |
456 |
(fastforce simp: topological_space_class.topological_basis_def)+ |
|
50883 | 457 |
qed |
458 |
||
64320
ba194424b895
HOL-Probability: move stopping time from AFP/Markov_Models
hoelzl
parents:
64287
diff
changeset
|
459 |
instance nat :: second_countable_topology |
ba194424b895
HOL-Probability: move stopping time from AFP/Markov_Models
hoelzl
parents:
64287
diff
changeset
|
460 |
proof |
ba194424b895
HOL-Probability: move stopping time from AFP/Markov_Models
hoelzl
parents:
64287
diff
changeset
|
461 |
show "\<exists>B::nat set set. countable B \<and> open = generate_topology B" |
ba194424b895
HOL-Probability: move stopping time from AFP/Markov_Models
hoelzl
parents:
64287
diff
changeset
|
462 |
by (intro exI[of _ "range lessThan \<union> range greaterThan"]) (auto simp: open_nat_def) |
ba194424b895
HOL-Probability: move stopping time from AFP/Markov_Models
hoelzl
parents:
64287
diff
changeset
|
463 |
qed |
53255 | 464 |
|
64284
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
465 |
lemma countable_separating_set_linorder1: |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
466 |
shows "\<exists>B::('a::{linorder_topology, second_countable_topology} set). countable B \<and> (\<forall>x y. x < y \<longrightarrow> (\<exists>b \<in> B. x < b \<and> b \<le> y))" |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
467 |
proof - |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
468 |
obtain A::"'a set set" where "countable A" "topological_basis A" using ex_countable_basis by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
469 |
define B1 where "B1 = {(LEAST x. x \<in> U)| U. U \<in> A}" |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
470 |
then have "countable B1" using `countable A` by (simp add: Setcompr_eq_image) |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
471 |
define B2 where "B2 = {(SOME x. x \<in> U)| U. U \<in> A}" |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
472 |
then have "countable B2" using `countable A` by (simp add: Setcompr_eq_image) |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
473 |
have "\<exists>b \<in> B1 \<union> B2. x < b \<and> b \<le> y" if "x < y" for x y |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
474 |
proof (cases) |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
475 |
assume "\<exists>z. x < z \<and> z < y" |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
476 |
then obtain z where z: "x < z \<and> z < y" by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
477 |
define U where "U = {x<..<y}" |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
478 |
then have "open U" by simp |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
479 |
moreover have "z \<in> U" using z U_def by simp |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
480 |
ultimately obtain V where "V \<in> A" "z \<in> V" "V \<subseteq> U" using topological_basisE[OF `topological_basis A`] by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
481 |
define w where "w = (SOME x. x \<in> V)" |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
482 |
then have "w \<in> V" using `z \<in> V` by (metis someI2) |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
483 |
then have "x < w \<and> w \<le> y" using `w \<in> V` `V \<subseteq> U` U_def by fastforce |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
484 |
moreover have "w \<in> B1 \<union> B2" using w_def B2_def `V \<in> A` by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
485 |
ultimately show ?thesis by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
486 |
next |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
487 |
assume "\<not>(\<exists>z. x < z \<and> z < y)" |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
488 |
then have *: "\<And>z. z > x \<Longrightarrow> z \<ge> y" by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
489 |
define U where "U = {x<..}" |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
490 |
then have "open U" by simp |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
491 |
moreover have "y \<in> U" using `x < y` U_def by simp |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
492 |
ultimately obtain "V" where "V \<in> A" "y \<in> V" "V \<subseteq> U" using topological_basisE[OF `topological_basis A`] by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
493 |
have "U = {y..}" unfolding U_def using * `x < y` by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
494 |
then have "V \<subseteq> {y..}" using `V \<subseteq> U` by simp |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
495 |
then have "(LEAST w. w \<in> V) = y" using `y \<in> V` by (meson Least_equality atLeast_iff subsetCE) |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
496 |
then have "y \<in> B1 \<union> B2" using `V \<in> A` B1_def by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
497 |
moreover have "x < y \<and> y \<le> y" using `x < y` by simp |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
498 |
ultimately show ?thesis by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
499 |
qed |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
500 |
moreover have "countable (B1 \<union> B2)" using `countable B1` `countable B2` by simp |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
501 |
ultimately show ?thesis by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
502 |
qed |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
503 |
|
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
504 |
lemma countable_separating_set_linorder2: |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
505 |
shows "\<exists>B::('a::{linorder_topology, second_countable_topology} set). countable B \<and> (\<forall>x y. x < y \<longrightarrow> (\<exists>b \<in> B. x \<le> b \<and> b < y))" |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
506 |
proof - |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
507 |
obtain A::"'a set set" where "countable A" "topological_basis A" using ex_countable_basis by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
508 |
define B1 where "B1 = {(GREATEST x. x \<in> U) | U. U \<in> A}" |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
509 |
then have "countable B1" using `countable A` by (simp add: Setcompr_eq_image) |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
510 |
define B2 where "B2 = {(SOME x. x \<in> U)| U. U \<in> A}" |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
511 |
then have "countable B2" using `countable A` by (simp add: Setcompr_eq_image) |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
512 |
have "\<exists>b \<in> B1 \<union> B2. x \<le> b \<and> b < y" if "x < y" for x y |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
513 |
proof (cases) |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
514 |
assume "\<exists>z. x < z \<and> z < y" |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
515 |
then obtain z where z: "x < z \<and> z < y" by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
516 |
define U where "U = {x<..<y}" |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
517 |
then have "open U" by simp |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
518 |
moreover have "z \<in> U" using z U_def by simp |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
519 |
ultimately obtain "V" where "V \<in> A" "z \<in> V" "V \<subseteq> U" using topological_basisE[OF `topological_basis A`] by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
520 |
define w where "w = (SOME x. x \<in> V)" |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
521 |
then have "w \<in> V" using `z \<in> V` by (metis someI2) |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
522 |
then have "x \<le> w \<and> w < y" using `w \<in> V` `V \<subseteq> U` U_def by fastforce |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
523 |
moreover have "w \<in> B1 \<union> B2" using w_def B2_def `V \<in> A` by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
524 |
ultimately show ?thesis by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
525 |
next |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
526 |
assume "\<not>(\<exists>z. x < z \<and> z < y)" |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
527 |
then have *: "\<And>z. z < y \<Longrightarrow> z \<le> x" using leI by blast |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
528 |
define U where "U = {..<y}" |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
529 |
then have "open U" by simp |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
530 |
moreover have "x \<in> U" using `x < y` U_def by simp |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
531 |
ultimately obtain "V" where "V \<in> A" "x \<in> V" "V \<subseteq> U" using topological_basisE[OF `topological_basis A`] by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
532 |
have "U = {..x}" unfolding U_def using * `x < y` by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
533 |
then have "V \<subseteq> {..x}" using `V \<subseteq> U` by simp |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
534 |
then have "(GREATEST x. x \<in> V) = x" using `x \<in> V` by (meson Greatest_equality atMost_iff subsetCE) |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
535 |
then have "x \<in> B1 \<union> B2" using `V \<in> A` B1_def by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
536 |
moreover have "x \<le> x \<and> x < y" using `x < y` by simp |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
537 |
ultimately show ?thesis by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
538 |
qed |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
539 |
moreover have "countable (B1 \<union> B2)" using `countable B1` `countable B2` by simp |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
540 |
ultimately show ?thesis by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
541 |
qed |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
542 |
|
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
543 |
lemma countable_separating_set_dense_linorder: |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
544 |
shows "\<exists>B::('a::{linorder_topology, dense_linorder, second_countable_topology} set). countable B \<and> (\<forall>x y. x < y \<longrightarrow> (\<exists>b \<in> B. x < b \<and> b < y))" |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
545 |
proof - |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
546 |
obtain B::"'a set" where B: "countable B" "\<And>x y. x < y \<Longrightarrow> (\<exists>b \<in> B. x < b \<and> b \<le> y)" |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
547 |
using countable_separating_set_linorder1 by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
548 |
have "\<exists>b \<in> B. x < b \<and> b < y" if "x < y" for x y |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
549 |
proof - |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
550 |
obtain z where "x < z" "z < y" using `x < y` dense by blast |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
551 |
then obtain b where "b \<in> B" "x < b \<and> b \<le> z" using B(2) by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
552 |
then have "x < b \<and> b < y" using `z < y` by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
553 |
then show ?thesis using `b \<in> B` by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
554 |
qed |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
555 |
then show ?thesis using B(1) by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
556 |
qed |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
557 |
|
60420 | 558 |
subsection \<open>Polish spaces\<close> |
559 |
||
560 |
text \<open>Textbooks define Polish spaces as completely metrizable. |
|
561 |
We assume the topology to be complete for a given metric.\<close> |
|
50087 | 562 |
|
50881
ae630bab13da
renamed countable_basis_space to second_countable_topology
hoelzl
parents:
50526
diff
changeset
|
563 |
class polish_space = complete_space + second_countable_topology |
50087 | 564 |
|
60420 | 565 |
subsection \<open>General notion of a topology as a value\<close> |
33175 | 566 |
|
53255 | 567 |
definition "istopology L \<longleftrightarrow> |
60585 | 568 |
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 | 569 |
|
49834 | 570 |
typedef 'a topology = "{L::('a set) \<Rightarrow> bool. istopology L}" |
33175 | 571 |
morphisms "openin" "topology" |
572 |
unfolding istopology_def by blast |
|
573 |
||
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
|
574 |
lemma istopology_openin[intro]: "istopology(openin U)" |
33175 | 575 |
using openin[of U] by blast |
576 |
||
577 |
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
|
578 |
using topology_inverse[unfolded mem_Collect_eq] . |
33175 | 579 |
|
580 |
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
|
581 |
using topology_inverse[of U] istopology_openin[of "topology U"] by auto |
33175 | 582 |
|
583 |
lemma topology_eq: "T1 = T2 \<longleftrightarrow> (\<forall>S. openin T1 S \<longleftrightarrow> openin T2 S)" |
|
53255 | 584 |
proof |
585 |
assume "T1 = T2" |
|
586 |
then show "\<forall>S. openin T1 S \<longleftrightarrow> openin T2 S" by simp |
|
587 |
next |
|
588 |
assume H: "\<forall>S. openin T1 S \<longleftrightarrow> openin T2 S" |
|
589 |
then have "openin T1 = openin T2" by (simp add: fun_eq_iff) |
|
590 |
then have "topology (openin T1) = topology (openin T2)" by simp |
|
591 |
then show "T1 = T2" unfolding openin_inverse . |
|
33175 | 592 |
qed |
593 |
||
60420 | 594 |
text\<open>Infer the "universe" from union of all sets in the topology.\<close> |
33175 | 595 |
|
53640 | 596 |
definition "topspace T = \<Union>{S. openin T S}" |
33175 | 597 |
|
60420 | 598 |
subsubsection \<open>Main properties of open sets\<close> |
33175 | 599 |
|
600 |
lemma openin_clauses: |
|
601 |
fixes U :: "'a topology" |
|
53282 | 602 |
shows |
603 |
"openin U {}" |
|
604 |
"\<And>S T. openin U S \<Longrightarrow> openin U T \<Longrightarrow> openin U (S\<inter>T)" |
|
605 |
"\<And>K. (\<forall>S \<in> K. openin U S) \<Longrightarrow> openin U (\<Union>K)" |
|
606 |
using openin[of U] unfolding istopology_def mem_Collect_eq by fast+ |
|
33175 | 607 |
|
608 |
lemma openin_subset[intro]: "openin U S \<Longrightarrow> S \<subseteq> topspace U" |
|
609 |
unfolding topspace_def by blast |
|
53255 | 610 |
|
611 |
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
|
612 |
by (rule openin_clauses) |
33175 | 613 |
|
614 |
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
|
615 |
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
|
616 |
|
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
617 |
lemma openin_Union[intro]: "(\<And>S. S \<in> K \<Longrightarrow> openin U S) \<Longrightarrow> openin U (\<Union>K)" |
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
618 |
using openin_clauses by blast |
33175 | 619 |
|
620 |
lemma openin_Un[intro]: "openin U S \<Longrightarrow> openin U T \<Longrightarrow> openin U (S \<union> T)" |
|
621 |
using openin_Union[of "{S,T}" U] by auto |
|
622 |
||
53255 | 623 |
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
|
624 |
by (force simp add: openin_Union topspace_def) |
33175 | 625 |
|
49711 | 626 |
lemma openin_subopen: "openin U S \<longleftrightarrow> (\<forall>x \<in> S. \<exists>T. openin U T \<and> x \<in> T \<and> T \<subseteq> S)" |
627 |
(is "?lhs \<longleftrightarrow> ?rhs") |
|
36584 | 628 |
proof |
49711 | 629 |
assume ?lhs |
630 |
then show ?rhs by auto |
|
36584 | 631 |
next |
632 |
assume H: ?rhs |
|
633 |
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
|
634 |
have "openin U ?t" by (force simp add: openin_Union) |
36584 | 635 |
also have "?t = S" using H by auto |
636 |
finally show "openin U S" . |
|
33175 | 637 |
qed |
638 |
||
49711 | 639 |
|
60420 | 640 |
subsubsection \<open>Closed sets\<close> |
33175 | 641 |
|
642 |
definition "closedin U S \<longleftrightarrow> S \<subseteq> topspace U \<and> openin U (topspace U - S)" |
|
643 |
||
53255 | 644 |
lemma closedin_subset: "closedin U S \<Longrightarrow> S \<subseteq> topspace U" |
645 |
by (metis closedin_def) |
|
646 |
||
647 |
lemma closedin_empty[simp]: "closedin U {}" |
|
648 |
by (simp add: closedin_def) |
|
649 |
||
650 |
lemma closedin_topspace[intro, simp]: "closedin U (topspace U)" |
|
651 |
by (simp add: closedin_def) |
|
652 |
||
33175 | 653 |
lemma closedin_Un[intro]: "closedin U S \<Longrightarrow> closedin U T \<Longrightarrow> closedin U (S \<union> T)" |
654 |
by (auto simp add: Diff_Un closedin_def) |
|
655 |
||
60585 | 656 |
lemma Diff_Inter[intro]: "A - \<Inter>S = \<Union>{A - s|s. s\<in>S}" |
53255 | 657 |
by auto |
658 |
||
63955 | 659 |
lemma closedin_Union: |
660 |
assumes "finite S" "\<And>T. T \<in> S \<Longrightarrow> closedin U T" |
|
661 |
shows "closedin U (\<Union>S)" |
|
662 |
using assms by induction auto |
|
663 |
||
53255 | 664 |
lemma closedin_Inter[intro]: |
665 |
assumes Ke: "K \<noteq> {}" |
|
62131
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
666 |
and Kc: "\<And>S. S \<in>K \<Longrightarrow> closedin U S" |
60585 | 667 |
shows "closedin U (\<Inter>K)" |
53255 | 668 |
using Ke Kc unfolding closedin_def Diff_Inter by auto |
33175 | 669 |
|
62131
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
670 |
lemma closedin_INT[intro]: |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
671 |
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
|
672 |
shows "closedin U (\<Inter>x\<in>A. B x)" |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
673 |
apply (rule closedin_Inter) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
674 |
using assms |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
675 |
apply auto |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
676 |
done |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
677 |
|
33175 | 678 |
lemma closedin_Int[intro]: "closedin U S \<Longrightarrow> closedin U T \<Longrightarrow> closedin U (S \<inter> T)" |
679 |
using closedin_Inter[of "{S,T}" U] by auto |
|
680 |
||
681 |
lemma openin_closedin_eq: "openin U S \<longleftrightarrow> S \<subseteq> topspace U \<and> closedin U (topspace U - S)" |
|
682 |
apply (auto simp add: closedin_def Diff_Diff_Int inf_absorb2) |
|
683 |
apply (metis openin_subset subset_eq) |
|
684 |
done |
|
685 |
||
53255 | 686 |
lemma openin_closedin: "S \<subseteq> topspace U \<Longrightarrow> (openin U S \<longleftrightarrow> closedin U (topspace U - S))" |
33175 | 687 |
by (simp add: openin_closedin_eq) |
688 |
||
53255 | 689 |
lemma openin_diff[intro]: |
690 |
assumes oS: "openin U S" |
|
691 |
and cT: "closedin U T" |
|
692 |
shows "openin U (S - T)" |
|
693 |
proof - |
|
33175 | 694 |
have "S - T = S \<inter> (topspace U - T)" using openin_subset[of U S] oS cT |
695 |
by (auto simp add: topspace_def openin_subset) |
|
53282 | 696 |
then show ?thesis using oS cT |
697 |
by (auto simp add: closedin_def) |
|
33175 | 698 |
qed |
699 |
||
53255 | 700 |
lemma closedin_diff[intro]: |
701 |
assumes oS: "closedin U S" |
|
702 |
and cT: "openin U T" |
|
703 |
shows "closedin U (S - T)" |
|
704 |
proof - |
|
705 |
have "S - T = S \<inter> (topspace U - T)" |
|
53282 | 706 |
using closedin_subset[of U S] oS cT by (auto simp add: topspace_def) |
53255 | 707 |
then show ?thesis |
708 |
using oS cT by (auto simp add: openin_closedin_eq) |
|
709 |
qed |
|
710 |
||
33175 | 711 |
|
60420 | 712 |
subsubsection \<open>Subspace topology\<close> |
44170
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
713 |
|
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
714 |
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
|
715 |
|
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
716 |
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
|
717 |
(is "istopology ?L") |
53255 | 718 |
proof - |
44170
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
719 |
have "?L {}" by blast |
53255 | 720 |
{ |
721 |
fix A B |
|
722 |
assume A: "?L A" and B: "?L B" |
|
723 |
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" |
|
724 |
by blast |
|
725 |
have "A \<inter> B = (Sa \<inter> Sb) \<inter> V" "openin U (Sa \<inter> Sb)" |
|
726 |
using Sa Sb by blast+ |
|
727 |
then have "?L (A \<inter> B)" by blast |
|
728 |
} |
|
33175 | 729 |
moreover |
53255 | 730 |
{ |
53282 | 731 |
fix K |
732 |
assume K: "K \<subseteq> Collect ?L" |
|
44170
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
733 |
have th0: "Collect ?L = (\<lambda>S. S \<inter> V) ` Collect (openin U)" |
55775 | 734 |
by blast |
33175 | 735 |
from K[unfolded th0 subset_image_iff] |
53255 | 736 |
obtain Sk where Sk: "Sk \<subseteq> Collect (openin U)" "K = (\<lambda>S. S \<inter> V) ` Sk" |
737 |
by blast |
|
738 |
have "\<Union>K = (\<Union>Sk) \<inter> V" |
|
739 |
using Sk by auto |
|
60585 | 740 |
moreover have "openin U (\<Union>Sk)" |
53255 | 741 |
using Sk by (auto simp add: subset_eq) |
742 |
ultimately have "?L (\<Union>K)" by blast |
|
743 |
} |
|
44170
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
744 |
ultimately show ?thesis |
62343
24106dc44def
prefer abbreviations for compound operators INFIMUM and SUPREMUM
haftmann
parents:
62131
diff
changeset
|
745 |
unfolding subset_eq mem_Collect_eq istopology_def by auto |
33175 | 746 |
qed |
747 |
||
53255 | 748 |
lemma openin_subtopology: "openin (subtopology U V) S \<longleftrightarrow> (\<exists>T. openin U T \<and> S = T \<inter> V)" |
33175 | 749 |
unfolding subtopology_def topology_inverse'[OF istopology_subtopology] |
44170
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
750 |
by auto |
33175 | 751 |
|
53255 | 752 |
lemma topspace_subtopology: "topspace (subtopology U V) = topspace U \<inter> V" |
33175 | 753 |
by (auto simp add: topspace_def openin_subtopology) |
754 |
||
53255 | 755 |
lemma closedin_subtopology: "closedin (subtopology U V) S \<longleftrightarrow> (\<exists>T. closedin U T \<and> S = T \<inter> V)" |
33175 | 756 |
unfolding closedin_def topspace_subtopology |
55775 | 757 |
by (auto simp add: openin_subtopology) |
33175 | 758 |
|
759 |
lemma openin_subtopology_refl: "openin (subtopology U V) V \<longleftrightarrow> V \<subseteq> topspace U" |
|
760 |
unfolding openin_subtopology |
|
55775 | 761 |
by auto (metis IntD1 in_mono openin_subset) |
49711 | 762 |
|
763 |
lemma subtopology_superset: |
|
764 |
assumes UV: "topspace U \<subseteq> V" |
|
33175 | 765 |
shows "subtopology U V = U" |
53255 | 766 |
proof - |
767 |
{ |
|
768 |
fix S |
|
769 |
{ |
|
770 |
fix T |
|
771 |
assume T: "openin U T" "S = T \<inter> V" |
|
772 |
from T openin_subset[OF T(1)] UV have eq: "S = T" |
|
773 |
by blast |
|
774 |
have "openin U S" |
|
775 |
unfolding eq using T by blast |
|
776 |
} |
|
33175 | 777 |
moreover |
53255 | 778 |
{ |
779 |
assume S: "openin U S" |
|
780 |
then have "\<exists>T. openin U T \<and> S = T \<inter> V" |
|
781 |
using openin_subset[OF S] UV by auto |
|
782 |
} |
|
783 |
ultimately have "(\<exists>T. openin U T \<and> S = T \<inter> V) \<longleftrightarrow> openin U S" |
|
784 |
by blast |
|
785 |
} |
|
786 |
then show ?thesis |
|
787 |
unfolding topology_eq openin_subtopology by blast |
|
33175 | 788 |
qed |
789 |
||
790 |
lemma subtopology_topspace[simp]: "subtopology U (topspace U) = U" |
|
791 |
by (simp add: subtopology_superset) |
|
792 |
||
793 |
lemma subtopology_UNIV[simp]: "subtopology U UNIV = U" |
|
794 |
by (simp add: subtopology_superset) |
|
795 |
||
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
796 |
lemma openin_subtopology_empty: |
64758
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
797 |
"openin (subtopology U {}) S \<longleftrightarrow> S = {}" |
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
798 |
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
|
799 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
800 |
lemma closedin_subtopology_empty: |
64758
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
801 |
"closedin (subtopology U {}) S \<longleftrightarrow> S = {}" |
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
802 |
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
|
803 |
|
64758
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
804 |
lemma closedin_subtopology_refl [simp]: |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
805 |
"closedin (subtopology U X) X \<longleftrightarrow> X \<subseteq> topspace U" |
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
806 |
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
|
807 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
808 |
lemma openin_imp_subset: |
64758
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
809 |
"openin (subtopology U S) T \<Longrightarrow> T \<subseteq> S" |
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
810 |
by (metis Int_iff openin_subtopology subsetI) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
811 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
812 |
lemma closedin_imp_subset: |
64758
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
813 |
"closedin (subtopology U S) T \<Longrightarrow> T \<subseteq> S" |
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
814 |
by (simp add: closedin_def topspace_subtopology) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
815 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
816 |
lemma openin_subtopology_Un: |
64758
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
817 |
"openin (subtopology U T) S \<and> openin (subtopology U u) S |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
818 |
\<Longrightarrow> openin (subtopology U (T \<union> u)) S" |
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
819 |
by (simp add: openin_subtopology) blast |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
820 |
|
53255 | 821 |
|
60420 | 822 |
subsubsection \<open>The standard Euclidean topology\<close> |
33175 | 823 |
|
53255 | 824 |
definition euclidean :: "'a::topological_space topology" |
825 |
where "euclidean = topology open" |
|
33175 | 826 |
|
827 |
lemma open_openin: "open S \<longleftrightarrow> openin euclidean S" |
|
828 |
unfolding euclidean_def |
|
829 |
apply (rule cong[where x=S and y=S]) |
|
830 |
apply (rule topology_inverse[symmetric]) |
|
831 |
apply (auto simp add: istopology_def) |
|
44170
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
832 |
done |
33175 | 833 |
|
64122 | 834 |
declare open_openin [symmetric, simp] |
835 |
||
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
836 |
lemma topspace_euclidean [simp]: "topspace euclidean = UNIV" |
64122 | 837 |
by (force simp add: topspace_def) |
33175 | 838 |
|
839 |
lemma topspace_euclidean_subtopology[simp]: "topspace (subtopology euclidean S) = S" |
|
64122 | 840 |
by (simp add: topspace_subtopology) |
33175 | 841 |
|
842 |
lemma closed_closedin: "closed S \<longleftrightarrow> closedin euclidean S" |
|
64122 | 843 |
by (simp add: closed_def closedin_def Compl_eq_Diff_UNIV) |
33175 | 844 |
|
845 |
lemma open_subopen: "open S \<longleftrightarrow> (\<forall>x\<in>S. \<exists>T. open T \<and> x \<in> T \<and> T \<subseteq> S)" |
|
64122 | 846 |
using openI by auto |
33175 | 847 |
|
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
848 |
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
|
849 |
by (metis openin_topspace topspace_euclidean_subtopology) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
850 |
|
60420 | 851 |
text \<open>Basic "localization" results are handy for connectedness.\<close> |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
852 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
853 |
lemma openin_open: "openin (subtopology euclidean U) S \<longleftrightarrow> (\<exists>T. open T \<and> (S = U \<inter> T))" |
64122 | 854 |
by (auto simp add: openin_subtopology) |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
855 |
|
63305
3b6975875633
Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents:
63301
diff
changeset
|
856 |
lemma openin_Int_open: |
3b6975875633
Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents:
63301
diff
changeset
|
857 |
"\<lbrakk>openin (subtopology euclidean U) S; open T\<rbrakk> |
3b6975875633
Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents:
63301
diff
changeset
|
858 |
\<Longrightarrow> openin (subtopology euclidean U) (S \<inter> T)" |
3b6975875633
Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents:
63301
diff
changeset
|
859 |
by (metis open_Int Int_assoc openin_open) |
3b6975875633
Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents:
63301
diff
changeset
|
860 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
861 |
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
|
862 |
by (auto simp add: openin_open) |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
863 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
864 |
lemma open_openin_trans[trans]: |
53255 | 865 |
"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
|
866 |
by (metis Int_absorb1 openin_open_Int) |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
867 |
|
53255 | 868 |
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
|
869 |
by (auto simp add: openin_open) |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
870 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
871 |
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
|
872 |
by (simp add: closedin_subtopology closed_closedin Int_ac) |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
873 |
|
53291 | 874 |
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
|
875 |
by (metis closedin_closed) |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
876 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
877 |
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
|
878 |
by (auto simp add: closedin_closed) |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
879 |
|
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
880 |
lemma finite_imp_closedin: |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
881 |
fixes S :: "'a::t1_space set" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
882 |
shows "\<lbrakk>finite S; S \<subseteq> T\<rbrakk> \<Longrightarrow> closedin (subtopology euclidean T) S" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
883 |
by (simp add: finite_imp_closed closed_subset) |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
884 |
|
63305
3b6975875633
Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents:
63301
diff
changeset
|
885 |
lemma closedin_singleton [simp]: |
3b6975875633
Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents:
63301
diff
changeset
|
886 |
fixes a :: "'a::t1_space" |
3b6975875633
Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents:
63301
diff
changeset
|
887 |
shows "closedin (subtopology euclidean U) {a} \<longleftrightarrow> a \<in> U" |
3b6975875633
Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents:
63301
diff
changeset
|
888 |
using closedin_subset by (force intro: closed_subset) |
3b6975875633
Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents:
63301
diff
changeset
|
889 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
890 |
lemma openin_euclidean_subtopology_iff: |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
891 |
fixes S U :: "'a::metric_space set" |
53255 | 892 |
shows "openin (subtopology euclidean U) S \<longleftrightarrow> |
893 |
S \<subseteq> U \<and> (\<forall>x\<in>S. \<exists>e>0. \<forall>x'\<in>U. dist x' x < e \<longrightarrow> x'\<in> S)" |
|
894 |
(is "?lhs \<longleftrightarrow> ?rhs") |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
895 |
proof |
53255 | 896 |
assume ?lhs |
53282 | 897 |
then show ?rhs |
898 |
unfolding openin_open open_dist by blast |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
899 |
next |
63040 | 900 |
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
|
901 |
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
|
902 |
unfolding T_def |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
903 |
apply clarsimp |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
904 |
apply (rule_tac x="d - dist x a" in exI) |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
905 |
apply (clarsimp simp add: less_diff_eq) |
55775 | 906 |
by (metis dist_commute dist_triangle_lt) |
53282 | 907 |
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
|
908 |
unfolding T_def |
55775 | 909 |
by auto (metis dist_self) |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
910 |
from 1 2 show ?lhs |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
911 |
unfolding openin_open open_dist by fast |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
912 |
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
|
913 |
|
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
|
914 |
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
|
915 |
"connected s \<longleftrightarrow> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
916 |
~(\<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
|
917 |
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
|
918 |
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
|
919 |
apply (simp add: connected_def openin_open, safe) |
63988 | 920 |
apply (simp_all, blast+) (* SLOW *) |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
921 |
done |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
922 |
|
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
|
923 |
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
|
924 |
"connected s \<longleftrightarrow> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
925 |
~(\<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
|
926 |
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
|
927 |
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
|
928 |
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
|
929 |
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
|
930 |
apply blast |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
931 |
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
|
932 |
|
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
|
933 |
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
|
934 |
"connected s \<longleftrightarrow> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
935 |
~(\<exists>e1 e2. |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
936 |
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
|
937 |
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
|
938 |
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
|
939 |
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
|
940 |
proof - |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
941 |
{ 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
|
942 |
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
|
943 |
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
|
944 |
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
|
945 |
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
|
946 |
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
|
947 |
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
|
948 |
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
|
949 |
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
|
950 |
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
|
951 |
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
|
952 |
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
|
953 |
then have False |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
954 |
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
|
955 |
} note * = this |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
956 |
show ?thesis |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
957 |
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
|
958 |
apply (safe; simp) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
959 |
apply blast |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
960 |
apply (blast intro: *) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
961 |
done |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
962 |
qed |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
963 |
|
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
|
964 |
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
|
965 |
"connected s \<longleftrightarrow> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
966 |
~(\<exists>e1 e2. |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
967 |
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
|
968 |
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
|
969 |
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
|
970 |
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
|
971 |
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
|
972 |
apply blast |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
973 |
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
|
974 |
|
60420 | 975 |
text \<open>These "transitivity" results are handy too\<close> |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
976 |
|
53255 | 977 |
lemma openin_trans[trans]: |
978 |
"openin (subtopology euclidean T) S \<Longrightarrow> openin (subtopology euclidean U) T \<Longrightarrow> |
|
979 |
openin (subtopology euclidean U) S" |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
980 |
unfolding open_openin openin_open by blast |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
981 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
982 |
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
|
983 |
by (auto simp add: openin_open intro: openin_trans) |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
984 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
985 |
lemma closedin_trans[trans]: |
53255 | 986 |
"closedin (subtopology euclidean T) S \<Longrightarrow> closedin (subtopology euclidean U) T \<Longrightarrow> |
987 |
closedin (subtopology euclidean U) S" |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
988 |
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
|
989 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
990 |
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
|
991 |
by (auto simp add: closedin_closed intro: closedin_trans) |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
992 |
|
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
|
993 |
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
|
994 |
"\<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
|
995 |
by (auto simp: openin_subtopology) |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
996 |
|
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
997 |
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
|
998 |
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
|
999 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
1000 |
|
60420 | 1001 |
subsection \<open>Open and closed balls\<close> |
33175 | 1002 |
|
53255 | 1003 |
definition ball :: "'a::metric_space \<Rightarrow> real \<Rightarrow> 'a set" |
1004 |
where "ball x e = {y. dist x y < e}" |
|
1005 |
||
1006 |
definition cball :: "'a::metric_space \<Rightarrow> real \<Rightarrow> 'a set" |
|
1007 |
where "cball x e = {y. dist x y \<le> e}" |
|
33175 | 1008 |
|
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
|
1009 |
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
|
1010 |
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
|
1011 |
|
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
|
1012 |
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
|
1013 |
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
|
1014 |
|
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
|
1015 |
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
|
1016 |
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
|
1017 |
|
61848 | 1018 |
lemma mem_sphere [simp]: "y \<in> sphere x e \<longleftrightarrow> dist x y = e" |
1019 |
by (simp add: sphere_def) |
|
1020 |
||
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1021 |
lemma ball_trivial [simp]: "ball x 0 = {}" |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1022 |
by (simp add: ball_def) |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1023 |
|
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1024 |
lemma cball_trivial [simp]: "cball x 0 = {x}" |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1025 |
by (simp add: cball_def) |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1026 |
|
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63332
diff
changeset
|
1027 |
lemma sphere_trivial [simp]: "sphere x 0 = {x}" |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63332
diff
changeset
|
1028 |
by (simp add: sphere_def) |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63332
diff
changeset
|
1029 |
|
64539 | 1030 |
lemma mem_ball_0 [simp]: "x \<in> ball 0 e \<longleftrightarrow> norm x < e" |
1031 |
for x :: "'a::real_normed_vector" |
|
33175 | 1032 |
by (simp add: dist_norm) |
1033 |
||
64539 | 1034 |
lemma mem_cball_0 [simp]: "x \<in> cball 0 e \<longleftrightarrow> norm x \<le> e" |
1035 |
for x :: "'a::real_normed_vector" |
|
33175 | 1036 |
by (simp add: dist_norm) |
1037 |
||
64539 | 1038 |
lemma disjoint_ballI: "dist x y \<ge> r+s \<Longrightarrow> ball x r \<inter> ball y s = {}" |
64287 | 1039 |
using dist_triangle_less_add not_le by fastforce |
1040 |
||
64539 | 1041 |
lemma disjoint_cballI: "dist x y > r + s \<Longrightarrow> cball x r \<inter> cball y s = {}" |
64287 | 1042 |
by (metis add_mono disjoint_iff_not_equal dist_triangle2 dual_order.trans leD mem_cball) |
1043 |
||
64539 | 1044 |
lemma mem_sphere_0 [simp]: "x \<in> sphere 0 e \<longleftrightarrow> norm x = e" |
1045 |
for x :: "'a::real_normed_vector" |
|
63114
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1046 |
by (simp add: dist_norm) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1047 |
|
64539 | 1048 |
lemma sphere_empty [simp]: "r < 0 \<Longrightarrow> sphere a r = {}" |
1049 |
for a :: "'a::metric_space" |
|
1050 |
by auto |
|
63881
b746b19197bd
lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents:
63627
diff
changeset
|
1051 |
|
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1052 |
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
|
1053 |
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
|
1054 |
|
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1055 |
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
|
1056 |
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
|
1057 |
|
64539 | 1058 |
lemma ball_subset_cball [simp, intro]: "ball x e \<subseteq> cball x e" |
53255 | 1059 |
by (simp add: subset_eq) |
1060 |
||
61907
f0c894ab18c9
Liouville theorem, Fundamental Theorem of Algebra, etc.
paulson <lp15@cam.ac.uk>
parents:
61880
diff
changeset
|
1061 |
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
|
1062 |
by force |
f0c894ab18c9
Liouville theorem, Fundamental Theorem of Algebra, etc.
paulson <lp15@cam.ac.uk>
parents:
61880
diff
changeset
|
1063 |
|
64758
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
1064 |
lemma cball_diff_sphere: "cball a r - sphere a r = ball a r" |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
1065 |
by auto |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
1066 |
|
53282 | 1067 |
lemma subset_ball[intro]: "d \<le> e \<Longrightarrow> ball x d \<subseteq> ball x e" |
53255 | 1068 |
by (simp add: subset_eq) |
1069 |
||
53282 | 1070 |
lemma subset_cball[intro]: "d \<le> e \<Longrightarrow> cball x d \<subseteq> cball x e" |
53255 | 1071 |
by (simp add: subset_eq) |
1072 |
||
33175 | 1073 |
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
|
1074 |
by (simp add: set_eq_iff) arith |
33175 | 1075 |
|
1076 |
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
|
1077 |
by (simp add: set_eq_iff) |
33175 | 1078 |
|
64758
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
1079 |
lemma cball_max_Un: "cball a (max r s) = cball a r \<union> cball a s" |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
1080 |
by (simp add: set_eq_iff) arith |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
1081 |
|
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
1082 |
lemma cball_min_Int: "cball a (min r s) = cball a r \<inter> cball a s" |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
1083 |
by (simp add: set_eq_iff) |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
1084 |
|
61426
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
1085 |
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
|
1086 |
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
|
1087 |
|
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
1088 |
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
|
1089 |
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
|
1090 |
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
|
1091 |
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
|
1092 |
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
|
1093 |
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
|
1094 |
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
|
1095 |
done |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
1096 |
|
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
1097 |
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
|
1098 |
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
|
1099 |
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
|
1100 |
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
|
1101 |
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
|
1102 |
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
|
1103 |
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
|
1104 |
done |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
1105 |
|
54070 | 1106 |
lemma open_ball [intro, simp]: "open (ball x e)" |
1107 |
proof - |
|
1108 |
have "open (dist x -` {..<e})" |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
1109 |
by (intro open_vimage open_lessThan continuous_intros) |
54070 | 1110 |
also have "dist x -` {..<e} = ball x e" |
1111 |
by auto |
|
1112 |
finally show ?thesis . |
|
1113 |
qed |
|
33175 | 1114 |
|
1115 |
lemma open_contains_ball: "open S \<longleftrightarrow> (\<forall>x\<in>S. \<exists>e>0. ball x e \<subseteq> S)" |
|
63170 | 1116 |
by (simp add: open_dist subset_eq mem_ball Ball_def dist_commute) |
33175 | 1117 |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
1118 |
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
|
1119 |
by (auto simp: open_contains_ball) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
1120 |
|
33714
eb2574ac4173
Added new lemmas to Euclidean Space by Robert Himmelmann
hoelzl
parents:
33324
diff
changeset
|
1121 |
lemma openE[elim?]: |
53282 | 1122 |
assumes "open S" "x\<in>S" |
33714
eb2574ac4173
Added new lemmas to Euclidean Space by Robert Himmelmann
hoelzl
parents:
33324
diff
changeset
|
1123 |
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
|
1124 |
using assms unfolding open_contains_ball by auto |
eb2574ac4173
Added new lemmas to Euclidean Space by Robert Himmelmann
hoelzl
parents:
33324
diff
changeset
|
1125 |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
1126 |
lemma open_contains_ball_eq: "open S \<Longrightarrow> x\<in>S \<longleftrightarrow> (\<exists>e>0. ball x e \<subseteq> S)" |
33175 | 1127 |
by (metis open_contains_ball subset_eq centre_in_ball) |
1128 |
||
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
|
1129 |
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
|
1130 |
"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
|
1131 |
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
|
1132 |
(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
|
1133 |
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
|
1134 |
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
|
1135 |
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
|
1136 |
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
|
1137 |
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
|
1138 |
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
|
1139 |
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
|
1140 |
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
|
1141 |
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
|
1142 |
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
|
1143 |
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
|
1144 |
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
|
1145 |
|
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
1146 |
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
|
1147 |
"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
|
1148 |
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
|
1149 |
(\<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
|
1150 |
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
|
1151 |
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
|
1152 |
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
|
1153 |
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
|
1154 |
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
|
1155 |
done |
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
1156 |
|
33175 | 1157 |
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
|
1158 |
unfolding mem_ball set_eq_iff |
33175 | 1159 |
apply (simp add: not_less) |
52624 | 1160 |
apply (metis zero_le_dist order_trans dist_self) |
1161 |
done |
|
33175 | 1162 |
|
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
|
1163 |
lemma ball_empty: "e \<le> 0 \<Longrightarrow> ball x e = {}" by simp |
33175 | 1164 |
|
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
|
1165 |
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
|
1166 |
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
|
1167 |
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
|
1168 |
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
|
1169 |
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
|
1170 |
|
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1171 |
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
|
1172 |
by (rule eventually_nhds_in_open) simp_all |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1173 |
|
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1174 |
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
|
1175 |
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
|
1176 |
|
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1177 |
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
|
1178 |
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
|
1179 |
|
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1180 |
|
60420 | 1181 |
subsection \<open>Boxes\<close> |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1182 |
|
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
1183 |
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
|
1184 |
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
|
1185 |
|
63114
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1186 |
lemma One_non_0: assumes "One = (0::'a::euclidean_space)" shows False |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1187 |
proof - |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1188 |
have "dependent (Basis :: 'a set)" |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1189 |
apply (simp add: dependent_finite) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1190 |
apply (rule_tac x="\<lambda>i. 1" in exI) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1191 |
using SOME_Basis apply (auto simp: assms) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1192 |
done |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1193 |
with independent_Basis show False by force |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1194 |
qed |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1195 |
|
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1196 |
corollary One_neq_0[iff]: "One \<noteq> 0" |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1197 |
by (metis One_non_0) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1198 |
|
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1199 |
corollary Zero_neq_One[iff]: "0 \<noteq> One" |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1200 |
by (metis One_non_0) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1201 |
|
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54489
diff
changeset
|
1202 |
definition (in euclidean_space) eucl_less (infix "<e" 50) |
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54489
diff
changeset
|
1203 |
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
|
1204 |
|
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54489
diff
changeset
|
1205 |
definition box_eucl_less: "box a b = {x. a <e x \<and> x <e b}" |
56188 | 1206 |
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
|
1207 |
|
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54489
diff
changeset
|
1208 |
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
|
1209 |
and in_box_eucl_less: "x \<in> box a b \<longleftrightarrow> a <e x \<and> x <e b" |
56188 | 1210 |
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)" |
1211 |
"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)" |
|
1212 |
by (auto simp: box_eucl_less eucl_less_def cbox_def) |
|
1213 |
||
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1214 |
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
|
1215 |
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
|
1216 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1217 |
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
|
1218 |
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
|
1219 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1220 |
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
|
1221 |
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
|
1222 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1223 |
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
|
1224 |
by auto |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1225 |
|
56188 | 1226 |
lemma mem_box_real[simp]: |
1227 |
"(x::real) \<in> box a b \<longleftrightarrow> a < x \<and> x < b" |
|
1228 |
"(x::real) \<in> cbox a b \<longleftrightarrow> a \<le> x \<and> x \<le> b" |
|
1229 |
by (auto simp: mem_box) |
|
1230 |
||
1231 |
lemma box_real[simp]: |
|
1232 |
fixes a b:: real |
|
1233 |
shows "box a b = {a <..< b}" "cbox a b = {a .. b}" |
|
1234 |
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
|
1235 |
|
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
1236 |
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
|
1237 |
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
|
1238 |
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
|
1239 |
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
|
1240 |
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
|
1241 |
|
50087 | 1242 |
lemma rational_boxes: |
61076 | 1243 |
fixes x :: "'a::euclidean_space" |
53291 | 1244 |
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
|
1245 |
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 | 1246 |
proof - |
63040 | 1247 |
define e' where "e' = e / (2 * sqrt (real (DIM ('a))))" |
53291 | 1248 |
then have e: "e' > 0" |
56541 | 1249 |
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
|
1250 |
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 | 1251 |
proof |
53255 | 1252 |
fix i |
1253 |
from Rats_dense_in_real[of "x \<bullet> i - e'" "x \<bullet> i"] e |
|
1254 |
show "?th i" by auto |
|
50087 | 1255 |
qed |
55522 | 1256 |
from choice[OF this] obtain a where |
1257 |
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
|
1258 |
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 | 1259 |
proof |
53255 | 1260 |
fix i |
1261 |
from Rats_dense_in_real[of "x \<bullet> i" "x \<bullet> i + e'"] e |
|
1262 |
show "?th i" by auto |
|
50087 | 1263 |
qed |
55522 | 1264 |
from choice[OF this] obtain b where |
1265 |
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
|
1266 |
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
|
1267 |
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
|
1268 |
proof (rule exI[of _ ?a], rule exI[of _ ?b], safe) |
53255 | 1269 |
fix y :: 'a |
1270 |
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
|
1271 |
have "dist x y = sqrt (\<Sum>i\<in>Basis. (dist (x \<bullet> i) (y \<bullet> i))\<^sup>2)" |
50087 | 1272 |
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
|
1273 |
also have "\<dots> < sqrt (\<Sum>(i::'a)\<in>Basis. e^2 / real (DIM('a)))" |
64267 | 1274 |
proof (rule real_sqrt_less_mono, rule sum_strict_mono) |
53255 | 1275 |
fix i :: "'a" |
1276 |
assume i: "i \<in> Basis" |
|
1277 |
have "a i < y\<bullet>i \<and> y\<bullet>i < b i" |
|
1278 |
using * i by (auto simp: box_def) |
|
1279 |
moreover have "a i < x\<bullet>i" "x\<bullet>i - a i < e'" |
|
1280 |
using a by auto |
|
1281 |
moreover have "x\<bullet>i < b i" "b i - x\<bullet>i < e'" |
|
1282 |
using b by auto |
|
1283 |
ultimately have "\<bar>x\<bullet>i - y\<bullet>i\<bar> < 2 * e'" |
|
1284 |
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
|
1285 |
then have "dist (x \<bullet> i) (y \<bullet> i) < e/sqrt (real (DIM('a)))" |
50087 | 1286 |
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
|
1287 |
then have "(dist (x \<bullet> i) (y \<bullet> i))\<^sup>2 < (e/sqrt (real (DIM('a))))\<^sup>2" |
50087 | 1288 |
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
|
1289 |
then show "(dist (x \<bullet> i) (y \<bullet> i))\<^sup>2 < e\<^sup>2 / real DIM('a)" |
50087 | 1290 |
by (simp add: power_divide) |
1291 |
qed auto |
|
53255 | 1292 |
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
|
1293 |
using \<open>0 < e\<close> by simp |
53255 | 1294 |
finally show "y \<in> ball x e" |
1295 |
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
|
1296 |
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
|
1297 |
qed |
51103 | 1298 |
|
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
|
1299 |
lemma open_UNION_box: |
61076 | 1300 |
fixes M :: "'a::euclidean_space set" |
53282 | 1301 |
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
|
1302 |
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
|
1303 |
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
|
1304 |
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
|
1305 |
shows "M = (\<Union>f\<in>I. box (a' f) (b' f))" |
52624 | 1306 |
proof - |
60462 | 1307 |
have "x \<in> (\<Union>f\<in>I. box (a' f) (b' f))" if "x \<in> M" for x |
1308 |
proof - |
|
52624 | 1309 |
obtain e where e: "e > 0" "ball x e \<subseteq> M" |
60420 | 1310 |
using openE[OF \<open>open M\<close> \<open>x \<in> M\<close>] by auto |
53282 | 1311 |
moreover obtain a b where ab: |
1312 |
"x \<in> box a b" |
|
1313 |
"\<forall>i \<in> Basis. a \<bullet> i \<in> \<rat>" |
|
1314 |
"\<forall>i\<in>Basis. b \<bullet> i \<in> \<rat>" |
|
1315 |
"box a b \<subseteq> ball x e" |
|
52624 | 1316 |
using rational_boxes[OF e(1)] by metis |
60462 | 1317 |
ultimately show ?thesis |
52624 | 1318 |
by (intro UN_I[of "\<lambda>i\<in>Basis. (a \<bullet> i, b \<bullet> i)"]) |
1319 |
(auto simp: euclidean_representation I_def a'_def b'_def) |
|
60462 | 1320 |
qed |
52624 | 1321 |
then show ?thesis by (auto simp: I_def) |
1322 |
qed |
|
1323 |
||
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1324 |
lemma box_eq_empty: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1325 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1326 |
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
|
1327 |
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
|
1328 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1329 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1330 |
fix i x |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1331 |
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
|
1332 |
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
|
1333 |
unfolding mem_box by (auto simp: box_def) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1334 |
then have "a\<bullet>i < b\<bullet>i" by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1335 |
then have False using as by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1336 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1337 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1338 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1339 |
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
|
1340 |
let ?x = "(1/2) *\<^sub>R (a + b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1341 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1342 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1343 |
assume i: "i \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1344 |
have "a\<bullet>i < b\<bullet>i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1345 |
using as[THEN bspec[where x=i]] i by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1346 |
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
|
1347 |
by (auto simp: inner_add_left) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1348 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1349 |
then have "box a b \<noteq> {}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1350 |
using mem_box(1)[of "?x" a b] by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1351 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1352 |
ultimately show ?th1 by blast |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1353 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1354 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1355 |
fix i x |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1356 |
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
|
1357 |
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
|
1358 |
unfolding mem_box by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1359 |
then have "a\<bullet>i \<le> b\<bullet>i" by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1360 |
then have False using as by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1361 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1362 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1363 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1364 |
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
|
1365 |
let ?x = "(1/2) *\<^sub>R (a + b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1366 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1367 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1368 |
assume i:"i \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1369 |
have "a\<bullet>i \<le> b\<bullet>i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1370 |
using as[THEN bspec[where x=i]] i by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1371 |
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
|
1372 |
by (auto simp: inner_add_left) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1373 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1374 |
then have "cbox a b \<noteq> {}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1375 |
using mem_box(2)[of "?x" a b] by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1376 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1377 |
ultimately show ?th2 by blast |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1378 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1379 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1380 |
lemma box_ne_empty: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1381 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1382 |
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
|
1383 |
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
|
1384 |
unfolding box_eq_empty[of a b] by fastforce+ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1385 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1386 |
lemma |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1387 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1388 |
shows cbox_sing: "cbox a a = {a}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1389 |
and box_sing: "box a a = {}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1390 |
unfolding set_eq_iff mem_box eq_iff [symmetric] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1391 |
by (auto intro!: euclidean_eqI[where 'a='a]) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1392 |
(metis all_not_in_conv nonempty_Basis) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1393 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1394 |
lemma subset_box_imp: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1395 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1396 |
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
|
1397 |
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
|
1398 |
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
|
1399 |
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
|
1400 |
unfolding subset_eq[unfolded Ball_def] unfolding mem_box |
58757 | 1401 |
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
|
1402 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1403 |
lemma box_subset_cbox: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1404 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1405 |
shows "box a b \<subseteq> cbox a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1406 |
unfolding subset_eq [unfolded Ball_def] mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1407 |
by (fast intro: less_imp_le) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1408 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1409 |
lemma subset_box: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1410 |
fixes a :: "'a::euclidean_space" |
64539 | 1411 |
shows "cbox c d \<subseteq> cbox a b \<longleftrightarrow> (\<forall>i\<in>Basis. c\<bullet>i \<le> d\<bullet>i) \<longrightarrow> (\<forall>i\<in>Basis. a\<bullet>i \<le> c\<bullet>i \<and> d\<bullet>i \<le> b\<bullet>i)" (is ?th1) |
1412 |
and "cbox c d \<subseteq> box a b \<longleftrightarrow> (\<forall>i\<in>Basis. c\<bullet>i \<le> d\<bullet>i) \<longrightarrow> (\<forall>i\<in>Basis. a\<bullet>i < c\<bullet>i \<and> d\<bullet>i < b\<bullet>i)" (is ?th2) |
|
1413 |
and "box c d \<subseteq> cbox a b \<longleftrightarrow> (\<forall>i\<in>Basis. c\<bullet>i < d\<bullet>i) \<longrightarrow> (\<forall>i\<in>Basis. a\<bullet>i \<le> c\<bullet>i \<and> d\<bullet>i \<le> b\<bullet>i)" (is ?th3) |
|
1414 |
and "box c d \<subseteq> box a b \<longleftrightarrow> (\<forall>i\<in>Basis. c\<bullet>i < d\<bullet>i) \<longrightarrow> (\<forall>i\<in>Basis. a\<bullet>i \<le> c\<bullet>i \<and> d\<bullet>i \<le> b\<bullet>i)" (is ?th4) |
|
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1415 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1416 |
show ?th1 |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1417 |
unfolding subset_eq and Ball_def and mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1418 |
by (auto intro: order_trans) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1419 |
show ?th2 |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1420 |
unfolding subset_eq and Ball_def and mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1421 |
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
|
1422 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1423 |
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
|
1424 |
then have "box c d \<noteq> {}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1425 |
unfolding box_eq_empty by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1426 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1427 |
assume i: "i \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1428 |
(** 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
|
1429 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1430 |
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
|
1431 |
assume as2: "a\<bullet>i > c\<bullet>i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1432 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1433 |
fix j :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1434 |
assume j: "j \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1435 |
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
|
1436 |
apply (cases "j = i") |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1437 |
using as(2)[THEN bspec[where x=j]] i |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1438 |
apply (auto simp add: as2) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1439 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1440 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1441 |
then have "?x\<in>box c d" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1442 |
using i unfolding mem_box by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1443 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1444 |
have "?x \<notin> cbox a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1445 |
unfolding mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1446 |
apply auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1447 |
apply (rule_tac x=i in bexI) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1448 |
using as(2)[THEN bspec[where x=i]] and as2 i |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1449 |
apply auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1450 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1451 |
ultimately have False using as by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1452 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1453 |
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
|
1454 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1455 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1456 |
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
|
1457 |
assume as2: "b\<bullet>i < d\<bullet>i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1458 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1459 |
fix j :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1460 |
assume "j\<in>Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1461 |
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
|
1462 |
apply (cases "j = i") |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1463 |
using as(2)[THEN bspec[where x=j]] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1464 |
apply (auto simp add: as2) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1465 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1466 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1467 |
then have "?x\<in>box c d" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1468 |
unfolding mem_box by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1469 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1470 |
have "?x\<notin>cbox a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1471 |
unfolding mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1472 |
apply auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1473 |
apply (rule_tac x=i in bexI) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1474 |
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
|
1475 |
apply auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1476 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1477 |
ultimately have False using as by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1478 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1479 |
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
|
1480 |
ultimately |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1481 |
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
|
1482 |
} note part1 = this |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1483 |
show ?th3 |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1484 |
unfolding subset_eq and Ball_def and mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1485 |
apply (rule, rule, rule, rule) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1486 |
apply (rule part1) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1487 |
unfolding subset_eq and Ball_def and mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1488 |
prefer 4 |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1489 |
apply auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1490 |
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
|
1491 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1492 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1493 |
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
|
1494 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1495 |
assume i:"i\<in>Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1496 |
from as(1) have "box c d \<subseteq> cbox a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1497 |
using box_subset_cbox[of a b] by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1498 |
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
|
1499 |
using part1 and as(2) using i by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1500 |
} note * = this |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1501 |
show ?th4 |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1502 |
unfolding subset_eq and Ball_def and mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1503 |
apply (rule, rule, rule, rule) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1504 |
apply (rule *) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1505 |
unfolding subset_eq and Ball_def and mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1506 |
prefer 4 |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1507 |
apply auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1508 |
apply (erule_tac x=xa in allE, simp)+ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1509 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1510 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1511 |
|
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1512 |
lemma eq_cbox: "cbox a b = cbox c d \<longleftrightarrow> cbox a b = {} \<and> cbox c d = {} \<or> a = c \<and> b = d" |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1513 |
(is "?lhs = ?rhs") |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1514 |
proof |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1515 |
assume ?lhs |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1516 |
then have "cbox a b \<subseteq> cbox c d" "cbox c d \<subseteq> cbox a b" |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1517 |
by auto |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1518 |
then show ?rhs |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1519 |
by (force simp add: subset_box box_eq_empty intro: antisym euclidean_eqI) |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1520 |
next |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1521 |
assume ?rhs |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1522 |
then show ?lhs |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1523 |
by force |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1524 |
qed |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1525 |
|
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1526 |
lemma eq_cbox_box [simp]: "cbox a b = box c d \<longleftrightarrow> cbox a b = {} \<and> box c d = {}" |
64539 | 1527 |
(is "?lhs \<longleftrightarrow> ?rhs") |
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1528 |
proof |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1529 |
assume ?lhs |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1530 |
then have "cbox a b \<subseteq> box c d" "box c d \<subseteq>cbox a b" |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1531 |
by auto |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1532 |
then show ?rhs |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
1533 |
apply (simp add: subset_box) |
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1534 |
using \<open>cbox a b = box c d\<close> box_ne_empty box_sing |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1535 |
apply (fastforce simp add:) |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1536 |
done |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1537 |
next |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1538 |
assume ?rhs |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1539 |
then show ?lhs |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1540 |
by force |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1541 |
qed |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1542 |
|
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1543 |
lemma eq_box_cbox [simp]: "box a b = cbox c d \<longleftrightarrow> box a b = {} \<and> cbox c d = {}" |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1544 |
by (metis eq_cbox_box) |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1545 |
|
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1546 |
lemma eq_box: "box a b = box c d \<longleftrightarrow> box a b = {} \<and> box c d = {} \<or> a = c \<and> b = d" |
64539 | 1547 |
(is "?lhs \<longleftrightarrow> ?rhs") |
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1548 |
proof |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1549 |
assume ?lhs |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1550 |
then have "box a b \<subseteq> box c d" "box c d \<subseteq> box a b" |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1551 |
by auto |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1552 |
then show ?rhs |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1553 |
apply (simp add: subset_box) |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
1554 |
using box_ne_empty(2) \<open>box a b = box c d\<close> |
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1555 |
apply auto |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1556 |
apply (meson euclidean_eqI less_eq_real_def not_less)+ |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1557 |
done |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1558 |
next |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1559 |
assume ?rhs |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1560 |
then show ?lhs |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1561 |
by force |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1562 |
qed |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1563 |
|
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1564 |
lemma Int_interval: |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1565 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1566 |
shows "cbox a b \<inter> cbox c d = |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1567 |
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
|
1568 |
unfolding set_eq_iff and Int_iff and mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1569 |
by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1570 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1571 |
lemma disjoint_interval: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1572 |
fixes a::"'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1573 |
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
|
1574 |
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
|
1575 |
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
|
1576 |
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
|
1577 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1578 |
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
|
1579 |
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
|
1580 |
(\<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
|
1581 |
by blast |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1582 |
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
|
1583 |
show ?th1 unfolding * by (intro **) auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1584 |
show ?th2 unfolding * by (intro **) auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1585 |
show ?th3 unfolding * by (intro **) auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1586 |
show ?th4 unfolding * by (intro **) auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1587 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1588 |
|
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
1589 |
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
|
1590 |
proof - |
61942 | 1591 |
have "\<bar>x \<bullet> b\<bar> < real_of_int (\<lceil>Max ((\<lambda>b. \<bar>x \<bullet> b\<bar>)`Basis)\<rceil> + 1)" |
60462 | 1592 |
if [simp]: "b \<in> Basis" for x b :: 'a |
1593 |
proof - |
|
61942 | 1594 |
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
|
1595 |
by (rule le_of_int_ceiling) |
61942 | 1596 |
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
|
1597 |
by (auto intro!: ceiling_mono) |
61942 | 1598 |
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
|
1599 |
by simp |
60462 | 1600 |
finally show ?thesis . |
1601 |
qed |
|
1602 |
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
|
1603 |
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
|
1604 |
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
|
1605 |
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
|
1606 |
ultimately show ?thesis |
64267 | 1607 |
by (auto simp: box_def inner_sum_left inner_Basis sum.If_cases) |
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
1608 |
qed |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
1609 |
|
60420 | 1610 |
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
|
1611 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1612 |
definition "is_interval (s::('a::euclidean_space) set) \<longleftrightarrow> |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1613 |
(\<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
|
1614 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1615 |
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
|
1616 |
and is_interval_box: "is_interval (box a b)" (is ?th2) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1617 |
unfolding is_interval_def mem_box Ball_def atLeastAtMost_iff |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1618 |
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
|
1619 |
|
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
|
1620 |
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
|
1621 |
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
|
1622 |
|
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
|
1623 |
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
|
1624 |
unfolding is_interval_def by simp |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1625 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1626 |
lemma mem_is_intervalI: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1627 |
assumes "is_interval s" |
64539 | 1628 |
and "a \<in> s" "b \<in> s" |
1629 |
and "\<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" |
|
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1630 |
shows "x \<in> s" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1631 |
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
|
1632 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1633 |
lemma interval_subst: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1634 |
fixes S::"'a::euclidean_space set" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1635 |
assumes "is_interval S" |
64539 | 1636 |
and "x \<in> S" "y j \<in> S" |
1637 |
and "j \<in> Basis" |
|
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1638 |
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
|
1639 |
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
|
1640 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1641 |
lemma mem_box_componentwiseI: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1642 |
fixes S::"'a::euclidean_space set" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1643 |
assumes "is_interval S" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1644 |
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
|
1645 |
shows "x \<in> S" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1646 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1647 |
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
|
1648 |
by auto |
64539 | 1649 |
with finite_Basis obtain s and bs::"'a list" |
1650 |
where s: "\<And>i. i \<in> Basis \<Longrightarrow> x \<bullet> i = s i \<bullet> i" "\<And>i. i \<in> Basis \<Longrightarrow> s i \<in> S" |
|
1651 |
and bs: "set bs = Basis" "distinct bs" |
|
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1652 |
by (metis finite_distinct_list) |
64539 | 1653 |
from nonempty_Basis s obtain j where j: "j \<in> Basis" "s j \<in> S" |
1654 |
by blast |
|
63040 | 1655 |
define y where |
1656 |
"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
|
1657 |
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
|
1658 |
using bs by (auto simp add: s(1)[symmetric] euclidean_representation) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1659 |
also have [symmetric]: "y bs = \<dots>" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1660 |
using bs(2) bs(1)[THEN equalityD1] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1661 |
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
|
1662 |
also have "y bs \<in> S" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1663 |
using bs(1)[THEN equalityD1] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1664 |
apply (induct bs) |
64539 | 1665 |
apply (auto simp: y_def j) |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1666 |
apply (rule interval_subst[OF assms(1)]) |
64539 | 1667 |
apply (auto simp: s) |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1668 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1669 |
finally show ?thesis . |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1670 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1671 |
|
63007
aa894a49f77d
new theorems about convex hulls, etc.; also, renamed some theorems
paulson <lp15@cam.ac.uk>
parents:
62948
diff
changeset
|
1672 |
lemma cbox01_nonempty [simp]: "cbox 0 One \<noteq> {}" |
64267 | 1673 |
by (simp add: box_ne_empty inner_Basis inner_sum_left sum_nonneg) |
63007
aa894a49f77d
new theorems about convex hulls, etc.; also, renamed some theorems
paulson <lp15@cam.ac.uk>
parents:
62948
diff
changeset
|
1674 |
|
aa894a49f77d
new theorems about convex hulls, etc.; also, renamed some theorems
paulson <lp15@cam.ac.uk>
parents:
62948
diff
changeset
|
1675 |
lemma box01_nonempty [simp]: "box 0 One \<noteq> {}" |
64267 | 1676 |
by (simp add: box_ne_empty inner_Basis inner_sum_left) (simp add: sum.remove) |
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
1677 |
|
33175 | 1678 |
|
64539 | 1679 |
subsection \<open>Connectedness\<close> |
33175 | 1680 |
|
1681 |
lemma connected_local: |
|
53255 | 1682 |
"connected S \<longleftrightarrow> |
1683 |
\<not> (\<exists>e1 e2. |
|
1684 |
openin (subtopology euclidean S) e1 \<and> |
|
1685 |
openin (subtopology euclidean S) e2 \<and> |
|
1686 |
S \<subseteq> e1 \<union> e2 \<and> |
|
1687 |
e1 \<inter> e2 = {} \<and> |
|
1688 |
e1 \<noteq> {} \<and> |
|
1689 |
e2 \<noteq> {})" |
|
53282 | 1690 |
unfolding connected_def openin_open |
59765
26d1c71784f1
tweaked a few slow or very ugly proofs
paulson <lp15@cam.ac.uk>
parents:
59587
diff
changeset
|
1691 |
by safe blast+ |
33175 | 1692 |
|
34105 | 1693 |
lemma exists_diff: |
1694 |
fixes P :: "'a set \<Rightarrow> bool" |
|
64539 | 1695 |
shows "(\<exists>S. P (- S)) \<longleftrightarrow> (\<exists>S. P S)" |
1696 |
(is "?lhs \<longleftrightarrow> ?rhs") |
|
1697 |
proof - |
|
1698 |
have ?rhs if ?lhs |
|
1699 |
using that by blast |
|
1700 |
moreover have "P (- (- S))" if "P S" for S |
|
1701 |
proof - |
|
1702 |
have "S = - (- S)" by simp |
|
1703 |
with that show ?thesis by metis |
|
1704 |
qed |
|
33175 | 1705 |
ultimately show ?thesis by metis |
1706 |
qed |
|
1707 |
||
1708 |
lemma connected_clopen: "connected S \<longleftrightarrow> |
|
53255 | 1709 |
(\<forall>T. openin (subtopology euclidean S) T \<and> |
1710 |
closedin (subtopology euclidean S) T \<longrightarrow> T = {} \<or> T = S)" (is "?lhs \<longleftrightarrow> ?rhs") |
|
1711 |
proof - |
|
1712 |
have "\<not> connected S \<longleftrightarrow> |
|
1713 |
(\<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 | 1714 |
unfolding connected_def openin_open closedin_closed |
55775 | 1715 |
by (metis double_complement) |
53282 | 1716 |
then have th0: "connected S \<longleftrightarrow> |
53255 | 1717 |
\<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 | 1718 |
(is " _ \<longleftrightarrow> \<not> (\<exists>e2 e1. ?P e2 e1)") |
64539 | 1719 |
by (simp add: closed_def) metis |
33175 | 1720 |
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'))" |
1721 |
(is "_ \<longleftrightarrow> \<not> (\<exists>t' t. ?Q t' t)") |
|
1722 |
unfolding connected_def openin_open closedin_closed by auto |
|
64539 | 1723 |
have "(\<exists>e1. ?P e2 e1) \<longleftrightarrow> (\<exists>t. ?Q e2 t)" for e2 |
1724 |
proof - |
|
1725 |
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)" for e1 |
|
1726 |
by auto |
|
1727 |
then show ?thesis |
|
53255 | 1728 |
by metis |
64539 | 1729 |
qed |
53255 | 1730 |
then have "\<forall>e2. (\<exists>e1. ?P e2 e1) \<longleftrightarrow> (\<exists>t. ?Q e2 t)" |
1731 |
by blast |
|
1732 |
then show ?thesis |
|
64539 | 1733 |
by (simp add: th0 th1) |
1734 |
qed |
|
1735 |
||
1736 |
||
1737 |
subsection \<open>Limit points\<close> |
|
33175 | 1738 |
|
53282 | 1739 |
definition (in topological_space) islimpt:: "'a \<Rightarrow> 'a set \<Rightarrow> bool" (infixr "islimpt" 60) |
53255 | 1740 |
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 | 1741 |
|
1742 |
lemma islimptI: |
|
1743 |
assumes "\<And>T. x \<in> T \<Longrightarrow> open T \<Longrightarrow> \<exists>y\<in>S. y \<in> T \<and> y \<noteq> x" |
|
1744 |
shows "x islimpt S" |
|
1745 |
using assms unfolding islimpt_def by auto |
|
1746 |
||
1747 |
lemma islimptE: |
|
1748 |
assumes "x islimpt S" and "x \<in> T" and "open T" |
|
1749 |
obtains y where "y \<in> S" and "y \<in> T" and "y \<noteq> x" |
|
1750 |
using assms unfolding islimpt_def by auto |
|
1751 |
||
44584 | 1752 |
lemma islimpt_iff_eventually: "x islimpt S \<longleftrightarrow> \<not> eventually (\<lambda>y. y \<notin> S) (at x)" |
1753 |
unfolding islimpt_def eventually_at_topological by auto |
|
1754 |
||
53255 | 1755 |
lemma islimpt_subset: "x islimpt S \<Longrightarrow> S \<subseteq> T \<Longrightarrow> x islimpt T" |
44584 | 1756 |
unfolding islimpt_def by fast |
33175 | 1757 |
|
1758 |
lemma islimpt_approachable: |
|
1759 |
fixes x :: "'a::metric_space" |
|
1760 |
shows "x islimpt S \<longleftrightarrow> (\<forall>e>0. \<exists>x'\<in>S. x' \<noteq> x \<and> dist x' x < e)" |
|
44584 | 1761 |
unfolding islimpt_iff_eventually eventually_at by fast |
33175 | 1762 |
|
64539 | 1763 |
lemma islimpt_approachable_le: "x islimpt S \<longleftrightarrow> (\<forall>e>0. \<exists>x'\<in> S. x' \<noteq> x \<and> dist x' x \<le> e)" |
1764 |
for x :: "'a::metric_space" |
|
33175 | 1765 |
unfolding islimpt_approachable |
44584 | 1766 |
using approachable_lt_le [where f="\<lambda>y. dist y x" and P="\<lambda>y. y \<notin> S \<or> y = x", |
1767 |
THEN arg_cong [where f=Not]] |
|
1768 |
by (simp add: Bex_def conj_commute conj_left_commute) |
|
33175 | 1769 |
|
44571 | 1770 |
lemma islimpt_UNIV_iff: "x islimpt UNIV \<longleftrightarrow> \<not> open {x}" |
1771 |
unfolding islimpt_def by (safe, fast, case_tac "T = {x}", fast, fast) |
|
1772 |
||
51351 | 1773 |
lemma islimpt_punctured: "x islimpt S = x islimpt (S-{x})" |
1774 |
unfolding islimpt_def by blast |
|
1775 |
||
60420 | 1776 |
text \<open>A perfect space has no isolated points.\<close> |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
1777 |
|
64539 | 1778 |
lemma islimpt_UNIV [simp, intro]: "x islimpt UNIV" |
1779 |
for x :: "'a::perfect_space" |
|
44571 | 1780 |
unfolding islimpt_UNIV_iff by (rule not_open_singleton) |
33175 | 1781 |
|
64539 | 1782 |
lemma perfect_choose_dist: "0 < r \<Longrightarrow> \<exists>a. a \<noteq> x \<and> dist a x < r" |
1783 |
for x :: "'a::{perfect_space,metric_space}" |
|
1784 |
using islimpt_UNIV [of x] by (simp add: islimpt_approachable) |
|
33175 | 1785 |
|
1786 |
lemma closed_limpt: "closed S \<longleftrightarrow> (\<forall>x. x islimpt S \<longrightarrow> x \<in> S)" |
|
1787 |
unfolding closed_def |
|
1788 |
apply (subst open_subopen) |
|
34105 | 1789 |
apply (simp add: islimpt_def subset_eq) |
52624 | 1790 |
apply (metis ComplE ComplI) |
1791 |
done |
|
33175 | 1792 |
|
1793 |
lemma islimpt_EMPTY[simp]: "\<not> x islimpt {}" |
|
64539 | 1794 |
by (auto simp add: islimpt_def) |
33175 | 1795 |
|
1796 |
lemma finite_set_avoid: |
|
1797 |
fixes a :: "'a::metric_space" |
|
53255 | 1798 |
assumes fS: "finite S" |
64539 | 1799 |
shows "\<exists>d>0. \<forall>x\<in>S. x \<noteq> a \<longrightarrow> d \<le> dist a x" |
53255 | 1800 |
proof (induct rule: finite_induct[OF fS]) |
1801 |
case 1 |
|
1802 |
then show ?case by (auto intro: zero_less_one) |
|
33175 | 1803 |
next |
1804 |
case (2 x F) |
|
60462 | 1805 |
from 2 obtain d where d: "d > 0" "\<forall>x\<in>F. x \<noteq> a \<longrightarrow> d \<le> dist a x" |
53255 | 1806 |
by blast |
1807 |
show ?case |
|
1808 |
proof (cases "x = a") |
|
1809 |
case True |
|
64539 | 1810 |
with d show ?thesis by auto |
53255 | 1811 |
next |
1812 |
case False |
|
33175 | 1813 |
let ?d = "min d (dist a x)" |
64539 | 1814 |
from False d(1) have dp: "?d > 0" |
1815 |
by auto |
|
60462 | 1816 |
from d have d': "\<forall>x\<in>F. x \<noteq> a \<longrightarrow> ?d \<le> dist a x" |
53255 | 1817 |
by auto |
1818 |
with dp False show ?thesis |
|
1819 |
by (auto intro!: exI[where x="?d"]) |
|
1820 |
qed |
|
33175 | 1821 |
qed |
1822 |
||
1823 |
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
|
1824 |
by (simp add: islimpt_iff_eventually eventually_conj_iff) |
33175 | 1825 |
|
1826 |
lemma discrete_imp_closed: |
|
1827 |
fixes S :: "'a::metric_space set" |
|
53255 | 1828 |
assumes e: "0 < e" |
1829 |
and d: "\<forall>x \<in> S. \<forall>y \<in> S. dist y x < e \<longrightarrow> y = x" |
|
33175 | 1830 |
shows "closed S" |
53255 | 1831 |
proof - |
64539 | 1832 |
have False if C: "\<forall>e>0. \<exists>x'\<in>S. x' \<noteq> x \<and> dist x' x < e" for x |
1833 |
proof - |
|
33175 | 1834 |
from e have e2: "e/2 > 0" by arith |
53282 | 1835 |
from C[rule_format, OF e2] obtain y where y: "y \<in> S" "y \<noteq> x" "dist y x < e/2" |
53255 | 1836 |
by blast |
33175 | 1837 |
let ?m = "min (e/2) (dist x y) " |
53255 | 1838 |
from e2 y(2) have mp: "?m > 0" |
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
1839 |
by simp |
53282 | 1840 |
from C[rule_format, OF mp] obtain z where z: "z \<in> S" "z \<noteq> x" "dist z x < ?m" |
53255 | 1841 |
by blast |
64539 | 1842 |
from z y have "dist z y < e" |
1843 |
by (intro dist_triangle_lt [where z=x]) simp |
|
1844 |
from d[rule_format, OF y(1) z(1) this] y z show ?thesis |
|
1845 |
by (auto simp add: dist_commute) |
|
1846 |
qed |
|
53255 | 1847 |
then show ?thesis |
1848 |
by (metis islimpt_approachable closed_limpt [where 'a='a]) |
|
33175 | 1849 |
qed |
1850 |
||
64539 | 1851 |
lemma closed_of_nat_image: "closed (of_nat ` A :: 'a::real_normed_algebra_1 set)" |
61524
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61518
diff
changeset
|
1852 |
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
|
1853 |
|
64539 | 1854 |
lemma closed_of_int_image: "closed (of_int ` A :: 'a::real_normed_algebra_1 set)" |
61524
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61518
diff
changeset
|
1855 |
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
|
1856 |
|
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61518
diff
changeset
|
1857 |
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
|
1858 |
unfolding Nats_def by (rule closed_of_nat_image) |
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61518
diff
changeset
|
1859 |
|
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61518
diff
changeset
|
1860 |
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
|
1861 |
unfolding Ints_def by (rule closed_of_int_image) |
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61518
diff
changeset
|
1862 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
1863 |
|
60420 | 1864 |
subsection \<open>Interior of a Set\<close> |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
1865 |
|
44519 | 1866 |
definition "interior S = \<Union>{T. open T \<and> T \<subseteq> S}" |
1867 |
||
1868 |
lemma interiorI [intro?]: |
|
1869 |
assumes "open T" and "x \<in> T" and "T \<subseteq> S" |
|
1870 |
shows "x \<in> interior S" |
|
1871 |
using assms unfolding interior_def by fast |
|
1872 |
||
1873 |
lemma interiorE [elim?]: |
|
1874 |
assumes "x \<in> interior S" |
|
1875 |
obtains T where "open T" and "x \<in> T" and "T \<subseteq> S" |
|
1876 |
using assms unfolding interior_def by fast |
|
1877 |
||
1878 |
lemma open_interior [simp, intro]: "open (interior S)" |
|
1879 |
by (simp add: interior_def open_Union) |
|
1880 |
||
1881 |
lemma interior_subset: "interior S \<subseteq> S" |
|
1882 |
by (auto simp add: interior_def) |
|
1883 |
||
1884 |
lemma interior_maximal: "T \<subseteq> S \<Longrightarrow> open T \<Longrightarrow> T \<subseteq> interior S" |
|
1885 |
by (auto simp add: interior_def) |
|
1886 |
||
1887 |
lemma interior_open: "open S \<Longrightarrow> interior S = S" |
|
1888 |
by (intro equalityI interior_subset interior_maximal subset_refl) |
|
33175 | 1889 |
|
1890 |
lemma interior_eq: "interior S = S \<longleftrightarrow> open S" |
|
44519 | 1891 |
by (metis open_interior interior_open) |
1892 |
||
1893 |
lemma open_subset_interior: "open S \<Longrightarrow> S \<subseteq> interior T \<longleftrightarrow> S \<subseteq> T" |
|
33175 | 1894 |
by (metis interior_maximal interior_subset subset_trans) |
1895 |
||
44519 | 1896 |
lemma interior_empty [simp]: "interior {} = {}" |
1897 |
using open_empty by (rule interior_open) |
|
1898 |
||
44522
2f7e9d890efe
rename subset_{interior,closure} to {interior,closure}_mono;
huffman
parents:
44519
diff
changeset
|
1899 |
lemma interior_UNIV [simp]: "interior UNIV = UNIV" |
2f7e9d890efe
rename subset_{interior,closure} to {interior,closure}_mono;
huffman
parents:
44519
diff
changeset
|
1900 |
using open_UNIV by (rule interior_open) |
2f7e9d890efe
rename subset_{interior,closure} to {interior,closure}_mono;
huffman
parents:
44519
diff
changeset
|
1901 |
|
44519 | 1902 |
lemma interior_interior [simp]: "interior (interior S) = interior S" |
1903 |
using open_interior by (rule interior_open) |
|
1904 |
||
44522
2f7e9d890efe
rename subset_{interior,closure} to {interior,closure}_mono;
huffman
parents:
44519
diff
changeset
|
1905 |
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
|
1906 |
by (auto simp add: interior_def) |
44519 | 1907 |
|
1908 |
lemma interior_unique: |
|
1909 |
assumes "T \<subseteq> S" and "open T" |
|
1910 |
assumes "\<And>T'. T' \<subseteq> S \<Longrightarrow> open T' \<Longrightarrow> T' \<subseteq> T" |
|
1911 |
shows "interior S = T" |
|
1912 |
by (intro equalityI assms interior_subset open_interior interior_maximal) |
|
1913 |
||
64539 | 1914 |
lemma interior_singleton [simp]: "interior {a} = {}" |
1915 |
for a :: "'a::perfect_space" |
|
1916 |
apply (rule interior_unique) |
|
1917 |
apply simp_all |
|
1918 |
using not_open_singleton subset_singletonD |
|
1919 |
apply fastforce |
|
1920 |
done |
|
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1921 |
|
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1922 |
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
|
1923 |
by (intro equalityI Int_mono Int_greatest interior_mono Int_lower1 |
44519 | 1924 |
Int_lower2 interior_maximal interior_subset open_Int open_interior) |
1925 |
||
1926 |
lemma mem_interior: "x \<in> interior S \<longleftrightarrow> (\<exists>e>0. ball x e \<subseteq> S)" |
|
1927 |
using open_contains_ball_eq [where S="interior S"] |
|
1928 |
by (simp add: open_subset_interior) |
|
33175 | 1929 |
|
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1930 |
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
|
1931 |
using interior_subset[of s] by (subst eventually_nhds) blast |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1932 |
|
33175 | 1933 |
lemma interior_limit_point [intro]: |
1934 |
fixes x :: "'a::perfect_space" |
|
53255 | 1935 |
assumes x: "x \<in> interior S" |
1936 |
shows "x islimpt S" |
|
44072
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
1937 |
using x islimpt_UNIV [of x] |
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
1938 |
unfolding interior_def islimpt_def |
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
1939 |
apply (clarsimp, rename_tac T T') |
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
1940 |
apply (drule_tac x="T \<inter> T'" in spec) |
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
1941 |
apply (auto simp add: open_Int) |
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
1942 |
done |
33175 | 1943 |
|
1944 |
lemma interior_closed_Un_empty_interior: |
|
53255 | 1945 |
assumes cS: "closed S" |
1946 |
and iT: "interior T = {}" |
|
44519 | 1947 |
shows "interior (S \<union> T) = interior S" |
33175 | 1948 |
proof |
44519 | 1949 |
show "interior S \<subseteq> interior (S \<union> T)" |
53255 | 1950 |
by (rule interior_mono) (rule Un_upper1) |
33175 | 1951 |
show "interior (S \<union> T) \<subseteq> interior S" |
1952 |
proof |
|
53255 | 1953 |
fix x |
1954 |
assume "x \<in> interior (S \<union> T)" |
|
44519 | 1955 |
then obtain R where "open R" "x \<in> R" "R \<subseteq> S \<union> T" .. |
33175 | 1956 |
show "x \<in> interior S" |
1957 |
proof (rule ccontr) |
|
1958 |
assume "x \<notin> interior S" |
|
60420 | 1959 |
with \<open>x \<in> R\<close> \<open>open R\<close> obtain y where "y \<in> R - S" |
44519 | 1960 |
unfolding interior_def by fast |
60420 | 1961 |
from \<open>open R\<close> \<open>closed S\<close> have "open (R - S)" |
53282 | 1962 |
by (rule open_Diff) |
60420 | 1963 |
from \<open>R \<subseteq> S \<union> T\<close> have "R - S \<subseteq> T" |
53282 | 1964 |
by fast |
60420 | 1965 |
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 | 1966 |
unfolding interior_def by fast |
33175 | 1967 |
qed |
1968 |
qed |
|
1969 |
qed |
|
1970 |
||
44365 | 1971 |
lemma interior_Times: "interior (A \<times> B) = interior A \<times> interior B" |
1972 |
proof (rule interior_unique) |
|
1973 |
show "interior A \<times> interior B \<subseteq> A \<times> B" |
|
1974 |
by (intro Sigma_mono interior_subset) |
|
1975 |
show "open (interior A \<times> interior B)" |
|
1976 |
by (intro open_Times open_interior) |
|
53255 | 1977 |
fix T |
1978 |
assume "T \<subseteq> A \<times> B" and "open T" |
|
1979 |
then show "T \<subseteq> interior A \<times> interior B" |
|
53282 | 1980 |
proof safe |
53255 | 1981 |
fix x y |
1982 |
assume "(x, y) \<in> T" |
|
44519 | 1983 |
then obtain C D where "open C" "open D" "C \<times> D \<subseteq> T" "x \<in> C" "y \<in> D" |
60420 | 1984 |
using \<open>open T\<close> unfolding open_prod_def by fast |
53255 | 1985 |
then have "open C" "open D" "C \<subseteq> A" "D \<subseteq> B" "x \<in> C" "y \<in> D" |
60420 | 1986 |
using \<open>T \<subseteq> A \<times> B\<close> by auto |
53255 | 1987 |
then show "x \<in> interior A" and "y \<in> interior B" |
44519 | 1988 |
by (auto intro: interiorI) |
1989 |
qed |
|
44365 | 1990 |
qed |
1991 |
||
61245 | 1992 |
lemma interior_Ici: |
64539 | 1993 |
fixes x :: "'a :: {dense_linorder,linorder_topology}" |
61245 | 1994 |
assumes "b < x" |
64539 | 1995 |
shows "interior {x ..} = {x <..}" |
61245 | 1996 |
proof (rule interior_unique) |
64539 | 1997 |
fix T |
1998 |
assume "T \<subseteq> {x ..}" "open T" |
|
61245 | 1999 |
moreover have "x \<notin> T" |
2000 |
proof |
|
2001 |
assume "x \<in> T" |
|
2002 |
obtain y where "y < x" "{y <.. x} \<subseteq> T" |
|
2003 |
using open_left[OF \<open>open T\<close> \<open>x \<in> T\<close> \<open>b < x\<close>] by auto |
|
2004 |
with dense[OF \<open>y < x\<close>] obtain z where "z \<in> T" "z < x" |
|
2005 |
by (auto simp: subset_eq Ball_def) |
|
2006 |
with \<open>T \<subseteq> {x ..}\<close> show False by auto |
|
2007 |
qed |
|
2008 |
ultimately show "T \<subseteq> {x <..}" |
|
2009 |
by (auto simp: subset_eq less_le) |
|
2010 |
qed auto |
|
2011 |
||
2012 |
lemma interior_Iic: |
|
64539 | 2013 |
fixes x :: "'a ::{dense_linorder,linorder_topology}" |
61245 | 2014 |
assumes "x < b" |
2015 |
shows "interior {.. x} = {..< x}" |
|
2016 |
proof (rule interior_unique) |
|
64539 | 2017 |
fix T |
2018 |
assume "T \<subseteq> {.. x}" "open T" |
|
61245 | 2019 |
moreover have "x \<notin> T" |
2020 |
proof |
|
2021 |
assume "x \<in> T" |
|
2022 |
obtain y where "x < y" "{x ..< y} \<subseteq> T" |
|
2023 |
using open_right[OF \<open>open T\<close> \<open>x \<in> T\<close> \<open>x < b\<close>] by auto |
|
2024 |
with dense[OF \<open>x < y\<close>] obtain z where "z \<in> T" "x < z" |
|
2025 |
by (auto simp: subset_eq Ball_def less_le) |
|
2026 |
with \<open>T \<subseteq> {.. x}\<close> show False by auto |
|
2027 |
qed |
|
2028 |
ultimately show "T \<subseteq> {..< x}" |
|
2029 |
by (auto simp: subset_eq less_le) |
|
2030 |
qed auto |
|
33175 | 2031 |
|
64539 | 2032 |
|
60420 | 2033 |
subsection \<open>Closure of a Set\<close> |
33175 | 2034 |
|
2035 |
definition "closure S = S \<union> {x | x. x islimpt S}" |
|
2036 |
||
44518 | 2037 |
lemma interior_closure: "interior S = - (closure (- S))" |
64539 | 2038 |
by (auto simp add: interior_def closure_def islimpt_def) |
44518 | 2039 |
|
34105 | 2040 |
lemma closure_interior: "closure S = - interior (- S)" |
64539 | 2041 |
by (simp add: interior_closure) |
33175 | 2042 |
|
2043 |
lemma closed_closure[simp, intro]: "closed (closure S)" |
|
64539 | 2044 |
by (simp add: closure_interior closed_Compl) |
44518 | 2045 |
|
2046 |
lemma closure_subset: "S \<subseteq> closure S" |
|
64539 | 2047 |
by (simp add: closure_def) |
33175 | 2048 |
|
2049 |
lemma closure_hull: "closure S = closed hull S" |
|
64539 | 2050 |
by (auto simp add: hull_def closure_interior interior_def) |
33175 | 2051 |
|
2052 |
lemma closure_eq: "closure S = S \<longleftrightarrow> closed S" |
|
44519 | 2053 |
unfolding closure_hull using closed_Inter by (rule hull_eq) |
2054 |
||
2055 |
lemma closure_closed [simp]: "closed S \<Longrightarrow> closure S = S" |
|
64539 | 2056 |
by (simp only: closure_eq) |
44519 | 2057 |
|
2058 |
lemma closure_closure [simp]: "closure (closure S) = closure S" |
|
44518 | 2059 |
unfolding closure_hull by (rule hull_hull) |
33175 | 2060 |
|
44522
2f7e9d890efe
rename subset_{interior,closure} to {interior,closure}_mono;
huffman
parents:
44519
diff
changeset
|
2061 |
lemma closure_mono: "S \<subseteq> T \<Longrightarrow> closure S \<subseteq> closure T" |
44518 | 2062 |
unfolding closure_hull by (rule hull_mono) |
33175 | 2063 |
|
44519 | 2064 |
lemma closure_minimal: "S \<subseteq> T \<Longrightarrow> closed T \<Longrightarrow> closure S \<subseteq> T" |
44518 | 2065 |
unfolding closure_hull by (rule hull_minimal) |
33175 | 2066 |
|
44519 | 2067 |
lemma closure_unique: |
53255 | 2068 |
assumes "S \<subseteq> T" |
2069 |
and "closed T" |
|
2070 |
and "\<And>T'. S \<subseteq> T' \<Longrightarrow> closed T' \<Longrightarrow> T \<subseteq> T'" |
|
44519 | 2071 |
shows "closure S = T" |
2072 |
using assms unfolding closure_hull by (rule hull_unique) |
|
2073 |
||
2074 |
lemma closure_empty [simp]: "closure {} = {}" |
|
44518 | 2075 |
using closed_empty by (rule closure_closed) |
33175 | 2076 |
|
44522
2f7e9d890efe
rename subset_{interior,closure} to {interior,closure}_mono;
huffman
parents:
44519
diff
changeset
|
2077 |
lemma closure_UNIV [simp]: "closure UNIV = UNIV" |
44518 | 2078 |
using closed_UNIV by (rule closure_closed) |
2079 |
||
64122 | 2080 |
lemma closure_Un [simp]: "closure (S \<union> T) = closure S \<union> closure T" |
64539 | 2081 |
by (simp add: closure_interior) |
33175 | 2082 |
|
60974
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
2083 |
lemma closure_eq_empty [iff]: "closure S = {} \<longleftrightarrow> S = {}" |
64539 | 2084 |
using closure_empty closure_subset[of S] by blast |
33175 | 2085 |
|
2086 |
lemma closure_subset_eq: "closure S \<subseteq> S \<longleftrightarrow> closed S" |
|
64539 | 2087 |
using closure_eq[of S] closure_subset[of S] by simp |
2088 |
||
2089 |
lemma open_Int_closure_eq_empty: "open S \<Longrightarrow> (S \<inter> closure T) = {} \<longleftrightarrow> S \<inter> T = {}" |
|
34105 | 2090 |
using open_subset_interior[of S "- T"] |
2091 |
using interior_subset[of "- T"] |
|
64539 | 2092 |
by (auto simp: closure_interior) |
2093 |
||
2094 |
lemma open_Int_closure_subset: "open S \<Longrightarrow> S \<inter> closure T \<subseteq> closure (S \<inter> T)" |
|
33175 | 2095 |
proof |
2096 |
fix x |
|
64539 | 2097 |
assume *: "open S" "x \<in> S \<inter> closure T" |
2098 |
have "x islimpt (S \<inter> T)" if **: "x islimpt T" |
|
2099 |
proof (rule islimptI) |
|
2100 |
fix A |
|
2101 |
assume "x \<in> A" "open A" |
|
2102 |
with * have "x \<in> A \<inter> S" "open (A \<inter> S)" |
|
2103 |
by (simp_all add: open_Int) |
|
2104 |
with ** obtain y where "y \<in> T" "y \<in> A \<inter> S" "y \<noteq> x" |
|
2105 |
by (rule islimptE) |
|
2106 |
then have "y \<in> S \<inter> T" "y \<in> A \<and> y \<noteq> x" |
|
2107 |
by simp_all |
|
2108 |
then show "\<exists>y\<in>(S \<inter> T). y \<in> A \<and> y \<noteq> x" .. |
|
2109 |
qed |
|
2110 |
with * show "x \<in> closure (S \<inter> T)" |
|
2111 |
unfolding closure_def by blast |
|
33175 | 2112 |
qed |
2113 |
||
44519 | 2114 |
lemma closure_complement: "closure (- S) = - interior S" |
64539 | 2115 |
by (simp add: closure_interior) |
33175 | 2116 |
|
44519 | 2117 |
lemma interior_complement: "interior (- S) = - closure S" |
64539 | 2118 |
by (simp add: closure_interior) |
33175 | 2119 |
|
44365 | 2120 |
lemma closure_Times: "closure (A \<times> B) = closure A \<times> closure B" |
44519 | 2121 |
proof (rule closure_unique) |
44365 | 2122 |
show "A \<times> B \<subseteq> closure A \<times> closure B" |
2123 |
by (intro Sigma_mono closure_subset) |
|
2124 |
show "closed (closure A \<times> closure B)" |
|
2125 |
by (intro closed_Times closed_closure) |
|
53282 | 2126 |
fix T |
2127 |
assume "A \<times> B \<subseteq> T" and "closed T" |
|
2128 |
then show "closure A \<times> closure B \<subseteq> T" |
|
64539 | 2129 |
apply (simp add: closed_def open_prod_def) |
2130 |
apply clarify |
|
44365 | 2131 |
apply (rule ccontr) |
2132 |
apply (drule_tac x="(a, b)" in bspec, simp, clarify, rename_tac C D) |
|
2133 |
apply (simp add: closure_interior interior_def) |
|
2134 |
apply (drule_tac x=C in spec) |
|
2135 |
apply (drule_tac x=D in spec) |
|
2136 |
apply auto |
|
2137 |
done |
|
2138 |
qed |
|
2139 |
||
51351 | 2140 |
lemma islimpt_in_closure: "(x islimpt S) = (x:closure(S-{x}))" |
2141 |
unfolding closure_def using islimpt_punctured by blast |
|
2142 |
||
63301 | 2143 |
lemma connected_imp_connected_closure: "connected S \<Longrightarrow> connected (closure S)" |
64539 | 2144 |
by (rule connectedI) (meson closure_subset open_Int open_Int_closure_eq_empty subset_trans connectedD) |
2145 |
||
2146 |
lemma limpt_of_limpts: "x islimpt {y. y islimpt S} \<Longrightarrow> x islimpt S" |
|
2147 |
for x :: "'a::metric_space" |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2148 |
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
|
2149 |
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
|
2150 |
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
|
2151 |
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
|
2152 |
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
|
2153 |
apply (erule rev_bexI) |
64539 | 2154 |
apply (metis dist_commute dist_triangle_half_r less_trans less_irrefl) |
2155 |
done |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2156 |
|
63301 | 2157 |
lemma closed_limpts: "closed {x::'a::metric_space. x islimpt S}" |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2158 |
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
|
2159 |
|
64539 | 2160 |
lemma limpt_of_closure: "x islimpt closure S \<longleftrightarrow> x islimpt S" |
2161 |
for x :: "'a::metric_space" |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2162 |
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
|
2163 |
|
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
|
2164 |
lemma closedin_limpt: |
64539 | 2165 |
"closedin (subtopology euclidean T) S \<longleftrightarrow> S \<subseteq> T \<and> (\<forall>x. x islimpt S \<and> x \<in> T \<longrightarrow> x \<in> S)" |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2166 |
apply (simp add: closedin_closed, safe) |
64539 | 2167 |
apply (simp add: closed_limpt islimpt_subset) |
63301 | 2168 |
apply (rule_tac x="closure S" in exI) |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2169 |
apply simp |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2170 |
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
|
2171 |
done |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2172 |
|
64539 | 2173 |
lemma closedin_closed_eq: "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
|
2174 |
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
|
2175 |
|
63301 | 2176 |
lemma closedin_subset_trans: |
64539 | 2177 |
"closedin (subtopology euclidean U) S \<Longrightarrow> S \<subseteq> T \<Longrightarrow> T \<subseteq> U \<Longrightarrow> |
2178 |
closedin (subtopology euclidean T) S" |
|
2179 |
by (meson closedin_limpt subset_iff) |
|
63301 | 2180 |
|
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63332
diff
changeset
|
2181 |
lemma openin_subset_trans: |
64539 | 2182 |
"openin (subtopology euclidean U) S \<Longrightarrow> S \<subseteq> T \<Longrightarrow> T \<subseteq> U \<Longrightarrow> |
2183 |
openin (subtopology euclidean T) S" |
|
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63332
diff
changeset
|
2184 |
by (auto simp: openin_open) |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63332
diff
changeset
|
2185 |
|
64122 | 2186 |
lemma openin_Times: |
64539 | 2187 |
"openin (subtopology euclidean S) S' \<Longrightarrow> openin (subtopology euclidean T) T' \<Longrightarrow> |
2188 |
openin (subtopology euclidean (S \<times> T)) (S' \<times> T')" |
|
64122 | 2189 |
unfolding openin_open using open_Times by blast |
2190 |
||
2191 |
lemma Times_in_interior_subtopology: |
|
64539 | 2192 |
fixes U :: "('a::metric_space \<times> 'b::metric_space) set" |
64122 | 2193 |
assumes "(x, y) \<in> U" "openin (subtopology euclidean (S \<times> T)) U" |
2194 |
obtains V W where "openin (subtopology euclidean S) V" "x \<in> V" |
|
2195 |
"openin (subtopology euclidean T) W" "y \<in> W" "(V \<times> W) \<subseteq> U" |
|
2196 |
proof - |
|
2197 |
from assms obtain e where "e > 0" and "U \<subseteq> S \<times> T" |
|
64539 | 2198 |
and e: "\<And>x' y'. \<lbrakk>x'\<in>S; y'\<in>T; dist (x', y') (x, y) < e\<rbrakk> \<Longrightarrow> (x', y') \<in> U" |
64122 | 2199 |
by (force simp: openin_euclidean_subtopology_iff) |
2200 |
with assms have "x \<in> S" "y \<in> T" |
|
2201 |
by auto |
|
2202 |
show ?thesis |
|
2203 |
proof |
|
2204 |
show "openin (subtopology euclidean S) (ball x (e/2) \<inter> S)" |
|
2205 |
by (simp add: Int_commute openin_open_Int) |
|
2206 |
show "x \<in> ball x (e / 2) \<inter> S" |
|
2207 |
by (simp add: \<open>0 < e\<close> \<open>x \<in> S\<close>) |
|
2208 |
show "openin (subtopology euclidean T) (ball y (e/2) \<inter> T)" |
|
2209 |
by (simp add: Int_commute openin_open_Int) |
|
2210 |
show "y \<in> ball y (e / 2) \<inter> T" |
|
2211 |
by (simp add: \<open>0 < e\<close> \<open>y \<in> T\<close>) |
|
2212 |
show "(ball x (e / 2) \<inter> S) \<times> (ball y (e / 2) \<inter> T) \<subseteq> U" |
|
2213 |
by clarify (simp add: e dist_Pair_Pair \<open>0 < e\<close> dist_commute sqrt_sum_squares_half_less) |
|
2214 |
qed |
|
2215 |
qed |
|
2216 |
||
2217 |
lemma openin_Times_eq: |
|
2218 |
fixes S :: "'a::metric_space set" and T :: "'b::metric_space set" |
|
2219 |
shows |
|
64539 | 2220 |
"openin (subtopology euclidean (S \<times> T)) (S' \<times> T') \<longleftrightarrow> |
2221 |
S' = {} \<or> T' = {} \<or> openin (subtopology euclidean S) S' \<and> openin (subtopology euclidean T) T'" |
|
64122 | 2222 |
(is "?lhs = ?rhs") |
2223 |
proof (cases "S' = {} \<or> T' = {}") |
|
2224 |
case True |
|
2225 |
then show ?thesis by auto |
|
2226 |
next |
|
2227 |
case False |
|
2228 |
then obtain x y where "x \<in> S'" "y \<in> T'" |
|
2229 |
by blast |
|
2230 |
show ?thesis |
|
2231 |
proof |
|
64539 | 2232 |
assume ?lhs |
64122 | 2233 |
have "openin (subtopology euclidean S) S'" |
2234 |
apply (subst openin_subopen, clarify) |
|
64539 | 2235 |
apply (rule Times_in_interior_subtopology [OF _ \<open>?lhs\<close>]) |
2236 |
using \<open>y \<in> T'\<close> |
|
2237 |
apply auto |
|
2238 |
done |
|
64122 | 2239 |
moreover have "openin (subtopology euclidean T) T'" |
2240 |
apply (subst openin_subopen, clarify) |
|
64539 | 2241 |
apply (rule Times_in_interior_subtopology [OF _ \<open>?lhs\<close>]) |
2242 |
using \<open>x \<in> S'\<close> |
|
2243 |
apply auto |
|
2244 |
done |
|
64122 | 2245 |
ultimately show ?rhs |
2246 |
by simp |
|
2247 |
next |
|
2248 |
assume ?rhs |
|
2249 |
with False show ?lhs |
|
2250 |
by (simp add: openin_Times) |
|
2251 |
qed |
|
2252 |
qed |
|
2253 |
||
63301 | 2254 |
lemma closedin_Times: |
64539 | 2255 |
"closedin (subtopology euclidean S) S' \<Longrightarrow> closedin (subtopology euclidean T) T' \<Longrightarrow> |
2256 |
closedin (subtopology euclidean (S \<times> T)) (S' \<times> T')" |
|
2257 |
unfolding closedin_closed using closed_Times by blast |
|
63301 | 2258 |
|
62083 | 2259 |
lemma bdd_below_closure: |
2260 |
fixes A :: "real set" |
|
2261 |
assumes "bdd_below A" |
|
2262 |
shows "bdd_below (closure A)" |
|
2263 |
proof - |
|
64539 | 2264 |
from assms obtain m where "\<And>x. x \<in> A \<Longrightarrow> m \<le> x" |
2265 |
by (auto simp: bdd_below_def) |
|
2266 |
then have "A \<subseteq> {m..}" by auto |
|
2267 |
then have "closure A \<subseteq> {m..}" |
|
2268 |
using closed_real_atLeast by (rule closure_minimal) |
|
2269 |
then show ?thesis |
|
2270 |
by (auto simp: bdd_below_def) |
|
2271 |
qed |
|
2272 |
||
2273 |
||
2274 |
subsection \<open>Connected components, considered as a connectedness relation or a set\<close> |
|
2275 |
||
2276 |
definition "connected_component s x y \<equiv> \<exists>t. connected t \<and> t \<subseteq> s \<and> x \<in> t \<and> y \<in> t" |
|
2277 |
||
2278 |
abbreviation "connected_component_set s x \<equiv> Collect (connected_component s x)" |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2279 |
|
61426
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
2280 |
lemma connected_componentI: |
64539 | 2281 |
"connected t \<Longrightarrow> t \<subseteq> s \<Longrightarrow> x \<in> t \<Longrightarrow> y \<in> t \<Longrightarrow> connected_component s x y" |
61426
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
2282 |
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
|
2283 |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2284 |
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
|
2285 |
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
|
2286 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2287 |
lemma connected_component_refl: "x \<in> s \<Longrightarrow> connected_component s x x" |
64539 | 2288 |
by (auto simp: connected_component_def) (use connected_sing in blast) |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2289 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2290 |
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
|
2291 |
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
|
2292 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2293 |
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
|
2294 |
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
|
2295 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2296 |
lemma connected_component_trans: |
64539 | 2297 |
"connected_component s x y \<Longrightarrow> connected_component s y z \<Longrightarrow> connected_component s x z" |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2298 |
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
|
2299 |
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
|
2300 |
|
64539 | 2301 |
lemma connected_component_of_subset: |
2302 |
"connected_component s x y \<Longrightarrow> s \<subseteq> t \<Longrightarrow> connected_component t x y" |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2303 |
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
|
2304 |
|
61952 | 2305 |
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
|
2306 |
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
|
2307 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2308 |
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
|
2309 |
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
|
2310 |
|
64539 | 2311 |
lemma connected_iff_eq_connected_component_set: |
2312 |
"connected s \<longleftrightarrow> (\<forall>x \<in> s. connected_component_set s x = s)" |
|
2313 |
proof (cases "s = {}") |
|
2314 |
case True |
|
2315 |
then show ?thesis by simp |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2316 |
next |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2317 |
case False |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2318 |
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
|
2319 |
show ?thesis |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2320 |
proof |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2321 |
assume "connected s" |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2322 |
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
|
2323 |
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
|
2324 |
next |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2325 |
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
|
2326 |
then show "connected s" |
61808 | 2327 |
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
|
2328 |
qed |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2329 |
qed |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2330 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2331 |
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
|
2332 |
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
|
2333 |
|
64539 | 2334 |
lemma connected_component_eq_self: "connected s \<Longrightarrow> x \<in> s \<Longrightarrow> connected_component_set s x = s" |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2335 |
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
|
2336 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2337 |
lemma connected_iff_connected_component: |
64539 | 2338 |
"connected s \<longleftrightarrow> (\<forall>x \<in> s. \<forall>y \<in> s. connected_component s x y)" |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2339 |
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
|
2340 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2341 |
lemma connected_component_maximal: |
64539 | 2342 |
"x \<in> t \<Longrightarrow> connected t \<Longrightarrow> t \<subseteq> s \<Longrightarrow> t \<subseteq> (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
|
2343 |
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
|
2344 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2345 |
lemma connected_component_mono: |
64539 | 2346 |
"s \<subseteq> t \<Longrightarrow> connected_component_set s x \<subseteq> connected_component_set t x" |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2347 |
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
|
2348 |
|
64539 | 2349 |
lemma connected_component_eq_empty [simp]: "connected_component_set s x = {} \<longleftrightarrow> x \<notin> s" |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2350 |
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
|
2351 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2352 |
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
|
2353 |
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
|
2354 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2355 |
lemma connected_component_eq: |
64539 | 2356 |
"y \<in> connected_component_set s x \<Longrightarrow> (connected_component_set s y = connected_component_set s x)" |
2357 |
by (metis (no_types, lifting) |
|
2358 |
Collect_cong connected_component_sym connected_component_trans mem_Collect_eq) |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2359 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2360 |
lemma closed_connected_component: |
64539 | 2361 |
assumes s: "closed s" |
2362 |
shows "closed (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
|
2363 |
proof (cases "x \<in> s") |
64539 | 2364 |
case False |
2365 |
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
|
2366 |
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
|
2367 |
next |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2368 |
case True |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2369 |
show ?thesis |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2370 |
unfolding closure_eq [symmetric] |
64539 | 2371 |
proof |
2372 |
show "closure (connected_component_set s x) \<subseteq> connected_component_set s x" |
|
2373 |
apply (rule connected_component_maximal) |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2374 |
apply (simp add: closure_def True) |
64539 | 2375 |
apply (simp add: connected_imp_connected_closure) |
2376 |
apply (simp add: s closure_minimal connected_component_subset) |
|
2377 |
done |
|
2378 |
next |
|
2379 |
show "connected_component_set s x \<subseteq> closure (connected_component_set s x)" |
|
2380 |
by (simp add: closure_subset) |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2381 |
qed |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2382 |
qed |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2383 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2384 |
lemma connected_component_disjoint: |
64539 | 2385 |
"connected_component_set s a \<inter> connected_component_set s b = {} \<longleftrightarrow> |
2386 |
a \<notin> connected_component_set s b" |
|
2387 |
apply (auto simp: connected_component_eq) |
|
2388 |
using connected_component_eq connected_component_sym |
|
2389 |
apply blast |
|
2390 |
done |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2391 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2392 |
lemma connected_component_nonoverlap: |
64539 | 2393 |
"connected_component_set s a \<inter> connected_component_set s b = {} \<longleftrightarrow> |
2394 |
a \<notin> s \<or> b \<notin> s \<or> connected_component_set s a \<noteq> connected_component_set s b" |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2395 |
apply (auto simp: connected_component_in) |
64539 | 2396 |
using connected_component_refl_eq |
2397 |
apply blast |
|
2398 |
apply (metis connected_component_eq mem_Collect_eq) |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2399 |
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
|
2400 |
done |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2401 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2402 |
lemma connected_component_overlap: |
64539 | 2403 |
"connected_component_set s a \<inter> connected_component_set s b \<noteq> {} \<longleftrightarrow> |
2404 |
a \<in> s \<and> b \<in> s \<and> connected_component_set s a = connected_component_set s b" |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2405 |
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
|
2406 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2407 |
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
|
2408 |
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
|
2409 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2410 |
lemma connected_component_eq_eq: |
64539 | 2411 |
"connected_component_set s x = connected_component_set s y \<longleftrightarrow> |
2412 |
x \<notin> s \<and> y \<notin> s \<or> x \<in> s \<and> y \<in> s \<and> connected_component s x y" |
|
2413 |
apply (cases "y \<in> s") |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2414 |
apply (simp add:) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2415 |
apply (metis connected_component_eq connected_component_eq_empty connected_component_refl_eq mem_Collect_eq) |
64539 | 2416 |
apply (cases "x \<in> s") |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2417 |
apply (simp add:) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2418 |
apply (metis connected_component_eq_empty) |
64539 | 2419 |
using connected_component_eq_empty |
2420 |
apply blast |
|
2421 |
done |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2422 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2423 |
lemma connected_iff_connected_component_eq: |
64539 | 2424 |
"connected s \<longleftrightarrow> (\<forall>x \<in> s. \<forall>y \<in> s. connected_component_set s x = connected_component_set s y)" |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2425 |
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
|
2426 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2427 |
lemma connected_component_idemp: |
64539 | 2428 |
"connected_component_set (connected_component_set s x) x = connected_component_set s x" |
2429 |
apply (rule subset_antisym) |
|
2430 |
apply (simp add: connected_component_subset) |
|
2431 |
apply (metis connected_component_eq_empty connected_component_maximal |
|
2432 |
connected_component_refl_eq connected_connected_component mem_Collect_eq set_eq_subset) |
|
2433 |
done |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2434 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2435 |
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
|
2436 |
"\<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
|
2437 |
\<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
|
2438 |
\<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
|
2439 |
\<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
|
2440 |
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
|
2441 |
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
|
2442 |
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
|
2443 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2444 |
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
|
2445 |
"\<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
|
2446 |
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
|
2447 |
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
|
2448 |
\<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
|
2449 |
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
|
2450 |
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
|
2451 |
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
|
2452 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2453 |
|
61952 | 2454 |
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
|
2455 |
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
|
2456 |
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
|
2457 |
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
|
2458 |
by force |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2459 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2460 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2461 |
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
|
2462 |
"s - connected_component_set s x = |
61952 | 2463 |
\<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
|
2464 |
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
|
2465 |
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
|
2466 |
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
|
2467 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2468 |
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
|
2469 |
"\<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
|
2470 |
\<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
|
2471 |
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
|
2472 |
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
|
2473 |
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
|
2474 |
|
64758
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2475 |
proposition connected_Times: |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2476 |
assumes S: "connected S" and T: "connected T" |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2477 |
shows "connected (S \<times> T)" |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2478 |
proof (clarsimp simp add: connected_iff_connected_component) |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2479 |
fix x y x' y' |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2480 |
assume xy: "x \<in> S" "y \<in> T" "x' \<in> S" "y' \<in> T" |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2481 |
with xy obtain U V where U: "connected U" "U \<subseteq> S" "x \<in> U" "x' \<in> U" |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2482 |
and V: "connected V" "V \<subseteq> T" "y \<in> V" "y' \<in> V" |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2483 |
using S T \<open>x \<in> S\<close> \<open>x' \<in> S\<close> by blast+ |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2484 |
show "connected_component (S \<times> T) (x, y) (x', y')" |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2485 |
unfolding connected_component_def |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2486 |
proof (intro exI conjI) |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2487 |
show "connected ((\<lambda>x. (x, y)) ` U \<union> Pair x' ` V)" |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2488 |
proof (rule connected_Un) |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2489 |
have "continuous_on U (\<lambda>x. (x, y))" |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2490 |
by (intro continuous_intros) |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2491 |
then show "connected ((\<lambda>x. (x, y)) ` U)" |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2492 |
by (rule connected_continuous_image) (rule \<open>connected U\<close>) |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2493 |
have "continuous_on V (Pair x')" |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2494 |
by (intro continuous_intros) |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2495 |
then show "connected (Pair x' ` V)" |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2496 |
by (rule connected_continuous_image) (rule \<open>connected V\<close>) |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2497 |
qed (use U V in auto) |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2498 |
qed (use U V in auto) |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2499 |
qed |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2500 |
|
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2501 |
corollary connected_Times_eq [simp]: |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2502 |
"connected (S \<times> T) \<longleftrightarrow> S = {} \<or> T = {} \<or> connected S \<and> connected T" (is "?lhs = ?rhs") |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2503 |
proof |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2504 |
assume L: ?lhs |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2505 |
show ?rhs |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2506 |
proof (cases "S = {} \<or> T = {}") |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2507 |
case True |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2508 |
then show ?thesis by auto |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2509 |
next |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2510 |
case False |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2511 |
have "connected (fst ` (S \<times> T))" "connected (snd ` (S \<times> T))" |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2512 |
using continuous_on_fst continuous_on_snd continuous_on_id |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2513 |
by (blast intro: connected_continuous_image [OF _ L])+ |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2514 |
with False show ?thesis |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2515 |
by auto |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2516 |
qed |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2517 |
next |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2518 |
assume ?rhs |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2519 |
then show ?lhs |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2520 |
by (auto simp: connected_Times) |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2521 |
qed |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
2522 |
|
64539 | 2523 |
|
2524 |
subsection \<open>The set of connected components of a set\<close> |
|
2525 |
||
2526 |
definition components:: "'a::topological_space set \<Rightarrow> 'a set set" |
|
2527 |
where "components s \<equiv> connected_component_set s ` s" |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2528 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2529 |
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
|
2530 |
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
|
2531 |
|
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63332
diff
changeset
|
2532 |
lemma componentsI: "x \<in> u \<Longrightarrow> connected_component_set u x \<in> components u" |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63332
diff
changeset
|
2533 |
by (auto simp: components_def) |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63332
diff
changeset
|
2534 |
|
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63332
diff
changeset
|
2535 |
lemma componentsE: |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63332
diff
changeset
|
2536 |
assumes "s \<in> components u" |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63332
diff
changeset
|
2537 |
obtains x where "x \<in> u" "s = connected_component_set u x" |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63332
diff
changeset
|
2538 |
using assms by (auto simp: components_def) |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63332
diff
changeset
|
2539 |
|
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
|
2540 |
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
|
2541 |
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
|
2542 |
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
|
2543 |
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
|
2544 |
done |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2545 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2546 |
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
|
2547 |
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
|
2548 |
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
|
2549 |
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
|
2550 |
done |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2551 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2552 |
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
|
2553 |
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
|
2554 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2555 |
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
|
2556 |
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
|
2557 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2558 |
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
|
2559 |
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
|
2560 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2561 |
lemma in_components_maximal: |
64539 | 2562 |
"c \<in> components s \<longleftrightarrow> |
2563 |
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)" |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2564 |
apply (rule iffI) |
64539 | 2565 |
apply (simp add: in_components_nonempty in_components_connected) |
2566 |
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) |
|
2567 |
apply (metis bot.extremum_uniqueI components_iff connected_component_eq_empty connected_component_maximal connected_component_subset connected_connected_component subset_emptyI) |
|
2568 |
done |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2569 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2570 |
lemma joinable_components_eq: |
64539 | 2571 |
"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" |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2572 |
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
|
2573 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2574 |
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
|
2575 |
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
|
2576 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2577 |
lemma components_nonoverlap: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2578 |
"\<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
|
2579 |
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
|
2580 |
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
|
2581 |
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
|
2582 |
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
|
2583 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2584 |
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
|
2585 |
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
|
2586 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2587 |
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
|
2588 |
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
|
2589 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2590 |
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
|
2591 |
by simp |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2592 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2593 |
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
|
2594 |
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
|
2595 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2596 |
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
|
2597 |
apply (rule iffI) |
64539 | 2598 |
using in_components_connected apply fastforce |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2599 |
apply safe |
64539 | 2600 |
using Union_components apply fastforce |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2601 |
apply (metis components_iff connected_component_eq_self) |
64539 | 2602 |
using in_components_maximal |
2603 |
apply auto |
|
2604 |
done |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2605 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2606 |
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
|
2607 |
apply (rule iffI) |
64539 | 2608 |
using connected_eq_connected_components_eq apply fastforce |
2609 |
apply (metis components_eq_sing_iff) |
|
2610 |
done |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2611 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2612 |
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
|
2613 |
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
|
2614 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2615 |
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
|
2616 |
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
|
2617 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2618 |
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
|
2619 |
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
|
2620 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2621 |
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
|
2622 |
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
|
2623 |
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
|
2624 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2625 |
lemma exists_component_superset: "\<lbrakk>t \<subseteq> s; s \<noteq> {}; connected t\<rbrakk> \<Longrightarrow> \<exists>c. c \<in> components s \<and> t \<subseteq> c" |
64539 | 2626 |
apply (cases "t = {}") |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2627 |
apply force |
64539 | 2628 |
apply (metis components_def ex_in_conv connected_component_maximal contra_subsetD image_eqI) |
2629 |
done |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2630 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2631 |
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
|
2632 |
apply (auto simp: components_iff) |
64539 | 2633 |
apply (metis connected_component_eq_empty connected_component_intermediate_subset) |
2634 |
done |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2635 |
|
61952 | 2636 |
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
|
2637 |
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
|
2638 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2639 |
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
|
2640 |
assumes cs: "connected s" and st: "s \<subseteq> t" and ts: "t \<subseteq> closure s" |
64539 | 2641 |
shows "connected t" |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2642 |
proof (rule connectedI) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2643 |
fix A B |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2644 |
assume A: "open A" and B: "open B" and Alap: "A \<inter> t \<noteq> {}" and Blap: "B \<inter> t \<noteq> {}" |
64539 | 2645 |
and disj: "A \<inter> B \<inter> t = {}" and cover: "t \<subseteq> A \<union> B" |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2646 |
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
|
2647 |
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
|
2648 |
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
|
2649 |
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
|
2650 |
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
|
2651 |
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
|
2652 |
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
|
2653 |
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
|
2654 |
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
|
2655 |
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
|
2656 |
then show False |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2657 |
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
|
2658 |
by blast |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2659 |
qed |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2660 |
|
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
|
2661 |
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
|
2662 |
proof (cases "connected_component_set s x = {}") |
64539 | 2663 |
case True |
2664 |
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
|
2665 |
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
|
2666 |
next |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2667 |
case False |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2668 |
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
|
2669 |
by blast |
64539 | 2670 |
have *: "connected_component_set s x \<subseteq> s \<inter> closure (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
|
2671 |
by (auto simp: closure_def connected_component_in) |
64539 | 2672 |
have "connected_component s x y \<Longrightarrow> s \<inter> closure (connected_component_set s x) \<subseteq> 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
|
2673 |
apply (rule connected_component_maximal) |
64539 | 2674 |
apply simp |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2675 |
using closure_subset connected_component_in apply fastforce |
64539 | 2676 |
using * connected_intermediate_closure apply blast+ |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2677 |
done |
64539 | 2678 |
with y * show ?thesis |
2679 |
by (auto simp add: Topology_Euclidean_Space.closedin_closed) |
|
2680 |
qed |
|
2681 |
||
2682 |
||
2683 |
subsection \<open>Frontier (also known as boundary)\<close> |
|
33175 | 2684 |
|
2685 |
definition "frontier S = closure S - interior S" |
|
2686 |
||
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
2687 |
lemma frontier_closed [iff]: "closed (frontier S)" |
33175 | 2688 |
by (simp add: frontier_def closed_Diff) |
2689 |
||
64539 | 2690 |
lemma frontier_closures: "frontier S = closure S \<inter> closure (- S)" |
33175 | 2691 |
by (auto simp add: frontier_def interior_closure) |
2692 |
||
2693 |
lemma frontier_straddle: |
|
2694 |
fixes a :: "'a::metric_space" |
|
44909 | 2695 |
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))" |
2696 |
unfolding frontier_def closure_interior |
|
2697 |
by (auto simp add: mem_interior subset_eq ball_def) |
|
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
2698 |
|
33175 | 2699 |
lemma frontier_subset_closed: "closed S \<Longrightarrow> frontier S \<subseteq> S" |
2700 |
by (metis frontier_def closure_closed Diff_subset) |
|
2701 |
||
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
2702 |
lemma frontier_empty [simp]: "frontier {} = {}" |
36362
06475a1547cb
fix lots of looping simp calls and other warnings
huffman
parents:
36360
diff
changeset
|
2703 |
by (simp add: frontier_def) |
33175 | 2704 |
|
2705 |
lemma frontier_subset_eq: "frontier S \<subseteq> S \<longleftrightarrow> closed S" |
|
58757 | 2706 |
proof - |
53255 | 2707 |
{ |
2708 |
assume "frontier S \<subseteq> S" |
|
2709 |
then have "closure S \<subseteq> S" |
|
2710 |
using interior_subset unfolding frontier_def by auto |
|
2711 |
then have "closed S" |
|
2712 |
using closure_subset_eq by auto |
|
33175 | 2713 |
} |
53255 | 2714 |
then show ?thesis using frontier_subset_closed[of S] .. |
33175 | 2715 |
qed |
2716 |
||
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
2717 |
lemma frontier_complement [simp]: "frontier (- S) = frontier S" |
33175 | 2718 |
by (auto simp add: frontier_def closure_complement interior_complement) |
2719 |
||
2720 |
lemma frontier_disjoint_eq: "frontier S \<inter> S = {} \<longleftrightarrow> open S" |
|
34105 | 2721 |
using frontier_complement frontier_subset_eq[of "- S"] |
2722 |
unfolding open_closed by auto |
|
33175 | 2723 |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2724 |
lemma frontier_UNIV [simp]: "frontier UNIV = {}" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2725 |
using frontier_complement frontier_empty by fastforce |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2726 |
|
58757 | 2727 |
|
60420 | 2728 |
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
|
2729 |
|
64539 | 2730 |
definition indirection :: "'a::real_normed_vector \<Rightarrow> 'a \<Rightarrow> 'a filter" (infixr "indirection" 70) |
52624 | 2731 |
where "a indirection v = at a within {b. \<exists>c\<ge>0. b - a = scaleR c v}" |
33175 | 2732 |
|
60420 | 2733 |
text \<open>Identify Trivial limits, where we can't approach arbitrarily closely.\<close> |
33175 | 2734 |
|
52624 | 2735 |
lemma trivial_limit_within: "trivial_limit (at a within S) \<longleftrightarrow> \<not> a islimpt S" |
33175 | 2736 |
proof |
2737 |
assume "trivial_limit (at a within S)" |
|
53255 | 2738 |
then show "\<not> a islimpt S" |
33175 | 2739 |
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
|
2740 |
unfolding eventually_at_topological |
33175 | 2741 |
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
|
2742 |
apply (clarsimp simp add: set_eq_iff) |
33175 | 2743 |
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
|
2744 |
apply (clarsimp, drule_tac x=y in bspec, simp_all) |
33175 | 2745 |
done |
2746 |
next |
|
2747 |
assume "\<not> a islimpt S" |
|
53255 | 2748 |
then show "trivial_limit (at a within S)" |
55775 | 2749 |
unfolding trivial_limit_def eventually_at_topological islimpt_def |
2750 |
by metis |
|
33175 | 2751 |
qed |
2752 |
||
2753 |
lemma trivial_limit_at_iff: "trivial_limit (at a) \<longleftrightarrow> \<not> a islimpt UNIV" |
|
45031 | 2754 |
using trivial_limit_within [of a UNIV] by simp |
33175 | 2755 |
|
64539 | 2756 |
lemma trivial_limit_at: "\<not> trivial_limit (at a)" |
2757 |
for a :: "'a::perfect_space" |
|
44571 | 2758 |
by (rule at_neq_bot) |
33175 | 2759 |
|
2760 |
lemma trivial_limit_at_infinity: |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44076
diff
changeset
|
2761 |
"\<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
|
2762 |
unfolding trivial_limit_def eventually_at_infinity |
246493d61204
define nets directly as filters, instead of as filter bases
huffman
parents:
36336
diff
changeset
|
2763 |
apply clarsimp |
44072
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
2764 |
apply (subgoal_tac "\<exists>x::'a. x \<noteq> 0", clarify) |
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
2765 |
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
|
2766 |
apply (cut_tac islimpt_UNIV [of "0::'a", unfolded islimpt_def]) |
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
2767 |
apply (drule_tac x=UNIV in spec, simp) |
33175 | 2768 |
done |
2769 |
||
53640 | 2770 |
lemma not_trivial_limit_within: "\<not> trivial_limit (at x within S) = (x \<in> closure (S - {x}))" |
64539 | 2771 |
using islimpt_in_closure by (metis trivial_limit_within) |
2772 |
||
2773 |
lemma at_within_eq_bot_iff: "at c within A = bot \<longleftrightarrow> c \<notin> closure (A - {c})" |
|
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2774 |
using not_trivial_limit_within[of c A] by blast |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2775 |
|
60420 | 2776 |
text \<open>Some property holds "sufficiently close" to the limit point.\<close> |
33175 | 2777 |
|
2778 |
lemma trivial_limit_eventually: "trivial_limit net \<Longrightarrow> eventually P net" |
|
45031 | 2779 |
by simp |
33175 | 2780 |
|
2781 |
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
|
2782 |
by (simp add: filter_eq_iff) |
33175 | 2783 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2784 |
|
60420 | 2785 |
subsection \<open>Limits\<close> |
33175 | 2786 |
|
64539 | 2787 |
lemma Lim: "(f \<longlongrightarrow> l) net \<longleftrightarrow> trivial_limit net \<or> (\<forall>e>0. eventually (\<lambda>x. dist (f x) l < e) net)" |
2788 |
by (auto simp: tendsto_iff trivial_limit_eq) |
|
2789 |
||
2790 |
text \<open>Show that they yield usual definitions in the various cases.\<close> |
|
33175 | 2791 |
|
61973 | 2792 |
lemma Lim_within_le: "(f \<longlongrightarrow> l)(at a within S) \<longleftrightarrow> |
53640 | 2793 |
(\<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
|
2794 |
by (auto simp add: tendsto_iff eventually_at_le) |
33175 | 2795 |
|
61973 | 2796 |
lemma Lim_within: "(f \<longlongrightarrow> l) (at a within S) \<longleftrightarrow> |
53640 | 2797 |
(\<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
|
2798 |
by (auto simp add: tendsto_iff eventually_at) |
33175 | 2799 |
|
62131
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
2800 |
corollary Lim_withinI [intro?]: |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
2801 |
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
|
2802 |
shows "(f \<longlongrightarrow> l) (at a within S)" |
64539 | 2803 |
apply (simp add: Lim_within, clarify) |
2804 |
apply (rule ex_forward [OF assms [OF half_gt_zero]]) |
|
2805 |
apply auto |
|
2806 |
done |
|
62131
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
2807 |
|
61973 | 2808 |
lemma Lim_at: "(f \<longlongrightarrow> l) (at a) \<longleftrightarrow> |
53640 | 2809 |
(\<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
|
2810 |
by (auto simp add: tendsto_iff eventually_at) |
33175 | 2811 |
|
64539 | 2812 |
lemma Lim_at_infinity: "(f \<longlongrightarrow> l) at_infinity \<longleftrightarrow> (\<forall>e>0. \<exists>b. \<forall>x. norm x \<ge> b \<longrightarrow> dist (f x) l < e)" |
33175 | 2813 |
by (auto simp add: tendsto_iff eventually_at_infinity) |
2814 |
||
62131
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
2815 |
corollary Lim_at_infinityI [intro?]: |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
2816 |
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
|
2817 |
shows "(f \<longlongrightarrow> l) at_infinity" |
64539 | 2818 |
apply (simp add: Lim_at_infinity, clarify) |
2819 |
apply (rule ex_forward [OF assms [OF half_gt_zero]]) |
|
2820 |
apply auto |
|
2821 |
done |
|
62131
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
2822 |
|
61973 | 2823 |
lemma Lim_eventually: "eventually (\<lambda>x. f x = l) net \<Longrightarrow> (f \<longlongrightarrow> l) net" |
64539 | 2824 |
by (rule topological_tendstoI) (auto elim: eventually_mono) |
33175 | 2825 |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2826 |
lemma Lim_transform_within_set: |
63301 | 2827 |
fixes a :: "'a::metric_space" and l :: "'b::metric_space" |
2828 |
shows "\<lbrakk>(f \<longlongrightarrow> l) (at a within S); eventually (\<lambda>x. x \<in> S \<longleftrightarrow> x \<in> T) (at a)\<rbrakk> |
|
2829 |
\<Longrightarrow> (f \<longlongrightarrow> l) (at a within T)" |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2830 |
apply (clarsimp simp: eventually_at Lim_within) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2831 |
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
|
2832 |
apply (rename_tac k) |
63301 | 2833 |
apply (rule_tac x="min d k" in exI, simp) |
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2834 |
done |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2835 |
|
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2836 |
lemma Lim_transform_within_set_eq: |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2837 |
fixes a l :: "'a::real_normed_vector" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2838 |
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
|
2839 |
\<Longrightarrow> ((f \<longlongrightarrow> l) (at a within s) \<longleftrightarrow> (f \<longlongrightarrow> l) (at a within t))" |
64539 | 2840 |
by (force intro: Lim_transform_within_set elim: eventually_mono) |
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2841 |
|
63301 | 2842 |
lemma Lim_transform_within_openin: |
2843 |
fixes a :: "'a::metric_space" |
|
2844 |
assumes f: "(f \<longlongrightarrow> l) (at a within T)" |
|
64539 | 2845 |
and "openin (subtopology euclidean T) S" "a \<in> S" |
2846 |
and eq: "\<And>x. \<lbrakk>x \<in> S; x \<noteq> a\<rbrakk> \<Longrightarrow> f x = g x" |
|
63301 | 2847 |
shows "(g \<longlongrightarrow> l) (at a within T)" |
2848 |
proof - |
|
2849 |
obtain \<epsilon> where "0 < \<epsilon>" and \<epsilon>: "ball a \<epsilon> \<inter> T \<subseteq> S" |
|
2850 |
using assms by (force simp: openin_contains_ball) |
|
2851 |
then have "a \<in> ball a \<epsilon>" |
|
64539 | 2852 |
by simp |
63301 | 2853 |
show ?thesis |
64539 | 2854 |
by (rule Lim_transform_within [OF f \<open>0 < \<epsilon>\<close> eq]) (use \<epsilon> in \<open>auto simp: dist_commute subset_iff\<close>) |
63301 | 2855 |
qed |
2856 |
||
2857 |
lemma continuous_transform_within_openin: |
|
2858 |
fixes a :: "'a::metric_space" |
|
2859 |
assumes "continuous (at a within T) f" |
|
64539 | 2860 |
and "openin (subtopology euclidean T) S" "a \<in> S" |
2861 |
and eq: "\<And>x. x \<in> S \<Longrightarrow> f x = g x" |
|
63301 | 2862 |
shows "continuous (at a within T) g" |
64539 | 2863 |
using assms by (simp add: Lim_transform_within_openin continuous_within) |
2864 |
||
2865 |
text \<open>The expected monotonicity property.\<close> |
|
33175 | 2866 |
|
53255 | 2867 |
lemma Lim_Un: |
61973 | 2868 |
assumes "(f \<longlongrightarrow> l) (at x within S)" "(f \<longlongrightarrow> l) (at x within T)" |
2869 |
shows "(f \<longlongrightarrow> l) (at x within (S \<union> T))" |
|
53860 | 2870 |
using assms unfolding at_within_union by (rule filterlim_sup) |
33175 | 2871 |
|
2872 |
lemma Lim_Un_univ: |
|
61973 | 2873 |
"(f \<longlongrightarrow> l) (at x within S) \<Longrightarrow> (f \<longlongrightarrow> l) (at x within T) \<Longrightarrow> |
2874 |
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
|
2875 |
by (metis Lim_Un) |
33175 | 2876 |
|
64539 | 2877 |
text \<open>Interrelations between restricted and unrestricted limits.\<close> |
2878 |
||
2879 |
lemma Lim_at_imp_Lim_at_within: "(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
|
2880 |
by (metis order_refl filterlim_mono subset_UNIV at_le) |
33175 | 2881 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2882 |
lemma eventually_within_interior: |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2883 |
assumes "x \<in> interior S" |
53255 | 2884 |
shows "eventually P (at x within S) \<longleftrightarrow> eventually P (at x)" |
2885 |
(is "?lhs = ?rhs") |
|
2886 |
proof |
|
44519 | 2887 |
from assms obtain T where T: "open T" "x \<in> T" "T \<subseteq> S" .. |
53255 | 2888 |
{ |
64539 | 2889 |
assume ?lhs |
53640 | 2890 |
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" |
64539 | 2891 |
by (auto simp: eventually_at_topological) |
53640 | 2892 |
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
|
2893 |
by auto |
64539 | 2894 |
then show ?rhs |
2895 |
by (auto simp: eventually_at_topological) |
|
53255 | 2896 |
next |
64539 | 2897 |
assume ?rhs |
2898 |
then show ?lhs |
|
61810 | 2899 |
by (auto elim: eventually_mono simp: eventually_at_filter) |
52624 | 2900 |
} |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2901 |
qed |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2902 |
|
64539 | 2903 |
lemma at_within_interior: "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
|
2904 |
unfolding filter_eq_iff by (intro allI eventually_within_interior) |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2905 |
|
43338 | 2906 |
lemma Lim_within_LIMSEQ: |
53862 | 2907 |
fixes a :: "'a::first_countable_topology" |
61969 | 2908 |
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 | 2909 |
shows "(X \<longlongrightarrow> L) (at a within T)" |
44584 | 2910 |
using assms unfolding tendsto_def [where l=L] |
2911 |
by (simp add: sequentially_imp_eventually_within) |
|
43338 | 2912 |
|
2913 |
lemma Lim_right_bound: |
|
51773 | 2914 |
fixes f :: "'a :: {linorder_topology, conditionally_complete_linorder, no_top} \<Rightarrow> |
2915 |
'b::{linorder_topology, conditionally_complete_linorder}" |
|
43338 | 2916 |
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 | 2917 |
and bnd: "\<And>a. a \<in> I \<Longrightarrow> x < a \<Longrightarrow> K \<le> f a" |
61973 | 2918 |
shows "(f \<longlongrightarrow> Inf (f ` ({x<..} \<inter> I))) (at x within ({x<..} \<inter> I))" |
53640 | 2919 |
proof (cases "{x<..} \<inter> I = {}") |
2920 |
case True |
|
53859 | 2921 |
then show ?thesis by simp |
43338 | 2922 |
next |
53640 | 2923 |
case False |
43338 | 2924 |
show ?thesis |
51518
6a56b7088a6a
separate SupInf into Conditional_Complete_Lattice, move instantiation of real to RealDef
hoelzl
parents:
51481
diff
changeset
|
2925 |
proof (rule order_tendstoI) |
53282 | 2926 |
fix a |
2927 |
assume a: "a < Inf (f ` ({x<..} \<inter> I))" |
|
53255 | 2928 |
{ |
2929 |
fix y |
|
2930 |
assume "y \<in> {x<..} \<inter> I" |
|
53640 | 2931 |
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
|
2932 |
by (auto intro!: cInf_lower bdd_belowI2) |
53255 | 2933 |
with a have "a < f y" |
2934 |
by (blast intro: less_le_trans) |
|
2935 |
} |
|
51518
6a56b7088a6a
separate SupInf into Conditional_Complete_Lattice, move instantiation of real to RealDef
hoelzl
parents:
51481
diff
changeset
|
2936 |
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
|
2937 |
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
|
2938 |
next |
53255 | 2939 |
fix a |
2940 |
assume "Inf (f ` ({x<..} \<inter> I)) < a" |
|
53640 | 2941 |
from cInf_lessD[OF _ this] False obtain y where y: "x < y" "y \<in> I" "f y < a" |
53255 | 2942 |
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
|
2943 |
then have "eventually (\<lambda>x. x \<in> I \<longrightarrow> f x < a) (at_right x)" |
60420 | 2944 |
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
|
2945 |
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
|
2946 |
unfolding eventually_at_filter by eventually_elim simp |
43338 | 2947 |
qed |
2948 |
qed |
|
2949 |
||
64539 | 2950 |
text \<open>Another limit point characterization.\<close> |
33175 | 2951 |
|
63301 | 2952 |
lemma limpt_sequential_inj: |
2953 |
fixes x :: "'a::metric_space" |
|
2954 |
shows "x islimpt S \<longleftrightarrow> |
|
2955 |
(\<exists>f. (\<forall>n::nat. f n \<in> S - {x}) \<and> inj f \<and> (f \<longlongrightarrow> x) sequentially)" |
|
2956 |
(is "?lhs = ?rhs") |
|
2957 |
proof |
|
2958 |
assume ?lhs |
|
2959 |
then have "\<forall>e>0. \<exists>x'\<in>S. x' \<noteq> x \<and> dist x' x < e" |
|
2960 |
by (force simp: islimpt_approachable) |
|
2961 |
then obtain y where y: "\<And>e. e>0 \<Longrightarrow> y e \<in> S \<and> y e \<noteq> x \<and> dist (y e) x < e" |
|
2962 |
by metis |
|
2963 |
define f where "f \<equiv> rec_nat (y 1) (\<lambda>n fn. y (min (inverse(2 ^ (Suc n))) (dist fn x)))" |
|
2964 |
have [simp]: "f 0 = y 1" |
|
2965 |
"f(Suc n) = y (min (inverse(2 ^ (Suc n))) (dist (f n) x))" for n |
|
2966 |
by (simp_all add: f_def) |
|
2967 |
have f: "f n \<in> S \<and> (f n \<noteq> x) \<and> dist (f n) x < inverse(2 ^ n)" for n |
|
2968 |
proof (induction n) |
|
2969 |
case 0 show ?case |
|
2970 |
by (simp add: y) |
|
2971 |
next |
|
2972 |
case (Suc n) then show ?case |
|
2973 |
apply (auto simp: y) |
|
2974 |
by (metis half_gt_zero_iff inverse_positive_iff_positive less_divide_eq_numeral1(1) min_less_iff_conj y zero_less_dist_iff zero_less_numeral zero_less_power) |
|
2975 |
qed |
|
2976 |
show ?rhs |
|
2977 |
proof (rule_tac x=f in exI, intro conjI allI) |
|
2978 |
show "\<And>n. f n \<in> S - {x}" |
|
2979 |
using f by blast |
|
2980 |
have "dist (f n) x < dist (f m) x" if "m < n" for m n |
|
2981 |
using that |
|
2982 |
proof (induction n) |
|
2983 |
case 0 then show ?case by simp |
|
2984 |
next |
|
2985 |
case (Suc n) |
|
2986 |
then consider "m < n" | "m = n" using less_Suc_eq by blast |
|
2987 |
then show ?case |
|
2988 |
proof cases |
|
2989 |
assume "m < n" |
|
2990 |
have "dist (f(Suc n)) x = dist (y (min (inverse(2 ^ (Suc n))) (dist (f n) x))) x" |
|
2991 |
by simp |
|
2992 |
also have "... < dist (f n) x" |
|
2993 |
by (metis dist_pos_lt f min.strict_order_iff min_less_iff_conj y) |
|
2994 |
also have "... < dist (f m) x" |
|
2995 |
using Suc.IH \<open>m < n\<close> by blast |
|
2996 |
finally show ?thesis . |
|
2997 |
next |
|
2998 |
assume "m = n" then show ?case |
|
2999 |
by simp (metis dist_pos_lt f half_gt_zero_iff inverse_positive_iff_positive min_less_iff_conj y zero_less_numeral zero_less_power) |
|
3000 |
qed |
|
3001 |
qed |
|
3002 |
then show "inj f" |
|
3003 |
by (metis less_irrefl linorder_injI) |
|
3004 |
show "f \<longlonglongrightarrow> x" |
|
3005 |
apply (rule tendstoI) |
|
3006 |
apply (rule_tac c="nat (ceiling(1/e))" in eventually_sequentiallyI) |
|
3007 |
apply (rule less_trans [OF f [THEN conjunct2, THEN conjunct2]]) |
|
3008 |
apply (simp add: field_simps) |
|
3009 |
by (meson le_less_trans mult_less_cancel_left not_le of_nat_less_two_power) |
|
3010 |
qed |
|
3011 |
next |
|
3012 |
assume ?rhs |
|
3013 |
then show ?lhs |
|
3014 |
by (fastforce simp add: islimpt_approachable lim_sequentially) |
|
3015 |
qed |
|
3016 |
||
3017 |
(*could prove directly from islimpt_sequential_inj, but only for metric spaces*) |
|
33175 | 3018 |
lemma islimpt_sequential: |
50883 | 3019 |
fixes x :: "'a::first_countable_topology" |
61973 | 3020 |
shows "x islimpt S \<longleftrightarrow> (\<exists>f. (\<forall>n::nat. f n \<in> S - {x}) \<and> (f \<longlongrightarrow> x) sequentially)" |
33175 | 3021 |
(is "?lhs = ?rhs") |
3022 |
proof |
|
3023 |
assume ?lhs |
|
55522 | 3024 |
from countable_basis_at_decseq[of x] obtain A where A: |
3025 |
"\<And>i. open (A i)" |
|
3026 |
"\<And>i. x \<in> A i" |
|
3027 |
"\<And>S. open S \<Longrightarrow> x \<in> S \<Longrightarrow> eventually (\<lambda>i. A i \<subseteq> S) sequentially" |
|
3028 |
by blast |
|
63040 | 3029 |
define f where "f n = (SOME y. y \<in> S \<and> y \<in> A n \<and> x \<noteq> y)" for n |
53255 | 3030 |
{ |
3031 |
fix n |
|
60420 | 3032 |
from \<open>?lhs\<close> have "\<exists>y. y \<in> S \<and> y \<in> A n \<and> x \<noteq> y" |
50883 | 3033 |
unfolding islimpt_def using A(1,2)[of n] by auto |
3034 |
then have "f n \<in> S \<and> f n \<in> A n \<and> x \<noteq> f n" |
|
3035 |
unfolding f_def by (rule someI_ex) |
|
53255 | 3036 |
then have "f n \<in> S" "f n \<in> A n" "x \<noteq> f n" by auto |
3037 |
} |
|
50883 | 3038 |
then have "\<forall>n. f n \<in> S - {x}" by auto |
61969 | 3039 |
moreover have "(\<lambda>n. f n) \<longlonglongrightarrow> x" |
50883 | 3040 |
proof (rule topological_tendstoI) |
53255 | 3041 |
fix S |
3042 |
assume "open S" "x \<in> S" |
|
60420 | 3043 |
from A(3)[OF this] \<open>\<And>n. f n \<in> A n\<close> |
53255 | 3044 |
show "eventually (\<lambda>x. f x \<in> S) sequentially" |
61810 | 3045 |
by (auto elim!: eventually_mono) |
44584 | 3046 |
qed |
3047 |
ultimately show ?rhs by fast |
|
33175 | 3048 |
next |
3049 |
assume ?rhs |
|
61969 | 3050 |
then obtain f :: "nat \<Rightarrow> 'a" where f: "\<And>n. f n \<in> S - {x}" and lim: "f \<longlonglongrightarrow> x" |
53255 | 3051 |
by auto |
50883 | 3052 |
show ?lhs |
3053 |
unfolding islimpt_def |
|
3054 |
proof safe |
|
53255 | 3055 |
fix T |
3056 |
assume "open T" "x \<in> T" |
|
50883 | 3057 |
from lim[THEN topological_tendstoD, OF this] f |
3058 |
show "\<exists>y\<in>S. y \<in> T \<and> y \<noteq> x" |
|
3059 |
unfolding eventually_sequentially by auto |
|
3060 |
qed |
|
33175 | 3061 |
qed |
3062 |
||
3063 |
lemma Lim_null: |
|
3064 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
|
61973 | 3065 |
shows "(f \<longlongrightarrow> l) net \<longleftrightarrow> ((\<lambda>x. f(x) - l) \<longlongrightarrow> 0) net" |
33175 | 3066 |
by (simp add: Lim dist_norm) |
3067 |
||
3068 |
lemma Lim_null_comparison: |
|
3069 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
|
61973 | 3070 |
assumes "eventually (\<lambda>x. norm (f x) \<le> g x) net" "(g \<longlongrightarrow> 0) net" |
3071 |
shows "(f \<longlongrightarrow> 0) net" |
|
53282 | 3072 |
using assms(2) |
44252
10362a07eb7c
Topology_Euclidean_Space.thy: simplify some proofs
huffman
parents:
44250
diff
changeset
|
3073 |
proof (rule metric_tendsto_imp_tendsto) |
10362a07eb7c
Topology_Euclidean_Space.thy: simplify some proofs
huffman
parents:
44250
diff
changeset
|
3074 |
show "eventually (\<lambda>x. dist (f x) 0 \<le> dist (g x) 0) net" |
61810 | 3075 |
using assms(1) by (rule eventually_mono) (simp add: dist_norm) |
33175 | 3076 |
qed |
3077 |
||
3078 |
lemma Lim_transform_bound: |
|
3079 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
|
53255 | 3080 |
and g :: "'a \<Rightarrow> 'c::real_normed_vector" |
53640 | 3081 |
assumes "eventually (\<lambda>n. norm (f n) \<le> norm (g n)) net" |
61973 | 3082 |
and "(g \<longlongrightarrow> 0) net" |
3083 |
shows "(f \<longlongrightarrow> 0) net" |
|
44252
10362a07eb7c
Topology_Euclidean_Space.thy: simplify some proofs
huffman
parents:
44250
diff
changeset
|
3084 |
using assms(1) tendsto_norm_zero [OF assms(2)] |
10362a07eb7c
Topology_Euclidean_Space.thy: simplify some proofs
huffman
parents:
44250
diff
changeset
|
3085 |
by (rule Lim_null_comparison) |
33175 | 3086 |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3087 |
lemma lim_null_mult_right_bounded: |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3088 |
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
|
3089 |
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
|
3090 |
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
|
3091 |
proof - |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3092 |
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
|
3093 |
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
|
3094 |
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
|
3095 |
apply (rule Lim_null_comparison [OF _ *]) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3096 |
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
|
3097 |
done |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3098 |
then show ?thesis |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3099 |
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
|
3100 |
qed |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3101 |
|
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3102 |
lemma lim_null_mult_left_bounded: |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3103 |
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
|
3104 |
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
|
3105 |
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
|
3106 |
proof - |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3107 |
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
|
3108 |
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
|
3109 |
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
|
3110 |
apply (rule Lim_null_comparison [OF _ *]) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3111 |
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
|
3112 |
done |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3113 |
then show ?thesis |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3114 |
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
|
3115 |
qed |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3116 |
|
63128 | 3117 |
lemma lim_null_scaleR_bounded: |
3118 |
assumes f: "(f \<longlongrightarrow> 0) net" and gB: "eventually (\<lambda>a. f a = 0 \<or> norm(g a) \<le> B) net" |
|
3119 |
shows "((\<lambda>n. f n *\<^sub>R g n) \<longlongrightarrow> 0) net" |
|
3120 |
proof |
|
3121 |
fix \<epsilon>::real |
|
3122 |
assume "0 < \<epsilon>" |
|
3123 |
then have B: "0 < \<epsilon> / (abs B + 1)" by simp |
|
3124 |
have *: "\<bar>f x\<bar> * norm (g x) < \<epsilon>" if f: "\<bar>f x\<bar> * (\<bar>B\<bar> + 1) < \<epsilon>" and g: "norm (g x) \<le> B" for x |
|
3125 |
proof - |
|
3126 |
have "\<bar>f x\<bar> * norm (g x) \<le> \<bar>f x\<bar> * B" |
|
3127 |
by (simp add: mult_left_mono g) |
|
3128 |
also have "... \<le> \<bar>f x\<bar> * (\<bar>B\<bar> + 1)" |
|
3129 |
by (simp add: mult_left_mono) |
|
3130 |
also have "... < \<epsilon>" |
|
3131 |
by (rule f) |
|
3132 |
finally show ?thesis . |
|
3133 |
qed |
|
3134 |
show "\<forall>\<^sub>F x in net. dist (f x *\<^sub>R g x) 0 < \<epsilon>" |
|
3135 |
apply (rule eventually_mono [OF eventually_conj [OF tendstoD [OF f B] gB] ]) |
|
3136 |
apply (auto simp: \<open>0 < \<epsilon>\<close> divide_simps * split: if_split_asm) |
|
3137 |
done |
|
3138 |
qed |
|
3139 |
||
60420 | 3140 |
text\<open>Deducing things about the limit from the elements.\<close> |
33175 | 3141 |
|
3142 |
lemma Lim_in_closed_set: |
|
53255 | 3143 |
assumes "closed S" |
3144 |
and "eventually (\<lambda>x. f(x) \<in> S) net" |
|
61973 | 3145 |
and "\<not> trivial_limit net" "(f \<longlongrightarrow> l) net" |
33175 | 3146 |
shows "l \<in> S" |
3147 |
proof (rule ccontr) |
|
3148 |
assume "l \<notin> S" |
|
60420 | 3149 |
with \<open>closed S\<close> have "open (- S)" "l \<in> - S" |
33175 | 3150 |
by (simp_all add: open_Compl) |
3151 |
with assms(4) have "eventually (\<lambda>x. f x \<in> - S) net" |
|
3152 |
by (rule topological_tendstoD) |
|
3153 |
with assms(2) have "eventually (\<lambda>x. False) net" |
|
3154 |
by (rule eventually_elim2) simp |
|
3155 |
with assms(3) show "False" |
|
3156 |
by (simp add: eventually_False) |
|
3157 |
qed |
|
3158 |
||
60420 | 3159 |
text\<open>Need to prove closed(cball(x,e)) before deducing this as a corollary.\<close> |
33175 | 3160 |
|
3161 |
lemma Lim_dist_ubound: |
|
53255 | 3162 |
assumes "\<not>(trivial_limit net)" |
61973 | 3163 |
and "(f \<longlongrightarrow> l) net" |
53640 | 3164 |
and "eventually (\<lambda>x. dist a (f x) \<le> e) net" |
3165 |
shows "dist a l \<le> e" |
|
56290 | 3166 |
using assms by (fast intro: tendsto_le tendsto_intros) |
33175 | 3167 |
|
3168 |
lemma Lim_norm_ubound: |
|
3169 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
|
61973 | 3170 |
assumes "\<not>(trivial_limit net)" "(f \<longlongrightarrow> l) net" "eventually (\<lambda>x. norm(f x) \<le> e) net" |
53255 | 3171 |
shows "norm(l) \<le> e" |
56290 | 3172 |
using assms by (fast intro: tendsto_le tendsto_intros) |
33175 | 3173 |
|
3174 |
lemma Lim_norm_lbound: |
|
3175 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
|
53640 | 3176 |
assumes "\<not> trivial_limit net" |
61973 | 3177 |
and "(f \<longlongrightarrow> l) net" |
53640 | 3178 |
and "eventually (\<lambda>x. e \<le> norm (f x)) net" |
33175 | 3179 |
shows "e \<le> norm l" |
56290 | 3180 |
using assms by (fast intro: tendsto_le tendsto_intros) |
33175 | 3181 |
|
60420 | 3182 |
text\<open>Limit under bilinear function\<close> |
33175 | 3183 |
|
3184 |
lemma Lim_bilinear: |
|
61973 | 3185 |
assumes "(f \<longlongrightarrow> l) net" |
3186 |
and "(g \<longlongrightarrow> m) net" |
|
53282 | 3187 |
and "bounded_bilinear h" |
61973 | 3188 |
shows "((\<lambda>x. h (f x) (g x)) \<longlongrightarrow> (h l m)) net" |
3189 |
using \<open>bounded_bilinear h\<close> \<open>(f \<longlongrightarrow> l) net\<close> \<open>(g \<longlongrightarrow> m) net\<close> |
|
52624 | 3190 |
by (rule bounded_bilinear.tendsto) |
33175 | 3191 |
|
60420 | 3192 |
text\<open>These are special for limits out of the same vector space.\<close> |
33175 | 3193 |
|
61973 | 3194 |
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
|
3195 |
unfolding id_def by (rule tendsto_ident_at) |
33175 | 3196 |
|
61973 | 3197 |
lemma Lim_at_id: "(id \<longlongrightarrow> a) (at a)" |
45031 | 3198 |
unfolding id_def by (rule tendsto_ident_at) |
33175 | 3199 |
|
3200 |
lemma Lim_at_zero: |
|
3201 |
fixes a :: "'a::real_normed_vector" |
|
53291 | 3202 |
and l :: "'b::topological_space" |
61973 | 3203 |
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
|
3204 |
using LIM_offset_zero LIM_offset_zero_cancel .. |
33175 | 3205 |
|
60420 | 3206 |
text\<open>It's also sometimes useful to extract the limit point from the filter.\<close> |
33175 | 3207 |
|
52624 | 3208 |
abbreviation netlimit :: "'a::t2_space filter \<Rightarrow> 'a" |
3209 |
where "netlimit F \<equiv> Lim F (\<lambda>x. x)" |
|
33175 | 3210 |
|
53282 | 3211 |
lemma netlimit_within: "\<not> trivial_limit (at a within S) \<Longrightarrow> netlimit (at a within S) = a" |
51365 | 3212 |
by (rule tendsto_Lim) (auto intro: tendsto_intros) |
33175 | 3213 |
|
3214 |
lemma netlimit_at: |
|
44072
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
3215 |
fixes a :: "'a::{perfect_space,t2_space}" |
33175 | 3216 |
shows "netlimit (at a) = a" |
45031 | 3217 |
using netlimit_within [of a UNIV] by simp |
33175 | 3218 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
3219 |
lemma lim_within_interior: |
61973 | 3220 |
"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
|
3221 |
by (metis at_within_interior) |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
3222 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
3223 |
lemma netlimit_within_interior: |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
3224 |
fixes x :: "'a::{t2_space,perfect_space}" |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
3225 |
assumes "x \<in> interior S" |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
3226 |
shows "netlimit (at x within S) = x" |
52624 | 3227 |
using assms by (metis at_within_interior netlimit_at) |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
3228 |
|
61824
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
3229 |
lemma netlimit_at_vector: |
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
3230 |
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
|
3231 |
shows "netlimit (at a) = a" |
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
3232 |
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
|
3233 |
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
|
3234 |
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
|
3235 |
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
|
3236 |
apply clarsimp |
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
3237 |
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
|
3238 |
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
|
3239 |
done |
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
3240 |
then show ?thesis |
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
3241 |
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
|
3242 |
qed simp |
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
3243 |
|
33175 | 3244 |
|
60420 | 3245 |
text\<open>Useful lemmas on closure and set of possible sequential limits.\<close> |
33175 | 3246 |
|
3247 |
lemma closure_sequential: |
|
50883 | 3248 |
fixes l :: "'a::first_countable_topology" |
61973 | 3249 |
shows "l \<in> closure S \<longleftrightarrow> (\<exists>x. (\<forall>n. x n \<in> S) \<and> (x \<longlongrightarrow> l) sequentially)" |
53291 | 3250 |
(is "?lhs = ?rhs") |
33175 | 3251 |
proof |
53282 | 3252 |
assume "?lhs" |
3253 |
moreover |
|
3254 |
{ |
|
3255 |
assume "l \<in> S" |
|
3256 |
then have "?rhs" using tendsto_const[of l sequentially] by auto |
|
52624 | 3257 |
} |
3258 |
moreover |
|
53282 | 3259 |
{ |
3260 |
assume "l islimpt S" |
|
3261 |
then have "?rhs" unfolding islimpt_sequential by auto |
|
52624 | 3262 |
} |
3263 |
ultimately show "?rhs" |
|
3264 |
unfolding closure_def by auto |
|
33175 | 3265 |
next |
3266 |
assume "?rhs" |
|
53282 | 3267 |
then show "?lhs" unfolding closure_def islimpt_sequential by auto |
33175 | 3268 |
qed |
3269 |
||
3270 |
lemma closed_sequential_limits: |
|
50883 | 3271 |
fixes S :: "'a::first_countable_topology set" |
61973 | 3272 |
shows "closed S \<longleftrightarrow> (\<forall>x l. (\<forall>n. x n \<in> S) \<and> (x \<longlongrightarrow> l) sequentially \<longrightarrow> l \<in> S)" |
55775 | 3273 |
by (metis closure_sequential closure_subset_eq subset_iff) |
33175 | 3274 |
|
3275 |
lemma closure_approachable: |
|
3276 |
fixes S :: "'a::metric_space set" |
|
3277 |
shows "x \<in> closure S \<longleftrightarrow> (\<forall>e>0. \<exists>y\<in>S. dist y x < e)" |
|
3278 |
apply (auto simp add: closure_def islimpt_approachable) |
|
52624 | 3279 |
apply (metis dist_self) |
3280 |
done |
|
33175 | 3281 |
|
3282 |
lemma closed_approachable: |
|
3283 |
fixes S :: "'a::metric_space set" |
|
53291 | 3284 |
shows "closed S \<Longrightarrow> (\<forall>e>0. \<exists>y\<in>S. dist y x < e) \<longleftrightarrow> x \<in> S" |
33175 | 3285 |
by (metis closure_closed closure_approachable) |
3286 |
||
51351 | 3287 |
lemma closure_contains_Inf: |
3288 |
fixes S :: "real set" |
|
54258
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
3289 |
assumes "S \<noteq> {}" "bdd_below S" |
51351 | 3290 |
shows "Inf S \<in> closure S" |
52624 | 3291 |
proof - |
51351 | 3292 |
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
|
3293 |
using cInf_lower[of _ S] assms by metis |
52624 | 3294 |
{ |
53282 | 3295 |
fix e :: real |
3296 |
assume "e > 0" |
|
52624 | 3297 |
then have "Inf S < Inf S + e" by simp |
3298 |
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
|
3299 |
by (subst (asm) cInf_less_iff) auto |
52624 | 3300 |
with * have "\<exists>x\<in>S. dist x (Inf S) < e" |
3301 |
by (intro bexI[of _ x]) (auto simp add: dist_real_def) |
|
3302 |
} |
|
3303 |
then show ?thesis unfolding closure_approachable by auto |
|
51351 | 3304 |
qed |
3305 |
||
3306 |
lemma closed_contains_Inf: |
|
3307 |
fixes S :: "real set" |
|
54258
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
3308 |
shows "S \<noteq> {} \<Longrightarrow> bdd_below S \<Longrightarrow> closed S \<Longrightarrow> Inf S \<in> S" |
63092 | 3309 |
by (metis closure_contains_Inf closure_closed) |
51351 | 3310 |
|
62083 | 3311 |
lemma closed_subset_contains_Inf: |
3312 |
fixes A C :: "real set" |
|
3313 |
shows "closed C \<Longrightarrow> A \<subseteq> C \<Longrightarrow> A \<noteq> {} \<Longrightarrow> bdd_below A \<Longrightarrow> Inf A \<in> C" |
|
3314 |
by (metis closure_contains_Inf closure_minimal subset_eq) |
|
3315 |
||
3316 |
lemma atLeastAtMost_subset_contains_Inf: |
|
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
3317 |
fixes A :: "real set" and a b :: real |
62083 | 3318 |
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
|
3319 |
by (rule closed_subset_contains_Inf) |
62083 | 3320 |
(auto intro: closed_real_atLeastAtMost intro!: bdd_belowI[of A a]) |
3321 |
||
51351 | 3322 |
lemma not_trivial_limit_within_ball: |
53640 | 3323 |
"\<not> trivial_limit (at x within S) \<longleftrightarrow> (\<forall>e>0. S \<inter> ball x e - {x} \<noteq> {})" |
60462 | 3324 |
(is "?lhs \<longleftrightarrow> ?rhs") |
3325 |
proof |
|
3326 |
show ?rhs if ?lhs |
|
3327 |
proof - |
|
53282 | 3328 |
{ |
3329 |
fix e :: real |
|
3330 |
assume "e > 0" |
|
53640 | 3331 |
then obtain y where "y \<in> S - {x}" and "dist y x < e" |
60420 | 3332 |
using \<open>?lhs\<close> not_trivial_limit_within[of x S] closure_approachable[of x "S - {x}"] |
51351 | 3333 |
by auto |
53640 | 3334 |
then have "y \<in> S \<inter> ball x e - {x}" |
51351 | 3335 |
unfolding ball_def by (simp add: dist_commute) |
53640 | 3336 |
then have "S \<inter> ball x e - {x} \<noteq> {}" by blast |
52624 | 3337 |
} |
60462 | 3338 |
then show ?thesis by auto |
3339 |
qed |
|
3340 |
show ?lhs if ?rhs |
|
3341 |
proof - |
|
53282 | 3342 |
{ |
3343 |
fix e :: real |
|
3344 |
assume "e > 0" |
|
53640 | 3345 |
then obtain y where "y \<in> S \<inter> ball x e - {x}" |
60420 | 3346 |
using \<open>?rhs\<close> by blast |
53640 | 3347 |
then have "y \<in> S - {x}" and "dist y x < e" |
3348 |
unfolding ball_def by (simp_all add: dist_commute) |
|
3349 |
then have "\<exists>y \<in> S - {x}. dist y x < e" |
|
53282 | 3350 |
by auto |
51351 | 3351 |
} |
60462 | 3352 |
then show ?thesis |
53282 | 3353 |
using not_trivial_limit_within[of x S] closure_approachable[of x "S - {x}"] |
3354 |
by auto |
|
60462 | 3355 |
qed |
51351 | 3356 |
qed |
3357 |
||
52624 | 3358 |
|
60420 | 3359 |
subsection \<open>Infimum Distance\<close> |
50087 | 3360 |
|
54260
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
3361 |
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
|
3362 |
|
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
3363 |
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
|
3364 |
by (auto intro!: zero_le_dist) |
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
3365 |
|
54260
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
3366 |
lemma infdist_notempty: "A \<noteq> {} \<Longrightarrow> infdist x A = (INF a:A. dist x a)" |
50087 | 3367 |
by (simp add: infdist_def) |
3368 |
||
52624 | 3369 |
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
|
3370 |
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
|
3371 |
|
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
3372 |
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
|
3373 |
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
|
3374 |
|
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
3375 |
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
|
3376 |
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
|
3377 |
|
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
3378 |
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
|
3379 |
by (auto intro!: antisym infdist_nonneg infdist_le2) |
50087 | 3380 |
|
52624 | 3381 |
lemma infdist_triangle: "infdist x A \<le> infdist y A + dist x y" |
53640 | 3382 |
proof (cases "A = {}") |
3383 |
case True |
|
53282 | 3384 |
then show ?thesis by (simp add: infdist_def) |
50087 | 3385 |
next |
53640 | 3386 |
case False |
52624 | 3387 |
then obtain a where "a \<in> A" by auto |
50087 | 3388 |
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
|
3389 |
proof (rule cInf_greatest) |
60420 | 3390 |
from \<open>A \<noteq> {}\<close> show "{dist x y + dist y a |a. a \<in> A} \<noteq> {}" |
53282 | 3391 |
by simp |
3392 |
fix d |
|
3393 |
assume "d \<in> {dist x y + dist y a |a. a \<in> A}" |
|
3394 |
then obtain a where d: "d = dist x y + dist y a" "a \<in> A" |
|
3395 |
by auto |
|
50087 | 3396 |
show "infdist x A \<le> d" |
60420 | 3397 |
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
|
3398 |
proof (rule cINF_lower2) |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
3399 |
show "a \<in> A" by fact |
53282 | 3400 |
show "dist x a \<le> d" |
3401 |
unfolding d by (rule dist_triangle) |
|
54258
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
3402 |
qed simp |
50087 | 3403 |
qed |
3404 |
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
|
3405 |
proof (rule cInf_eq, safe) |
53282 | 3406 |
fix a |
3407 |
assume "a \<in> A" |
|
3408 |
then show "dist x y + infdist y A \<le> dist x y + dist y a" |
|
3409 |
by (auto intro: infdist_le) |
|
50087 | 3410 |
next |
53282 | 3411 |
fix i |
3412 |
assume inf: "\<And>d. d \<in> {dist x y + dist y a |a. a \<in> A} \<Longrightarrow> i \<le> d" |
|
3413 |
then have "i - dist x y \<le> infdist y A" |
|
60420 | 3414 |
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
|
3415 |
by (intro cINF_greatest) (auto simp: field_simps) |
53282 | 3416 |
then show "i \<le> dist x y + infdist y A" |
3417 |
by simp |
|
50087 | 3418 |
qed |
3419 |
finally show ?thesis by simp |
|
3420 |
qed |
|
3421 |
||
51475
ebf9d4fd00ba
introduct the conditional_complete_lattice type class; generalize theorems about real Sup and Inf to it
hoelzl
parents:
51473
diff
changeset
|
3422 |
lemma in_closure_iff_infdist_zero: |
50087 | 3423 |
assumes "A \<noteq> {}" |
3424 |
shows "x \<in> closure A \<longleftrightarrow> infdist x A = 0" |
|
3425 |
proof |
|
3426 |
assume "x \<in> closure A" |
|
3427 |
show "infdist x A = 0" |
|
3428 |
proof (rule ccontr) |
|
3429 |
assume "infdist x A \<noteq> 0" |
|
53282 | 3430 |
with infdist_nonneg[of x A] have "infdist x A > 0" |
3431 |
by auto |
|
3432 |
then have "ball x (infdist x A) \<inter> closure A = {}" |
|
52624 | 3433 |
apply auto |
60420 | 3434 |
apply (metis \<open>x \<in> closure A\<close> closure_approachable dist_commute infdist_le not_less) |
52624 | 3435 |
done |
53282 | 3436 |
then have "x \<notin> closure A" |
60420 | 3437 |
by (metis \<open>0 < infdist x A\<close> centre_in_ball disjoint_iff_not_equal) |
3438 |
then show False using \<open>x \<in> closure A\<close> by simp |
|
50087 | 3439 |
qed |
3440 |
next |
|
3441 |
assume x: "infdist x A = 0" |
|
53282 | 3442 |
then obtain a where "a \<in> A" |
3443 |
by atomize_elim (metis all_not_in_conv assms) |
|
3444 |
show "x \<in> closure A" |
|
3445 |
unfolding closure_approachable |
|
3446 |
apply safe |
|
3447 |
proof (rule ccontr) |
|
3448 |
fix e :: real |
|
3449 |
assume "e > 0" |
|
50087 | 3450 |
assume "\<not> (\<exists>y\<in>A. dist y x < e)" |
60420 | 3451 |
then have "infdist x A \<ge> e" using \<open>a \<in> A\<close> |
50087 | 3452 |
unfolding infdist_def |
54260
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
3453 |
by (force simp: dist_commute intro: cINF_greatest) |
60420 | 3454 |
with x \<open>e > 0\<close> show False by auto |
50087 | 3455 |
qed |
3456 |
qed |
|
3457 |
||
51475
ebf9d4fd00ba
introduct the conditional_complete_lattice type class; generalize theorems about real Sup and Inf to it
hoelzl
parents:
51473
diff
changeset
|
3458 |
lemma in_closed_iff_infdist_zero: |
50087 | 3459 |
assumes "closed A" "A \<noteq> {}" |
3460 |
shows "x \<in> A \<longleftrightarrow> infdist x A = 0" |
|
3461 |
proof - |
|
3462 |
have "x \<in> closure A \<longleftrightarrow> infdist x A = 0" |
|
3463 |
by (rule in_closure_iff_infdist_zero) fact |
|
3464 |
with assms show ?thesis by simp |
|
3465 |
qed |
|
3466 |
||
3467 |
lemma tendsto_infdist [tendsto_intros]: |
|
61973 | 3468 |
assumes f: "(f \<longlongrightarrow> l) F" |
3469 |
shows "((\<lambda>x. infdist (f x) A) \<longlongrightarrow> infdist l A) F" |
|
50087 | 3470 |
proof (rule tendstoI) |
53282 | 3471 |
fix e ::real |
3472 |
assume "e > 0" |
|
50087 | 3473 |
from tendstoD[OF f this] |
3474 |
show "eventually (\<lambda>x. dist (infdist (f x) A) (infdist l A) < e) F" |
|
3475 |
proof (eventually_elim) |
|
3476 |
fix x |
|
3477 |
from infdist_triangle[of l A "f x"] infdist_triangle[of "f x" A l] |
|
3478 |
have "dist (infdist (f x) A) (infdist l A) \<le> dist (f x) l" |
|
3479 |
by (simp add: dist_commute dist_real_def) |
|
3480 |
also assume "dist (f x) l < e" |
|
3481 |
finally show "dist (infdist (f x) A) (infdist l A) < e" . |
|
3482 |
qed |
|
3483 |
qed |
|
3484 |
||
60420 | 3485 |
text\<open>Some other lemmas about sequences.\<close> |
33175 | 3486 |
|
53597 | 3487 |
lemma sequentially_offset: (* TODO: move to Topological_Spaces.thy *) |
36441 | 3488 |
assumes "eventually (\<lambda>i. P i) sequentially" |
3489 |
shows "eventually (\<lambda>i. P (i + k)) sequentially" |
|
53597 | 3490 |
using assms by (rule eventually_sequentially_seg [THEN iffD2]) |
3491 |
||
3492 |
lemma seq_offset_neg: (* TODO: move to Topological_Spaces.thy *) |
|
61973 | 3493 |
"(f \<longlongrightarrow> l) sequentially \<Longrightarrow> ((\<lambda>i. f(i - k)) \<longlongrightarrow> l) sequentially" |
53597 | 3494 |
apply (erule filterlim_compose) |
3495 |
apply (simp add: filterlim_def le_sequentially eventually_filtermap eventually_sequentially) |
|
52624 | 3496 |
apply arith |
3497 |
done |
|
33175 | 3498 |
|
61973 | 3499 |
lemma seq_harmonic: "((\<lambda>n. inverse (real n)) \<longlongrightarrow> 0) sequentially" |
53597 | 3500 |
using LIMSEQ_inverse_real_of_nat by (rule LIMSEQ_imp_Suc) (* TODO: move to Limits.thy *) |
33175 | 3501 |
|
60420 | 3502 |
subsection \<open>More properties of closed balls\<close> |
33175 | 3503 |
|
61204 | 3504 |
lemma closed_cball [iff]: "closed (cball x e)" |
54070 | 3505 |
proof - |
3506 |
have "closed (dist x -` {..e})" |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
3507 |
by (intro closed_vimage closed_atMost continuous_intros) |
54070 | 3508 |
also have "dist x -` {..e} = cball x e" |
3509 |
by auto |
|
3510 |
finally show ?thesis . |
|
3511 |
qed |
|
33175 | 3512 |
|
3513 |
lemma open_contains_cball: "open S \<longleftrightarrow> (\<forall>x\<in>S. \<exists>e>0. cball x e \<subseteq> S)" |
|
52624 | 3514 |
proof - |
3515 |
{ |
|
3516 |
fix x and e::real |
|
3517 |
assume "x\<in>S" "e>0" "ball x e \<subseteq> S" |
|
53282 | 3518 |
then have "\<exists>d>0. cball x d \<subseteq> S" unfolding subset_eq by (rule_tac x="e/2" in exI, auto) |
52624 | 3519 |
} |
3520 |
moreover |
|
3521 |
{ |
|
3522 |
fix x and e::real |
|
3523 |
assume "x\<in>S" "e>0" "cball x e \<subseteq> S" |
|
53282 | 3524 |
then have "\<exists>d>0. ball x d \<subseteq> S" |
52624 | 3525 |
unfolding subset_eq |
3526 |
apply(rule_tac x="e/2" in exI) |
|
3527 |
apply auto |
|
3528 |
done |
|
3529 |
} |
|
3530 |
ultimately show ?thesis |
|
3531 |
unfolding open_contains_ball by auto |
|
33175 | 3532 |
qed |
3533 |
||
53291 | 3534 |
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
|
3535 |
by (metis open_contains_cball subset_eq order_less_imp_le centre_in_cball) |
33175 | 3536 |
|
3537 |
lemma mem_interior_cball: "x \<in> interior S \<longleftrightarrow> (\<exists>e>0. cball x e \<subseteq> S)" |
|
3538 |
apply (simp add: interior_def, safe) |
|
3539 |
apply (force simp add: open_contains_cball) |
|
3540 |
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
|
3541 |
apply (simp add: subset_trans [OF ball_subset_cball]) |
33175 | 3542 |
done |
3543 |
||
3544 |
lemma islimpt_ball: |
|
3545 |
fixes x y :: "'a::{real_normed_vector,perfect_space}" |
|
53291 | 3546 |
shows "y islimpt ball x e \<longleftrightarrow> 0 < e \<and> y \<in> cball x e" |
60462 | 3547 |
(is "?lhs \<longleftrightarrow> ?rhs") |
33175 | 3548 |
proof |
60462 | 3549 |
show ?rhs if ?lhs |
3550 |
proof |
|
3551 |
{ |
|
3552 |
assume "e \<le> 0" |
|
3553 |
then have *: "ball x e = {}" |
|
3554 |
using ball_eq_empty[of x e] by auto |
|
3555 |
have False using \<open>?lhs\<close> |
|
3556 |
unfolding * using islimpt_EMPTY[of y] by auto |
|
3557 |
} |
|
3558 |
then show "e > 0" by (metis not_less) |
|
3559 |
show "y \<in> cball x e" |
|
3560 |
using closed_cball[of x e] islimpt_subset[of y "ball x e" "cball x e"] |
|
3561 |
ball_subset_cball[of x e] \<open>?lhs\<close> |
|
3562 |
unfolding closed_limpt by auto |
|
3563 |
qed |
|
3564 |
show ?lhs if ?rhs |
|
3565 |
proof - |
|
3566 |
from that have "e > 0" by auto |
|
3567 |
{ |
|
3568 |
fix d :: real |
|
3569 |
assume "d > 0" |
|
3570 |
have "\<exists>x'\<in>ball x e. x' \<noteq> y \<and> dist x' y < d" |
|
3571 |
proof (cases "d \<le> dist x y") |
|
53282 | 3572 |
case True |
3573 |
then show "\<exists>x'\<in>ball x e. x' \<noteq> y \<and> dist x' y < d" |
|
60462 | 3574 |
proof (cases "x = y") |
3575 |
case True |
|
3576 |
then have False |
|
3577 |
using \<open>d \<le> dist x y\<close> \<open>d>0\<close> by auto |
|
3578 |
then show "\<exists>x'\<in>ball x e. x' \<noteq> y \<and> dist x' y < d" |
|
3579 |
by auto |
|
3580 |
next |
|
3581 |
case False |
|
3582 |
have "dist x (y - (d / (2 * dist y x)) *\<^sub>R (y - x)) = |
|
3583 |
norm (x - y + (d / (2 * norm (y - x))) *\<^sub>R (y - x))" |
|
3584 |
unfolding mem_cball mem_ball dist_norm diff_diff_eq2 diff_add_eq[symmetric] |
|
3585 |
by auto |
|
3586 |
also have "\<dots> = \<bar>- 1 + d / (2 * norm (x - y))\<bar> * norm (x - y)" |
|
3587 |
using scaleR_left_distrib[of "- 1" "d / (2 * norm (y - x))", symmetric, of "y - x"] |
|
3588 |
unfolding scaleR_minus_left scaleR_one |
|
3589 |
by (auto simp add: norm_minus_commute) |
|
3590 |
also have "\<dots> = \<bar>- norm (x - y) + d / 2\<bar>" |
|
3591 |
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
|
3592 |
unfolding distrib_right using \<open>x\<noteq>y\<close> by auto |
60462 | 3593 |
also have "\<dots> \<le> e - d/2" using \<open>d \<le> dist x y\<close> and \<open>d>0\<close> and \<open>?rhs\<close> |
3594 |
by (auto simp add: dist_norm) |
|
3595 |
finally have "y - (d / (2 * dist y x)) *\<^sub>R (y - x) \<in> ball x e" using \<open>d>0\<close> |
|
3596 |
by auto |
|
3597 |
moreover |
|
3598 |
have "(d / (2*dist y x)) *\<^sub>R (y - x) \<noteq> 0" |
|
3599 |
using \<open>x\<noteq>y\<close>[unfolded dist_nz] \<open>d>0\<close> unfolding scaleR_eq_0_iff |
|
3600 |
by (auto simp add: dist_commute) |
|
3601 |
moreover |
|
3602 |
have "dist (y - (d / (2 * dist y x)) *\<^sub>R (y - x)) y < d" |
|
3603 |
unfolding dist_norm |
|
3604 |
apply simp |
|
3605 |
unfolding norm_minus_cancel |
|
3606 |
using \<open>d > 0\<close> \<open>x\<noteq>y\<close>[unfolded dist_nz] dist_commute[of x y] |
|
3607 |
unfolding dist_norm |
|
3608 |
apply auto |
|
3609 |
done |
|
3610 |
ultimately show "\<exists>x'\<in>ball x e. x' \<noteq> y \<and> dist x' y < d" |
|
3611 |
apply (rule_tac x = "y - (d / (2*dist y x)) *\<^sub>R (y - x)" in bexI) |
|
3612 |
apply auto |
|
3613 |
done |
|
3614 |
qed |
|
33175 | 3615 |
next |
3616 |
case False |
|
60462 | 3617 |
then have "d > dist x y" by auto |
3618 |
show "\<exists>x' \<in> ball x e. x' \<noteq> y \<and> dist x' y < d" |
|
3619 |
proof (cases "x = y") |
|
3620 |
case True |
|
3621 |
obtain z where **: "z \<noteq> y" "dist z y < min e d" |
|
3622 |
using perfect_choose_dist[of "min e d" y] |
|
3623 |
using \<open>d > 0\<close> \<open>e>0\<close> by auto |
|
3624 |
show "\<exists>x'\<in>ball x e. x' \<noteq> y \<and> dist x' y < d" |
|
3625 |
unfolding \<open>x = y\<close> |
|
3626 |
using \<open>z \<noteq> y\<close> ** |
|
3627 |
apply (rule_tac x=z in bexI) |
|
3628 |
apply (auto simp add: dist_commute) |
|
3629 |
done |
|
3630 |
next |
|
3631 |
case False |
|
3632 |
then show "\<exists>x'\<in>ball x e. x' \<noteq> y \<and> dist x' y < d" |
|
3633 |
using \<open>d>0\<close> \<open>d > dist x y\<close> \<open>?rhs\<close> |
|
3634 |
apply (rule_tac x=x in bexI) |
|
3635 |
apply auto |
|
3636 |
done |
|
3637 |
qed |
|
33175 | 3638 |
qed |
60462 | 3639 |
} |
3640 |
then show ?thesis |
|
3641 |
unfolding mem_cball islimpt_approachable mem_ball by auto |
|
3642 |
qed |
|
33175 | 3643 |
qed |
3644 |
||
3645 |
lemma closure_ball_lemma: |
|
3646 |
fixes x y :: "'a::real_normed_vector" |
|
53282 | 3647 |
assumes "x \<noteq> y" |
3648 |
shows "y islimpt ball x (dist x y)" |
|
33175 | 3649 |
proof (rule islimptI) |
53282 | 3650 |
fix T |
3651 |
assume "y \<in> T" "open T" |
|
33175 | 3652 |
then obtain r where "0 < r" "\<forall>z. dist z y < r \<longrightarrow> z \<in> T" |
3653 |
unfolding open_dist by fast |
|
3654 |
(* choose point between x and y, within distance r of y. *) |
|
63040 | 3655 |
define k where "k = min 1 (r / (2 * dist x y))" |
3656 |
define z where "z = y + scaleR k (x - y)" |
|
33175 | 3657 |
have z_def2: "z = x + scaleR (1 - k) (y - x)" |
3658 |
unfolding z_def by (simp add: algebra_simps) |
|
3659 |
have "dist z y < r" |
|
60420 | 3660 |
unfolding z_def k_def using \<open>0 < r\<close> |
33175 | 3661 |
by (simp add: dist_norm min_def) |
53282 | 3662 |
then have "z \<in> T" |
60420 | 3663 |
using \<open>\<forall>z. dist z y < r \<longrightarrow> z \<in> T\<close> by simp |
33175 | 3664 |
have "dist x z < dist x y" |
3665 |
unfolding z_def2 dist_norm |
|
3666 |
apply (simp add: norm_minus_commute) |
|
3667 |
apply (simp only: dist_norm [symmetric]) |
|
3668 |
apply (subgoal_tac "\<bar>1 - k\<bar> * dist x y < 1 * dist x y", simp) |
|
3669 |
apply (rule mult_strict_right_mono) |
|
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
3670 |
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
|
3671 |
apply (simp add: \<open>x \<noteq> y\<close>) |
33175 | 3672 |
done |
53282 | 3673 |
then have "z \<in> ball x (dist x y)" |
3674 |
by simp |
|
33175 | 3675 |
have "z \<noteq> y" |
60420 | 3676 |
unfolding z_def k_def using \<open>x \<noteq> y\<close> \<open>0 < r\<close> |
33175 | 3677 |
by (simp add: min_def) |
3678 |
show "\<exists>z\<in>ball x (dist x y). z \<in> T \<and> z \<noteq> y" |
|
60420 | 3679 |
using \<open>z \<in> ball x (dist x y)\<close> \<open>z \<in> T\<close> \<open>z \<noteq> y\<close> |
33175 | 3680 |
by fast |
3681 |
qed |
|
3682 |
||
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3683 |
lemma closure_ball [simp]: |
33175 | 3684 |
fixes x :: "'a::real_normed_vector" |
3685 |
shows "0 < e \<Longrightarrow> closure (ball x e) = cball x e" |
|
52624 | 3686 |
apply (rule equalityI) |
3687 |
apply (rule closure_minimal) |
|
3688 |
apply (rule ball_subset_cball) |
|
3689 |
apply (rule closed_cball) |
|
3690 |
apply (rule subsetI, rename_tac y) |
|
3691 |
apply (simp add: le_less [where 'a=real]) |
|
3692 |
apply (erule disjE) |
|
3693 |
apply (rule subsetD [OF closure_subset], simp) |
|
3694 |
apply (simp add: closure_def) |
|
3695 |
apply clarify |
|
3696 |
apply (rule closure_ball_lemma) |
|
3697 |
apply (simp add: zero_less_dist_iff) |
|
3698 |
done |
|
33175 | 3699 |
|
3700 |
(* 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
|
3701 |
lemma interior_cball [simp]: |
33175 | 3702 |
fixes x :: "'a::{real_normed_vector, perfect_space}" |
3703 |
shows "interior (cball x e) = ball x e" |
|
53640 | 3704 |
proof (cases "e \<ge> 0") |
33175 | 3705 |
case False note cs = this |
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
3706 |
from cs have null: "ball x e = {}" |
53282 | 3707 |
using ball_empty[of e x] by auto |
3708 |
moreover |
|
3709 |
{ |
|
3710 |
fix y |
|
3711 |
assume "y \<in> cball x e" |
|
3712 |
then have False |
|
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
3713 |
by (metis ball_eq_empty null cs dist_eq_0_iff dist_le_zero_iff empty_subsetI mem_cball subset_antisym subset_ball) |
53282 | 3714 |
} |
3715 |
then have "cball x e = {}" by auto |
|
3716 |
then have "interior (cball x e) = {}" |
|
3717 |
using interior_empty by auto |
|
33175 | 3718 |
ultimately show ?thesis by blast |
3719 |
next |
|
3720 |
case True note cs = this |
|
53282 | 3721 |
have "ball x e \<subseteq> cball x e" |
3722 |
using ball_subset_cball by auto |
|
3723 |
moreover |
|
3724 |
{ |
|
3725 |
fix S y |
|
3726 |
assume as: "S \<subseteq> cball x e" "open S" "y\<in>S" |
|
3727 |
then obtain d where "d>0" and d: "\<forall>x'. dist x' y < d \<longrightarrow> x' \<in> S" |
|
3728 |
unfolding open_dist by blast |
|
33175 | 3729 |
then obtain xa where xa_y: "xa \<noteq> y" and xa: "dist xa y < d" |
3730 |
using perfect_choose_dist [of d] by auto |
|
53282 | 3731 |
have "xa \<in> S" |
3732 |
using d[THEN spec[where x = xa]] |
|
3733 |
using xa by (auto simp add: dist_commute) |
|
3734 |
then have xa_cball: "xa \<in> cball x e" |
|
3735 |
using as(1) by auto |
|
3736 |
then have "y \<in> ball x e" |
|
3737 |
proof (cases "x = y") |
|
33175 | 3738 |
case True |
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
3739 |
then have "e > 0" using cs order.order_iff_strict xa_cball xa_y by fastforce |
53282 | 3740 |
then show "y \<in> ball x e" |
60420 | 3741 |
using \<open>x = y \<close> by simp |
33175 | 3742 |
next |
3743 |
case False |
|
53282 | 3744 |
have "dist (y + (d / 2 / dist y x) *\<^sub>R (y - x)) y < d" |
3745 |
unfolding dist_norm |
|
60420 | 3746 |
using \<open>d>0\<close> norm_ge_zero[of "y - x"] \<open>x \<noteq> y\<close> by auto |
53282 | 3747 |
then have *: "y + (d / 2 / dist y x) *\<^sub>R (y - x) \<in> cball x e" |
52624 | 3748 |
using d as(1)[unfolded subset_eq] by blast |
60420 | 3749 |
have "y - x \<noteq> 0" using \<open>x \<noteq> y\<close> by auto |
56541 | 3750 |
hence **:"d / (2 * norm (y - x)) > 0" |
60420 | 3751 |
unfolding zero_less_norm_iff[symmetric] using \<open>d>0\<close> by auto |
53282 | 3752 |
have "dist (y + (d / 2 / dist y x) *\<^sub>R (y - x)) x = |
3753 |
norm (y + (d / (2 * norm (y - x))) *\<^sub>R y - (d / (2 * norm (y - x))) *\<^sub>R x - x)" |
|
33175 | 3754 |
by (auto simp add: dist_norm algebra_simps) |
3755 |
also have "\<dots> = norm ((1 + d / (2 * norm (y - x))) *\<^sub>R (y - x))" |
|
3756 |
by (auto simp add: algebra_simps) |
|
3757 |
also have "\<dots> = \<bar>1 + d / (2 * norm (y - x))\<bar> * norm (y - x)" |
|
3758 |
using ** by auto |
|
53282 | 3759 |
also have "\<dots> = (dist y x) + d/2" |
3760 |
using ** by (auto simp add: distrib_right dist_norm) |
|
3761 |
finally have "e \<ge> dist x y +d/2" |
|
3762 |
using *[unfolded mem_cball] by (auto simp add: dist_commute) |
|
3763 |
then show "y \<in> ball x e" |
|
60420 | 3764 |
unfolding mem_ball using \<open>d>0\<close> by auto |
52624 | 3765 |
qed |
3766 |
} |
|
53282 | 3767 |
then have "\<forall>S \<subseteq> cball x e. open S \<longrightarrow> S \<subseteq> ball x e" |
3768 |
by auto |
|
52624 | 3769 |
ultimately show ?thesis |
53640 | 3770 |
using interior_unique[of "ball x e" "cball x e"] |
3771 |
using open_ball[of x e] |
|
3772 |
by auto |
|
33175 | 3773 |
qed |
3774 |
||
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3775 |
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
|
3776 |
by (simp add: interior_open) |
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
3777 |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3778 |
lemma frontier_ball [simp]: |
33175 | 3779 |
fixes a :: "'a::real_normed_vector" |
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3780 |
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
|
3781 |
by (force simp: frontier_def) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3782 |
|
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3783 |
lemma frontier_cball [simp]: |
33175 | 3784 |
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
|
3785 |
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
|
3786 |
by (force simp: frontier_def) |
33175 | 3787 |
|
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3788 |
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
|
3789 |
apply (simp add: set_eq_iff not_le) |
52624 | 3790 |
apply (metis zero_le_dist dist_self order_less_le_trans) |
3791 |
done |
|
3792 |
||
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3793 |
lemma cball_empty [simp]: "e < 0 \<Longrightarrow> cball x e = {}" |
52624 | 3794 |
by (simp add: cball_eq_empty) |
33175 | 3795 |
|
3796 |
lemma cball_eq_sing: |
|
44072
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
3797 |
fixes x :: "'a::{metric_space,perfect_space}" |
53640 | 3798 |
shows "cball x e = {x} \<longleftrightarrow> e = 0" |
33175 | 3799 |
proof (rule linorder_cases) |
3800 |
assume e: "0 < e" |
|
3801 |
obtain a where "a \<noteq> x" "dist a x < e" |
|
3802 |
using perfect_choose_dist [OF e] by auto |
|
53282 | 3803 |
then have "a \<noteq> x" "dist x a \<le> e" |
3804 |
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
|
3805 |
with e show ?thesis by (auto simp add: set_eq_iff) |
33175 | 3806 |
qed auto |
3807 |
||
3808 |
lemma cball_sing: |
|
3809 |
fixes x :: "'a::metric_space" |
|
53291 | 3810 |
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
|
3811 |
by (auto simp add: set_eq_iff) |
33175 | 3812 |
|
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3813 |
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
|
3814 |
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
|
3815 |
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
|
3816 |
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
|
3817 |
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
|
3818 |
done |
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3819 |
|
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3820 |
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
|
3821 |
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
|
3822 |
|
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3823 |
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
|
3824 |
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
|
3825 |
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
|
3826 |
apply (rule subset_cball) |
64240 | 3827 |
apply (metis div_by_1 frac_le not_le order_refl zero_less_one) |
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3828 |
done |
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3829 |
|
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
3830 |
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
|
3831 |
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
|
3832 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
3833 |
|
60420 | 3834 |
subsection \<open>Boundedness\<close> |
33175 | 3835 |
|
3836 |
(* FIXME: This has to be unified with BSEQ!! *) |
|
52624 | 3837 |
definition (in metric_space) bounded :: "'a set \<Rightarrow> bool" |
3838 |
where "bounded S \<longleftrightarrow> (\<exists>x e. \<forall>y\<in>S. dist x y \<le> e)" |
|
33175 | 3839 |
|
61426
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
3840 |
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
|
3841 |
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
|
3842 |
|
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
3843 |
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
|
3844 |
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
|
3845 |
proof - |
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
3846 |
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
|
3847 |
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
|
3848 |
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
|
3849 |
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
|
3850 |
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
|
3851 |
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
|
3852 |
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
|
3853 |
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
|
3854 |
qed |
50998 | 3855 |
|
33175 | 3856 |
lemma bounded_any_center: "bounded S \<longleftrightarrow> (\<exists>e. \<forall>y\<in>S. dist a y \<le> e)" |
52624 | 3857 |
unfolding bounded_def |
57512
cc97b347b301
reduced name variants for assoc and commute on plus and mult
haftmann
parents:
57448
diff
changeset
|
3858 |
by auto (metis add.commute add_le_cancel_right dist_commute dist_triangle_le) |
33175 | 3859 |
|
3860 |
lemma bounded_iff: "bounded S \<longleftrightarrow> (\<exists>a. \<forall>x\<in>S. norm x \<le> a)" |
|
52624 | 3861 |
unfolding bounded_any_center [where a=0] |
3862 |
by (simp add: dist_norm) |
|
33175 | 3863 |
|
61552
980dd46a03fb
Added binomial identities to CONTRIBUTORS; small lemmas on of_int/pochhammer
eberlm
parents:
61531
diff
changeset
|
3864 |
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
|
3865 |
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
|
3866 |
|
53282 | 3867 |
lemma bounded_realI: |
61945 | 3868 |
assumes "\<forall>x\<in>s. \<bar>x::real\<bar> \<le> B" |
53282 | 3869 |
shows "bounded s" |
3870 |
unfolding bounded_def dist_real_def |
|
55775 | 3871 |
by (metis abs_minus_commute assms diff_0_right) |
50104 | 3872 |
|
50948 | 3873 |
lemma bounded_empty [simp]: "bounded {}" |
3874 |
by (simp add: bounded_def) |
|
3875 |
||
53291 | 3876 |
lemma bounded_subset: "bounded T \<Longrightarrow> S \<subseteq> T \<Longrightarrow> bounded S" |
33175 | 3877 |
by (metis bounded_def subset_eq) |
3878 |
||
53291 | 3879 |
lemma bounded_interior[intro]: "bounded S \<Longrightarrow> bounded(interior S)" |
33175 | 3880 |
by (metis bounded_subset interior_subset) |
3881 |
||
52624 | 3882 |
lemma bounded_closure[intro]: |
3883 |
assumes "bounded S" |
|
3884 |
shows "bounded (closure S)" |
|
3885 |
proof - |
|
3886 |
from assms obtain x and a where a: "\<forall>y\<in>S. dist x y \<le> a" |
|
3887 |
unfolding bounded_def by auto |
|
3888 |
{ |
|
3889 |
fix y |
|
3890 |
assume "y \<in> closure S" |
|
61973 | 3891 |
then obtain f where f: "\<forall>n. f n \<in> S" "(f \<longlongrightarrow> y) sequentially" |
33175 | 3892 |
unfolding closure_sequential by auto |
3893 |
have "\<forall>n. f n \<in> S \<longrightarrow> dist x (f n) \<le> a" using a by simp |
|
53282 | 3894 |
then have "eventually (\<lambda>n. dist x (f n) \<le> a) sequentially" |
61810 | 3895 |
by (simp add: f(1)) |
33175 | 3896 |
have "dist x y \<le> a" |
3897 |
apply (rule Lim_dist_ubound [of sequentially f]) |
|
3898 |
apply (rule trivial_limit_sequentially) |
|
3899 |
apply (rule f(2)) |
|
3900 |
apply fact |
|
3901 |
done |
|
3902 |
} |
|
53282 | 3903 |
then show ?thesis |
3904 |
unfolding bounded_def by auto |
|
33175 | 3905 |
qed |
3906 |
||
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
3907 |
lemma bounded_closure_image: "bounded (f ` closure S) \<Longrightarrow> bounded (f ` S)" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
3908 |
by (simp add: bounded_subset closure_subset image_mono) |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
3909 |
|
33175 | 3910 |
lemma bounded_cball[simp,intro]: "bounded (cball x e)" |
3911 |
apply (simp add: bounded_def) |
|
3912 |
apply (rule_tac x=x in exI) |
|
3913 |
apply (rule_tac x=e in exI) |
|
3914 |
apply auto |
|
3915 |
done |
|
3916 |
||
53640 | 3917 |
lemma bounded_ball[simp,intro]: "bounded (ball x e)" |
33175 | 3918 |
by (metis ball_subset_cball bounded_cball bounded_subset) |
3919 |
||
3920 |
lemma bounded_Un[simp]: "bounded (S \<union> T) \<longleftrightarrow> bounded S \<and> bounded T" |
|
63988 | 3921 |
by (auto simp add: bounded_def) (metis Un_iff bounded_any_center le_max_iff_disj) |
33175 | 3922 |
|
53640 | 3923 |
lemma bounded_Union[intro]: "finite F \<Longrightarrow> \<forall>S\<in>F. bounded S \<Longrightarrow> bounded (\<Union>F)" |
52624 | 3924 |
by (induct rule: finite_induct[of F]) auto |
33175 | 3925 |
|
50955 | 3926 |
lemma bounded_UN [intro]: "finite A \<Longrightarrow> \<forall>x\<in>A. bounded (B x) \<Longrightarrow> bounded (\<Union>x\<in>A. B x)" |
52624 | 3927 |
by (induct set: finite) auto |
50955 | 3928 |
|
50948 | 3929 |
lemma bounded_insert [simp]: "bounded (insert x S) \<longleftrightarrow> bounded S" |
3930 |
proof - |
|
53640 | 3931 |
have "\<forall>y\<in>{x}. dist x y \<le> 0" |
3932 |
by simp |
|
3933 |
then have "bounded {x}" |
|
3934 |
unfolding bounded_def by fast |
|
3935 |
then show ?thesis |
|
3936 |
by (metis insert_is_Un bounded_Un) |
|
50948 | 3937 |
qed |
3938 |
||
3939 |
lemma finite_imp_bounded [intro]: "finite S \<Longrightarrow> bounded S" |
|
52624 | 3940 |
by (induct set: finite) simp_all |
50948 | 3941 |
|
53640 | 3942 |
lemma bounded_pos: "bounded S \<longleftrightarrow> (\<exists>b>0. \<forall>x\<in> S. norm x \<le> b)" |
33175 | 3943 |
apply (simp add: bounded_iff) |
61945 | 3944 |
apply (subgoal_tac "\<And>x (y::real). 0 < 1 + \<bar>y\<bar> \<and> (x \<le> y \<longrightarrow> x \<le> 1 + \<bar>y\<bar>)") |
52624 | 3945 |
apply metis |
3946 |
apply arith |
|
3947 |
done |
|
33175 | 3948 |
|
60762 | 3949 |
lemma bounded_pos_less: "bounded S \<longleftrightarrow> (\<exists>b>0. \<forall>x\<in> S. norm x < b)" |
3950 |
apply (simp add: bounded_pos) |
|
3951 |
apply (safe; rule_tac x="b+1" in exI; force) |
|
3952 |
done |
|
3953 |
||
53640 | 3954 |
lemma Bseq_eq_bounded: |
3955 |
fixes f :: "nat \<Rightarrow> 'a::real_normed_vector" |
|
3956 |
shows "Bseq f \<longleftrightarrow> bounded (range f)" |
|
50972 | 3957 |
unfolding Bseq_def bounded_pos by auto |
3958 |
||
33175 | 3959 |
lemma bounded_Int[intro]: "bounded S \<or> bounded T \<Longrightarrow> bounded (S \<inter> T)" |
3960 |
by (metis Int_lower1 Int_lower2 bounded_subset) |
|
3961 |
||
53291 | 3962 |
lemma bounded_diff[intro]: "bounded S \<Longrightarrow> bounded (S - T)" |
52624 | 3963 |
by (metis Diff_subset bounded_subset) |
33175 | 3964 |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3965 |
lemma not_bounded_UNIV[simp]: |
33175 | 3966 |
"\<not> bounded (UNIV :: 'a::{real_normed_vector, perfect_space} set)" |
53640 | 3967 |
proof (auto simp add: bounded_pos not_le) |
33175 | 3968 |
obtain x :: 'a where "x \<noteq> 0" |
3969 |
using perfect_choose_dist [OF zero_less_one] by fast |
|
53640 | 3970 |
fix b :: real |
3971 |
assume b: "b >0" |
|
3972 |
have b1: "b +1 \<ge> 0" |
|
3973 |
using b by simp |
|
60420 | 3974 |
with \<open>x \<noteq> 0\<close> have "b < norm (scaleR (b + 1) (sgn x))" |
33175 | 3975 |
by (simp add: norm_sgn) |
3976 |
then show "\<exists>x::'a. b < norm x" .. |
|
3977 |
qed |
|
3978 |
||
61426
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
3979 |
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
|
3980 |
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
|
3981 |
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
|
3982 |
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
|
3983 |
|
33175 | 3984 |
lemma bounded_linear_image: |
53291 | 3985 |
assumes "bounded S" |
3986 |
and "bounded_linear f" |
|
3987 |
shows "bounded (f ` S)" |
|
52624 | 3988 |
proof - |
53640 | 3989 |
from assms(1) obtain b where b: "b > 0" "\<forall>x\<in>S. norm x \<le> b" |
52624 | 3990 |
unfolding bounded_pos by auto |
53640 | 3991 |
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
|
3992 |
using bounded_linear.pos_bounded by (auto simp add: ac_simps) |
52624 | 3993 |
{ |
53282 | 3994 |
fix x |
53640 | 3995 |
assume "x \<in> S" |
3996 |
then have "norm x \<le> b" |
|
3997 |
using b by auto |
|
3998 |
then have "norm (f x) \<le> B * b" |
|
3999 |
using B(2) |
|
52624 | 4000 |
apply (erule_tac x=x in allE) |
4001 |
apply (metis B(1) B(2) order_trans mult_le_cancel_left_pos) |
|
4002 |
done |
|
33175 | 4003 |
} |
53282 | 4004 |
then show ?thesis |
4005 |
unfolding bounded_pos |
|
52624 | 4006 |
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
|
4007 |
using b B by (auto simp add: mult.commute) |
33175 | 4008 |
qed |
4009 |
||
4010 |
lemma bounded_scaling: |
|
4011 |
fixes S :: "'a::real_normed_vector set" |
|
4012 |
shows "bounded S \<Longrightarrow> bounded ((\<lambda>x. c *\<^sub>R x) ` S)" |
|
53291 | 4013 |
apply (rule bounded_linear_image) |
4014 |
apply assumption |
|
44282
f0de18b62d63
remove bounded_(bi)linear locale interpretations, to avoid duplicating so many lemmas
huffman
parents:
44252
diff
changeset
|
4015 |
apply (rule bounded_linear_scaleR_right) |
33175 | 4016 |
done |
4017 |
||
4018 |
lemma bounded_translation: |
|
4019 |
fixes S :: "'a::real_normed_vector set" |
|
52624 | 4020 |
assumes "bounded S" |
4021 |
shows "bounded ((\<lambda>x. a + x) ` S)" |
|
53282 | 4022 |
proof - |
53640 | 4023 |
from assms obtain b where b: "b > 0" "\<forall>x\<in>S. norm x \<le> b" |
52624 | 4024 |
unfolding bounded_pos by auto |
4025 |
{ |
|
4026 |
fix x |
|
53640 | 4027 |
assume "x \<in> S" |
53282 | 4028 |
then have "norm (a + x) \<le> b + norm a" |
52624 | 4029 |
using norm_triangle_ineq[of a x] b by auto |
33175 | 4030 |
} |
53282 | 4031 |
then show ?thesis |
52624 | 4032 |
unfolding bounded_pos |
4033 |
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
|
4034 |
by (auto intro!: exI[of _ "b + norm a"]) |
33175 | 4035 |
qed |
4036 |
||
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
4037 |
lemma bounded_translation_minus: |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
4038 |
fixes S :: "'a::real_normed_vector set" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
4039 |
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
|
4040 |
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
|
4041 |
|
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
4042 |
lemma bounded_uminus [simp]: |
62466 | 4043 |
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
|
4044 |
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
|
4045 |
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
|
4046 |
|
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
4047 |
|
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
4048 |
subsection\<open>Some theorems on sups and infs using the notion "bounded".\<close> |
33175 | 4049 |
|
54258
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
4050 |
lemma bounded_real: "bounded (S::real set) \<longleftrightarrow> (\<exists>a. \<forall>x\<in>S. \<bar>x\<bar> \<le> a)" |
33175 | 4051 |
by (simp add: bounded_iff) |
4052 |
||
54258
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
4053 |
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
|
4054 |
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
|
4055 |
(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
|
4056 |
|
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
4057 |
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
|
4058 |
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
|
4059 |
(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
|
4060 |
|
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
4061 |
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
|
4062 |
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
|
4063 |
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
|
4064 |
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
|
4065 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
4066 |
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
|
4067 |
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
|
4068 |
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
|
4069 |
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
|
4070 |
|
33270 | 4071 |
lemma bounded_has_Sup: |
4072 |
fixes S :: "real set" |
|
53640 | 4073 |
assumes "bounded S" |
4074 |
and "S \<noteq> {}" |
|
53282 | 4075 |
shows "\<forall>x\<in>S. x \<le> Sup S" |
4076 |
and "\<forall>b. (\<forall>x\<in>S. x \<le> b) \<longrightarrow> Sup S \<le> b" |
|
33270 | 4077 |
proof |
53282 | 4078 |
show "\<forall>b. (\<forall>x\<in>S. x \<le> b) \<longrightarrow> Sup S \<le> b" |
4079 |
using assms by (metis cSup_least) |
|
54258
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
4080 |
qed (metis cSup_upper assms(1) bounded_imp_bdd_above) |
33270 | 4081 |
|
4082 |
lemma Sup_insert: |
|
4083 |
fixes S :: "real set" |
|
53291 | 4084 |
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
|
4085 |
by (auto simp: bounded_imp_bdd_above sup_max cSup_insert_If) |
33270 | 4086 |
|
4087 |
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
|
4088 |
fixes S :: "'a::conditionally_complete_linorder set" |
53291 | 4089 |
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
|
4090 |
by (simp add: cSup_insert sup_max) |
33270 | 4091 |
|
4092 |
lemma bounded_has_Inf: |
|
4093 |
fixes S :: "real set" |
|
53640 | 4094 |
assumes "bounded S" |
4095 |
and "S \<noteq> {}" |
|
53282 | 4096 |
shows "\<forall>x\<in>S. x \<ge> Inf S" |
4097 |
and "\<forall>b. (\<forall>x\<in>S. x \<ge> b) \<longrightarrow> Inf S \<ge> b" |
|
33175 | 4098 |
proof |
53640 | 4099 |
show "\<forall>b. (\<forall>x\<in>S. x \<ge> b) \<longrightarrow> Inf S \<ge> b" |
53282 | 4100 |
using assms by (metis cInf_greatest) |
54258
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
4101 |
qed (metis cInf_lower assms(1) bounded_imp_bdd_below) |
33270 | 4102 |
|
4103 |
lemma Inf_insert: |
|
4104 |
fixes S :: "real set" |
|
53291 | 4105 |
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
|
4106 |
by (auto simp: bounded_imp_bdd_below inf_min cInf_insert_If) |
50944 | 4107 |
|
33270 | 4108 |
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
|
4109 |
fixes S :: "'a::conditionally_complete_linorder set" |
53291 | 4110 |
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
|
4111 |
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
|
4112 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
4113 |
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
|
4114 |
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
|
4115 |
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
|
4116 |
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
|
4117 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
4118 |
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
|
4119 |
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
|
4120 |
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
|
4121 |
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
|
4122 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
4123 |
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
|
4124 |
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
|
4125 |
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
|
4126 |
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
|
4127 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
4128 |
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
|
4129 |
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
|
4130 |
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
|
4131 |
by (auto simp: cSup_eq_Max) |
33270 | 4132 |
|
60420 | 4133 |
subsection \<open>Compactness\<close> |
4134 |
||
4135 |
subsubsection \<open>Bolzano-Weierstrass property\<close> |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4136 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4137 |
lemma heine_borel_imp_bolzano_weierstrass: |
53640 | 4138 |
assumes "compact s" |
4139 |
and "infinite t" |
|
4140 |
and "t \<subseteq> s" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4141 |
shows "\<exists>x \<in> s. x islimpt t" |
53291 | 4142 |
proof (rule ccontr) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4143 |
assume "\<not> (\<exists>x \<in> s. x islimpt t)" |
53640 | 4144 |
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 | 4145 |
unfolding islimpt_def |
53282 | 4146 |
using bchoice[of s "\<lambda> x T. x \<in> T \<and> open T \<and> (\<forall>y\<in>t. y \<in> T \<longrightarrow> y = x)"] |
4147 |
by auto |
|
53640 | 4148 |
obtain g where g: "g \<subseteq> {t. \<exists>x. x \<in> s \<and> t = f x}" "finite g" "s \<subseteq> \<Union>g" |
52624 | 4149 |
using assms(1)[unfolded compact_eq_heine_borel, THEN spec[where x="{t. \<exists>x. x\<in>s \<and> t = f x}"]] |
4150 |
using f by auto |
|
53640 | 4151 |
from g(1,3) have g':"\<forall>x\<in>g. \<exists>xa \<in> s. x = f xa" |
4152 |
by auto |
|
52624 | 4153 |
{ |
4154 |
fix x y |
|
53640 | 4155 |
assume "x \<in> t" "y \<in> t" "f x = f y" |
53282 | 4156 |
then have "x \<in> f x" "y \<in> f x \<longrightarrow> y = x" |
60420 | 4157 |
using f[THEN bspec[where x=x]] and \<open>t \<subseteq> s\<close> by auto |
53282 | 4158 |
then have "x = y" |
60420 | 4159 |
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 | 4160 |
by auto |
52624 | 4161 |
} |
53282 | 4162 |
then have "inj_on f t" |
52624 | 4163 |
unfolding inj_on_def by simp |
53282 | 4164 |
then have "infinite (f ` t)" |
52624 | 4165 |
using assms(2) using finite_imageD by auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4166 |
moreover |
52624 | 4167 |
{ |
4168 |
fix x |
|
53640 | 4169 |
assume "x \<in> t" "f x \<notin> g" |
60420 | 4170 |
from g(3) assms(3) \<open>x \<in> t\<close> obtain h where "h \<in> g" and "x \<in> h" |
53640 | 4171 |
by auto |
4172 |
then obtain y where "y \<in> s" "h = f y" |
|
52624 | 4173 |
using g'[THEN bspec[where x=h]] by auto |
53282 | 4174 |
then have "y = x" |
60420 | 4175 |
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 | 4176 |
by auto |
53282 | 4177 |
then have False |
60420 | 4178 |
using \<open>f x \<notin> g\<close> \<open>h \<in> g\<close> unfolding \<open>h = f y\<close> |
53640 | 4179 |
by auto |
52624 | 4180 |
} |
53282 | 4181 |
then have "f ` t \<subseteq> g" by auto |
52624 | 4182 |
ultimately show False |
4183 |
using g(2) using finite_subset by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4184 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4185 |
|
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
|
4186 |
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
|
4187 |
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
|
4188 |
assumes l: "\<forall>U. l\<in>U \<longrightarrow> open U \<longrightarrow> infinite (U \<inter> range f)" |
61969 | 4189 |
shows "\<exists>r. subseq r \<and> (f \<circ> r) \<longlonglongrightarrow> l" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4190 |
proof - |
55522 | 4191 |
from countable_basis_at_decseq[of l] |
4192 |
obtain A where A: |
|
4193 |
"\<And>i. open (A i)" |
|
4194 |
"\<And>i. l \<in> A i" |
|
4195 |
"\<And>S. open S \<Longrightarrow> l \<in> S \<Longrightarrow> eventually (\<lambda>i. A i \<subseteq> S) sequentially" |
|
4196 |
by blast |
|
63040 | 4197 |
define s where "s n i = (SOME j. i < j \<and> f j \<in> A (Suc n))" for n i |
52624 | 4198 |
{ |
4199 |
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
|
4200 |
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
|
4201 |
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
|
4202 |
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
|
4203 |
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
|
4204 |
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
|
4205 |
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
|
4206 |
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
|
4207 |
by (auto simp: not_le) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4208 |
then have "i < s n i" "f (s n i) \<in> A (Suc n)" |
52624 | 4209 |
unfolding s_def by (auto intro: someI2_ex) |
4210 |
} |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4211 |
note s = this |
63040 | 4212 |
define r where "r = rec_nat (s 0 0) s" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4213 |
have "subseq r" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4214 |
by (auto simp: r_def s subseq_Suc_iff) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4215 |
moreover |
61969 | 4216 |
have "(\<lambda>n. f (r n)) \<longlonglongrightarrow> l" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4217 |
proof (rule topological_tendstoI) |
53282 | 4218 |
fix S |
4219 |
assume "open S" "l \<in> S" |
|
53640 | 4220 |
with A(3) have "eventually (\<lambda>i. A i \<subseteq> S) sequentially" |
4221 |
by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4222 |
moreover |
52624 | 4223 |
{ |
4224 |
fix i |
|
53282 | 4225 |
assume "Suc 0 \<le> i" |
4226 |
then have "f (r i) \<in> A i" |
|
52624 | 4227 |
by (cases i) (simp_all add: r_def s) |
4228 |
} |
|
4229 |
then have "eventually (\<lambda>i. f (r i) \<in> A i) sequentially" |
|
4230 |
by (auto simp: eventually_sequentially) |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4231 |
ultimately show "eventually (\<lambda>i. f (r i) \<in> S) sequentially" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4232 |
by eventually_elim auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4233 |
qed |
61969 | 4234 |
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
|
4235 |
by (auto simp: convergent_def comp_def) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4236 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4237 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4238 |
lemma sequence_infinite_lemma: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4239 |
fixes f :: "nat \<Rightarrow> 'a::t1_space" |
53282 | 4240 |
assumes "\<forall>n. f n \<noteq> l" |
61973 | 4241 |
and "(f \<longlongrightarrow> l) sequentially" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4242 |
shows "infinite (range f)" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4243 |
proof |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4244 |
assume "finite (range f)" |
53640 | 4245 |
then have "closed (range f)" |
4246 |
by (rule finite_imp_closed) |
|
4247 |
then have "open (- range f)" |
|
4248 |
by (rule open_Compl) |
|
4249 |
from assms(1) have "l \<in> - range f" |
|
4250 |
by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4251 |
from assms(2) have "eventually (\<lambda>n. f n \<in> - range f) sequentially" |
60420 | 4252 |
using \<open>open (- range f)\<close> \<open>l \<in> - range f\<close> |
53640 | 4253 |
by (rule topological_tendstoD) |
4254 |
then show False |
|
4255 |
unfolding eventually_sequentially |
|
4256 |
by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4257 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4258 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4259 |
lemma closure_insert: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4260 |
fixes x :: "'a::t1_space" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4261 |
shows "closure (insert x s) = insert x (closure s)" |
52624 | 4262 |
apply (rule closure_unique) |
4263 |
apply (rule insert_mono [OF closure_subset]) |
|
4264 |
apply (rule closed_insert [OF closed_closure]) |
|
4265 |
apply (simp add: closure_minimal) |
|
4266 |
done |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4267 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4268 |
lemma islimpt_insert: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4269 |
fixes x :: "'a::t1_space" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4270 |
shows "x islimpt (insert a s) \<longleftrightarrow> x islimpt s" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4271 |
proof |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4272 |
assume *: "x islimpt (insert a s)" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4273 |
show "x islimpt s" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4274 |
proof (rule islimptI) |
53282 | 4275 |
fix t |
4276 |
assume t: "x \<in> t" "open t" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4277 |
show "\<exists>y\<in>s. y \<in> t \<and> y \<noteq> x" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4278 |
proof (cases "x = a") |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4279 |
case True |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4280 |
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
|
4281 |
using * t by (rule islimptE) |
60420 | 4282 |
with \<open>x = a\<close> show ?thesis by auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4283 |
next |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4284 |
case False |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4285 |
with t have t': "x \<in> t - {a}" "open (t - {a})" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4286 |
by (simp_all add: open_Diff) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4287 |
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
|
4288 |
using * t' by (rule islimptE) |
53282 | 4289 |
then show ?thesis by auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4290 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4291 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4292 |
next |
53282 | 4293 |
assume "x islimpt s" |
4294 |
then show "x islimpt (insert a s)" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4295 |
by (rule islimpt_subset) auto |
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 |
|
50897
078590669527
generalize lemma islimpt_finite to class t1_space
huffman
parents:
50884
diff
changeset
|
4298 |
lemma islimpt_finite: |
078590669527
generalize lemma islimpt_finite to class t1_space
huffman
parents:
50884
diff
changeset
|
4299 |
fixes x :: "'a::t1_space" |
078590669527
generalize lemma islimpt_finite to class t1_space
huffman
parents:
50884
diff
changeset
|
4300 |
shows "finite s \<Longrightarrow> \<not> x islimpt s" |
52624 | 4301 |
by (induct set: finite) (simp_all add: islimpt_insert) |
50897
078590669527
generalize lemma islimpt_finite to class t1_space
huffman
parents:
50884
diff
changeset
|
4302 |
|
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
|
4303 |
lemma islimpt_Un_finite: |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4304 |
fixes x :: "'a::t1_space" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4305 |
shows "finite s \<Longrightarrow> x islimpt (s \<union> t) \<longleftrightarrow> x islimpt t" |
52624 | 4306 |
by (simp add: islimpt_Un islimpt_finite) |
50897
078590669527
generalize lemma islimpt_finite to class t1_space
huffman
parents:
50884
diff
changeset
|
4307 |
|
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 |
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
|
4309 |
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
|
4310 |
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
|
4311 |
proof (safe intro!: islimptI) |
53282 | 4312 |
fix U |
4313 |
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
|
4314 |
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
|
4315 |
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
|
4316 |
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
|
4317 |
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
|
4318 |
next |
53282 | 4319 |
fix T |
4320 |
assume *: "\<forall>U. l\<in>U \<longrightarrow> open U \<longrightarrow> infinite (U \<inter> S)" "l \<in> T" "open T" |
|
4321 |
then have "infinite (T \<inter> S - {l})" |
|
4322 |
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
|
4323 |
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
|
4324 |
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
|
4325 |
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
|
4326 |
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
|
4327 |
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
|
4328 |
|
63938 | 4329 |
corollary infinite_openin: |
4330 |
fixes S :: "'a :: t1_space set" |
|
4331 |
shows "\<lbrakk>openin (subtopology euclidean U) S; x \<in> S; x islimpt U\<rbrakk> \<Longrightarrow> infinite S" |
|
4332 |
by (clarsimp simp add: openin_open islimpt_eq_acc_point inf_commute) |
|
4333 |
||
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 |
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
|
4335 |
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
|
4336 |
assumes l: "l islimpt (range f)" |
61969 | 4337 |
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
|
4338 |
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
|
4339 |
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
|
4340 |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4341 |
lemma sequence_unique_limpt: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4342 |
fixes f :: "nat \<Rightarrow> 'a::t2_space" |
61973 | 4343 |
assumes "(f \<longlongrightarrow> l) sequentially" |
53282 | 4344 |
and "l' islimpt (range f)" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4345 |
shows "l' = l" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4346 |
proof (rule ccontr) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4347 |
assume "l' \<noteq> l" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4348 |
obtain s t where "open s" "open t" "l' \<in> s" "l \<in> t" "s \<inter> t = {}" |
60420 | 4349 |
using hausdorff [OF \<open>l' \<noteq> l\<close>] by auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4350 |
have "eventually (\<lambda>n. f n \<in> t) sequentially" |
60420 | 4351 |
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
|
4352 |
then obtain N where "\<forall>n\<ge>N. f n \<in> t" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4353 |
unfolding eventually_sequentially by auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4354 |
|
53282 | 4355 |
have "UNIV = {..<N} \<union> {N..}" |
4356 |
by auto |
|
4357 |
then have "l' islimpt (f ` ({..<N} \<union> {N..}))" |
|
4358 |
using assms(2) by simp |
|
4359 |
then have "l' islimpt (f ` {..<N} \<union> f ` {N..})" |
|
4360 |
by (simp add: image_Un) |
|
4361 |
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
|
4362 |
by (simp add: islimpt_Un_finite) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4363 |
then obtain y where "y \<in> f ` {N..}" "y \<in> s" "y \<noteq> l'" |
60420 | 4364 |
using \<open>l' \<in> s\<close> \<open>open s\<close> by (rule islimptE) |
53282 | 4365 |
then obtain n where "N \<le> n" "f n \<in> s" "f n \<noteq> l'" |
4366 |
by auto |
|
60420 | 4367 |
with \<open>\<forall>n\<ge>N. f n \<in> t\<close> have "f n \<in> s \<inter> t" |
53282 | 4368 |
by simp |
60420 | 4369 |
with \<open>s \<inter> t = {}\<close> show False |
53282 | 4370 |
by simp |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4371 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4372 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4373 |
lemma bolzano_weierstrass_imp_closed: |
53640 | 4374 |
fixes s :: "'a::{first_countable_topology,t2_space} set" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4375 |
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
|
4376 |
shows "closed s" |
52624 | 4377 |
proof - |
4378 |
{ |
|
4379 |
fix x l |
|
61973 | 4380 |
assume as: "\<forall>n::nat. x n \<in> s" "(x \<longlongrightarrow> l) sequentially" |
53282 | 4381 |
then have "l \<in> s" |
52624 | 4382 |
proof (cases "\<forall>n. x n \<noteq> l") |
4383 |
case False |
|
53282 | 4384 |
then show "l\<in>s" using as(1) by auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4385 |
next |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4386 |
case True note cas = this |
52624 | 4387 |
with as(2) have "infinite (range x)" |
4388 |
using sequence_infinite_lemma[of x l] by auto |
|
4389 |
then obtain l' where "l'\<in>s" "l' islimpt (range x)" |
|
4390 |
using assms[THEN spec[where x="range x"]] as(1) by auto |
|
53282 | 4391 |
then show "l\<in>s" using sequence_unique_limpt[of x l l'] |
52624 | 4392 |
using as cas by auto |
4393 |
qed |
|
4394 |
} |
|
53282 | 4395 |
then show ?thesis |
4396 |
unfolding closed_sequential_limits by fast |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4397 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4398 |
|
50944 | 4399 |
lemma compact_imp_bounded: |
52624 | 4400 |
assumes "compact U" |
4401 |
shows "bounded U" |
|
50944 | 4402 |
proof - |
52624 | 4403 |
have "compact U" "\<forall>x\<in>U. open (ball x 1)" "U \<subseteq> (\<Union>x\<in>U. ball x 1)" |
4404 |
using assms by auto |
|
50944 | 4405 |
then obtain D where D: "D \<subseteq> U" "finite D" "U \<subseteq> (\<Union>x\<in>D. ball x 1)" |
52624 | 4406 |
by (rule compactE_image) |
60420 | 4407 |
from \<open>finite D\<close> have "bounded (\<Union>x\<in>D. ball x 1)" |
50955 | 4408 |
by (simp add: bounded_UN) |
60420 | 4409 |
then show "bounded U" using \<open>U \<subseteq> (\<Union>x\<in>D. ball x 1)\<close> |
50955 | 4410 |
by (rule bounded_subset) |
50944 | 4411 |
qed |
4412 |
||
60420 | 4413 |
text\<open>In particular, some common special cases.\<close> |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4414 |
|
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
|
4415 |
lemma compact_Un [intro]: |
53291 | 4416 |
assumes "compact s" |
4417 |
and "compact t" |
|
53282 | 4418 |
shows " compact (s \<union> t)" |
50898 | 4419 |
proof (rule compactI) |
52624 | 4420 |
fix f |
4421 |
assume *: "Ball f open" "s \<union> t \<subseteq> \<Union>f" |
|
60420 | 4422 |
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
|
4423 |
unfolding compact_eq_heine_borel by (auto elim!: allE[of _ f]) |
52624 | 4424 |
moreover |
60420 | 4425 |
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
|
4426 |
unfolding compact_eq_heine_borel by (auto elim!: allE[of _ f]) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4427 |
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
|
4428 |
by (auto intro!: exI[of _ "s' \<union> t'"]) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4429 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4430 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4431 |
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
|
4432 |
by (induct set: finite) auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4433 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4434 |
lemma compact_UN [intro]: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4435 |
"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
|
4436 |
by (rule compact_Union) auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4437 |
|
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
|
4438 |
lemma closed_Int_compact [intro]: |
53282 | 4439 |
assumes "closed s" |
4440 |
and "compact t" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4441 |
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
|
4442 |
using compact_Int_closed [of t s] assms |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4443 |
by (simp add: Int_commute) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4444 |
|
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
|
4445 |
lemma compact_Int [intro]: |
50898 | 4446 |
fixes s t :: "'a :: t2_space set" |
53282 | 4447 |
assumes "compact s" |
4448 |
and "compact t" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4449 |
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
|
4450 |
using assms by (intro compact_Int_closed compact_imp_closed) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4451 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4452 |
lemma compact_sing [simp]: "compact {a}" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4453 |
unfolding compact_eq_heine_borel by auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4454 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4455 |
lemma compact_insert [simp]: |
53282 | 4456 |
assumes "compact s" |
4457 |
shows "compact (insert x s)" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4458 |
proof - |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4459 |
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
|
4460 |
using compact_sing assms by (rule compact_Un) |
53282 | 4461 |
then show ?thesis by simp |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4462 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4463 |
|
52624 | 4464 |
lemma finite_imp_compact: "finite s \<Longrightarrow> compact s" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4465 |
by (induct set: finite) simp_all |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4466 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4467 |
lemma open_delete: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4468 |
fixes s :: "'a::t1_space set" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4469 |
shows "open s \<Longrightarrow> open (s - {x})" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4470 |
by (simp add: open_Diff) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4471 |
|
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
4472 |
lemma openin_delete: |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
4473 |
fixes a :: "'a :: t1_space" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
4474 |
shows "openin (subtopology euclidean u) s |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
4475 |
\<Longrightarrow> openin (subtopology euclidean u) (s - {a})" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
4476 |
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
|
4477 |
|
60420 | 4478 |
text\<open>Compactness expressed with filters\<close> |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4479 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4480 |
lemma closure_iff_nhds_not_empty: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4481 |
"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
|
4482 |
proof safe |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4483 |
assume x: "x \<in> closure X" |
53282 | 4484 |
fix S A |
4485 |
assume "open S" "x \<in> S" "X \<inter> A = {}" "S \<subseteq> A" |
|
4486 |
then have "x \<notin> closure (-S)" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4487 |
by (auto simp: closure_complement subset_eq[symmetric] intro: interiorI) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4488 |
with x have "x \<in> closure X - closure (-S)" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4489 |
by auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4490 |
also have "\<dots> \<subseteq> closure (X \<inter> S)" |
63128 | 4491 |
using \<open>open S\<close> open_Int_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
|
4492 |
finally have "X \<inter> S \<noteq> {}" by auto |
60420 | 4493 |
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
|
4494 |
next |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4495 |
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
|
4496 |
from this[THEN spec, of "- X", THEN spec, of "- closure X"] |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4497 |
show "x \<in> closure X" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4498 |
by (simp add: closure_subset open_Compl) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4499 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4500 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4501 |
lemma compact_filter: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4502 |
"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
|
4503 |
proof (intro allI iffI impI compact_fip[THEN iffD2] notI) |
53282 | 4504 |
fix F |
4505 |
assume "compact U" |
|
4506 |
assume F: "F \<noteq> bot" "eventually (\<lambda>x. x \<in> U) F" |
|
4507 |
then have "U \<noteq> {}" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4508 |
by (auto simp: eventually_False) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4509 |
|
63040 | 4510 |
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
|
4511 |
then have "\<forall>z\<in>Z. closed z" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4512 |
by auto |
53282 | 4513 |
moreover |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4514 |
have ev_Z: "\<And>z. z \<in> Z \<Longrightarrow> eventually (\<lambda>x. x \<in> z) F" |
61810 | 4515 |
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
|
4516 |
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
|
4517 |
proof (intro allI impI) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4518 |
fix B assume "finite B" "B \<subseteq> Z" |
60420 | 4519 |
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
|
4520 |
by (auto simp: eventually_ball_finite_distrib eventually_conj_iff) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4521 |
with F show "U \<inter> \<Inter>B \<noteq> {}" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4522 |
by (intro notI) (simp add: eventually_False) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4523 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4524 |
ultimately have "U \<inter> \<Inter>Z \<noteq> {}" |
60420 | 4525 |
using \<open>compact U\<close> unfolding compact_fip by blast |
53282 | 4526 |
then obtain x where "x \<in> U" and x: "\<And>z. z \<in> Z \<Longrightarrow> x \<in> z" |
4527 |
by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4528 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4529 |
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
|
4530 |
unfolding eventually_inf eventually_nhds |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4531 |
proof safe |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4532 |
fix P Q R S |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4533 |
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
|
4534 |
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
|
4535 |
have "S \<inter> {x. R x} \<noteq> {}" by (auto simp: Z_def) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4536 |
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
|
4537 |
ultimately show False by (auto simp: set_eq_iff) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4538 |
qed |
60420 | 4539 |
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
|
4540 |
by (metis eventually_bot) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4541 |
next |
53282 | 4542 |
fix A |
4543 |
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 | 4544 |
define F where "F = (INF a:insert U A. principal a)" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4545 |
have "F \<noteq> bot" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4546 |
unfolding F_def |
57276 | 4547 |
proof (rule INF_filter_not_bot) |
63540 | 4548 |
fix X |
4549 |
assume X: "X \<subseteq> insert U A" "finite X" |
|
4550 |
with A(2)[THEN spec, of "X - {U}"] have "U \<inter> \<Inter>(X - {U}) \<noteq> {}" |
|
53282 | 4551 |
by auto |
63540 | 4552 |
with X show "(INF a:X. principal a) \<noteq> bot" |
57276 | 4553 |
by (auto simp add: INF_principal_finite principal_eq_bot_iff) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4554 |
qed |
57276 | 4555 |
moreover |
4556 |
have "F \<le> principal U" |
|
4557 |
unfolding F_def by auto |
|
4558 |
then have "eventually (\<lambda>x. x \<in> U) F" |
|
4559 |
by (auto simp: le_filter_def eventually_principal) |
|
53282 | 4560 |
moreover |
4561 |
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
|
4562 |
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
|
4563 |
by auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4564 |
|
57276 | 4565 |
{ fix V assume "V \<in> A" |
4566 |
then have "F \<le> principal V" |
|
4567 |
unfolding F_def by (intro INF_lower2[of V]) auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4568 |
then have V: "eventually (\<lambda>x. x \<in> V) F" |
57276 | 4569 |
by (auto simp: le_filter_def eventually_principal) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4570 |
have "x \<in> closure V" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4571 |
unfolding closure_iff_nhds_not_empty |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4572 |
proof (intro impI allI) |
53282 | 4573 |
fix S A |
4574 |
assume "open S" "x \<in> S" "S \<subseteq> A" |
|
4575 |
then have "eventually (\<lambda>x. x \<in> A) (nhds x)" |
|
4576 |
by (auto simp: eventually_nhds) |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4577 |
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
|
4578 |
by (auto simp: eventually_inf) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4579 |
with x show "V \<inter> A \<noteq> {}" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4580 |
by (auto simp del: Int_iff simp add: trivial_limit_def) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4581 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4582 |
then have "x \<in> V" |
60420 | 4583 |
using \<open>V \<in> A\<close> A(1) by simp |
53282 | 4584 |
} |
60420 | 4585 |
with \<open>x\<in>U\<close> have "x \<in> U \<inter> \<Inter>A" by auto |
4586 |
with \<open>U \<inter> \<Inter>A = {}\<close> show False by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4587 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4588 |
|
50941
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4589 |
definition "countably_compact U \<longleftrightarrow> |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4590 |
(\<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
|
4591 |
|
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4592 |
lemma countably_compactE: |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4593 |
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
|
4594 |
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
|
4595 |
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
|
4596 |
|
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4597 |
lemma countably_compactI: |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4598 |
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
|
4599 |
shows "countably_compact s" |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4600 |
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
|
4601 |
|
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4602 |
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
|
4603 |
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
|
4604 |
|
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4605 |
lemma countably_compact_imp_compact: |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4606 |
assumes "countably_compact U" |
53282 | 4607 |
and ccover: "countable B" "\<forall>b\<in>B. open b" |
4608 |
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
|
4609 |
shows "compact U" |
60420 | 4610 |
using \<open>countably_compact U\<close> |
53282 | 4611 |
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
|
4612 |
proof safe |
53282 | 4613 |
fix A |
4614 |
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
|
4615 |
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 | 4616 |
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
|
4617 |
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
|
4618 |
unfolding C_def using ccover by auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4619 |
moreover |
50941
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4620 |
have "\<Union>A \<inter> U \<subseteq> \<Union>C" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4621 |
proof safe |
53282 | 4622 |
fix x a |
4623 |
assume "x \<in> U" "x \<in> a" "a \<in> A" |
|
4624 |
with basis[of a x] A obtain b where "b \<in> B" "x \<in> b" "b \<inter> U \<subseteq> a" |
|
4625 |
by blast |
|
60420 | 4626 |
with \<open>a \<in> A\<close> show "x \<in> \<Union>C" |
53282 | 4627 |
unfolding C_def by auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4628 |
qed |
60420 | 4629 |
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
|
4630 |
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
|
4631 |
using * by metis |
53374
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
53291
diff
changeset
|
4632 |
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
|
4633 |
by (auto simp: C_def) |
55522 | 4634 |
then obtain f where "\<forall>t\<in>T. f t \<in> A \<and> t \<inter> U \<subseteq> f t" |
4635 |
unfolding bchoice_iff Bex_def .. |
|
53374
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
53291
diff
changeset
|
4636 |
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
|
4637 |
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
|
4638 |
qed |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4639 |
|
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4640 |
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
|
4641 |
"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
|
4642 |
proof (rule countably_compact_imp_compact) |
53282 | 4643 |
fix T and x :: 'a |
4644 |
assume "open T" "x \<in> T" |
|
55522 | 4645 |
from topological_basisE[OF is_basis this] obtain b where |
4646 |
"b \<in> (SOME B. countable B \<and> topological_basis B)" "x \<in> b" "b \<subseteq> T" . |
|
53282 | 4647 |
then show "\<exists>b\<in>SOME B. countable B \<and> topological_basis B. x \<in> b \<and> b \<inter> U \<subseteq> T" |
55522 | 4648 |
by blast |
50941
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4649 |
qed (insert countable_basis topological_basis_open[OF is_basis], auto) |
36437 | 4650 |
|
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
|
4651 |
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
|
4652 |
"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
|
4653 |
using countably_compact_imp_compact_second_countable compact_imp_countably_compact by blast |
53282 | 4654 |
|
60420 | 4655 |
subsubsection\<open>Sequential compactness\<close> |
33175 | 4656 |
|
53282 | 4657 |
definition seq_compact :: "'a::topological_space set \<Rightarrow> bool" |
4658 |
where "seq_compact S \<longleftrightarrow> |
|
61973 | 4659 |
(\<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 | 4660 |
|
54070 | 4661 |
lemma seq_compactI: |
61973 | 4662 |
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 | 4663 |
shows "seq_compact S" |
4664 |
unfolding seq_compact_def using assms by fast |
|
4665 |
||
4666 |
lemma seq_compactE: |
|
4667 |
assumes "seq_compact S" "\<forall>n. f n \<in> S" |
|
61973 | 4668 |
obtains l r where "l \<in> S" "subseq r" "((f \<circ> r) \<longlongrightarrow> l) sequentially" |
54070 | 4669 |
using assms unfolding seq_compact_def by fast |
4670 |
||
4671 |
lemma closed_sequentially: (* TODO: move upwards *) |
|
61969 | 4672 |
assumes "closed s" and "\<forall>n. f n \<in> s" and "f \<longlonglongrightarrow> l" |
54070 | 4673 |
shows "l \<in> s" |
4674 |
proof (rule ccontr) |
|
4675 |
assume "l \<notin> s" |
|
61969 | 4676 |
with \<open>closed s\<close> and \<open>f \<longlonglongrightarrow> l\<close> have "eventually (\<lambda>n. f n \<in> - s) sequentially" |
54070 | 4677 |
by (fast intro: topological_tendstoD) |
60420 | 4678 |
with \<open>\<forall>n. f n \<in> s\<close> show "False" |
54070 | 4679 |
by simp |
4680 |
qed |
|
4681 |
||
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
|
4682 |
lemma seq_compact_Int_closed: |
54070 | 4683 |
assumes "seq_compact s" and "closed t" |
4684 |
shows "seq_compact (s \<inter> t)" |
|
4685 |
proof (rule seq_compactI) |
|
4686 |
fix f assume "\<forall>n::nat. f n \<in> s \<inter> t" |
|
4687 |
hence "\<forall>n. f n \<in> s" and "\<forall>n. f n \<in> t" |
|
4688 |
by simp_all |
|
60420 | 4689 |
from \<open>seq_compact s\<close> and \<open>\<forall>n. f n \<in> s\<close> |
61969 | 4690 |
obtain l r where "l \<in> s" and r: "subseq r" and l: "(f \<circ> r) \<longlonglongrightarrow> l" |
54070 | 4691 |
by (rule seq_compactE) |
60420 | 4692 |
from \<open>\<forall>n. f n \<in> t\<close> have "\<forall>n. (f \<circ> r) n \<in> t" |
54070 | 4693 |
by simp |
60420 | 4694 |
from \<open>closed t\<close> and this and l have "l \<in> t" |
54070 | 4695 |
by (rule closed_sequentially) |
61969 | 4696 |
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 | 4697 |
by fast |
4698 |
qed |
|
4699 |
||
4700 |
lemma seq_compact_closed_subset: |
|
4701 |
assumes "closed s" and "s \<subseteq> t" and "seq_compact t" |
|
4702 |
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
|
4703 |
using assms seq_compact_Int_closed [of t s] by (simp add: Int_absorb1) |
54070 | 4704 |
|
50941
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4705 |
lemma seq_compact_imp_countably_compact: |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4706 |
fixes U :: "'a :: first_countable_topology set" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4707 |
assumes "seq_compact U" |
50941
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4708 |
shows "countably_compact U" |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4709 |
proof (safe intro!: countably_compactI) |
52624 | 4710 |
fix A |
4711 |
assume A: "\<forall>a\<in>A. open a" "U \<subseteq> \<Union>A" "countable A" |
|
61969 | 4712 |
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 | 4713 |
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
|
4714 |
show "\<exists>T\<subseteq>A. finite T \<and> U \<subseteq> \<Union>T" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4715 |
proof cases |
52624 | 4716 |
assume "finite A" |
4717 |
with A show ?thesis by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4718 |
next |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4719 |
assume "infinite A" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4720 |
then have "A \<noteq> {}" by auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4721 |
show ?thesis |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4722 |
proof (rule ccontr) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4723 |
assume "\<not> (\<exists>T\<subseteq>A. finite T \<and> U \<subseteq> \<Union>T)" |
53282 | 4724 |
then have "\<forall>T. \<exists>x. T \<subseteq> A \<and> finite T \<longrightarrow> (x \<in> U - \<Union>T)" |
4725 |
by auto |
|
4726 |
then obtain X' where T: "\<And>T. T \<subseteq> A \<Longrightarrow> finite T \<Longrightarrow> X' T \<in> U - \<Union>T" |
|
4727 |
by metis |
|
63040 | 4728 |
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
|
4729 |
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
|
4730 |
using \<open>A \<noteq> {}\<close> unfolding X_def by (intro T) (auto intro: from_nat_into) |
53282 | 4731 |
then have "range X \<subseteq> U" |
4732 |
by auto |
|
61969 | 4733 |
with subseq[of X] obtain r x where "x \<in> U" and r: "subseq r" "(X \<circ> r) \<longlonglongrightarrow> x" |
53282 | 4734 |
by auto |
60420 | 4735 |
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
|
4736 |
obtain n where "x \<in> from_nat_into A n" by auto |
60420 | 4737 |
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
|
4738 |
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
|
4739 |
unfolding tendsto_def by (auto simp: comp_def) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4740 |
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
|
4741 |
by (auto simp: eventually_sequentially) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4742 |
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
|
4743 |
by auto |
60420 | 4744 |
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
|
4745 |
by (auto intro!: exI[of _ "max n N"]) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4746 |
ultimately show False |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4747 |
by auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4748 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4749 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4750 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4751 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4752 |
lemma compact_imp_seq_compact: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4753 |
fixes U :: "'a :: first_countable_topology set" |
53282 | 4754 |
assumes "compact U" |
4755 |
shows "seq_compact U" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4756 |
unfolding seq_compact_def |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4757 |
proof safe |
52624 | 4758 |
fix X :: "nat \<Rightarrow> 'a" |
4759 |
assume "\<forall>n. X n \<in> U" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4760 |
then have "eventually (\<lambda>x. x \<in> U) (filtermap X sequentially)" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4761 |
by (auto simp: eventually_filtermap) |
52624 | 4762 |
moreover |
4763 |
have "filtermap X sequentially \<noteq> bot" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4764 |
by (simp add: trivial_limit_def eventually_filtermap) |
52624 | 4765 |
ultimately |
4766 |
obtain x where "x \<in> U" and x: "inf (nhds x) (filtermap X sequentially) \<noteq> bot" (is "?F \<noteq> _") |
|
60420 | 4767 |
using \<open>compact U\<close> by (auto simp: compact_filter) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4768 |
|
55522 | 4769 |
from countable_basis_at_decseq[of x] |
4770 |
obtain A where A: |
|
4771 |
"\<And>i. open (A i)" |
|
4772 |
"\<And>i. x \<in> A i" |
|
4773 |
"\<And>S. open S \<Longrightarrow> x \<in> S \<Longrightarrow> eventually (\<lambda>i. A i \<subseteq> S) sequentially" |
|
4774 |
by blast |
|
63040 | 4775 |
define s where "s n i = (SOME j. i < j \<and> X j \<in> A (Suc n))" for n i |
52624 | 4776 |
{ |
4777 |
fix n i |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4778 |
have "\<exists>a. i < a \<and> X a \<in> A (Suc n)" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4779 |
proof (rule ccontr) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4780 |
assume "\<not> (\<exists>a>i. X a \<in> A (Suc n))" |
53282 | 4781 |
then have "\<And>a. Suc i \<le> a \<Longrightarrow> X a \<notin> A (Suc n)" |
4782 |
by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4783 |
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
|
4784 |
by (auto simp: eventually_filtermap eventually_sequentially) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4785 |
moreover have "eventually (\<lambda>x. x \<in> A (Suc n)) (nhds x)" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4786 |
using A(1,2)[of "Suc n"] by (auto simp: eventually_nhds) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4787 |
ultimately have "eventually (\<lambda>x. False) ?F" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4788 |
by (auto simp add: eventually_inf) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4789 |
with x show False |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4790 |
by (simp add: eventually_False) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4791 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4792 |
then have "i < s n i" "X (s n i) \<in> A (Suc n)" |
52624 | 4793 |
unfolding s_def by (auto intro: someI2_ex) |
4794 |
} |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4795 |
note s = this |
63040 | 4796 |
define r where "r = rec_nat (s 0 0) s" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4797 |
have "subseq r" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4798 |
by (auto simp: r_def s subseq_Suc_iff) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4799 |
moreover |
61969 | 4800 |
have "(\<lambda>n. X (r n)) \<longlonglongrightarrow> x" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4801 |
proof (rule topological_tendstoI) |
52624 | 4802 |
fix S |
4803 |
assume "open S" "x \<in> S" |
|
53282 | 4804 |
with A(3) have "eventually (\<lambda>i. A i \<subseteq> S) sequentially" |
4805 |
by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4806 |
moreover |
52624 | 4807 |
{ |
4808 |
fix i |
|
4809 |
assume "Suc 0 \<le> i" |
|
4810 |
then have "X (r i) \<in> A i" |
|
4811 |
by (cases i) (simp_all add: r_def s) |
|
4812 |
} |
|
4813 |
then have "eventually (\<lambda>i. X (r i) \<in> A i) sequentially" |
|
4814 |
by (auto simp: eventually_sequentially) |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4815 |
ultimately show "eventually (\<lambda>i. X (r i) \<in> S) sequentially" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4816 |
by eventually_elim auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4817 |
qed |
61969 | 4818 |
ultimately show "\<exists>x \<in> U. \<exists>r. subseq r \<and> (X \<circ> r) \<longlonglongrightarrow> x" |
60420 | 4819 |
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
|
4820 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4821 |
|
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
|
4822 |
lemma countably_compact_imp_acc_point: |
53291 | 4823 |
assumes "countably_compact s" |
4824 |
and "countable t" |
|
4825 |
and "infinite t" |
|
4826 |
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
|
4827 |
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
|
4828 |
proof (rule ccontr) |
63040 | 4829 |
define C where "C = (\<lambda>F. interior (F \<union> (- t))) ` {F. finite F \<and> F \<subseteq> t }" |
60420 | 4830 |
note \<open>countably_compact s\<close> |
53282 | 4831 |
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
|
4832 |
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
|
4833 |
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
|
4834 |
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
|
4835 |
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
|
4836 |
have "s \<subseteq> \<Union>C" |
60420 | 4837 |
using \<open>t \<subseteq> s\<close> |
62343
24106dc44def
prefer abbreviations for compound operators INFIMUM and SUPREMUM
haftmann
parents:
62131
diff
changeset
|
4838 |
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
|
4839 |
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
|
4840 |
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
|
4841 |
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
|
4842 |
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
|
4843 |
moreover |
60420 | 4844 |
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
|
4845 |
unfolding C_def by (auto intro: countable_Collect_finite_subset) |
55522 | 4846 |
ultimately |
4847 |
obtain D where "D \<subseteq> C" "finite D" "s \<subseteq> \<Union>D" |
|
4848 |
by (rule countably_compactE) |
|
53282 | 4849 |
then obtain E where E: "E \<subseteq> {F. finite F \<and> F \<subseteq> t }" "finite E" |
4850 |
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
|
4851 |
by (metis (lifting) finite_subset_image C_def) |
60420 | 4852 |
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
|
4853 |
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
|
4854 |
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
|
4855 |
using E by auto |
60420 | 4856 |
ultimately show False using \<open>infinite t\<close> |
53282 | 4857 |
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
|
4858 |
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
|
4859 |
|
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
|
4860 |
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
|
4861 |
fixes s :: "'a::first_countable_topology set" |
53291 | 4862 |
assumes "\<forall>t. infinite t \<and> countable t \<and> t \<subseteq> s \<longrightarrow> |
4863 |
(\<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
|
4864 |
shows "seq_compact s" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4865 |
proof - |
52624 | 4866 |
{ |
4867 |
fix f :: "nat \<Rightarrow> 'a" |
|
4868 |
assume f: "\<forall>n. f n \<in> s" |
|
61973 | 4869 |
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
|
4870 |
proof (cases "finite (range f)") |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4871 |
case True |
50941
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4872 |
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
|
4873 |
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
|
4874 |
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
|
4875 |
using infinite_enumerate by blast |
61969 | 4876 |
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
|
4877 |
by (simp add: fr o_def) |
61969 | 4878 |
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
|
4879 |
by auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4880 |
next |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4881 |
case False |
53282 | 4882 |
with f assms have "\<exists>x\<in>s. \<forall>U. x\<in>U \<and> open U \<longrightarrow> infinite (U \<inter> range f)" |
4883 |
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
|
4884 |
then obtain l where "l \<in> s" "\<forall>U. l\<in>U \<and> open U \<longrightarrow> infinite (U \<inter> range f)" .. |
61973 | 4885 |
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
|
4886 |
using acc_point_range_imp_convergent_subsequence[of l f] by auto |
61973 | 4887 |
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
|
4888 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4889 |
} |
53282 | 4890 |
then show ?thesis |
4891 |
unfolding seq_compact_def by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4892 |
qed |
44075 | 4893 |
|
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
|
4894 |
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
|
4895 |
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
|
4896 |
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
|
4897 |
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
|
4898 |
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
|
4899 |
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
|
4900 |
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
|
4901 |
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
|
4902 |
|
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
|
4903 |
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
|
4904 |
fixes s :: "'a :: first_countable_topology set" |
53291 | 4905 |
shows "seq_compact s \<longleftrightarrow> |
4906 |
(\<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
|
4907 |
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
|
4908 |
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
|
4909 |
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
|
4910 |
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
|
4911 |
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
|
4912 |
|
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
|
4913 |
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
|
4914 |
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
|
4915 |
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
|
4916 |
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
|
4917 |
|
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
|
4918 |
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
|
4919 |
fixes s :: "'a::{t1_space, first_countable_topology} set" |
64539 | 4920 |
shows "\<forall>t. infinite t \<and> t \<subseteq> s \<longrightarrow> (\<exists>x \<in> s. x islimpt t) \<Longrightarrow> seq_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
|
4921 |
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
|
4922 |
|
64539 | 4923 |
|
60420 | 4924 |
subsubsection\<open>Totally bounded\<close> |
50940
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4925 |
|
64539 | 4926 |
lemma cauchy_def: "Cauchy s \<longleftrightarrow> (\<forall>e>0. \<exists>N. \<forall>m n. m \<ge> N \<and> n \<ge> N \<longrightarrow> dist (s m) (s n) < e)" |
52624 | 4927 |
unfolding Cauchy_def by metis |
4928 |
||
50940
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4929 |
lemma seq_compact_imp_totally_bounded: |
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4930 |
assumes "seq_compact s" |
58184
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4931 |
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
|
4932 |
proof - |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4933 |
{ 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
|
4934 |
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
|
4935 |
have "\<exists>x. \<forall>n::nat. ?Q x n (x n)" |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4936 |
proof (rule dependent_wellorder_choice) |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4937 |
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
|
4938 |
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
|
4939 |
using *[of "x ` {0 ..< n}"] by (auto simp: subset_eq) |
52624 | 4940 |
then obtain z where z:"z\<in>s" "z \<notin> (\<Union>x\<in>x ` {0..<n}. ball x e)" |
4941 |
unfolding subset_eq by auto |
|
58184
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4942 |
show "\<exists>r. ?Q x n r" |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4943 |
using z by auto |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4944 |
qed simp |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4945 |
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
|
4946 |
by blast |
61973 | 4947 |
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
|
4948 |
using assms by (metis seq_compact_def) |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4949 |
from this(3) have "Cauchy (x \<circ> r)" |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4950 |
using LIMSEQ_imp_Cauchy by auto |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4951 |
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 | 4952 |
unfolding cauchy_def using \<open>e > 0\<close> by blast |
58184
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4953 |
then have False |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4954 |
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
|
4955 |
then show ?thesis |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4956 |
by metis |
50940
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4957 |
qed |
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4958 |
|
60420 | 4959 |
subsubsection\<open>Heine-Borel theorem\<close> |
50940
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4960 |
|
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4961 |
lemma seq_compact_imp_heine_borel: |
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4962 |
fixes s :: "'a :: metric_space set" |
53282 | 4963 |
assumes "seq_compact s" |
4964 |
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
|
4965 |
proof - |
60420 | 4966 |
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
|
4967 |
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 | 4968 |
unfolding choice_iff' .. |
63040 | 4969 |
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
|
4970 |
have "countably_compact s" |
60420 | 4971 |
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
|
4972 |
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
|
4973 |
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
|
4974 |
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
|
4975 |
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
|
4976 |
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
|
4977 |
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
|
4978 |
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
|
4979 |
next |
53282 | 4980 |
fix T x |
4981 |
assume T: "open T" "x \<in> T" and x: "x \<in> s" |
|
4982 |
from openE[OF T] obtain e where "0 < e" "ball x e \<subseteq> T" |
|
4983 |
by auto |
|
4984 |
then have "0 < e / 2" "ball x (e / 2) \<subseteq> T" |
|
4985 |
by auto |
|
60420 | 4986 |
from Rats_dense_in_real[OF \<open>0 < e / 2\<close>] obtain r where "r \<in> \<rat>" "0 < r" "r < e / 2" |
53282 | 4987 |
by auto |
60420 | 4988 |
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
|
4989 |
by auto |
60420 | 4990 |
from \<open>r \<in> \<rat>\<close> \<open>0 < r\<close> \<open>k \<in> f r\<close> have "ball k r \<in> K" |
53282 | 4991 |
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
|
4992 |
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
|
4993 |
proof (rule bexI[rotated], safe) |
53282 | 4994 |
fix y |
4995 |
assume "y \<in> ball k r" |
|
60420 | 4996 |
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
|
4997 |
by (intro dist_triangle_half_r [of k _ e]) (auto simp: dist_commute) |
60420 | 4998 |
with \<open>ball x e \<subseteq> T\<close> show "y \<in> T" |
53282 | 4999 |
by auto |
5000 |
next |
|
5001 |
show "x \<in> ball k r" by fact |
|
5002 |
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
|
5003 |
qed |
50940
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
5004 |
qed |
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
5005 |
|
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
5006 |
lemma compact_eq_seq_compact_metric: |
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
5007 |
"compact (s :: 'a::metric_space set) \<longleftrightarrow> seq_compact s" |
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
5008 |
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
|
5009 |
|
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
5010 |
lemma compact_def: |
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
5011 |
"compact (S :: 'a::metric_space set) \<longleftrightarrow> |
61969 | 5012 |
(\<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
|
5013 |
unfolding compact_eq_seq_compact_metric seq_compact_def by auto |
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
5014 |
|
60420 | 5015 |
subsubsection \<open>Complete the chain of compactness variants\<close> |
50944 | 5016 |
|
5017 |
lemma compact_eq_bolzano_weierstrass: |
|
5018 |
fixes s :: "'a::metric_space set" |
|
53282 | 5019 |
shows "compact s \<longleftrightarrow> (\<forall>t. infinite t \<and> t \<subseteq> s --> (\<exists>x \<in> s. x islimpt t))" |
5020 |
(is "?lhs = ?rhs") |
|
50944 | 5021 |
proof |
52624 | 5022 |
assume ?lhs |
53282 | 5023 |
then show ?rhs |
5024 |
using heine_borel_imp_bolzano_weierstrass[of s] by auto |
|
50944 | 5025 |
next |
52624 | 5026 |
assume ?rhs |
53282 | 5027 |
then show ?lhs |
50944 | 5028 |
unfolding compact_eq_seq_compact_metric by (rule bolzano_weierstrass_imp_seq_compact) |
5029 |
qed |
|
5030 |
||
5031 |
lemma bolzano_weierstrass_imp_bounded: |
|
53282 | 5032 |
"\<forall>t. infinite t \<and> t \<subseteq> s \<longrightarrow> (\<exists>x \<in> s. x islimpt t) \<Longrightarrow> bounded s" |
50944 | 5033 |
using compact_imp_bounded unfolding compact_eq_bolzano_weierstrass . |
5034 |
||
60420 | 5035 |
subsection \<open>Metric spaces with the Heine-Borel property\<close> |
5036 |
||
5037 |
text \<open> |
|
33175 | 5038 |
A metric space (or topological vector space) is said to have the |
5039 |
Heine-Borel property if every closed and bounded subset is compact. |
|
60420 | 5040 |
\<close> |
33175 | 5041 |
|
44207
ea99698c2070
locale-ize some definitions, so perfect_space and heine_borel can inherit from the proper superclasses
huffman
parents:
44170
diff
changeset
|
5042 |
class heine_borel = metric_space + |
33175 | 5043 |
assumes bounded_imp_convergent_subsequence: |
61973 | 5044 |
"bounded (range f) \<Longrightarrow> \<exists>l r. subseq r \<and> ((f \<circ> r) \<longlongrightarrow> l) sequentially" |
33175 | 5045 |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
5046 |
lemma bounded_closed_imp_seq_compact: |
33175 | 5047 |
fixes s::"'a::heine_borel set" |
53282 | 5048 |
assumes "bounded s" |
5049 |
and "closed s" |
|
5050 |
shows "seq_compact s" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
5051 |
proof (unfold seq_compact_def, clarify) |
53282 | 5052 |
fix f :: "nat \<Rightarrow> 'a" |
5053 |
assume f: "\<forall>n. f n \<in> s" |
|
60420 | 5054 |
with \<open>bounded s\<close> have "bounded (range f)" |
53282 | 5055 |
by (auto intro: bounded_subset) |
61973 | 5056 |
obtain l r where r: "subseq r" and l: "((f \<circ> r) \<longlongrightarrow> l) sequentially" |
60420 | 5057 |
using bounded_imp_convergent_subsequence [OF \<open>bounded (range f)\<close>] by auto |
53282 | 5058 |
from f have fr: "\<forall>n. (f \<circ> r) n \<in> s" |
5059 |
by simp |
|
60420 | 5060 |
have "l \<in> s" using \<open>closed s\<close> fr l |
54070 | 5061 |
by (rule closed_sequentially) |
61973 | 5062 |
show "\<exists>l\<in>s. \<exists>r. subseq r \<and> ((f \<circ> r) \<longlongrightarrow> l) sequentially" |
60420 | 5063 |
using \<open>l \<in> s\<close> r l by blast |
33175 | 5064 |
qed |
5065 |
||
50944 | 5066 |
lemma compact_eq_bounded_closed: |
5067 |
fixes s :: "'a::heine_borel set" |
|
53291 | 5068 |
shows "compact s \<longleftrightarrow> bounded s \<and> closed s" |
5069 |
(is "?lhs = ?rhs") |
|
50944 | 5070 |
proof |
52624 | 5071 |
assume ?lhs |
53282 | 5072 |
then show ?rhs |
52624 | 5073 |
using compact_imp_closed compact_imp_bounded |
5074 |
by blast |
|
50944 | 5075 |
next |
52624 | 5076 |
assume ?rhs |
53282 | 5077 |
then show ?lhs |
52624 | 5078 |
using bounded_closed_imp_seq_compact[of s] |
5079 |
unfolding compact_eq_seq_compact_metric |
|
5080 |
by auto |
|
50944 | 5081 |
qed |
5082 |
||
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
5083 |
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
|
5084 |
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
|
5085 |
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
|
5086 |
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
|
5087 |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
5088 |
lemma compact_components: |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
5089 |
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
|
5090 |
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
|
5091 |
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
|
5092 |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
5093 |
lemma not_compact_UNIV[simp]: |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
5094 |
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
|
5095 |
shows "~ compact (UNIV::'a set)" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
5096 |
by (simp add: compact_eq_bounded_closed) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
5097 |
|
50973
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
5098 |
(* TODO: is this lemma necessary? *) |
50972 | 5099 |
lemma bounded_increasing_convergent: |
5100 |
fixes s :: "nat \<Rightarrow> real" |
|
61969 | 5101 |
shows "bounded {s n| n. True} \<Longrightarrow> \<forall>n. s n \<le> s (Suc n) \<Longrightarrow> \<exists>l. s \<longlonglongrightarrow> l" |
50972 | 5102 |
using Bseq_mono_convergent[of s] incseq_Suc_iff[of s] |
5103 |
by (auto simp: image_def Bseq_eq_bounded convergent_def incseq_def) |
|
33175 | 5104 |
|
5105 |
instance real :: heine_borel |
|
5106 |
proof |
|
50998 | 5107 |
fix f :: "nat \<Rightarrow> real" |
5108 |
assume f: "bounded (range f)" |
|
50972 | 5109 |
obtain r where r: "subseq r" "monoseq (f \<circ> r)" |
5110 |
unfolding comp_def by (metis seq_monosub) |
|
5111 |
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
|
5112 |
unfolding Bseq_eq_bounded using f by (force intro: bounded_subset) |
61969 | 5113 |
with r show "\<exists>l r. subseq r \<and> (f \<circ> r) \<longlonglongrightarrow> l" |
50972 | 5114 |
using Bseq_monoseq_convergent[of "f \<circ> r"] by (auto simp: convergent_def) |
33175 | 5115 |
qed |
5116 |
||
62127 | 5117 |
lemma compact_lemma_general: |
5118 |
fixes f :: "nat \<Rightarrow> 'a" |
|
5119 |
fixes proj::"'a \<Rightarrow> 'b \<Rightarrow> 'c::heine_borel" (infixl "proj" 60) |
|
5120 |
fixes unproj:: "('b \<Rightarrow> 'c) \<Rightarrow> 'a" |
|
5121 |
assumes finite_basis: "finite basis" |
|
5122 |
assumes bounded_proj: "\<And>k. k \<in> basis \<Longrightarrow> bounded ((\<lambda>x. x proj k) ` range f)" |
|
5123 |
assumes proj_unproj: "\<And>e k. k \<in> basis \<Longrightarrow> (unproj e) proj k = e k" |
|
5124 |
assumes unproj_proj: "\<And>x. unproj (\<lambda>k. x proj k) = x" |
|
5125 |
shows "\<forall>d\<subseteq>basis. \<exists>l::'a. \<exists> r. |
|
5126 |
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
|
5127 |
proof safe |
62127 | 5128 |
fix d :: "'b set" |
5129 |
assume d: "d \<subseteq> basis" |
|
5130 |
with finite_basis have "finite d" |
|
53282 | 5131 |
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
|
5132 |
from this d show "\<exists>l::'a. \<exists>r. subseq r \<and> |
62127 | 5133 |
(\<forall>e>0. eventually (\<lambda>n. \<forall>i\<in>d. dist (f (r n) proj i) (l proj i) < e) sequentially)" |
52624 | 5134 |
proof (induct d) |
5135 |
case empty |
|
53282 | 5136 |
then show ?case |
5137 |
unfolding subseq_def by auto |
|
52624 | 5138 |
next |
5139 |
case (insert k d) |
|
62127 | 5140 |
have k[intro]: "k \<in> basis" |
53282 | 5141 |
using insert by auto |
62127 | 5142 |
have s': "bounded ((\<lambda>x. x proj k) ` range f)" |
5143 |
using k |
|
5144 |
by (rule bounded_proj) |
|
53282 | 5145 |
obtain l1::"'a" and r1 where r1: "subseq r1" |
62127 | 5146 |
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
|
5147 |
using insert(3) using insert(4) by auto |
62127 | 5148 |
have f': "\<forall>n. f (r1 n) proj k \<in> (\<lambda>x. x proj k) ` range f" |
53282 | 5149 |
by simp |
62127 | 5150 |
have "bounded (range (\<lambda>i. f (r1 i) proj k))" |
50998 | 5151 |
by (metis (lifting) bounded_subset f' image_subsetI s') |
62127 | 5152 |
then obtain l2 r2 where r2:"subseq r2" and lr2:"((\<lambda>i. f (r1 (r2 i)) proj k) \<longlongrightarrow> l2) sequentially" |
5153 |
using bounded_imp_convergent_subsequence[of "\<lambda>i. f (r1 i) proj k"] |
|
53282 | 5154 |
by (auto simp: o_def) |
63040 | 5155 |
define r where "r = r1 \<circ> r2" |
53282 | 5156 |
have r:"subseq r" |
33175 | 5157 |
using r1 and r2 unfolding r_def o_def subseq_def by auto |
5158 |
moreover |
|
63040 | 5159 |
define l where "l = unproj (\<lambda>i. if i = k then l2 else l1 proj i)" |
52624 | 5160 |
{ |
5161 |
fix e::real |
|
53282 | 5162 |
assume "e > 0" |
62127 | 5163 |
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 | 5164 |
by blast |
62127 | 5165 |
from lr2 \<open>e > 0\<close> have N2:"eventually (\<lambda>n. dist (f (r1 (r2 n)) proj k) l2 < e) sequentially" |
52624 | 5166 |
by (rule tendstoD) |
62127 | 5167 |
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 | 5168 |
by (rule eventually_subseq) |
62127 | 5169 |
have "eventually (\<lambda>n. \<forall>i\<in>(insert k d). dist (f (r n) proj i) (l proj i) < e) sequentially" |
53282 | 5170 |
using N1' N2 |
62127 | 5171 |
by eventually_elim (insert insert.prems, auto simp: l_def r_def o_def proj_unproj) |
33175 | 5172 |
} |
5173 |
ultimately show ?case by auto |
|
5174 |
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
|
5175 |
qed |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
37452
diff
changeset
|
5176 |
|
62127 | 5177 |
lemma compact_lemma: |
5178 |
fixes f :: "nat \<Rightarrow> 'a::euclidean_space" |
|
5179 |
assumes "bounded (range f)" |
|
5180 |
shows "\<forall>d\<subseteq>Basis. \<exists>l::'a. \<exists> r. |
|
5181 |
subseq r \<and> (\<forall>e>0. eventually (\<lambda>n. \<forall>i\<in>d. dist (f (r n) \<bullet> i) (l \<bullet> i) < e) sequentially)" |
|
5182 |
by (rule compact_lemma_general[where unproj="\<lambda>e. \<Sum>i\<in>Basis. e i *\<^sub>R i"]) |
|
5183 |
(auto intro!: assms bounded_linear_inner_left bounded_linear_image |
|
5184 |
simp: euclidean_representation) |
|
5185 |
||
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
37452
diff
changeset
|
5186 |
instance euclidean_space \<subseteq> heine_borel |
33175 | 5187 |
proof |
50998 | 5188 |
fix f :: "nat \<Rightarrow> 'a" |
5189 |
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
|
5190 |
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
|
5191 |
and l: "\<forall>e>0. eventually (\<lambda>n. \<forall>i\<in>Basis. dist (f (r n) \<bullet> i) (l \<bullet> i) < e) sequentially" |
50998 | 5192 |
using compact_lemma [OF f] by blast |
52624 | 5193 |
{ |
5194 |
fix e::real |
|
53282 | 5195 |
assume "e > 0" |
56541 | 5196 |
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
|
5197 |
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 | 5198 |
by simp |
5199 |
moreover |
|
52624 | 5200 |
{ |
5201 |
fix n |
|
5202 |
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
|
5203 |
have "dist (f (r n)) l \<le> (\<Sum>i\<in>Basis. dist (f (r n) \<bullet> i) (l \<bullet> i))" |
52624 | 5204 |
apply (subst euclidean_dist_l2) |
5205 |
using zero_le_dist |
|
64267 | 5206 |
apply (rule setL2_le_sum) |
53282 | 5207 |
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
|
5208 |
also have "\<dots> < (\<Sum>i\<in>(Basis::'a set). e / (real_of_nat DIM('a)))" |
64267 | 5209 |
apply (rule sum_strict_mono) |
52624 | 5210 |
using n |
53282 | 5211 |
apply auto |
5212 |
done |
|
5213 |
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
|
5214 |
by auto |
33175 | 5215 |
} |
5216 |
ultimately have "eventually (\<lambda>n. dist (f (r n)) l < e) sequentially" |
|
61810 | 5217 |
by (rule eventually_mono) |
33175 | 5218 |
} |
61973 | 5219 |
then have *: "((f \<circ> r) \<longlongrightarrow> l) sequentially" |
52624 | 5220 |
unfolding o_def tendsto_iff by simp |
61973 | 5221 |
with r show "\<exists>l r. subseq r \<and> ((f \<circ> r) \<longlongrightarrow> l) sequentially" |
52624 | 5222 |
by auto |
33175 | 5223 |
qed |
5224 |
||
5225 |
lemma bounded_fst: "bounded s \<Longrightarrow> bounded (fst ` s)" |
|
52624 | 5226 |
unfolding bounded_def |
55775 | 5227 |
by (metis (erased, hide_lams) dist_fst_le image_iff order_trans) |
33175 | 5228 |
|
5229 |
lemma bounded_snd: "bounded s \<Longrightarrow> bounded (snd ` s)" |
|
52624 | 5230 |
unfolding bounded_def |
55775 | 5231 |
by (metis (no_types, hide_lams) dist_snd_le image_iff order.trans) |
33175 | 5232 |
|
37678
0040bafffdef
"prod" and "sum" replace "*" and "+" respectively
haftmann
parents:
37649
diff
changeset
|
5233 |
instance prod :: (heine_borel, heine_borel) heine_borel |
33175 | 5234 |
proof |
50998 | 5235 |
fix f :: "nat \<Rightarrow> 'a \<times> 'b" |
5236 |
assume f: "bounded (range f)" |
|
56154
f0a927235162
more complete set of lemmas wrt. image and composition
haftmann
parents:
56073
diff
changeset
|
5237 |
then have "bounded (fst ` range f)" |
f0a927235162
more complete set of lemmas wrt. image and composition
haftmann
parents:
56073
diff
changeset
|
5238 |
by (rule bounded_fst) |
f0a927235162
more complete set of lemmas wrt. image and composition
haftmann
parents:
56073
diff
changeset
|
5239 |
then have s1: "bounded (range (fst \<circ> f))" |
f0a927235162
more complete set of lemmas wrt. image and composition
haftmann
parents:
56073
diff
changeset
|
5240 |
by (simp add: image_comp) |
61969 | 5241 |
obtain l1 r1 where r1: "subseq r1" and l1: "(\<lambda>n. fst (f (r1 n))) \<longlonglongrightarrow> l1" |
50998 | 5242 |
using bounded_imp_convergent_subsequence [OF s1] unfolding o_def by fast |
5243 |
from f have s2: "bounded (range (snd \<circ> f \<circ> r1))" |
|
5244 |
by (auto simp add: image_comp intro: bounded_snd bounded_subset) |
|
61973 | 5245 |
obtain l2 r2 where r2: "subseq r2" and l2: "((\<lambda>n. snd (f (r1 (r2 n)))) \<longlongrightarrow> l2) sequentially" |
50998 | 5246 |
using bounded_imp_convergent_subsequence [OF s2] |
33175 | 5247 |
unfolding o_def by fast |
61973 | 5248 |
have l1': "((\<lambda>n. fst (f (r1 (r2 n)))) \<longlongrightarrow> l1) sequentially" |
50972 | 5249 |
using LIMSEQ_subseq_LIMSEQ [OF l1 r2] unfolding o_def . |
61973 | 5250 |
have l: "((f \<circ> (r1 \<circ> r2)) \<longlongrightarrow> (l1, l2)) sequentially" |
33175 | 5251 |
using tendsto_Pair [OF l1' l2] unfolding o_def by simp |
5252 |
have r: "subseq (r1 \<circ> r2)" |
|
5253 |
using r1 r2 unfolding subseq_def by simp |
|
61973 | 5254 |
show "\<exists>l r. subseq r \<and> ((f \<circ> r) \<longlongrightarrow> l) sequentially" |
33175 | 5255 |
using l r by fast |
5256 |
qed |
|
5257 |
||
60420 | 5258 |
subsubsection \<open>Completeness\<close> |
33175 | 5259 |
|
62101 | 5260 |
lemma (in metric_space) completeI: |
61969 | 5261 |
assumes "\<And>f. \<forall>n. f n \<in> s \<Longrightarrow> Cauchy f \<Longrightarrow> \<exists>l\<in>s. f \<longlonglongrightarrow> l" |
54070 | 5262 |
shows "complete s" |
5263 |
using assms unfolding complete_def by fast |
|
5264 |
||
62101 | 5265 |
lemma (in metric_space) completeE: |
54070 | 5266 |
assumes "complete s" and "\<forall>n. f n \<in> s" and "Cauchy f" |
61969 | 5267 |
obtains l where "l \<in> s" and "f \<longlonglongrightarrow> l" |
54070 | 5268 |
using assms unfolding complete_def by fast |
5269 |
||
62101 | 5270 |
(* TODO: generalize to uniform spaces *) |
52624 | 5271 |
lemma compact_imp_complete: |
62101 | 5272 |
fixes s :: "'a::metric_space set" |
52624 | 5273 |
assumes "compact s" |
5274 |
shows "complete s" |
|
5275 |
proof - |
|
5276 |
{ |
|
5277 |
fix f |
|
5278 |
assume as: "(\<forall>n::nat. f n \<in> s)" "Cauchy f" |
|
61969 | 5279 |
from as(1) obtain l r where lr: "l\<in>s" "subseq r" "(f \<circ> r) \<longlonglongrightarrow> l" |
50971 | 5280 |
using assms unfolding compact_def by blast |
5281 |
||
5282 |
note lr' = seq_suble [OF lr(2)] |
|
52624 | 5283 |
{ |
53282 | 5284 |
fix e :: real |
5285 |
assume "e > 0" |
|
52624 | 5286 |
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" |
5287 |
unfolding cauchy_def |
|
60420 | 5288 |
using \<open>e > 0\<close> |
53282 | 5289 |
apply (erule_tac x="e/2" in allE) |
52624 | 5290 |
apply auto |
5291 |
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
|
5292 |
from lr(3)[unfolded lim_sequentially, THEN spec[where x="e/2"]] |
53282 | 5293 |
obtain M where M:"\<forall>n\<ge>M. dist ((f \<circ> r) n) l < e/2" |
60420 | 5294 |
using \<open>e > 0\<close> by auto |
52624 | 5295 |
{ |
53282 | 5296 |
fix n :: nat |
5297 |
assume n: "n \<ge> max N M" |
|
5298 |
have "dist ((f \<circ> r) n) l < e/2" |
|
5299 |
using n M by auto |
|
5300 |
moreover have "r n \<ge> N" |
|
5301 |
using lr'[of n] n by auto |
|
5302 |
then have "dist (f n) ((f \<circ> r) n) < e / 2" |
|
5303 |
using N and n by auto |
|
52624 | 5304 |
ultimately have "dist (f n) l < e" |
53282 | 5305 |
using dist_triangle_half_r[of "f (r n)" "f n" e l] |
5306 |
by (auto simp add: dist_commute) |
|
52624 | 5307 |
} |
53282 | 5308 |
then have "\<exists>N. \<forall>n\<ge>N. dist (f n) l < e" by blast |
52624 | 5309 |
} |
61973 | 5310 |
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
|
5311 |
unfolding lim_sequentially by auto |
52624 | 5312 |
} |
53282 | 5313 |
then show ?thesis unfolding complete_def by auto |
50971 | 5314 |
qed |
5315 |
||
5316 |
lemma nat_approx_posE: |
|
5317 |
fixes e::real |
|
5318 |
assumes "0 < e" |
|
53282 | 5319 |
obtains n :: nat where "1 / (Suc n) < e" |
50971 | 5320 |
proof atomize_elim |
61942 | 5321 |
have "1 / real (Suc (nat \<lceil>1/e\<rceil>)) < 1 / \<lceil>1/e\<rceil>" |
60420 | 5322 |
by (rule divide_strict_left_mono) (auto simp: \<open>0 < e\<close>) |
61942 | 5323 |
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
|
5324 |
by (rule divide_left_mono) (auto simp: \<open>0 < e\<close> ceiling_correct) |
50971 | 5325 |
also have "\<dots> = e" by simp |
5326 |
finally show "\<exists>n. 1 / real (Suc n) < e" .. |
|
5327 |
qed |
|
5328 |
||
5329 |
lemma compact_eq_totally_bounded: |
|
58184
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
5330 |
"compact s \<longleftrightarrow> complete s \<and> (\<forall>e>0. \<exists>k. finite k \<and> s \<subseteq> (\<Union>x\<in>k. ball x e))" |
50971 | 5331 |
(is "_ \<longleftrightarrow> ?rhs") |
5332 |
proof |
|
5333 |
assume assms: "?rhs" |
|
5334 |
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)" |
|
5335 |
by (auto simp: choice_iff') |
|
5336 |
||
5337 |
show "compact s" |
|
5338 |
proof cases |
|
53282 | 5339 |
assume "s = {}" |
5340 |
then show "compact s" by (simp add: compact_def) |
|
50971 | 5341 |
next |
5342 |
assume "s \<noteq> {}" |
|
5343 |
show ?thesis |
|
5344 |
unfolding compact_def |
|
5345 |
proof safe |
|
53282 | 5346 |
fix f :: "nat \<Rightarrow> 'a" |
5347 |
assume f: "\<forall>n. f n \<in> s" |
|
5348 |
||
63040 | 5349 |
define e where "e n = 1 / (2 * Suc n)" for n |
50971 | 5350 |
then have [simp]: "\<And>n. 0 < e n" by auto |
63040 | 5351 |
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 | 5352 |
{ |
5353 |
fix n U |
|
5354 |
assume "infinite {n. f n \<in> U}" |
|
50971 | 5355 |
then have "\<exists>b\<in>k (e n). infinite {i\<in>{n. f n \<in> U}. f i \<in> ball b (e n)}" |
5356 |
using k f by (intro pigeonhole_infinite_rel) (auto simp: subset_eq) |
|
55522 | 5357 |
then obtain a where |
5358 |
"a \<in> k (e n)" |
|
5359 |
"infinite {i \<in> {n. f n \<in> U}. f i \<in> ball a (e n)}" .. |
|
50971 | 5360 |
then have "\<exists>b. infinite {i. f i \<in> b} \<and> (\<exists>x. b \<subseteq> ball x (e n) \<inter> U)" |
5361 |
by (intro exI[of _ "ball a (e n) \<inter> U"] exI[of _ a]) (auto simp: ac_simps) |
|
5362 |
from someI_ex[OF this] |
|
5363 |
have "infinite {i. f i \<in> B n U}" "\<exists>x. B n U \<subseteq> ball x (e n) \<inter> U" |
|
53282 | 5364 |
unfolding B_def by auto |
5365 |
} |
|
50971 | 5366 |
note B = this |
5367 |
||
63040 | 5368 |
define F where "F = rec_nat (B 0 UNIV) B" |
53282 | 5369 |
{ |
5370 |
fix n |
|
5371 |
have "infinite {i. f i \<in> F n}" |
|
5372 |
by (induct n) (auto simp: F_def B) |
|
5373 |
} |
|
50971 | 5374 |
then have F: "\<And>n. \<exists>x. F (Suc n) \<subseteq> ball x (e n) \<inter> F n" |
5375 |
using B by (simp add: F_def) |
|
5376 |
then have F_dec: "\<And>m n. m \<le> n \<Longrightarrow> F n \<subseteq> F m" |
|
5377 |
using decseq_SucI[of F] by (auto simp: decseq_def) |
|
5378 |
||
5379 |
obtain sel where sel: "\<And>k i. i < sel k i" "\<And>k i. f (sel k i) \<in> F k" |
|
5380 |
proof (atomize_elim, unfold all_conj_distrib[symmetric], intro choice allI) |
|
5381 |
fix k i |
|
5382 |
have "infinite ({n. f n \<in> F k} - {.. i})" |
|
60420 | 5383 |
using \<open>infinite {n. f n \<in> F k}\<close> by auto |
50971 | 5384 |
from infinite_imp_nonempty[OF this] |
5385 |
show "\<exists>x>i. f x \<in> F k" |
|
5386 |
by (simp add: set_eq_iff not_le conj_commute) |
|
5387 |
qed |
|
5388 |
||
63040 | 5389 |
define t where "t = rec_nat (sel 0 0) (\<lambda>n i. sel (Suc n) i)" |
50971 | 5390 |
have "subseq t" |
5391 |
unfolding subseq_Suc_iff by (simp add: t_def sel) |
|
5392 |
moreover have "\<forall>i. (f \<circ> t) i \<in> s" |
|
5393 |
using f by auto |
|
5394 |
moreover |
|
53282 | 5395 |
{ |
5396 |
fix n |
|
5397 |
have "(f \<circ> t) n \<in> F n" |
|
5398 |
by (cases n) (simp_all add: t_def sel) |
|
5399 |
} |
|
50971 | 5400 |
note t = this |
5401 |
||
5402 |
have "Cauchy (f \<circ> t)" |
|
5403 |
proof (safe intro!: metric_CauchyI exI elim!: nat_approx_posE) |
|
53282 | 5404 |
fix r :: real and N n m |
5405 |
assume "1 / Suc N < r" "Suc N \<le> n" "Suc N \<le> m" |
|
50971 | 5406 |
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
|
5407 |
using F_dec t by (auto simp: e_def field_simps of_nat_Suc) |
50971 | 5408 |
with F[of N] obtain x where "dist x ((f \<circ> t) n) < e N" "dist x ((f \<circ> t) m) < e N" |
5409 |
by (auto simp: subset_eq) |
|
60420 | 5410 |
with dist_triangle[of "(f \<circ> t) m" "(f \<circ> t) n" x] \<open>2 * e N < r\<close> |
50971 | 5411 |
show "dist ((f \<circ> t) m) ((f \<circ> t) n) < r" |
5412 |
by (simp add: dist_commute) |
|
5413 |
qed |
|
5414 |
||
61969 | 5415 |
ultimately show "\<exists>l\<in>s. \<exists>r. subseq r \<and> (f \<circ> r) \<longlonglongrightarrow> l" |
50971 | 5416 |
using assms unfolding complete_def by blast |
5417 |
qed |
|
5418 |
qed |
|
5419 |
qed (metis compact_imp_complete compact_imp_seq_compact seq_compact_imp_totally_bounded) |
|
33175 | 5420 |
|
5421 |
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 | 5422 |
proof - |
5423 |
{ |
|
5424 |
assume ?rhs |
|
5425 |
{ |
|
5426 |
fix e::real |
|
33175 | 5427 |
assume "e>0" |
60420 | 5428 |
with \<open>?rhs\<close> obtain N where N:"\<forall>n\<ge>N. dist (s n) (s N) < e/2" |
33175 | 5429 |
by (erule_tac x="e/2" in allE) auto |
53282 | 5430 |
{ |
5431 |
fix n m |
|
33175 | 5432 |
assume nm:"N \<le> m \<and> N \<le> n" |
53282 | 5433 |
then have "dist (s m) (s n) < e" using N |
33175 | 5434 |
using dist_triangle_half_l[of "s m" "s N" "e" "s n"] |
5435 |
by blast |
|
5436 |
} |
|
53282 | 5437 |
then have "\<exists>N. \<forall>m n. N \<le> m \<and> N \<le> n \<longrightarrow> dist (s m) (s n) < e" |
33175 | 5438 |
by blast |
5439 |
} |
|
53282 | 5440 |
then have ?lhs |
33175 | 5441 |
unfolding cauchy_def |
5442 |
by blast |
|
5443 |
} |
|
53282 | 5444 |
then show ?thesis |
33175 | 5445 |
unfolding cauchy_def |
5446 |
using dist_triangle_half_l |
|
5447 |
by blast |
|
5448 |
qed |
|
5449 |
||
53282 | 5450 |
lemma cauchy_imp_bounded: |
5451 |
assumes "Cauchy s" |
|
5452 |
shows "bounded (range s)" |
|
5453 |
proof - |
|
5454 |
from assms obtain N :: nat where "\<forall>m n. N \<le> m \<and> N \<le> n \<longrightarrow> dist (s m) (s n) < 1" |
|
52624 | 5455 |
unfolding cauchy_def |
5456 |
apply (erule_tac x= 1 in allE) |
|
5457 |
apply auto |
|
5458 |
done |
|
53282 | 5459 |
then have N:"\<forall>n. N \<le> n \<longrightarrow> dist (s N) (s n) < 1" by auto |
33175 | 5460 |
moreover |
52624 | 5461 |
have "bounded (s ` {0..N})" |
5462 |
using finite_imp_bounded[of "s ` {1..N}"] by auto |
|
33175 | 5463 |
then obtain a where a:"\<forall>x\<in>s ` {0..N}. dist (s N) x \<le> a" |
5464 |
unfolding bounded_any_center [where a="s N"] by auto |
|
5465 |
ultimately show "?thesis" |
|
5466 |
unfolding bounded_any_center [where a="s N"] |
|
52624 | 5467 |
apply (rule_tac x="max a 1" in exI) |
5468 |
apply auto |
|
5469 |
apply (erule_tac x=y in allE) |
|
5470 |
apply (erule_tac x=y in ballE) |
|
5471 |
apply auto |
|
5472 |
done |
|
33175 | 5473 |
qed |
5474 |
||
5475 |
instance heine_borel < complete_space |
|
5476 |
proof |
|
5477 |
fix f :: "nat \<Rightarrow> 'a" assume "Cauchy f" |
|
53282 | 5478 |
then have "bounded (range f)" |
34104 | 5479 |
by (rule cauchy_imp_bounded) |
53282 | 5480 |
then have "compact (closure (range f))" |
50971 | 5481 |
unfolding compact_eq_bounded_closed by auto |
53282 | 5482 |
then have "complete (closure (range f))" |
50971 | 5483 |
by (rule compact_imp_complete) |
33175 | 5484 |
moreover have "\<forall>n. f n \<in> closure (range f)" |
5485 |
using closure_subset [of "range f"] by auto |
|
61973 | 5486 |
ultimately have "\<exists>l\<in>closure (range f). (f \<longlongrightarrow> l) sequentially" |
60420 | 5487 |
using \<open>Cauchy f\<close> unfolding complete_def by auto |
33175 | 5488 |
then show "convergent f" |
36660
1cc4ab4b7ff7
make (X ----> L) an abbreviation for (X ---> L) sequentially
huffman
parents:
36659
diff
changeset
|
5489 |
unfolding convergent_def by auto |
33175 | 5490 |
qed |
5491 |
||
44632 | 5492 |
instance euclidean_space \<subseteq> banach .. |
5493 |
||
54070 | 5494 |
lemma complete_UNIV: "complete (UNIV :: ('a::complete_space) set)" |
5495 |
proof (rule completeI) |
|
5496 |
fix f :: "nat \<Rightarrow> 'a" assume "Cauchy f" |
|
53282 | 5497 |
then have "convergent f" by (rule Cauchy_convergent) |
61969 | 5498 |
then show "\<exists>l\<in>UNIV. f \<longlonglongrightarrow> l" unfolding convergent_def by simp |
53282 | 5499 |
qed |
5500 |
||
5501 |
lemma complete_imp_closed: |
|
64287 | 5502 |
fixes S :: "'a::metric_space set" |
5503 |
assumes "complete S" |
|
5504 |
shows "closed S" |
|
54070 | 5505 |
proof (unfold closed_sequential_limits, clarify) |
64287 | 5506 |
fix f x assume "\<forall>n. f n \<in> S" and "f \<longlonglongrightarrow> x" |
61969 | 5507 |
from \<open>f \<longlonglongrightarrow> x\<close> have "Cauchy f" |
54070 | 5508 |
by (rule LIMSEQ_imp_Cauchy) |
64287 | 5509 |
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 | 5510 |
by (rule completeE) |
61969 | 5511 |
from \<open>f \<longlonglongrightarrow> x\<close> and \<open>f \<longlonglongrightarrow> l\<close> have "x = l" |
54070 | 5512 |
by (rule LIMSEQ_unique) |
64287 | 5513 |
with \<open>l \<in> S\<close> show "x \<in> S" |
54070 | 5514 |
by simp |
5515 |
qed |
|
5516 |
||
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
|
5517 |
lemma complete_Int_closed: |
64287 | 5518 |
fixes S :: "'a::metric_space set" |
5519 |
assumes "complete S" and "closed t" |
|
5520 |
shows "complete (S \<inter> t)" |
|
54070 | 5521 |
proof (rule completeI) |
64287 | 5522 |
fix f assume "\<forall>n. f n \<in> S \<inter> t" and "Cauchy f" |
5523 |
then have "\<forall>n. f n \<in> S" and "\<forall>n. f n \<in> t" |
|
54070 | 5524 |
by simp_all |
64287 | 5525 |
from \<open>complete S\<close> obtain l where "l \<in> S" and "f \<longlonglongrightarrow> l" |
5526 |
using \<open>\<forall>n. f n \<in> S\<close> and \<open>Cauchy f\<close> by (rule completeE) |
|
61969 | 5527 |
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 | 5528 |
by (rule closed_sequentially) |
64287 | 5529 |
with \<open>l \<in> S\<close> and \<open>f \<longlonglongrightarrow> l\<close> show "\<exists>l\<in>S \<inter> t. f \<longlonglongrightarrow> l" |
54070 | 5530 |
by fast |
5531 |
qed |
|
5532 |
||
5533 |
lemma complete_closed_subset: |
|
64287 | 5534 |
fixes S :: "'a::metric_space set" |
5535 |
assumes "closed S" and "S \<subseteq> t" and "complete t" |
|
5536 |
shows "complete S" |
|
5537 |
using assms complete_Int_closed [of t S] by (simp add: Int_absorb1) |
|
33175 | 5538 |
|
5539 |
lemma complete_eq_closed: |
|
64287 | 5540 |
fixes S :: "('a::complete_space) set" |
5541 |
shows "complete S \<longleftrightarrow> closed S" |
|
33175 | 5542 |
proof |
64287 | 5543 |
assume "closed S" then show "complete S" |
54070 | 5544 |
using subset_UNIV complete_UNIV by (rule complete_closed_subset) |
33175 | 5545 |
next |
64287 | 5546 |
assume "complete S" then show "closed S" |
54070 | 5547 |
by (rule complete_imp_closed) |
33175 | 5548 |
qed |
5549 |
||
64287 | 5550 |
lemma convergent_eq_Cauchy: |
5551 |
fixes S :: "nat \<Rightarrow> 'a::complete_space" |
|
5552 |
shows "(\<exists>l. (S \<longlongrightarrow> l) sequentially) \<longleftrightarrow> Cauchy S" |
|
44632 | 5553 |
unfolding Cauchy_convergent_iff convergent_def .. |
33175 | 5554 |
|
5555 |
lemma convergent_imp_bounded: |
|
64287 | 5556 |
fixes S :: "nat \<Rightarrow> 'a::metric_space" |
5557 |
shows "(S \<longlongrightarrow> l) sequentially \<Longrightarrow> bounded (range S)" |
|
50939
ae7cd20ed118
replace convergent_imp_cauchy by LIMSEQ_imp_Cauchy
hoelzl
parents:
50938
diff
changeset
|
5558 |
by (intro cauchy_imp_bounded LIMSEQ_imp_Cauchy) |
33175 | 5559 |
|
5560 |
lemma compact_cball[simp]: |
|
5561 |
fixes x :: "'a::heine_borel" |
|
54070 | 5562 |
shows "compact (cball x e)" |
33175 | 5563 |
using compact_eq_bounded_closed bounded_cball closed_cball |
5564 |
by blast |
|
5565 |
||
5566 |
lemma compact_frontier_bounded[intro]: |
|
64287 | 5567 |
fixes S :: "'a::heine_borel set" |
5568 |
shows "bounded S \<Longrightarrow> compact (frontier S)" |
|
33175 | 5569 |
unfolding frontier_def |
5570 |
using compact_eq_bounded_closed |
|
5571 |
by blast |
|
5572 |
||
5573 |
lemma compact_frontier[intro]: |
|
64287 | 5574 |
fixes S :: "'a::heine_borel set" |
5575 |
shows "compact S \<Longrightarrow> compact (frontier S)" |
|
33175 | 5576 |
using compact_eq_bounded_closed compact_frontier_bounded |
5577 |
by blast |
|
5578 |
||
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
5579 |
corollary compact_sphere [simp]: |
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
5580 |
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
|
5581 |
shows "compact (sphere a r)" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
5582 |
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
|
5583 |
|
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
5584 |
corollary bounded_sphere [simp]: |
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
5585 |
fixes a :: "'a::{real_normed_vector,perfect_space,heine_borel}" |
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
5586 |
shows "bounded (sphere a r)" |
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
5587 |
by (simp add: compact_imp_bounded) |
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
5588 |
|
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
5589 |
corollary closed_sphere [simp]: |
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
5590 |
fixes a :: "'a::{real_normed_vector,perfect_space,heine_borel}" |
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
5591 |
shows "closed (sphere a r)" |
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
5592 |
by (simp add: compact_imp_closed) |
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
5593 |
|
33175 | 5594 |
lemma frontier_subset_compact: |
64287 | 5595 |
fixes S :: "'a::heine_borel set" |
5596 |
shows "compact S \<Longrightarrow> frontier S \<subseteq> S" |
|
33175 | 5597 |
using frontier_subset_closed compact_eq_bounded_closed |
5598 |
by blast |
|
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
5599 |
|
62131
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5600 |
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
|
5601 |
|
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5602 |
lemma summable_imp_bounded: |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5603 |
fixes f :: "nat \<Rightarrow> 'a::real_normed_vector" |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5604 |
shows "summable f \<Longrightarrow> bounded (range f)" |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5605 |
by (frule summable_LIMSEQ_zero) (simp add: convergent_imp_bounded) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5606 |
|
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5607 |
lemma summable_imp_sums_bounded: |
64267 | 5608 |
"summable f \<Longrightarrow> bounded (range (\<lambda>n. sum f {..<n}))" |
62131
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5609 |
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
|
5610 |
|
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5611 |
lemma power_series_conv_imp_absconv_weak: |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5612 |
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
|
5613 |
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
|
5614 |
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
|
5615 |
proof - |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5616 |
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
|
5617 |
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
|
5618 |
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
|
5619 |
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
|
5620 |
show ?thesis |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5621 |
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
|
5622 |
apply (simp only: summable_complex_of_real *) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5623 |
apply (auto simp: norm_mult norm_power) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5624 |
done |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5625 |
qed |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5626 |
|
60420 | 5627 |
subsection \<open>Bounded closed nest property (proof does not use Heine-Borel)\<close> |
33175 | 5628 |
|
5629 |
lemma bounded_closed_nest: |
|
54070 | 5630 |
fixes s :: "nat \<Rightarrow> ('a::heine_borel) set" |
5631 |
assumes "\<forall>n. closed (s n)" |
|
5632 |
and "\<forall>n. s n \<noteq> {}" |
|
5633 |
and "\<forall>m n. m \<le> n \<longrightarrow> s n \<subseteq> s m" |
|
5634 |
and "bounded (s 0)" |
|
5635 |
shows "\<exists>a. \<forall>n. a \<in> s n" |
|
52624 | 5636 |
proof - |
54070 | 5637 |
from assms(2) obtain x where x: "\<forall>n. x n \<in> s n" |
5638 |
using choice[of "\<lambda>n x. x \<in> s n"] by auto |
|
5639 |
from assms(4,1) have "seq_compact (s 0)" |
|
5640 |
by (simp add: bounded_closed_imp_seq_compact) |
|
61969 | 5641 |
then obtain l r where lr: "l \<in> s 0" "subseq r" "(x \<circ> r) \<longlonglongrightarrow> l" |
54070 | 5642 |
using x and assms(3) unfolding seq_compact_def by blast |
5643 |
have "\<forall>n. l \<in> s n" |
|
5644 |
proof |
|
53282 | 5645 |
fix n :: nat |
54070 | 5646 |
have "closed (s n)" |
5647 |
using assms(1) by simp |
|
5648 |
moreover have "\<forall>i. (x \<circ> r) i \<in> s i" |
|
5649 |
using x and assms(3) and lr(2) [THEN seq_suble] by auto |
|
5650 |
then have "\<forall>i. (x \<circ> r) (i + n) \<in> s n" |
|
5651 |
using assms(3) by (fast intro!: le_add2) |
|
61969 | 5652 |
moreover have "(\<lambda>i. (x \<circ> r) (i + n)) \<longlonglongrightarrow> l" |
54070 | 5653 |
using lr(3) by (rule LIMSEQ_ignore_initial_segment) |
5654 |
ultimately show "l \<in> s n" |
|
5655 |
by (rule closed_sequentially) |
|
5656 |
qed |
|
5657 |
then show ?thesis .. |
|
33175 | 5658 |
qed |
5659 |
||
60420 | 5660 |
text \<open>Decreasing case does not even need compactness, just completeness.\<close> |
33175 | 5661 |
|
5662 |
lemma decreasing_closed_nest: |
|
54070 | 5663 |
fixes s :: "nat \<Rightarrow> ('a::complete_space) set" |
53282 | 5664 |
assumes |
54070 | 5665 |
"\<forall>n. closed (s n)" |
5666 |
"\<forall>n. s n \<noteq> {}" |
|
5667 |
"\<forall>m n. m \<le> n \<longrightarrow> s n \<subseteq> s m" |
|
5668 |
"\<forall>e>0. \<exists>n. \<forall>x\<in>s n. \<forall>y\<in>s n. dist x y < e" |
|
5669 |
shows "\<exists>a. \<forall>n. a \<in> s n" |
|
5670 |
proof - |
|
5671 |
have "\<forall>n. \<exists>x. x \<in> s n" |
|
53282 | 5672 |
using assms(2) by auto |
5673 |
then have "\<exists>t. \<forall>n. t n \<in> s n" |
|
54070 | 5674 |
using choice[of "\<lambda>n x. x \<in> s n"] by auto |
33175 | 5675 |
then obtain t where t: "\<forall>n. t n \<in> s n" by auto |
53282 | 5676 |
{ |
5677 |
fix e :: real |
|
5678 |
assume "e > 0" |
|
5679 |
then obtain N where N:"\<forall>x\<in>s N. \<forall>y\<in>s N. dist x y < e" |
|
5680 |
using assms(4) by auto |
|
5681 |
{ |
|
5682 |
fix m n :: nat |
|
5683 |
assume "N \<le> m \<and> N \<le> n" |
|
5684 |
then have "t m \<in> s N" "t n \<in> s N" |
|
5685 |
using assms(3) t unfolding subset_eq t by blast+ |
|
5686 |
then have "dist (t m) (t n) < e" |
|
5687 |
using N by auto |
|
33175 | 5688 |
} |
53282 | 5689 |
then have "\<exists>N. \<forall>m n. N \<le> m \<and> N \<le> n \<longrightarrow> dist (t m) (t n) < e" |
5690 |
by auto |
|
33175 | 5691 |
} |
53282 | 5692 |
then have "Cauchy t" |
5693 |
unfolding cauchy_def by auto |
|
61973 | 5694 |
then obtain l where l:"(t \<longlongrightarrow> l) sequentially" |
54070 | 5695 |
using complete_UNIV unfolding complete_def by auto |
53282 | 5696 |
{ |
5697 |
fix n :: nat |
|
5698 |
{ |
|
5699 |
fix e :: real |
|
5700 |
assume "e > 0" |
|
5701 |
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
|
5702 |
using l[unfolded lim_sequentially] by auto |
53282 | 5703 |
have "t (max n N) \<in> s n" |
5704 |
using assms(3) |
|
5705 |
unfolding subset_eq |
|
5706 |
apply (erule_tac x=n in allE) |
|
5707 |
apply (erule_tac x="max n N" in allE) |
|
5708 |
using t |
|
5709 |
apply auto |
|
5710 |
done |
|
5711 |
then have "\<exists>y\<in>s n. dist y l < e" |
|
5712 |
apply (rule_tac x="t (max n N)" in bexI) |
|
5713 |
using N |
|
5714 |
apply auto |
|
5715 |
done |
|
33175 | 5716 |
} |
53282 | 5717 |
then have "l \<in> s n" |
5718 |
using closed_approachable[of "s n" l] assms(1) by auto |
|
33175 | 5719 |
} |
5720 |
then show ?thesis by auto |
|
5721 |
qed |
|
5722 |
||
60420 | 5723 |
text \<open>Strengthen it to the intersection actually being a singleton.\<close> |
33175 | 5724 |
|
5725 |
lemma decreasing_closed_nest_sing: |
|
44632 | 5726 |
fixes s :: "nat \<Rightarrow> 'a::complete_space set" |
53282 | 5727 |
assumes |
5728 |
"\<forall>n. closed(s n)" |
|
5729 |
"\<forall>n. s n \<noteq> {}" |
|
54070 | 5730 |
"\<forall>m n. m \<le> n \<longrightarrow> s n \<subseteq> s m" |
53282 | 5731 |
"\<forall>e>0. \<exists>n. \<forall>x \<in> (s n). \<forall> y\<in>(s n). dist x y < e" |
34104 | 5732 |
shows "\<exists>a. \<Inter>(range s) = {a}" |
53282 | 5733 |
proof - |
5734 |
obtain a where a: "\<forall>n. a \<in> s n" |
|
5735 |
using decreasing_closed_nest[of s] using assms by auto |
|
5736 |
{ |
|
5737 |
fix b |
|
5738 |
assume b: "b \<in> \<Inter>(range s)" |
|
5739 |
{ |
|
5740 |
fix e :: real |
|
5741 |
assume "e > 0" |
|
5742 |
then have "dist a b < e" |
|
5743 |
using assms(4) and b and a by blast |
|
33175 | 5744 |
} |
53282 | 5745 |
then have "dist a b = 0" |
5746 |
by (metis dist_eq_0_iff dist_nz less_le) |
|
33175 | 5747 |
} |
53282 | 5748 |
with a have "\<Inter>(range s) = {a}" |
5749 |
unfolding image_def by auto |
|
5750 |
then show ?thesis .. |
|
33175 | 5751 |
qed |
5752 |
||
60420 | 5753 |
text\<open>Cauchy-type criteria for uniform convergence.\<close> |
33175 | 5754 |
|
53282 | 5755 |
lemma uniformly_convergent_eq_cauchy: |
5756 |
fixes s::"nat \<Rightarrow> 'b \<Rightarrow> 'a::complete_space" |
|
5757 |
shows |
|
53291 | 5758 |
"(\<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> |
5759 |
(\<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 | 5760 |
(is "?lhs = ?rhs") |
5761 |
proof |
|
33175 | 5762 |
assume ?lhs |
53282 | 5763 |
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" |
5764 |
by auto |
|
5765 |
{ |
|
5766 |
fix e :: real |
|
5767 |
assume "e > 0" |
|
5768 |
then obtain N :: nat where N: "\<forall>n x. N \<le> n \<and> P x \<longrightarrow> dist (s n x) (l x) < e / 2" |
|
5769 |
using l[THEN spec[where x="e/2"]] by auto |
|
5770 |
{ |
|
5771 |
fix n m :: nat and x :: "'b" |
|
5772 |
assume "N \<le> m \<and> N \<le> n \<and> P x" |
|
5773 |
then have "dist (s m x) (s n x) < e" |
|
33175 | 5774 |
using N[THEN spec[where x=m], THEN spec[where x=x]] |
5775 |
using N[THEN spec[where x=n], THEN spec[where x=x]] |
|
53282 | 5776 |
using dist_triangle_half_l[of "s m x" "l x" e "s n x"] by auto |
5777 |
} |
|
5778 |
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 |
|
5779 |
} |
|
5780 |
then show ?rhs by auto |
|
33175 | 5781 |
next |
5782 |
assume ?rhs |
|
53282 | 5783 |
then have "\<forall>x. P x \<longrightarrow> Cauchy (\<lambda>n. s n x)" |
5784 |
unfolding cauchy_def |
|
5785 |
apply auto |
|
5786 |
apply (erule_tac x=e in allE) |
|
5787 |
apply auto |
|
5788 |
done |
|
61973 | 5789 |
then obtain l where l: "\<forall>x. P x \<longrightarrow> ((\<lambda>n. s n x) \<longlongrightarrow> l x) sequentially" |
64287 | 5790 |
unfolding convergent_eq_Cauchy[symmetric] |
61973 | 5791 |
using choice[of "\<lambda>x l. P x \<longrightarrow> ((\<lambda>n. s n x) \<longlongrightarrow> l) sequentially"] |
53282 | 5792 |
by auto |
5793 |
{ |
|
5794 |
fix e :: real |
|
5795 |
assume "e > 0" |
|
33175 | 5796 |
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 | 5797 |
using \<open>?rhs\<close>[THEN spec[where x="e/2"]] by auto |
53282 | 5798 |
{ |
5799 |
fix x |
|
5800 |
assume "P x" |
|
33175 | 5801 |
then obtain M where M:"\<forall>n\<ge>M. dist (s n x) (l x) < e/2" |
60420 | 5802 |
using l[THEN spec[where x=x], unfolded lim_sequentially] and \<open>e > 0\<close> |
53282 | 5803 |
by (auto elim!: allE[where x="e/2"]) |
5804 |
fix n :: nat |
|
5805 |
assume "n \<ge> N" |
|
5806 |
then have "dist(s n x)(l x) < e" |
|
60420 | 5807 |
using \<open>P x\<close>and N[THEN spec[where x=n], THEN spec[where x="N+M"], THEN spec[where x=x]] |
53282 | 5808 |
using M[THEN spec[where x="N+M"]] and dist_triangle_half_l[of "s n x" "s (N+M) x" e "l x"] |
5809 |
by (auto simp add: dist_commute) |
|
5810 |
} |
|
5811 |
then have "\<exists>N. \<forall>n x. N \<le> n \<and> P x \<longrightarrow> dist(s n x)(l x) < e" |
|
5812 |
by auto |
|
5813 |
} |
|
5814 |
then show ?lhs by auto |
|
33175 | 5815 |
qed |
5816 |
||
5817 |
lemma uniformly_cauchy_imp_uniformly_convergent: |
|
51102 | 5818 |
fixes s :: "nat \<Rightarrow> 'a \<Rightarrow> 'b::complete_space" |
33175 | 5819 |
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 | 5820 |
and "\<forall>x. P x --> (\<forall>e>0. \<exists>N. \<forall>n. N \<le> n \<longrightarrow> dist(s n x)(l x) < e)" |
5821 |
shows "\<forall>e>0. \<exists>N. \<forall>n x. N \<le> n \<and> P x \<longrightarrow> dist(s n x)(l x) < e" |
|
53282 | 5822 |
proof - |
33175 | 5823 |
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 | 5824 |
using assms(1) unfolding uniformly_convergent_eq_cauchy[symmetric] by auto |
33175 | 5825 |
moreover |
53282 | 5826 |
{ |
5827 |
fix x |
|
5828 |
assume "P x" |
|
5829 |
then have "l x = l' x" |
|
5830 |
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
|
5831 |
using l and assms(2) unfolding lim_sequentially by blast |
53282 | 5832 |
} |
33175 | 5833 |
ultimately show ?thesis by auto |
5834 |
qed |
|
5835 |
||
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
5836 |
|
60420 | 5837 |
subsection \<open>Continuity\<close> |
5838 |
||
5839 |
text\<open>Derive the epsilon-delta forms, which we often use as "definitions"\<close> |
|
33175 | 5840 |
|
5841 |
lemma continuous_within_eps_delta: |
|
5842 |
"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)" |
|
5843 |
unfolding continuous_within and Lim_within |
|
53282 | 5844 |
apply auto |
55775 | 5845 |
apply (metis dist_nz dist_self) |
5846 |
apply blast |
|
53282 | 5847 |
done |
5848 |
||
62131
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5849 |
corollary continuous_at_eps_delta: |
53282 | 5850 |
"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 | 5851 |
using continuous_within_eps_delta [of x UNIV f] by simp |
33175 | 5852 |
|
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
5853 |
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
|
5854 |
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
|
5855 |
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
|
5856 |
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
|
5857 |
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
|
5858 |
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
|
5859 |
apply safe |
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5860 |
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
|
5861 |
apply simp |
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5862 |
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
|
5863 |
apply (drule nondecF) |
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5864 |
apply simp |
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5865 |
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
|
5866 |
|
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
5867 |
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
|
5868 |
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
|
5869 |
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
|
5870 |
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
|
5871 |
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
|
5872 |
apply safe |
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5873 |
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
|
5874 |
apply simp |
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5875 |
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
|
5876 |
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
|
5877 |
apply simp_all |
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5878 |
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
|
5879 |
|
60420 | 5880 |
text\<open>Versions in terms of open balls.\<close> |
33175 | 5881 |
|
5882 |
lemma continuous_within_ball: |
|
53282 | 5883 |
"continuous (at x within s) f \<longleftrightarrow> |
5884 |
(\<forall>e > 0. \<exists>d > 0. f ` (ball x d \<inter> s) \<subseteq> ball (f x) e)" |
|
5885 |
(is "?lhs = ?rhs") |
|
33175 | 5886 |
proof |
5887 |
assume ?lhs |
|
53282 | 5888 |
{ |
5889 |
fix e :: real |
|
5890 |
assume "e > 0" |
|
33175 | 5891 |
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 | 5892 |
using \<open>?lhs\<close>[unfolded continuous_within Lim_within] by auto |
53282 | 5893 |
{ |
5894 |
fix y |
|
5895 |
assume "y \<in> f ` (ball x d \<inter> s)" |
|
5896 |
then have "y \<in> ball (f x) e" |
|
5897 |
using d(2) |
|
5898 |
apply (auto simp add: dist_commute) |
|
5899 |
apply (erule_tac x=xa in ballE) |
|
5900 |
apply auto |
|
60420 | 5901 |
using \<open>e > 0\<close> |
53282 | 5902 |
apply auto |
5903 |
done |
|
33175 | 5904 |
} |
53282 | 5905 |
then have "\<exists>d>0. f ` (ball x d \<inter> s) \<subseteq> ball (f x) e" |
60420 | 5906 |
using \<open>d > 0\<close> |
53282 | 5907 |
unfolding subset_eq ball_def by (auto simp add: dist_commute) |
5908 |
} |
|
5909 |
then show ?rhs by auto |
|
33175 | 5910 |
next |
53282 | 5911 |
assume ?rhs |
5912 |
then show ?lhs |
|
5913 |
unfolding continuous_within Lim_within ball_def subset_eq |
|
5914 |
apply (auto simp add: dist_commute) |
|
5915 |
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
|
5916 |
apply auto |
53282 | 5917 |
done |
33175 | 5918 |
qed |
5919 |
||
5920 |
lemma continuous_at_ball: |
|
5921 |
"continuous (at x) f \<longleftrightarrow> (\<forall>e>0. \<exists>d>0. f ` (ball x d) \<subseteq> ball (f x) e)" (is "?lhs = ?rhs") |
|
5922 |
proof |
|
53282 | 5923 |
assume ?lhs |
5924 |
then show ?rhs |
|
5925 |
unfolding continuous_at Lim_at subset_eq Ball_def Bex_def image_iff mem_ball |
|
5926 |
apply auto |
|
5927 |
apply (erule_tac x=e in allE) |
|
5928 |
apply auto |
|
5929 |
apply (rule_tac x=d in exI) |
|
5930 |
apply auto |
|
5931 |
apply (erule_tac x=xa in allE) |
|
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
5932 |
apply (auto simp add: dist_commute) |
53282 | 5933 |
done |
33175 | 5934 |
next |
53282 | 5935 |
assume ?rhs |
5936 |
then show ?lhs |
|
5937 |
unfolding continuous_at Lim_at subset_eq Ball_def Bex_def image_iff mem_ball |
|
5938 |
apply auto |
|
5939 |
apply (erule_tac x=e in allE) |
|
5940 |
apply auto |
|
5941 |
apply (rule_tac x=d in exI) |
|
5942 |
apply auto |
|
5943 |
apply (erule_tac x="f xa" in allE) |
|
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
5944 |
apply (auto simp add: dist_commute) |
53282 | 5945 |
done |
33175 | 5946 |
qed |
5947 |
||
60420 | 5948 |
text\<open>Define setwise continuity in terms of limits within the set.\<close> |
33175 | 5949 |
|
36359 | 5950 |
lemma continuous_on_iff: |
5951 |
"continuous_on s f \<longleftrightarrow> |
|
36440
89a70297564d
simplify definition of continuous_on; generalize some lemmas
huffman
parents:
36439
diff
changeset
|
5952 |
(\<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 | 5953 |
unfolding continuous_on_def Lim_within |
55775 | 5954 |
by (metis dist_pos_lt dist_self) |
53282 | 5955 |
|
62131
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5956 |
lemma continuous_within_E: |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5957 |
assumes "continuous (at x within s) f" "e>0" |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5958 |
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
|
5959 |
using assms apply (simp add: continuous_within_eps_delta) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5960 |
apply (drule spec [of _ e], clarify) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5961 |
apply (rule_tac d="d/2" in that, auto) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5962 |
done |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5963 |
|
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5964 |
lemma continuous_onI [intro?]: |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5965 |
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
|
5966 |
shows "continuous_on s f" |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5967 |
apply (simp add: continuous_on_iff, clarify) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5968 |
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
|
5969 |
done |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5970 |
|
60420 | 5971 |
text\<open>Some simple consequential lemmas.\<close> |
33175 | 5972 |
|
62397
5ae24f33d343
Substantial new material for multivariate analysis. Also removal of some duplicates.
paulson <lp15@cam.ac.uk>
parents:
62381
diff
changeset
|
5973 |
lemma continuous_onE: |
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
5974 |
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
|
5975 |
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
|
5976 |
using assms |
5ae24f33d343
Substantial new material for multivariate analysis. Also removal of some duplicates.
paulson <lp15@cam.ac.uk>
parents:
62381
diff
changeset
|
5977 |
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
|
5978 |
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
|
5979 |
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
|
5980 |
done |
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
5981 |
|
60974
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
5982 |
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
|
5983 |
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
|
5984 |
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
|
5985 |
using assms |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
5986 |
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
|
5987 |
|
33175 | 5988 |
lemma continuous_at_imp_continuous_within: |
53282 | 5989 |
"continuous (at x) f \<Longrightarrow> continuous (at x within s) f" |
60762 | 5990 |
unfolding continuous_within continuous_at using Lim_at_imp_Lim_at_within by auto |
33175 | 5991 |
|
61973 | 5992 |
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
|
5993 |
by simp |
36440
89a70297564d
simplify definition of continuous_on; generalize some lemmas
huffman
parents:
36439
diff
changeset
|
5994 |
|
61808 | 5995 |
lemmas continuous_on = continuous_on_def \<comment> "legacy theorem name" |
33175 | 5996 |
|
5997 |
lemma continuous_within_subset: |
|
53282 | 5998 |
"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
|
5999 |
unfolding continuous_within by(metis tendsto_within_subset) |
33175 | 6000 |
|
6001 |
lemma continuous_on_interior: |
|
53282 | 6002 |
"continuous_on s f \<Longrightarrow> x \<in> interior s \<Longrightarrow> continuous (at x) f" |
55775 | 6003 |
by (metis continuous_on_eq_continuous_at continuous_on_subset interiorE) |
33175 | 6004 |
|
6005 |
lemma continuous_on_eq: |
|
61204 | 6006 |
"\<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
|
6007 |
unfolding continuous_on_def tendsto_def eventually_at_topological |
36440
89a70297564d
simplify definition of continuous_on; generalize some lemmas
huffman
parents:
36439
diff
changeset
|
6008 |
by simp |
33175 | 6009 |
|
60420 | 6010 |
text \<open>Characterization of various kinds of continuity in terms of sequences.\<close> |
33175 | 6011 |
|
6012 |
lemma continuous_within_sequentially: |
|
44533
7abe4a59f75d
generalize and simplify proof of continuous_within_sequentially
huffman
parents:
44531
diff
changeset
|
6013 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::topological_space" |
33175 | 6014 |
shows "continuous (at a within s) f \<longleftrightarrow> |
61973 | 6015 |
(\<forall>x. (\<forall>n::nat. x n \<in> s) \<and> (x \<longlongrightarrow> a) sequentially |
6016 |
\<longrightarrow> ((f \<circ> x) \<longlongrightarrow> f a) sequentially)" |
|
53282 | 6017 |
(is "?lhs = ?rhs") |
33175 | 6018 |
proof |
6019 |
assume ?lhs |
|
53282 | 6020 |
{ |
6021 |
fix x :: "nat \<Rightarrow> 'a" |
|
6022 |
assume x: "\<forall>n. x n \<in> s" "\<forall>e>0. eventually (\<lambda>n. dist (x n) a < e) sequentially" |
|
6023 |
fix T :: "'b set" |
|
6024 |
assume "open T" and "f a \<in> T" |
|
60420 | 6025 |
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
|
6026 |
unfolding continuous_within tendsto_def eventually_at by auto |
44533
7abe4a59f75d
generalize and simplify proof of continuous_within_sequentially
huffman
parents:
44531
diff
changeset
|
6027 |
have "eventually (\<lambda>n. dist (x n) a < d) sequentially" |
60420 | 6028 |
using x(2) \<open>d>0\<close> by simp |
53282 | 6029 |
then have "eventually (\<lambda>n. (f \<circ> x) n \<in> T) sequentially" |
46887 | 6030 |
proof eventually_elim |
53282 | 6031 |
case (elim n) |
6032 |
then show ?case |
|
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
6033 |
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
|
6034 |
qed |
33175 | 6035 |
} |
53282 | 6036 |
then show ?rhs |
6037 |
unfolding tendsto_iff tendsto_def by simp |
|
33175 | 6038 |
next |
53282 | 6039 |
assume ?rhs |
6040 |
then show ?lhs |
|
44533
7abe4a59f75d
generalize and simplify proof of continuous_within_sequentially
huffman
parents:
44531
diff
changeset
|
6041 |
unfolding continuous_within tendsto_def [where l="f a"] |
7abe4a59f75d
generalize and simplify proof of continuous_within_sequentially
huffman
parents:
44531
diff
changeset
|
6042 |
by (simp add: sequentially_imp_eventually_within) |
33175 | 6043 |
qed |
6044 |
||
6045 |
lemma continuous_at_sequentially: |
|
44533
7abe4a59f75d
generalize and simplify proof of continuous_within_sequentially
huffman
parents:
44531
diff
changeset
|
6046 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::topological_space" |
53291 | 6047 |
shows "continuous (at a) f \<longleftrightarrow> |
61973 | 6048 |
(\<forall>x. (x \<longlongrightarrow> a) sequentially --> ((f \<circ> x) \<longlongrightarrow> f a) sequentially)" |
45031 | 6049 |
using continuous_within_sequentially[of a UNIV f] by simp |
33175 | 6050 |
|
6051 |
lemma continuous_on_sequentially: |
|
44533
7abe4a59f75d
generalize and simplify proof of continuous_within_sequentially
huffman
parents:
44531
diff
changeset
|
6052 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::topological_space" |
36359 | 6053 |
shows "continuous_on s f \<longleftrightarrow> |
61973 | 6054 |
(\<forall>x. \<forall>a \<in> s. (\<forall>n. x(n) \<in> s) \<and> (x \<longlongrightarrow> a) sequentially |
6055 |
--> ((f \<circ> x) \<longlongrightarrow> f a) sequentially)" |
|
53291 | 6056 |
(is "?lhs = ?rhs") |
33175 | 6057 |
proof |
53282 | 6058 |
assume ?rhs |
6059 |
then show ?lhs |
|
6060 |
using continuous_within_sequentially[of _ s f] |
|
6061 |
unfolding continuous_on_eq_continuous_within |
|
6062 |
by auto |
|
33175 | 6063 |
next |
53282 | 6064 |
assume ?lhs |
6065 |
then show ?rhs |
|
6066 |
unfolding continuous_on_eq_continuous_within |
|
6067 |
using continuous_within_sequentially[of _ s f] |
|
6068 |
by auto |
|
33175 | 6069 |
qed |
6070 |
||
44648
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
6071 |
lemma uniformly_continuous_on_sequentially: |
36441 | 6072 |
"uniformly_continuous_on s f \<longleftrightarrow> (\<forall>x y. (\<forall>n. x n \<in> s) \<and> (\<forall>n. y n \<in> s) \<and> |
62101 | 6073 |
(\<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 | 6074 |
proof |
6075 |
assume ?lhs |
|
53282 | 6076 |
{ |
6077 |
fix x y |
|
6078 |
assume x: "\<forall>n. x n \<in> s" |
|
6079 |
and y: "\<forall>n. y n \<in> s" |
|
61973 | 6080 |
and xy: "((\<lambda>n. dist (x n) (y n)) \<longlongrightarrow> 0) sequentially" |
53282 | 6081 |
{ |
6082 |
fix e :: real |
|
6083 |
assume "e > 0" |
|
6084 |
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 | 6085 |
using \<open>?lhs\<close>[unfolded uniformly_continuous_on_def, THEN spec[where x=e]] by auto |
53282 | 6086 |
obtain N where N: "\<forall>n\<ge>N. dist (x n) (y n) < d" |
60420 | 6087 |
using xy[unfolded lim_sequentially dist_norm] and \<open>d>0\<close> by auto |
53282 | 6088 |
{ |
6089 |
fix n |
|
6090 |
assume "n\<ge>N" |
|
6091 |
then have "dist (f (x n)) (f (y n)) < e" |
|
6092 |
using N[THEN spec[where x=n]] |
|
6093 |
using d[THEN bspec[where x="x n"], THEN bspec[where x="y n"]] |
|
6094 |
using x and y |
|
63170 | 6095 |
by (simp add: dist_commute) |
53282 | 6096 |
} |
6097 |
then have "\<exists>N. \<forall>n\<ge>N. dist (f (x n)) (f (y n)) < e" |
|
6098 |
by auto |
|
6099 |
} |
|
61973 | 6100 |
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
|
6101 |
unfolding lim_sequentially and dist_real_def by auto |
53282 | 6102 |
} |
6103 |
then show ?rhs by auto |
|
33175 | 6104 |
next |
6105 |
assume ?rhs |
|
53282 | 6106 |
{ |
6107 |
assume "\<not> ?lhs" |
|
6108 |
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" |
|
6109 |
unfolding uniformly_continuous_on_def by auto |
|
6110 |
then obtain fa where fa: |
|
6111 |
"\<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" |
|
6112 |
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"] |
|
6113 |
unfolding Bex_def |
|
33175 | 6114 |
by (auto simp add: dist_commute) |
63040 | 6115 |
define x where "x n = fst (fa (inverse (real n + 1)))" for n |
6116 |
define y where "y n = snd (fa (inverse (real n + 1)))" for n |
|
53282 | 6117 |
have xyn: "\<forall>n. x n \<in> s \<and> y n \<in> s" |
6118 |
and xy0: "\<forall>n. dist (x n) (y n) < inverse (real n + 1)" |
|
6119 |
and fxy:"\<forall>n. \<not> dist (f (x n)) (f (y n)) < e" |
|
6120 |
unfolding x_def and y_def using fa |
|
6121 |
by auto |
|
6122 |
{ |
|
6123 |
fix e :: real |
|
6124 |
assume "e > 0" |
|
6125 |
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
|
6126 |
unfolding real_arch_inverse[of e] by auto |
53282 | 6127 |
{ |
6128 |
fix n :: nat |
|
6129 |
assume "n \<ge> N" |
|
6130 |
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
|
6131 |
using of_nat_0_le_iff and \<open>N\<noteq>0\<close> by auto |
33175 | 6132 |
also have "\<dots> < e" using N by auto |
6133 |
finally have "inverse (real n + 1) < e" by auto |
|
53282 | 6134 |
then have "dist (x n) (y n) < e" |
6135 |
using xy0[THEN spec[where x=n]] by auto |
|
6136 |
} |
|
6137 |
then have "\<exists>N. \<forall>n\<ge>N. dist (x n) (y n) < e" by auto |
|
6138 |
} |
|
6139 |
then have "\<forall>e>0. \<exists>N. \<forall>n\<ge>N. dist (f (x n)) (f (y n)) < e" |
|
60420 | 6140 |
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
|
6141 |
unfolding lim_sequentially dist_real_def by auto |
60420 | 6142 |
then have False using fxy and \<open>e>0\<close> by auto |
53282 | 6143 |
} |
6144 |
then show ?lhs |
|
6145 |
unfolding uniformly_continuous_on_def by blast |
|
33175 | 6146 |
qed |
6147 |
||
64287 | 6148 |
lemma continuous_closed_imp_Cauchy_continuous: |
6149 |
fixes S :: "('a::complete_space) set" |
|
6150 |
shows "\<lbrakk>continuous_on S f; closed S; Cauchy \<sigma>; \<And>n. (\<sigma> n) \<in> S\<rbrakk> \<Longrightarrow> Cauchy(f o \<sigma>)" |
|
6151 |
apply (simp add: complete_eq_closed [symmetric] continuous_on_sequentially) |
|
6152 |
by (meson LIMSEQ_imp_Cauchy complete_def) |
|
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61907
diff
changeset
|
6153 |
|
60420 | 6154 |
text\<open>The usual transformation theorems.\<close> |
33175 | 6155 |
|
6156 |
lemma continuous_transform_within: |
|
36667 | 6157 |
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
|
6158 |
assumes "continuous (at x within s) f" |
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
6159 |
and "0 < d" |
53282 | 6160 |
and "x \<in> s" |
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
6161 |
and "\<And>x'. \<lbrakk>x' \<in> s; dist x' x < d\<rbrakk> \<Longrightarrow> f x' = g x'" |
33175 | 6162 |
shows "continuous (at x within s) g" |
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
6163 |
using assms |
53282 | 6164 |
unfolding continuous_within |
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
6165 |
by (force simp add: intro: Lim_transform_within) |
62101 | 6166 |
|
53282 | 6167 |
|
60420 | 6168 |
subsubsection \<open>Structural rules for pointwise continuity\<close> |
33175 | 6169 |
|
51361
21e5b6efb317
changed continuous_intros into a named theorems collection
hoelzl
parents:
51351
diff
changeset
|
6170 |
lemma continuous_infdist[continuous_intros]: |
50087 | 6171 |
assumes "continuous F f" |
6172 |
shows "continuous F (\<lambda>x. infdist (f x) A)" |
|
6173 |
using assms unfolding continuous_def by (rule tendsto_infdist) |
|
6174 |
||
51361
21e5b6efb317
changed continuous_intros into a named theorems collection
hoelzl
parents:
51351
diff
changeset
|
6175 |
lemma continuous_infnorm[continuous_intros]: |
53282 | 6176 |
"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
|
6177 |
unfolding continuous_def by (rule tendsto_infnorm) |
33175 | 6178 |
|
51361
21e5b6efb317
changed continuous_intros into a named theorems collection
hoelzl
parents:
51351
diff
changeset
|
6179 |
lemma continuous_inner[continuous_intros]: |
53282 | 6180 |
assumes "continuous F f" |
6181 |
and "continuous F g" |
|
44647
e4de7750cdeb
modernize lemmas about 'continuous' and 'continuous_on';
huffman
parents:
44632
diff
changeset
|
6182 |
shows "continuous F (\<lambda>x. inner (f x) (g x))" |
e4de7750cdeb
modernize lemmas about 'continuous' and 'continuous_on';
huffman
parents:
44632
diff
changeset
|
6183 |
using assms unfolding continuous_def by (rule tendsto_inner) |
e4de7750cdeb
modernize lemmas about 'continuous' and 'continuous_on';
huffman
parents:
44632
diff
changeset
|
6184 |
|
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
|
6185 |
lemmas continuous_at_inverse = isCont_inverse |
44647
e4de7750cdeb
modernize lemmas about 'continuous' and 'continuous_on';
huffman
parents:
44632
diff
changeset
|
6186 |
|
60420 | 6187 |
subsubsection \<open>Structural rules for setwise continuity\<close> |
33175 | 6188 |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
6189 |
lemma continuous_on_infnorm[continuous_intros]: |
53282 | 6190 |
"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
|
6191 |
unfolding continuous_on by (fast intro: tendsto_infnorm) |
e4de7750cdeb
modernize lemmas about 'continuous' and 'continuous_on';
huffman
parents:
44632
diff
changeset
|
6192 |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
6193 |
lemma continuous_on_inner[continuous_intros]: |
44531
1d477a2b1572
replace some continuous_on lemmas with more general versions
huffman
parents:
44530
diff
changeset
|
6194 |
fixes g :: "'a::topological_space \<Rightarrow> 'b::real_inner" |
53282 | 6195 |
assumes "continuous_on s f" |
6196 |
and "continuous_on s g" |
|
44531
1d477a2b1572
replace some continuous_on lemmas with more general versions
huffman
parents:
44530
diff
changeset
|
6197 |
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
|
6198 |
using bounded_bilinear_inner assms |
1d477a2b1572
replace some continuous_on lemmas with more general versions
huffman
parents:
44530
diff
changeset
|
6199 |
by (rule bounded_bilinear.continuous_on) |
1d477a2b1572
replace some continuous_on lemmas with more general versions
huffman
parents:
44530
diff
changeset
|
6200 |
|
60420 | 6201 |
subsubsection \<open>Structural rules for uniform continuity\<close> |
33175 | 6202 |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
6203 |
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
|
6204 |
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
|
6205 |
assumes "uniformly_continuous_on s f" |
53282 | 6206 |
and "uniformly_continuous_on s g" |
44648
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
6207 |
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
|
6208 |
proof - |
53282 | 6209 |
{ |
6210 |
fix a b c d :: 'b |
|
6211 |
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
|
6212 |
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
|
6213 |
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
|
6214 |
by arith |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
6215 |
} note le = this |
53282 | 6216 |
{ |
6217 |
fix x y |
|
61969 | 6218 |
assume f: "(\<lambda>n. dist (f (x n)) (f (y n))) \<longlonglongrightarrow> 0" |
6219 |
assume g: "(\<lambda>n. dist (g (x n)) (g (y n))) \<longlonglongrightarrow> 0" |
|
6220 |
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
|
6221 |
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
|
6222 |
simp add: le) |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
6223 |
} |
53282 | 6224 |
then show ?thesis |
6225 |
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
|
6226 |
unfolding dist_real_def by simp |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
6227 |
qed |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
6228 |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
6229 |
lemma uniformly_continuous_on_norm[continuous_intros]: |
62101 | 6230 |
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
|
6231 |
assumes "uniformly_continuous_on s f" |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
6232 |
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
|
6233 |
unfolding norm_conv_dist using assms |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
6234 |
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
|
6235 |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
6236 |
lemma (in bounded_linear) uniformly_continuous_on[continuous_intros]: |
62101 | 6237 |
fixes g :: "_::metric_space \<Rightarrow> _" |
44648
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
6238 |
assumes "uniformly_continuous_on s g" |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
6239 |
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
|
6240 |
using assms unfolding uniformly_continuous_on_sequentially |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
6241 |
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
|
6242 |
by (auto intro: tendsto_zero) |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
6243 |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
6244 |
lemma uniformly_continuous_on_cmul[continuous_intros]: |
36441 | 6245 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::real_normed_vector" |
33175 | 6246 |
assumes "uniformly_continuous_on s f" |
6247 |
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
|
6248 |
using bounded_linear_scaleR_right assms |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
6249 |
by (rule bounded_linear.uniformly_continuous_on) |
33175 | 6250 |
|
6251 |
lemma dist_minus: |
|
6252 |
fixes x y :: "'a::real_normed_vector" |
|
6253 |
shows "dist (- x) (- y) = dist x y" |
|
6254 |
unfolding dist_norm minus_diff_minus norm_minus_cancel .. |
|
6255 |
||
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
6256 |
lemma uniformly_continuous_on_minus[continuous_intros]: |
33175 | 6257 |
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
|
6258 |
shows "uniformly_continuous_on s f \<Longrightarrow> uniformly_continuous_on s (\<lambda>x. - f x)" |
33175 | 6259 |
unfolding uniformly_continuous_on_def dist_minus . |
6260 |
||
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
6261 |
lemma uniformly_continuous_on_add[continuous_intros]: |
36441 | 6262 |
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
|
6263 |
assumes "uniformly_continuous_on s f" |
53282 | 6264 |
and "uniformly_continuous_on s g" |
33175 | 6265 |
shows "uniformly_continuous_on s (\<lambda>x. f x + g x)" |
53282 | 6266 |
using assms |
6267 |
unfolding uniformly_continuous_on_sequentially |
|
44648
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
6268 |
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
|
6269 |
by (auto intro: tendsto_add_zero) |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
6270 |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
6271 |
lemma uniformly_continuous_on_diff[continuous_intros]: |
36441 | 6272 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::real_normed_vector" |
53282 | 6273 |
assumes "uniformly_continuous_on s f" |
6274 |
and "uniformly_continuous_on s g" |
|
44648
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
6275 |
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
|
6276 |
using assms uniformly_continuous_on_add [of s f "- g"] |
b1d955791529
more simplification rules on unary and binary minus
haftmann
parents:
54070
diff
changeset
|
6277 |
by (simp add: fun_Compl_def uniformly_continuous_on_minus) |
33175 | 6278 |
|
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
|
6279 |
lemmas continuous_at_compose = isCont_o |
33175 | 6280 |
|
62101 | 6281 |
text \<open>Continuity in terms of open preimages.\<close> |
33175 | 6282 |
|
6283 |
lemma continuous_at_open: |
|
53282 | 6284 |
"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)))" |
6285 |
unfolding continuous_within_topological [of x UNIV f] |
|
6286 |
unfolding imp_conjL |
|
6287 |
by (intro all_cong imp_cong ex_cong conj_cong refl) auto |
|
33175 | 6288 |
|
51351 | 6289 |
lemma continuous_imp_tendsto: |
53282 | 6290 |
assumes "continuous (at x0) f" |
61969 | 6291 |
and "x \<longlonglongrightarrow> x0" |
6292 |
shows "(f \<circ> x) \<longlonglongrightarrow> (f x0)" |
|
51351 | 6293 |
proof (rule topological_tendstoI) |
6294 |
fix S |
|
6295 |
assume "open S" "f x0 \<in> S" |
|
6296 |
then obtain T where T_def: "open T" "x0 \<in> T" "\<forall>x\<in>T. f x \<in> S" |
|
6297 |
using assms continuous_at_open by metis |
|
6298 |
then have "eventually (\<lambda>n. x n \<in> T) sequentially" |
|
6299 |
using assms T_def by (auto simp: tendsto_def) |
|
6300 |
then show "eventually (\<lambda>n. (f \<circ> x) n \<in> S) sequentially" |
|
61810 | 6301 |
using T_def by (auto elim!: eventually_mono) |
51351 | 6302 |
qed |
6303 |
||
33175 | 6304 |
lemma continuous_on_open: |
51481
ef949192e5d6
move continuous_on_inv to HOL image (simplifies isCont_inverse_function)
hoelzl
parents:
51480
diff
changeset
|
6305 |
"continuous_on s f \<longleftrightarrow> |
53282 | 6306 |
(\<forall>t. openin (subtopology euclidean (f ` s)) t \<longrightarrow> |
6307 |
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
|
6308 |
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
|
6309 |
by (simp add: imp_ex imageI conj_commute eq_commute cong: conj_cong) |
36441 | 6310 |
|
63301 | 6311 |
lemma continuous_on_open_gen: |
6312 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::metric_space" |
|
6313 |
assumes "f ` S \<subseteq> T" |
|
6314 |
shows "continuous_on S f \<longleftrightarrow> |
|
6315 |
(\<forall>U. openin (subtopology euclidean T) U |
|
6316 |
\<longrightarrow> openin (subtopology euclidean S) {x \<in> S. f x \<in> U})" |
|
6317 |
(is "?lhs = ?rhs") |
|
6318 |
proof |
|
6319 |
assume ?lhs |
|
6320 |
then show ?rhs |
|
6321 |
apply (auto simp: openin_euclidean_subtopology_iff continuous_on_iff) |
|
6322 |
by (metis assms image_subset_iff) |
|
6323 |
next |
|
6324 |
have ope: "openin (subtopology euclidean T) (ball y e \<inter> T)" for y e |
|
6325 |
by (simp add: Int_commute openin_open_Int) |
|
6326 |
assume ?rhs |
|
6327 |
then show ?lhs |
|
6328 |
apply (clarsimp simp add: continuous_on_iff) |
|
6329 |
apply (drule_tac x = "ball (f x) e \<inter> T" in spec) |
|
6330 |
apply (clarsimp simp add: ope openin_euclidean_subtopology_iff [of S]) |
|
6331 |
by (metis (no_types, hide_lams) assms dist_commute dist_self image_subset_iff) |
|
6332 |
qed |
|
6333 |
||
6334 |
lemma continuous_openin_preimage: |
|
6335 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::metric_space" |
|
6336 |
shows |
|
6337 |
"\<lbrakk>continuous_on S f; f ` S \<subseteq> T; openin (subtopology euclidean T) U\<rbrakk> |
|
6338 |
\<Longrightarrow> openin (subtopology euclidean S) {x \<in> S. f x \<in> U}" |
|
6339 |
by (simp add: continuous_on_open_gen) |
|
6340 |
||
60420 | 6341 |
text \<open>Similarly in terms of closed sets.\<close> |
33175 | 6342 |
|
6343 |
lemma continuous_on_closed: |
|
53282 | 6344 |
"continuous_on s f \<longleftrightarrow> |
6345 |
(\<forall>t. closedin (subtopology euclidean (f ` s)) t \<longrightarrow> |
|
6346 |
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
|
6347 |
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
|
6348 |
by (simp add: imp_ex imageI conj_commute eq_commute cong: conj_cong) |
33175 | 6349 |
|
63301 | 6350 |
lemma continuous_on_closed_gen: |
6351 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::metric_space" |
|
6352 |
assumes "f ` S \<subseteq> T" |
|
6353 |
shows "continuous_on S f \<longleftrightarrow> |
|
6354 |
(\<forall>U. closedin (subtopology euclidean T) U |
|
6355 |
\<longrightarrow> closedin (subtopology euclidean S) {x \<in> S. f x \<in> U})" |
|
6356 |
proof - |
|
6357 |
have *: "U \<subseteq> T \<Longrightarrow> {x \<in> S. f x \<in> T \<and> f x \<notin> U} = S - {x \<in> S. f x \<in> U}" for U |
|
6358 |
using assms by blast |
|
6359 |
show ?thesis |
|
6360 |
apply (simp add: continuous_on_open_gen [OF assms], safe) |
|
6361 |
apply (drule_tac [!] x="T-U" in spec) |
|
6362 |
apply (force simp: closedin_def *) |
|
6363 |
apply (force simp: openin_closedin_eq *) |
|
6364 |
done |
|
6365 |
qed |
|
6366 |
||
6367 |
lemma continuous_closedin_preimage_gen: |
|
6368 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::metric_space" |
|
6369 |
assumes "continuous_on S f" "f ` S \<subseteq> T" "closedin (subtopology euclidean T) U" |
|
6370 |
shows "closedin (subtopology euclidean S) {x \<in> S. f x \<in> U}" |
|
6371 |
using assms continuous_on_closed_gen by blast |
|
6372 |
||
6373 |
lemma continuous_on_imp_closedin: |
|
6374 |
assumes "continuous_on S f" "closedin (subtopology euclidean (f ` S)) T" |
|
6375 |
shows "closedin (subtopology euclidean S) {x. x \<in> S \<and> f x \<in> T}" |
|
6376 |
using assms continuous_on_closed by blast |
|
6377 |
||
63114
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
6378 |
subsection \<open>Half-global and completely global cases.\<close> |
33175 | 6379 |
|
63301 | 6380 |
lemma continuous_openin_preimage_gen: |
33175 | 6381 |
assumes "continuous_on s f" "open t" |
6382 |
shows "openin (subtopology euclidean s) {x \<in> s. f x \<in> t}" |
|
53282 | 6383 |
proof - |
6384 |
have *: "\<forall>x. x \<in> s \<and> f x \<in> t \<longleftrightarrow> x \<in> s \<and> f x \<in> (t \<inter> f ` s)" |
|
6385 |
by auto |
|
33175 | 6386 |
have "openin (subtopology euclidean (f ` s)) (t \<inter> f ` s)" |
6387 |
using openin_open_Int[of t "f ` s", OF assms(2)] unfolding openin_open by auto |
|
53282 | 6388 |
then show ?thesis |
6389 |
using assms(1)[unfolded continuous_on_open, THEN spec[where x="t \<inter> f ` s"]] |
|
6390 |
using * by auto |
|
33175 | 6391 |
qed |
6392 |
||
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
6393 |
lemma continuous_closedin_preimage: |
53291 | 6394 |
assumes "continuous_on s f" and "closed t" |
33175 | 6395 |
shows "closedin (subtopology euclidean s) {x \<in> s. f x \<in> t}" |
53282 | 6396 |
proof - |
6397 |
have *: "\<forall>x. x \<in> s \<and> f x \<in> t \<longleftrightarrow> x \<in> s \<and> f x \<in> (t \<inter> f ` s)" |
|
6398 |
by auto |
|
33175 | 6399 |
have "closedin (subtopology euclidean (f ` s)) (t \<inter> f ` s)" |
63170 | 6400 |
using closedin_closed_Int[of t "f ` s", OF assms(2)] |
6401 |
by (simp add: Int_commute) |
|
53282 | 6402 |
then show ?thesis |
6403 |
using assms(1)[unfolded continuous_on_closed, THEN spec[where x="t \<inter> f ` s"]] |
|
6404 |
using * by auto |
|
33175 | 6405 |
qed |
6406 |
||
63955 | 6407 |
lemma continuous_openin_preimage_eq: |
6408 |
"continuous_on S f \<longleftrightarrow> |
|
6409 |
(\<forall>t. open t \<longrightarrow> openin (subtopology euclidean S) {x. x \<in> S \<and> f x \<in> t})" |
|
6410 |
apply safe |
|
6411 |
apply (simp add: continuous_openin_preimage_gen) |
|
6412 |
apply (fastforce simp add: continuous_on_open openin_open) |
|
6413 |
done |
|
6414 |
||
6415 |
lemma continuous_closedin_preimage_eq: |
|
6416 |
"continuous_on S f \<longleftrightarrow> |
|
6417 |
(\<forall>t. closed t \<longrightarrow> closedin (subtopology euclidean S) {x. x \<in> S \<and> f x \<in> t})" |
|
6418 |
apply safe |
|
6419 |
apply (simp add: continuous_closedin_preimage) |
|
6420 |
apply (fastforce simp add: continuous_on_closed closedin_closed) |
|
6421 |
done |
|
6422 |
||
33175 | 6423 |
lemma continuous_open_preimage: |
53291 | 6424 |
assumes "continuous_on s f" |
6425 |
and "open s" |
|
6426 |
and "open t" |
|
33175 | 6427 |
shows "open {x \<in> s. f x \<in> t}" |
6428 |
proof- |
|
6429 |
obtain T where T: "open T" "{x \<in> s. f x \<in> t} = s \<inter> T" |
|
63301 | 6430 |
using continuous_openin_preimage_gen[OF assms(1,3)] unfolding openin_open by auto |
53282 | 6431 |
then show ?thesis |
6432 |
using open_Int[of s T, OF assms(2)] by auto |
|
33175 | 6433 |
qed |
6434 |
||
6435 |
lemma continuous_closed_preimage: |
|
53291 | 6436 |
assumes "continuous_on s f" |
6437 |
and "closed s" |
|
6438 |
and "closed t" |
|
33175 | 6439 |
shows "closed {x \<in> s. f x \<in> t}" |
6440 |
proof- |
|
53282 | 6441 |
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
|
6442 |
using continuous_closedin_preimage[OF assms(1,3)] |
53282 | 6443 |
unfolding closedin_closed by auto |
6444 |
then show ?thesis using closed_Int[of s T, OF assms(2)] by auto |
|
33175 | 6445 |
qed |
6446 |
||
6447 |
lemma continuous_open_preimage_univ: |
|
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
6448 |
"open s \<Longrightarrow> (\<And>x. continuous (at x) f) \<Longrightarrow> open {x. f x \<in> s}" |
33175 | 6449 |
using continuous_open_preimage[of UNIV f s] open_UNIV continuous_at_imp_continuous_on by auto |
6450 |
||
6451 |
lemma continuous_closed_preimage_univ: |
|
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
6452 |
"closed s \<Longrightarrow> (\<And>x. continuous (at x) f) \<Longrightarrow> closed {x. f x \<in> s}" |
33175 | 6453 |
using continuous_closed_preimage[of UNIV f s] closed_UNIV continuous_at_imp_continuous_on by auto |
6454 |
||
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
6455 |
lemma continuous_open_vimage: "open s \<Longrightarrow> (\<And>x. continuous (at x) f) \<Longrightarrow> open (f -` s)" |
33175 | 6456 |
unfolding vimage_def by (rule continuous_open_preimage_univ) |
6457 |
||
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
6458 |
lemma continuous_closed_vimage: "closed s \<Longrightarrow> (\<And>x. continuous (at x) f) \<Longrightarrow> closed (f -` s)" |
33175 | 6459 |
unfolding vimage_def by (rule continuous_closed_preimage_univ) |
6460 |
||
36441 | 6461 |
lemma interior_image_subset: |
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
6462 |
assumes "inj f" "\<And>x. continuous (at x) f" |
35172
579dd5570f96
Added integration to Multivariate-Analysis (upto FTC)
himmelma
parents:
35028
diff
changeset
|
6463 |
shows "interior (f ` s) \<subseteq> f ` (interior s)" |
44519 | 6464 |
proof |
6465 |
fix x assume "x \<in> interior (f ` s)" |
|
6466 |
then obtain T where as: "open T" "x \<in> T" "T \<subseteq> f ` s" .. |
|
53282 | 6467 |
then have "x \<in> f ` s" by auto |
44519 | 6468 |
then obtain y where y: "y \<in> s" "x = f y" by auto |
6469 |
have "open (vimage f T)" |
|
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
6470 |
using assms \<open>open T\<close> by (metis continuous_open_vimage) |
44519 | 6471 |
moreover have "y \<in> vimage f T" |
60420 | 6472 |
using \<open>x = f y\<close> \<open>x \<in> T\<close> by simp |
44519 | 6473 |
moreover have "vimage f T \<subseteq> s" |
60420 | 6474 |
using \<open>T \<subseteq> image f s\<close> \<open>inj f\<close> unfolding inj_on_def subset_eq by auto |
44519 | 6475 |
ultimately have "y \<in> interior s" .. |
60420 | 6476 |
with \<open>x = f y\<close> show "x \<in> f ` interior s" .. |
6477 |
qed |
|
6478 |
||
63114
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
6479 |
subsection \<open>Equality of continuous functions on closure and related results.\<close> |
33175 | 6480 |
|
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
|
6481 |
lemma continuous_closedin_preimage_constant: |
36668
941ba2da372e
simplify definition of t1_space; generalize lemma closed_sing and related lemmas
huffman
parents:
36667
diff
changeset
|
6482 |
fixes f :: "_ \<Rightarrow> 'b::t1_space" |
53291 | 6483 |
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
|
6484 |
using continuous_closedin_preimage[of s f "{a}"] by auto |
33175 | 6485 |
|
6486 |
lemma continuous_closed_preimage_constant: |
|
36668
941ba2da372e
simplify definition of t1_space; generalize lemma closed_sing and related lemmas
huffman
parents:
36667
diff
changeset
|
6487 |
fixes f :: "_ \<Rightarrow> 'b::t1_space" |
53291 | 6488 |
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
|
6489 |
using continuous_closed_preimage[of s f "{a}"] by auto |
33175 | 6490 |
|
6491 |
lemma continuous_constant_on_closure: |
|
36668
941ba2da372e
simplify definition of t1_space; generalize lemma closed_sing and related lemmas
huffman
parents:
36667
diff
changeset
|
6492 |
fixes f :: "_ \<Rightarrow> 'b::t1_space" |
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6493 |
assumes "continuous_on (closure S) f" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6494 |
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
|
6495 |
and "x \<in> closure S" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6496 |
shows "f x = a" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6497 |
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
|
6498 |
assms closure_minimal[of S "{x \<in> closure S. f x = a}"] closure_subset |
53282 | 6499 |
unfolding subset_eq |
6500 |
by auto |
|
33175 | 6501 |
|
6502 |
lemma image_closure_subset: |
|
53291 | 6503 |
assumes "continuous_on (closure s) f" |
6504 |
and "closed t" |
|
6505 |
and "(f ` s) \<subseteq> t" |
|
33175 | 6506 |
shows "f ` (closure s) \<subseteq> t" |
53282 | 6507 |
proof - |
6508 |
have "s \<subseteq> {x \<in> closure s. f x \<in> t}" |
|
6509 |
using assms(3) closure_subset by auto |
|
33175 | 6510 |
moreover have "closed {x \<in> closure s. f x \<in> t}" |
6511 |
using continuous_closed_preimage[OF assms(1)] and assms(2) by auto |
|
6512 |
ultimately have "closure s = {x \<in> closure s . f x \<in> t}" |
|
6513 |
using closure_minimal[of s "{x \<in> closure s. f x \<in> t}"] by auto |
|
53282 | 6514 |
then show ?thesis by auto |
33175 | 6515 |
qed |
6516 |
||
6517 |
lemma continuous_on_closure_norm_le: |
|
6518 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::real_normed_vector" |
|
53282 | 6519 |
assumes "continuous_on (closure s) f" |
6520 |
and "\<forall>y \<in> s. norm(f y) \<le> b" |
|
6521 |
and "x \<in> (closure s)" |
|
53291 | 6522 |
shows "norm (f x) \<le> b" |
53282 | 6523 |
proof - |
6524 |
have *: "f ` s \<subseteq> cball 0 b" |
|
53291 | 6525 |
using assms(2)[unfolded mem_cball_0[symmetric]] by auto |
33175 | 6526 |
show ?thesis |
6527 |
using image_closure_subset[OF assms(1) closed_cball[of 0 b] *] assms(3) |
|
53282 | 6528 |
unfolding subset_eq |
6529 |
apply (erule_tac x="f x" in ballE) |
|
6530 |
apply (auto simp add: dist_norm) |
|
6531 |
done |
|
33175 | 6532 |
qed |
6533 |
||
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
6534 |
lemma isCont_indicator: |
61880
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
6535 |
fixes x :: "'a::t2_space" |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
6536 |
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
|
6537 |
proof auto |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
6538 |
fix x |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
6539 |
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
|
6540 |
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
|
6541 |
(\<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
|
6542 |
show False |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
6543 |
proof (cases "x \<in> A") |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
6544 |
assume x: "x \<in> A" |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
6545 |
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
|
6546 |
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
|
6547 |
using 1 open_greaterThanLessThan by blast |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
6548 |
then guess U .. note U = this |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
6549 |
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
|
6550 |
unfolding greaterThanLessThan_def by auto |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
6551 |
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
|
6552 |
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
|
6553 |
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
|
6554 |
next |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
6555 |
assume x: "x \<notin> A" |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
6556 |
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
|
6557 |
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
|
6558 |
using 1 open_greaterThanLessThan by blast |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
6559 |
then guess U .. note U = this |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
6560 |
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
|
6561 |
unfolding greaterThanLessThan_def by auto |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
6562 |
hence "U \<subseteq> -A" by auto |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
6563 |
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
|
6564 |
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
|
6565 |
qed |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
6566 |
next |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
6567 |
assume nfr: "x \<notin> frontier A" |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
6568 |
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
|
6569 |
by (auto simp: frontier_def closure_interior) |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
6570 |
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
|
6571 |
proof |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
6572 |
assume int: "x \<in> interior A" |
63103 | 6573 |
then obtain U where U: "open U" "x \<in> U" "U \<subseteq> A" unfolding interior_def by auto |
61880
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
6574 |
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
|
6575 |
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
|
6576 |
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
|
6577 |
next |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
6578 |
assume ext: "x \<in> interior (-A)" |
63103 | 6579 |
then obtain U where U: "open U" "x \<in> U" "U \<subseteq> -A" unfolding interior_def by auto |
6580 |
then have "continuous_on U (indicator A)" |
|
6581 |
using continuous_on_topological by (auto simp: subset_iff) |
|
61880
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
6582 |
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
|
6583 |
qed |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
6584 |
qed |
ff4d33058566
moved some theorems from the CLT proof; reordered some theorems / notation
hoelzl
parents:
61848
diff
changeset
|
6585 |
|
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6586 |
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
|
6587 |
|
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6588 |
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
|
6589 |
"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
|
6590 |
(\<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
|
6591 |
\<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
|
6592 |
(is "?lhs = ?rhs") |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6593 |
proof |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6594 |
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
|
6595 |
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
|
6596 |
next |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6597 |
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
|
6598 |
show ?lhs |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6599 |
proof |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6600 |
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
|
6601 |
assume "0 < e" and x: "x \<in> closure S" |
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
6602 |
obtain \<delta>::real where "\<delta> > 0" |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6603 |
and \<delta>: "\<And>y. \<lbrakk>y \<in> S; dist y x < \<delta>\<rbrakk> \<Longrightarrow> dist (f y) (f x) < e/2" |
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
6604 |
using R [of x "e/2"] \<open>0 < e\<close> x by auto |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6605 |
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
|
6606 |
proof - |
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
6607 |
obtain \<delta>'::real where "\<delta>' > 0" |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6608 |
and \<delta>': "\<And>z. \<lbrakk>z \<in> S; dist z y < \<delta>'\<rbrakk> \<Longrightarrow> dist (f z) (f y) < e/2" |
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
6609 |
using R [of y "e/2"] \<open>0 < e\<close> y by auto |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6610 |
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
|
6611 |
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
|
6612 |
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
|
6613 |
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
|
6614 |
apply (rule \<delta>' [OF \<open>z \<in> S\<close>]) |
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
6615 |
using z \<open>0 < \<delta>'\<close> by linarith |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6616 |
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
|
6617 |
apply (rule \<delta> [OF \<open>z \<in> S\<close>]) |
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
6618 |
using z \<open>0 < \<delta>\<close> dist_commute[of y z] dist_triangle_half_r [of y] dyx by auto |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6619 |
ultimately show ?thesis |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6620 |
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
|
6621 |
qed |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6622 |
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
|
6623 |
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
|
6624 |
qed |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6625 |
qed |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6626 |
|
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6627 |
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
|
6628 |
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
|
6629 |
shows |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6630 |
"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
|
6631 |
(\<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
|
6632 |
(is "?lhs = ?rhs") |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6633 |
proof - |
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
6634 |
have "continuous_on (closure S) f \<longleftrightarrow> |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6635 |
(\<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
|
6636 |
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
|
6637 |
also have "... = ?rhs" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6638 |
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
|
6639 |
finally show ?thesis . |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6640 |
qed |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6641 |
|
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6642 |
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
|
6643 |
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
|
6644 |
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
|
6645 |
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
|
6646 |
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
|
6647 |
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
|
6648 |
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
|
6649 |
fix e::real |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6650 |
assume "0 < e" |
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
6651 |
then obtain d::real |
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
6652 |
where "d>0" |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6653 |
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
|
6654 |
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
|
6655 |
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
|
6656 |
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
|
6657 |
fix x y |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6658 |
assume x: "x \<in> closure S" and y: "y \<in> closure S" and dyx: "dist y x * 3 < d" |
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
6659 |
obtain d1::real where "d1 > 0" |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6660 |
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
|
6661 |
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
|
6662 |
obtain x' where "x' \<in> S" and x': "dist x' x < min d1 (d / 3)" |
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
6663 |
using closure_approachable [of x S] |
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
6664 |
by (metis \<open>0 < d1\<close> \<open>0 < d\<close> divide_pos_pos min_less_iff_conj x zero_less_numeral) |
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
6665 |
obtain d2::real where "d2 > 0" |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6666 |
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
|
6667 |
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
|
6668 |
obtain y' where "y' \<in> S" and y': "dist y' y < min d2 (d / 3)" |
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
6669 |
using closure_approachable [of y S] |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6670 |
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
|
6671 |
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
|
6672 |
moreover have "dist x y < d/3" |
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
6673 |
by (metis dist_commute dyx less_divide_eq_numeral1(1)) |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6674 |
moreover have "dist y y' < d/3" |
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
6675 |
by (metis (no_types) dist_commute min_less_iff_conj y') |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6676 |
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
|
6677 |
by (meson dist_commute_lessI dist_triangle_lt add_strict_mono) |
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
6678 |
then have "dist x' y' < d" by simp |
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
6679 |
then have "dist (f x') (f y') < e/3" |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6680 |
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
|
6681 |
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
|
6682 |
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
|
6683 |
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
|
6684 |
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
|
6685 |
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
|
6686 |
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
|
6687 |
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
|
6688 |
qed |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6689 |
qed |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
6690 |
|
63105
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6691 |
lemma uniformly_continuous_on_extension_at_closure: |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6692 |
fixes f::"'a::metric_space \<Rightarrow> 'b::complete_space" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6693 |
assumes uc: "uniformly_continuous_on X f" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6694 |
assumes "x \<in> closure X" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6695 |
obtains l where "(f \<longlongrightarrow> l) (at x within X)" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6696 |
proof - |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6697 |
from assms obtain xs where xs: "xs \<longlonglongrightarrow> x" "\<And>n. xs n \<in> X" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6698 |
by (auto simp: closure_sequential) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6699 |
|
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6700 |
from uniformly_continuous_on_Cauchy[OF uc LIMSEQ_imp_Cauchy, OF xs] |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6701 |
obtain l where l: "(\<lambda>n. f (xs n)) \<longlonglongrightarrow> l" |
64287 | 6702 |
by atomize_elim (simp only: convergent_eq_Cauchy) |
63105
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6703 |
|
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6704 |
have "(f \<longlongrightarrow> l) (at x within X)" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6705 |
proof (safe intro!: Lim_within_LIMSEQ) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6706 |
fix xs' |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6707 |
assume "\<forall>n. xs' n \<noteq> x \<and> xs' n \<in> X" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6708 |
and xs': "xs' \<longlonglongrightarrow> x" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6709 |
then have "xs' n \<noteq> x" "xs' n \<in> X" for n by auto |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6710 |
|
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6711 |
from uniformly_continuous_on_Cauchy[OF uc LIMSEQ_imp_Cauchy, OF \<open>xs' \<longlonglongrightarrow> x\<close> \<open>xs' _ \<in> X\<close>] |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6712 |
obtain l' where l': "(\<lambda>n. f (xs' n)) \<longlonglongrightarrow> l'" |
64287 | 6713 |
by atomize_elim (simp only: convergent_eq_Cauchy) |
63105
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6714 |
|
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6715 |
show "(\<lambda>n. f (xs' n)) \<longlonglongrightarrow> l" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6716 |
proof (rule tendstoI) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6717 |
fix e::real assume "e > 0" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6718 |
define e' where "e' \<equiv> e / 2" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6719 |
have "e' > 0" using \<open>e > 0\<close> by (simp add: e'_def) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6720 |
|
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6721 |
have "\<forall>\<^sub>F n in sequentially. dist (f (xs n)) l < e'" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6722 |
by (simp add: \<open>0 < e'\<close> l tendstoD) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6723 |
moreover |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6724 |
from uc[unfolded uniformly_continuous_on_def, rule_format, OF \<open>e' > 0\<close>] |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6725 |
obtain d where d: "d > 0" "\<And>x x'. x \<in> X \<Longrightarrow> x' \<in> X \<Longrightarrow> dist x x' < d \<Longrightarrow> dist (f x) (f x') < e'" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6726 |
by auto |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6727 |
have "\<forall>\<^sub>F n in sequentially. dist (xs n) (xs' n) < d" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6728 |
by (auto intro!: \<open>0 < d\<close> order_tendstoD tendsto_eq_intros xs xs') |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6729 |
ultimately |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6730 |
show "\<forall>\<^sub>F n in sequentially. dist (f (xs' n)) l < e" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6731 |
proof eventually_elim |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6732 |
case (elim n) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6733 |
have "dist (f (xs' n)) l \<le> dist (f (xs n)) (f (xs' n)) + dist (f (xs n)) l" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6734 |
by (metis dist_triangle dist_commute) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6735 |
also have "dist (f (xs n)) (f (xs' n)) < e'" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6736 |
by (auto intro!: d xs \<open>xs' _ \<in> _\<close> elim) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6737 |
also note \<open>dist (f (xs n)) l < e'\<close> |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6738 |
also have "e' + e' = e" by (simp add: e'_def) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6739 |
finally show ?case by simp |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6740 |
qed |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6741 |
qed |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6742 |
qed |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6743 |
thus ?thesis .. |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6744 |
qed |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6745 |
|
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6746 |
lemma uniformly_continuous_on_extension_on_closure: |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6747 |
fixes f::"'a::metric_space \<Rightarrow> 'b::complete_space" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6748 |
assumes uc: "uniformly_continuous_on X f" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6749 |
obtains g where "uniformly_continuous_on (closure X) g" "\<And>x. x \<in> X \<Longrightarrow> f x = g x" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6750 |
"\<And>Y h x. X \<subseteq> Y \<Longrightarrow> Y \<subseteq> closure X \<Longrightarrow> continuous_on Y h \<Longrightarrow> (\<And>x. x \<in> X \<Longrightarrow> f x = h x) \<Longrightarrow> x \<in> Y \<Longrightarrow> h x = g x" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6751 |
proof - |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6752 |
from uc have cont_f: "continuous_on X f" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6753 |
by (simp add: uniformly_continuous_imp_continuous) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6754 |
obtain y where y: "(f \<longlongrightarrow> y x) (at x within X)" if "x \<in> closure X" for x |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6755 |
apply atomize_elim |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6756 |
apply (rule choice) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6757 |
using uniformly_continuous_on_extension_at_closure[OF assms] |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6758 |
by metis |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6759 |
let ?g = "\<lambda>x. if x \<in> X then f x else y x" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6760 |
|
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6761 |
have "uniformly_continuous_on (closure X) ?g" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6762 |
unfolding uniformly_continuous_on_def |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6763 |
proof safe |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6764 |
fix e::real assume "e > 0" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6765 |
define e' where "e' \<equiv> e / 3" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6766 |
have "e' > 0" using \<open>e > 0\<close> by (simp add: e'_def) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6767 |
from uc[unfolded uniformly_continuous_on_def, rule_format, OF \<open>0 < e'\<close>] |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6768 |
obtain d where "d > 0" and d: "\<And>x x'. x \<in> X \<Longrightarrow> x' \<in> X \<Longrightarrow> dist x' x < d \<Longrightarrow> dist (f x') (f x) < e'" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6769 |
by auto |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6770 |
define d' where "d' = d / 3" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6771 |
have "d' > 0" using \<open>d > 0\<close> by (simp add: d'_def) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6772 |
show "\<exists>d>0. \<forall>x\<in>closure X. \<forall>x'\<in>closure X. dist x' x < d \<longrightarrow> dist (?g x') (?g x) < e" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6773 |
proof (safe intro!: exI[where x=d'] \<open>d' > 0\<close>) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6774 |
fix x x' assume x: "x \<in> closure X" and x': "x' \<in> closure X" and dist: "dist x' x < d'" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6775 |
then obtain xs xs' where xs: "xs \<longlonglongrightarrow> x" "\<And>n. xs n \<in> X" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6776 |
and xs': "xs' \<longlonglongrightarrow> x'" "\<And>n. xs' n \<in> X" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6777 |
by (auto simp: closure_sequential) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6778 |
have "\<forall>\<^sub>F n in sequentially. dist (xs' n) x' < d'" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6779 |
and "\<forall>\<^sub>F n in sequentially. dist (xs n) x < d'" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6780 |
by (auto intro!: \<open>0 < d'\<close> order_tendstoD tendsto_eq_intros xs xs') |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6781 |
moreover |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6782 |
have "(\<lambda>x. f (xs x)) \<longlonglongrightarrow> y x" if "x \<in> closure X" "x \<notin> X" "xs \<longlonglongrightarrow> x" "\<And>n. xs n \<in> X" for xs x |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6783 |
using that not_eventuallyD |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6784 |
by (force intro!: filterlim_compose[OF y[OF \<open>x \<in> closure X\<close>]] simp: filterlim_at) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6785 |
then have "(\<lambda>x. f (xs' x)) \<longlonglongrightarrow> ?g x'" "(\<lambda>x. f (xs x)) \<longlonglongrightarrow> ?g x" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6786 |
using x x' |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6787 |
by (auto intro!: continuous_on_tendsto_compose[OF cont_f] simp: xs' xs) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6788 |
then have "\<forall>\<^sub>F n in sequentially. dist (f (xs' n)) (?g x') < e'" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6789 |
"\<forall>\<^sub>F n in sequentially. dist (f (xs n)) (?g x) < e'" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6790 |
by (auto intro!: \<open>0 < e'\<close> order_tendstoD tendsto_eq_intros) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6791 |
ultimately |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6792 |
have "\<forall>\<^sub>F n in sequentially. dist (?g x') (?g x) < e" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6793 |
proof eventually_elim |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6794 |
case (elim n) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6795 |
have "dist (?g x') (?g x) \<le> |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6796 |
dist (f (xs' n)) (?g x') + dist (f (xs' n)) (f (xs n)) + dist (f (xs n)) (?g x)" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6797 |
by (metis add.commute add_le_cancel_left dist_commute dist_triangle dist_triangle_le) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6798 |
also |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6799 |
{ |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6800 |
have "dist (xs' n) (xs n) \<le> dist (xs' n) x' + dist x' x + dist (xs n) x" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6801 |
by (metis add.commute add_le_cancel_left dist_triangle dist_triangle_le) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6802 |
also note \<open>dist (xs' n) x' < d'\<close> |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6803 |
also note \<open>dist x' x < d'\<close> |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6804 |
also note \<open>dist (xs n) x < d'\<close> |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6805 |
finally have "dist (xs' n) (xs n) < d" by (simp add: d'_def) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6806 |
} |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6807 |
with \<open>xs _ \<in> X\<close> \<open>xs' _ \<in> X\<close> have "dist (f (xs' n)) (f (xs n)) < e'" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6808 |
by (rule d) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6809 |
also note \<open>dist (f (xs' n)) (?g x') < e'\<close> |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6810 |
also note \<open>dist (f (xs n)) (?g x) < e'\<close> |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6811 |
finally show ?case by (simp add: e'_def) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6812 |
qed |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6813 |
then show "dist (?g x') (?g x) < e" by simp |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6814 |
qed |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6815 |
qed |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6816 |
moreover have "f x = ?g x" if "x \<in> X" for x using that by simp |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6817 |
moreover |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6818 |
{ |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6819 |
fix Y h x |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6820 |
assume Y: "x \<in> Y" "X \<subseteq> Y" "Y \<subseteq> closure X" and cont_h: "continuous_on Y h" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6821 |
and extension: "(\<And>x. x \<in> X \<Longrightarrow> f x = h x)" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6822 |
{ |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6823 |
assume "x \<notin> X" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6824 |
have "x \<in> closure X" using Y by auto |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6825 |
then obtain xs where xs: "xs \<longlonglongrightarrow> x" "\<And>n. xs n \<in> X" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6826 |
by (auto simp: closure_sequential) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6827 |
from continuous_on_tendsto_compose[OF cont_h xs(1)] xs(2) Y |
63540 | 6828 |
have hx: "(\<lambda>x. f (xs x)) \<longlonglongrightarrow> h x" |
63105
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6829 |
by (auto simp: set_mp extension) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6830 |
then have "(\<lambda>x. f (xs x)) \<longlonglongrightarrow> y x" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6831 |
using \<open>x \<notin> X\<close> not_eventuallyD xs(2) |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6832 |
by (force intro!: filterlim_compose[OF y[OF \<open>x \<in> closure X\<close>]] simp: filterlim_at xs) |
63540 | 6833 |
with hx have "h x = y x" by (rule LIMSEQ_unique) |
63105
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6834 |
} then |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6835 |
have "h x = ?g x" |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6836 |
using extension by auto |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6837 |
} |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6838 |
ultimately show ?thesis .. |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6839 |
qed |
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6840 |
|
c445b0924e3a
uniformly continuous function extended continuously on closure
immler
parents:
63104
diff
changeset
|
6841 |
|
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6842 |
subsection\<open>Quotient maps\<close> |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6843 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6844 |
lemma quotient_map_imp_continuous_open: |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6845 |
assumes t: "f ` s \<subseteq> t" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6846 |
and ope: "\<And>u. u \<subseteq> t |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6847 |
\<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
|
6848 |
openin (subtopology euclidean t) u)" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6849 |
shows "continuous_on s f" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6850 |
proof - |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6851 |
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
|
6852 |
show ?thesis |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6853 |
using ope [OF t] |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6854 |
apply (simp add: continuous_on_open) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6855 |
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
|
6856 |
qed |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6857 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6858 |
lemma quotient_map_imp_continuous_closed: |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6859 |
assumes t: "f ` s \<subseteq> t" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6860 |
and ope: "\<And>u. u \<subseteq> t |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6861 |
\<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
|
6862 |
closedin (subtopology euclidean t) u)" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6863 |
shows "continuous_on s f" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6864 |
proof - |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6865 |
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
|
6866 |
show ?thesis |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6867 |
using ope [OF t] |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6868 |
apply (simp add: continuous_on_closed) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6869 |
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
|
6870 |
qed |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6871 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6872 |
lemma open_map_imp_quotient_map: |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6873 |
assumes contf: "continuous_on s f" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6874 |
and t: "t \<subseteq> f ` s" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6875 |
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
|
6876 |
\<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
|
6877 |
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
|
6878 |
openin (subtopology euclidean (f ` s)) t" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6879 |
proof - |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6880 |
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
|
6881 |
using t by blast |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6882 |
then show ?thesis |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6883 |
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
|
6884 |
qed |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6885 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6886 |
lemma closed_map_imp_quotient_map: |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6887 |
assumes contf: "continuous_on s f" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6888 |
and t: "t \<subseteq> f ` s" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6889 |
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
|
6890 |
\<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
|
6891 |
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
|
6892 |
openin (subtopology euclidean (f ` s)) t" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6893 |
(is "?lhs = ?rhs") |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6894 |
proof |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6895 |
assume ?lhs |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6896 |
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
|
6897 |
using closedin_diff by fastforce |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6898 |
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
|
6899 |
using t by blast |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6900 |
show ?rhs |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6901 |
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
|
6902 |
next |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6903 |
assume ?rhs |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6904 |
with contf show ?lhs |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6905 |
by (auto simp: continuous_on_open) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6906 |
qed |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6907 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6908 |
lemma continuous_right_inverse_imp_quotient_map: |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6909 |
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
|
6910 |
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
|
6911 |
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
|
6912 |
and u: "u \<subseteq> t" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6913 |
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
|
6914 |
openin (subtopology euclidean t) u" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6915 |
(is "?lhs = ?rhs") |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6916 |
proof - |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6917 |
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
|
6918 |
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
|
6919 |
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
|
6920 |
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
|
6921 |
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
|
6922 |
show ?thesis |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6923 |
proof |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6924 |
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
|
6925 |
using imf img by blast |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6926 |
also have "... = u" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6927 |
using u by auto |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6928 |
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
|
6929 |
assume ?lhs |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6930 |
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
|
6931 |
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
|
6932 |
show ?rhs |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6933 |
using g [OF *] by simp |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6934 |
next |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6935 |
assume rhs: ?rhs |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6936 |
show ?lhs |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6937 |
apply (rule f) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6938 |
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
|
6939 |
qed |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6940 |
qed |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6941 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6942 |
lemma continuous_left_inverse_imp_quotient_map: |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6943 |
assumes "continuous_on s f" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6944 |
and "continuous_on (f ` s) g" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6945 |
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
|
6946 |
and "u \<subseteq> f ` s" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6947 |
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
|
6948 |
openin (subtopology euclidean (f ` s)) u" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6949 |
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
|
6950 |
using assms |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6951 |
apply force+ |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6952 |
done |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
6953 |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6954 |
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
|
6955 |
|
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6956 |
definition constant_on (infixl "(constant'_on)" 50) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6957 |
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
|
6958 |
|
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6959 |
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
|
6960 |
unfolding constant_on_def by blast |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6961 |
|
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6962 |
lemma injective_not_constant: |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6963 |
fixes S :: "'a::{perfect_space} set" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6964 |
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
|
6965 |
unfolding constant_on_def |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6966 |
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
|
6967 |
|
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6968 |
lemma constant_on_closureI: |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6969 |
fixes f :: "_ \<Rightarrow> 'b::t1_space" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6970 |
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
|
6971 |
shows "f constant_on (closure S)" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6972 |
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
|
6973 |
by metis |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
6974 |
|
60420 | 6975 |
text \<open>Making a continuous function avoid some value in a neighbourhood.\<close> |
33175 | 6976 |
|
6977 |
lemma continuous_within_avoid: |
|
50898 | 6978 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::t1_space" |
53282 | 6979 |
assumes "continuous (at x within s) f" |
6980 |
and "f x \<noteq> a" |
|
33175 | 6981 |
shows "\<exists>e>0. \<forall>y \<in> s. dist x y < e --> f y \<noteq> a" |
53291 | 6982 |
proof - |
50898 | 6983 |
obtain U where "open U" and "f x \<in> U" and "a \<notin> U" |
60420 | 6984 |
using t1_space [OF \<open>f x \<noteq> a\<close>] by fast |
61973 | 6985 |
have "(f \<longlongrightarrow> f x) (at x within s)" |
50898 | 6986 |
using assms(1) by (simp add: continuous_within) |
53282 | 6987 |
then have "eventually (\<lambda>y. f y \<in> U) (at x within s)" |
60420 | 6988 |
using \<open>open U\<close> and \<open>f x \<in> U\<close> |
50898 | 6989 |
unfolding tendsto_def by fast |
53282 | 6990 |
then have "eventually (\<lambda>y. f y \<noteq> a) (at x within s)" |
61810 | 6991 |
using \<open>a \<notin> U\<close> by (fast elim: eventually_mono) |
53282 | 6992 |
then show ?thesis |
60420 | 6993 |
using \<open>f x \<noteq> a\<close> by (auto simp: dist_commute zero_less_dist_iff eventually_at) |
33175 | 6994 |
qed |
6995 |
||
6996 |
lemma continuous_at_avoid: |
|
50898 | 6997 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::t1_space" |
53282 | 6998 |
assumes "continuous (at x) f" |
6999 |
and "f x \<noteq> a" |
|
33175 | 7000 |
shows "\<exists>e>0. \<forall>y. dist x y < e \<longrightarrow> f y \<noteq> a" |
45031 | 7001 |
using assms continuous_within_avoid[of x UNIV f a] by simp |
33175 | 7002 |
|
7003 |
lemma continuous_on_avoid: |
|
50898 | 7004 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::t1_space" |
53282 | 7005 |
assumes "continuous_on s f" |
7006 |
and "x \<in> s" |
|
7007 |
and "f x \<noteq> a" |
|
33175 | 7008 |
shows "\<exists>e>0. \<forall>y \<in> s. dist x y < e \<longrightarrow> f y \<noteq> a" |
53282 | 7009 |
using assms(1)[unfolded continuous_on_eq_continuous_within, THEN bspec[where x=x], |
7010 |
OF assms(2)] continuous_within_avoid[of x s f a] |
|
7011 |
using assms(3) |
|
7012 |
by auto |
|
33175 | 7013 |
|
7014 |
lemma continuous_on_open_avoid: |
|
50898 | 7015 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::t1_space" |
53291 | 7016 |
assumes "continuous_on s f" |
7017 |
and "open s" |
|
7018 |
and "x \<in> s" |
|
7019 |
and "f x \<noteq> a" |
|
33175 | 7020 |
shows "\<exists>e>0. \<forall>y. dist x y < e \<longrightarrow> f y \<noteq> a" |
53282 | 7021 |
using assms(1)[unfolded continuous_on_eq_continuous_at[OF assms(2)], THEN bspec[where x=x], OF assms(3)] |
7022 |
using continuous_at_avoid[of x f a] assms(4) |
|
7023 |
by auto |
|
33175 | 7024 |
|
60420 | 7025 |
text \<open>Proving a function is constant by proving open-ness of level set.\<close> |
33175 | 7026 |
|
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
|
7027 |
lemma continuous_levelset_openin_cases: |
36668
941ba2da372e
simplify definition of t1_space; generalize lemma closed_sing and related lemmas
huffman
parents:
36667
diff
changeset
|
7028 |
fixes f :: "_ \<Rightarrow> 'b::t1_space" |
36359 | 7029 |
shows "connected s \<Longrightarrow> continuous_on s f \<Longrightarrow> |
33175 | 7030 |
openin (subtopology euclidean s) {x \<in> s. f x = a} |
53282 | 7031 |
\<Longrightarrow> (\<forall>x \<in> s. f x \<noteq> a) \<or> (\<forall>x \<in> s. f x = a)" |
7032 |
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
|
7033 |
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
|
7034 |
|
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
7035 |
lemma continuous_levelset_openin: |
36668
941ba2da372e
simplify definition of t1_space; generalize lemma closed_sing and related lemmas
huffman
parents:
36667
diff
changeset
|
7036 |
fixes f :: "_ \<Rightarrow> 'b::t1_space" |
36359 | 7037 |
shows "connected s \<Longrightarrow> continuous_on s f \<Longrightarrow> |
33175 | 7038 |
openin (subtopology euclidean s) {x \<in> s. f x = a} \<Longrightarrow> |
53291 | 7039 |
(\<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
|
7040 |
using continuous_levelset_openin_cases[of s f ] |
53282 | 7041 |
by meson |
33175 | 7042 |
|
7043 |
lemma continuous_levelset_open: |
|
36668
941ba2da372e
simplify definition of t1_space; generalize lemma closed_sing and related lemmas
huffman
parents:
36667
diff
changeset
|
7044 |
fixes f :: "_ \<Rightarrow> 'b::t1_space" |
53282 | 7045 |
assumes "connected s" |
7046 |
and "continuous_on s f" |
|
7047 |
and "open {x \<in> s. f x = a}" |
|
7048 |
and "\<exists>x \<in> s. f x = a" |
|
33175 | 7049 |
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
|
7050 |
using continuous_levelset_openin[OF assms(1,2), of a, unfolded openin_open] |
53282 | 7051 |
using assms (3,4) |
7052 |
by fast |
|
33175 | 7053 |
|
60420 | 7054 |
text \<open>Some arithmetical combinations (more to prove).\<close> |
33175 | 7055 |
|
7056 |
lemma open_scaling[intro]: |
|
7057 |
fixes s :: "'a::real_normed_vector set" |
|
53291 | 7058 |
assumes "c \<noteq> 0" |
7059 |
and "open s" |
|
33175 | 7060 |
shows "open((\<lambda>x. c *\<^sub>R x) ` s)" |
53282 | 7061 |
proof - |
7062 |
{ |
|
7063 |
fix x |
|
7064 |
assume "x \<in> s" |
|
7065 |
then obtain e where "e>0" |
|
7066 |
and e:"\<forall>x'. dist x' x < e \<longrightarrow> x' \<in> s" using assms(2)[unfolded open_dist, THEN bspec[where x=x]] |
|
7067 |
by auto |
|
61945 | 7068 |
have "e * \<bar>c\<bar> > 0" |
60420 | 7069 |
using assms(1)[unfolded zero_less_abs_iff[symmetric]] \<open>e>0\<close> by auto |
33175 | 7070 |
moreover |
53282 | 7071 |
{ |
7072 |
fix y |
|
7073 |
assume "dist y (c *\<^sub>R x) < e * \<bar>c\<bar>" |
|
7074 |
then have "norm ((1 / c) *\<^sub>R y - x) < e" |
|
7075 |
unfolding dist_norm |
|
33175 | 7076 |
using norm_scaleR[of c "(1 / c) *\<^sub>R y - x", unfolded scaleR_right_diff_distrib, unfolded scaleR_scaleR] assms(1) |
53291 | 7077 |
assms(1)[unfolded zero_less_abs_iff[symmetric]] by (simp del:zero_less_abs_iff) |
53282 | 7078 |
then have "y \<in> op *\<^sub>R c ` s" |
7079 |
using rev_image_eqI[of "(1 / c) *\<^sub>R y" s y "op *\<^sub>R c"] |
|
7080 |
using e[THEN spec[where x="(1 / c) *\<^sub>R y"]] |
|
7081 |
using assms(1) |
|
7082 |
unfolding dist_norm scaleR_scaleR |
|
7083 |
by auto |
|
7084 |
} |
|
7085 |
ultimately have "\<exists>e>0. \<forall>x'. dist x' (c *\<^sub>R x) < e \<longrightarrow> x' \<in> op *\<^sub>R c ` s" |
|
61945 | 7086 |
apply (rule_tac x="e * \<bar>c\<bar>" in exI) |
53282 | 7087 |
apply auto |
7088 |
done |
|
7089 |
} |
|
7090 |
then show ?thesis unfolding open_dist by auto |
|
33175 | 7091 |
qed |
7092 |
||
7093 |
lemma minus_image_eq_vimage: |
|
7094 |
fixes A :: "'a::ab_group_add set" |
|
7095 |
shows "(\<lambda>x. - x) ` A = (\<lambda>x. - x) -` A" |
|
7096 |
by (auto intro!: image_eqI [where f="\<lambda>x. - x"]) |
|
7097 |
||
7098 |
lemma open_negations: |
|
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7099 |
fixes S :: "'a::real_normed_vector set" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7100 |
shows "open S \<Longrightarrow> open ((\<lambda>x. - x) ` S)" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7101 |
using open_scaling [of "- 1" S] by simp |
33175 | 7102 |
|
7103 |
lemma open_translation: |
|
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7104 |
fixes S :: "'a::real_normed_vector set" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7105 |
assumes "open S" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7106 |
shows "open((\<lambda>x. a + x) ` S)" |
53282 | 7107 |
proof - |
7108 |
{ |
|
7109 |
fix x |
|
7110 |
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
|
7111 |
by (intro continuous_diff continuous_ident continuous_const) |
53282 | 7112 |
} |
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7113 |
moreover have "{x. x - a \<in> S} = op + a ` S" |
53282 | 7114 |
by force |
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7115 |
ultimately show ?thesis |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7116 |
by (metis assms continuous_open_vimage vimage_def) |
33175 | 7117 |
qed |
7118 |
||
7119 |
lemma open_affinity: |
|
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7120 |
fixes S :: "'a::real_normed_vector set" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7121 |
assumes "open S" "c \<noteq> 0" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7122 |
shows "open ((\<lambda>x. a + c *\<^sub>R x) ` S)" |
53282 | 7123 |
proof - |
7124 |
have *: "(\<lambda>x. a + c *\<^sub>R x) = (\<lambda>x. a + x) \<circ> (\<lambda>x. c *\<^sub>R x)" |
|
7125 |
unfolding o_def .. |
|
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7126 |
have "op + a ` op *\<^sub>R c ` S = (op + a \<circ> op *\<^sub>R c) ` S" |
53282 | 7127 |
by auto |
7128 |
then show ?thesis |
|
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7129 |
using assms open_translation[of "op *\<^sub>R c ` S" a] |
53282 | 7130 |
unfolding * |
7131 |
by auto |
|
33175 | 7132 |
qed |
7133 |
||
7134 |
lemma interior_translation: |
|
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7135 |
fixes S :: "'a::real_normed_vector set" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7136 |
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
|
7137 |
proof (rule set_eqI, rule) |
53282 | 7138 |
fix x |
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7139 |
assume "x \<in> interior (op + a ` S)" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7140 |
then obtain e where "e > 0" and e: "ball x e \<subseteq> op + a ` S" |
53282 | 7141 |
unfolding mem_interior by auto |
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7142 |
then have "ball (x - a) e \<subseteq> S" |
53282 | 7143 |
unfolding subset_eq Ball_def mem_ball dist_norm |
59815
cce82e360c2f
explicit commutative additive inverse operation;
haftmann
parents:
59765
diff
changeset
|
7144 |
by (auto simp add: diff_diff_eq) |
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7145 |
then show "x \<in> op + a ` interior S" |
53282 | 7146 |
unfolding image_iff |
7147 |
apply (rule_tac x="x - a" in bexI) |
|
7148 |
unfolding mem_interior |
|
60420 | 7149 |
using \<open>e > 0\<close> |
53282 | 7150 |
apply auto |
7151 |
done |
|
33175 | 7152 |
next |
53282 | 7153 |
fix x |
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7154 |
assume "x \<in> op + a ` interior S" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7155 |
then obtain y e where "e > 0" and e: "ball y e \<subseteq> S" and y: "x = a + y" |
53282 | 7156 |
unfolding image_iff Bex_def mem_interior by auto |
7157 |
{ |
|
7158 |
fix z |
|
7159 |
have *: "a + y - z = y + a - z" by auto |
|
7160 |
assume "z \<in> ball x e" |
|
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7161 |
then have "z - a \<in> S" |
53282 | 7162 |
using e[unfolded subset_eq, THEN bspec[where x="z - a"]] |
7163 |
unfolding mem_ball dist_norm y group_add_class.diff_diff_eq2 * |
|
7164 |
by auto |
|
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7165 |
then have "z \<in> op + a ` S" |
53282 | 7166 |
unfolding image_iff by (auto intro!: bexI[where x="z - a"]) |
7167 |
} |
|
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7168 |
then have "ball x e \<subseteq> op + a ` S" |
53282 | 7169 |
unfolding subset_eq by auto |
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7170 |
then show "x \<in> interior (op + a ` S)" |
60420 | 7171 |
unfolding mem_interior using \<open>e > 0\<close> by auto |
7172 |
qed |
|
7173 |
||
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7174 |
subsection \<open>Topological properties of linear functions.\<close> |
36437 | 7175 |
|
7176 |
lemma linear_lim_0: |
|
53282 | 7177 |
assumes "bounded_linear f" |
61973 | 7178 |
shows "(f \<longlongrightarrow> 0) (at (0))" |
53282 | 7179 |
proof - |
36437 | 7180 |
interpret f: bounded_linear f by fact |
61973 | 7181 |
have "(f \<longlongrightarrow> f 0) (at 0)" |
36437 | 7182 |
using tendsto_ident_at by (rule f.tendsto) |
53282 | 7183 |
then show ?thesis unfolding f.zero . |
36437 | 7184 |
qed |
7185 |
||
7186 |
lemma linear_continuous_at: |
|
53282 | 7187 |
assumes "bounded_linear f" |
7188 |
shows "continuous (at a) f" |
|
36437 | 7189 |
unfolding continuous_at using assms |
7190 |
apply (rule bounded_linear.tendsto) |
|
7191 |
apply (rule tendsto_ident_at) |
|
7192 |
done |
|
7193 |
||
7194 |
lemma linear_continuous_within: |
|
53291 | 7195 |
"bounded_linear f \<Longrightarrow> continuous (at x within s) f" |
36437 | 7196 |
using continuous_at_imp_continuous_within[of x f s] using linear_continuous_at[of f] by auto |
7197 |
||
7198 |
lemma linear_continuous_on: |
|
53291 | 7199 |
"bounded_linear f \<Longrightarrow> continuous_on s f" |
36437 | 7200 |
using continuous_at_imp_continuous_on[of s f] using linear_continuous_at[of f] by auto |
7201 |
||
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7202 |
subsubsection\<open>Relating linear images to open/closed/interior/closure.\<close> |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7203 |
|
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7204 |
proposition open_surjective_linear_image: |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7205 |
fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::euclidean_space" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7206 |
assumes "open A" "linear f" "surj f" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7207 |
shows "open(f ` A)" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7208 |
unfolding open_dist |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7209 |
proof clarify |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7210 |
fix x |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7211 |
assume "x \<in> A" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7212 |
have "bounded (inv f ` Basis)" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7213 |
by (simp add: finite_imp_bounded) |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7214 |
with bounded_pos obtain B where "B > 0" and B: "\<And>x. x \<in> inv f ` Basis \<Longrightarrow> norm x \<le> B" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7215 |
by metis |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7216 |
obtain e where "e > 0" and e: "\<And>z. dist z x < e \<Longrightarrow> z \<in> A" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7217 |
by (metis open_dist \<open>x \<in> A\<close> \<open>open A\<close>) |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7218 |
define \<delta> where "\<delta> \<equiv> e / B / DIM('b)" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7219 |
show "\<exists>e>0. \<forall>y. dist y (f x) < e \<longrightarrow> y \<in> f ` A" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7220 |
proof (intro exI conjI) |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7221 |
show "\<delta> > 0" |
63938 | 7222 |
using \<open>e > 0\<close> \<open>B > 0\<close> by (simp add: \<delta>_def divide_simps) |
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7223 |
have "y \<in> f ` A" if "dist y (f x) * (B * real DIM('b)) < e" for y |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7224 |
proof - |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7225 |
define u where "u \<equiv> y - f x" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7226 |
show ?thesis |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7227 |
proof (rule image_eqI) |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7228 |
show "y = f (x + (\<Sum>i\<in>Basis. (u \<bullet> i) *\<^sub>R inv f i))" |
64267 | 7229 |
apply (simp add: linear_add linear_sum linear.scaleR \<open>linear f\<close> surj_f_inv_f \<open>surj f\<close>) |
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7230 |
apply (simp add: euclidean_representation u_def) |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7231 |
done |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7232 |
have "dist (x + (\<Sum>i\<in>Basis. (u \<bullet> i) *\<^sub>R inv f i)) x \<le> (\<Sum>i\<in>Basis. norm ((u \<bullet> i) *\<^sub>R inv f i))" |
64267 | 7233 |
by (simp add: dist_norm sum_norm_le) |
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7234 |
also have "... = (\<Sum>i\<in>Basis. \<bar>u \<bullet> i\<bar> * norm (inv f i))" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7235 |
by (simp add: ) |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7236 |
also have "... \<le> (\<Sum>i\<in>Basis. \<bar>u \<bullet> i\<bar>) * B" |
64267 | 7237 |
by (simp add: B sum_distrib_right sum_mono mult_left_mono) |
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7238 |
also have "... \<le> DIM('b) * dist y (f x) * B" |
64267 | 7239 |
apply (rule mult_right_mono [OF sum_bounded_above]) |
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7240 |
using \<open>0 < B\<close> by (auto simp add: Basis_le_norm dist_norm u_def) |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7241 |
also have "... < e" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7242 |
by (metis mult.commute mult.left_commute that) |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7243 |
finally show "x + (\<Sum>i\<in>Basis. (u \<bullet> i) *\<^sub>R inv f i) \<in> A" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7244 |
by (rule e) |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7245 |
qed |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7246 |
qed |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7247 |
then show "\<forall>y. dist y (f x) < \<delta> \<longrightarrow> y \<in> f ` A" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7248 |
using \<open>e > 0\<close> \<open>B > 0\<close> |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7249 |
by (auto simp: \<delta>_def divide_simps mult_less_0_iff) |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7250 |
qed |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7251 |
qed |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7252 |
|
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7253 |
corollary open_bijective_linear_image_eq: |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7254 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7255 |
assumes "linear f" "bij f" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7256 |
shows "open(f ` A) \<longleftrightarrow> open A" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7257 |
proof |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7258 |
assume "open(f ` A)" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7259 |
then have "open(f -` (f ` A))" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7260 |
using assms by (force simp add: linear_continuous_at linear_conv_bounded_linear continuous_open_vimage) |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7261 |
then show "open A" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7262 |
by (simp add: assms bij_is_inj inj_vimage_image_eq) |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7263 |
next |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7264 |
assume "open A" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7265 |
then show "open(f ` A)" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7266 |
by (simp add: assms bij_is_surj open_surjective_linear_image) |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7267 |
qed |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
7268 |
|
60420 | 7269 |
text \<open>Also bilinear functions, in composition form.\<close> |
36437 | 7270 |
|
7271 |
lemma bilinear_continuous_at_compose: |
|
53282 | 7272 |
"continuous (at x) f \<Longrightarrow> continuous (at x) g \<Longrightarrow> bounded_bilinear h \<Longrightarrow> |
7273 |
continuous (at x) (\<lambda>x. h (f x) (g x))" |
|
7274 |
unfolding continuous_at |
|
7275 |
using Lim_bilinear[of f "f x" "(at x)" g "g x" h] |
|
7276 |
by auto |
|
36437 | 7277 |
|
7278 |
lemma bilinear_continuous_within_compose: |
|
53282 | 7279 |
"continuous (at x within s) f \<Longrightarrow> continuous (at x within s) g \<Longrightarrow> bounded_bilinear h \<Longrightarrow> |
7280 |
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
|
7281 |
by (rule Limits.bounded_bilinear.continuous) |
36437 | 7282 |
|
7283 |
lemma bilinear_continuous_on_compose: |
|
53282 | 7284 |
"continuous_on s f \<Longrightarrow> continuous_on s g \<Longrightarrow> bounded_bilinear h \<Longrightarrow> |
7285 |
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
|
7286 |
by (rule Limits.bounded_bilinear.continuous_on) |
36437 | 7287 |
|
60420 | 7288 |
text \<open>Preservation of compactness and connectedness under continuous function.\<close> |
33175 | 7289 |
|
50898 | 7290 |
lemma compact_eq_openin_cover: |
7291 |
"compact S \<longleftrightarrow> |
|
7292 |
(\<forall>C. (\<forall>c\<in>C. openin (subtopology euclidean S) c) \<and> S \<subseteq> \<Union>C \<longrightarrow> |
|
7293 |
(\<exists>D\<subseteq>C. finite D \<and> S \<subseteq> \<Union>D))" |
|
7294 |
proof safe |
|
7295 |
fix C |
|
7296 |
assume "compact S" and "\<forall>c\<in>C. openin (subtopology euclidean S) c" and "S \<subseteq> \<Union>C" |
|
53282 | 7297 |
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 | 7298 |
unfolding openin_open by force+ |
60420 | 7299 |
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" |
64758
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
7300 |
by (meson compactE) |
53282 | 7301 |
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 | 7302 |
by auto |
53282 | 7303 |
then show "\<exists>D\<subseteq>C. finite D \<and> S \<subseteq> \<Union>D" .. |
50898 | 7304 |
next |
7305 |
assume 1: "\<forall>C. (\<forall>c\<in>C. openin (subtopology euclidean S) c) \<and> S \<subseteq> \<Union>C \<longrightarrow> |
|
7306 |
(\<exists>D\<subseteq>C. finite D \<and> S \<subseteq> \<Union>D)" |
|
7307 |
show "compact S" |
|
7308 |
proof (rule compactI) |
|
7309 |
fix C |
|
7310 |
let ?C = "image (\<lambda>T. S \<inter> T) C" |
|
7311 |
assume "\<forall>t\<in>C. open t" and "S \<subseteq> \<Union>C" |
|
53282 | 7312 |
then have "(\<forall>c\<in>?C. openin (subtopology euclidean S) c) \<and> S \<subseteq> \<Union>?C" |
50898 | 7313 |
unfolding openin_open by auto |
7314 |
with 1 obtain D where "D \<subseteq> ?C" and "finite D" and "S \<subseteq> \<Union>D" |
|
7315 |
by metis |
|
7316 |
let ?D = "inv_into C (\<lambda>T. S \<inter> T) ` D" |
|
7317 |
have "?D \<subseteq> C \<and> finite ?D \<and> S \<subseteq> \<Union>?D" |
|
7318 |
proof (intro conjI) |
|
60420 | 7319 |
from \<open>D \<subseteq> ?C\<close> show "?D \<subseteq> C" |
50898 | 7320 |
by (fast intro: inv_into_into) |
60420 | 7321 |
from \<open>finite D\<close> show "finite ?D" |
50898 | 7322 |
by (rule finite_imageI) |
60420 | 7323 |
from \<open>S \<subseteq> \<Union>D\<close> show "S \<subseteq> \<Union>?D" |
50898 | 7324 |
apply (rule subset_trans) |
7325 |
apply clarsimp |
|
60420 | 7326 |
apply (frule subsetD [OF \<open>D \<subseteq> ?C\<close>, THEN f_inv_into_f]) |
50898 | 7327 |
apply (erule rev_bexI, fast) |
7328 |
done |
|
7329 |
qed |
|
53282 | 7330 |
then show "\<exists>D\<subseteq>C. finite D \<and> S \<subseteq> \<Union>D" .. |
50898 | 7331 |
qed |
7332 |
qed |
|
7333 |
||
33175 | 7334 |
lemma connected_continuous_image: |
53291 | 7335 |
assumes "continuous_on s f" |
7336 |
and "connected s" |
|
33175 | 7337 |
shows "connected(f ` s)" |
53282 | 7338 |
proof - |
7339 |
{ |
|
7340 |
fix T |
|
53291 | 7341 |
assume as: |
7342 |
"T \<noteq> {}" |
|
7343 |
"T \<noteq> f ` s" |
|
7344 |
"openin (subtopology euclidean (f ` s)) T" |
|
7345 |
"closedin (subtopology euclidean (f ` s)) T" |
|
33175 | 7346 |
have "{x \<in> s. f x \<in> T} = {} \<or> {x \<in> s. f x \<in> T} = s" |
7347 |
using assms(1)[unfolded continuous_on_open, THEN spec[where x=T]] |
|
7348 |
using assms(1)[unfolded continuous_on_closed, THEN spec[where x=T]] |
|
7349 |
using assms(2)[unfolded connected_clopen, THEN spec[where x="{x \<in> s. f x \<in> T}"]] as(3,4) by auto |
|
53282 | 7350 |
then have False using as(1,2) |
7351 |
using as(4)[unfolded closedin_def topspace_euclidean_subtopology] by auto |
|
7352 |
} |
|
7353 |
then show ?thesis |
|
7354 |
unfolding connected_clopen by auto |
|
33175 | 7355 |
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
|
7356 |
|
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
7357 |
lemma connected_linear_image: |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
7358 |
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
|
7359 |
assumes "linear f" and "connected s" |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
7360 |
shows "connected (f ` s)" |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
7361 |
using connected_continuous_image assms linear_continuous_on linear_conv_bounded_linear by blast |
33175 | 7362 |
|
60420 | 7363 |
text \<open>Continuity implies uniform continuity on a compact domain.\<close> |
53282 | 7364 |
|
33175 | 7365 |
lemma compact_uniformly_continuous: |
62101 | 7366 |
fixes f :: "'a :: metric_space \<Rightarrow> 'b :: metric_space" |
53291 | 7367 |
assumes f: "continuous_on s f" |
7368 |
and s: "compact s" |
|
33175 | 7369 |
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
|
7370 |
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
|
7371 |
proof (cases, safe) |
53282 | 7372 |
fix e :: real |
7373 |
assume "0 < e" "s \<noteq> {}" |
|
63040 | 7374 |
define R where [simp]: |
7375 |
"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 | 7376 |
let ?b = "(\<lambda>(y, d). ball y (d/2))" |
7377 |
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
|
7378 |
proof safe |
53282 | 7379 |
fix y |
7380 |
assume "y \<in> s" |
|
63301 | 7381 |
from continuous_openin_preimage_gen[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
|
7382 |
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
|
7383 |
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
|
7384 |
then obtain d where "ball y d \<subseteq> T" "0 < d" |
60420 | 7385 |
using \<open>0 < e\<close> \<open>y \<in> s\<close> by (auto elim!: openE) |
7386 |
with T \<open>y \<in> s\<close> show "y \<in> (\<Union>r\<in>R. ?b r)" |
|
50944 | 7387 |
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
|
7388 |
qed auto |
50944 | 7389 |
with s obtain D where D: "finite D" "D \<subseteq> R" "s \<subseteq> (\<Union>(y, d)\<in>D. ball y (d/2))" |
7390 |
by (rule compactE_image) |
|
60420 | 7391 |
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
|
7392 |
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
|
7393 |
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
|
7394 |
proof (rule, safe) |
53282 | 7395 |
fix x x' |
7396 |
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
|
7397 |
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
|
7398 |
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
|
7399 |
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
|
7400 |
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
|
7401 |
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
|
7402 |
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
|
7403 |
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
|
7404 |
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
|
7405 |
qed auto |
33175 | 7406 |
|
60420 | 7407 |
text \<open>A uniformly convergent limit of continuous functions is continuous.\<close> |
33175 | 7408 |
|
7409 |
lemma continuous_uniform_limit: |
|
44212
4d10e7f342b1
generalize lemma continuous_uniform_limit to class metric_space
huffman
parents:
44211
diff
changeset
|
7410 |
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
|
7411 |
assumes "\<not> trivial_limit F" |
53282 | 7412 |
and "eventually (\<lambda>n. continuous_on s (f n)) F" |
7413 |
and "\<forall>e>0. eventually (\<lambda>n. \<forall>x\<in>s. dist (f n x) (g x) < e) F" |
|
33175 | 7414 |
shows "continuous_on s g" |
53282 | 7415 |
proof - |
7416 |
{ |
|
7417 |
fix x and e :: real |
|
7418 |
assume "x\<in>s" "e>0" |
|
44212
4d10e7f342b1
generalize lemma continuous_uniform_limit to class metric_space
huffman
parents:
44211
diff
changeset
|
7419 |
have "eventually (\<lambda>n. \<forall>x\<in>s. dist (f n x) (g x) < e / 3) F" |
60420 | 7420 |
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
|
7421 |
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
|
7422 |
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
|
7423 |
using assms(1) by blast |
60420 | 7424 |
have "e / 3 > 0" using \<open>e>0\<close> by auto |
33175 | 7425 |
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 | 7426 |
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 | 7427 |
{ |
7428 |
fix y |
|
7429 |
assume "y \<in> s" and "dist y x < d" |
|
7430 |
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
|
7431 |
by (rule d [rule_format]) |
53282 | 7432 |
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
|
7433 |
using dist_triangle [of "f n y" "g x" "f n x"] |
60420 | 7434 |
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
|
7435 |
by auto |
53282 | 7436 |
then have "dist (g y) (g x) < e" |
60420 | 7437 |
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
|
7438 |
using dist_triangle3 [of "g y" "g x" "f n y"] |
53282 | 7439 |
by auto |
7440 |
} |
|
7441 |
then have "\<exists>d>0. \<forall>x'\<in>s. dist x' x < d \<longrightarrow> dist (g x') (g x) < e" |
|
60420 | 7442 |
using \<open>d>0\<close> by auto |
53282 | 7443 |
} |
7444 |
then show ?thesis |
|
7445 |
unfolding continuous_on_iff by auto |
|
33175 | 7446 |
qed |
7447 |
||
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
7448 |
|
60420 | 7449 |
subsection \<open>Topological stuff lifted from and dropped to R\<close> |
33175 | 7450 |
|
7451 |
lemma open_real: |
|
53282 | 7452 |
fixes s :: "real set" |
61945 | 7453 |
shows "open s \<longleftrightarrow> (\<forall>x \<in> s. \<exists>e>0. \<forall>x'. \<bar>x' - x\<bar> < e --> x' \<in> s)" |
33175 | 7454 |
unfolding open_dist dist_norm by simp |
7455 |
||
7456 |
lemma islimpt_approachable_real: |
|
7457 |
fixes s :: "real set" |
|
61945 | 7458 |
shows "x islimpt s \<longleftrightarrow> (\<forall>e>0. \<exists>x'\<in> s. x' \<noteq> x \<and> \<bar>x' - x\<bar> < e)" |
33175 | 7459 |
unfolding islimpt_approachable dist_norm by simp |
7460 |
||
7461 |
lemma closed_real: |
|
7462 |
fixes s :: "real set" |
|
61945 | 7463 |
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 | 7464 |
unfolding closed_limpt islimpt_approachable dist_norm by simp |
7465 |
||
7466 |
lemma continuous_at_real_range: |
|
7467 |
fixes f :: "'a::real_normed_vector \<Rightarrow> real" |
|
61945 | 7468 |
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 | 7469 |
unfolding continuous_at |
7470 |
unfolding Lim_at |
|
7471 |
unfolding dist_norm |
|
7472 |
apply auto |
|
7473 |
apply (erule_tac x=e in allE) |
|
7474 |
apply auto |
|
7475 |
apply (rule_tac x=d in exI) |
|
7476 |
apply auto |
|
7477 |
apply (erule_tac x=x' in allE) |
|
7478 |
apply auto |
|
7479 |
apply (erule_tac x=e in allE) |
|
7480 |
apply auto |
|
7481 |
done |
|
33175 | 7482 |
|
7483 |
lemma continuous_on_real_range: |
|
7484 |
fixes f :: "'a::real_normed_vector \<Rightarrow> real" |
|
53282 | 7485 |
shows "continuous_on s f \<longleftrightarrow> |
61945 | 7486 |
(\<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 | 7487 |
unfolding continuous_on_iff dist_norm by simp |
33175 | 7488 |
|
60420 | 7489 |
text \<open>Hence some handy theorems on distance, diameter etc. of/from a set.\<close> |
33175 | 7490 |
|
7491 |
lemma distance_attains_sup: |
|
7492 |
assumes "compact s" "s \<noteq> {}" |
|
51346
d33de22432e2
tuned proofs (used continuity of infdist, dist and continuous_attains_sup)
hoelzl
parents:
51345
diff
changeset
|
7493 |
shows "\<exists>x\<in>s. \<forall>y\<in>s. dist a y \<le> dist a x" |
33175 | 7494 |
proof (rule continuous_attains_sup [OF assms]) |
53282 | 7495 |
{ |
7496 |
fix x |
|
7497 |
assume "x\<in>s" |
|
61973 | 7498 |
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
|
7499 |
by (intro tendsto_dist tendsto_const tendsto_ident_at) |
33175 | 7500 |
} |
53282 | 7501 |
then show "continuous_on s (dist a)" |
33175 | 7502 |
unfolding continuous_on .. |
7503 |
qed |
|
7504 |
||
60420 | 7505 |
text \<open>For \emph{minimal} distance, we only need closure, not compactness.\<close> |
33175 | 7506 |
|
7507 |
lemma distance_attains_inf: |
|
7508 |
fixes a :: "'a::heine_borel" |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
7509 |
assumes "closed s" and "s \<noteq> {}" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
7510 |
obtains x where "x\<in>s" "\<And>y. y \<in> s \<Longrightarrow> dist a x \<le> dist a y" |
53282 | 7511 |
proof - |
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
7512 |
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
|
7513 |
let ?B = "s \<inter> cball a (dist b a)" |
60420 | 7514 |
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
|
7515 |
by (auto simp: dist_commute) |
51346
d33de22432e2
tuned proofs (used continuity of infdist, dist and continuous_attains_sup)
hoelzl
parents:
51345
diff
changeset
|
7516 |
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
|
7517 |
by (auto intro!: continuous_at_imp_continuous_on continuous_dist continuous_ident continuous_const) |
33175 | 7518 |
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
|
7519 |
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
|
7520 |
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
|
7521 |
by (metis continuous_attains_inf) |
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
7522 |
with that show ?thesis by fastforce |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
7523 |
qed |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
7524 |
|
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
7525 |
|
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
7526 |
subsection \<open>Cartesian products\<close> |
33175 | 7527 |
|
7528 |
lemma bounded_Times: |
|
53282 | 7529 |
assumes "bounded s" "bounded t" |
7530 |
shows "bounded (s \<times> t)" |
|
7531 |
proof - |
|
33175 | 7532 |
obtain x y a b where "\<forall>z\<in>s. dist x z \<le> a" "\<forall>z\<in>t. dist y z \<le> b" |
7533 |
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
|
7534 |
then have "\<forall>z\<in>s \<times> t. dist (x, y) z \<le> sqrt (a\<^sup>2 + b\<^sup>2)" |
33175 | 7535 |
by (auto simp add: dist_Pair_Pair real_sqrt_le_mono add_mono power_mono) |
53282 | 7536 |
then show ?thesis unfolding bounded_any_center [where a="(x, y)"] by auto |
33175 | 7537 |
qed |
7538 |
||
7539 |
lemma mem_Times_iff: "x \<in> A \<times> B \<longleftrightarrow> fst x \<in> A \<and> snd x \<in> B" |
|
53282 | 7540 |
by (induct x) simp |
33175 | 7541 |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
7542 |
lemma seq_compact_Times: "seq_compact s \<Longrightarrow> seq_compact t \<Longrightarrow> seq_compact (s \<times> t)" |
53282 | 7543 |
unfolding seq_compact_def |
7544 |
apply clarify |
|
7545 |
apply (drule_tac x="fst \<circ> f" in spec) |
|
7546 |
apply (drule mp, simp add: mem_Times_iff) |
|
7547 |
apply (clarify, rename_tac l1 r1) |
|
7548 |
apply (drule_tac x="snd \<circ> f \<circ> r1" in spec) |
|
7549 |
apply (drule mp, simp add: mem_Times_iff) |
|
7550 |
apply (clarify, rename_tac l2 r2) |
|
7551 |
apply (rule_tac x="(l1, l2)" in rev_bexI, simp) |
|
7552 |
apply (rule_tac x="r1 \<circ> r2" in exI) |
|
7553 |
apply (rule conjI, simp add: subseq_def) |
|
7554 |
apply (drule_tac f=r2 in LIMSEQ_subseq_LIMSEQ, assumption) |
|
7555 |
apply (drule (1) tendsto_Pair) back |
|
7556 |
apply (simp add: o_def) |
|
7557 |
done |
|
7558 |
||
7559 |
lemma compact_Times: |
|
51349 | 7560 |
assumes "compact s" "compact t" |
7561 |
shows "compact (s \<times> t)" |
|
7562 |
proof (rule compactI) |
|
53282 | 7563 |
fix C |
7564 |
assume C: "\<forall>t\<in>C. open t" "s \<times> t \<subseteq> \<Union>C" |
|
51349 | 7565 |
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)" |
7566 |
proof |
|
53282 | 7567 |
fix x |
7568 |
assume "x \<in> s" |
|
51349 | 7569 |
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 | 7570 |
proof |
7571 |
fix y |
|
7572 |
assume "y \<in> t" |
|
60420 | 7573 |
with \<open>x \<in> s\<close> C obtain c where "c \<in> C" "(x, y) \<in> c" "open c" by auto |
51349 | 7574 |
then show "?P y" by (auto elim!: open_prod_elim) |
7575 |
qed |
|
7576 |
then obtain a b c where b: "\<And>y. y \<in> t \<Longrightarrow> open (b y)" |
|
7577 |
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" |
|
7578 |
by metis |
|
7579 |
then have "\<forall>y\<in>t. open (b y)" "t \<subseteq> (\<Union>y\<in>t. b y)" by auto |
|
60420 | 7580 |
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 | 7581 |
by auto |
53374
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
53291
diff
changeset
|
7582 |
moreover from D c have "(\<Inter>y\<in>D. a y) \<times> t \<subseteq> (\<Union>y\<in>D. c y)" |
51349 | 7583 |
by (fastforce simp: subset_eq) |
7584 |
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
|
7585 |
using c by (intro exI[of _ "c`D"] exI[of _ "\<Inter>(a`D)"] conjI) (auto intro!: open_INT) |
51349 | 7586 |
qed |
7587 |
then obtain a d where a: "\<forall>x\<in>s. open (a x)" "s \<subseteq> (\<Union>x\<in>s. a x)" |
|
7588 |
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" |
|
7589 |
unfolding subset_eq UN_iff by metis |
|
53282 | 7590 |
moreover |
60420 | 7591 |
from compactE_image[OF \<open>compact s\<close> a] |
53282 | 7592 |
obtain e where e: "e \<subseteq> s" "finite e" and s: "s \<subseteq> (\<Union>x\<in>e. a x)" |
7593 |
by auto |
|
51349 | 7594 |
moreover |
53282 | 7595 |
{ |
7596 |
from s have "s \<times> t \<subseteq> (\<Union>x\<in>e. a x \<times> t)" |
|
7597 |
by auto |
|
7598 |
also have "\<dots> \<subseteq> (\<Union>x\<in>e. \<Union>d x)" |
|
60420 | 7599 |
using d \<open>e \<subseteq> s\<close> by (intro UN_mono) auto |
53282 | 7600 |
finally have "s \<times> t \<subseteq> (\<Union>x\<in>e. \<Union>d x)" . |
7601 |
} |
|
51349 | 7602 |
ultimately show "\<exists>C'\<subseteq>C. finite C' \<and> s \<times> t \<subseteq> \<Union>C'" |
7603 |
by (intro exI[of _ "(\<Union>x\<in>e. d x)"]) (auto simp add: subset_eq) |
|
7604 |
qed |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
7605 |
|
60420 | 7606 |
text\<open>Hence some useful properties follow quite easily.\<close> |
33175 | 7607 |
|
7608 |
lemma compact_scaling: |
|
7609 |
fixes s :: "'a::real_normed_vector set" |
|
53282 | 7610 |
assumes "compact s" |
7611 |
shows "compact ((\<lambda>x. c *\<^sub>R x) ` s)" |
|
7612 |
proof - |
|
33175 | 7613 |
let ?f = "\<lambda>x. scaleR c x" |
53282 | 7614 |
have *: "bounded_linear ?f" by (rule bounded_linear_scaleR_right) |
7615 |
show ?thesis |
|
7616 |
using compact_continuous_image[of s ?f] continuous_at_imp_continuous_on[of s ?f] |
|
7617 |
using linear_continuous_at[OF *] assms |
|
7618 |
by auto |
|
33175 | 7619 |
qed |
7620 |
||
7621 |
lemma compact_negations: |
|
7622 |
fixes s :: "'a::real_normed_vector set" |
|
53282 | 7623 |
assumes "compact s" |
53291 | 7624 |
shows "compact ((\<lambda>x. - x) ` s)" |
33175 | 7625 |
using compact_scaling [OF assms, of "- 1"] by auto |
7626 |
||
7627 |
lemma compact_sums: |
|
7628 |
fixes s t :: "'a::real_normed_vector set" |
|
53291 | 7629 |
assumes "compact s" |
7630 |
and "compact t" |
|
53282 | 7631 |
shows "compact {x + y | x y. x \<in> s \<and> y \<in> t}" |
7632 |
proof - |
|
7633 |
have *: "{x + y | x y. x \<in> s \<and> y \<in> t} = (\<lambda>z. fst z + snd z) ` (s \<times> t)" |
|
7634 |
apply auto |
|
7635 |
unfolding image_iff |
|
7636 |
apply (rule_tac x="(xa, y)" in bexI) |
|
7637 |
apply auto |
|
7638 |
done |
|
33175 | 7639 |
have "continuous_on (s \<times> t) (\<lambda>z. fst z + snd z)" |
7640 |
unfolding continuous_on by (rule ballI) (intro tendsto_intros) |
|
53282 | 7641 |
then show ?thesis |
7642 |
unfolding * using compact_continuous_image compact_Times [OF assms] by auto |
|
33175 | 7643 |
qed |
7644 |
||
7645 |
lemma compact_differences: |
|
7646 |
fixes s t :: "'a::real_normed_vector set" |
|
53291 | 7647 |
assumes "compact s" |
7648 |
and "compact t" |
|
7649 |
shows "compact {x - y | x y. x \<in> s \<and> y \<in> t}" |
|
33175 | 7650 |
proof- |
7651 |
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 | 7652 |
apply auto |
7653 |
apply (rule_tac x= xa in exI) |
|
7654 |
apply auto |
|
7655 |
done |
|
7656 |
then show ?thesis |
|
7657 |
using compact_sums[OF assms(1) compact_negations[OF assms(2)]] by auto |
|
33175 | 7658 |
qed |
7659 |
||
7660 |
lemma compact_translation: |
|
7661 |
fixes s :: "'a::real_normed_vector set" |
|
53282 | 7662 |
assumes "compact s" |
7663 |
shows "compact ((\<lambda>x. a + x) ` s)" |
|
7664 |
proof - |
|
7665 |
have "{x + y |x y. x \<in> s \<and> y \<in> {a}} = (\<lambda>x. a + x) ` s" |
|
7666 |
by auto |
|
7667 |
then show ?thesis |
|
7668 |
using compact_sums[OF assms compact_sing[of a]] by auto |
|
33175 | 7669 |
qed |
7670 |
||
7671 |
lemma compact_affinity: |
|
7672 |
fixes s :: "'a::real_normed_vector set" |
|
53282 | 7673 |
assumes "compact s" |
7674 |
shows "compact ((\<lambda>x. a + c *\<^sub>R x) ` s)" |
|
7675 |
proof - |
|
7676 |
have "op + a ` op *\<^sub>R c ` s = (\<lambda>x. a + c *\<^sub>R x) ` s" |
|
7677 |
by auto |
|
7678 |
then show ?thesis |
|
7679 |
using compact_translation[OF compact_scaling[OF assms], of a c] by auto |
|
33175 | 7680 |
qed |
7681 |
||
60420 | 7682 |
text \<open>Hence we get the following.\<close> |
33175 | 7683 |
|
7684 |
lemma compact_sup_maxdistance: |
|
50973
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
7685 |
fixes s :: "'a::metric_space set" |
53291 | 7686 |
assumes "compact s" |
7687 |
and "s \<noteq> {}" |
|
50973
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
7688 |
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 | 7689 |
proof - |
7690 |
have "compact (s \<times> s)" |
|
60420 | 7691 |
using \<open>compact s\<close> by (intro compact_Times) |
53282 | 7692 |
moreover have "s \<times> s \<noteq> {}" |
60420 | 7693 |
using \<open>s \<noteq> {}\<close> by auto |
50973
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
7694 |
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
|
7695 |
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
|
7696 |
ultimately show ?thesis |
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
7697 |
using continuous_attains_sup[of "s \<times> s" "\<lambda>x. dist (fst x) (snd x)"] by auto |
33175 | 7698 |
qed |
7699 |
||
60420 | 7700 |
text \<open>We can state this in terms of diameter of a set.\<close> |
33175 | 7701 |
|
54260
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
7702 |
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
|
7703 |
"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
|
7704 |
|
63881
b746b19197bd
lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents:
63627
diff
changeset
|
7705 |
lemma diameter_le: |
b746b19197bd
lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents:
63627
diff
changeset
|
7706 |
assumes "S \<noteq> {} \<or> 0 \<le> d" |
b746b19197bd
lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents:
63627
diff
changeset
|
7707 |
and no: "\<And>x y. \<lbrakk>x \<in> S; y \<in> S\<rbrakk> \<Longrightarrow> norm(x - y) \<le> d" |
b746b19197bd
lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents:
63627
diff
changeset
|
7708 |
shows "diameter S \<le> d" |
b746b19197bd
lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents:
63627
diff
changeset
|
7709 |
using assms |
b746b19197bd
lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents:
63627
diff
changeset
|
7710 |
by (auto simp: dist_norm diameter_def intro: cSUP_least) |
b746b19197bd
lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents:
63627
diff
changeset
|
7711 |
|
50973
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
7712 |
lemma diameter_bounded_bound: |
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
7713 |
fixes s :: "'a :: metric_space set" |
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
7714 |
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
|
7715 |
shows "dist x y \<le> diameter s" |
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
7716 |
proof - |
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
7717 |
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
|
7718 |
unfolding bounded_def by auto |
61424
c3658c18b7bc
prod_case as canonical name for product type eliminator
haftmann
parents:
61306
diff
changeset
|
7719 |
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
|
7720 |
proof (intro bdd_aboveI, safe) |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
7721 |
fix a b |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
7722 |
assume "a \<in> s" "b \<in> s" |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
7723 |
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
|
7724 |
show "dist a b \<le> 2 * d" |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
7725 |
by (simp add: dist_commute) |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
7726 |
qed |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
7727 |
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
|
7728 |
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
|
7729 |
by (rule cSUP_upper2) simp |
60420 | 7730 |
with \<open>x \<in> s\<close> show ?thesis |
50973
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
7731 |
by (auto simp add: diameter_def) |
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
7732 |
qed |
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
7733 |
|
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
7734 |
lemma diameter_lower_bounded: |
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
7735 |
fixes s :: "'a :: metric_space set" |
53282 | 7736 |
assumes s: "bounded s" |
7737 |
and d: "0 < d" "d < diameter s" |
|
50973
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
7738 |
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
|
7739 |
proof (rule ccontr) |
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
7740 |
assume contr: "\<not> ?thesis" |
54260
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
7741 |
moreover have "s \<noteq> {}" |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
7742 |
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
|
7743 |
ultimately have "diameter s \<le> d" |
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
7744 |
by (auto simp: not_less diameter_def intro!: cSUP_least) |
60420 | 7745 |
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
|
7746 |
qed |
33175 | 7747 |
|
7748 |
lemma diameter_bounded: |
|
7749 |
assumes "bounded s" |
|
50973
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
7750 |
shows "\<forall>x\<in>s. \<forall>y\<in>s. dist x y \<le> diameter s" |
53291 | 7751 |
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
|
7752 |
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
|
7753 |
by auto |
33175 | 7754 |
|
7755 |
lemma diameter_compact_attained: |
|
53291 | 7756 |
assumes "compact s" |
7757 |
and "s \<noteq> {}" |
|
50973
4a2c82644889
generalized diameter from real_normed_vector to metric_space
hoelzl
parents:
50972
diff
changeset
|
7758 |
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
|
7759 |
proof - |
53282 | 7760 |
have b: "bounded s" using assms(1) |
7761 |
by (rule compact_imp_bounded) |
|
53291 | 7762 |
then obtain x y where xys: "x\<in>s" "y\<in>s" |
7763 |
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
|
7764 |
using compact_sup_maxdistance[OF assms] by auto |
53282 | 7765 |
then have "diameter s \<le> dist x y" |
7766 |
unfolding diameter_def |
|
7767 |
apply clarsimp |
|
54260
6a967667fd45
use INF and SUP on conditionally complete lattices in multivariate analysis
hoelzl
parents:
54259
diff
changeset
|
7768 |
apply (rule cSUP_least) |
53282 | 7769 |
apply fast+ |
7770 |
done |
|
7771 |
then show ?thesis |
|
36362
06475a1547cb
fix lots of looping simp calls and other warnings
huffman
parents:
36360
diff
changeset
|
7772 |
by (metis b diameter_bounded_bound order_antisym xys) |
33175 | 7773 |
qed |
7774 |
||
60420 | 7775 |
text \<open>Related results with closure as the conclusion.\<close> |
33175 | 7776 |
|
7777 |
lemma closed_scaling: |
|
7778 |
fixes s :: "'a::real_normed_vector set" |
|
53282 | 7779 |
assumes "closed s" |
7780 |
shows "closed ((\<lambda>x. c *\<^sub>R x) ` s)" |
|
53813 | 7781 |
proof (cases "c = 0") |
7782 |
case True then show ?thesis |
|
7783 |
by (auto simp add: image_constant_conv) |
|
33175 | 7784 |
next |
7785 |
case False |
|
53813 | 7786 |
from assms have "closed ((\<lambda>x. inverse c *\<^sub>R x) -` s)" |
7787 |
by (simp add: continuous_closed_vimage) |
|
7788 |
also have "(\<lambda>x. inverse c *\<^sub>R x) -` s = (\<lambda>x. c *\<^sub>R x) ` s" |
|
60420 | 7789 |
using \<open>c \<noteq> 0\<close> by (auto elim: image_eqI [rotated]) |
53813 | 7790 |
finally show ?thesis . |
33175 | 7791 |
qed |
7792 |
||
7793 |
lemma closed_negations: |
|
7794 |
fixes s :: "'a::real_normed_vector set" |
|
53282 | 7795 |
assumes "closed s" |
7796 |
shows "closed ((\<lambda>x. -x) ` s)" |
|
33175 | 7797 |
using closed_scaling[OF assms, of "- 1"] by simp |
7798 |
||
7799 |
lemma compact_closed_sums: |
|
7800 |
fixes s :: "'a::real_normed_vector set" |
|
53282 | 7801 |
assumes "compact s" and "closed t" |
7802 |
shows "closed {x + y | x y. x \<in> s \<and> y \<in> t}" |
|
7803 |
proof - |
|
33175 | 7804 |
let ?S = "{x + y |x y. x \<in> s \<and> y \<in> t}" |
53282 | 7805 |
{ |
7806 |
fix x l |
|
61973 | 7807 |
assume as: "\<forall>n. x n \<in> ?S" "(x \<longlongrightarrow> l) sequentially" |
53282 | 7808 |
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 | 7809 |
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 | 7810 |
obtain l' r where "l'\<in>s" and r: "subseq r" and lr: "(((\<lambda>n. fst (f n)) \<circ> r) \<longlongrightarrow> l') sequentially" |
33175 | 7811 |
using assms(1)[unfolded compact_def, THEN spec[where x="\<lambda> n. fst (f n)"]] using f(2) by auto |
61973 | 7812 |
have "((\<lambda>n. snd (f (r n))) \<longlongrightarrow> l - l') sequentially" |
53282 | 7813 |
using tendsto_diff[OF LIMSEQ_subseq_LIMSEQ[OF as(2) r] lr] and f(1) |
7814 |
unfolding o_def |
|
7815 |
by auto |
|
7816 |
then have "l - l' \<in> t" |
|
53291 | 7817 |
using assms(2)[unfolded closed_sequential_limits, |
7818 |
THEN spec[where x="\<lambda> n. snd (f (r n))"], |
|
7819 |
THEN spec[where x="l - l'"]] |
|
53282 | 7820 |
using f(3) |
7821 |
by auto |
|
7822 |
then have "l \<in> ?S" |
|
60420 | 7823 |
using \<open>l' \<in> s\<close> |
53282 | 7824 |
apply auto |
7825 |
apply (rule_tac x=l' in exI) |
|
7826 |
apply (rule_tac x="l - l'" in exI) |
|
7827 |
apply auto |
|
7828 |
done |
|
33175 | 7829 |
} |
53282 | 7830 |
then show ?thesis |
7831 |
unfolding closed_sequential_limits by fast |
|
33175 | 7832 |
qed |
7833 |
||
7834 |
lemma closed_compact_sums: |
|
7835 |
fixes s t :: "'a::real_normed_vector set" |
|
53291 | 7836 |
assumes "closed s" |
7837 |
and "compact t" |
|
33175 | 7838 |
shows "closed {x + y | x y. x \<in> s \<and> y \<in> t}" |
53282 | 7839 |
proof - |
7840 |
have "{x + y |x y. x \<in> t \<and> y \<in> s} = {x + y |x y. x \<in> s \<and> y \<in> t}" |
|
7841 |
apply auto |
|
7842 |
apply (rule_tac x=y in exI) |
|
7843 |
apply auto |
|
7844 |
apply (rule_tac x=y in exI) |
|
7845 |
apply auto |
|
7846 |
done |
|
7847 |
then show ?thesis |
|
7848 |
using compact_closed_sums[OF assms(2,1)] by simp |
|
33175 | 7849 |
qed |
7850 |
||
7851 |
lemma compact_closed_differences: |
|
7852 |
fixes s t :: "'a::real_normed_vector set" |
|
53291 | 7853 |
assumes "compact s" |
7854 |
and "closed t" |
|
33175 | 7855 |
shows "closed {x - y | x y. x \<in> s \<and> y \<in> t}" |
53282 | 7856 |
proof - |
33175 | 7857 |
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 | 7858 |
apply auto |
7859 |
apply (rule_tac x=xa in exI) |
|
7860 |
apply auto |
|
7861 |
apply (rule_tac x=xa in exI) |
|
7862 |
apply auto |
|
7863 |
done |
|
7864 |
then show ?thesis |
|
7865 |
using compact_closed_sums[OF assms(1) closed_negations[OF assms(2)]] by auto |
|
33175 | 7866 |
qed |
7867 |
||
7868 |
lemma closed_compact_differences: |
|
7869 |
fixes s t :: "'a::real_normed_vector set" |
|
53291 | 7870 |
assumes "closed s" |
7871 |
and "compact t" |
|
33175 | 7872 |
shows "closed {x - y | x y. x \<in> s \<and> y \<in> t}" |
53282 | 7873 |
proof - |
33175 | 7874 |
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 | 7875 |
apply auto |
7876 |
apply (rule_tac x=xa in exI) |
|
7877 |
apply auto |
|
7878 |
apply (rule_tac x=xa in exI) |
|
7879 |
apply auto |
|
7880 |
done |
|
7881 |
then show ?thesis |
|
7882 |
using closed_compact_sums[OF assms(1) compact_negations[OF assms(2)]] by simp |
|
33175 | 7883 |
qed |
7884 |
||
7885 |
lemma closed_translation: |
|
7886 |
fixes a :: "'a::real_normed_vector" |
|
53282 | 7887 |
assumes "closed s" |
7888 |
shows "closed ((\<lambda>x. a + x) ` s)" |
|
7889 |
proof - |
|
33175 | 7890 |
have "{a + y |y. y \<in> s} = (op + a ` s)" by auto |
53282 | 7891 |
then show ?thesis |
7892 |
using compact_closed_sums[OF compact_sing[of a] assms] by auto |
|
33175 | 7893 |
qed |
7894 |
||
34105 | 7895 |
lemma translation_Compl: |
7896 |
fixes a :: "'a::ab_group_add" |
|
7897 |
shows "(\<lambda>x. a + x) ` (- t) = - ((\<lambda>x. a + x) ` t)" |
|
53282 | 7898 |
apply (auto simp add: image_iff) |
7899 |
apply (rule_tac x="x - a" in bexI) |
|
7900 |
apply auto |
|
7901 |
done |
|
34105 | 7902 |
|
33175 | 7903 |
lemma translation_UNIV: |
53282 | 7904 |
fixes a :: "'a::ab_group_add" |
7905 |
shows "range (\<lambda>x. a + x) = UNIV" |
|
7906 |
apply (auto simp add: image_iff) |
|
7907 |
apply (rule_tac x="x - a" in exI) |
|
7908 |
apply auto |
|
7909 |
done |
|
33175 | 7910 |
|
7911 |
lemma translation_diff: |
|
7912 |
fixes a :: "'a::ab_group_add" |
|
7913 |
shows "(\<lambda>x. a + x) ` (s - t) = ((\<lambda>x. a + x) ` s) - ((\<lambda>x. a + x) ` t)" |
|
7914 |
by auto |
|
7915 |
||
63114
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7916 |
lemma translation_Int: |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7917 |
fixes a :: "'a::ab_group_add" |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7918 |
shows "(\<lambda>x. a + x) ` (s \<inter> t) = ((\<lambda>x. a + x) ` s) \<inter> ((\<lambda>x. a + x) ` t)" |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7919 |
by auto |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7920 |
|
33175 | 7921 |
lemma closure_translation: |
7922 |
fixes a :: "'a::real_normed_vector" |
|
7923 |
shows "closure ((\<lambda>x. a + x) ` s) = (\<lambda>x. a + x) ` (closure s)" |
|
53282 | 7924 |
proof - |
7925 |
have *: "op + a ` (- s) = - op + a ` s" |
|
7926 |
apply auto |
|
7927 |
unfolding image_iff |
|
7928 |
apply (rule_tac x="x - a" in bexI) |
|
7929 |
apply auto |
|
7930 |
done |
|
7931 |
show ?thesis |
|
7932 |
unfolding closure_interior translation_Compl |
|
7933 |
using interior_translation[of a "- s"] |
|
7934 |
unfolding * |
|
7935 |
by auto |
|
33175 | 7936 |
qed |
7937 |
||
7938 |
lemma frontier_translation: |
|
7939 |
fixes a :: "'a::real_normed_vector" |
|
7940 |
shows "frontier((\<lambda>x. a + x) ` s) = (\<lambda>x. a + x) ` (frontier s)" |
|
53282 | 7941 |
unfolding frontier_def translation_diff interior_translation closure_translation |
7942 |
by auto |
|
33175 | 7943 |
|
63114
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7944 |
lemma sphere_translation: |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7945 |
fixes a :: "'n::euclidean_space" |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7946 |
shows "sphere (a+c) r = op+a ` sphere c r" |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7947 |
apply safe |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7948 |
apply (rule_tac x="x-a" in image_eqI) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7949 |
apply (auto simp: dist_norm algebra_simps) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7950 |
done |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7951 |
|
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7952 |
lemma cball_translation: |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7953 |
fixes a :: "'n::euclidean_space" |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7954 |
shows "cball (a+c) r = op+a ` cball c r" |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7955 |
apply safe |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7956 |
apply (rule_tac x="x-a" in image_eqI) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7957 |
apply (auto simp: dist_norm algebra_simps) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7958 |
done |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7959 |
|
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7960 |
lemma ball_translation: |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7961 |
fixes a :: "'n::euclidean_space" |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7962 |
shows "ball (a+c) r = op+a ` ball c r" |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7963 |
apply safe |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7964 |
apply (rule_tac x="x-a" in image_eqI) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7965 |
apply (auto simp: dist_norm algebra_simps) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7966 |
done |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
7967 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
7968 |
|
60420 | 7969 |
subsection \<open>Separation between points and sets\<close> |
33175 | 7970 |
|
7971 |
lemma separate_point_closed: |
|
7972 |
fixes s :: "'a::heine_borel set" |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
7973 |
assumes "closed s" and "a \<notin> s" |
53282 | 7974 |
shows "\<exists>d>0. \<forall>x\<in>s. d \<le> dist a x" |
7975 |
proof (cases "s = {}") |
|
33175 | 7976 |
case True |
53282 | 7977 |
then show ?thesis by(auto intro!: exI[where x=1]) |
33175 | 7978 |
next |
7979 |
case False |
|
53282 | 7980 |
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
|
7981 |
using \<open>s \<noteq> {}\<close> by (blast intro: distance_attains_inf [of s a]) |
60420 | 7982 |
with \<open>x\<in>s\<close> show ?thesis using dist_pos_lt[of a x] and\<open>a \<notin> s\<close> |
53282 | 7983 |
by blast |
33175 | 7984 |
qed |
7985 |
||
7986 |
lemma separate_compact_closed: |
|
50949 | 7987 |
fixes s t :: "'a::heine_borel set" |
53282 | 7988 |
assumes "compact s" |
7989 |
and t: "closed t" "s \<inter> t = {}" |
|
33175 | 7990 |
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
|
7991 |
proof cases |
d33de22432e2
tuned proofs (used continuity of infdist, dist and continuous_attains_sup)
hoelzl
parents:
51345
diff
changeset
|
7992 |
assume "s \<noteq> {} \<and> t \<noteq> {}" |
d33de22432e2
tuned proofs (used continuity of infdist, dist and continuous_attains_sup)
hoelzl
parents:
51345
diff
changeset
|
7993 |
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
|
7994 |
let ?inf = "\<lambda>x. infdist x t" |
d33de22432e2
tuned proofs (used continuity of infdist, dist and continuous_attains_sup)
hoelzl
parents:
51345
diff
changeset
|
7995 |
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
|
7996 |
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
|
7997 |
then obtain x where x: "x \<in> s" "\<forall>y\<in>s. ?inf x \<le> ?inf y" |
60420 | 7998 |
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
|
7999 |
then have "0 < ?inf x" |
60420 | 8000 |
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
|
8001 |
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
|
8002 |
using x by (auto intro: order_trans infdist_le) |
53282 | 8003 |
ultimately show ?thesis by auto |
51346
d33de22432e2
tuned proofs (used continuity of infdist, dist and continuous_attains_sup)
hoelzl
parents:
51345
diff
changeset
|
8004 |
qed (auto intro!: exI[of _ 1]) |
33175 | 8005 |
|
8006 |
lemma separate_closed_compact: |
|
50949 | 8007 |
fixes s t :: "'a::heine_borel set" |
53282 | 8008 |
assumes "closed s" |
8009 |
and "compact t" |
|
8010 |
and "s \<inter> t = {}" |
|
33175 | 8011 |
shows "\<exists>d>0. \<forall>x\<in>s. \<forall>y\<in>t. d \<le> dist x y" |
53282 | 8012 |
proof - |
8013 |
have *: "t \<inter> s = {}" |
|
8014 |
using assms(3) by auto |
|
8015 |
show ?thesis |
|
8016 |
using separate_compact_closed[OF assms(2,1) *] |
|
8017 |
apply auto |
|
8018 |
apply (rule_tac x=d in exI) |
|
8019 |
apply auto |
|
8020 |
apply (erule_tac x=y in ballE) |
|
8021 |
apply (auto simp add: dist_commute) |
|
8022 |
done |
|
33175 | 8023 |
qed |
8024 |
||
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
8025 |
|
60420 | 8026 |
subsection \<open>Closure of halfspaces and hyperplanes\<close> |
33175 | 8027 |
|
44219
f738e3200e24
generalize lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq to class topological_space
huffman
parents:
44216
diff
changeset
|
8028 |
lemma isCont_open_vimage: |
53282 | 8029 |
assumes "\<And>x. isCont f x" |
8030 |
and "open s" |
|
8031 |
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
|
8032 |
proof - |
f738e3200e24
generalize lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq to class topological_space
huffman
parents:
44216
diff
changeset
|
8033 |
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
|
8034 |
unfolding isCont_def continuous_on_def by simp |
53282 | 8035 |
then have "open {x \<in> UNIV. f x \<in> s}" |
60420 | 8036 |
using open_UNIV \<open>open s\<close> by (rule continuous_open_preimage) |
53282 | 8037 |
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
|
8038 |
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
|
8039 |
qed |
f738e3200e24
generalize lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq to class topological_space
huffman
parents:
44216
diff
changeset
|
8040 |
|
f738e3200e24
generalize lemmas open_Collect_less, closed_Collect_le, closed_Collect_eq to class topological_space
huffman
parents:
44216
diff
changeset
|
8041 |
lemma isCont_closed_vimage: |
53282 | 8042 |
assumes "\<And>x. isCont f x" |
8043 |
and "closed s" |
|
8044 |
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
|
8045 |
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
|
8046 |
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
|
8047 |
|
60974
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
8048 |
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
|
8049 |
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
|
8050 |
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
|
8051 |
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
|
8052 |
proof - |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
8053 |
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
|
8054 |
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
|
8055 |
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
|
8056 |
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
|
8057 |
by auto |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
8058 |
finally show ?thesis . |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
8059 |
qed |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
8060 |
|
33175 | 8061 |
lemma continuous_at_inner: "continuous (at x) (inner a)" |
8062 |
unfolding continuous_at by (intro tendsto_intros) |
|
8063 |
||
8064 |
lemma closed_halfspace_le: "closed {x. inner a x \<le> b}" |
|
63332 | 8065 |
by (simp add: closed_Collect_le continuous_on_inner continuous_on_const continuous_on_id) |
33175 | 8066 |
|
8067 |
lemma closed_halfspace_ge: "closed {x. inner a x \<ge> b}" |
|
63332 | 8068 |
by (simp add: closed_Collect_le continuous_on_inner continuous_on_const continuous_on_id) |
33175 | 8069 |
|
8070 |
lemma closed_hyperplane: "closed {x. inner a x = b}" |
|
63332 | 8071 |
by (simp add: closed_Collect_eq continuous_on_inner continuous_on_const continuous_on_id) |
33175 | 8072 |
|
53282 | 8073 |
lemma closed_halfspace_component_le: "closed {x::'a::euclidean_space. x\<bullet>i \<le> a}" |
63332 | 8074 |
by (simp add: closed_Collect_le continuous_on_inner continuous_on_const continuous_on_id) |
33175 | 8075 |
|
53282 | 8076 |
lemma closed_halfspace_component_ge: "closed {x::'a::euclidean_space. x\<bullet>i \<ge> a}" |
63332 | 8077 |
by (simp add: closed_Collect_le continuous_on_inner continuous_on_const continuous_on_id) |
33175 | 8078 |
|
53813 | 8079 |
lemma closed_interval_left: |
8080 |
fixes b :: "'a::euclidean_space" |
|
8081 |
shows "closed {x::'a. \<forall>i\<in>Basis. x\<bullet>i \<le> b\<bullet>i}" |
|
63332 | 8082 |
by (simp add: Collect_ball_eq closed_INT closed_Collect_le continuous_on_inner continuous_on_const continuous_on_id) |
53813 | 8083 |
|
8084 |
lemma closed_interval_right: |
|
8085 |
fixes a :: "'a::euclidean_space" |
|
8086 |
shows "closed {x::'a. \<forall>i\<in>Basis. a\<bullet>i \<le> x\<bullet>i}" |
|
63332 | 8087 |
by (simp add: Collect_ball_eq closed_INT closed_Collect_le continuous_on_inner continuous_on_const continuous_on_id) |
53813 | 8088 |
|
60974
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
8089 |
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
|
8090 |
fixes a::real |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
8091 |
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
|
8092 |
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
|
8093 |
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
|
8094 |
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
|
8095 |
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
|
8096 |
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
|
8097 |
by force |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
8098 |
|
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
8099 |
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
|
8100 |
fixes a::real |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
8101 |
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
|
8102 |
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
|
8103 |
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
|
8104 |
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
|
8105 |
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
|
8106 |
by force |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
8107 |
|
60420 | 8108 |
text \<open>Openness of halfspaces.\<close> |
33175 | 8109 |
|
8110 |
lemma open_halfspace_lt: "open {x. inner a x < b}" |
|
63332 | 8111 |
by (simp add: open_Collect_less continuous_on_inner continuous_on_const continuous_on_id) |
33175 | 8112 |
|
8113 |
lemma open_halfspace_gt: "open {x. inner a x > b}" |
|
63332 | 8114 |
by (simp add: open_Collect_less continuous_on_inner continuous_on_const continuous_on_id) |
33175 | 8115 |
|
53282 | 8116 |
lemma open_halfspace_component_lt: "open {x::'a::euclidean_space. x\<bullet>i < a}" |
63332 | 8117 |
by (simp add: open_Collect_less continuous_on_inner continuous_on_const continuous_on_id) |
33175 | 8118 |
|
53282 | 8119 |
lemma open_halfspace_component_gt: "open {x::'a::euclidean_space. x\<bullet>i > a}" |
63332 | 8120 |
by (simp add: open_Collect_less continuous_on_inner continuous_on_const continuous_on_id) |
33175 | 8121 |
|
60420 | 8122 |
text \<open>This gives a simple derivation of limit component bounds.\<close> |
33175 | 8123 |
|
53282 | 8124 |
lemma Lim_component_le: |
8125 |
fixes f :: "'a \<Rightarrow> 'b::euclidean_space" |
|
61973 | 8126 |
assumes "(f \<longlongrightarrow> l) net" |
53282 | 8127 |
and "\<not> (trivial_limit net)" |
8128 |
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
|
8129 |
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
|
8130 |
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
|
8131 |
|
53282 | 8132 |
lemma Lim_component_ge: |
8133 |
fixes f :: "'a \<Rightarrow> 'b::euclidean_space" |
|
61973 | 8134 |
assumes "(f \<longlongrightarrow> l) net" |
53282 | 8135 |
and "\<not> (trivial_limit net)" |
8136 |
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
|
8137 |
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
|
8138 |
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
|
8139 |
|
53282 | 8140 |
lemma Lim_component_eq: |
8141 |
fixes f :: "'a \<Rightarrow> 'b::euclidean_space" |
|
61973 | 8142 |
assumes net: "(f \<longlongrightarrow> l) net" "\<not> trivial_limit net" |
53282 | 8143 |
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
|
8144 |
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
|
8145 |
using ev[unfolded order_eq_iff eventually_conj_iff] |
53282 | 8146 |
using Lim_component_ge[OF net, of b i] |
8147 |
using Lim_component_le[OF net, of i b] |
|
8148 |
by auto |
|
8149 |
||
60420 | 8150 |
text \<open>Limits relative to a union.\<close> |
33175 | 8151 |
|
8152 |
lemma eventually_within_Un: |
|
53282 | 8153 |
"eventually P (at x within (s \<union> t)) \<longleftrightarrow> |
8154 |
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
|
8155 |
unfolding eventually_at_filter |
33175 | 8156 |
by (auto elim!: eventually_rev_mp) |
8157 |
||
8158 |
lemma Lim_within_union: |
|
61973 | 8159 |
"(f \<longlongrightarrow> l) (at x within (s \<union> t)) \<longleftrightarrow> |
8160 |
(f \<longlongrightarrow> l) (at x within s) \<and> (f \<longlongrightarrow> l) (at x within t)" |
|
33175 | 8161 |
unfolding tendsto_def |
8162 |
by (auto simp add: eventually_within_Un) |
|
8163 |
||
36442 | 8164 |
lemma Lim_topological: |
61973 | 8165 |
"(f \<longlongrightarrow> l) net \<longleftrightarrow> |
53282 | 8166 |
trivial_limit net \<or> (\<forall>S. open S \<longrightarrow> l \<in> S \<longrightarrow> eventually (\<lambda>x. f x \<in> S) net)" |
36442 | 8167 |
unfolding tendsto_def trivial_limit_eq by auto |
8168 |
||
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
8169 |
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
|
8170 |
|
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
|
8171 |
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
|
8172 |
"\<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
|
8173 |
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
|
8174 |
\<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
|
8175 |
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
|
8176 |
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
|
8177 |
|
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
8178 |
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
|
8179 |
"\<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
|
8180 |
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
|
8181 |
\<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
|
8182 |
\<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
|
8183 |
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
|
8184 |
|
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
|
8185 |
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
|
8186 |
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
|
8187 |
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
|
8188 |
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
|
8189 |
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
|
8190 |
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
|
8191 |
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
|
8192 |
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
|
8193 |
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
|
8194 |
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
|
8195 |
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
|
8196 |
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
|
8197 |
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
|
8198 |
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
|
8199 |
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
|
8200 |
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
|
8201 |
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
|
8202 |
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
|
8203 |
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
|
8204 |
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
|
8205 |
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
|
8206 |
|
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
8207 |
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
|
8208 |
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
|
8209 |
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
|
8210 |
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
|
8211 |
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
|
8212 |
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
|
8213 |
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
|
8214 |
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
|
8215 |
|
60420 | 8216 |
text\<open>Some more convenient intermediate-value theorem formulations.\<close> |
33175 | 8217 |
|
8218 |
lemma connected_ivt_hyperplane: |
|
53291 | 8219 |
assumes "connected s" |
8220 |
and "x \<in> s" |
|
8221 |
and "y \<in> s" |
|
8222 |
and "inner a x \<le> b" |
|
8223 |
and "b \<le> inner a y" |
|
33175 | 8224 |
shows "\<exists>z \<in> s. inner a z = b" |
53282 | 8225 |
proof (rule ccontr) |
33175 | 8226 |
assume as:"\<not> (\<exists>z\<in>s. inner a z = b)" |
8227 |
let ?A = "{x. inner a x < b}" |
|
8228 |
let ?B = "{x. inner a x > b}" |
|
53282 | 8229 |
have "open ?A" "open ?B" |
8230 |
using open_halfspace_lt and open_halfspace_gt by auto |
|
53291 | 8231 |
moreover |
8232 |
have "?A \<inter> ?B = {}" by auto |
|
8233 |
moreover |
|
8234 |
have "s \<subseteq> ?A \<union> ?B" using as by auto |
|
8235 |
ultimately |
|
8236 |
show False |
|
53282 | 8237 |
using assms(1)[unfolded connected_def not_ex, |
8238 |
THEN spec[where x="?A"], THEN spec[where x="?B"]] |
|
8239 |
using assms(2-5) |
|
52625 | 8240 |
by auto |
8241 |
qed |
|
8242 |
||
8243 |
lemma connected_ivt_component: |
|
8244 |
fixes x::"'a::euclidean_space" |
|
8245 |
shows "connected s \<Longrightarrow> |
|
8246 |
x \<in> s \<Longrightarrow> y \<in> s \<Longrightarrow> |
|
8247 |
x\<bullet>k \<le> a \<Longrightarrow> a \<le> y\<bullet>k \<Longrightarrow> (\<exists>z\<in>s. z\<bullet>k = a)" |
|
8248 |
using connected_ivt_hyperplane[of s x y "k::'a" a] |
|
8249 |
by (auto simp: inner_commute) |
|
33175 | 8250 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
8251 |
|
60420 | 8252 |
subsection \<open>Intervals\<close> |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8253 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8254 |
lemma open_box[intro]: "open (box a b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8255 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8256 |
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
|
8257 |
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
|
8258 |
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
|
8259 |
by (auto simp add: box_def inner_commute) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8260 |
finally show ?thesis . |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8261 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8262 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8263 |
instance euclidean_space \<subseteq> second_countable_topology |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8264 |
proof |
63040 | 8265 |
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
|
8266 |
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
|
8267 |
by simp |
63040 | 8268 |
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
|
8269 |
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
|
8270 |
by simp |
63040 | 8271 |
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
|
8272 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8273 |
have "Ball B open" by (simp add: B_def open_box) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8274 |
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
|
8275 |
proof safe |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8276 |
fix A::"'a set" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8277 |
assume "open A" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8278 |
show "\<exists>B'\<subseteq>B. \<Union>B' = A" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8279 |
apply (rule exI[of _ "{b\<in>B. b \<subseteq> A}"]) |
60420 | 8280 |
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
|
8281 |
apply (auto simp add: a b B_def) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8282 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8283 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8284 |
ultimately |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8285 |
have "topological_basis B" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8286 |
unfolding topological_basis_def by blast |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8287 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8288 |
have "countable B" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8289 |
unfolding B_def |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8290 |
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
|
8291 |
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
|
8292 |
by (blast intro: topological_basis_imp_subbasis) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8293 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8294 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8295 |
instance euclidean_space \<subseteq> polish_space .. |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8296 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8297 |
lemma closed_cbox[intro]: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8298 |
fixes a b :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8299 |
shows "closed (cbox a b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8300 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8301 |
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
|
8302 |
by (intro closed_INT ballI continuous_closed_vimage allI |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8303 |
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
|
8304 |
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
|
8305 |
by (auto simp add: cbox_def) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8306 |
finally show "closed (cbox a b)" . |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8307 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8308 |
|
62618
f7f2467ab854
Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents:
62533
diff
changeset
|
8309 |
lemma interior_cbox [simp]: |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8310 |
fixes a b :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8311 |
shows "interior (cbox a b) = box a b" (is "?L = ?R") |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8312 |
proof(rule subset_antisym) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8313 |
show "?R \<subseteq> ?L" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8314 |
using box_subset_cbox open_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8315 |
by (rule interior_maximal) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8316 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8317 |
fix x |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8318 |
assume "x \<in> interior (cbox a b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8319 |
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
|
8320 |
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
|
8321 |
unfolding open_dist and subset_eq by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8322 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8323 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8324 |
assume i: "i \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8325 |
have "dist (x - (e / 2) *\<^sub>R i) x < e" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8326 |
and "dist (x + (e / 2) *\<^sub>R i) x < e" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8327 |
unfolding dist_norm |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8328 |
apply auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8329 |
unfolding norm_minus_cancel |
60420 | 8330 |
using norm_Basis[OF i] \<open>e>0\<close> |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8331 |
apply auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8332 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8333 |
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
|
8334 |
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
|
8335 |
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
|
8336 |
unfolding mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8337 |
using i |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8338 |
by blast+ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8339 |
then have "a \<bullet> i < x \<bullet> i" and "x \<bullet> i < b \<bullet> i" |
60420 | 8340 |
using \<open>e>0\<close> i |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8341 |
by (auto simp: inner_diff_left inner_Basis inner_add_left) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8342 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8343 |
then have "x \<in> box a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8344 |
unfolding mem_box by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8345 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8346 |
then show "?L \<subseteq> ?R" .. |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8347 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8348 |
|
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
8349 |
lemma bounded_cbox [simp]: |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8350 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8351 |
shows "bounded (cbox a b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8352 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8353 |
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
|
8354 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8355 |
fix x :: "'a" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8356 |
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
|
8357 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8358 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8359 |
assume "i \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8360 |
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
|
8361 |
using x[THEN bspec[where x=i]] by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8362 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8363 |
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
|
8364 |
apply - |
64267 | 8365 |
apply (rule sum_mono) |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8366 |
apply auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8367 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8368 |
then have "norm x \<le> ?b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8369 |
using norm_le_l1[of x] by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8370 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8371 |
then show ?thesis |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8372 |
unfolding cbox_def bounded_iff by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8373 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8374 |
|
62618
f7f2467ab854
Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents:
62533
diff
changeset
|
8375 |
lemma bounded_box [simp]: |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8376 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8377 |
shows "bounded (box a b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8378 |
using bounded_cbox[of a b] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8379 |
using box_subset_cbox[of a b] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8380 |
using bounded_subset[of "cbox a b" "box a b"] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8381 |
by simp |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8382 |
|
62618
f7f2467ab854
Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents:
62533
diff
changeset
|
8383 |
lemma not_interval_UNIV [simp]: |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8384 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8385 |
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
|
8386 |
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
|
8387 |
|
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
8388 |
lemma not_interval_UNIV2 [simp]: |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
8389 |
fixes a :: "'a::euclidean_space" |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
8390 |
shows "UNIV \<noteq> cbox a b" "UNIV \<noteq> box a b" |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
8391 |
using bounded_box[of a b] bounded_cbox[of a b] by force+ |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
8392 |
|
62618
f7f2467ab854
Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents:
62533
diff
changeset
|
8393 |
lemma compact_cbox [simp]: |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8394 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8395 |
shows "compact (cbox a b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8396 |
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
|
8397 |
by (auto simp: compact_eq_seq_compact_metric) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8398 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8399 |
lemma box_midpoint: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8400 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8401 |
assumes "box a b \<noteq> {}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8402 |
shows "((1/2) *\<^sub>R (a + b)) \<in> box a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8403 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8404 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8405 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8406 |
assume "i \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8407 |
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
|
8408 |
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
|
8409 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8410 |
then show ?thesis unfolding mem_box by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8411 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8412 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8413 |
lemma open_cbox_convex: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8414 |
fixes x :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8415 |
assumes x: "x \<in> box a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8416 |
and y: "y \<in> cbox a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8417 |
and e: "0 < e" "e \<le> 1" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8418 |
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
|
8419 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8420 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8421 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8422 |
assume i: "i \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8423 |
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
|
8424 |
unfolding left_diff_distrib by simp |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8425 |
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
|
8426 |
apply (rule add_less_le_mono) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8427 |
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
|
8428 |
apply simp_all |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8429 |
using x unfolding mem_box using i |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8430 |
apply simp |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8431 |
using y unfolding mem_box using i |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8432 |
apply simp |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8433 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8434 |
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
|
8435 |
unfolding inner_simps by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8436 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8437 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8438 |
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
|
8439 |
unfolding left_diff_distrib by simp |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8440 |
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
|
8441 |
apply (rule add_less_le_mono) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8442 |
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
|
8443 |
apply simp_all |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8444 |
using x |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8445 |
unfolding mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8446 |
using i |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8447 |
apply simp |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8448 |
using y |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8449 |
unfolding mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8450 |
using i |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8451 |
apply simp |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8452 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8453 |
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
|
8454 |
unfolding inner_simps by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8455 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8456 |
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
|
8457 |
by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8458 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8459 |
then show ?thesis |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8460 |
unfolding mem_box by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8461 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8462 |
|
63881
b746b19197bd
lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents:
63627
diff
changeset
|
8463 |
lemma closure_cbox [simp]: "closure (cbox a b) = cbox a b" |
b746b19197bd
lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents:
63627
diff
changeset
|
8464 |
by (simp add: closed_cbox) |
b746b19197bd
lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents:
63627
diff
changeset
|
8465 |
|
b746b19197bd
lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents:
63627
diff
changeset
|
8466 |
lemma closure_box [simp]: |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8467 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8468 |
assumes "box a b \<noteq> {}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8469 |
shows "closure (box a b) = cbox a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8470 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8471 |
have ab: "a <e b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8472 |
using assms by (simp add: eucl_less_def box_ne_empty) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8473 |
let ?c = "(1 / 2) *\<^sub>R (a + b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8474 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8475 |
fix x |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8476 |
assume as:"x \<in> cbox a b" |
63040 | 8477 |
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
|
8478 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8479 |
fix n |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8480 |
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
|
8481 |
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
|
8482 |
unfolding inverse_le_1_iff by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8483 |
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
|
8484 |
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
|
8485 |
by (auto simp add: algebra_simps) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8486 |
then have "f n <e b" and "a <e f n" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8487 |
using open_cbox_convex[OF box_midpoint[OF assms] as *] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8488 |
unfolding f_def by (auto simp: box_def eucl_less_def) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8489 |
then have False |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8490 |
using fn unfolding f_def using xc by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8491 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8492 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8493 |
{ |
61973 | 8494 |
assume "\<not> (f \<longlongrightarrow> x) sequentially" |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8495 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8496 |
fix e :: real |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8497 |
assume "e > 0" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8498 |
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
|
8499 |
using real_arch_inverse[of e] |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8500 |
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
|
8501 |
apply (metis Suc_pred' of_nat_Suc) |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8502 |
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
|
8503 |
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
|
8504 |
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
|
8505 |
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
|
8506 |
by (auto intro!: that le_less_trans [OF _ N]) |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8507 |
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
|
8508 |
} |
61973 | 8509 |
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
|
8510 |
unfolding lim_sequentially by(auto simp add: dist_norm) |
61973 | 8511 |
then have "(f \<longlongrightarrow> x) sequentially" |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8512 |
unfolding f_def |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8513 |
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
|
8514 |
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
|
8515 |
by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8516 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8517 |
ultimately have "x \<in> closure (box a b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8518 |
using as and box_midpoint[OF assms] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8519 |
unfolding closure_def |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8520 |
unfolding islimpt_sequential |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8521 |
by (cases "x=?c") (auto simp: in_box_eucl_less) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8522 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8523 |
then show ?thesis |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8524 |
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
|
8525 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8526 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8527 |
lemma bounded_subset_box_symmetric: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8528 |
fixes s::"('a::euclidean_space) set" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8529 |
assumes "bounded s" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8530 |
shows "\<exists>a. s \<subseteq> box (-a) a" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8531 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8532 |
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
|
8533 |
using assms[unfolded bounded_pos] by auto |
63040 | 8534 |
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
|
8535 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8536 |
fix x |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8537 |
assume "x \<in> s" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8538 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8539 |
assume i: "i \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8540 |
then have "(-a)\<bullet>i < x\<bullet>i" and "x\<bullet>i < a\<bullet>i" |
60420 | 8541 |
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
|
8542 |
using Basis_le_norm[OF i, of x] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8543 |
unfolding inner_simps and a_def |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8544 |
by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8545 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8546 |
then show ?thesis |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8547 |
by (auto intro: exI[where x=a] simp add: box_def) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8548 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8549 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8550 |
lemma bounded_subset_open_interval: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8551 |
fixes s :: "('a::euclidean_space) set" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8552 |
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
|
8553 |
by (auto dest!: bounded_subset_box_symmetric) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8554 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8555 |
lemma bounded_subset_cbox_symmetric: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8556 |
fixes s :: "('a::euclidean_space) set" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8557 |
assumes "bounded s" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8558 |
shows "\<exists>a. s \<subseteq> cbox (-a) a" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8559 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8560 |
obtain a where "s \<subseteq> box (-a) a" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8561 |
using bounded_subset_box_symmetric[OF assms] by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8562 |
then show ?thesis |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8563 |
using box_subset_cbox[of "-a" a] by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8564 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8565 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8566 |
lemma bounded_subset_cbox: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8567 |
fixes s :: "('a::euclidean_space) set" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8568 |
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
|
8569 |
using bounded_subset_cbox_symmetric[of s] by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8570 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8571 |
lemma frontier_cbox: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8572 |
fixes a b :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8573 |
shows "frontier (cbox a b) = cbox a b - box a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8574 |
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
|
8575 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8576 |
lemma frontier_box: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8577 |
fixes a b :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8578 |
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
|
8579 |
proof (cases "box a b = {}") |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8580 |
case True |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8581 |
then show ?thesis |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8582 |
using frontier_empty by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8583 |
next |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8584 |
case False |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8585 |
then show ?thesis |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8586 |
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
|
8587 |
by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8588 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8589 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8590 |
lemma inter_interval_mixed_eq_empty: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8591 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8592 |
assumes "box c d \<noteq> {}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8593 |
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
|
8594 |
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
|
8595 |
unfolding open_Int_closure_eq_empty[OF open_box] .. |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8596 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8597 |
lemma diameter_cbox: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8598 |
fixes a b::"'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8599 |
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
|
8600 |
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
|
8601 |
simp: euclidean_dist_l2[where 'a='a] cbox_def dist_norm) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8602 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8603 |
lemma eucl_less_eq_halfspaces: |
61076 | 8604 |
fixes a :: "'a::euclidean_space" |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8605 |
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
|
8606 |
"{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
|
8607 |
by (auto simp: eucl_less_def) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8608 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8609 |
lemma eucl_le_eq_halfspaces: |
61076 | 8610 |
fixes a :: "'a::euclidean_space" |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8611 |
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
|
8612 |
"{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
|
8613 |
by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8614 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8615 |
lemma open_Collect_eucl_less[simp, intro]: |
61076 | 8616 |
fixes a :: "'a::euclidean_space" |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8617 |
shows "open {x. x <e a}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8618 |
"open {x. a <e x}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8619 |
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
|
8620 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8621 |
lemma closed_Collect_eucl_le[simp, intro]: |
61076 | 8622 |
fixes a :: "'a::euclidean_space" |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8623 |
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
|
8624 |
"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
|
8625 |
unfolding eucl_le_eq_halfspaces |
63332 | 8626 |
by (simp_all add: closed_INT closed_Collect_le continuous_on_inner continuous_on_const continuous_on_id) |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8627 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8628 |
lemma image_affinity_cbox: fixes m::real |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8629 |
fixes a b c :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8630 |
shows "(\<lambda>x. m *\<^sub>R x + c) ` cbox a b = |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8631 |
(if cbox a b = {} then {} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8632 |
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
|
8633 |
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
|
8634 |
proof (cases "m = 0") |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8635 |
case True |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8636 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8637 |
fix x |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8638 |
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
|
8639 |
then have "x = c" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8640 |
apply - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8641 |
apply (subst euclidean_eq_iff) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8642 |
apply (auto intro: order_antisym) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8643 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8644 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8645 |
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
|
8646 |
unfolding True by (auto simp add: cbox_sing) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8647 |
ultimately show ?thesis using True by (auto simp: cbox_def) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8648 |
next |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8649 |
case False |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8650 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8651 |
fix y |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8652 |
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
|
8653 |
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
|
8654 |
by (auto simp: inner_distrib) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8655 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8656 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8657 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8658 |
fix y |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8659 |
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
|
8660 |
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
|
8661 |
by (auto simp add: mult_left_mono_neg inner_distrib) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8662 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8663 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8664 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8665 |
fix y |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8666 |
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
|
8667 |
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
|
8668 |
unfolding image_iff Bex_def mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8669 |
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
|
8670 |
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
|
8671 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8672 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8673 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8674 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8675 |
fix y |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8676 |
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
|
8677 |
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
|
8678 |
unfolding image_iff Bex_def mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8679 |
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
|
8680 |
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
|
8681 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8682 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8683 |
ultimately show ?thesis using False by (auto simp: cbox_def) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8684 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8685 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8686 |
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
|
8687 |
(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
|
8688 |
using image_affinity_cbox[of m 0 a b] by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8689 |
|
60176 | 8690 |
lemma islimpt_greaterThanLessThan1: |
8691 |
fixes a b::"'a::{linorder_topology, dense_order}" |
|
8692 |
assumes "a < b" |
|
8693 |
shows "a islimpt {a<..<b}" |
|
8694 |
proof (rule islimptI) |
|
8695 |
fix T |
|
8696 |
assume "open T" "a \<in> T" |
|
60420 | 8697 |
from open_right[OF this \<open>a < b\<close>] |
60176 | 8698 |
obtain c where c: "a < c" "{a..<c} \<subseteq> T" by auto |
8699 |
with assms dense[of a "min c b"] |
|
8700 |
show "\<exists>y\<in>{a<..<b}. y \<in> T \<and> y \<noteq> a" |
|
8701 |
by (metis atLeastLessThan_iff greaterThanLessThan_iff min_less_iff_conj |
|
8702 |
not_le order.strict_implies_order subset_eq) |
|
8703 |
qed |
|
8704 |
||
8705 |
lemma islimpt_greaterThanLessThan2: |
|
8706 |
fixes a b::"'a::{linorder_topology, dense_order}" |
|
8707 |
assumes "a < b" |
|
8708 |
shows "b islimpt {a<..<b}" |
|
8709 |
proof (rule islimptI) |
|
8710 |
fix T |
|
8711 |
assume "open T" "b \<in> T" |
|
60420 | 8712 |
from open_left[OF this \<open>a < b\<close>] |
60176 | 8713 |
obtain c where c: "c < b" "{c<..b} \<subseteq> T" by auto |
8714 |
with assms dense[of "max a c" b] |
|
8715 |
show "\<exists>y\<in>{a<..<b}. y \<in> T \<and> y \<noteq> b" |
|
8716 |
by (metis greaterThanAtMost_iff greaterThanLessThan_iff max_less_iff_conj |
|
8717 |
not_le order.strict_implies_order subset_eq) |
|
8718 |
qed |
|
8719 |
||
8720 |
lemma closure_greaterThanLessThan[simp]: |
|
8721 |
fixes a b::"'a::{linorder_topology, dense_order}" |
|
8722 |
shows "a < b \<Longrightarrow> closure {a <..< b} = {a .. b}" (is "_ \<Longrightarrow> ?l = ?r") |
|
8723 |
proof |
|
8724 |
have "?l \<subseteq> closure ?r" |
|
8725 |
by (rule closure_mono) auto |
|
8726 |
thus "closure {a<..<b} \<subseteq> {a..b}" by simp |
|
8727 |
qed (auto simp: closure_def order.order_iff_strict islimpt_greaterThanLessThan1 |
|
8728 |
islimpt_greaterThanLessThan2) |
|
8729 |
||
8730 |
lemma closure_greaterThan[simp]: |
|
8731 |
fixes a b::"'a::{no_top, linorder_topology, dense_order}" |
|
8732 |
shows "closure {a<..} = {a..}" |
|
8733 |
proof - |
|
8734 |
from gt_ex obtain b where "a < b" by auto |
|
8735 |
hence "{a<..} = {a<..<b} \<union> {b..}" by auto |
|
64122 | 8736 |
also have "closure \<dots> = {a..}" using \<open>a < b\<close> unfolding closure_Un |
60176 | 8737 |
by auto |
8738 |
finally show ?thesis . |
|
8739 |
qed |
|
8740 |
||
8741 |
lemma closure_lessThan[simp]: |
|
8742 |
fixes b::"'a::{no_bot, linorder_topology, dense_order}" |
|
8743 |
shows "closure {..<b} = {..b}" |
|
8744 |
proof - |
|
8745 |
from lt_ex obtain a where "a < b" by auto |
|
8746 |
hence "{..<b} = {a<..<b} \<union> {..a}" by auto |
|
64122 | 8747 |
also have "closure \<dots> = {..b}" using \<open>a < b\<close> unfolding closure_Un |
60176 | 8748 |
by auto |
8749 |
finally show ?thesis . |
|
8750 |
qed |
|
8751 |
||
8752 |
lemma closure_atLeastLessThan[simp]: |
|
8753 |
fixes a b::"'a::{linorder_topology, dense_order}" |
|
8754 |
assumes "a < b" |
|
8755 |
shows "closure {a ..< b} = {a .. b}" |
|
8756 |
proof - |
|
8757 |
from assms have "{a ..< b} = {a} \<union> {a <..< b}" by auto |
|
64122 | 8758 |
also have "closure \<dots> = {a .. b}" unfolding closure_Un |
60176 | 8759 |
by (auto simp add: assms less_imp_le) |
8760 |
finally show ?thesis . |
|
8761 |
qed |
|
8762 |
||
8763 |
lemma closure_greaterThanAtMost[simp]: |
|
8764 |
fixes a b::"'a::{linorder_topology, dense_order}" |
|
8765 |
assumes "a < b" |
|
8766 |
shows "closure {a <.. b} = {a .. b}" |
|
8767 |
proof - |
|
8768 |
from assms have "{a <.. b} = {b} \<union> {a <..< b}" by auto |
|
64122 | 8769 |
also have "closure \<dots> = {a .. b}" unfolding closure_Un |
60176 | 8770 |
by (auto simp add: assms less_imp_le) |
8771 |
finally show ?thesis . |
|
8772 |
qed |
|
8773 |
||
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
8774 |
|
60420 | 8775 |
subsection \<open>Homeomorphisms\<close> |
33175 | 8776 |
|
52625 | 8777 |
definition "homeomorphism s t f g \<longleftrightarrow> |
8778 |
(\<forall>x\<in>s. (g(f x) = x)) \<and> (f ` s = t) \<and> continuous_on s f \<and> |
|
8779 |
(\<forall>y\<in>t. (f(g y) = y)) \<and> (g ` t = s) \<and> continuous_on t g" |
|
33175 | 8780 |
|
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
8781 |
lemma homeomorphismI [intro?]: |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
8782 |
assumes "continuous_on S f" "continuous_on T g" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
8783 |
"f ` S \<subseteq> T" "g ` T \<subseteq> S" "\<And>x. x \<in> S \<Longrightarrow> g(f x) = x" "\<And>y. y \<in> T \<Longrightarrow> f(g y) = y" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
8784 |
shows "homeomorphism S T f g" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
8785 |
using assms by (force simp: homeomorphism_def) |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
8786 |
|
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
8787 |
lemma homeomorphism_translation: |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
8788 |
fixes a :: "'a :: real_normed_vector" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
8789 |
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
|
8790 |
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
|
8791 |
|
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
8792 |
lemma homeomorphism_ident: "homeomorphism T T (\<lambda>a. a) (\<lambda>a. a)" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
8793 |
by (rule homeomorphismI) (auto simp: continuous_on_id) |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
8794 |
|
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
8795 |
lemma homeomorphism_compose: |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
8796 |
assumes "homeomorphism S T f g" "homeomorphism T U h k" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
8797 |
shows "homeomorphism S U (h o f) (g o k)" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
8798 |
using assms |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
8799 |
unfolding homeomorphism_def |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
8800 |
by (intro conjI ballI continuous_on_compose) (auto simp: image_comp [symmetric]) |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
8801 |
|
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
8802 |
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
|
8803 |
by (simp add: homeomorphism_def) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
8804 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
8805 |
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
|
8806 |
by (force simp: homeomorphism_def) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
8807 |
|
53640 | 8808 |
definition homeomorphic :: "'a::topological_space set \<Rightarrow> 'b::topological_space set \<Rightarrow> bool" |
53282 | 8809 |
(infixr "homeomorphic" 60) |
8810 |
where "s homeomorphic t \<equiv> (\<exists>f g. homeomorphism s t f g)" |
|
33175 | 8811 |
|
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
8812 |
lemma homeomorphic_empty [iff]: |
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
8813 |
"S homeomorphic {} \<longleftrightarrow> S = {}" "{} homeomorphic S \<longleftrightarrow> S = {}" |
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
8814 |
by (auto simp add: homeomorphic_def homeomorphism_def) |
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
8815 |
|
33175 | 8816 |
lemma homeomorphic_refl: "s homeomorphic s" |
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
8817 |
unfolding homeomorphic_def homeomorphism_def |
33175 | 8818 |
using continuous_on_id |
53282 | 8819 |
apply (rule_tac x = "(\<lambda>x. x)" in exI) |
8820 |
apply (rule_tac x = "(\<lambda>x. x)" in exI) |
|
52625 | 8821 |
apply blast |
8822 |
done |
|
8823 |
||
8824 |
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
|
8825 |
unfolding homeomorphic_def homeomorphism_def |
53282 | 8826 |
by blast |
33175 | 8827 |
|
62620
d21dab28b3f9
New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents:
62618
diff
changeset
|
8828 |
lemma homeomorphic_trans [trans]: |
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
8829 |
assumes "S homeomorphic T" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
8830 |
and "T homeomorphic U" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
8831 |
shows "S homeomorphic U" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
8832 |
using assms |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
8833 |
unfolding homeomorphic_def |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
8834 |
by (metis homeomorphism_compose) |
33175 | 8835 |
|
8836 |
lemma homeomorphic_minimal: |
|
52625 | 8837 |
"s homeomorphic t \<longleftrightarrow> |
33175 | 8838 |
(\<exists>f g. (\<forall>x\<in>s. f(x) \<in> t \<and> (g(f(x)) = x)) \<and> |
8839 |
(\<forall>y\<in>t. g(y) \<in> s \<and> (f(g(y)) = y)) \<and> |
|
8840 |
continuous_on s f \<and> continuous_on t g)" |
|
63967
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8841 |
(is "?lhs = ?rhs") |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8842 |
proof |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8843 |
assume ?lhs |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8844 |
then show ?rhs |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8845 |
by (fastforce simp: homeomorphic_def homeomorphism_def) |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8846 |
next |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8847 |
assume ?rhs |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8848 |
then show ?lhs |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8849 |
apply clarify |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8850 |
unfolding homeomorphic_def homeomorphism_def |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8851 |
by (metis equalityI image_subset_iff subsetI) |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8852 |
qed |
64284
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
8853 |
|
63114
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8854 |
lemma homeomorphicI [intro?]: |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8855 |
"\<lbrakk>f ` S = T; g ` T = S; |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8856 |
continuous_on S f; continuous_on T g; |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8857 |
\<And>x. x \<in> S \<Longrightarrow> g(f(x)) = x; |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8858 |
\<And>y. y \<in> T \<Longrightarrow> f(g(y)) = y\<rbrakk> \<Longrightarrow> S homeomorphic T" |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8859 |
unfolding homeomorphic_def homeomorphism_def by metis |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8860 |
|
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8861 |
lemma homeomorphism_of_subsets: |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8862 |
"\<lbrakk>homeomorphism S T f g; S' \<subseteq> S; T'' \<subseteq> T; f ` S' = T'\<rbrakk> |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8863 |
\<Longrightarrow> homeomorphism S' T' f g" |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8864 |
apply (auto simp: homeomorphism_def elim!: continuous_on_subset) |
63967
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8865 |
by (metis subsetD imageI) |
63114
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8866 |
|
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8867 |
lemma homeomorphism_apply1: "\<lbrakk>homeomorphism S T f g; x \<in> S\<rbrakk> \<Longrightarrow> g(f x) = x" |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8868 |
by (simp add: homeomorphism_def) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8869 |
|
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8870 |
lemma homeomorphism_apply2: "\<lbrakk>homeomorphism S T f g; x \<in> T\<rbrakk> \<Longrightarrow> f(g x) = x" |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8871 |
by (simp add: homeomorphism_def) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8872 |
|
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8873 |
lemma homeomorphism_image1: "homeomorphism S T f g \<Longrightarrow> f ` S = T" |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8874 |
by (simp add: homeomorphism_def) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8875 |
|
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8876 |
lemma homeomorphism_image2: "homeomorphism S T f g \<Longrightarrow> g ` T = S" |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8877 |
by (simp add: homeomorphism_def) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8878 |
|
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8879 |
lemma homeomorphism_cont1: "homeomorphism S T f g \<Longrightarrow> continuous_on S f" |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8880 |
by (simp add: homeomorphism_def) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8881 |
|
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8882 |
lemma homeomorphism_cont2: "homeomorphism S T f g \<Longrightarrow> continuous_on T g" |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8883 |
by (simp add: homeomorphism_def) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
8884 |
|
63967
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8885 |
lemma continuous_on_no_limpt: |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8886 |
"(\<And>x. \<not> x islimpt S) \<Longrightarrow> continuous_on S f" |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8887 |
unfolding continuous_on_def |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8888 |
by (metis UNIV_I empty_iff eventually_at_topological islimptE open_UNIV tendsto_def trivial_limit_within) |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8889 |
|
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8890 |
lemma continuous_on_finite: |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8891 |
fixes S :: "'a::t1_space set" |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8892 |
shows "finite S \<Longrightarrow> continuous_on S f" |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8893 |
by (metis continuous_on_no_limpt islimpt_finite) |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8894 |
|
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8895 |
lemma homeomorphic_finite: |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8896 |
fixes S :: "'a::t1_space set" and T :: "'b::t1_space set" |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8897 |
assumes "finite T" |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8898 |
shows "S homeomorphic T \<longleftrightarrow> finite S \<and> finite T \<and> card S = card T" (is "?lhs = ?rhs") |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8899 |
proof |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8900 |
assume "S homeomorphic T" |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8901 |
with assms show ?rhs |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8902 |
apply (auto simp: homeomorphic_def homeomorphism_def) |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8903 |
apply (metis finite_imageI) |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8904 |
by (metis card_image_le finite_imageI le_antisym) |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8905 |
next |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8906 |
assume R: ?rhs |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8907 |
with finite_same_card_bij obtain h where "bij_betw h S T" |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8908 |
by (auto simp: ) |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8909 |
with R show ?lhs |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8910 |
apply (auto simp: homeomorphic_def homeomorphism_def continuous_on_finite) |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8911 |
apply (rule_tac x="h" in exI) |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8912 |
apply (rule_tac x="inv_into S h" in exI) |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8913 |
apply (auto simp: bij_betw_inv_into_left bij_betw_inv_into_right bij_betw_imp_surj_on inv_into_into bij_betwE) |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8914 |
apply (metis bij_betw_def bij_betw_inv_into) |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8915 |
done |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8916 |
qed |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
8917 |
|
60420 | 8918 |
text \<open>Relatively weak hypotheses if a set is compact.\<close> |
33175 | 8919 |
|
8920 |
lemma homeomorphism_compact: |
|
50898 | 8921 |
fixes f :: "'a::topological_space \<Rightarrow> 'b::t2_space" |
33175 | 8922 |
assumes "compact s" "continuous_on s f" "f ` s = t" "inj_on f s" |
8923 |
shows "\<exists>g. homeomorphism s t f g" |
|
53282 | 8924 |
proof - |
63040 | 8925 |
define g where "g x = (SOME y. y\<in>s \<and> f y = x)" for x |
52625 | 8926 |
have g: "\<forall>x\<in>s. g (f x) = x" |
8927 |
using assms(3) assms(4)[unfolded inj_on_def] unfolding g_def by auto |
|
8928 |
{ |
|
53282 | 8929 |
fix y |
8930 |
assume "y \<in> t" |
|
8931 |
then obtain x where x:"f x = y" "x\<in>s" |
|
8932 |
using assms(3) by auto |
|
8933 |
then have "g (f x) = x" using g by auto |
|
53291 | 8934 |
then have "f (g y) = y" unfolding x(1)[symmetric] by auto |
52625 | 8935 |
} |
53282 | 8936 |
then have g':"\<forall>x\<in>t. f (g x) = x" by auto |
33175 | 8937 |
moreover |
52625 | 8938 |
{ |
8939 |
fix x |
|
8940 |
have "x\<in>s \<Longrightarrow> x \<in> g ` t" |
|
8941 |
using g[THEN bspec[where x=x]] |
|
8942 |
unfolding image_iff |
|
8943 |
using assms(3) |
|
8944 |
by (auto intro!: bexI[where x="f x"]) |
|
33175 | 8945 |
moreover |
52625 | 8946 |
{ |
8947 |
assume "x\<in>g ` t" |
|
33175 | 8948 |
then obtain y where y:"y\<in>t" "g y = x" by auto |
52625 | 8949 |
then obtain x' where x':"x'\<in>s" "f x' = y" |
8950 |
using assms(3) by auto |
|
53282 | 8951 |
then have "x \<in> s" |
52625 | 8952 |
unfolding g_def |
8953 |
using someI2[of "\<lambda>b. b\<in>s \<and> f b = y" x' "\<lambda>x. x\<in>s"] |
|
53291 | 8954 |
unfolding y(2)[symmetric] and g_def |
52625 | 8955 |
by auto |
8956 |
} |
|
8957 |
ultimately have "x\<in>s \<longleftrightarrow> x \<in> g ` t" .. |
|
8958 |
} |
|
53282 | 8959 |
then have "g ` t = s" by auto |
52625 | 8960 |
ultimately show ?thesis |
8961 |
unfolding homeomorphism_def homeomorphic_def |
|
8962 |
apply (rule_tac x=g in exI) |
|
8963 |
using g and assms(3) and continuous_on_inv[OF assms(2,1), of g, unfolded assms(3)] and assms(2) |
|
8964 |
apply auto |
|
8965 |
done |
|
33175 | 8966 |
qed |
8967 |
||
8968 |
lemma homeomorphic_compact: |
|
50898 | 8969 |
fixes f :: "'a::topological_space \<Rightarrow> 'b::t2_space" |
53282 | 8970 |
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
|
8971 |
unfolding homeomorphic_def by (metis homeomorphism_compact) |
33175 | 8972 |
|
60420 | 8973 |
text\<open>Preservation of topological properties.\<close> |
33175 | 8974 |
|
52625 | 8975 |
lemma homeomorphic_compactness: "s homeomorphic t \<Longrightarrow> (compact s \<longleftrightarrow> compact t)" |
8976 |
unfolding homeomorphic_def homeomorphism_def |
|
8977 |
by (metis compact_continuous_image) |
|
33175 | 8978 |
|
60420 | 8979 |
text\<open>Results on translation, scaling etc.\<close> |
33175 | 8980 |
|
8981 |
lemma homeomorphic_scaling: |
|
8982 |
fixes s :: "'a::real_normed_vector set" |
|
53282 | 8983 |
assumes "c \<noteq> 0" |
8984 |
shows "s homeomorphic ((\<lambda>x. c *\<^sub>R x) ` s)" |
|
33175 | 8985 |
unfolding homeomorphic_minimal |
52625 | 8986 |
apply (rule_tac x="\<lambda>x. c *\<^sub>R x" in exI) |
8987 |
apply (rule_tac x="\<lambda>x. (1 / c) *\<^sub>R x" in exI) |
|
8988 |
using assms |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
8989 |
apply (auto simp add: continuous_intros) |
52625 | 8990 |
done |
33175 | 8991 |
|
8992 |
lemma homeomorphic_translation: |
|
8993 |
fixes s :: "'a::real_normed_vector set" |
|
8994 |
shows "s homeomorphic ((\<lambda>x. a + x) ` s)" |
|
8995 |
unfolding homeomorphic_minimal |
|
52625 | 8996 |
apply (rule_tac x="\<lambda>x. a + x" in exI) |
8997 |
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
|
8998 |
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
|
8999 |
continuous_on_add [OF continuous_on_const continuous_on_id, of "plus a ` s" "- a"] |
52625 | 9000 |
apply auto |
9001 |
done |
|
33175 | 9002 |
|
9003 |
lemma homeomorphic_affinity: |
|
9004 |
fixes s :: "'a::real_normed_vector set" |
|
52625 | 9005 |
assumes "c \<noteq> 0" |
9006 |
shows "s homeomorphic ((\<lambda>x. a + c *\<^sub>R x) ` s)" |
|
53282 | 9007 |
proof - |
52625 | 9008 |
have *: "op + a ` op *\<^sub>R c ` s = (\<lambda>x. a + c *\<^sub>R x) ` s" by auto |
33175 | 9009 |
show ?thesis |
9010 |
using homeomorphic_trans |
|
9011 |
using homeomorphic_scaling[OF assms, of s] |
|
52625 | 9012 |
using homeomorphic_translation[of "(\<lambda>x. c *\<^sub>R x) ` s" a] |
9013 |
unfolding * |
|
9014 |
by auto |
|
33175 | 9015 |
qed |
9016 |
||
9017 |
lemma homeomorphic_balls: |
|
50898 | 9018 |
fixes a b ::"'a::real_normed_vector" |
33175 | 9019 |
assumes "0 < d" "0 < e" |
9020 |
shows "(ball a d) homeomorphic (ball b e)" (is ?th) |
|
53282 | 9021 |
and "(cball a d) homeomorphic (cball b e)" (is ?cth) |
9022 |
proof - |
|
33175 | 9023 |
show ?th unfolding homeomorphic_minimal |
9024 |
apply(rule_tac x="\<lambda>x. b + (e/d) *\<^sub>R (x - a)" in exI) |
|
9025 |
apply(rule_tac x="\<lambda>x. a + (d/e) *\<^sub>R (x - b)" in exI) |
|
51364 | 9026 |
using assms |
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
9027 |
apply (auto intro!: continuous_intros |
52625 | 9028 |
simp: dist_commute dist_norm pos_divide_less_eq mult_strict_left_mono) |
51364 | 9029 |
done |
33175 | 9030 |
show ?cth unfolding homeomorphic_minimal |
9031 |
apply(rule_tac x="\<lambda>x. b + (e/d) *\<^sub>R (x - a)" in exI) |
|
9032 |
apply(rule_tac x="\<lambda>x. a + (d/e) *\<^sub>R (x - b)" in exI) |
|
51364 | 9033 |
using assms |
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
9034 |
apply (auto intro!: continuous_intros |
52625 | 9035 |
simp: dist_commute dist_norm pos_divide_le_eq mult_strict_left_mono) |
51364 | 9036 |
done |
33175 | 9037 |
qed |
9038 |
||
64394 | 9039 |
lemma homeomorphic_spheres: |
9040 |
fixes a b ::"'a::real_normed_vector" |
|
9041 |
assumes "0 < d" "0 < e" |
|
9042 |
shows "(sphere a d) homeomorphic (sphere b e)" |
|
9043 |
unfolding homeomorphic_minimal |
|
9044 |
apply(rule_tac x="\<lambda>x. b + (e/d) *\<^sub>R (x - a)" in exI) |
|
9045 |
apply(rule_tac x="\<lambda>x. a + (d/e) *\<^sub>R (x - b)" in exI) |
|
9046 |
using assms |
|
9047 |
apply (auto intro!: continuous_intros |
|
9048 |
simp: dist_commute dist_norm pos_divide_less_eq mult_strict_left_mono) |
|
9049 |
done |
|
9050 |
||
63114
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9051 |
subsection\<open>Inverse function property for open/closed maps\<close> |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9052 |
|
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9053 |
lemma continuous_on_inverse_open_map: |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9054 |
assumes contf: "continuous_on S f" |
64539 | 9055 |
and imf: "f ` S = T" |
9056 |
and injf: "\<And>x. x \<in> S \<Longrightarrow> g (f x) = x" |
|
9057 |
and oo: "\<And>U. openin (subtopology euclidean S) U \<Longrightarrow> openin (subtopology euclidean T) (f ` U)" |
|
9058 |
shows "continuous_on T g" |
|
9059 |
proof - |
|
9060 |
from imf injf have gTS: "g ` T = S" |
|
9061 |
by force |
|
9062 |
from imf injf have fU: "U \<subseteq> S \<Longrightarrow> (f ` U) = {x \<in> T. g x \<in> U}" for U |
|
9063 |
by force |
|
63114
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9064 |
show ?thesis |
64539 | 9065 |
by (simp add: continuous_on_open [of T g] gTS) (metis openin_imp_subset fU oo) |
63114
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9066 |
qed |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9067 |
|
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9068 |
lemma continuous_on_inverse_closed_map: |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9069 |
assumes contf: "continuous_on S f" |
64539 | 9070 |
and imf: "f ` S = T" |
9071 |
and injf: "\<And>x. x \<in> S \<Longrightarrow> g(f x) = x" |
|
9072 |
and oo: "\<And>U. closedin (subtopology euclidean S) U \<Longrightarrow> closedin (subtopology euclidean T) (f ` U)" |
|
9073 |
shows "continuous_on T g" |
|
9074 |
proof - |
|
9075 |
from imf injf have gTS: "g ` T = S" |
|
9076 |
by force |
|
9077 |
from imf injf have fU: "U \<subseteq> S \<Longrightarrow> (f ` U) = {x \<in> T. g x \<in> U}" for U |
|
9078 |
by force |
|
63114
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9079 |
show ?thesis |
64539 | 9080 |
by (simp add: continuous_on_closed [of T g] gTS) (metis closedin_imp_subset fU oo) |
63114
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9081 |
qed |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9082 |
|
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9083 |
lemma homeomorphism_injective_open_map: |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9084 |
assumes contf: "continuous_on S f" |
64539 | 9085 |
and imf: "f ` S = T" |
9086 |
and injf: "inj_on f S" |
|
9087 |
and oo: "\<And>U. openin (subtopology euclidean S) U \<Longrightarrow> openin (subtopology euclidean T) (f ` U)" |
|
63114
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9088 |
obtains g where "homeomorphism S T f g" |
64539 | 9089 |
proof |
63114
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9090 |
have "continuous_on T (inv_into S f)" |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9091 |
by (metis contf continuous_on_inverse_open_map imf injf inv_into_f_f oo) |
64539 | 9092 |
with imf injf contf show "homeomorphism S T f (inv_into S f)" |
9093 |
by (auto simp: homeomorphism_def) |
|
63114
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9094 |
qed |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9095 |
|
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9096 |
lemma homeomorphism_injective_closed_map: |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9097 |
assumes contf: "continuous_on S f" |
64539 | 9098 |
and imf: "f ` S = T" |
9099 |
and injf: "inj_on f S" |
|
9100 |
and oo: "\<And>U. closedin (subtopology euclidean S) U \<Longrightarrow> closedin (subtopology euclidean T) (f ` U)" |
|
63114
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9101 |
obtains g where "homeomorphism S T f g" |
64539 | 9102 |
proof |
63114
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9103 |
have "continuous_on T (inv_into S f)" |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9104 |
by (metis contf continuous_on_inverse_closed_map imf injf inv_into_f_f oo) |
64539 | 9105 |
with imf injf contf show "homeomorphism S T f (inv_into S f)" |
9106 |
by (auto simp: homeomorphism_def) |
|
63114
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9107 |
qed |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9108 |
|
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9109 |
lemma homeomorphism_imp_open_map: |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9110 |
assumes hom: "homeomorphism S T f g" |
64539 | 9111 |
and oo: "openin (subtopology euclidean S) U" |
9112 |
shows "openin (subtopology euclidean T) (f ` U)" |
|
9113 |
proof - |
|
9114 |
from hom oo have [simp]: "f ` U = {y. y \<in> T \<and> g y \<in> U}" |
|
9115 |
using openin_subset by (fastforce simp: homeomorphism_def rev_image_eqI) |
|
9116 |
from hom have "continuous_on T g" |
|
9117 |
unfolding homeomorphism_def by blast |
|
63114
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9118 |
moreover have "g ` T = S" |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9119 |
by (metis hom homeomorphism_def) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9120 |
ultimately show ?thesis |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9121 |
by (simp add: continuous_on_open oo) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9122 |
qed |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9123 |
|
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9124 |
lemma homeomorphism_imp_closed_map: |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9125 |
assumes hom: "homeomorphism S T f g" |
64539 | 9126 |
and oo: "closedin (subtopology euclidean S) U" |
9127 |
shows "closedin (subtopology euclidean T) (f ` U)" |
|
9128 |
proof - |
|
9129 |
from hom oo have [simp]: "f ` U = {y. y \<in> T \<and> g y \<in> U}" |
|
9130 |
using closedin_subset by (fastforce simp: homeomorphism_def rev_image_eqI) |
|
9131 |
from hom have "continuous_on T g" |
|
9132 |
unfolding homeomorphism_def by blast |
|
63114
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9133 |
moreover have "g ` T = S" |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9134 |
by (metis hom homeomorphism_def) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9135 |
ultimately show ?thesis |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9136 |
by (simp add: continuous_on_closed oo) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9137 |
qed |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9138 |
|
64539 | 9139 |
|
9140 |
subsection \<open>"Isometry" (up to constant bounds) of injective linear map etc.\<close> |
|
33175 | 9141 |
|
9142 |
lemma cauchy_isometric: |
|
53640 | 9143 |
assumes e: "e > 0" |
52625 | 9144 |
and s: "subspace s" |
9145 |
and f: "bounded_linear f" |
|
53640 | 9146 |
and normf: "\<forall>x\<in>s. norm (f x) \<ge> e * norm x" |
9147 |
and xs: "\<forall>n. x n \<in> s" |
|
9148 |
and cf: "Cauchy (f \<circ> x)" |
|
33175 | 9149 |
shows "Cauchy x" |
52625 | 9150 |
proof - |
33175 | 9151 |
interpret f: bounded_linear f by fact |
64539 | 9152 |
have "\<exists>N. \<forall>n\<ge>N. norm (x n - x N) < d" if "d > 0" for d :: real |
9153 |
proof - |
|
9154 |
from that obtain N where N: "\<forall>n\<ge>N. norm (f (x n) - f (x N)) < e * d" |
|
56544 | 9155 |
using cf[unfolded cauchy o_def dist_norm, THEN spec[where x="e*d"]] e |
52625 | 9156 |
by auto |
64539 | 9157 |
have "norm (x n - x N) < d" if "n \<ge> N" for n |
9158 |
proof - |
|
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
|
9159 |
have "e * norm (x n - x N) \<le> norm (f (x n - x N))" |
63114
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
9160 |
using subspace_diff[OF s, of "x n" "x N"] |
52625 | 9161 |
using xs[THEN spec[where x=N]] and xs[THEN spec[where x=n]] |
9162 |
using normf[THEN bspec[where x="x n - x N"]] |
|
9163 |
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
|
9164 |
also have "norm (f (x n - x N)) < e * d" |
60420 | 9165 |
using \<open>N \<le> n\<close> N unfolding f.diff[symmetric] by auto |
64539 | 9166 |
finally show ?thesis |
9167 |
using \<open>e>0\<close> by simp |
|
9168 |
qed |
|
9169 |
then show ?thesis by auto |
|
9170 |
qed |
|
9171 |
then show ?thesis |
|
9172 |
by (simp add: cauchy dist_norm) |
|
33175 | 9173 |
qed |
9174 |
||
9175 |
lemma complete_isometric_image: |
|
52625 | 9176 |
assumes "0 < e" |
9177 |
and s: "subspace s" |
|
9178 |
and f: "bounded_linear f" |
|
9179 |
and normf: "\<forall>x\<in>s. norm(f x) \<ge> e * norm(x)" |
|
9180 |
and cs: "complete s" |
|
53291 | 9181 |
shows "complete (f ` s)" |
52625 | 9182 |
proof - |
64539 | 9183 |
have "\<exists>l\<in>f ` s. (g \<longlongrightarrow> l) sequentially" |
9184 |
if as:"\<forall>n::nat. g n \<in> f ` s" and cfg:"Cauchy g" for g |
|
9185 |
proof - |
|
9186 |
from that obtain x where "\<forall>n. x n \<in> s \<and> g n = f (x n)" |
|
9187 |
using choice[of "\<lambda> n xa. xa \<in> s \<and> g n = f xa"] by auto |
|
9188 |
then have x: "\<forall>n. x n \<in> s" "\<forall>n. g n = f (x n)" by auto |
|
9189 |
then have "f \<circ> x = g" by (simp add: fun_eq_iff) |
|
61973 | 9190 |
then obtain l where "l\<in>s" and l:"(x \<longlongrightarrow> l) sequentially" |
33175 | 9191 |
using cs[unfolded complete_def, THEN spec[where x="x"]] |
60420 | 9192 |
using cauchy_isometric[OF \<open>0 < e\<close> s f normf] and cfg and x(1) |
53640 | 9193 |
by auto |
64539 | 9194 |
then show ?thesis |
33175 | 9195 |
using linear_continuous_at[OF f, unfolded continuous_at_sequentially, THEN spec[where x=x], of l] |
64539 | 9196 |
by (auto simp: \<open>f \<circ> x = g\<close>) |
9197 |
qed |
|
53640 | 9198 |
then show ?thesis |
9199 |
unfolding complete_def by auto |
|
33175 | 9200 |
qed |
9201 |
||
52625 | 9202 |
lemma injective_imp_isometric: |
9203 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
|
9204 |
assumes s: "closed s" "subspace s" |
|
53640 | 9205 |
and f: "bounded_linear f" "\<forall>x\<in>s. f x = 0 \<longrightarrow> x = 0" |
9206 |
shows "\<exists>e>0. \<forall>x\<in>s. norm (f x) \<ge> e * norm x" |
|
52625 | 9207 |
proof (cases "s \<subseteq> {0::'a}") |
33175 | 9208 |
case True |
64539 | 9209 |
have "norm x \<le> norm (f x)" if "x \<in> s" for x |
9210 |
proof - |
|
9211 |
from True that have "x = 0" by auto |
|
9212 |
then show ?thesis by simp |
|
9213 |
qed |
|
9214 |
then show ?thesis |
|
9215 |
by (auto intro!: exI[where x=1]) |
|
33175 | 9216 |
next |
64539 | 9217 |
case False |
33175 | 9218 |
interpret f: bounded_linear f by fact |
64539 | 9219 |
from False obtain a where a: "a \<noteq> 0" "a \<in> s" |
53640 | 9220 |
by auto |
9221 |
from False have "s \<noteq> {}" |
|
9222 |
by auto |
|
64539 | 9223 |
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
|
9224 |
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
|
9225 |
let ?S'' = "{x::'a. norm x = norm a}" |
33175 | 9226 |
|
64539 | 9227 |
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
|
9228 |
by (simp add: sphere_def dist_norm) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
9229 |
then have "compact ?S''" by (metis compact_cball compact_frontier) |
33175 | 9230 |
moreover have "?S' = s \<inter> ?S''" by auto |
52625 | 9231 |
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
|
9232 |
using closed_Int_compact[of s ?S''] using s(1) by auto |
33175 | 9233 |
moreover have *:"f ` ?S' = ?S" by auto |
52625 | 9234 |
ultimately have "compact ?S" |
9235 |
using compact_continuous_image[OF linear_continuous_on[OF f(1)], of ?S'] by auto |
|
64539 | 9236 |
then have "closed ?S" |
9237 |
using compact_imp_closed by auto |
|
9238 |
moreover from a have "?S \<noteq> {}" by auto |
|
52625 | 9239 |
ultimately obtain b' where "b'\<in>?S" "\<forall>y\<in>?S. norm b' \<le> norm y" |
9240 |
using distance_attains_inf[of ?S 0] unfolding dist_0_norm by auto |
|
53282 | 9241 |
then obtain b where "b\<in>s" |
9242 |
and ba: "norm b = norm a" |
|
9243 |
and b: "\<forall>x\<in>{x \<in> s. norm x = norm a}. norm (f b) \<le> norm (f x)" |
|
53291 | 9244 |
unfolding *[symmetric] unfolding image_iff by auto |
33175 | 9245 |
|
9246 |
let ?e = "norm (f b) / norm b" |
|
64539 | 9247 |
have "norm b > 0" |
9248 |
using ba and a and norm_ge_zero by auto |
|
52625 | 9249 |
moreover have "norm (f b) > 0" |
60420 | 9250 |
using f(2)[THEN bspec[where x=b], OF \<open>b\<in>s\<close>] |
64539 | 9251 |
using \<open>norm b >0\<close> by simp |
56541 | 9252 |
ultimately have "0 < norm (f b) / norm b" by simp |
33175 | 9253 |
moreover |
64539 | 9254 |
have "norm (f b) / norm b * norm x \<le> norm (f x)" if "x\<in>s" for x |
9255 |
proof (cases "x = 0") |
|
9256 |
case True |
|
9257 |
then show "norm (f b) / norm b * norm x \<le> norm (f x)" |
|
9258 |
by auto |
|
9259 |
next |
|
9260 |
case False |
|
9261 |
with \<open>a \<noteq> 0\<close> have *: "0 < norm a / norm x" |
|
9262 |
unfolding zero_less_norm_iff[symmetric] by simp |
|
9263 |
have "\<forall>x\<in>s. c *\<^sub>R x \<in> s" for c |
|
9264 |
using s[unfolded subspace_def] by simp |
|
9265 |
with \<open>x \<in> s\<close> \<open>x \<noteq> 0\<close> have "(norm a / norm x) *\<^sub>R x \<in> {x \<in> s. norm x = norm a}" |
|
9266 |
by simp |
|
9267 |
with \<open>x \<noteq> 0\<close> \<open>a \<noteq> 0\<close> show "norm (f b) / norm b * norm x \<le> norm (f x)" |
|
9268 |
using b[THEN bspec[where x="(norm a / norm x) *\<^sub>R x"]] |
|
9269 |
unfolding f.scaleR and ba |
|
9270 |
by (auto simp: mult.commute pos_le_divide_eq pos_divide_le_eq) |
|
9271 |
qed |
|
52625 | 9272 |
ultimately show ?thesis by auto |
33175 | 9273 |
qed |
9274 |
||
9275 |
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
|
9276 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
53282 | 9277 |
assumes "subspace s" "bounded_linear f" "\<forall>x\<in>s. f x = 0 \<longrightarrow> x = 0" "closed s" |
33175 | 9278 |
shows "closed(f ` s)" |
53282 | 9279 |
proof - |
9280 |
obtain e where "e > 0" and e: "\<forall>x\<in>s. e * norm x \<le> norm (f x)" |
|
52625 | 9281 |
using injective_imp_isometric[OF assms(4,1,2,3)] by auto |
9282 |
show ?thesis |
|
60420 | 9283 |
using complete_isometric_image[OF \<open>e>0\<close> assms(1,2) e] and assms(4) |
53291 | 9284 |
unfolding complete_eq_closed[symmetric] by auto |
33175 | 9285 |
qed |
9286 |
||
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
9287 |
|
60420 | 9288 |
subsection \<open>Some properties of a canonical subspace\<close> |
33175 | 9289 |
|
64539 | 9290 |
lemma subspace_substandard: "subspace {x::'a::euclidean_space. (\<forall>i\<in>Basis. P i \<longrightarrow> x\<bullet>i = 0)}" |
9291 |
by (auto simp: subspace_def inner_add_left) |
|
9292 |
||
9293 |
lemma closed_substandard: "closed {x::'a::euclidean_space. \<forall>i\<in>Basis. P i \<longrightarrow> x\<bullet>i = 0}" |
|
9294 |
(is "closed ?A") |
|
52625 | 9295 |
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
|
9296 |
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
|
9297 |
have "closed (\<Inter>i\<in>?D. {x::'a. x\<bullet>i = 0})" |
64539 | 9298 |
by (simp add: closed_INT closed_Collect_eq continuous_on_inner |
9299 |
continuous_on_const continuous_on_id) |
|
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
|
9300 |
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
|
9301 |
by auto |
d366fa5551ef
declare euclidean_simps [simp] at the point they are proved;
huffman
parents:
44365
diff
changeset
|
9302 |
finally show "closed ?A" . |
33175 | 9303 |
qed |
9304 |
||
52625 | 9305 |
lemma dim_substandard: |
9306 |
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
|
9307 |
shows "dim {x::'a::euclidean_space. \<forall>i\<in>Basis. i \<notin> d \<longrightarrow> x\<bullet>i = 0} = card d" (is "dim ?A = _") |
53813 | 9308 |
proof (rule dim_unique) |
64539 | 9309 |
from d show "d \<subseteq> ?A" |
9310 |
by (auto simp: inner_Basis) |
|
9311 |
from d show "independent d" |
|
9312 |
by (rule independent_mono [OF independent_Basis]) |
|
9313 |
have "x \<in> span d" if "\<forall>i\<in>Basis. i \<notin> d \<longrightarrow> x \<bullet> i = 0" for x |
|
9314 |
proof - |
|
53813 | 9315 |
have "finite d" |
64539 | 9316 |
by (rule finite_subset [OF d finite_Basis]) |
53813 | 9317 |
then have "(\<Sum>i\<in>d. (x \<bullet> i) *\<^sub>R i) \<in> span d" |
64267 | 9318 |
by (simp add: span_sum span_clauses) |
53813 | 9319 |
also have "(\<Sum>i\<in>d. (x \<bullet> i) *\<^sub>R i) = (\<Sum>i\<in>Basis. (x \<bullet> i) *\<^sub>R i)" |
64539 | 9320 |
by (rule sum.mono_neutral_cong_left [OF finite_Basis d]) (auto simp: that) |
53813 | 9321 |
finally show "x \<in> span d" |
64539 | 9322 |
by (simp only: euclidean_representation) |
53813 | 9323 |
qed |
64539 | 9324 |
then show "?A \<subseteq> span d" by auto |
53813 | 9325 |
qed simp |
33175 | 9326 |
|
64539 | 9327 |
text \<open>Hence closure and completeness of all subspaces.\<close> |
53282 | 9328 |
lemma ex_card: |
9329 |
assumes "n \<le> card A" |
|
9330 |
shows "\<exists>S\<subseteq>A. card S = n" |
|
64539 | 9331 |
proof (cases "finite A") |
9332 |
case True |
|
55522 | 9333 |
from ex_bij_betw_nat_finite[OF this] obtain f where f: "bij_betw f {0..<card A} A" .. |
60420 | 9334 |
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
|
9335 |
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
|
9336 |
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
|
9337 |
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
|
9338 |
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
|
9339 |
next |
64539 | 9340 |
case False |
60420 | 9341 |
with \<open>n \<le> card A\<close> show ?thesis by force |
52625 | 9342 |
qed |
9343 |
||
9344 |
lemma closed_subspace: |
|
53291 | 9345 |
fixes s :: "'a::euclidean_space set" |
52625 | 9346 |
assumes "subspace s" |
9347 |
shows "closed s" |
|
9348 |
proof - |
|
9349 |
have "dim s \<le> card (Basis :: 'a set)" |
|
9350 |
using dim_subset_UNIV by auto |
|
9351 |
with ex_card[OF this] obtain d :: "'a set" where t: "card d = dim s" and d: "d \<subseteq> Basis" |
|
9352 |
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
|
9353 |
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
|
9354 |
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
|
9355 |
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
|
9356 |
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
|
9357 |
by (intro subspace_isomorphism[OF subspace_substandard[of "\<lambda>i. i \<notin> d"]]) (auto simp: inner_Basis) |
55522 | 9358 |
then obtain f where f: |
9359 |
"linear f" |
|
9360 |
"f ` {x. \<forall>i\<in>Basis. i \<notin> d \<longrightarrow> x \<bullet> i = 0} = s" |
|
9361 |
"inj_on f {x. \<forall>i\<in>Basis. i \<notin> d \<longrightarrow> x \<bullet> i = 0}" |
|
9362 |
by blast |
|
52625 | 9363 |
interpret f: bounded_linear f |
64539 | 9364 |
using f by (simp add: linear_conv_bounded_linear) |
9365 |
have "x \<in> ?t \<Longrightarrow> f x = 0 \<Longrightarrow> x = 0" for x |
|
9366 |
using f.zero d f(3)[THEN inj_onD, of x 0] by auto |
|
9367 |
moreover have "closed ?t" by (rule closed_substandard) |
|
9368 |
moreover have "subspace ?t" by (rule subspace_substandard) |
|
52625 | 9369 |
ultimately show ?thesis |
9370 |
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
|
9371 |
unfolding f(2) using f(1) unfolding linear_conv_bounded_linear by auto |
33175 | 9372 |
qed |
9373 |
||
64539 | 9374 |
lemma complete_subspace: "subspace s \<Longrightarrow> complete s" |
9375 |
for s :: "'a::euclidean_space set" |
|
52625 | 9376 |
using complete_eq_closed closed_subspace by auto |
33175 | 9377 |
|
64539 | 9378 |
lemma closed_span [iff]: "closed (span s)" |
9379 |
for s :: "'a::euclidean_space set" |
|
9380 |
by (simp add: closed_subspace) |
|
9381 |
||
9382 |
lemma dim_closure [simp]: "dim (closure s) = dim s" (is "?dc = ?d") |
|
9383 |
for s :: "'a::euclidean_space set" |
|
9384 |
proof - |
|
9385 |
have "?dc \<le> ?d" |
|
9386 |
using closure_minimal[OF span_inc, of s] |
|
33175 | 9387 |
using closed_subspace[OF subspace_span, of s] |
52625 | 9388 |
using dim_subset[of "closure s" "span s"] |
64539 | 9389 |
by simp |
9390 |
then show ?thesis |
|
9391 |
using dim_subset[OF closure_subset, of s] |
|
9392 |
by simp |
|
33175 | 9393 |
qed |
9394 |
||
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
9395 |
|
60420 | 9396 |
subsection \<open>Affine transformations of intervals\<close> |
33175 | 9397 |
|
64539 | 9398 |
lemma real_affinity_le: "0 < m \<Longrightarrow> m * x + c \<le> y \<longleftrightarrow> x \<le> inverse m * y + - (c / m)" |
9399 |
for m :: "'a::linordered_field" |
|
57865 | 9400 |
by (simp add: field_simps) |
33175 | 9401 |
|
64539 | 9402 |
lemma real_le_affinity: "0 < m \<Longrightarrow> y \<le> m * x + c \<longleftrightarrow> inverse m * y + - (c / m) \<le> x" |
9403 |
for m :: "'a::linordered_field" |
|
57865 | 9404 |
by (simp add: field_simps) |
33175 | 9405 |
|
64539 | 9406 |
lemma real_affinity_lt: "0 < m \<Longrightarrow> m * x + c < y \<longleftrightarrow> x < inverse m * y + - (c / m)" |
9407 |
for m :: "'a::linordered_field" |
|
57865 | 9408 |
by (simp add: field_simps) |
33175 | 9409 |
|
64539 | 9410 |
lemma real_lt_affinity: "0 < m \<Longrightarrow> y < m * x + c \<longleftrightarrow> inverse m * y + - (c / m) < x" |
9411 |
for m :: "'a::linordered_field" |
|
57865 | 9412 |
by (simp add: field_simps) |
33175 | 9413 |
|
64539 | 9414 |
lemma real_affinity_eq: "m \<noteq> 0 \<Longrightarrow> m * x + c = y \<longleftrightarrow> x = inverse m * y + - (c / m)" |
9415 |
for m :: "'a::linordered_field" |
|
57865 | 9416 |
by (simp add: field_simps) |
33175 | 9417 |
|
64539 | 9418 |
lemma real_eq_affinity: "m \<noteq> 0 \<Longrightarrow> y = m * x + c \<longleftrightarrow> inverse m * y + - (c / m) = x" |
9419 |
for m :: "'a::linordered_field" |
|
57865 | 9420 |
by (simp add: field_simps) |
33175 | 9421 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
9422 |
|
64539 | 9423 |
subsection \<open>Banach fixed point theorem (not really topological ...)\<close> |
33175 | 9424 |
|
60974
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
9425 |
theorem banach_fix: |
53282 | 9426 |
assumes s: "complete s" "s \<noteq> {}" |
9427 |
and c: "0 \<le> c" "c < 1" |
|
64539 | 9428 |
and f: "f ` s \<subseteq> s" |
53291 | 9429 |
and lipschitz: "\<forall>x\<in>s. \<forall>y\<in>s. dist (f x) (f y) \<le> c * dist x y" |
9430 |
shows "\<exists>!x\<in>s. f x = x" |
|
53282 | 9431 |
proof - |
64539 | 9432 |
from c have "1 - c > 0" by simp |
9433 |
||
9434 |
from s(2) obtain z0 where z0: "z0 \<in> s" by blast |
|
63040 | 9435 |
define z where "z n = (f ^^ n) z0" for n |
64539 | 9436 |
with f z0 have z_in_s: "z n \<in> s" for n :: nat |
9437 |
by (induct n) auto |
|
63040 | 9438 |
define d where "d = dist (z 0) (z 1)" |
33175 | 9439 |
|
64539 | 9440 |
have fzn: "f (z n) = z (Suc n)" for n |
9441 |
by (simp add: z_def) |
|
9442 |
have cf_z: "dist (z n) (z (Suc n)) \<le> (c ^ n) * d" for n :: nat |
|
9443 |
proof (induct n) |
|
9444 |
case 0 |
|
9445 |
then show ?case |
|
9446 |
by (simp add: d_def) |
|
9447 |
next |
|
9448 |
case (Suc m) |
|
9449 |
with \<open>0 \<le> c\<close> have "c * dist (z m) (z (Suc m)) \<le> c ^ Suc m * d" |
|
9450 |
using mult_left_mono[of "dist (z m) (z (Suc m))" "c ^ m * d" c] by simp |
|
9451 |
then show ?case |
|
9452 |
using lipschitz[THEN bspec[where x="z m"], OF z_in_s, THEN bspec[where x="z (Suc m)"], OF z_in_s] |
|
9453 |
by (simp add: fzn mult_le_cancel_left) |
|
9454 |
qed |
|
9455 |
||
9456 |
have cf_z2: "(1 - c) * dist (z m) (z (m + n)) \<le> (c ^ m) * d * (1 - c ^ n)" for n m :: nat |
|
9457 |
proof (induct n) |
|
9458 |
case 0 |
|
9459 |
show ?case by simp |
|
9460 |
next |
|
9461 |
case (Suc k) |
|
9462 |
from c have "(1 - c) * dist (z m) (z (m + Suc k)) \<le> |
|
9463 |
(1 - c) * (dist (z m) (z (m + k)) + dist (z (m + k)) (z (Suc (m + k))))" |
|
9464 |
by (simp add: dist_triangle) |
|
9465 |
also from c cf_z[of "m + k"] have "\<dots> \<le> (1 - c) * (dist (z m) (z (m + k)) + c ^ (m + k) * d)" |
|
9466 |
by simp |
|
9467 |
also from Suc have "\<dots> \<le> c ^ m * d * (1 - c ^ k) + (1 - c) * c ^ (m + k) * d" |
|
9468 |
by (simp add: field_simps) |
|
9469 |
also have "\<dots> = (c ^ m) * (d * (1 - c ^ k) + (1 - c) * c ^ k * d)" |
|
9470 |
by (simp add: power_add field_simps) |
|
9471 |
also from c have "\<dots> \<le> (c ^ m) * d * (1 - c ^ Suc k)" |
|
9472 |
by (simp add: field_simps) |
|
9473 |
finally show ?case by simp |
|
9474 |
qed |
|
9475 |
||
9476 |
have "\<exists>N. \<forall>m n. N \<le> m \<and> N \<le> n \<longrightarrow> dist (z m) (z n) < e" if "e > 0" for e |
|
9477 |
proof (cases "d = 0") |
|
9478 |
case True |
|
9479 |
from \<open>1 - c > 0\<close> have "(1 - c) * x \<le> 0 \<longleftrightarrow> x \<le> 0" for x |
|
9480 |
by (metis mult_zero_left mult.commute real_mult_le_cancel_iff1) |
|
9481 |
with c cf_z2[of 0] True have "z n = z0" for n |
|
9482 |
by (simp add: z_def) |
|
9483 |
with \<open>e > 0\<close> show ?thesis by simp |
|
9484 |
next |
|
9485 |
case False |
|
9486 |
with zero_le_dist[of "z 0" "z 1"] have "d > 0" |
|
9487 |
by (metis d_def less_le) |
|
9488 |
with \<open>1 - c > 0\<close> \<open>e > 0\<close> have "0 < e * (1 - c) / d" |
|
9489 |
by simp |
|
9490 |
with c obtain N where N: "c ^ N < e * (1 - c) / d" |
|
9491 |
using real_arch_pow_inv[of "e * (1 - c) / d" c] by auto |
|
9492 |
have *: "dist (z m) (z n) < e" if "m > n" and as: "m \<ge> N" "n \<ge> N" for m n :: nat |
|
9493 |
proof - |
|
9494 |
from c \<open>n \<ge> N\<close> have *: "c ^ n \<le> c ^ N" |
|
9495 |
using power_decreasing[OF \<open>n\<ge>N\<close>, of c] by simp |
|
9496 |
from c \<open>m > n\<close> have "1 - c ^ (m - n) > 0" |
|
9497 |
using power_strict_mono[of c 1 "m - n"] by simp |
|
9498 |
with \<open>d > 0\<close> \<open>0 < 1 - c\<close> have **: "d * (1 - c ^ (m - n)) / (1 - c) > 0" |
|
9499 |
by simp |
|
9500 |
from cf_z2[of n "m - n"] \<open>m > n\<close> |
|
9501 |
have "dist (z m) (z n) \<le> c ^ n * d * (1 - c ^ (m - n)) / (1 - c)" |
|
9502 |
by (simp add: pos_le_divide_eq[OF \<open>1 - c > 0\<close>] mult.commute dist_commute) |
|
9503 |
also have "\<dots> \<le> c ^ N * d * (1 - c ^ (m - n)) / (1 - c)" |
|
9504 |
using mult_right_mono[OF * order_less_imp_le[OF **]] |
|
9505 |
by (simp add: mult.assoc) |
|
9506 |
also have "\<dots> < (e * (1 - c) / d) * d * (1 - c ^ (m - n)) / (1 - c)" |
|
9507 |
using mult_strict_right_mono[OF N **] by (auto simp add: mult.assoc) |
|
9508 |
also from c \<open>d > 0\<close> \<open>1 - c > 0\<close> have "\<dots> = e * (1 - c ^ (m - n))" |
|
9509 |
by simp |
|
9510 |
also from c \<open>1 - c ^ (m - n) > 0\<close> \<open>e > 0\<close> have "\<dots> \<le> e" |
|
9511 |
using mult_right_le_one_le[of e "1 - c ^ (m - n)"] by auto |
|
9512 |
finally show ?thesis by simp |
|
33175 | 9513 |
qed |
64539 | 9514 |
have "dist (z n) (z m) < e" if "N \<le> m" "N \<le> n" for m n :: nat |
9515 |
proof (cases "n = m") |
|
33175 | 9516 |
case True |
64539 | 9517 |
with \<open>e > 0\<close> show ?thesis by simp |
33175 | 9518 |
next |
52625 | 9519 |
case False |
64539 | 9520 |
with *[of n m] *[of m n] and that show ?thesis |
9521 |
by (auto simp add: dist_commute nat_neq_iff) |
|
33175 | 9522 |
qed |
64539 | 9523 |
then show ?thesis by auto |
9524 |
qed |
|
53282 | 9525 |
then have "Cauchy z" |
64539 | 9526 |
by (simp add: cauchy_def) |
61973 | 9527 |
then obtain x where "x\<in>s" and x:"(z \<longlongrightarrow> x) sequentially" |
52625 | 9528 |
using s(1)[unfolded compact_def complete_def, THEN spec[where x=z]] and z_in_s by auto |
33175 | 9529 |
|
63040 | 9530 |
define e where "e = dist (f x) x" |
52625 | 9531 |
have "e = 0" |
9532 |
proof (rule ccontr) |
|
9533 |
assume "e \<noteq> 0" |
|
53282 | 9534 |
then have "e > 0" |
9535 |
unfolding e_def using zero_le_dist[of "f x" x] |
|
33175 | 9536 |
by (metis dist_eq_0_iff dist_nz e_def) |
9537 |
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
|
9538 |
using x[unfolded lim_sequentially, THEN spec[where x="e/2"]] by auto |
53282 | 9539 |
then have N':"dist (z N) x < e / 2" by auto |
9540 |
have *: "c * dist (z N) x \<le> dist (z N) x" |
|
52625 | 9541 |
unfolding mult_le_cancel_right2 |
33175 | 9542 |
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
|
9543 |
by (metis dist_eq_0_iff dist_nz order_less_asym less_le) |
52625 | 9544 |
have "dist (f (z N)) (f x) \<le> c * dist (z N) x" |
9545 |
using lipschitz[THEN bspec[where x="z N"], THEN bspec[where x=x]] |
|
60420 | 9546 |
using z_in_s[of N] \<open>x\<in>s\<close> |
52625 | 9547 |
using c |
9548 |
by auto |
|
9549 |
also have "\<dots> < e / 2" |
|
9550 |
using N' and c using * by auto |
|
9551 |
finally show False |
|
9552 |
unfolding fzn |
|
33175 | 9553 |
using N[THEN spec[where x="Suc N"]] and dist_triangle_half_r[of "z (Suc N)" "f x" e x] |
52625 | 9554 |
unfolding e_def |
9555 |
by auto |
|
33175 | 9556 |
qed |
64539 | 9557 |
then have "f x = x" by (auto simp: e_def) |
9558 |
moreover have "y = x" if "f y = y" "y \<in> s" for y |
|
9559 |
proof - |
|
9560 |
from \<open>x \<in> s\<close> \<open>f x = x\<close> that have "dist x y \<le> c * dist x y" |
|
9561 |
using lipschitz[THEN bspec[where x=x], THEN bspec[where x=y]] by simp |
|
9562 |
with c and zero_le_dist[of x y] have "dist x y = 0" |
|
9563 |
by (simp add: mult_le_cancel_right1) |
|
9564 |
then show ?thesis by simp |
|
9565 |
qed |
|
9566 |
ultimately show ?thesis |
|
9567 |
using \<open>x\<in>s\<close> by blast |
|
60420 | 9568 |
qed |
9569 |
||
9570 |
||
9571 |
subsection \<open>Edelstein fixed point theorem\<close> |
|
33175 | 9572 |
|
60974
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
9573 |
theorem edelstein_fix: |
50970
3e5b67f85bf9
generalized theorem edelstein_fix to class metric_space
huffman
parents:
50955
diff
changeset
|
9574 |
fixes s :: "'a::metric_space set" |
52625 | 9575 |
assumes s: "compact s" "s \<noteq> {}" |
9576 |
and gs: "(g ` s) \<subseteq> s" |
|
9577 |
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
|
9578 |
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
|
9579 |
proof - |
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
9580 |
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
|
9581 |
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
|
9582 |
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
|
9583 |
(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
|
9584 |
|
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
9585 |
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
|
9586 |
using dist by fastforce |
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
9587 |
then have "continuous_on s g" |
64539 | 9588 |
by (auto simp: continuous_on_iff) |
51347
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
9589 |
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
|
9590 |
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
|
9591 |
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
|
9592 |
(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
|
9593 |
|
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
9594 |
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
|
9595 |
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
|
9596 |
|
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
9597 |
have "g a = a" |
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
9598 |
proof (rule ccontr) |
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
9599 |
assume "g a \<noteq> a" |
60420 | 9600 |
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
|
9601 |
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
|
9602 |
moreover have "dist (g a) a \<le> dist (g (g a)) (g a)" |
60420 | 9603 |
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
|
9604 |
ultimately show False by auto |
33175 | 9605 |
qed |
51347
f8a00792fbc1
tuned proof of Edelstein fixed point theorem (use continuity of dist and attains_sup)
hoelzl
parents:
51346
diff
changeset
|
9606 |
moreover have "\<And>x. x \<in> s \<Longrightarrow> g x = x \<Longrightarrow> x = a" |
60420 | 9607 |
using dist[THEN bspec[where x=a]] \<open>g a = a\<close> and \<open>a\<in>s\<close> by auto |
64539 | 9608 |
ultimately show "\<exists>!x\<in>s. g x = x" |
9609 |
using \<open>a \<in> s\<close> by blast |
|
33175 | 9610 |
qed |
9611 |
||
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
|
9612 |
|
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
9613 |
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
|
9614 |
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
|
9615 |
shows "cball a r \<subseteq> cball a' r' \<longleftrightarrow> dist a a' + r \<le> r' \<or> r < 0" |
64539 | 9616 |
(is "?lhs \<longleftrightarrow> ?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
|
9617 |
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
|
9618 |
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
|
9619 |
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
|
9620 |
proof (cases "r < 0") |
64539 | 9621 |
case True |
9622 |
then show ?rhs by simp |
|
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
|
9623 |
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
|
9624 |
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
|
9625 |
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
|
9626 |
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
|
9627 |
proof (cases "a = a'") |
64539 | 9628 |
case True |
9629 |
then show ?thesis |
|
9630 |
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>] |
|
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
|
9631 |
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
|
9632 |
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
|
9633 |
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
|
9634 |
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
|
9635 |
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
|
9636 |
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
|
9637 |
by (simp add: algebra_simps) |
64539 | 9638 |
also from \<open>a \<noteq> a'\<close> have "... = \<bar>- norm (a - a') - r\<bar>" |
9639 |
by (simp add: abs_mult_pos field_simps) |
|
9640 |
finally have [simp]: "norm (a' - (a + (r / norm (a - a')) *\<^sub>R (a - a'))) = \<bar>norm (a - a') + r\<bar>" |
|
9641 |
by linarith |
|
9642 |
from \<open>a \<noteq> a'\<close> show ?thesis |
|
9643 |
using subsetD [where c = "a' + (1 + r / norm(a - a')) *\<^sub>R (a - a')", OF \<open>?lhs\<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
|
9644 |
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
|
9645 |
qed |
64539 | 9646 |
then show ?rhs |
9647 |
by (simp add: dist_norm) |
|
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
|
9648 |
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
|
9649 |
next |
64539 | 9650 |
assume ?rhs |
9651 |
then show ?lhs |
|
9652 |
by (auto simp: ball_def dist_norm) |
|
9653 |
(metis add.commute add_le_cancel_right dist_norm dist_triangle3 order_trans) |
|
9654 |
qed |
|
9655 |
||
9656 |
lemma cball_subset_ball_iff: "cball a r \<subseteq> ball a' r' \<longleftrightarrow> dist a a' + r < r' \<or> r < 0" |
|
9657 |
(is "?lhs \<longleftrightarrow> ?rhs") |
|
9658 |
for a :: "'a::euclidean_space" |
|
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
|
9659 |
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
|
9660 |
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
|
9661 |
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
|
9662 |
proof (cases "r < 0") |
64539 | 9663 |
case True then |
9664 |
show ?rhs by simp |
|
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
|
9665 |
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
|
9666 |
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
|
9667 |
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
|
9668 |
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
|
9669 |
proof (cases "a = a'") |
64539 | 9670 |
case True |
9671 |
then show ?thesis |
|
9672 |
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>] |
|
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
|
9673 |
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
|
9674 |
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
|
9675 |
case False |
64539 | 9676 |
have False if "norm (a - a') + r \<ge> r'" |
9677 |
proof - |
|
9678 |
from that have "\<bar>r' - norm (a - a')\<bar> \<le> r" |
|
9679 |
by (simp split: abs_split) |
|
9680 |
(metis \<open>0 \<le> r\<close> \<open>?lhs\<close> centre_in_cball dist_commute dist_norm less_asym mem_ball subset_eq) |
|
9681 |
then show ?thesis |
|
9682 |
using subsetD [where c = "a + (r' / norm(a - a') - 1) *\<^sub>R (a - a')", OF \<open>?lhs\<close>] \<open>a \<noteq> a'\<close> |
|
9683 |
by (simp add: dist_norm field_simps) |
|
9684 |
(simp add: diff_divide_distrib scaleR_left_diff_distrib) |
|
9685 |
qed |
|
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
|
9686 |
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
|
9687 |
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
|
9688 |
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
|
9689 |
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
|
9690 |
next |
64539 | 9691 |
assume ?rhs |
9692 |
then show ?lhs |
|
9693 |
by (auto simp: ball_def dist_norm) |
|
9694 |
(metis add.commute add_le_cancel_right dist_norm dist_triangle3 le_less_trans) |
|
9695 |
qed |
|
9696 |
||
9697 |
lemma ball_subset_cball_iff: "ball a r \<subseteq> cball a' r' \<longleftrightarrow> dist a a' + r \<le> r' \<or> r \<le> 0" |
|
9698 |
(is "?lhs = ?rhs") |
|
9699 |
for a :: "'a::euclidean_space" |
|
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
|
9700 |
proof (cases "r \<le> 0") |
64539 | 9701 |
case True |
9702 |
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
|
9703 |
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
|
9704 |
next |
64539 | 9705 |
case False |
9706 |
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
|
9707 |
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
|
9708 |
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
|
9709 |
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
|
9710 |
by (metis False closed_cball closure_ball closure_closed closure_mono not_less) |
64539 | 9711 |
with False show ?rhs |
9712 |
by (fastforce iff: cball_subset_cball_iff) |
|
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
|
9713 |
next |
64539 | 9714 |
assume ?rhs |
9715 |
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
|
9716 |
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
|
9717 |
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
|
9718 |
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
|
9719 |
|
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
9720 |
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
|
9721 |
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
|
9722 |
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
|
9723 |
(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
|
9724 |
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
|
9725 |
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
|
9726 |
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
|
9727 |
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
|
9728 |
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
|
9729 |
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
|
9730 |
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
|
9731 |
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
|
9732 |
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
|
9733 |
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
|
9734 |
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
|
9735 |
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
|
9736 |
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
|
9737 |
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
|
9738 |
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
|
9739 |
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
|
9740 |
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
|
9741 |
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
|
9742 |
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
|
9743 |
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
|
9744 |
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
|
9745 |
|
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
9746 |
|
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
9747 |
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
|
9748 |
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
|
9749 |
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
|
9750 |
(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
|
9751 |
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
|
9752 |
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
|
9753 |
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
|
9754 |
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
|
9755 |
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
|
9756 |
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
|
9757 |
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
|
9758 |
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
|
9759 |
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
|
9760 |
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
|
9761 |
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
|
9762 |
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
|
9763 |
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
|
9764 |
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
|
9765 |
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
|
9766 |
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
|
9767 |
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
|
9768 |
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
|
9769 |
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
|
9770 |
|
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
9771 |
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
|
9772 |
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
|
9773 |
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
|
9774 |
(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
|
9775 |
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
|
9776 |
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
|
9777 |
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
|
9778 |
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
|
9779 |
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
|
9780 |
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
|
9781 |
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
|
9782 |
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
|
9783 |
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
|
9784 |
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
|
9785 |
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
|
9786 |
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
|
9787 |
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
|
9788 |
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
|
9789 |
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
|
9790 |
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
|
9791 |
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
|
9792 |
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
|
9793 |
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
|
9794 |
|
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
9795 |
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
|
9796 |
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
|
9797 |
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
|
9798 |
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
|
9799 |
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
|
9800 |
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
|
9801 |
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
|
9802 |
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
|
9803 |
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
|
9804 |
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
|
9805 |
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
|
9806 |
next |
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
9807 |
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
|
9808 |
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
|
9809 |
|
6571c78c9667
Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents:
61609
diff
changeset
|
9810 |
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
|
9811 |
fixes x :: "'a :: euclidean_space" |
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61907
diff
changeset
|
9812 |
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
|
9813 |
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
|
9814 |
|
63151
82df5181d699
updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents:
63128
diff
changeset
|
9815 |
lemma finite_ball_avoid: |
82df5181d699
updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents:
63128
diff
changeset
|
9816 |
fixes S :: "'a :: euclidean_space set" |
82df5181d699
updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents:
63128
diff
changeset
|
9817 |
assumes "open S" "finite X" "p \<in> S" |
82df5181d699
updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents:
63128
diff
changeset
|
9818 |
shows "\<exists>e>0. \<forall>w\<in>ball p e. w\<in>S \<and> (w\<noteq>p \<longrightarrow> w\<notin>X)" |
82df5181d699
updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents:
63128
diff
changeset
|
9819 |
proof - |
63301 | 9820 |
obtain e1 where "0 < e1" and e1_b:"ball p e1 \<subseteq> S" |
63151
82df5181d699
updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents:
63128
diff
changeset
|
9821 |
using open_contains_ball_eq[OF \<open>open S\<close>] assms by auto |
63301 | 9822 |
obtain e2 where "0 < e2" and "\<forall>x\<in>X. x \<noteq> p \<longrightarrow> e2 \<le> dist p x" |
63151
82df5181d699
updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents:
63128
diff
changeset
|
9823 |
using finite_set_avoid[OF \<open>finite X\<close>,of p] by auto |
82df5181d699
updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents:
63128
diff
changeset
|
9824 |
hence "\<forall>w\<in>ball p (min e1 e2). w\<in>S \<and> (w\<noteq>p \<longrightarrow> w\<notin>X)" using e1_b by auto |
63301 | 9825 |
thus "\<exists>e>0. \<forall>w\<in>ball p e. w \<in> S \<and> (w \<noteq> p \<longrightarrow> w \<notin> X)" using \<open>e2>0\<close> \<open>e1>0\<close> |
63151
82df5181d699
updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents:
63128
diff
changeset
|
9826 |
apply (rule_tac x="min e1 e2" in exI) |
82df5181d699
updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents:
63128
diff
changeset
|
9827 |
by auto |
82df5181d699
updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents:
63128
diff
changeset
|
9828 |
qed |
82df5181d699
updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents:
63128
diff
changeset
|
9829 |
|
82df5181d699
updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents:
63128
diff
changeset
|
9830 |
lemma finite_cball_avoid: |
82df5181d699
updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents:
63128
diff
changeset
|
9831 |
fixes S :: "'a :: euclidean_space set" |
82df5181d699
updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents:
63128
diff
changeset
|
9832 |
assumes "open S" "finite X" "p \<in> S" |
82df5181d699
updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents:
63128
diff
changeset
|
9833 |
shows "\<exists>e>0. \<forall>w\<in>cball p e. w\<in>S \<and> (w\<noteq>p \<longrightarrow> w\<notin>X)" |
82df5181d699
updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents:
63128
diff
changeset
|
9834 |
proof - |
63301 | 9835 |
obtain e1 where "e1>0" and e1: "\<forall>w\<in>ball p e1. w\<in>S \<and> (w\<noteq>p \<longrightarrow> w\<notin>X)" |
63151
82df5181d699
updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents:
63128
diff
changeset
|
9836 |
using finite_ball_avoid[OF assms] by auto |
82df5181d699
updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents:
63128
diff
changeset
|
9837 |
define e2 where "e2 \<equiv> e1/2" |
82df5181d699
updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents:
63128
diff
changeset
|
9838 |
have "e2>0" and "e2 < e1" unfolding e2_def using \<open>e1>0\<close> by auto |
82df5181d699
updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents:
63128
diff
changeset
|
9839 |
then have "cball p e2 \<subseteq> ball p e1" by (subst cball_subset_ball_iff,auto) |
82df5181d699
updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents:
63128
diff
changeset
|
9840 |
then show "\<exists>e>0. \<forall>w\<in>cball p e. w \<in> S \<and> (w \<noteq> p \<longrightarrow> w \<notin> X)" using \<open>e2>0\<close> e1 by auto |
82df5181d699
updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents:
63128
diff
changeset
|
9841 |
qed |
82df5181d699
updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents:
63128
diff
changeset
|
9842 |
|
63301 | 9843 |
subsection\<open>Various separability-type properties\<close> |
9844 |
||
9845 |
lemma univ_second_countable: |
|
9846 |
obtains \<B> :: "'a::euclidean_space set set" |
|
9847 |
where "countable \<B>" "\<And>C. C \<in> \<B> \<Longrightarrow> open C" |
|
9848 |
"\<And>S. open S \<Longrightarrow> \<exists>U. U \<subseteq> \<B> \<and> S = \<Union>U" |
|
9849 |
by (metis ex_countable_basis topological_basis_def) |
|
9850 |
||
9851 |
lemma univ_second_countable_sequence: |
|
9852 |
obtains B :: "nat \<Rightarrow> 'a::euclidean_space set" |
|
9853 |
where "inj B" "\<And>n. open(B n)" "\<And>S. open S \<Longrightarrow> \<exists>k. S = \<Union>{B n |n. n \<in> k}" |
|
9854 |
proof - |
|
9855 |
obtain \<B> :: "'a set set" |
|
9856 |
where "countable \<B>" |
|
9857 |
and op: "\<And>C. C \<in> \<B> \<Longrightarrow> open C" |
|
9858 |
and Un: "\<And>S. open S \<Longrightarrow> \<exists>U. U \<subseteq> \<B> \<and> S = \<Union>U" |
|
9859 |
using univ_second_countable by blast |
|
9860 |
have *: "infinite (range (\<lambda>n. ball (0::'a) (inverse(Suc n))))" |
|
9861 |
apply (rule Infinite_Set.range_inj_infinite) |
|
9862 |
apply (simp add: inj_on_def ball_eq_ball_iff) |
|
9863 |
done |
|
9864 |
have "infinite \<B>" |
|
9865 |
proof |
|
9866 |
assume "finite \<B>" |
|
9867 |
then have "finite (Union ` (Pow \<B>))" |
|
9868 |
by simp |
|
9869 |
then have "finite (range (\<lambda>n. ball (0::'a) (inverse(Suc n))))" |
|
9870 |
apply (rule rev_finite_subset) |
|
9871 |
by (metis (no_types, lifting) PowI image_eqI image_subset_iff Un [OF open_ball]) |
|
9872 |
with * show False by simp |
|
9873 |
qed |
|
9874 |
obtain f :: "nat \<Rightarrow> 'a set" where "\<B> = range f" "inj f" |
|
9875 |
by (blast intro: countable_as_injective_image [OF \<open>countable \<B>\<close> \<open>infinite \<B>\<close>]) |
|
9876 |
have *: "\<exists>k. S = \<Union>{f n |n. n \<in> k}" if "open S" for S |
|
9877 |
using Un [OF that] |
|
9878 |
apply clarify |
|
9879 |
apply (rule_tac x="f-`U" in exI) |
|
9880 |
using \<open>inj f\<close> \<open>\<B> = range f\<close> apply force |
|
9881 |
done |
|
9882 |
show ?thesis |
|
9883 |
apply (rule that [OF \<open>inj f\<close> _ *]) |
|
9884 |
apply (auto simp: \<open>\<B> = range f\<close> op) |
|
9885 |
done |
|
9886 |
qed |
|
9887 |
||
9888 |
proposition Lindelof: |
|
9889 |
fixes \<F> :: "'a::euclidean_space set set" |
|
9890 |
assumes \<F>: "\<And>S. S \<in> \<F> \<Longrightarrow> open S" |
|
9891 |
obtains \<F>' where "\<F>' \<subseteq> \<F>" "countable \<F>'" "\<Union>\<F>' = \<Union>\<F>" |
|
9892 |
proof - |
|
9893 |
obtain \<B> :: "'a set set" |
|
9894 |
where "countable \<B>" "\<And>C. C \<in> \<B> \<Longrightarrow> open C" |
|
9895 |
and \<B>: "\<And>S. open S \<Longrightarrow> \<exists>U. U \<subseteq> \<B> \<and> S = \<Union>U" |
|
9896 |
using univ_second_countable by blast |
|
9897 |
define \<D> where "\<D> \<equiv> {S. S \<in> \<B> \<and> (\<exists>U. U \<in> \<F> \<and> S \<subseteq> U)}" |
|
9898 |
have "countable \<D>" |
|
9899 |
apply (rule countable_subset [OF _ \<open>countable \<B>\<close>]) |
|
9900 |
apply (force simp: \<D>_def) |
|
9901 |
done |
|
9902 |
have "\<And>S. \<exists>U. S \<in> \<D> \<longrightarrow> U \<in> \<F> \<and> S \<subseteq> U" |
|
9903 |
by (simp add: \<D>_def) |
|
9904 |
then obtain G where G: "\<And>S. S \<in> \<D> \<longrightarrow> G S \<in> \<F> \<and> S \<subseteq> G S" |
|
9905 |
by metis |
|
9906 |
have "\<Union>\<F> \<subseteq> \<Union>\<D>" |
|
9907 |
unfolding \<D>_def by (blast dest: \<F> \<B>) |
|
9908 |
moreover have "\<Union>\<D> \<subseteq> \<Union>\<F>" |
|
9909 |
using \<D>_def by blast |
|
9910 |
ultimately have eq1: "\<Union>\<F> = \<Union>\<D>" .. |
|
9911 |
have eq2: "\<Union>\<D> = UNION \<D> G" |
|
9912 |
using G eq1 by auto |
|
9913 |
show ?thesis |
|
9914 |
apply (rule_tac \<F>' = "G ` \<D>" in that) |
|
9915 |
using G \<open>countable \<D>\<close> apply (auto simp: eq1 eq2) |
|
9916 |
done |
|
9917 |
qed |
|
9918 |
||
9919 |
lemma Lindelof_openin: |
|
9920 |
fixes \<F> :: "'a::euclidean_space set set" |
|
9921 |
assumes "\<And>S. S \<in> \<F> \<Longrightarrow> openin (subtopology euclidean U) S" |
|
9922 |
obtains \<F>' where "\<F>' \<subseteq> \<F>" "countable \<F>'" "\<Union>\<F>' = \<Union>\<F>" |
|
9923 |
proof - |
|
9924 |
have "\<And>S. S \<in> \<F> \<Longrightarrow> \<exists>T. open T \<and> S = U \<inter> T" |
|
9925 |
using assms by (simp add: openin_open) |
|
9926 |
then obtain tf where tf: "\<And>S. S \<in> \<F> \<Longrightarrow> open (tf S) \<and> (S = U \<inter> tf S)" |
|
9927 |
by metis |
|
9928 |
have [simp]: "\<And>\<F>'. \<F>' \<subseteq> \<F> \<Longrightarrow> \<Union>\<F>' = U \<inter> \<Union>(tf ` \<F>')" |
|
9929 |
using tf by fastforce |
|
9930 |
obtain \<G> where "countable \<G> \<and> \<G> \<subseteq> tf ` \<F>" "\<Union>\<G> = UNION \<F> tf" |
|
9931 |
using tf by (force intro: Lindelof [of "tf ` \<F>"]) |
|
9932 |
then obtain \<F>' where \<F>': "\<F>' \<subseteq> \<F>" "countable \<F>'" "\<Union>\<F>' = \<Union>\<F>" |
|
9933 |
by (clarsimp simp add: countable_subset_image) |
|
9934 |
then show ?thesis .. |
|
9935 |
qed |
|
9936 |
||
9937 |
lemma countable_disjoint_open_subsets: |
|
9938 |
fixes \<F> :: "'a::euclidean_space set set" |
|
9939 |
assumes "\<And>S. S \<in> \<F> \<Longrightarrow> open S" and pw: "pairwise disjnt \<F>" |
|
9940 |
shows "countable \<F>" |
|
9941 |
proof - |
|
9942 |
obtain \<F>' where "\<F>' \<subseteq> \<F>" "countable \<F>'" "\<Union>\<F>' = \<Union>\<F>" |
|
9943 |
by (meson assms Lindelof) |
|
9944 |
with pw have "\<F> \<subseteq> insert {} \<F>'" |
|
9945 |
by (fastforce simp add: pairwise_def disjnt_iff) |
|
9946 |
then show ?thesis |
|
9947 |
by (simp add: \<open>countable \<F>'\<close> countable_subset) |
|
9948 |
qed |
|
9949 |
||
9950 |
lemma closedin_compact: |
|
9951 |
"\<lbrakk>compact S; closedin (subtopology euclidean S) T\<rbrakk> \<Longrightarrow> compact T" |
|
9952 |
by (metis closedin_closed compact_Int_closed) |
|
9953 |
||
9954 |
lemma closedin_compact_eq: |
|
9955 |
fixes S :: "'a::t2_space set" |
|
9956 |
shows |
|
9957 |
"compact S |
|
9958 |
\<Longrightarrow> (closedin (subtopology euclidean S) T \<longleftrightarrow> |
|
9959 |
compact T \<and> T \<subseteq> S)" |
|
9960 |
by (metis closedin_imp_subset closedin_compact closed_subset compact_imp_closed) |
|
9961 |
||
9962 |
subsection\<open> Finite intersection property\<close> |
|
9963 |
||
9964 |
text\<open>Also developed in HOL's toplogical spaces theory, but the Heine-Borel type class isn't available there.\<close> |
|
9965 |
||
9966 |
lemma closed_imp_fip: |
|
9967 |
fixes S :: "'a::heine_borel set" |
|
9968 |
assumes "closed S" |
|
9969 |
and T: "T \<in> \<F>" "bounded T" |
|
9970 |
and clof: "\<And>T. T \<in> \<F> \<Longrightarrow> closed T" |
|
9971 |
and none: "\<And>\<F>'. \<lbrakk>finite \<F>'; \<F>' \<subseteq> \<F>\<rbrakk> \<Longrightarrow> S \<inter> \<Inter>\<F>' \<noteq> {}" |
|
9972 |
shows "S \<inter> \<Inter>\<F> \<noteq> {}" |
|
9973 |
proof - |
|
9974 |
have "compact (S \<inter> T)" |
|
9975 |
using \<open>closed S\<close> clof compact_eq_bounded_closed T by blast |
|
9976 |
then have "(S \<inter> T) \<inter> \<Inter>\<F> \<noteq> {}" |
|
9977 |
apply (rule compact_imp_fip) |
|
9978 |
apply (simp add: clof) |
|
9979 |
by (metis Int_assoc complete_lattice_class.Inf_insert finite_insert insert_subset none \<open>T \<in> \<F>\<close>) |
|
9980 |
then show ?thesis by blast |
|
9981 |
qed |
|
9982 |
||
9983 |
lemma closed_imp_fip_compact: |
|
9984 |
fixes S :: "'a::heine_borel set" |
|
9985 |
shows |
|
9986 |
"\<lbrakk>closed S; \<And>T. T \<in> \<F> \<Longrightarrow> compact T; |
|
9987 |
\<And>\<F>'. \<lbrakk>finite \<F>'; \<F>' \<subseteq> \<F>\<rbrakk> \<Longrightarrow> S \<inter> \<Inter>\<F>' \<noteq> {}\<rbrakk> |
|
9988 |
\<Longrightarrow> S \<inter> \<Inter>\<F> \<noteq> {}" |
|
9989 |
by (metis Inf_greatest closed_imp_fip compact_eq_bounded_closed empty_subsetI finite.emptyI inf.orderE) |
|
9990 |
||
9991 |
lemma closed_fip_heine_borel: |
|
9992 |
fixes \<F> :: "'a::heine_borel set set" |
|
9993 |
assumes "closed S" "T \<in> \<F>" "bounded T" |
|
9994 |
and "\<And>T. T \<in> \<F> \<Longrightarrow> closed T" |
|
9995 |
and "\<And>\<F>'. \<lbrakk>finite \<F>'; \<F>' \<subseteq> \<F>\<rbrakk> \<Longrightarrow> \<Inter>\<F>' \<noteq> {}" |
|
9996 |
shows "\<Inter>\<F> \<noteq> {}" |
|
9997 |
proof - |
|
9998 |
have "UNIV \<inter> \<Inter>\<F> \<noteq> {}" |
|
9999 |
using assms closed_imp_fip [OF closed_UNIV] by auto |
|
10000 |
then show ?thesis by simp |
|
10001 |
qed |
|
10002 |
||
10003 |
lemma compact_fip_heine_borel: |
|
10004 |
fixes \<F> :: "'a::heine_borel set set" |
|
10005 |
assumes clof: "\<And>T. T \<in> \<F> \<Longrightarrow> compact T" |
|
10006 |
and none: "\<And>\<F>'. \<lbrakk>finite \<F>'; \<F>' \<subseteq> \<F>\<rbrakk> \<Longrightarrow> \<Inter>\<F>' \<noteq> {}" |
|
10007 |
shows "\<Inter>\<F> \<noteq> {}" |
|
10008 |
by (metis InterI all_not_in_conv clof closed_fip_heine_borel compact_eq_bounded_closed none) |
|
10009 |
||
10010 |
lemma compact_sequence_with_limit: |
|
10011 |
fixes f :: "nat \<Rightarrow> 'a::heine_borel" |
|
10012 |
shows "(f \<longlongrightarrow> l) sequentially \<Longrightarrow> compact (insert l (range f))" |
|
10013 |
apply (simp add: compact_eq_bounded_closed, auto) |
|
10014 |
apply (simp add: convergent_imp_bounded) |
|
10015 |
by (simp add: closed_limpt islimpt_insert sequence_unique_limpt) |
|
10016 |
||
63938 | 10017 |
|
10018 |
subsection\<open>Componentwise limits and continuity\<close> |
|
10019 |
||
10020 |
text\<open>But is the premise really necessary? Need to generalise @{thm euclidean_dist_l2}\<close> |
|
10021 |
lemma Euclidean_dist_upper: "i \<in> Basis \<Longrightarrow> dist (x \<bullet> i) (y \<bullet> i) \<le> dist x y" |
|
10022 |
by (metis (no_types) member_le_setL2 euclidean_dist_l2 finite_Basis) |
|
10023 |
||
10024 |
text\<open>But is the premise @{term \<open>i \<in> Basis\<close>} really necessary?\<close> |
|
10025 |
lemma open_preimage_inner: |
|
10026 |
assumes "open S" "i \<in> Basis" |
|
10027 |
shows "open {x. x \<bullet> i \<in> S}" |
|
10028 |
proof (rule openI, simp) |
|
10029 |
fix x |
|
10030 |
assume x: "x \<bullet> i \<in> S" |
|
10031 |
with assms obtain e where "0 < e" and e: "ball (x \<bullet> i) e \<subseteq> S" |
|
10032 |
by (auto simp: open_contains_ball_eq) |
|
10033 |
have "\<exists>e>0. ball (y \<bullet> i) e \<subseteq> S" if dxy: "dist x y < e / 2" for y |
|
10034 |
proof (intro exI conjI) |
|
10035 |
have "dist (x \<bullet> i) (y \<bullet> i) < e / 2" |
|
10036 |
by (meson \<open>i \<in> Basis\<close> dual_order.trans Euclidean_dist_upper not_le that) |
|
10037 |
then have "dist (x \<bullet> i) z < e" if "dist (y \<bullet> i) z < e / 2" for z |
|
10038 |
by (metis dist_commute dist_triangle_half_l that) |
|
10039 |
then have "ball (y \<bullet> i) (e / 2) \<subseteq> ball (x \<bullet> i) e" |
|
10040 |
using mem_ball by blast |
|
10041 |
with e show "ball (y \<bullet> i) (e / 2) \<subseteq> S" |
|
10042 |
by (metis order_trans) |
|
10043 |
qed (simp add: \<open>0 < e\<close>) |
|
10044 |
then show "\<exists>e>0. ball x e \<subseteq> {s. s \<bullet> i \<in> S}" |
|
10045 |
by (metis (no_types, lifting) \<open>0 < e\<close> \<open>open S\<close> half_gt_zero_iff mem_Collect_eq mem_ball open_contains_ball_eq subsetI) |
|
10046 |
qed |
|
10047 |
||
10048 |
proposition tendsto_componentwise_iff: |
|
10049 |
fixes f :: "_ \<Rightarrow> 'b::euclidean_space" |
|
10050 |
shows "(f \<longlongrightarrow> l) F \<longleftrightarrow> (\<forall>i \<in> Basis. ((\<lambda>x. (f x \<bullet> i)) \<longlongrightarrow> (l \<bullet> i)) F)" |
|
10051 |
(is "?lhs = ?rhs") |
|
10052 |
proof |
|
10053 |
assume ?lhs |
|
10054 |
then show ?rhs |
|
10055 |
unfolding tendsto_def |
|
10056 |
apply clarify |
|
10057 |
apply (drule_tac x="{s. s \<bullet> i \<in> S}" in spec) |
|
10058 |
apply (auto simp: open_preimage_inner) |
|
10059 |
done |
|
10060 |
next |
|
10061 |
assume R: ?rhs |
|
10062 |
then have "\<And>e. e > 0 \<Longrightarrow> \<forall>i\<in>Basis. \<forall>\<^sub>F x in F. dist (f x \<bullet> i) (l \<bullet> i) < e" |
|
10063 |
unfolding tendsto_iff by blast |
|
10064 |
then have R': "\<And>e. e > 0 \<Longrightarrow> \<forall>\<^sub>F x in F. \<forall>i\<in>Basis. dist (f x \<bullet> i) (l \<bullet> i) < e" |
|
10065 |
by (simp add: eventually_ball_finite_distrib [symmetric]) |
|
10066 |
show ?lhs |
|
10067 |
unfolding tendsto_iff |
|
10068 |
proof clarify |
|
10069 |
fix e::real |
|
10070 |
assume "0 < e" |
|
10071 |
have *: "setL2 (\<lambda>i. dist (f x \<bullet> i) (l \<bullet> i)) Basis < e" |
|
10072 |
if "\<forall>i\<in>Basis. dist (f x \<bullet> i) (l \<bullet> i) < e / real DIM('b)" for x |
|
10073 |
proof - |
|
64267 | 10074 |
have "setL2 (\<lambda>i. dist (f x \<bullet> i) (l \<bullet> i)) Basis \<le> sum (\<lambda>i. dist (f x \<bullet> i) (l \<bullet> i)) Basis" |
10075 |
by (simp add: setL2_le_sum) |
|
63938 | 10076 |
also have "... < DIM('b) * (e / real DIM('b))" |
64267 | 10077 |
apply (rule sum_bounded_above_strict) |
63938 | 10078 |
using that by auto |
10079 |
also have "... = e" |
|
10080 |
by (simp add: field_simps) |
|
10081 |
finally show "setL2 (\<lambda>i. dist (f x \<bullet> i) (l \<bullet> i)) Basis < e" . |
|
10082 |
qed |
|
10083 |
have "\<forall>\<^sub>F x in F. \<forall>i\<in>Basis. dist (f x \<bullet> i) (l \<bullet> i) < e / DIM('b)" |
|
10084 |
apply (rule R') |
|
10085 |
using \<open>0 < e\<close> by simp |
|
10086 |
then show "\<forall>\<^sub>F x in F. dist (f x) l < e" |
|
10087 |
apply (rule eventually_mono) |
|
10088 |
apply (subst euclidean_dist_l2) |
|
10089 |
using * by blast |
|
10090 |
qed |
|
10091 |
qed |
|
10092 |
||
10093 |
||
10094 |
corollary continuous_componentwise: |
|
10095 |
"continuous F f \<longleftrightarrow> (\<forall>i \<in> Basis. continuous F (\<lambda>x. (f x \<bullet> i)))" |
|
10096 |
by (simp add: continuous_def tendsto_componentwise_iff [symmetric]) |
|
10097 |
||
10098 |
corollary continuous_on_componentwise: |
|
10099 |
fixes S :: "'a :: t2_space set" |
|
10100 |
shows "continuous_on S f \<longleftrightarrow> (\<forall>i \<in> Basis. continuous_on S (\<lambda>x. (f x \<bullet> i)))" |
|
10101 |
apply (simp add: continuous_on_eq_continuous_within) |
|
10102 |
using continuous_componentwise by blast |
|
10103 |
||
10104 |
lemma linear_componentwise_iff: |
|
10105 |
"(linear f') \<longleftrightarrow> (\<forall>i\<in>Basis. linear (\<lambda>x. f' x \<bullet> i))" |
|
10106 |
apply (auto simp: linear_iff inner_left_distrib) |
|
10107 |
apply (metis inner_left_distrib euclidean_eq_iff) |
|
10108 |
by (metis euclidean_eqI inner_scaleR_left) |
|
10109 |
||
10110 |
lemma bounded_linear_componentwise_iff: |
|
10111 |
"(bounded_linear f') \<longleftrightarrow> (\<forall>i\<in>Basis. bounded_linear (\<lambda>x. f' x \<bullet> i))" |
|
10112 |
(is "?lhs = ?rhs") |
|
10113 |
proof |
|
10114 |
assume ?lhs then show ?rhs |
|
10115 |
by (simp add: bounded_linear_inner_left_comp) |
|
10116 |
next |
|
10117 |
assume ?rhs |
|
10118 |
then have "(\<forall>i\<in>Basis. \<exists>K. \<forall>x. \<bar>f' x \<bullet> i\<bar> \<le> norm x * K)" "linear f'" |
|
10119 |
by (auto simp: bounded_linear_def bounded_linear_axioms_def linear_componentwise_iff [symmetric] ball_conj_distrib) |
|
10120 |
then obtain F where F: "\<And>i x. i \<in> Basis \<Longrightarrow> \<bar>f' x \<bullet> i\<bar> \<le> norm x * F i" |
|
10121 |
by metis |
|
64267 | 10122 |
have "norm (f' x) \<le> norm x * sum F Basis" for x |
63938 | 10123 |
proof - |
10124 |
have "norm (f' x) \<le> (\<Sum>i\<in>Basis. \<bar>f' x \<bullet> i\<bar>)" |
|
10125 |
by (rule norm_le_l1) |
|
10126 |
also have "... \<le> (\<Sum>i\<in>Basis. norm x * F i)" |
|
64267 | 10127 |
by (metis F sum_mono) |
10128 |
also have "... = norm x * sum F Basis" |
|
10129 |
by (simp add: sum_distrib_left) |
|
63938 | 10130 |
finally show ?thesis . |
10131 |
qed |
|
10132 |
then show ?lhs |
|
10133 |
by (force simp: bounded_linear_def bounded_linear_axioms_def \<open>linear f'\<close>) |
|
10134 |
qed |
|
10135 |
||
63955 | 10136 |
subsection\<open>Pasting functions together\<close> |
10137 |
||
10138 |
subsubsection\<open>on open sets\<close> |
|
10139 |
||
10140 |
lemma pasting_lemma: |
|
10141 |
fixes f :: "'i \<Rightarrow> 'a::topological_space \<Rightarrow> 'b::topological_space" |
|
10142 |
assumes clo: "\<And>i. i \<in> I \<Longrightarrow> openin (subtopology euclidean S) (T i)" |
|
10143 |
and cont: "\<And>i. i \<in> I \<Longrightarrow> continuous_on (T i) (f i)" |
|
10144 |
and f: "\<And>i j x. \<lbrakk>i \<in> I; j \<in> I; x \<in> S \<inter> T i \<inter> T j\<rbrakk> \<Longrightarrow> f i x = f j x" |
|
10145 |
and g: "\<And>x. x \<in> S \<Longrightarrow> \<exists>j. j \<in> I \<and> x \<in> T j \<and> g x = f j x" |
|
10146 |
shows "continuous_on S g" |
|
10147 |
proof (clarsimp simp: continuous_openin_preimage_eq) |
|
10148 |
fix U :: "'b set" |
|
10149 |
assume "open U" |
|
10150 |
have S: "\<And>i. i \<in> I \<Longrightarrow> (T i) \<subseteq> S" |
|
10151 |
using clo openin_imp_subset by blast |
|
10152 |
have *: "{x \<in> S. g x \<in> U} = \<Union>{{x. x \<in> (T i) \<and> (f i x) \<in> U} |i. i \<in> I}" |
|
10153 |
apply (auto simp: dest: S) |
|
10154 |
apply (metis (no_types, lifting) g mem_Collect_eq) |
|
10155 |
using clo f g openin_imp_subset by fastforce |
|
10156 |
show "openin (subtopology euclidean S) {x \<in> S. g x \<in> U}" |
|
10157 |
apply (subst *) |
|
10158 |
apply (rule openin_Union, clarify) |
|
10159 |
apply (metis (full_types) \<open>open U\<close> cont clo openin_trans continuous_openin_preimage_gen) |
|
10160 |
done |
|
64284
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
10161 |
qed |
63955 | 10162 |
|
10163 |
lemma pasting_lemma_exists: |
|
10164 |
fixes f :: "'i \<Rightarrow> 'a::topological_space \<Rightarrow> 'b::topological_space" |
|
10165 |
assumes S: "S \<subseteq> (\<Union>i \<in> I. T i)" |
|
10166 |
and clo: "\<And>i. i \<in> I \<Longrightarrow> openin (subtopology euclidean S) (T i)" |
|
10167 |
and cont: "\<And>i. i \<in> I \<Longrightarrow> continuous_on (T i) (f i)" |
|
10168 |
and f: "\<And>i j x. \<lbrakk>i \<in> I; j \<in> I; x \<in> S \<inter> T i \<inter> T j\<rbrakk> \<Longrightarrow> f i x = f j x" |
|
10169 |
obtains g where "continuous_on S g" "\<And>x i. \<lbrakk>i \<in> I; x \<in> S \<inter> T i\<rbrakk> \<Longrightarrow> g x = f i x" |
|
10170 |
proof |
|
10171 |
show "continuous_on S (\<lambda>x. f (SOME i. i \<in> I \<and> x \<in> T i) x)" |
|
10172 |
apply (rule pasting_lemma [OF clo cont]) |
|
10173 |
apply (blast intro: f)+ |
|
10174 |
apply (metis (mono_tags, lifting) S UN_iff subsetCE someI) |
|
10175 |
done |
|
10176 |
next |
|
10177 |
fix x i |
|
10178 |
assume "i \<in> I" "x \<in> S \<inter> T i" |
|
10179 |
then show "f (SOME i. i \<in> I \<and> x \<in> T i) x = f i x" |
|
10180 |
by (metis (no_types, lifting) IntD2 IntI f someI_ex) |
|
10181 |
qed |
|
10182 |
||
10183 |
subsubsection\<open>Likewise on closed sets, with a finiteness assumption\<close> |
|
10184 |
||
10185 |
lemma pasting_lemma_closed: |
|
10186 |
fixes f :: "'i \<Rightarrow> 'a::topological_space \<Rightarrow> 'b::topological_space" |
|
10187 |
assumes "finite I" |
|
10188 |
and clo: "\<And>i. i \<in> I \<Longrightarrow> closedin (subtopology euclidean S) (T i)" |
|
10189 |
and cont: "\<And>i. i \<in> I \<Longrightarrow> continuous_on (T i) (f i)" |
|
10190 |
and f: "\<And>i j x. \<lbrakk>i \<in> I; j \<in> I; x \<in> S \<inter> T i \<inter> T j\<rbrakk> \<Longrightarrow> f i x = f j x" |
|
10191 |
and g: "\<And>x. x \<in> S \<Longrightarrow> \<exists>j. j \<in> I \<and> x \<in> T j \<and> g x = f j x" |
|
10192 |
shows "continuous_on S g" |
|
10193 |
proof (clarsimp simp: continuous_closedin_preimage_eq) |
|
10194 |
fix U :: "'b set" |
|
10195 |
assume "closed U" |
|
10196 |
have *: "{x \<in> S. g x \<in> U} = \<Union>{{x. x \<in> (T i) \<and> (f i x) \<in> U} |i. i \<in> I}" |
|
10197 |
apply auto |
|
10198 |
apply (metis (no_types, lifting) g mem_Collect_eq) |
|
10199 |
using clo closedin_closed apply blast |
|
10200 |
apply (metis Int_iff f g clo closedin_limpt inf.absorb_iff2) |
|
10201 |
done |
|
10202 |
show "closedin (subtopology euclidean S) {x \<in> S. g x \<in> U}" |
|
10203 |
apply (subst *) |
|
10204 |
apply (rule closedin_Union) |
|
10205 |
using \<open>finite I\<close> apply simp |
|
10206 |
apply (blast intro: \<open>closed U\<close> continuous_closedin_preimage cont clo closedin_trans) |
|
10207 |
done |
|
10208 |
qed |
|
10209 |
||
10210 |
lemma pasting_lemma_exists_closed: |
|
10211 |
fixes f :: "'i \<Rightarrow> 'a::topological_space \<Rightarrow> 'b::topological_space" |
|
10212 |
assumes "finite I" |
|
10213 |
and S: "S \<subseteq> (\<Union>i \<in> I. T i)" |
|
10214 |
and clo: "\<And>i. i \<in> I \<Longrightarrow> closedin (subtopology euclidean S) (T i)" |
|
10215 |
and cont: "\<And>i. i \<in> I \<Longrightarrow> continuous_on (T i) (f i)" |
|
10216 |
and f: "\<And>i j x. \<lbrakk>i \<in> I; j \<in> I; x \<in> S \<inter> T i \<inter> T j\<rbrakk> \<Longrightarrow> f i x = f j x" |
|
10217 |
obtains g where "continuous_on S g" "\<And>x i. \<lbrakk>i \<in> I; x \<in> S \<inter> T i\<rbrakk> \<Longrightarrow> g x = f i x" |
|
10218 |
proof |
|
10219 |
show "continuous_on S (\<lambda>x. f (SOME i. i \<in> I \<and> x \<in> T i) x)" |
|
10220 |
apply (rule pasting_lemma_closed [OF \<open>finite I\<close> clo cont]) |
|
10221 |
apply (blast intro: f)+ |
|
10222 |
apply (metis (mono_tags, lifting) S UN_iff subsetCE someI) |
|
10223 |
done |
|
10224 |
next |
|
10225 |
fix x i |
|
10226 |
assume "i \<in> I" "x \<in> S \<inter> T i" |
|
10227 |
then show "f (SOME i. i \<in> I \<and> x \<in> T i) x = f i x" |
|
10228 |
by (metis (no_types, lifting) IntD2 IntI f someI_ex) |
|
10229 |
qed |
|
10230 |
||
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10231 |
lemma tube_lemma: |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10232 |
assumes "compact K" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10233 |
assumes "open W" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10234 |
assumes "{x0} \<times> K \<subseteq> W" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10235 |
shows "\<exists>X0. x0 \<in> X0 \<and> open X0 \<and> X0 \<times> K \<subseteq> W" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10236 |
proof - |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10237 |
{ |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10238 |
fix y assume "y \<in> K" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10239 |
then have "(x0, y) \<in> W" using assms by auto |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10240 |
with \<open>open W\<close> |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10241 |
have "\<exists>X0 Y. open X0 \<and> open Y \<and> x0 \<in> X0 \<and> y \<in> Y \<and> X0 \<times> Y \<subseteq> W" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10242 |
by (rule open_prod_elim) blast |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10243 |
} |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10244 |
then obtain X0 Y where |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10245 |
*: "\<forall>y \<in> K. open (X0 y) \<and> open (Y y) \<and> x0 \<in> X0 y \<and> y \<in> Y y \<and> X0 y \<times> Y y \<subseteq> W" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10246 |
by metis |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10247 |
from * have "\<forall>t\<in>Y ` K. open t" "K \<subseteq> \<Union>(Y ` K)" by auto |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10248 |
with \<open>compact K\<close> obtain CC where CC: "CC \<subseteq> Y ` K" "finite CC" "K \<subseteq> \<Union>CC" |
64758
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
10249 |
by (meson compactE) |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10250 |
then obtain c where c: "\<And>C. C \<in> CC \<Longrightarrow> c C \<in> K \<and> C = Y (c C)" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10251 |
by (force intro!: choice) |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10252 |
with * CC show ?thesis |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10253 |
by (force intro!: exI[where x="\<Inter>C\<in>CC. X0 (c C)"]) (* SLOW *) |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10254 |
qed |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10255 |
|
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10256 |
lemma continuous_on_prod_compactE: |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10257 |
fixes fx::"'a::topological_space \<times> 'b::topological_space \<Rightarrow> 'c::metric_space" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10258 |
and e::real |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10259 |
assumes cont_fx: "continuous_on (U \<times> C) fx" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10260 |
assumes "compact C" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10261 |
assumes [intro]: "x0 \<in> U" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10262 |
notes [continuous_intros] = continuous_on_compose2[OF cont_fx] |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10263 |
assumes "e > 0" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10264 |
obtains X0 where "x0 \<in> X0" "open X0" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10265 |
"\<forall>x\<in>X0 \<inter> U. \<forall>t \<in> C. dist (fx (x, t)) (fx (x0, t)) \<le> e" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10266 |
proof - |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10267 |
define psi where "psi = (\<lambda>(x, t). dist (fx (x, t)) (fx (x0, t)))" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10268 |
define W0 where "W0 = {(x, t) \<in> U \<times> C. psi (x, t) < e}" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10269 |
have W0_eq: "W0 = psi -` {..<e} \<inter> U \<times> C" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10270 |
by (auto simp: vimage_def W0_def) |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10271 |
have "open {..<e}" by simp |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10272 |
have "continuous_on (U \<times> C) psi" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10273 |
by (auto intro!: continuous_intros simp: psi_def split_beta') |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10274 |
from this[unfolded continuous_on_open_invariant, rule_format, OF \<open>open {..<e}\<close>] |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10275 |
obtain W where W: "open W" "W \<inter> U \<times> C = W0 \<inter> U \<times> C" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10276 |
unfolding W0_eq by blast |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10277 |
have "{x0} \<times> C \<subseteq> W \<inter> U \<times> C" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10278 |
unfolding W |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10279 |
by (auto simp: W0_def psi_def \<open>0 < e\<close>) |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10280 |
then have "{x0} \<times> C \<subseteq> W" by blast |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10281 |
from tube_lemma[OF \<open>compact C\<close> \<open>open W\<close> this] |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10282 |
obtain X0 where X0: "x0 \<in> X0" "open X0" "X0 \<times> C \<subseteq> W" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10283 |
by blast |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10284 |
|
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10285 |
have "\<forall>x\<in>X0 \<inter> U. \<forall>t \<in> C. dist (fx (x, t)) (fx (x0, t)) \<le> e" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10286 |
proof safe |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10287 |
fix x assume x: "x \<in> X0" "x \<in> U" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10288 |
fix t assume t: "t \<in> C" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10289 |
have "dist (fx (x, t)) (fx (x0, t)) = psi (x, t)" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10290 |
by (auto simp: psi_def) |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10291 |
also |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10292 |
{ |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10293 |
have "(x, t) \<in> X0 \<times> C" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10294 |
using t x |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10295 |
by auto |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10296 |
also note \<open>\<dots> \<subseteq> W\<close> |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10297 |
finally have "(x, t) \<in> W" . |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10298 |
with t x have "(x, t) \<in> W \<inter> U \<times> C" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10299 |
by blast |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10300 |
also note \<open>W \<inter> U \<times> C = W0 \<inter> U \<times> C\<close> |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10301 |
finally have "psi (x, t) < e" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10302 |
by (auto simp: W0_def) |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10303 |
} |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10304 |
finally show "dist (fx (x, t)) (fx (x0, t)) \<le> e" by simp |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10305 |
qed |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10306 |
from X0(1,2) this show ?thesis .. |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
10307 |
qed |
63938 | 10308 |
|
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54489
diff
changeset
|
10309 |
no_notation |
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54489
diff
changeset
|
10310 |
eucl_less (infix "<e" 50) |
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54489
diff
changeset
|
10311 |
|
33175 | 10312 |
end |