author | paulson <lp15@cam.ac.uk> |
Sat, 14 Apr 2018 09:23:00 +0100 | |
changeset 67979 | 53323937ee25 |
parent 67968 | a5ad4c015d1c |
child 67984 | adc1a992c470 |
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 |
||
67968 | 7 |
section \<open>Elementary topology in Euclidean space\<close> |
33175 | 8 |
|
9 |
theory Topology_Euclidean_Space |
|
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
10 |
imports |
66453
cc19f7ca2ed6
session-qualified theory imports: isabelle imports -U -i -d '~~/src/Benchmarks' -a;
wenzelm
parents:
66447
diff
changeset
|
11 |
"HOL-Library.Indicator_Function" |
cc19f7ca2ed6
session-qualified theory imports: isabelle imports -U -i -d '~~/src/Benchmarks' -a;
wenzelm
parents:
66447
diff
changeset
|
12 |
"HOL-Library.Countable_Set" |
cc19f7ca2ed6
session-qualified theory imports: isabelle imports -U -i -d '~~/src/Benchmarks' -a;
wenzelm
parents:
66447
diff
changeset
|
13 |
"HOL-Library.FuncSet" |
50938 | 14 |
Linear_Algebra |
50087 | 15 |
Norm_Arith |
16 |
begin |
|
17 |
||
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
|
18 |
(* FIXME: move elsewhere *) |
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
19 |
|
64122 | 20 |
lemma Times_eq_image_sum: |
21 |
fixes S :: "'a :: comm_monoid_add set" and T :: "'b :: comm_monoid_add set" |
|
22 |
shows "S \<times> T = {u + v |u v. u \<in> (\<lambda>x. (x, 0)) ` S \<and> v \<in> Pair 0 ` T}" |
|
23 |
by force |
|
24 |
||
63967
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
25 |
lemma halfspace_Int_eq: |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
26 |
"{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
|
27 |
"{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
|
28 |
by auto |
2aa42596edc3
new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents:
63957
diff
changeset
|
29 |
|
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
|
30 |
definition (in monoid_add) support_on :: "'b set \<Rightarrow> ('b \<Rightarrow> 'a) \<Rightarrow> 'b set" |
64539 | 31 |
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
|
32 |
|
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 |
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
|
34 |
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
|
35 |
|
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 |
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
|
37 |
"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
|
38 |
"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
|
39 |
(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
|
40 |
"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
|
41 |
"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
|
42 |
"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
|
43 |
"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
|
44 |
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
|
45 |
|
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 |
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
|
47 |
"(\<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
|
48 |
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
|
49 |
|
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 |
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
|
51 |
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
|
52 |
|
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 |
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
|
54 |
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
|
55 |
|
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 |
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
|
57 |
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
|
58 |
|
64267 | 59 |
(* TODO: is supp_sum really needed? TODO: Generalize to Finite_Set.fold *) |
60 |
definition (in comm_monoid_add) supp_sum :: "('b \<Rightarrow> 'a) \<Rightarrow> 'b set \<Rightarrow> 'a" |
|
64539 | 61 |
where "supp_sum f s = (\<Sum>x\<in>support_on s f. f x)" |
64267 | 62 |
|
63 |
lemma supp_sum_empty[simp]: "supp_sum f {} = 0" |
|
64 |
unfolding supp_sum_def by auto |
|
65 |
||
66 |
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
|
67 |
"finite (support_on s f) \<Longrightarrow> |
64267 | 68 |
supp_sum f (insert x s) = (if x \<in> s then supp_sum f s else f x + supp_sum f s)" |
69 |
by (simp add: supp_sum_def in_support_on insert_absorb) |
|
70 |
||
71 |
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
|
72 |
by (cases "r = 0") |
64267 | 73 |
(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
|
74 |
|
3b6975875633
Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents:
63301
diff
changeset
|
75 |
(*END OF SUPPORT, ETC.*) |
3b6975875633
Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents:
63301
diff
changeset
|
76 |
|
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
|
77 |
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
|
78 |
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
|
79 |
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
|
80 |
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
|
81 |
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
|
82 |
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
|
83 |
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
|
84 |
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
|
85 |
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
|
86 |
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
|
87 |
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
|
88 |
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
|
89 |
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
|
90 |
|
53282 | 91 |
lemma countable_PiE: |
64910 | 92 |
"finite I \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> countable (F i)) \<Longrightarrow> countable (Pi\<^sub>E I F)" |
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 |
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
|
94 |
|
64845 | 95 |
lemma open_sums: |
96 |
fixes T :: "('b::real_normed_vector) set" |
|
97 |
assumes "open S \<or> open T" |
|
98 |
shows "open (\<Union>x\<in> S. \<Union>y \<in> T. {x + y})" |
|
99 |
using assms |
|
100 |
proof |
|
101 |
assume S: "open S" |
|
102 |
show ?thesis |
|
103 |
proof (clarsimp simp: open_dist) |
|
104 |
fix x y |
|
105 |
assume "x \<in> S" "y \<in> T" |
|
106 |
with S obtain e where "e > 0" and e: "\<And>x'. dist x' x < e \<Longrightarrow> x' \<in> S" |
|
107 |
by (auto simp: open_dist) |
|
108 |
then have "\<And>z. dist z (x + y) < e \<Longrightarrow> \<exists>x\<in>S. \<exists>y\<in>T. z = x + y" |
|
109 |
by (metis \<open>y \<in> T\<close> diff_add_cancel dist_add_cancel2) |
|
110 |
then show "\<exists>e>0. \<forall>z. dist z (x + y) < e \<longrightarrow> (\<exists>x\<in>S. \<exists>y\<in>T. z = x + y)" |
|
111 |
using \<open>0 < e\<close> \<open>x \<in> S\<close> by blast |
|
112 |
qed |
|
113 |
next |
|
114 |
assume T: "open T" |
|
115 |
show ?thesis |
|
116 |
proof (clarsimp simp: open_dist) |
|
117 |
fix x y |
|
118 |
assume "x \<in> S" "y \<in> T" |
|
119 |
with T obtain e where "e > 0" and e: "\<And>x'. dist x' y < e \<Longrightarrow> x' \<in> T" |
|
120 |
by (auto simp: open_dist) |
|
121 |
then have "\<And>z. dist z (x + y) < e \<Longrightarrow> \<exists>x\<in>S. \<exists>y\<in>T. z = x + y" |
|
122 |
by (metis \<open>x \<in> S\<close> add_diff_cancel_left' add_diff_eq diff_diff_add dist_norm) |
|
123 |
then show "\<exists>e>0. \<forall>z. dist z (x + y) < e \<longrightarrow> (\<exists>x\<in>S. \<exists>y\<in>T. z = x + y)" |
|
124 |
using \<open>0 < e\<close> \<open>y \<in> T\<close> by blast |
|
125 |
qed |
|
126 |
qed |
|
127 |
||
53255 | 128 |
|
60420 | 129 |
subsection \<open>Topological Basis\<close> |
50087 | 130 |
|
131 |
context topological_space |
|
132 |
begin |
|
133 |
||
67962 | 134 |
definition%important "topological_basis B \<longleftrightarrow> |
53291 | 135 |
(\<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
|
136 |
|
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
137 |
lemma topological_basis: |
53291 | 138 |
"topological_basis B \<longleftrightarrow> (\<forall>x. open x \<longleftrightarrow> (\<exists>B'. B' \<subseteq> B \<and> \<Union>B' = x))" |
50998 | 139 |
unfolding topological_basis_def |
140 |
apply safe |
|
141 |
apply fastforce |
|
142 |
apply fastforce |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
143 |
apply (erule_tac x=x in allE, simp) |
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
144 |
apply (rule_tac x="{x}" in exI, auto) |
50998 | 145 |
done |
146 |
||
50087 | 147 |
lemma topological_basis_iff: |
148 |
assumes "\<And>B'. B' \<in> B \<Longrightarrow> open B'" |
|
149 |
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'))" |
|
150 |
(is "_ \<longleftrightarrow> ?rhs") |
|
151 |
proof safe |
|
152 |
fix O' and x::'a |
|
153 |
assume H: "topological_basis B" "open O'" "x \<in> O'" |
|
53282 | 154 |
then have "(\<exists>B'\<subseteq>B. \<Union>B' = O')" by (simp add: topological_basis_def) |
50087 | 155 |
then obtain B' where "B' \<subseteq> B" "O' = \<Union>B'" by auto |
53282 | 156 |
then show "\<exists>B'\<in>B. x \<in> B' \<and> B' \<subseteq> O'" using H by auto |
50087 | 157 |
next |
158 |
assume H: ?rhs |
|
53282 | 159 |
show "topological_basis B" |
160 |
using assms unfolding topological_basis_def |
|
50087 | 161 |
proof safe |
53640 | 162 |
fix O' :: "'a set" |
53282 | 163 |
assume "open O'" |
50087 | 164 |
with H obtain f where "\<forall>x\<in>O'. f x \<in> B \<and> x \<in> f x \<and> f x \<subseteq> O'" |
165 |
by (force intro: bchoice simp: Bex_def) |
|
53282 | 166 |
then show "\<exists>B'\<subseteq>B. \<Union>B' = O'" |
50087 | 167 |
by (auto intro: exI[where x="{f x |x. x \<in> O'}"]) |
168 |
qed |
|
169 |
qed |
|
170 |
||
171 |
lemma topological_basisI: |
|
172 |
assumes "\<And>B'. B' \<in> B \<Longrightarrow> open B'" |
|
53282 | 173 |
and "\<And>O' x. open O' \<Longrightarrow> x \<in> O' \<Longrightarrow> \<exists>B'\<in>B. x \<in> B' \<and> B' \<subseteq> O'" |
50087 | 174 |
shows "topological_basis B" |
175 |
using assms by (subst topological_basis_iff) auto |
|
176 |
||
177 |
lemma topological_basisE: |
|
178 |
fixes O' |
|
179 |
assumes "topological_basis B" |
|
53282 | 180 |
and "open O'" |
181 |
and "x \<in> O'" |
|
50087 | 182 |
obtains B' where "B' \<in> B" "x \<in> B'" "B' \<subseteq> O'" |
183 |
proof atomize_elim |
|
53282 | 184 |
from assms have "\<And>B'. B'\<in>B \<Longrightarrow> open B'" |
185 |
by (simp add: topological_basis_def) |
|
50087 | 186 |
with topological_basis_iff assms |
53282 | 187 |
show "\<exists>B'. B' \<in> B \<and> x \<in> B' \<and> B' \<subseteq> O'" |
188 |
using assms by (simp add: Bex_def) |
|
50087 | 189 |
qed |
190 |
||
50094
84ddcf5364b4
allow arbitrary enumerations of basis in locale for generation of borel sets
immler
parents:
50087
diff
changeset
|
191 |
lemma topological_basis_open: |
84ddcf5364b4
allow arbitrary enumerations of basis in locale for generation of borel sets
immler
parents:
50087
diff
changeset
|
192 |
assumes "topological_basis B" |
53282 | 193 |
and "X \<in> B" |
50094
84ddcf5364b4
allow arbitrary enumerations of basis in locale for generation of borel sets
immler
parents:
50087
diff
changeset
|
194 |
shows "open X" |
53282 | 195 |
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
|
196 |
|
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
197 |
lemma topological_basis_imp_subbasis: |
53255 | 198 |
assumes B: "topological_basis B" |
199 |
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
|
200 |
proof (intro ext iffI) |
53255 | 201 |
fix S :: "'a set" |
202 |
assume "open S" |
|
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
203 |
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
|
204 |
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
|
205 |
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
|
206 |
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
|
207 |
next |
53255 | 208 |
fix S :: "'a set" |
209 |
assume "generate_topology B S" |
|
210 |
then show "open S" |
|
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
211 |
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
|
212 |
qed |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
213 |
|
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
214 |
lemma basis_dense: |
53640 | 215 |
fixes B :: "'a set set" |
216 |
and f :: "'a set \<Rightarrow> 'a" |
|
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
217 |
assumes "topological_basis B" |
53255 | 218 |
and choosefrom_basis: "\<And>B'. B' \<noteq> {} \<Longrightarrow> f B' \<in> B'" |
55522 | 219 |
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
|
220 |
proof (intro allI impI) |
53640 | 221 |
fix X :: "'a set" |
222 |
assume "open X" and "X \<noteq> {}" |
|
60420 | 223 |
from topological_basisE[OF \<open>topological_basis B\<close> \<open>open X\<close> choosefrom_basis[OF \<open>X \<noteq> {}\<close>]] |
55522 | 224 |
obtain B' where "B' \<in> B" "f X \<in> B'" "B' \<subseteq> X" . |
53255 | 225 |
then show "\<exists>B'\<in>B. f B' \<in> X" |
226 |
by (auto intro!: choosefrom_basis) |
|
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
227 |
qed |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
228 |
|
50087 | 229 |
end |
230 |
||
50882
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
231 |
lemma topological_basis_prod: |
53255 | 232 |
assumes A: "topological_basis A" |
233 |
and B: "topological_basis B" |
|
50882
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
234 |
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
|
235 |
unfolding topological_basis_def |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
236 |
proof (safe, simp_all del: ex_simps add: subset_image_iff ex_simps(1)[symmetric]) |
53255 | 237 |
fix S :: "('a \<times> 'b) set" |
238 |
assume "open S" |
|
50882
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
239 |
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
|
240 |
proof (safe intro!: exI[of _ "{x\<in>A \<times> B. fst x \<times> snd x \<subseteq> S}"]) |
53255 | 241 |
fix x y |
242 |
assume "(x, y) \<in> S" |
|
60420 | 243 |
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
|
244 |
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
|
245 |
by (metis mem_Sigma_iff) |
55522 | 246 |
moreover |
247 |
from A a obtain A0 where "A0 \<in> A" "x \<in> A0" "A0 \<subseteq> a" |
|
248 |
by (rule topological_basisE) |
|
249 |
moreover |
|
250 |
from B b obtain B0 where "B0 \<in> B" "y \<in> B0" "B0 \<subseteq> b" |
|
251 |
by (rule topological_basisE) |
|
50882
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
252 |
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
|
253 |
by (intro UN_I[of "(A0, B0)"]) auto |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
254 |
qed auto |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
255 |
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
|
256 |
|
53255 | 257 |
|
60420 | 258 |
subsection \<open>Countable Basis\<close> |
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
259 |
|
67962 | 260 |
locale%important countable_basis = |
53640 | 261 |
fixes B :: "'a::topological_space set set" |
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
262 |
assumes is_basis: "topological_basis B" |
53282 | 263 |
and countable_basis: "countable B" |
33175 | 264 |
begin |
265 |
||
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
266 |
lemma open_countable_basis_ex: |
50087 | 267 |
assumes "open X" |
61952 | 268 |
shows "\<exists>B' \<subseteq> B. X = \<Union>B'" |
53255 | 269 |
using assms countable_basis is_basis |
270 |
unfolding topological_basis_def by blast |
|
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
271 |
|
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
272 |
lemma open_countable_basisE: |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
273 |
assumes "open X" |
61952 | 274 |
obtains B' where "B' \<subseteq> B" "X = \<Union>B'" |
53255 | 275 |
using assms open_countable_basis_ex |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
276 |
by atomize_elim simp |
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
277 |
|
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
278 |
lemma countable_dense_exists: |
53291 | 279 |
"\<exists>D::'a set. countable D \<and> (\<forall>X. open X \<longrightarrow> X \<noteq> {} \<longrightarrow> (\<exists>d \<in> D. d \<in> X))" |
50087 | 280 |
proof - |
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
281 |
let ?f = "(\<lambda>B'. SOME x. x \<in> B')" |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
282 |
have "countable (?f ` B)" using countable_basis by simp |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
283 |
with basis_dense[OF is_basis, of ?f] show ?thesis |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
284 |
by (intro exI[where x="?f ` B"]) (metis (mono_tags) all_not_in_conv imageI someI) |
50087 | 285 |
qed |
286 |
||
287 |
lemma countable_dense_setE: |
|
50245
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
288 |
obtains D :: "'a set" |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
289 |
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
|
290 |
using countable_dense_exists by blast |
dea9363887a6
based countable topological basis on Countable_Set
immler
parents:
50105
diff
changeset
|
291 |
|
50087 | 292 |
end |
293 |
||
50883 | 294 |
lemma (in first_countable_topology) first_countable_basisE: |
295 |
obtains A where "countable A" "\<And>a. a \<in> A \<Longrightarrow> x \<in> a" "\<And>a. a \<in> A \<Longrightarrow> open a" |
|
296 |
"\<And>S. open S \<Longrightarrow> x \<in> S \<Longrightarrow> (\<exists>a\<in>A. a \<subseteq> S)" |
|
297 |
using first_countable_basis[of x] |
|
51473 | 298 |
apply atomize_elim |
299 |
apply (elim exE) |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
300 |
apply (rule_tac x="range A" in exI, auto) |
51473 | 301 |
done |
50883 | 302 |
|
51105 | 303 |
lemma (in first_countable_topology) first_countable_basis_Int_stableE: |
304 |
obtains A where "countable A" "\<And>a. a \<in> A \<Longrightarrow> x \<in> a" "\<And>a. a \<in> A \<Longrightarrow> open a" |
|
305 |
"\<And>S. open S \<Longrightarrow> x \<in> S \<Longrightarrow> (\<exists>a\<in>A. a \<subseteq> S)" |
|
306 |
"\<And>a b. a \<in> A \<Longrightarrow> b \<in> A \<Longrightarrow> a \<inter> b \<in> A" |
|
307 |
proof atomize_elim |
|
55522 | 308 |
obtain A' where A': |
309 |
"countable A'" |
|
310 |
"\<And>a. a \<in> A' \<Longrightarrow> x \<in> a" |
|
311 |
"\<And>a. a \<in> A' \<Longrightarrow> open a" |
|
312 |
"\<And>S. open S \<Longrightarrow> x \<in> S \<Longrightarrow> \<exists>a\<in>A'. a \<subseteq> S" |
|
313 |
by (rule first_countable_basisE) blast |
|
63040 | 314 |
define A where [abs_def]: |
315 |
"A = (\<lambda>N. \<Inter>((\<lambda>n. from_nat_into A' n) ` N)) ` (Collect finite::nat set set)" |
|
53255 | 316 |
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 | 317 |
(\<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)" |
318 |
proof (safe intro!: exI[where x=A]) |
|
53255 | 319 |
show "countable A" |
320 |
unfolding A_def by (intro countable_image countable_Collect_finite) |
|
321 |
fix a |
|
322 |
assume "a \<in> A" |
|
323 |
then show "x \<in> a" "open a" |
|
324 |
using A'(4)[OF open_UNIV] by (auto simp: A_def intro: A' from_nat_into) |
|
51105 | 325 |
next |
52141
eff000cab70f
weaker precendence of syntax for big intersection and union on sets
haftmann
parents:
51773
diff
changeset
|
326 |
let ?int = "\<lambda>N. \<Inter>(from_nat_into A' ` N)" |
53255 | 327 |
fix a b |
328 |
assume "a \<in> A" "b \<in> A" |
|
329 |
then obtain N M where "a = ?int N" "b = ?int M" "finite (N \<union> M)" |
|
330 |
by (auto simp: A_def) |
|
331 |
then show "a \<inter> b \<in> A" |
|
332 |
by (auto simp: A_def intro!: image_eqI[where x="N \<union> M"]) |
|
51105 | 333 |
next |
53255 | 334 |
fix S |
335 |
assume "open S" "x \<in> S" |
|
336 |
then obtain a where a: "a\<in>A'" "a \<subseteq> S" using A' by blast |
|
337 |
then show "\<exists>a\<in>A. a \<subseteq> S" using a A' |
|
51105 | 338 |
by (intro bexI[where x=a]) (auto simp: A_def intro: image_eqI[where x="{to_nat_on A' a}"]) |
339 |
qed |
|
340 |
qed |
|
341 |
||
51473 | 342 |
lemma (in topological_space) first_countableI: |
53255 | 343 |
assumes "countable A" |
344 |
and 1: "\<And>a. a \<in> A \<Longrightarrow> x \<in> a" "\<And>a. a \<in> A \<Longrightarrow> open a" |
|
345 |
and 2: "\<And>S. open S \<Longrightarrow> x \<in> S \<Longrightarrow> \<exists>a\<in>A. a \<subseteq> S" |
|
51473 | 346 |
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))" |
347 |
proof (safe intro!: exI[of _ "from_nat_into A"]) |
|
53255 | 348 |
fix i |
51473 | 349 |
have "A \<noteq> {}" using 2[of UNIV] by auto |
53255 | 350 |
show "x \<in> from_nat_into A i" "open (from_nat_into A i)" |
60420 | 351 |
using range_from_nat_into_subset[OF \<open>A \<noteq> {}\<close>] 1 by auto |
53255 | 352 |
next |
353 |
fix S |
|
354 |
assume "open S" "x\<in>S" from 2[OF this] |
|
355 |
show "\<exists>i. from_nat_into A i \<subseteq> S" |
|
60420 | 356 |
using subset_range_from_nat_into[OF \<open>countable A\<close>] by auto |
51473 | 357 |
qed |
51350 | 358 |
|
50883 | 359 |
instance prod :: (first_countable_topology, first_countable_topology) first_countable_topology |
360 |
proof |
|
361 |
fix x :: "'a \<times> 'b" |
|
55522 | 362 |
obtain A where A: |
363 |
"countable A" |
|
364 |
"\<And>a. a \<in> A \<Longrightarrow> fst x \<in> a" |
|
365 |
"\<And>a. a \<in> A \<Longrightarrow> open a" |
|
366 |
"\<And>S. open S \<Longrightarrow> fst x \<in> S \<Longrightarrow> \<exists>a\<in>A. a \<subseteq> S" |
|
367 |
by (rule first_countable_basisE[of "fst x"]) blast |
|
368 |
obtain B where B: |
|
369 |
"countable B" |
|
370 |
"\<And>a. a \<in> B \<Longrightarrow> snd x \<in> a" |
|
371 |
"\<And>a. a \<in> B \<Longrightarrow> open a" |
|
372 |
"\<And>S. open S \<Longrightarrow> snd x \<in> S \<Longrightarrow> \<exists>a\<in>B. a \<subseteq> S" |
|
373 |
by (rule first_countable_basisE[of "snd x"]) blast |
|
53282 | 374 |
show "\<exists>A::nat \<Rightarrow> ('a \<times> 'b) set. |
375 |
(\<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 | 376 |
proof (rule first_countableI[of "(\<lambda>(a, b). a \<times> b) ` (A \<times> B)"], safe) |
53255 | 377 |
fix a b |
378 |
assume x: "a \<in> A" "b \<in> B" |
|
53640 | 379 |
with A(2, 3)[of a] B(2, 3)[of b] show "x \<in> a \<times> b" and "open (a \<times> b)" |
380 |
unfolding mem_Times_iff |
|
381 |
by (auto intro: open_Times) |
|
50883 | 382 |
next |
53255 | 383 |
fix S |
384 |
assume "open S" "x \<in> S" |
|
55522 | 385 |
then obtain a' b' where a'b': "open a'" "open b'" "x \<in> a' \<times> b'" "a' \<times> b' \<subseteq> S" |
386 |
by (rule open_prod_elim) |
|
387 |
moreover |
|
388 |
from a'b' A(4)[of a'] B(4)[of b'] |
|
389 |
obtain a b where "a \<in> A" "a \<subseteq> a'" "b \<in> B" "b \<subseteq> b'" |
|
390 |
by auto |
|
391 |
ultimately |
|
392 |
show "\<exists>a\<in>(\<lambda>(a, b). a \<times> b) ` (A \<times> B). a \<subseteq> S" |
|
50883 | 393 |
by (auto intro!: bexI[of _ "a \<times> b"] bexI[of _ a] bexI[of _ b]) |
394 |
qed (simp add: A B) |
|
395 |
qed |
|
396 |
||
50881
ae630bab13da
renamed countable_basis_space to second_countable_topology
hoelzl
parents:
50526
diff
changeset
|
397 |
class second_countable_topology = topological_space + |
53282 | 398 |
assumes ex_countable_subbasis: |
399 |
"\<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
|
400 |
begin |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
401 |
|
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
402 |
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
|
403 |
proof - |
53255 | 404 |
from ex_countable_subbasis obtain B where B: "countable B" "open = generate_topology B" |
405 |
by blast |
|
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
406 |
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
|
407 |
|
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
408 |
show ?thesis |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
409 |
proof (intro exI conjI) |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
410 |
show "countable ?B" |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
411 |
by (intro countable_image countable_Collect_finite_subset B) |
53255 | 412 |
{ |
413 |
fix S |
|
414 |
assume "open S" |
|
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
415 |
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
|
416 |
unfolding B |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
417 |
proof induct |
53255 | 418 |
case UNIV |
419 |
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
|
420 |
next |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
421 |
case (Int a b) |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
422 |
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
|
423 |
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
|
424 |
by blast |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
425 |
show ?case |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
426 |
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
|
427 |
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
|
428 |
next |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
429 |
case (UN K) |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
430 |
then have "\<forall>k\<in>K. \<exists>B'\<subseteq>{b. finite b \<and> b \<subseteq> B}. UNION B' Inter = k" by auto |
55522 | 431 |
then obtain k where |
432 |
"\<forall>ka\<in>K. k ka \<subseteq> {b. finite b \<and> b \<subseteq> B} \<and> UNION (k ka) Inter = ka" |
|
433 |
unfolding bchoice_iff .. |
|
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
434 |
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
|
435 |
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
|
436 |
next |
53255 | 437 |
case (Basis S) |
438 |
then show ?case |
|
51343
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
439 |
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
|
440 |
qed |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
441 |
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
|
442 |
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
|
443 |
then show "topological_basis ?B" |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
444 |
unfolding topological_space_class.topological_basis_def |
53282 | 445 |
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
|
446 |
(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
|
447 |
qed |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
448 |
qed |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
449 |
|
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
450 |
end |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
451 |
|
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
452 |
sublocale second_countable_topology < |
b61b32f62c78
use generate_topology for second countable topologies, does not require intersection stable basis
hoelzl
parents:
51342
diff
changeset
|
453 |
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
|
454 |
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
|
455 |
by unfold_locales safe |
50094
84ddcf5364b4
allow arbitrary enumerations of basis in locale for generation of borel sets
immler
parents:
50087
diff
changeset
|
456 |
|
50882
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
457 |
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
|
458 |
proof |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
459 |
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
|
460 |
using ex_countable_basis by auto |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
461 |
moreover |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
462 |
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
|
463 |
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
|
464 |
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
|
465 |
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
|
466 |
topological_basis_imp_subbasis) |
50882
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
467 |
qed |
a382bf90867e
move prod instantiation of second_countable_topology to its definition
hoelzl
parents:
50881
diff
changeset
|
468 |
|
50883 | 469 |
instance second_countable_topology \<subseteq> first_countable_topology |
470 |
proof |
|
471 |
fix x :: 'a |
|
63040 | 472 |
define B :: "'a set set" where "B = (SOME B. countable B \<and> topological_basis B)" |
50883 | 473 |
then have B: "countable B" "topological_basis B" |
474 |
using countable_basis is_basis |
|
475 |
by (auto simp: countable_basis is_basis) |
|
53282 | 476 |
then show "\<exists>A::nat \<Rightarrow> 'a set. |
477 |
(\<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 | 478 |
by (intro first_countableI[of "{b\<in>B. x \<in> b}"]) |
479 |
(fastforce simp: topological_space_class.topological_basis_def)+ |
|
50883 | 480 |
qed |
481 |
||
64320
ba194424b895
HOL-Probability: move stopping time from AFP/Markov_Models
hoelzl
parents:
64287
diff
changeset
|
482 |
instance nat :: second_countable_topology |
ba194424b895
HOL-Probability: move stopping time from AFP/Markov_Models
hoelzl
parents:
64287
diff
changeset
|
483 |
proof |
ba194424b895
HOL-Probability: move stopping time from AFP/Markov_Models
hoelzl
parents:
64287
diff
changeset
|
484 |
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
|
485 |
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
|
486 |
qed |
53255 | 487 |
|
64284
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
488 |
lemma countable_separating_set_linorder1: |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
489 |
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
|
490 |
proof - |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
491 |
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
|
492 |
define B1 where "B1 = {(LEAST x. x \<in> U)| U. U \<in> A}" |
64911 | 493 |
then have "countable B1" using \<open>countable A\<close> by (simp add: Setcompr_eq_image) |
64284
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
494 |
define B2 where "B2 = {(SOME x. x \<in> U)| U. U \<in> A}" |
64911 | 495 |
then have "countable B2" using \<open>countable A\<close> by (simp add: Setcompr_eq_image) |
64284
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
496 |
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
|
497 |
proof (cases) |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
498 |
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
|
499 |
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
|
500 |
define U where "U = {x<..<y}" |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
501 |
then have "open U" by simp |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
502 |
moreover have "z \<in> U" using z U_def by simp |
64911 | 503 |
ultimately obtain V where "V \<in> A" "z \<in> V" "V \<subseteq> U" using topological_basisE[OF \<open>topological_basis A\<close>] by auto |
64284
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
504 |
define w where "w = (SOME x. x \<in> V)" |
64911 | 505 |
then have "w \<in> V" using \<open>z \<in> V\<close> by (metis someI2) |
506 |
then have "x < w \<and> w \<le> y" using \<open>w \<in> V\<close> \<open>V \<subseteq> U\<close> U_def by fastforce |
|
507 |
moreover have "w \<in> B1 \<union> B2" using w_def B2_def \<open>V \<in> A\<close> by auto |
|
64284
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
508 |
ultimately show ?thesis by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
509 |
next |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
510 |
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
|
511 |
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
|
512 |
define U where "U = {x<..}" |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
513 |
then have "open U" by simp |
64911 | 514 |
moreover have "y \<in> U" using \<open>x < y\<close> U_def by simp |
515 |
ultimately obtain "V" where "V \<in> A" "y \<in> V" "V \<subseteq> U" using topological_basisE[OF \<open>topological_basis A\<close>] by auto |
|
516 |
have "U = {y..}" unfolding U_def using * \<open>x < y\<close> by auto |
|
517 |
then have "V \<subseteq> {y..}" using \<open>V \<subseteq> U\<close> by simp |
|
518 |
then have "(LEAST w. w \<in> V) = y" using \<open>y \<in> V\<close> by (meson Least_equality atLeast_iff subsetCE) |
|
519 |
then have "y \<in> B1 \<union> B2" using \<open>V \<in> A\<close> B1_def by auto |
|
520 |
moreover have "x < y \<and> y \<le> y" using \<open>x < y\<close> by simp |
|
64284
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
521 |
ultimately show ?thesis by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
522 |
qed |
64911 | 523 |
moreover have "countable (B1 \<union> B2)" using \<open>countable B1\<close> \<open>countable B2\<close> by simp |
64284
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 |
qed |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
526 |
|
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
527 |
lemma countable_separating_set_linorder2: |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
528 |
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
|
529 |
proof - |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
530 |
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
|
531 |
define B1 where "B1 = {(GREATEST x. x \<in> U) | U. U \<in> A}" |
64911 | 532 |
then have "countable B1" using \<open>countable A\<close> by (simp add: Setcompr_eq_image) |
64284
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
533 |
define B2 where "B2 = {(SOME x. x \<in> U)| U. U \<in> A}" |
64911 | 534 |
then have "countable B2" using \<open>countable A\<close> by (simp add: Setcompr_eq_image) |
64284
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
535 |
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
|
536 |
proof (cases) |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
537 |
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
|
538 |
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
|
539 |
define U where "U = {x<..<y}" |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
540 |
then have "open U" by simp |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
541 |
moreover have "z \<in> U" using z U_def by simp |
64911 | 542 |
ultimately obtain "V" where "V \<in> A" "z \<in> V" "V \<subseteq> U" using topological_basisE[OF \<open>topological_basis A\<close>] by auto |
64284
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
543 |
define w where "w = (SOME x. x \<in> V)" |
64911 | 544 |
then have "w \<in> V" using \<open>z \<in> V\<close> by (metis someI2) |
545 |
then have "x \<le> w \<and> w < y" using \<open>w \<in> V\<close> \<open>V \<subseteq> U\<close> U_def by fastforce |
|
546 |
moreover have "w \<in> B1 \<union> B2" using w_def B2_def \<open>V \<in> A\<close> by auto |
|
64284
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
547 |
ultimately show ?thesis by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
548 |
next |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
549 |
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
|
550 |
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
|
551 |
define U where "U = {..<y}" |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
552 |
then have "open U" by simp |
64911 | 553 |
moreover have "x \<in> U" using \<open>x < y\<close> U_def by simp |
554 |
ultimately obtain "V" where "V \<in> A" "x \<in> V" "V \<subseteq> U" using topological_basisE[OF \<open>topological_basis A\<close>] by auto |
|
555 |
have "U = {..x}" unfolding U_def using * \<open>x < y\<close> by auto |
|
556 |
then have "V \<subseteq> {..x}" using \<open>V \<subseteq> U\<close> by simp |
|
557 |
then have "(GREATEST x. x \<in> V) = x" using \<open>x \<in> V\<close> by (meson Greatest_equality atMost_iff subsetCE) |
|
558 |
then have "x \<in> B1 \<union> B2" using \<open>V \<in> A\<close> B1_def by auto |
|
559 |
moreover have "x \<le> x \<and> x < y" using \<open>x < y\<close> by simp |
|
64284
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
560 |
ultimately show ?thesis by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
561 |
qed |
64911 | 562 |
moreover have "countable (B1 \<union> B2)" using \<open>countable B1\<close> \<open>countable B2\<close> by simp |
64284
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
563 |
ultimately show ?thesis by auto |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
564 |
qed |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
565 |
|
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
566 |
lemma countable_separating_set_dense_linorder: |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
567 |
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
|
568 |
proof - |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
569 |
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
|
570 |
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
|
571 |
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
|
572 |
proof - |
64911 | 573 |
obtain z where "x < z" "z < y" using \<open>x < y\<close> dense by blast |
64284
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
574 |
then obtain b where "b \<in> B" "x < b \<and> b \<le> z" using B(2) by auto |
64911 | 575 |
then have "x < b \<and> b < y" using \<open>z < y\<close> by auto |
576 |
then show ?thesis using \<open>b \<in> B\<close> by auto |
|
64284
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
577 |
qed |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
578 |
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
|
579 |
qed |
f3b905b2eee2
HOL-Analysis: more theorems from Sébastien Gouëzel's Ergodic_Theory
hoelzl
parents:
64267
diff
changeset
|
580 |
|
67962 | 581 |
subsection%important \<open>Polish spaces\<close> |
60420 | 582 |
|
583 |
text \<open>Textbooks define Polish spaces as completely metrizable. |
|
584 |
We assume the topology to be complete for a given metric.\<close> |
|
50087 | 585 |
|
67962 | 586 |
class%important polish_space = complete_space + second_countable_topology |
50087 | 587 |
|
60420 | 588 |
subsection \<open>General notion of a topology as a value\<close> |
33175 | 589 |
|
67962 | 590 |
definition%important "istopology L \<longleftrightarrow> |
60585 | 591 |
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 | 592 |
|
67962 | 593 |
typedef%important 'a topology = "{L::('a set) \<Rightarrow> bool. istopology L}" |
33175 | 594 |
morphisms "openin" "topology" |
595 |
unfolding istopology_def by blast |
|
596 |
||
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
|
597 |
lemma istopology_openin[intro]: "istopology(openin U)" |
33175 | 598 |
using openin[of U] by blast |
599 |
||
600 |
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
|
601 |
using topology_inverse[unfolded mem_Collect_eq] . |
33175 | 602 |
|
603 |
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
|
604 |
using topology_inverse[of U] istopology_openin[of "topology U"] by auto |
33175 | 605 |
|
606 |
lemma topology_eq: "T1 = T2 \<longleftrightarrow> (\<forall>S. openin T1 S \<longleftrightarrow> openin T2 S)" |
|
53255 | 607 |
proof |
608 |
assume "T1 = T2" |
|
609 |
then show "\<forall>S. openin T1 S \<longleftrightarrow> openin T2 S" by simp |
|
610 |
next |
|
611 |
assume H: "\<forall>S. openin T1 S \<longleftrightarrow> openin T2 S" |
|
612 |
then have "openin T1 = openin T2" by (simp add: fun_eq_iff) |
|
613 |
then have "topology (openin T1) = topology (openin T2)" by simp |
|
614 |
then show "T1 = T2" unfolding openin_inverse . |
|
33175 | 615 |
qed |
616 |
||
60420 | 617 |
text\<open>Infer the "universe" from union of all sets in the topology.\<close> |
33175 | 618 |
|
53640 | 619 |
definition "topspace T = \<Union>{S. openin T S}" |
33175 | 620 |
|
60420 | 621 |
subsubsection \<open>Main properties of open sets\<close> |
33175 | 622 |
|
67962 | 623 |
lemma%important openin_clauses: |
33175 | 624 |
fixes U :: "'a topology" |
53282 | 625 |
shows |
626 |
"openin U {}" |
|
627 |
"\<And>S T. openin U S \<Longrightarrow> openin U T \<Longrightarrow> openin U (S\<inter>T)" |
|
628 |
"\<And>K. (\<forall>S \<in> K. openin U S) \<Longrightarrow> openin U (\<Union>K)" |
|
629 |
using openin[of U] unfolding istopology_def mem_Collect_eq by fast+ |
|
33175 | 630 |
|
631 |
lemma openin_subset[intro]: "openin U S \<Longrightarrow> S \<subseteq> topspace U" |
|
632 |
unfolding topspace_def by blast |
|
53255 | 633 |
|
634 |
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
|
635 |
by (rule openin_clauses) |
33175 | 636 |
|
637 |
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
|
638 |
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
|
639 |
|
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
640 |
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
|
641 |
using openin_clauses by blast |
33175 | 642 |
|
643 |
lemma openin_Un[intro]: "openin U S \<Longrightarrow> openin U T \<Longrightarrow> openin U (S \<union> T)" |
|
644 |
using openin_Union[of "{S,T}" U] by auto |
|
645 |
||
53255 | 646 |
lemma openin_topspace[intro, simp]: "openin U (topspace U)" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
647 |
by (force simp: openin_Union topspace_def) |
33175 | 648 |
|
49711 | 649 |
lemma openin_subopen: "openin U S \<longleftrightarrow> (\<forall>x \<in> S. \<exists>T. openin U T \<and> x \<in> T \<and> T \<subseteq> S)" |
650 |
(is "?lhs \<longleftrightarrow> ?rhs") |
|
36584 | 651 |
proof |
49711 | 652 |
assume ?lhs |
653 |
then show ?rhs by auto |
|
36584 | 654 |
next |
655 |
assume H: ?rhs |
|
656 |
let ?t = "\<Union>{T. openin U T \<and> T \<subseteq> S}" |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
657 |
have "openin U ?t" by (force simp: openin_Union) |
36584 | 658 |
also have "?t = S" using H by auto |
659 |
finally show "openin U S" . |
|
33175 | 660 |
qed |
661 |
||
64845 | 662 |
lemma openin_INT [intro]: |
663 |
assumes "finite I" |
|
664 |
"\<And>i. i \<in> I \<Longrightarrow> openin T (U i)" |
|
665 |
shows "openin T ((\<Inter>i \<in> I. U i) \<inter> topspace T)" |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
666 |
using assms by (induct, auto simp: inf_sup_aci(2) openin_Int) |
64845 | 667 |
|
668 |
lemma openin_INT2 [intro]: |
|
669 |
assumes "finite I" "I \<noteq> {}" |
|
670 |
"\<And>i. i \<in> I \<Longrightarrow> openin T (U i)" |
|
671 |
shows "openin T (\<Inter>i \<in> I. U i)" |
|
672 |
proof - |
|
673 |
have "(\<Inter>i \<in> I. U i) \<subseteq> topspace T" |
|
64911 | 674 |
using \<open>I \<noteq> {}\<close> openin_subset[OF assms(3)] by auto |
64845 | 675 |
then show ?thesis |
676 |
using openin_INT[of _ _ U, OF assms(1) assms(3)] by (simp add: inf.absorb2 inf_commute) |
|
677 |
qed |
|
678 |
||
66793
deabce3ccf1f
new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
66643
diff
changeset
|
679 |
lemma openin_Inter [intro]: |
deabce3ccf1f
new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
66643
diff
changeset
|
680 |
assumes "finite \<F>" "\<F> \<noteq> {}" "\<And>X. X \<in> \<F> \<Longrightarrow> openin T X" shows "openin T (\<Inter>\<F>)" |
deabce3ccf1f
new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
66643
diff
changeset
|
681 |
by (metis (full_types) assms openin_INT2 image_ident) |
deabce3ccf1f
new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
66643
diff
changeset
|
682 |
|
49711 | 683 |
|
60420 | 684 |
subsubsection \<open>Closed sets\<close> |
33175 | 685 |
|
67962 | 686 |
definition%important "closedin U S \<longleftrightarrow> S \<subseteq> topspace U \<and> openin U (topspace U - S)" |
33175 | 687 |
|
53255 | 688 |
lemma closedin_subset: "closedin U S \<Longrightarrow> S \<subseteq> topspace U" |
689 |
by (metis closedin_def) |
|
690 |
||
691 |
lemma closedin_empty[simp]: "closedin U {}" |
|
692 |
by (simp add: closedin_def) |
|
693 |
||
694 |
lemma closedin_topspace[intro, simp]: "closedin U (topspace U)" |
|
695 |
by (simp add: closedin_def) |
|
696 |
||
33175 | 697 |
lemma closedin_Un[intro]: "closedin U S \<Longrightarrow> closedin U T \<Longrightarrow> closedin U (S \<union> T)" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
698 |
by (auto simp: Diff_Un closedin_def) |
33175 | 699 |
|
60585 | 700 |
lemma Diff_Inter[intro]: "A - \<Inter>S = \<Union>{A - s|s. s\<in>S}" |
53255 | 701 |
by auto |
702 |
||
63955 | 703 |
lemma closedin_Union: |
704 |
assumes "finite S" "\<And>T. T \<in> S \<Longrightarrow> closedin U T" |
|
705 |
shows "closedin U (\<Union>S)" |
|
706 |
using assms by induction auto |
|
707 |
||
53255 | 708 |
lemma closedin_Inter[intro]: |
709 |
assumes Ke: "K \<noteq> {}" |
|
62131
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
710 |
and Kc: "\<And>S. S \<in>K \<Longrightarrow> closedin U S" |
60585 | 711 |
shows "closedin U (\<Inter>K)" |
53255 | 712 |
using Ke Kc unfolding closedin_def Diff_Inter by auto |
33175 | 713 |
|
62131
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
714 |
lemma closedin_INT[intro]: |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
715 |
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
|
716 |
shows "closedin U (\<Inter>x\<in>A. B x)" |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
717 |
apply (rule closedin_Inter) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
718 |
using assms |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
719 |
apply auto |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
720 |
done |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
721 |
|
33175 | 722 |
lemma closedin_Int[intro]: "closedin U S \<Longrightarrow> closedin U T \<Longrightarrow> closedin U (S \<inter> T)" |
723 |
using closedin_Inter[of "{S,T}" U] by auto |
|
724 |
||
725 |
lemma openin_closedin_eq: "openin U S \<longleftrightarrow> S \<subseteq> topspace U \<and> closedin U (topspace U - S)" |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
726 |
apply (auto simp: closedin_def Diff_Diff_Int inf_absorb2) |
33175 | 727 |
apply (metis openin_subset subset_eq) |
728 |
done |
|
729 |
||
53255 | 730 |
lemma openin_closedin: "S \<subseteq> topspace U \<Longrightarrow> (openin U S \<longleftrightarrow> closedin U (topspace U - S))" |
33175 | 731 |
by (simp add: openin_closedin_eq) |
732 |
||
53255 | 733 |
lemma openin_diff[intro]: |
734 |
assumes oS: "openin U S" |
|
735 |
and cT: "closedin U T" |
|
736 |
shows "openin U (S - T)" |
|
737 |
proof - |
|
33175 | 738 |
have "S - T = S \<inter> (topspace U - T)" using openin_subset[of U S] oS cT |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
739 |
by (auto simp: topspace_def openin_subset) |
53282 | 740 |
then show ?thesis using oS cT |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
741 |
by (auto simp: closedin_def) |
33175 | 742 |
qed |
743 |
||
53255 | 744 |
lemma closedin_diff[intro]: |
745 |
assumes oS: "closedin U S" |
|
746 |
and cT: "openin U T" |
|
747 |
shows "closedin U (S - T)" |
|
748 |
proof - |
|
749 |
have "S - T = S \<inter> (topspace U - T)" |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
750 |
using closedin_subset[of U S] oS cT by (auto simp: topspace_def) |
53255 | 751 |
then show ?thesis |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
752 |
using oS cT by (auto simp: openin_closedin_eq) |
53255 | 753 |
qed |
754 |
||
33175 | 755 |
|
60420 | 756 |
subsubsection \<open>Subspace topology\<close> |
44170
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
757 |
|
67962 | 758 |
definition%important "subtopology U V = topology (\<lambda>T. \<exists>S. T = S \<inter> V \<and> openin U S)" |
44170
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
759 |
|
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
760 |
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
|
761 |
(is "istopology ?L") |
53255 | 762 |
proof - |
44170
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
763 |
have "?L {}" by blast |
53255 | 764 |
{ |
765 |
fix A B |
|
766 |
assume A: "?L A" and B: "?L B" |
|
767 |
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" |
|
768 |
by blast |
|
769 |
have "A \<inter> B = (Sa \<inter> Sb) \<inter> V" "openin U (Sa \<inter> Sb)" |
|
770 |
using Sa Sb by blast+ |
|
771 |
then have "?L (A \<inter> B)" by blast |
|
772 |
} |
|
33175 | 773 |
moreover |
53255 | 774 |
{ |
53282 | 775 |
fix K |
776 |
assume K: "K \<subseteq> Collect ?L" |
|
44170
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
777 |
have th0: "Collect ?L = (\<lambda>S. S \<inter> V) ` Collect (openin U)" |
55775 | 778 |
by blast |
33175 | 779 |
from K[unfolded th0 subset_image_iff] |
53255 | 780 |
obtain Sk where Sk: "Sk \<subseteq> Collect (openin U)" "K = (\<lambda>S. S \<inter> V) ` Sk" |
781 |
by blast |
|
782 |
have "\<Union>K = (\<Union>Sk) \<inter> V" |
|
783 |
using Sk by auto |
|
60585 | 784 |
moreover have "openin U (\<Union>Sk)" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
785 |
using Sk by (auto simp: subset_eq) |
53255 | 786 |
ultimately have "?L (\<Union>K)" by blast |
787 |
} |
|
44170
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
788 |
ultimately show ?thesis |
62343
24106dc44def
prefer abbreviations for compound operators INFIMUM and SUPREMUM
haftmann
parents:
62131
diff
changeset
|
789 |
unfolding subset_eq mem_Collect_eq istopology_def by auto |
33175 | 790 |
qed |
791 |
||
53255 | 792 |
lemma openin_subtopology: "openin (subtopology U V) S \<longleftrightarrow> (\<exists>T. openin U T \<and> S = T \<inter> V)" |
33175 | 793 |
unfolding subtopology_def topology_inverse'[OF istopology_subtopology] |
44170
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
794 |
by auto |
33175 | 795 |
|
53255 | 796 |
lemma topspace_subtopology: "topspace (subtopology U V) = topspace U \<inter> V" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
797 |
by (auto simp: topspace_def openin_subtopology) |
33175 | 798 |
|
53255 | 799 |
lemma closedin_subtopology: "closedin (subtopology U V) S \<longleftrightarrow> (\<exists>T. closedin U T \<and> S = T \<inter> V)" |
33175 | 800 |
unfolding closedin_def topspace_subtopology |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
801 |
by (auto simp: openin_subtopology) |
33175 | 802 |
|
803 |
lemma openin_subtopology_refl: "openin (subtopology U V) V \<longleftrightarrow> V \<subseteq> topspace U" |
|
804 |
unfolding openin_subtopology |
|
55775 | 805 |
by auto (metis IntD1 in_mono openin_subset) |
49711 | 806 |
|
807 |
lemma subtopology_superset: |
|
808 |
assumes UV: "topspace U \<subseteq> V" |
|
33175 | 809 |
shows "subtopology U V = U" |
53255 | 810 |
proof - |
811 |
{ |
|
812 |
fix S |
|
813 |
{ |
|
814 |
fix T |
|
815 |
assume T: "openin U T" "S = T \<inter> V" |
|
816 |
from T openin_subset[OF T(1)] UV have eq: "S = T" |
|
817 |
by blast |
|
818 |
have "openin U S" |
|
819 |
unfolding eq using T by blast |
|
820 |
} |
|
33175 | 821 |
moreover |
53255 | 822 |
{ |
823 |
assume S: "openin U S" |
|
824 |
then have "\<exists>T. openin U T \<and> S = T \<inter> V" |
|
825 |
using openin_subset[OF S] UV by auto |
|
826 |
} |
|
827 |
ultimately have "(\<exists>T. openin U T \<and> S = T \<inter> V) \<longleftrightarrow> openin U S" |
|
828 |
by blast |
|
829 |
} |
|
830 |
then show ?thesis |
|
831 |
unfolding topology_eq openin_subtopology by blast |
|
33175 | 832 |
qed |
833 |
||
834 |
lemma subtopology_topspace[simp]: "subtopology U (topspace U) = U" |
|
835 |
by (simp add: subtopology_superset) |
|
836 |
||
837 |
lemma subtopology_UNIV[simp]: "subtopology U UNIV = U" |
|
838 |
by (simp add: subtopology_superset) |
|
839 |
||
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
840 |
lemma openin_subtopology_empty: |
64758
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
841 |
"openin (subtopology U {}) S \<longleftrightarrow> S = {}" |
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
842 |
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
|
843 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
844 |
lemma closedin_subtopology_empty: |
64758
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
845 |
"closedin (subtopology U {}) S \<longleftrightarrow> S = {}" |
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
846 |
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
|
847 |
|
64758
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
848 |
lemma closedin_subtopology_refl [simp]: |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
849 |
"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
|
850 |
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
|
851 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
852 |
lemma openin_imp_subset: |
64758
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
853 |
"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
|
854 |
by (metis Int_iff openin_subtopology subsetI) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
855 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
856 |
lemma closedin_imp_subset: |
64758
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
857 |
"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
|
858 |
by (simp add: closedin_def topspace_subtopology) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
859 |
|
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
860 |
lemma openin_subtopology_Un: |
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
861 |
"\<lbrakk>openin (subtopology X T) S; openin (subtopology X U) S\<rbrakk> |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
862 |
\<Longrightarrow> openin (subtopology X (T \<union> U)) S" |
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
863 |
by (simp add: openin_subtopology) blast |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
864 |
|
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
865 |
lemma closedin_subtopology_Un: |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
866 |
"\<lbrakk>closedin (subtopology X T) S; closedin (subtopology X U) S\<rbrakk> |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
867 |
\<Longrightarrow> closedin (subtopology X (T \<union> U)) S" |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
868 |
by (simp add: closedin_subtopology) blast |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
869 |
|
53255 | 870 |
|
60420 | 871 |
subsubsection \<open>The standard Euclidean topology\<close> |
33175 | 872 |
|
67962 | 873 |
definition%important euclidean :: "'a::topological_space topology" |
53255 | 874 |
where "euclidean = topology open" |
33175 | 875 |
|
876 |
lemma open_openin: "open S \<longleftrightarrow> openin euclidean S" |
|
877 |
unfolding euclidean_def |
|
878 |
apply (rule cong[where x=S and y=S]) |
|
879 |
apply (rule topology_inverse[symmetric]) |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
880 |
apply (auto simp: istopology_def) |
44170
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
44167
diff
changeset
|
881 |
done |
33175 | 882 |
|
64122 | 883 |
declare open_openin [symmetric, simp] |
884 |
||
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
885 |
lemma topspace_euclidean [simp]: "topspace euclidean = UNIV" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
886 |
by (force simp: topspace_def) |
33175 | 887 |
|
888 |
lemma topspace_euclidean_subtopology[simp]: "topspace (subtopology euclidean S) = S" |
|
64122 | 889 |
by (simp add: topspace_subtopology) |
33175 | 890 |
|
891 |
lemma closed_closedin: "closed S \<longleftrightarrow> closedin euclidean S" |
|
64122 | 892 |
by (simp add: closed_def closedin_def Compl_eq_Diff_UNIV) |
33175 | 893 |
|
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
894 |
declare closed_closedin [symmetric, simp] |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
895 |
|
33175 | 896 |
lemma open_subopen: "open S \<longleftrightarrow> (\<forall>x\<in>S. \<exists>T. open T \<and> x \<in> T \<and> T \<subseteq> S)" |
64122 | 897 |
using openI by auto |
33175 | 898 |
|
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
899 |
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
|
900 |
by (metis openin_topspace topspace_euclidean_subtopology) |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
901 |
|
60420 | 902 |
text \<open>Basic "localization" results are handy for connectedness.\<close> |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
903 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
904 |
lemma openin_open: "openin (subtopology euclidean U) S \<longleftrightarrow> (\<exists>T. open T \<and> (S = U \<inter> T))" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
905 |
by (auto simp: openin_subtopology) |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
906 |
|
63305
3b6975875633
Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents:
63301
diff
changeset
|
907 |
lemma openin_Int_open: |
3b6975875633
Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents:
63301
diff
changeset
|
908 |
"\<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
|
909 |
\<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
|
910 |
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
|
911 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
912 |
lemma openin_open_Int[intro]: "open S \<Longrightarrow> openin (subtopology euclidean U) (U \<inter> S)" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
913 |
by (auto simp: openin_open) |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
914 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
915 |
lemma open_openin_trans[trans]: |
53255 | 916 |
"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
|
917 |
by (metis Int_absorb1 openin_open_Int) |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
918 |
|
53255 | 919 |
lemma open_subset: "S \<subseteq> T \<Longrightarrow> open S \<Longrightarrow> openin (subtopology euclidean T) S" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
920 |
by (auto simp: openin_open) |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
921 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
922 |
lemma closedin_closed: "closedin (subtopology euclidean U) S \<longleftrightarrow> (\<exists>T. closed T \<and> S = U \<inter> T)" |
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
923 |
by (simp add: closedin_subtopology Int_ac) |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
924 |
|
53291 | 925 |
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
|
926 |
by (metis closedin_closed) |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
927 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
928 |
lemma closed_subset: "S \<subseteq> T \<Longrightarrow> closed S \<Longrightarrow> closedin (subtopology euclidean T) S" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
929 |
by (auto simp: closedin_closed) |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
930 |
|
64791
05a2b3b20664
facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents:
64788
diff
changeset
|
931 |
lemma closedin_closed_subset: |
05a2b3b20664
facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents:
64788
diff
changeset
|
932 |
"\<lbrakk>closedin (subtopology euclidean U) V; T \<subseteq> U; S = V \<inter> T\<rbrakk> |
05a2b3b20664
facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents:
64788
diff
changeset
|
933 |
\<Longrightarrow> closedin (subtopology euclidean T) S" |
05a2b3b20664
facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents:
64788
diff
changeset
|
934 |
by (metis (no_types, lifting) Int_assoc Int_commute closedin_closed inf.orderE) |
05a2b3b20664
facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents:
64788
diff
changeset
|
935 |
|
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
936 |
lemma finite_imp_closedin: |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
937 |
fixes S :: "'a::t1_space set" |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
938 |
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
|
939 |
by (simp add: finite_imp_closed closed_subset) |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
940 |
|
63305
3b6975875633
Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents:
63301
diff
changeset
|
941 |
lemma closedin_singleton [simp]: |
3b6975875633
Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents:
63301
diff
changeset
|
942 |
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
|
943 |
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
|
944 |
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
|
945 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
946 |
lemma openin_euclidean_subtopology_iff: |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
947 |
fixes S U :: "'a::metric_space set" |
53255 | 948 |
shows "openin (subtopology euclidean U) S \<longleftrightarrow> |
949 |
S \<subseteq> U \<and> (\<forall>x\<in>S. \<exists>e>0. \<forall>x'\<in>U. dist x' x < e \<longrightarrow> x'\<in> S)" |
|
950 |
(is "?lhs \<longleftrightarrow> ?rhs") |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
951 |
proof |
53255 | 952 |
assume ?lhs |
53282 | 953 |
then show ?rhs |
954 |
unfolding openin_open open_dist by blast |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
955 |
next |
63040 | 956 |
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
|
957 |
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
|
958 |
unfolding T_def |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
959 |
apply clarsimp |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
960 |
apply (rule_tac x="d - dist x a" in exI) |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
961 |
apply (clarsimp simp add: less_diff_eq) |
55775 | 962 |
by (metis dist_commute dist_triangle_lt) |
53282 | 963 |
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
|
964 |
unfolding T_def |
55775 | 965 |
by auto (metis dist_self) |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
966 |
from 1 2 show ?lhs |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
967 |
unfolding openin_open open_dist by fast |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
968 |
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
|
969 |
|
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
|
970 |
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
|
971 |
"connected s \<longleftrightarrow> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
972 |
~(\<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
|
973 |
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
|
974 |
s \<subseteq> e1 \<union> e2 \<and> e1 \<inter> e2 = {} \<and> e1 \<noteq> {} \<and> e2 \<noteq> {})" |
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
975 |
apply (simp add: connected_def openin_open disjoint_iff_not_equal, safe) |
63988 | 976 |
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
|
977 |
done |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
978 |
|
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
|
979 |
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
|
980 |
"connected s \<longleftrightarrow> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
981 |
~(\<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
|
982 |
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
|
983 |
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
|
984 |
e1 \<noteq> {} \<and> e2 \<noteq> {})" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
985 |
apply (simp add: connected_openin, safe, blast) |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
986 |
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
|
987 |
|
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
|
988 |
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
|
989 |
"connected s \<longleftrightarrow> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
990 |
~(\<exists>e1 e2. |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
991 |
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
|
992 |
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
|
993 |
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
|
994 |
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
|
995 |
proof - |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
996 |
{ 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
|
997 |
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
|
998 |
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
|
999 |
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
|
1000 |
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
|
1001 |
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
|
1002 |
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
|
1003 |
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
|
1004 |
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
|
1005 |
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
|
1006 |
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
|
1007 |
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
|
1008 |
then have False |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1009 |
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
|
1010 |
} note * = this |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1011 |
show ?thesis |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1012 |
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
|
1013 |
apply (safe; simp) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1014 |
apply blast |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1015 |
apply (blast intro: *) |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1016 |
done |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1017 |
qed |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1018 |
|
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
|
1019 |
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
|
1020 |
"connected s \<longleftrightarrow> |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1021 |
~(\<exists>e1 e2. |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1022 |
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
|
1023 |
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
|
1024 |
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
|
1025 |
e1 \<noteq> {} \<and> e2 \<noteq> {})" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
1026 |
apply (simp add: connected_closedin, safe, blast) |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
1027 |
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
|
1028 |
|
60420 | 1029 |
text \<open>These "transitivity" results are handy too\<close> |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
1030 |
|
53255 | 1031 |
lemma openin_trans[trans]: |
1032 |
"openin (subtopology euclidean T) S \<Longrightarrow> openin (subtopology euclidean U) T \<Longrightarrow> |
|
1033 |
openin (subtopology euclidean U) S" |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
1034 |
unfolding open_openin openin_open by blast |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
1035 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
1036 |
lemma openin_open_trans: "openin (subtopology euclidean T) S \<Longrightarrow> open T \<Longrightarrow> open S" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
1037 |
by (auto simp: openin_open intro: openin_trans) |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
1038 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
1039 |
lemma closedin_trans[trans]: |
53255 | 1040 |
"closedin (subtopology euclidean T) S \<Longrightarrow> closedin (subtopology euclidean U) T \<Longrightarrow> |
1041 |
closedin (subtopology euclidean U) S" |
|
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
1042 |
by (auto simp: closedin_closed closed_Inter Int_assoc) |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
1043 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
1044 |
lemma closedin_closed_trans: "closedin (subtopology euclidean T) S \<Longrightarrow> closed T \<Longrightarrow> closed S" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
1045 |
by (auto simp: closedin_closed intro: closedin_trans) |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
1046 |
|
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
|
1047 |
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
|
1048 |
"\<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
|
1049 |
by (auto simp: openin_subtopology) |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1050 |
|
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1051 |
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
|
1052 |
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
|
1053 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
1054 |
|
60420 | 1055 |
subsection \<open>Open and closed balls\<close> |
33175 | 1056 |
|
67962 | 1057 |
definition%important ball :: "'a::metric_space \<Rightarrow> real \<Rightarrow> 'a set" |
53255 | 1058 |
where "ball x e = {y. dist x y < e}" |
1059 |
||
67962 | 1060 |
definition%important cball :: "'a::metric_space \<Rightarrow> real \<Rightarrow> 'a set" |
53255 | 1061 |
where "cball x e = {y. dist x y \<le> e}" |
33175 | 1062 |
|
67962 | 1063 |
definition%important sphere :: "'a::metric_space \<Rightarrow> real \<Rightarrow> 'a set" |
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
|
1064 |
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
|
1065 |
|
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
|
1066 |
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
|
1067 |
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
|
1068 |
|
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
|
1069 |
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
|
1070 |
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
|
1071 |
|
61848 | 1072 |
lemma mem_sphere [simp]: "y \<in> sphere x e \<longleftrightarrow> dist x y = e" |
1073 |
by (simp add: sphere_def) |
|
1074 |
||
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1075 |
lemma ball_trivial [simp]: "ball x 0 = {}" |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1076 |
by (simp add: ball_def) |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1077 |
|
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1078 |
lemma cball_trivial [simp]: "cball x 0 = {x}" |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1079 |
by (simp add: cball_def) |
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1080 |
|
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63332
diff
changeset
|
1081 |
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
|
1082 |
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
|
1083 |
|
64539 | 1084 |
lemma mem_ball_0 [simp]: "x \<in> ball 0 e \<longleftrightarrow> norm x < e" |
1085 |
for x :: "'a::real_normed_vector" |
|
33175 | 1086 |
by (simp add: dist_norm) |
1087 |
||
64539 | 1088 |
lemma mem_cball_0 [simp]: "x \<in> cball 0 e \<longleftrightarrow> norm x \<le> e" |
1089 |
for x :: "'a::real_normed_vector" |
|
33175 | 1090 |
by (simp add: dist_norm) |
1091 |
||
64539 | 1092 |
lemma disjoint_ballI: "dist x y \<ge> r+s \<Longrightarrow> ball x r \<inter> ball y s = {}" |
64287 | 1093 |
using dist_triangle_less_add not_le by fastforce |
1094 |
||
64539 | 1095 |
lemma disjoint_cballI: "dist x y > r + s \<Longrightarrow> cball x r \<inter> cball y s = {}" |
64287 | 1096 |
by (metis add_mono disjoint_iff_not_equal dist_triangle2 dual_order.trans leD mem_cball) |
1097 |
||
64539 | 1098 |
lemma mem_sphere_0 [simp]: "x \<in> sphere 0 e \<longleftrightarrow> norm x = e" |
1099 |
for x :: "'a::real_normed_vector" |
|
63114
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1100 |
by (simp add: dist_norm) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1101 |
|
64539 | 1102 |
lemma sphere_empty [simp]: "r < 0 \<Longrightarrow> sphere a r = {}" |
1103 |
for a :: "'a::metric_space" |
|
1104 |
by auto |
|
63881
b746b19197bd
lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents:
63627
diff
changeset
|
1105 |
|
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1106 |
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
|
1107 |
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
|
1108 |
|
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
1109 |
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
|
1110 |
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
|
1111 |
|
64539 | 1112 |
lemma ball_subset_cball [simp, intro]: "ball x e \<subseteq> cball x e" |
53255 | 1113 |
by (simp add: subset_eq) |
1114 |
||
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1115 |
lemma mem_ball_imp_mem_cball: "x \<in> ball y e \<Longrightarrow> x \<in> cball y e" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1116 |
by (auto simp: mem_ball mem_cball) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1117 |
|
61907
f0c894ab18c9
Liouville theorem, Fundamental Theorem of Algebra, etc.
paulson <lp15@cam.ac.uk>
parents:
61880
diff
changeset
|
1118 |
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
|
1119 |
by force |
f0c894ab18c9
Liouville theorem, Fundamental Theorem of Algebra, etc.
paulson <lp15@cam.ac.uk>
parents:
61880
diff
changeset
|
1120 |
|
64758
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
1121 |
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
|
1122 |
by auto |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
1123 |
|
53282 | 1124 |
lemma subset_ball[intro]: "d \<le> e \<Longrightarrow> ball x d \<subseteq> ball x e" |
53255 | 1125 |
by (simp add: subset_eq) |
1126 |
||
53282 | 1127 |
lemma subset_cball[intro]: "d \<le> e \<Longrightarrow> cball x d \<subseteq> cball x e" |
53255 | 1128 |
by (simp add: subset_eq) |
1129 |
||
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1130 |
lemma mem_ball_leI: "x \<in> ball y e \<Longrightarrow> e \<le> f \<Longrightarrow> x \<in> ball y f" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1131 |
by (auto simp: mem_ball mem_cball) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1132 |
|
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1133 |
lemma mem_cball_leI: "x \<in> cball y e \<Longrightarrow> e \<le> f \<Longrightarrow> x \<in> cball y f" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1134 |
by (auto simp: mem_ball mem_cball) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1135 |
|
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1136 |
lemma cball_trans: "y \<in> cball z b \<Longrightarrow> x \<in> cball y a \<Longrightarrow> x \<in> cball z (b + a)" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1137 |
unfolding mem_cball |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1138 |
proof - |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1139 |
have "dist z x \<le> dist z y + dist y x" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1140 |
by (rule dist_triangle) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1141 |
also assume "dist z y \<le> b" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1142 |
also assume "dist y x \<le> a" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1143 |
finally show "dist z x \<le> b + a" by arith |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1144 |
qed |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1145 |
|
33175 | 1146 |
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
|
1147 |
by (simp add: set_eq_iff) arith |
33175 | 1148 |
|
1149 |
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
|
1150 |
by (simp add: set_eq_iff) |
33175 | 1151 |
|
64758
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
1152 |
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
|
1153 |
by (simp add: set_eq_iff) arith |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
1154 |
|
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
1155 |
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
|
1156 |
by (simp add: set_eq_iff) |
3b33d2fc5fc0
A few new lemmas and needed adaptations
paulson <lp15@cam.ac.uk>
parents:
64539
diff
changeset
|
1157 |
|
64788
19f3d4af7a7d
New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
64773
diff
changeset
|
1158 |
lemma cball_diff_eq_sphere: "cball a r - ball a r = sphere a r" |
61426
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
1159 |
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
|
1160 |
|
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
1161 |
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
|
1162 |
fixes a :: "'a::real_normed_vector" |
67399 | 1163 |
shows "(+) b ` ball a r = ball (a+b) r" |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
1164 |
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
|
1165 |
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
|
1166 |
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
|
1167 |
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
|
1168 |
done |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
1169 |
|
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
1170 |
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
|
1171 |
fixes a :: "'a::real_normed_vector" |
67399 | 1172 |
shows "(+) b ` cball a r = cball (a+b) r" |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
1173 |
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
|
1174 |
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
|
1175 |
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
|
1176 |
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
|
1177 |
done |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
1178 |
|
54070 | 1179 |
lemma open_ball [intro, simp]: "open (ball x e)" |
1180 |
proof - |
|
1181 |
have "open (dist x -` {..<e})" |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
1182 |
by (intro open_vimage open_lessThan continuous_intros) |
54070 | 1183 |
also have "dist x -` {..<e} = ball x e" |
1184 |
by auto |
|
1185 |
finally show ?thesis . |
|
1186 |
qed |
|
33175 | 1187 |
|
1188 |
lemma open_contains_ball: "open S \<longleftrightarrow> (\<forall>x\<in>S. \<exists>e>0. ball x e \<subseteq> S)" |
|
63170 | 1189 |
by (simp add: open_dist subset_eq mem_ball Ball_def dist_commute) |
33175 | 1190 |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
1191 |
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
|
1192 |
by (auto simp: open_contains_ball) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
1193 |
|
33714
eb2574ac4173
Added new lemmas to Euclidean Space by Robert Himmelmann
hoelzl
parents:
33324
diff
changeset
|
1194 |
lemma openE[elim?]: |
53282 | 1195 |
assumes "open S" "x\<in>S" |
33714
eb2574ac4173
Added new lemmas to Euclidean Space by Robert Himmelmann
hoelzl
parents:
33324
diff
changeset
|
1196 |
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
|
1197 |
using assms unfolding open_contains_ball by auto |
eb2574ac4173
Added new lemmas to Euclidean Space by Robert Himmelmann
hoelzl
parents:
33324
diff
changeset
|
1198 |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
1199 |
lemma open_contains_ball_eq: "open S \<Longrightarrow> x\<in>S \<longleftrightarrow> (\<exists>e>0. ball x e \<subseteq> S)" |
33175 | 1200 |
by (metis open_contains_ball subset_eq centre_in_ball) |
1201 |
||
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
|
1202 |
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
|
1203 |
"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
|
1204 |
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
|
1205 |
(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
|
1206 |
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
|
1207 |
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
|
1208 |
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
|
1209 |
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
|
1210 |
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
|
1211 |
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
|
1212 |
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
|
1213 |
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
|
1214 |
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
|
1215 |
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
|
1216 |
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
|
1217 |
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
|
1218 |
|
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
1219 |
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
|
1220 |
"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
|
1221 |
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
|
1222 |
(\<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
|
1223 |
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
|
1224 |
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
|
1225 |
apply (auto dest!: bspec) |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
1226 |
apply (rule_tac x="e/2" in exI, force+) |
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
|
1227 |
done |
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
1228 |
|
33175 | 1229 |
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
|
1230 |
unfolding mem_ball set_eq_iff |
33175 | 1231 |
apply (simp add: not_less) |
52624 | 1232 |
apply (metis zero_le_dist order_trans dist_self) |
1233 |
done |
|
33175 | 1234 |
|
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
|
1235 |
lemma ball_empty: "e \<le> 0 \<Longrightarrow> ball x e = {}" by simp |
33175 | 1236 |
|
66827
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1237 |
lemma closed_cball [iff]: "closed (cball x e)" |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1238 |
proof - |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1239 |
have "closed (dist x -` {..e})" |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1240 |
by (intro closed_vimage closed_atMost continuous_intros) |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1241 |
also have "dist x -` {..e} = cball x e" |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1242 |
by auto |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1243 |
finally show ?thesis . |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1244 |
qed |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1245 |
|
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1246 |
lemma open_contains_cball: "open S \<longleftrightarrow> (\<forall>x\<in>S. \<exists>e>0. cball x e \<subseteq> S)" |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1247 |
proof - |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1248 |
{ |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1249 |
fix x and e::real |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1250 |
assume "x\<in>S" "e>0" "ball x e \<subseteq> S" |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1251 |
then have "\<exists>d>0. cball x d \<subseteq> S" unfolding subset_eq by (rule_tac x="e/2" in exI, auto) |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1252 |
} |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1253 |
moreover |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1254 |
{ |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1255 |
fix x and e::real |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1256 |
assume "x\<in>S" "e>0" "cball x e \<subseteq> S" |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1257 |
then have "\<exists>d>0. ball x d \<subseteq> S" |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1258 |
unfolding subset_eq |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1259 |
apply (rule_tac x="e/2" in exI, auto) |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1260 |
done |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1261 |
} |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1262 |
ultimately show ?thesis |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1263 |
unfolding open_contains_ball by auto |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1264 |
qed |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1265 |
|
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1266 |
lemma open_contains_cball_eq: "open S \<Longrightarrow> (\<forall>x. x \<in> S \<longleftrightarrow> (\<exists>e>0. cball x e \<subseteq> S))" |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1267 |
by (metis open_contains_cball subset_eq order_less_imp_le centre_in_cball) |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
1268 |
|
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
|
1269 |
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
|
1270 |
fixes x y :: "'a :: euclidean_space" |
67155 | 1271 |
shows "dist x y = L2_set (\<lambda>i. dist (x \<bullet> i) (y \<bullet> i)) Basis" |
1272 |
unfolding dist_norm norm_eq_sqrt_inner L2_set_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
|
1273 |
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
|
1274 |
|
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1275 |
lemma norm_nth_le: "norm (x \<bullet> i) \<le> norm x" if "i \<in> Basis" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1276 |
proof - |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1277 |
have "(x \<bullet> i)\<^sup>2 = (\<Sum>i\<in>{i}. (x \<bullet> i)\<^sup>2)" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1278 |
by simp |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1279 |
also have "\<dots> \<le> (\<Sum>i\<in>Basis. (x \<bullet> i)\<^sup>2)" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1280 |
by (intro sum_mono2) (auto simp: that) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1281 |
finally show ?thesis |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1282 |
unfolding norm_conv_dist euclidean_dist_l2[of x] L2_set_def |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1283 |
by (auto intro!: real_le_rsqrt) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1284 |
qed |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1285 |
|
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1286 |
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
|
1287 |
by (rule eventually_nhds_in_open) simp_all |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1288 |
|
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1289 |
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
|
1290 |
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
|
1291 |
|
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
1292 |
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
|
1293 |
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
|
1294 |
|
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1295 |
lemma at_within_ball: "e > 0 \<Longrightarrow> dist x y < e \<Longrightarrow> at y within ball x e = at y" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1296 |
by (subst at_within_open) auto |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1297 |
|
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1298 |
lemma atLeastAtMost_eq_cball: |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1299 |
fixes a b::real |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1300 |
shows "{a .. b} = cball ((a + b)/2) ((b - a)/2)" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1301 |
by (auto simp: dist_real_def field_simps mem_cball) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1302 |
|
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1303 |
lemma greaterThanLessThan_eq_ball: |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1304 |
fixes a b::real |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1305 |
shows "{a <..< b} = ball ((a + b)/2) ((b - a)/2)" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1306 |
by (auto simp: dist_real_def field_simps mem_ball) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1307 |
|
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1308 |
|
60420 | 1309 |
subsection \<open>Boxes\<close> |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1310 |
|
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
1311 |
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
|
1312 |
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
|
1313 |
|
63114
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1314 |
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
|
1315 |
proof - |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1316 |
have "dependent (Basis :: 'a set)" |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1317 |
apply (simp add: dependent_finite) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1318 |
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
|
1319 |
using SOME_Basis apply (auto simp: assms) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1320 |
done |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1321 |
with independent_Basis show False by force |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1322 |
qed |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1323 |
|
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1324 |
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
|
1325 |
by (metis One_non_0) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1326 |
|
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1327 |
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
|
1328 |
by (metis One_non_0) |
27afe7af7379
Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
63105
diff
changeset
|
1329 |
|
67962 | 1330 |
definition%important (in euclidean_space) eucl_less (infix "<e" 50) |
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54489
diff
changeset
|
1331 |
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
|
1332 |
|
67962 | 1333 |
definition%important box_eucl_less: "box a b = {x. a <e x \<and> x <e b}" |
1334 |
definition%important "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
|
1335 |
|
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54489
diff
changeset
|
1336 |
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
|
1337 |
and in_box_eucl_less: "x \<in> box a b \<longleftrightarrow> a <e x \<and> x <e b" |
56188 | 1338 |
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)" |
1339 |
"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)" |
|
1340 |
by (auto simp: box_eucl_less eucl_less_def cbox_def) |
|
1341 |
||
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1342 |
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
|
1343 |
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
|
1344 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1345 |
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
|
1346 |
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
|
1347 |
|
65587
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65585
diff
changeset
|
1348 |
lemma cbox_Complex_eq: "cbox (Complex a c) (Complex b d) = (\<lambda>(x,y). Complex x y) ` (cbox a b \<times> cbox c d)" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65585
diff
changeset
|
1349 |
apply (auto simp: cbox_def Basis_complex_def) |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65585
diff
changeset
|
1350 |
apply (rule_tac x = "(Re x, Im x)" in image_eqI) |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65585
diff
changeset
|
1351 |
using complex_eq by auto |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65585
diff
changeset
|
1352 |
|
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1353 |
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
|
1354 |
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
|
1355 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1356 |
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
|
1357 |
by auto |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1358 |
|
56188 | 1359 |
lemma mem_box_real[simp]: |
1360 |
"(x::real) \<in> box a b \<longleftrightarrow> a < x \<and> x < b" |
|
1361 |
"(x::real) \<in> cbox a b \<longleftrightarrow> a \<le> x \<and> x \<le> b" |
|
1362 |
by (auto simp: mem_box) |
|
1363 |
||
1364 |
lemma box_real[simp]: |
|
1365 |
fixes a b:: real |
|
1366 |
shows "box a b = {a <..< b}" "cbox a b = {a .. b}" |
|
1367 |
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
|
1368 |
|
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
1369 |
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
|
1370 |
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
|
1371 |
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
|
1372 |
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
|
1373 |
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
|
1374 |
|
50087 | 1375 |
lemma rational_boxes: |
61076 | 1376 |
fixes x :: "'a::euclidean_space" |
53291 | 1377 |
assumes "e > 0" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
1378 |
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 | 1379 |
proof - |
63040 | 1380 |
define e' where "e' = e / (2 * sqrt (real (DIM ('a))))" |
53291 | 1381 |
then have e: "e' > 0" |
56541 | 1382 |
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
|
1383 |
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 | 1384 |
proof |
53255 | 1385 |
fix i |
1386 |
from Rats_dense_in_real[of "x \<bullet> i - e'" "x \<bullet> i"] e |
|
1387 |
show "?th i" by auto |
|
50087 | 1388 |
qed |
55522 | 1389 |
from choice[OF this] obtain a where |
1390 |
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
|
1391 |
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 | 1392 |
proof |
53255 | 1393 |
fix i |
1394 |
from Rats_dense_in_real[of "x \<bullet> i" "x \<bullet> i + e'"] e |
|
1395 |
show "?th i" by auto |
|
50087 | 1396 |
qed |
55522 | 1397 |
from choice[OF this] obtain b where |
1398 |
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
|
1399 |
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
|
1400 |
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
|
1401 |
proof (rule exI[of _ ?a], rule exI[of _ ?b], safe) |
53255 | 1402 |
fix y :: 'a |
1403 |
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
|
1404 |
have "dist x y = sqrt (\<Sum>i\<in>Basis. (dist (x \<bullet> i) (y \<bullet> i))\<^sup>2)" |
67155 | 1405 |
unfolding L2_set_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
|
1406 |
also have "\<dots> < sqrt (\<Sum>(i::'a)\<in>Basis. e^2 / real (DIM('a)))" |
64267 | 1407 |
proof (rule real_sqrt_less_mono, rule sum_strict_mono) |
53255 | 1408 |
fix i :: "'a" |
1409 |
assume i: "i \<in> Basis" |
|
1410 |
have "a i < y\<bullet>i \<and> y\<bullet>i < b i" |
|
1411 |
using * i by (auto simp: box_def) |
|
1412 |
moreover have "a i < x\<bullet>i" "x\<bullet>i - a i < e'" |
|
1413 |
using a by auto |
|
1414 |
moreover have "x\<bullet>i < b i" "b i - x\<bullet>i < e'" |
|
1415 |
using b by auto |
|
1416 |
ultimately have "\<bar>x\<bullet>i - y\<bullet>i\<bar> < 2 * e'" |
|
1417 |
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
|
1418 |
then have "dist (x \<bullet> i) (y \<bullet> i) < e/sqrt (real (DIM('a)))" |
50087 | 1419 |
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
|
1420 |
then have "(dist (x \<bullet> i) (y \<bullet> i))\<^sup>2 < (e/sqrt (real (DIM('a))))\<^sup>2" |
50087 | 1421 |
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
|
1422 |
then show "(dist (x \<bullet> i) (y \<bullet> i))\<^sup>2 < e\<^sup>2 / real DIM('a)" |
50087 | 1423 |
by (simp add: power_divide) |
1424 |
qed auto |
|
53255 | 1425 |
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
|
1426 |
using \<open>0 < e\<close> by simp |
53255 | 1427 |
finally show "y \<in> ball x e" |
1428 |
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
|
1429 |
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
|
1430 |
qed |
51103 | 1431 |
|
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
|
1432 |
lemma open_UNION_box: |
61076 | 1433 |
fixes M :: "'a::euclidean_space set" |
53282 | 1434 |
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
|
1435 |
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
|
1436 |
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
|
1437 |
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
|
1438 |
shows "M = (\<Union>f\<in>I. box (a' f) (b' f))" |
52624 | 1439 |
proof - |
60462 | 1440 |
have "x \<in> (\<Union>f\<in>I. box (a' f) (b' f))" if "x \<in> M" for x |
1441 |
proof - |
|
52624 | 1442 |
obtain e where e: "e > 0" "ball x e \<subseteq> M" |
60420 | 1443 |
using openE[OF \<open>open M\<close> \<open>x \<in> M\<close>] by auto |
53282 | 1444 |
moreover obtain a b where ab: |
1445 |
"x \<in> box a b" |
|
1446 |
"\<forall>i \<in> Basis. a \<bullet> i \<in> \<rat>" |
|
1447 |
"\<forall>i\<in>Basis. b \<bullet> i \<in> \<rat>" |
|
1448 |
"box a b \<subseteq> ball x e" |
|
52624 | 1449 |
using rational_boxes[OF e(1)] by metis |
60462 | 1450 |
ultimately show ?thesis |
52624 | 1451 |
by (intro UN_I[of "\<lambda>i\<in>Basis. (a \<bullet> i, b \<bullet> i)"]) |
1452 |
(auto simp: euclidean_representation I_def a'_def b'_def) |
|
60462 | 1453 |
qed |
52624 | 1454 |
then show ?thesis by (auto simp: I_def) |
1455 |
qed |
|
1456 |
||
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1457 |
corollary open_countable_Union_open_box: |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1458 |
fixes S :: "'a :: euclidean_space set" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1459 |
assumes "open S" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1460 |
obtains \<D> where "countable \<D>" "\<D> \<subseteq> Pow S" "\<And>X. X \<in> \<D> \<Longrightarrow> \<exists>a b. X = box a b" "\<Union>\<D> = S" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1461 |
proof - |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1462 |
let ?a = "\<lambda>f. (\<Sum>(i::'a)\<in>Basis. fst (f i) *\<^sub>R i)" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1463 |
let ?b = "\<lambda>f. (\<Sum>(i::'a)\<in>Basis. snd (f i) *\<^sub>R i)" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1464 |
let ?I = "{f\<in>Basis \<rightarrow>\<^sub>E \<rat> \<times> \<rat>. box (?a f) (?b f) \<subseteq> S}" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1465 |
let ?\<D> = "(\<lambda>f. box (?a f) (?b f)) ` ?I" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1466 |
show ?thesis |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1467 |
proof |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1468 |
have "countable ?I" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1469 |
by (simp add: countable_PiE countable_rat) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1470 |
then show "countable ?\<D>" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1471 |
by blast |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1472 |
show "\<Union>?\<D> = S" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1473 |
using open_UNION_box [OF assms] by metis |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1474 |
qed auto |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1475 |
qed |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1476 |
|
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1477 |
lemma rational_cboxes: |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1478 |
fixes x :: "'a::euclidean_space" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1479 |
assumes "e > 0" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1480 |
shows "\<exists>a b. (\<forall>i\<in>Basis. a \<bullet> i \<in> \<rat> \<and> b \<bullet> i \<in> \<rat>) \<and> x \<in> cbox a b \<and> cbox a b \<subseteq> ball x e" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1481 |
proof - |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1482 |
define e' where "e' = e / (2 * sqrt (real (DIM ('a))))" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1483 |
then have e: "e' > 0" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1484 |
using assms by auto |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1485 |
have "\<forall>i. \<exists>y. y \<in> \<rat> \<and> y < x \<bullet> i \<and> x \<bullet> i - y < e'" (is "\<forall>i. ?th i") |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1486 |
proof |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1487 |
fix i |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1488 |
from Rats_dense_in_real[of "x \<bullet> i - e'" "x \<bullet> i"] e |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1489 |
show "?th i" by auto |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1490 |
qed |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1491 |
from choice[OF this] obtain a where |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1492 |
a: "\<forall>u. a u \<in> \<rat> \<and> a u < x \<bullet> u \<and> x \<bullet> u - a u < e'" .. |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1493 |
have "\<forall>i. \<exists>y. y \<in> \<rat> \<and> x \<bullet> i < y \<and> y - x \<bullet> i < e'" (is "\<forall>i. ?th i") |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1494 |
proof |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1495 |
fix i |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1496 |
from Rats_dense_in_real[of "x \<bullet> i" "x \<bullet> i + e'"] e |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1497 |
show "?th i" by auto |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1498 |
qed |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1499 |
from choice[OF this] obtain b where |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1500 |
b: "\<forall>u. b u \<in> \<rat> \<and> x \<bullet> u < b u \<and> b u - x \<bullet> u < e'" .. |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1501 |
let ?a = "\<Sum>i\<in>Basis. a i *\<^sub>R i" and ?b = "\<Sum>i\<in>Basis. b i *\<^sub>R i" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1502 |
show ?thesis |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1503 |
proof (rule exI[of _ ?a], rule exI[of _ ?b], safe) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1504 |
fix y :: 'a |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1505 |
assume *: "y \<in> cbox ?a ?b" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1506 |
have "dist x y = sqrt (\<Sum>i\<in>Basis. (dist (x \<bullet> i) (y \<bullet> i))\<^sup>2)" |
67155 | 1507 |
unfolding L2_set_def[symmetric] by (rule euclidean_dist_l2) |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1508 |
also have "\<dots> < sqrt (\<Sum>(i::'a)\<in>Basis. e^2 / real (DIM('a)))" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1509 |
proof (rule real_sqrt_less_mono, rule sum_strict_mono) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1510 |
fix i :: "'a" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1511 |
assume i: "i \<in> Basis" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1512 |
have "a i \<le> y\<bullet>i \<and> y\<bullet>i \<le> b i" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1513 |
using * i by (auto simp: cbox_def) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1514 |
moreover have "a i < x\<bullet>i" "x\<bullet>i - a i < e'" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1515 |
using a by auto |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1516 |
moreover have "x\<bullet>i < b i" "b i - x\<bullet>i < e'" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1517 |
using b by auto |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1518 |
ultimately have "\<bar>x\<bullet>i - y\<bullet>i\<bar> < 2 * e'" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1519 |
by auto |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1520 |
then have "dist (x \<bullet> i) (y \<bullet> i) < e/sqrt (real (DIM('a)))" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1521 |
unfolding e'_def by (auto simp: dist_real_def) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1522 |
then have "(dist (x \<bullet> i) (y \<bullet> i))\<^sup>2 < (e/sqrt (real (DIM('a))))\<^sup>2" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1523 |
by (rule power_strict_mono) auto |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1524 |
then show "(dist (x \<bullet> i) (y \<bullet> i))\<^sup>2 < e\<^sup>2 / real DIM('a)" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1525 |
by (simp add: power_divide) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1526 |
qed auto |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1527 |
also have "\<dots> = e" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1528 |
using \<open>0 < e\<close> by simp |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1529 |
finally show "y \<in> ball x e" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1530 |
by (auto simp: ball_def) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1531 |
next |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1532 |
show "x \<in> cbox (\<Sum>i\<in>Basis. a i *\<^sub>R i) (\<Sum>i\<in>Basis. b i *\<^sub>R i)" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1533 |
using a b less_imp_le by (auto simp: cbox_def) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1534 |
qed (use a b cbox_def in auto) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1535 |
qed |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1536 |
|
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1537 |
lemma open_UNION_cbox: |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1538 |
fixes M :: "'a::euclidean_space set" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1539 |
assumes "open M" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1540 |
defines "a' \<equiv> \<lambda>f. (\<Sum>(i::'a)\<in>Basis. fst (f i) *\<^sub>R i)" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1541 |
defines "b' \<equiv> \<lambda>f. (\<Sum>(i::'a)\<in>Basis. snd (f i) *\<^sub>R i)" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1542 |
defines "I \<equiv> {f\<in>Basis \<rightarrow>\<^sub>E \<rat> \<times> \<rat>. cbox (a' f) (b' f) \<subseteq> M}" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1543 |
shows "M = (\<Union>f\<in>I. cbox (a' f) (b' f))" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1544 |
proof - |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1545 |
have "x \<in> (\<Union>f\<in>I. cbox (a' f) (b' f))" if "x \<in> M" for x |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1546 |
proof - |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1547 |
obtain e where e: "e > 0" "ball x e \<subseteq> M" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1548 |
using openE[OF \<open>open M\<close> \<open>x \<in> M\<close>] by auto |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1549 |
moreover obtain a b where ab: "x \<in> cbox a b" "\<forall>i \<in> Basis. a \<bullet> i \<in> \<rat>" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1550 |
"\<forall>i \<in> Basis. b \<bullet> i \<in> \<rat>" "cbox a b \<subseteq> ball x e" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1551 |
using rational_cboxes[OF e(1)] by metis |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1552 |
ultimately show ?thesis |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1553 |
by (intro UN_I[of "\<lambda>i\<in>Basis. (a \<bullet> i, b \<bullet> i)"]) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1554 |
(auto simp: euclidean_representation I_def a'_def b'_def) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1555 |
qed |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1556 |
then show ?thesis by (auto simp: I_def) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1557 |
qed |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1558 |
|
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1559 |
corollary open_countable_Union_open_cbox: |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1560 |
fixes S :: "'a :: euclidean_space set" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1561 |
assumes "open S" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1562 |
obtains \<D> where "countable \<D>" "\<D> \<subseteq> Pow S" "\<And>X. X \<in> \<D> \<Longrightarrow> \<exists>a b. X = cbox a b" "\<Union>\<D> = S" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1563 |
proof - |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1564 |
let ?a = "\<lambda>f. (\<Sum>(i::'a)\<in>Basis. fst (f i) *\<^sub>R i)" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1565 |
let ?b = "\<lambda>f. (\<Sum>(i::'a)\<in>Basis. snd (f i) *\<^sub>R i)" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1566 |
let ?I = "{f\<in>Basis \<rightarrow>\<^sub>E \<rat> \<times> \<rat>. cbox (?a f) (?b f) \<subseteq> S}" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1567 |
let ?\<D> = "(\<lambda>f. cbox (?a f) (?b f)) ` ?I" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1568 |
show ?thesis |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1569 |
proof |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1570 |
have "countable ?I" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1571 |
by (simp add: countable_PiE countable_rat) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1572 |
then show "countable ?\<D>" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1573 |
by blast |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1574 |
show "\<Union>?\<D> = S" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1575 |
using open_UNION_cbox [OF assms] by metis |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1576 |
qed auto |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1577 |
qed |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1578 |
|
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1579 |
lemma box_eq_empty: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1580 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1581 |
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
|
1582 |
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
|
1583 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1584 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1585 |
fix i x |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1586 |
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
|
1587 |
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
|
1588 |
unfolding mem_box by (auto simp: box_def) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1589 |
then have "a\<bullet>i < b\<bullet>i" by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1590 |
then have False using as by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1591 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1592 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1593 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1594 |
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
|
1595 |
let ?x = "(1/2) *\<^sub>R (a + b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1596 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1597 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1598 |
assume i: "i \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1599 |
have "a\<bullet>i < b\<bullet>i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1600 |
using as[THEN bspec[where x=i]] i by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1601 |
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
|
1602 |
by (auto simp: inner_add_left) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1603 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1604 |
then have "box a b \<noteq> {}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1605 |
using mem_box(1)[of "?x" a b] by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1606 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1607 |
ultimately show ?th1 by blast |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1608 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1609 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1610 |
fix i x |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1611 |
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
|
1612 |
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
|
1613 |
unfolding mem_box by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1614 |
then have "a\<bullet>i \<le> b\<bullet>i" by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1615 |
then have False using as by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1616 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1617 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1618 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1619 |
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
|
1620 |
let ?x = "(1/2) *\<^sub>R (a + b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1621 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1622 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1623 |
assume i:"i \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1624 |
have "a\<bullet>i \<le> b\<bullet>i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1625 |
using as[THEN bspec[where x=i]] i by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1626 |
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
|
1627 |
by (auto simp: inner_add_left) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1628 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1629 |
then have "cbox a b \<noteq> {}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1630 |
using mem_box(2)[of "?x" a b] by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1631 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1632 |
ultimately show ?th2 by blast |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1633 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1634 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1635 |
lemma box_ne_empty: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1636 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1637 |
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
|
1638 |
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
|
1639 |
unfolding box_eq_empty[of a b] by fastforce+ |
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 |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1642 |
fixes a :: "'a::euclidean_space" |
66112
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
1643 |
shows cbox_sing [simp]: "cbox a a = {a}" |
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
1644 |
and box_sing [simp]: "box a a = {}" |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1645 |
unfolding set_eq_iff mem_box eq_iff [symmetric] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1646 |
by (auto intro!: euclidean_eqI[where 'a='a]) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1647 |
(metis all_not_in_conv nonempty_Basis) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1648 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1649 |
lemma subset_box_imp: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1650 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1651 |
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
|
1652 |
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
|
1653 |
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
|
1654 |
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
|
1655 |
unfolding subset_eq[unfolded Ball_def] unfolding mem_box |
58757 | 1656 |
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
|
1657 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1658 |
lemma box_subset_cbox: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1659 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1660 |
shows "box a b \<subseteq> cbox a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1661 |
unfolding subset_eq [unfolded Ball_def] mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1662 |
by (fast intro: less_imp_le) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1663 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1664 |
lemma subset_box: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1665 |
fixes a :: "'a::euclidean_space" |
64539 | 1666 |
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) |
1667 |
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) |
|
1668 |
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) |
|
1669 |
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
|
1670 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1671 |
show ?th1 |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1672 |
unfolding subset_eq and Ball_def and mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1673 |
by (auto intro: order_trans) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1674 |
show ?th2 |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1675 |
unfolding subset_eq and Ball_def and mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1676 |
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
|
1677 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1678 |
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
|
1679 |
then have "box c d \<noteq> {}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1680 |
unfolding box_eq_empty by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1681 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1682 |
assume i: "i \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1683 |
(** 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
|
1684 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1685 |
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
|
1686 |
assume as2: "a\<bullet>i > c\<bullet>i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1687 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1688 |
fix j :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1689 |
assume j: "j \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1690 |
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
|
1691 |
apply (cases "j = i") |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1692 |
using as(2)[THEN bspec[where x=j]] i |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
1693 |
apply (auto simp: as2) |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1694 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1695 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1696 |
then have "?x\<in>box c d" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1697 |
using i unfolding mem_box by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1698 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1699 |
have "?x \<notin> cbox a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1700 |
unfolding mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1701 |
apply auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1702 |
apply (rule_tac x=i in bexI) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1703 |
using as(2)[THEN bspec[where x=i]] and as2 i |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1704 |
apply auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1705 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1706 |
ultimately have False using as by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1707 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1708 |
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
|
1709 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1710 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1711 |
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
|
1712 |
assume as2: "b\<bullet>i < d\<bullet>i" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1713 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1714 |
fix j :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1715 |
assume "j\<in>Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1716 |
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
|
1717 |
apply (cases "j = i") |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1718 |
using as(2)[THEN bspec[where x=j]] |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
1719 |
apply (auto simp: as2) |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1720 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1721 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1722 |
then have "?x\<in>box c d" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1723 |
unfolding mem_box by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1724 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1725 |
have "?x\<notin>cbox a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1726 |
unfolding mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1727 |
apply auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1728 |
apply (rule_tac x=i in bexI) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1729 |
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
|
1730 |
apply auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1731 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1732 |
ultimately have False using as by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1733 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1734 |
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
|
1735 |
ultimately |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1736 |
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
|
1737 |
} note part1 = this |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1738 |
show ?th3 |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1739 |
unfolding subset_eq and Ball_def and mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1740 |
apply (rule, rule, rule, rule) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1741 |
apply (rule part1) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1742 |
unfolding subset_eq and Ball_def and mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1743 |
prefer 4 |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1744 |
apply auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1745 |
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
|
1746 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1747 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1748 |
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
|
1749 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1750 |
assume i:"i\<in>Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1751 |
from as(1) have "box c d \<subseteq> cbox a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1752 |
using box_subset_cbox[of a b] by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1753 |
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
|
1754 |
using part1 and as(2) using i by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1755 |
} note * = this |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1756 |
show ?th4 |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1757 |
unfolding subset_eq and Ball_def and mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1758 |
apply (rule, rule, rule, rule) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1759 |
apply (rule *) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1760 |
unfolding subset_eq and Ball_def and mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1761 |
prefer 4 |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1762 |
apply auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1763 |
apply (erule_tac x=xa in allE, simp)+ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1764 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1765 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1766 |
|
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1767 |
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
|
1768 |
(is "?lhs = ?rhs") |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1769 |
proof |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1770 |
assume ?lhs |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1771 |
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
|
1772 |
by auto |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1773 |
then show ?rhs |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
1774 |
by (force simp: subset_box box_eq_empty intro: antisym euclidean_eqI) |
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1775 |
next |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1776 |
assume ?rhs |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1777 |
then show ?lhs |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1778 |
by force |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1779 |
qed |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1780 |
|
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1781 |
lemma eq_cbox_box [simp]: "cbox a b = box c d \<longleftrightarrow> cbox a b = {} \<and> box c d = {}" |
64539 | 1782 |
(is "?lhs \<longleftrightarrow> ?rhs") |
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1783 |
proof |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1784 |
assume ?lhs |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1785 |
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
|
1786 |
by auto |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1787 |
then show ?rhs |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
1788 |
apply (simp add: subset_box) |
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1789 |
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
|
1790 |
apply (fastforce simp add:) |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1791 |
done |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1792 |
next |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1793 |
assume ?rhs |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1794 |
then show ?lhs |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1795 |
by force |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1796 |
qed |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1797 |
|
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1798 |
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
|
1799 |
by (metis eq_cbox_box) |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1800 |
|
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1801 |
lemma eq_box: "box a b = box c d \<longleftrightarrow> box a b = {} \<and> box c d = {} \<or> a = c \<and> b = d" |
64539 | 1802 |
(is "?lhs \<longleftrightarrow> ?rhs") |
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1803 |
proof |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1804 |
assume ?lhs |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1805 |
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
|
1806 |
by auto |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1807 |
then show ?rhs |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1808 |
apply (simp add: subset_box) |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63955
diff
changeset
|
1809 |
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
|
1810 |
apply auto |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1811 |
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
|
1812 |
done |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1813 |
next |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1814 |
assume ?rhs |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1815 |
then show ?lhs |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1816 |
by force |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1817 |
qed |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1818 |
|
66466
aec5d9c88d69
More lemmas for HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
66453
diff
changeset
|
1819 |
lemma subset_box_complex: |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
1820 |
"cbox a b \<subseteq> cbox c d \<longleftrightarrow> |
66466
aec5d9c88d69
More lemmas for HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
66453
diff
changeset
|
1821 |
(Re a \<le> Re b \<and> Im a \<le> Im b) \<longrightarrow> Re a \<ge> Re c \<and> Im a \<ge> Im c \<and> Re b \<le> Re d \<and> Im b \<le> Im d" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
1822 |
"cbox a b \<subseteq> box c d \<longleftrightarrow> |
66466
aec5d9c88d69
More lemmas for HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
66453
diff
changeset
|
1823 |
(Re a \<le> Re b \<and> Im a \<le> Im b) \<longrightarrow> Re a > Re c \<and> Im a > Im c \<and> Re b < Re d \<and> Im b < Im d" |
aec5d9c88d69
More lemmas for HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
66453
diff
changeset
|
1824 |
"box a b \<subseteq> cbox c d \<longleftrightarrow> |
aec5d9c88d69
More lemmas for HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
66453
diff
changeset
|
1825 |
(Re a < Re b \<and> Im a < Im b) \<longrightarrow> Re a \<ge> Re c \<and> Im a \<ge> Im c \<and> Re b \<le> Re d \<and> Im b \<le> Im d" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
1826 |
"box a b \<subseteq> box c d \<longleftrightarrow> |
66466
aec5d9c88d69
More lemmas for HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
66453
diff
changeset
|
1827 |
(Re a < Re b \<and> Im a < Im b) \<longrightarrow> Re a \<ge> Re c \<and> Im a \<ge> Im c \<and> Re b \<le> Re d \<and> Im b \<le> Im d" |
aec5d9c88d69
More lemmas for HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
66453
diff
changeset
|
1828 |
by (subst subset_box; force simp: Basis_complex_def)+ |
aec5d9c88d69
More lemmas for HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents:
66453
diff
changeset
|
1829 |
|
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
1830 |
lemma Int_interval: |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1831 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1832 |
shows "cbox a b \<inter> cbox c d = |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1833 |
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
|
1834 |
unfolding set_eq_iff and Int_iff and mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1835 |
by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1836 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1837 |
lemma disjoint_interval: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1838 |
fixes a::"'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1839 |
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
|
1840 |
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
|
1841 |
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
|
1842 |
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
|
1843 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1844 |
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
|
1845 |
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
|
1846 |
(\<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
|
1847 |
by blast |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1848 |
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
|
1849 |
show ?th1 unfolding * by (intro **) auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1850 |
show ?th2 unfolding * by (intro **) auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1851 |
show ?th3 unfolding * by (intro **) auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1852 |
show ?th4 unfolding * by (intro **) auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1853 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1854 |
|
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
1855 |
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
|
1856 |
proof - |
61942 | 1857 |
have "\<bar>x \<bullet> b\<bar> < real_of_int (\<lceil>Max ((\<lambda>b. \<bar>x \<bullet> b\<bar>)`Basis)\<rceil> + 1)" |
60462 | 1858 |
if [simp]: "b \<in> Basis" for x b :: 'a |
1859 |
proof - |
|
61942 | 1860 |
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
|
1861 |
by (rule le_of_int_ceiling) |
61942 | 1862 |
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
|
1863 |
by (auto intro!: ceiling_mono) |
61942 | 1864 |
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
|
1865 |
by simp |
60462 | 1866 |
finally show ?thesis . |
1867 |
qed |
|
1868 |
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
|
1869 |
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
|
1870 |
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
|
1871 |
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
|
1872 |
ultimately show ?thesis |
64267 | 1873 |
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
|
1874 |
qed |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
1875 |
|
67968 | 1876 |
subsection \<open>Intervals in general, including infinite and mixtures of open and closed\<close> |
67962 | 1877 |
|
1878 |
definition%important "is_interval (s::('a::euclidean_space) set) \<longleftrightarrow> |
|
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1879 |
(\<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
|
1880 |
|
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1881 |
lemma is_interval_1: |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1882 |
"is_interval (s::real set) \<longleftrightarrow> (\<forall>a\<in>s. \<forall>b\<in>s. \<forall> x. a \<le> x \<and> x \<le> b \<longrightarrow> x \<in> s)" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1883 |
unfolding is_interval_def by auto |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1884 |
|
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1885 |
lemma is_interval_inter: "is_interval X \<Longrightarrow> is_interval Y \<Longrightarrow> is_interval (X \<inter> Y)" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1886 |
unfolding is_interval_def |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1887 |
by blast |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1888 |
|
66089
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
1889 |
lemma is_interval_cbox [simp]: "is_interval (cbox a (b::'a::euclidean_space))" (is ?th1) |
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
1890 |
and is_interval_box [simp]: "is_interval (box a b)" (is ?th2) |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1891 |
unfolding is_interval_def mem_box Ball_def atLeastAtMost_iff |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1892 |
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
|
1893 |
|
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
|
1894 |
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
|
1895 |
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
|
1896 |
|
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
|
1897 |
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
|
1898 |
unfolding is_interval_def by simp |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1899 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1900 |
lemma mem_is_intervalI: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1901 |
assumes "is_interval s" |
64539 | 1902 |
and "a \<in> s" "b \<in> s" |
1903 |
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
|
1904 |
shows "x \<in> s" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1905 |
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
|
1906 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1907 |
lemma interval_subst: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1908 |
fixes S::"'a::euclidean_space set" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1909 |
assumes "is_interval S" |
64539 | 1910 |
and "x \<in> S" "y j \<in> S" |
1911 |
and "j \<in> Basis" |
|
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1912 |
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
|
1913 |
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
|
1914 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1915 |
lemma mem_box_componentwiseI: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1916 |
fixes S::"'a::euclidean_space set" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1917 |
assumes "is_interval S" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1918 |
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
|
1919 |
shows "x \<in> S" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1920 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1921 |
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
|
1922 |
by auto |
64539 | 1923 |
with finite_Basis obtain s and bs::"'a list" |
1924 |
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" |
|
1925 |
and bs: "set bs = Basis" "distinct bs" |
|
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1926 |
by (metis finite_distinct_list) |
64539 | 1927 |
from nonempty_Basis s obtain j where j: "j \<in> Basis" "s j \<in> S" |
1928 |
by blast |
|
63040 | 1929 |
define y where |
1930 |
"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
|
1931 |
have "x = (\<Sum>i\<in>Basis. (if i \<in> set bs then s i \<bullet> i else s j \<bullet> i) *\<^sub>R i)" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
1932 |
using bs by (auto simp: s(1)[symmetric] euclidean_representation) |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1933 |
also have [symmetric]: "y bs = \<dots>" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1934 |
using bs(2) bs(1)[THEN equalityD1] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1935 |
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
|
1936 |
also have "y bs \<in> S" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1937 |
using bs(1)[THEN equalityD1] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1938 |
apply (induct bs) |
64539 | 1939 |
apply (auto simp: y_def j) |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1940 |
apply (rule interval_subst[OF assms(1)]) |
64539 | 1941 |
apply (auto simp: s) |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1942 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1943 |
finally show ?thesis . |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1944 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
1945 |
|
63007
aa894a49f77d
new theorems about convex hulls, etc.; also, renamed some theorems
paulson <lp15@cam.ac.uk>
parents:
62948
diff
changeset
|
1946 |
lemma cbox01_nonempty [simp]: "cbox 0 One \<noteq> {}" |
64267 | 1947 |
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
|
1948 |
|
aa894a49f77d
new theorems about convex hulls, etc.; also, renamed some theorems
paulson <lp15@cam.ac.uk>
parents:
62948
diff
changeset
|
1949 |
lemma box01_nonempty [simp]: "box 0 One \<noteq> {}" |
66089
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
1950 |
by (simp add: box_ne_empty inner_Basis inner_sum_left) |
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
1951 |
|
64773
223b2ebdda79
Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents:
64758
diff
changeset
|
1952 |
lemma empty_as_interval: "{} = cbox One (0::'a::euclidean_space)" |
223b2ebdda79
Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents:
64758
diff
changeset
|
1953 |
using nonempty_Basis box01_nonempty box_eq_empty(1) box_ne_empty(1) by blast |
223b2ebdda79
Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents:
64758
diff
changeset
|
1954 |
|
66089
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
1955 |
lemma interval_subset_is_interval: |
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
1956 |
assumes "is_interval S" |
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
1957 |
shows "cbox a b \<subseteq> S \<longleftrightarrow> cbox a b = {} \<or> a \<in> S \<and> b \<in> S" (is "?lhs = ?rhs") |
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
1958 |
proof |
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
1959 |
assume ?lhs |
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
1960 |
then show ?rhs using box_ne_empty(1) mem_box(2) by fastforce |
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
1961 |
next |
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
1962 |
assume ?rhs |
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
1963 |
have "cbox a b \<subseteq> S" if "a \<in> S" "b \<in> S" |
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
1964 |
using assms unfolding is_interval_def |
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
1965 |
apply (clarsimp simp add: mem_box) |
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
1966 |
using that by blast |
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
1967 |
with \<open>?rhs\<close> show ?lhs |
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
1968 |
by blast |
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
1969 |
qed |
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
1970 |
|
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1971 |
lemma is_real_interval_union: |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1972 |
"is_interval (X \<union> Y)" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1973 |
if X: "is_interval X" and Y: "is_interval Y" and I: "(X \<noteq> {} \<Longrightarrow> Y \<noteq> {} \<Longrightarrow> X \<inter> Y \<noteq> {})" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1974 |
for X Y::"real set" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1975 |
proof - |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1976 |
consider "X \<noteq> {}" "Y \<noteq> {}" | "X = {}" | "Y = {}" by blast |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1977 |
then show ?thesis |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1978 |
proof cases |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1979 |
case 1 |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1980 |
then obtain r where "r \<in> X \<or> X \<inter> Y = {}" "r \<in> Y \<or> X \<inter> Y = {}" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1981 |
by blast |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1982 |
then show ?thesis |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1983 |
using I 1 X Y unfolding is_interval_1 |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1984 |
by (metis (full_types) Un_iff le_cases) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1985 |
qed (use that in auto) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1986 |
qed |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1987 |
|
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1988 |
lemma is_interval_translationI: |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1989 |
assumes "is_interval X" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1990 |
shows "is_interval ((+) x ` X)" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1991 |
unfolding is_interval_def |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1992 |
proof safe |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1993 |
fix b d e |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1994 |
assume "b \<in> X" "d \<in> X" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1995 |
"\<forall>i\<in>Basis. (x + b) \<bullet> i \<le> e \<bullet> i \<and> e \<bullet> i \<le> (x + d) \<bullet> i \<or> |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1996 |
(x + d) \<bullet> i \<le> e \<bullet> i \<and> e \<bullet> i \<le> (x + b) \<bullet> i" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1997 |
hence "e - x \<in> X" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1998 |
by (intro mem_is_intervalI[OF assms \<open>b \<in> X\<close> \<open>d \<in> X\<close>, of "e - x"]) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
1999 |
(auto simp: algebra_simps) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2000 |
thus "e \<in> (+) x ` X" by force |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2001 |
qed |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2002 |
|
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2003 |
lemma is_interval_uminusI: |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2004 |
assumes "is_interval X" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2005 |
shows "is_interval (uminus ` X)" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2006 |
unfolding is_interval_def |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2007 |
proof safe |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2008 |
fix b d e |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2009 |
assume "b \<in> X" "d \<in> X" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2010 |
"\<forall>i\<in>Basis. (- b) \<bullet> i \<le> e \<bullet> i \<and> e \<bullet> i \<le> (- d) \<bullet> i \<or> |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2011 |
(- d) \<bullet> i \<le> e \<bullet> i \<and> e \<bullet> i \<le> (- b) \<bullet> i" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2012 |
hence "- e \<in> X" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2013 |
by (intro mem_is_intervalI[OF assms \<open>b \<in> X\<close> \<open>d \<in> X\<close>, of "- e"]) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2014 |
(auto simp: algebra_simps) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2015 |
thus "e \<in> uminus ` X" by force |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2016 |
qed |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2017 |
|
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2018 |
lemma is_interval_uminus[simp]: "is_interval (uminus ` x) = is_interval x" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2019 |
using is_interval_uminusI[of x] is_interval_uminusI[of "uminus ` x"] |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2020 |
by (auto simp: image_image) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2021 |
|
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2022 |
lemma is_interval_neg_translationI: |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2023 |
assumes "is_interval X" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2024 |
shows "is_interval ((-) x ` X)" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2025 |
proof - |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2026 |
have "(-) x ` X = (+) x ` uminus ` X" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2027 |
by (force simp: algebra_simps) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2028 |
also have "is_interval \<dots>" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2029 |
by (metis is_interval_uminusI is_interval_translationI assms) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2030 |
finally show ?thesis . |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2031 |
qed |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2032 |
|
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2033 |
lemma is_interval_translation[simp]: |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2034 |
"is_interval ((+) x ` X) = is_interval X" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2035 |
using is_interval_neg_translationI[of "(+) x ` X" x] |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2036 |
by (auto intro!: is_interval_translationI simp: image_image) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2037 |
|
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2038 |
lemma is_interval_minus_translation[simp]: |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2039 |
shows "is_interval ((-) x ` X) = is_interval X" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2040 |
proof - |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2041 |
have "(-) x ` X = (+) x ` uminus ` X" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2042 |
by (force simp: algebra_simps) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2043 |
also have "is_interval \<dots> = is_interval X" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2044 |
by simp |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2045 |
finally show ?thesis . |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2046 |
qed |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2047 |
|
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2048 |
lemma is_interval_minus_translation'[simp]: |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2049 |
shows "is_interval ((\<lambda>x. x - c) ` X) = is_interval X" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2050 |
using is_interval_translation[of "-c" X] |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2051 |
by (metis image_cong uminus_add_conv_diff) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2052 |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
2053 |
|
64539 | 2054 |
subsection \<open>Limit points\<close> |
33175 | 2055 |
|
67962 | 2056 |
definition%important (in topological_space) islimpt:: "'a \<Rightarrow> 'a set \<Rightarrow> bool" (infixr "islimpt" 60) |
53255 | 2057 |
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 | 2058 |
|
2059 |
lemma islimptI: |
|
2060 |
assumes "\<And>T. x \<in> T \<Longrightarrow> open T \<Longrightarrow> \<exists>y\<in>S. y \<in> T \<and> y \<noteq> x" |
|
2061 |
shows "x islimpt S" |
|
2062 |
using assms unfolding islimpt_def by auto |
|
2063 |
||
2064 |
lemma islimptE: |
|
2065 |
assumes "x islimpt S" and "x \<in> T" and "open T" |
|
2066 |
obtains y where "y \<in> S" and "y \<in> T" and "y \<noteq> x" |
|
2067 |
using assms unfolding islimpt_def by auto |
|
2068 |
||
44584 | 2069 |
lemma islimpt_iff_eventually: "x islimpt S \<longleftrightarrow> \<not> eventually (\<lambda>y. y \<notin> S) (at x)" |
2070 |
unfolding islimpt_def eventually_at_topological by auto |
|
2071 |
||
53255 | 2072 |
lemma islimpt_subset: "x islimpt S \<Longrightarrow> S \<subseteq> T \<Longrightarrow> x islimpt T" |
44584 | 2073 |
unfolding islimpt_def by fast |
33175 | 2074 |
|
2075 |
lemma islimpt_approachable: |
|
2076 |
fixes x :: "'a::metric_space" |
|
2077 |
shows "x islimpt S \<longleftrightarrow> (\<forall>e>0. \<exists>x'\<in>S. x' \<noteq> x \<and> dist x' x < e)" |
|
44584 | 2078 |
unfolding islimpt_iff_eventually eventually_at by fast |
33175 | 2079 |
|
64539 | 2080 |
lemma islimpt_approachable_le: "x islimpt S \<longleftrightarrow> (\<forall>e>0. \<exists>x'\<in> S. x' \<noteq> x \<and> dist x' x \<le> e)" |
2081 |
for x :: "'a::metric_space" |
|
33175 | 2082 |
unfolding islimpt_approachable |
44584 | 2083 |
using approachable_lt_le [where f="\<lambda>y. dist y x" and P="\<lambda>y. y \<notin> S \<or> y = x", |
2084 |
THEN arg_cong [where f=Not]] |
|
2085 |
by (simp add: Bex_def conj_commute conj_left_commute) |
|
33175 | 2086 |
|
44571 | 2087 |
lemma islimpt_UNIV_iff: "x islimpt UNIV \<longleftrightarrow> \<not> open {x}" |
2088 |
unfolding islimpt_def by (safe, fast, case_tac "T = {x}", fast, fast) |
|
2089 |
||
51351 | 2090 |
lemma islimpt_punctured: "x islimpt S = x islimpt (S-{x})" |
2091 |
unfolding islimpt_def by blast |
|
2092 |
||
60420 | 2093 |
text \<open>A perfect space has no isolated points.\<close> |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2094 |
|
64539 | 2095 |
lemma islimpt_UNIV [simp, intro]: "x islimpt UNIV" |
2096 |
for x :: "'a::perfect_space" |
|
44571 | 2097 |
unfolding islimpt_UNIV_iff by (rule not_open_singleton) |
33175 | 2098 |
|
64539 | 2099 |
lemma perfect_choose_dist: "0 < r \<Longrightarrow> \<exists>a. a \<noteq> x \<and> dist a x < r" |
2100 |
for x :: "'a::{perfect_space,metric_space}" |
|
2101 |
using islimpt_UNIV [of x] by (simp add: islimpt_approachable) |
|
33175 | 2102 |
|
2103 |
lemma closed_limpt: "closed S \<longleftrightarrow> (\<forall>x. x islimpt S \<longrightarrow> x \<in> S)" |
|
2104 |
unfolding closed_def |
|
2105 |
apply (subst open_subopen) |
|
34105 | 2106 |
apply (simp add: islimpt_def subset_eq) |
52624 | 2107 |
apply (metis ComplE ComplI) |
2108 |
done |
|
33175 | 2109 |
|
2110 |
lemma islimpt_EMPTY[simp]: "\<not> x islimpt {}" |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
2111 |
by (auto simp: islimpt_def) |
33175 | 2112 |
|
2113 |
lemma finite_set_avoid: |
|
2114 |
fixes a :: "'a::metric_space" |
|
53255 | 2115 |
assumes fS: "finite S" |
64539 | 2116 |
shows "\<exists>d>0. \<forall>x\<in>S. x \<noteq> a \<longrightarrow> d \<le> dist a x" |
53255 | 2117 |
proof (induct rule: finite_induct[OF fS]) |
2118 |
case 1 |
|
2119 |
then show ?case by (auto intro: zero_less_one) |
|
33175 | 2120 |
next |
2121 |
case (2 x F) |
|
60462 | 2122 |
from 2 obtain d where d: "d > 0" "\<forall>x\<in>F. x \<noteq> a \<longrightarrow> d \<le> dist a x" |
53255 | 2123 |
by blast |
2124 |
show ?case |
|
2125 |
proof (cases "x = a") |
|
2126 |
case True |
|
64539 | 2127 |
with d show ?thesis by auto |
53255 | 2128 |
next |
2129 |
case False |
|
33175 | 2130 |
let ?d = "min d (dist a x)" |
64539 | 2131 |
from False d(1) have dp: "?d > 0" |
2132 |
by auto |
|
60462 | 2133 |
from d have d': "\<forall>x\<in>F. x \<noteq> a \<longrightarrow> ?d \<le> dist a x" |
53255 | 2134 |
by auto |
2135 |
with dp False show ?thesis |
|
2136 |
by (auto intro!: exI[where x="?d"]) |
|
2137 |
qed |
|
33175 | 2138 |
qed |
2139 |
||
2140 |
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
|
2141 |
by (simp add: islimpt_iff_eventually eventually_conj_iff) |
33175 | 2142 |
|
2143 |
lemma discrete_imp_closed: |
|
2144 |
fixes S :: "'a::metric_space set" |
|
53255 | 2145 |
assumes e: "0 < e" |
2146 |
and d: "\<forall>x \<in> S. \<forall>y \<in> S. dist y x < e \<longrightarrow> y = x" |
|
33175 | 2147 |
shows "closed S" |
53255 | 2148 |
proof - |
64539 | 2149 |
have False if C: "\<forall>e>0. \<exists>x'\<in>S. x' \<noteq> x \<and> dist x' x < e" for x |
2150 |
proof - |
|
33175 | 2151 |
from e have e2: "e/2 > 0" by arith |
53282 | 2152 |
from C[rule_format, OF e2] obtain y where y: "y \<in> S" "y \<noteq> x" "dist y x < e/2" |
53255 | 2153 |
by blast |
33175 | 2154 |
let ?m = "min (e/2) (dist x y) " |
53255 | 2155 |
from e2 y(2) have mp: "?m > 0" |
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
2156 |
by simp |
53282 | 2157 |
from C[rule_format, OF mp] obtain z where z: "z \<in> S" "z \<noteq> x" "dist z x < ?m" |
53255 | 2158 |
by blast |
64539 | 2159 |
from z y have "dist z y < e" |
2160 |
by (intro dist_triangle_lt [where z=x]) simp |
|
2161 |
from d[rule_format, OF y(1) z(1) this] y z show ?thesis |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
2162 |
by (auto simp: dist_commute) |
64539 | 2163 |
qed |
53255 | 2164 |
then show ?thesis |
2165 |
by (metis islimpt_approachable closed_limpt [where 'a='a]) |
|
33175 | 2166 |
qed |
2167 |
||
64539 | 2168 |
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
|
2169 |
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
|
2170 |
|
64539 | 2171 |
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
|
2172 |
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
|
2173 |
|
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61518
diff
changeset
|
2174 |
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
|
2175 |
unfolding Nats_def by (rule closed_of_nat_image) |
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61518
diff
changeset
|
2176 |
|
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61518
diff
changeset
|
2177 |
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
|
2178 |
unfolding Ints_def by (rule closed_of_int_image) |
f2e51e704a96
added many small lemmas about setsum/setprod/powr/...
eberlm
parents:
61518
diff
changeset
|
2179 |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
2180 |
lemma closed_subset_Ints: |
66286
1c977b13414f
poles and residues of the Gamma function
eberlm <eberlm@in.tum.de>
parents:
66164
diff
changeset
|
2181 |
fixes A :: "'a :: real_normed_algebra_1 set" |
1c977b13414f
poles and residues of the Gamma function
eberlm <eberlm@in.tum.de>
parents:
66164
diff
changeset
|
2182 |
assumes "A \<subseteq> \<int>" |
1c977b13414f
poles and residues of the Gamma function
eberlm <eberlm@in.tum.de>
parents:
66164
diff
changeset
|
2183 |
shows "closed A" |
1c977b13414f
poles and residues of the Gamma function
eberlm <eberlm@in.tum.de>
parents:
66164
diff
changeset
|
2184 |
proof (intro discrete_imp_closed[OF zero_less_one] ballI impI, goal_cases) |
1c977b13414f
poles and residues of the Gamma function
eberlm <eberlm@in.tum.de>
parents:
66164
diff
changeset
|
2185 |
case (1 x y) |
1c977b13414f
poles and residues of the Gamma function
eberlm <eberlm@in.tum.de>
parents:
66164
diff
changeset
|
2186 |
with assms have "x \<in> \<int>" and "y \<in> \<int>" by auto |
1c977b13414f
poles and residues of the Gamma function
eberlm <eberlm@in.tum.de>
parents:
66164
diff
changeset
|
2187 |
with \<open>dist y x < 1\<close> show "y = x" |
1c977b13414f
poles and residues of the Gamma function
eberlm <eberlm@in.tum.de>
parents:
66164
diff
changeset
|
2188 |
by (auto elim!: Ints_cases simp: dist_of_int) |
1c977b13414f
poles and residues of the Gamma function
eberlm <eberlm@in.tum.de>
parents:
66164
diff
changeset
|
2189 |
qed |
1c977b13414f
poles and residues of the Gamma function
eberlm <eberlm@in.tum.de>
parents:
66164
diff
changeset
|
2190 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2191 |
|
60420 | 2192 |
subsection \<open>Interior of a Set\<close> |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2193 |
|
67962 | 2194 |
definition%important "interior S = \<Union>{T. open T \<and> T \<subseteq> S}" |
44519 | 2195 |
|
2196 |
lemma interiorI [intro?]: |
|
2197 |
assumes "open T" and "x \<in> T" and "T \<subseteq> S" |
|
2198 |
shows "x \<in> interior S" |
|
2199 |
using assms unfolding interior_def by fast |
|
2200 |
||
2201 |
lemma interiorE [elim?]: |
|
2202 |
assumes "x \<in> interior S" |
|
2203 |
obtains T where "open T" and "x \<in> T" and "T \<subseteq> S" |
|
2204 |
using assms unfolding interior_def by fast |
|
2205 |
||
2206 |
lemma open_interior [simp, intro]: "open (interior S)" |
|
2207 |
by (simp add: interior_def open_Union) |
|
2208 |
||
2209 |
lemma interior_subset: "interior S \<subseteq> S" |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
2210 |
by (auto simp: interior_def) |
44519 | 2211 |
|
2212 |
lemma interior_maximal: "T \<subseteq> S \<Longrightarrow> open T \<Longrightarrow> T \<subseteq> interior S" |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
2213 |
by (auto simp: interior_def) |
44519 | 2214 |
|
2215 |
lemma interior_open: "open S \<Longrightarrow> interior S = S" |
|
2216 |
by (intro equalityI interior_subset interior_maximal subset_refl) |
|
33175 | 2217 |
|
2218 |
lemma interior_eq: "interior S = S \<longleftrightarrow> open S" |
|
44519 | 2219 |
by (metis open_interior interior_open) |
2220 |
||
2221 |
lemma open_subset_interior: "open S \<Longrightarrow> S \<subseteq> interior T \<longleftrightarrow> S \<subseteq> T" |
|
33175 | 2222 |
by (metis interior_maximal interior_subset subset_trans) |
2223 |
||
44519 | 2224 |
lemma interior_empty [simp]: "interior {} = {}" |
2225 |
using open_empty by (rule interior_open) |
|
2226 |
||
44522
2f7e9d890efe
rename subset_{interior,closure} to {interior,closure}_mono;
huffman
parents:
44519
diff
changeset
|
2227 |
lemma interior_UNIV [simp]: "interior UNIV = UNIV" |
2f7e9d890efe
rename subset_{interior,closure} to {interior,closure}_mono;
huffman
parents:
44519
diff
changeset
|
2228 |
using open_UNIV by (rule interior_open) |
2f7e9d890efe
rename subset_{interior,closure} to {interior,closure}_mono;
huffman
parents:
44519
diff
changeset
|
2229 |
|
44519 | 2230 |
lemma interior_interior [simp]: "interior (interior S) = interior S" |
2231 |
using open_interior by (rule interior_open) |
|
2232 |
||
44522
2f7e9d890efe
rename subset_{interior,closure} to {interior,closure}_mono;
huffman
parents:
44519
diff
changeset
|
2233 |
lemma interior_mono: "S \<subseteq> T \<Longrightarrow> interior S \<subseteq> interior T" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
2234 |
by (auto simp: interior_def) |
44519 | 2235 |
|
2236 |
lemma interior_unique: |
|
2237 |
assumes "T \<subseteq> S" and "open T" |
|
2238 |
assumes "\<And>T'. T' \<subseteq> S \<Longrightarrow> open T' \<Longrightarrow> T' \<subseteq> T" |
|
2239 |
shows "interior S = T" |
|
2240 |
by (intro equalityI assms interior_subset open_interior interior_maximal) |
|
2241 |
||
64539 | 2242 |
lemma interior_singleton [simp]: "interior {a} = {}" |
2243 |
for a :: "'a::perfect_space" |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
2244 |
apply (rule interior_unique, simp_all) |
64539 | 2245 |
using not_open_singleton subset_singletonD |
2246 |
apply fastforce |
|
2247 |
done |
|
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
2248 |
|
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
2249 |
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
|
2250 |
by (intro equalityI Int_mono Int_greatest interior_mono Int_lower1 |
44519 | 2251 |
Int_lower2 interior_maximal interior_subset open_Int open_interior) |
2252 |
||
2253 |
lemma mem_interior: "x \<in> interior S \<longleftrightarrow> (\<exists>e>0. ball x e \<subseteq> S)" |
|
2254 |
using open_contains_ball_eq [where S="interior S"] |
|
2255 |
by (simp add: open_subset_interior) |
|
33175 | 2256 |
|
61531
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2257 |
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
|
2258 |
using interior_subset[of s] by (subst eventually_nhds) blast |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2259 |
|
33175 | 2260 |
lemma interior_limit_point [intro]: |
2261 |
fixes x :: "'a::perfect_space" |
|
53255 | 2262 |
assumes x: "x \<in> interior S" |
2263 |
shows "x islimpt S" |
|
44072
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
2264 |
using x islimpt_UNIV [of x] |
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
2265 |
unfolding interior_def islimpt_def |
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
2266 |
apply (clarsimp, rename_tac T T') |
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
2267 |
apply (drule_tac x="T \<inter> T'" in spec) |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
2268 |
apply (auto simp: open_Int) |
44072
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
2269 |
done |
33175 | 2270 |
|
2271 |
lemma interior_closed_Un_empty_interior: |
|
53255 | 2272 |
assumes cS: "closed S" |
2273 |
and iT: "interior T = {}" |
|
44519 | 2274 |
shows "interior (S \<union> T) = interior S" |
33175 | 2275 |
proof |
44519 | 2276 |
show "interior S \<subseteq> interior (S \<union> T)" |
53255 | 2277 |
by (rule interior_mono) (rule Un_upper1) |
33175 | 2278 |
show "interior (S \<union> T) \<subseteq> interior S" |
2279 |
proof |
|
53255 | 2280 |
fix x |
2281 |
assume "x \<in> interior (S \<union> T)" |
|
44519 | 2282 |
then obtain R where "open R" "x \<in> R" "R \<subseteq> S \<union> T" .. |
33175 | 2283 |
show "x \<in> interior S" |
2284 |
proof (rule ccontr) |
|
2285 |
assume "x \<notin> interior S" |
|
60420 | 2286 |
with \<open>x \<in> R\<close> \<open>open R\<close> obtain y where "y \<in> R - S" |
44519 | 2287 |
unfolding interior_def by fast |
60420 | 2288 |
from \<open>open R\<close> \<open>closed S\<close> have "open (R - S)" |
53282 | 2289 |
by (rule open_Diff) |
60420 | 2290 |
from \<open>R \<subseteq> S \<union> T\<close> have "R - S \<subseteq> T" |
53282 | 2291 |
by fast |
60420 | 2292 |
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 | 2293 |
unfolding interior_def by fast |
33175 | 2294 |
qed |
2295 |
qed |
|
2296 |
qed |
|
2297 |
||
44365 | 2298 |
lemma interior_Times: "interior (A \<times> B) = interior A \<times> interior B" |
2299 |
proof (rule interior_unique) |
|
2300 |
show "interior A \<times> interior B \<subseteq> A \<times> B" |
|
2301 |
by (intro Sigma_mono interior_subset) |
|
2302 |
show "open (interior A \<times> interior B)" |
|
2303 |
by (intro open_Times open_interior) |
|
53255 | 2304 |
fix T |
2305 |
assume "T \<subseteq> A \<times> B" and "open T" |
|
2306 |
then show "T \<subseteq> interior A \<times> interior B" |
|
53282 | 2307 |
proof safe |
53255 | 2308 |
fix x y |
2309 |
assume "(x, y) \<in> T" |
|
44519 | 2310 |
then obtain C D where "open C" "open D" "C \<times> D \<subseteq> T" "x \<in> C" "y \<in> D" |
60420 | 2311 |
using \<open>open T\<close> unfolding open_prod_def by fast |
53255 | 2312 |
then have "open C" "open D" "C \<subseteq> A" "D \<subseteq> B" "x \<in> C" "y \<in> D" |
60420 | 2313 |
using \<open>T \<subseteq> A \<times> B\<close> by auto |
53255 | 2314 |
then show "x \<in> interior A" and "y \<in> interior B" |
44519 | 2315 |
by (auto intro: interiorI) |
2316 |
qed |
|
44365 | 2317 |
qed |
2318 |
||
61245 | 2319 |
lemma interior_Ici: |
64539 | 2320 |
fixes x :: "'a :: {dense_linorder,linorder_topology}" |
61245 | 2321 |
assumes "b < x" |
64539 | 2322 |
shows "interior {x ..} = {x <..}" |
61245 | 2323 |
proof (rule interior_unique) |
64539 | 2324 |
fix T |
2325 |
assume "T \<subseteq> {x ..}" "open T" |
|
61245 | 2326 |
moreover have "x \<notin> T" |
2327 |
proof |
|
2328 |
assume "x \<in> T" |
|
2329 |
obtain y where "y < x" "{y <.. x} \<subseteq> T" |
|
2330 |
using open_left[OF \<open>open T\<close> \<open>x \<in> T\<close> \<open>b < x\<close>] by auto |
|
2331 |
with dense[OF \<open>y < x\<close>] obtain z where "z \<in> T" "z < x" |
|
2332 |
by (auto simp: subset_eq Ball_def) |
|
2333 |
with \<open>T \<subseteq> {x ..}\<close> show False by auto |
|
2334 |
qed |
|
2335 |
ultimately show "T \<subseteq> {x <..}" |
|
2336 |
by (auto simp: subset_eq less_le) |
|
2337 |
qed auto |
|
2338 |
||
2339 |
lemma interior_Iic: |
|
64539 | 2340 |
fixes x :: "'a ::{dense_linorder,linorder_topology}" |
61245 | 2341 |
assumes "x < b" |
2342 |
shows "interior {.. x} = {..< x}" |
|
2343 |
proof (rule interior_unique) |
|
64539 | 2344 |
fix T |
2345 |
assume "T \<subseteq> {.. x}" "open T" |
|
61245 | 2346 |
moreover have "x \<notin> T" |
2347 |
proof |
|
2348 |
assume "x \<in> T" |
|
2349 |
obtain y where "x < y" "{x ..< y} \<subseteq> T" |
|
2350 |
using open_right[OF \<open>open T\<close> \<open>x \<in> T\<close> \<open>x < b\<close>] by auto |
|
2351 |
with dense[OF \<open>x < y\<close>] obtain z where "z \<in> T" "x < z" |
|
2352 |
by (auto simp: subset_eq Ball_def less_le) |
|
2353 |
with \<open>T \<subseteq> {.. x}\<close> show False by auto |
|
2354 |
qed |
|
2355 |
ultimately show "T \<subseteq> {..< x}" |
|
2356 |
by (auto simp: subset_eq less_le) |
|
2357 |
qed auto |
|
33175 | 2358 |
|
64539 | 2359 |
|
60420 | 2360 |
subsection \<open>Closure of a Set\<close> |
33175 | 2361 |
|
67962 | 2362 |
definition%important "closure S = S \<union> {x | x. x islimpt S}" |
33175 | 2363 |
|
44518 | 2364 |
lemma interior_closure: "interior S = - (closure (- S))" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
2365 |
by (auto simp: interior_def closure_def islimpt_def) |
44518 | 2366 |
|
34105 | 2367 |
lemma closure_interior: "closure S = - interior (- S)" |
64539 | 2368 |
by (simp add: interior_closure) |
33175 | 2369 |
|
2370 |
lemma closed_closure[simp, intro]: "closed (closure S)" |
|
64539 | 2371 |
by (simp add: closure_interior closed_Compl) |
44518 | 2372 |
|
2373 |
lemma closure_subset: "S \<subseteq> closure S" |
|
64539 | 2374 |
by (simp add: closure_def) |
33175 | 2375 |
|
2376 |
lemma closure_hull: "closure S = closed hull S" |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
2377 |
by (auto simp: hull_def closure_interior interior_def) |
33175 | 2378 |
|
2379 |
lemma closure_eq: "closure S = S \<longleftrightarrow> closed S" |
|
44519 | 2380 |
unfolding closure_hull using closed_Inter by (rule hull_eq) |
2381 |
||
2382 |
lemma closure_closed [simp]: "closed S \<Longrightarrow> closure S = S" |
|
64539 | 2383 |
by (simp only: closure_eq) |
44519 | 2384 |
|
2385 |
lemma closure_closure [simp]: "closure (closure S) = closure S" |
|
44518 | 2386 |
unfolding closure_hull by (rule hull_hull) |
33175 | 2387 |
|
44522
2f7e9d890efe
rename subset_{interior,closure} to {interior,closure}_mono;
huffman
parents:
44519
diff
changeset
|
2388 |
lemma closure_mono: "S \<subseteq> T \<Longrightarrow> closure S \<subseteq> closure T" |
44518 | 2389 |
unfolding closure_hull by (rule hull_mono) |
33175 | 2390 |
|
44519 | 2391 |
lemma closure_minimal: "S \<subseteq> T \<Longrightarrow> closed T \<Longrightarrow> closure S \<subseteq> T" |
44518 | 2392 |
unfolding closure_hull by (rule hull_minimal) |
33175 | 2393 |
|
44519 | 2394 |
lemma closure_unique: |
53255 | 2395 |
assumes "S \<subseteq> T" |
2396 |
and "closed T" |
|
2397 |
and "\<And>T'. S \<subseteq> T' \<Longrightarrow> closed T' \<Longrightarrow> T \<subseteq> T'" |
|
44519 | 2398 |
shows "closure S = T" |
2399 |
using assms unfolding closure_hull by (rule hull_unique) |
|
2400 |
||
2401 |
lemma closure_empty [simp]: "closure {} = {}" |
|
44518 | 2402 |
using closed_empty by (rule closure_closed) |
33175 | 2403 |
|
44522
2f7e9d890efe
rename subset_{interior,closure} to {interior,closure}_mono;
huffman
parents:
44519
diff
changeset
|
2404 |
lemma closure_UNIV [simp]: "closure UNIV = UNIV" |
44518 | 2405 |
using closed_UNIV by (rule closure_closed) |
2406 |
||
64122 | 2407 |
lemma closure_Un [simp]: "closure (S \<union> T) = closure S \<union> closure T" |
64539 | 2408 |
by (simp add: closure_interior) |
33175 | 2409 |
|
60974
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
2410 |
lemma closure_eq_empty [iff]: "closure S = {} \<longleftrightarrow> S = {}" |
64539 | 2411 |
using closure_empty closure_subset[of S] by blast |
33175 | 2412 |
|
2413 |
lemma closure_subset_eq: "closure S \<subseteq> S \<longleftrightarrow> closed S" |
|
64539 | 2414 |
using closure_eq[of S] closure_subset[of S] by simp |
2415 |
||
2416 |
lemma open_Int_closure_eq_empty: "open S \<Longrightarrow> (S \<inter> closure T) = {} \<longleftrightarrow> S \<inter> T = {}" |
|
34105 | 2417 |
using open_subset_interior[of S "- T"] |
2418 |
using interior_subset[of "- T"] |
|
64539 | 2419 |
by (auto simp: closure_interior) |
2420 |
||
2421 |
lemma open_Int_closure_subset: "open S \<Longrightarrow> S \<inter> closure T \<subseteq> closure (S \<inter> T)" |
|
33175 | 2422 |
proof |
2423 |
fix x |
|
64539 | 2424 |
assume *: "open S" "x \<in> S \<inter> closure T" |
2425 |
have "x islimpt (S \<inter> T)" if **: "x islimpt T" |
|
2426 |
proof (rule islimptI) |
|
2427 |
fix A |
|
2428 |
assume "x \<in> A" "open A" |
|
2429 |
with * have "x \<in> A \<inter> S" "open (A \<inter> S)" |
|
2430 |
by (simp_all add: open_Int) |
|
2431 |
with ** obtain y where "y \<in> T" "y \<in> A \<inter> S" "y \<noteq> x" |
|
2432 |
by (rule islimptE) |
|
2433 |
then have "y \<in> S \<inter> T" "y \<in> A \<and> y \<noteq> x" |
|
2434 |
by simp_all |
|
2435 |
then show "\<exists>y\<in>(S \<inter> T). y \<in> A \<and> y \<noteq> x" .. |
|
2436 |
qed |
|
2437 |
with * show "x \<in> closure (S \<inter> T)" |
|
2438 |
unfolding closure_def by blast |
|
33175 | 2439 |
qed |
2440 |
||
44519 | 2441 |
lemma closure_complement: "closure (- S) = - interior S" |
64539 | 2442 |
by (simp add: closure_interior) |
33175 | 2443 |
|
44519 | 2444 |
lemma interior_complement: "interior (- S) = - closure S" |
64539 | 2445 |
by (simp add: closure_interior) |
64910 | 2446 |
|
64845 | 2447 |
lemma interior_diff: "interior(S - T) = interior S - closure T" |
2448 |
by (simp add: Diff_eq interior_complement) |
|
33175 | 2449 |
|
44365 | 2450 |
lemma closure_Times: "closure (A \<times> B) = closure A \<times> closure B" |
44519 | 2451 |
proof (rule closure_unique) |
44365 | 2452 |
show "A \<times> B \<subseteq> closure A \<times> closure B" |
2453 |
by (intro Sigma_mono closure_subset) |
|
2454 |
show "closed (closure A \<times> closure B)" |
|
2455 |
by (intro closed_Times closed_closure) |
|
53282 | 2456 |
fix T |
2457 |
assume "A \<times> B \<subseteq> T" and "closed T" |
|
2458 |
then show "closure A \<times> closure B \<subseteq> T" |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
2459 |
apply (simp add: closed_def open_prod_def, clarify) |
44365 | 2460 |
apply (rule ccontr) |
2461 |
apply (drule_tac x="(a, b)" in bspec, simp, clarify, rename_tac C D) |
|
2462 |
apply (simp add: closure_interior interior_def) |
|
2463 |
apply (drule_tac x=C in spec) |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
2464 |
apply (drule_tac x=D in spec, auto) |
44365 | 2465 |
done |
2466 |
qed |
|
2467 |
||
66641
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
2468 |
lemma closure_openin_Int_closure: |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
2469 |
assumes ope: "openin (subtopology euclidean U) S" and "T \<subseteq> U" |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
2470 |
shows "closure(S \<inter> closure T) = closure(S \<inter> T)" |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
2471 |
proof |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
2472 |
obtain V where "open V" and S: "S = U \<inter> V" |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
2473 |
using ope using openin_open by metis |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
2474 |
show "closure (S \<inter> closure T) \<subseteq> closure (S \<inter> T)" |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
2475 |
proof (clarsimp simp: S) |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
2476 |
fix x |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
2477 |
assume "x \<in> closure (U \<inter> V \<inter> closure T)" |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
2478 |
then have "V \<inter> closure T \<subseteq> A \<Longrightarrow> x \<in> closure A" for A |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
2479 |
by (metis closure_mono subsetD inf.coboundedI2 inf_assoc) |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
2480 |
then have "x \<in> closure (T \<inter> V)" |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
2481 |
by (metis \<open>open V\<close> closure_closure inf_commute open_Int_closure_subset) |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
2482 |
then show "x \<in> closure (U \<inter> V \<inter> T)" |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
2483 |
by (metis \<open>T \<subseteq> U\<close> inf.absorb_iff2 inf_assoc inf_commute) |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
2484 |
qed |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
2485 |
next |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
2486 |
show "closure (S \<inter> T) \<subseteq> closure (S \<inter> closure T)" |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
2487 |
by (meson Int_mono closure_mono closure_subset order_refl) |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
2488 |
qed |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
2489 |
|
67613 | 2490 |
lemma islimpt_in_closure: "(x islimpt S) = (x\<in>closure(S-{x}))" |
51351 | 2491 |
unfolding closure_def using islimpt_punctured by blast |
2492 |
||
63301 | 2493 |
lemma connected_imp_connected_closure: "connected S \<Longrightarrow> connected (closure S)" |
64539 | 2494 |
by (rule connectedI) (meson closure_subset open_Int open_Int_closure_eq_empty subset_trans connectedD) |
2495 |
||
2496 |
lemma limpt_of_limpts: "x islimpt {y. y islimpt S} \<Longrightarrow> x islimpt S" |
|
2497 |
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
|
2498 |
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
|
2499 |
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
|
2500 |
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
|
2501 |
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
|
2502 |
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
|
2503 |
apply (erule rev_bexI) |
64539 | 2504 |
apply (metis dist_commute dist_triangle_half_r less_trans less_irrefl) |
2505 |
done |
|
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2506 |
|
63301 | 2507 |
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
|
2508 |
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
|
2509 |
|
64539 | 2510 |
lemma limpt_of_closure: "x islimpt closure S \<longleftrightarrow> x islimpt S" |
2511 |
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
|
2512 |
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
|
2513 |
|
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
|
2514 |
lemma closedin_limpt: |
64539 | 2515 |
"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
|
2516 |
apply (simp add: closedin_closed, safe) |
64539 | 2517 |
apply (simp add: closed_limpt islimpt_subset) |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
2518 |
apply (rule_tac x="closure S" in exI, simp) |
61306
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2519 |
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
|
2520 |
done |
9dd394c866fc
New theorems about connected sets. And pairwise moved to Set.thy.
paulson <lp15@cam.ac.uk>
parents:
61284
diff
changeset
|
2521 |
|
64539 | 2522 |
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
|
2523 |
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
|
2524 |
|
66793
deabce3ccf1f
new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
66643
diff
changeset
|
2525 |
lemma connected_closed_set: |
deabce3ccf1f
new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
66643
diff
changeset
|
2526 |
"closed S |
deabce3ccf1f
new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
66643
diff
changeset
|
2527 |
\<Longrightarrow> connected S \<longleftrightarrow> (\<nexists>A B. closed A \<and> closed B \<and> A \<noteq> {} \<and> B \<noteq> {} \<and> A \<union> B = S \<and> A \<inter> B = {})" |
deabce3ccf1f
new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
66643
diff
changeset
|
2528 |
unfolding connected_closedin_eq closedin_closed_eq connected_closedin_eq by blast |
deabce3ccf1f
new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
66643
diff
changeset
|
2529 |
|
67727
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
2530 |
text \<open>If a connnected set is written as the union of two nonempty closed sets, then these sets |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
2531 |
have to intersect.\<close> |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
2532 |
|
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
2533 |
lemma connected_as_closed_union: |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
2534 |
assumes "connected C" "C = A \<union> B" "closed A" "closed B" "A \<noteq> {}" "B \<noteq> {}" |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
2535 |
shows "A \<inter> B \<noteq> {}" |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
2536 |
by (metis assms closed_Un connected_closed_set) |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
2537 |
|
63301 | 2538 |
lemma closedin_subset_trans: |
64539 | 2539 |
"closedin (subtopology euclidean U) S \<Longrightarrow> S \<subseteq> T \<Longrightarrow> T \<subseteq> U \<Longrightarrow> |
2540 |
closedin (subtopology euclidean T) S" |
|
2541 |
by (meson closedin_limpt subset_iff) |
|
63301 | 2542 |
|
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63332
diff
changeset
|
2543 |
lemma openin_subset_trans: |
64539 | 2544 |
"openin (subtopology euclidean U) S \<Longrightarrow> S \<subseteq> T \<Longrightarrow> T \<subseteq> U \<Longrightarrow> |
2545 |
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
|
2546 |
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
|
2547 |
|
64122 | 2548 |
lemma openin_Times: |
64539 | 2549 |
"openin (subtopology euclidean S) S' \<Longrightarrow> openin (subtopology euclidean T) T' \<Longrightarrow> |
2550 |
openin (subtopology euclidean (S \<times> T)) (S' \<times> T')" |
|
64122 | 2551 |
unfolding openin_open using open_Times by blast |
2552 |
||
2553 |
lemma Times_in_interior_subtopology: |
|
64539 | 2554 |
fixes U :: "('a::metric_space \<times> 'b::metric_space) set" |
64122 | 2555 |
assumes "(x, y) \<in> U" "openin (subtopology euclidean (S \<times> T)) U" |
2556 |
obtains V W where "openin (subtopology euclidean S) V" "x \<in> V" |
|
2557 |
"openin (subtopology euclidean T) W" "y \<in> W" "(V \<times> W) \<subseteq> U" |
|
2558 |
proof - |
|
2559 |
from assms obtain e where "e > 0" and "U \<subseteq> S \<times> T" |
|
64539 | 2560 |
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 | 2561 |
by (force simp: openin_euclidean_subtopology_iff) |
2562 |
with assms have "x \<in> S" "y \<in> T" |
|
2563 |
by auto |
|
2564 |
show ?thesis |
|
2565 |
proof |
|
2566 |
show "openin (subtopology euclidean S) (ball x (e/2) \<inter> S)" |
|
2567 |
by (simp add: Int_commute openin_open_Int) |
|
2568 |
show "x \<in> ball x (e / 2) \<inter> S" |
|
2569 |
by (simp add: \<open>0 < e\<close> \<open>x \<in> S\<close>) |
|
2570 |
show "openin (subtopology euclidean T) (ball y (e/2) \<inter> T)" |
|
2571 |
by (simp add: Int_commute openin_open_Int) |
|
2572 |
show "y \<in> ball y (e / 2) \<inter> T" |
|
2573 |
by (simp add: \<open>0 < e\<close> \<open>y \<in> T\<close>) |
|
2574 |
show "(ball x (e / 2) \<inter> S) \<times> (ball y (e / 2) \<inter> T) \<subseteq> U" |
|
2575 |
by clarify (simp add: e dist_Pair_Pair \<open>0 < e\<close> dist_commute sqrt_sum_squares_half_less) |
|
2576 |
qed |
|
2577 |
qed |
|
2578 |
||
2579 |
lemma openin_Times_eq: |
|
2580 |
fixes S :: "'a::metric_space set" and T :: "'b::metric_space set" |
|
2581 |
shows |
|
64539 | 2582 |
"openin (subtopology euclidean (S \<times> T)) (S' \<times> T') \<longleftrightarrow> |
2583 |
S' = {} \<or> T' = {} \<or> openin (subtopology euclidean S) S' \<and> openin (subtopology euclidean T) T'" |
|
64122 | 2584 |
(is "?lhs = ?rhs") |
2585 |
proof (cases "S' = {} \<or> T' = {}") |
|
2586 |
case True |
|
2587 |
then show ?thesis by auto |
|
2588 |
next |
|
2589 |
case False |
|
2590 |
then obtain x y where "x \<in> S'" "y \<in> T'" |
|
2591 |
by blast |
|
2592 |
show ?thesis |
|
2593 |
proof |
|
64539 | 2594 |
assume ?lhs |
64122 | 2595 |
have "openin (subtopology euclidean S) S'" |
2596 |
apply (subst openin_subopen, clarify) |
|
64539 | 2597 |
apply (rule Times_in_interior_subtopology [OF _ \<open>?lhs\<close>]) |
2598 |
using \<open>y \<in> T'\<close> |
|
2599 |
apply auto |
|
2600 |
done |
|
64122 | 2601 |
moreover have "openin (subtopology euclidean T) T'" |
2602 |
apply (subst openin_subopen, clarify) |
|
64539 | 2603 |
apply (rule Times_in_interior_subtopology [OF _ \<open>?lhs\<close>]) |
2604 |
using \<open>x \<in> S'\<close> |
|
2605 |
apply auto |
|
2606 |
done |
|
64122 | 2607 |
ultimately show ?rhs |
2608 |
by simp |
|
2609 |
next |
|
2610 |
assume ?rhs |
|
2611 |
with False show ?lhs |
|
2612 |
by (simp add: openin_Times) |
|
2613 |
qed |
|
2614 |
qed |
|
2615 |
||
63301 | 2616 |
lemma closedin_Times: |
64539 | 2617 |
"closedin (subtopology euclidean S) S' \<Longrightarrow> closedin (subtopology euclidean T) T' \<Longrightarrow> |
2618 |
closedin (subtopology euclidean (S \<times> T)) (S' \<times> T')" |
|
2619 |
unfolding closedin_closed using closed_Times by blast |
|
63301 | 2620 |
|
62083 | 2621 |
lemma bdd_below_closure: |
2622 |
fixes A :: "real set" |
|
2623 |
assumes "bdd_below A" |
|
2624 |
shows "bdd_below (closure A)" |
|
2625 |
proof - |
|
64539 | 2626 |
from assms obtain m where "\<And>x. x \<in> A \<Longrightarrow> m \<le> x" |
2627 |
by (auto simp: bdd_below_def) |
|
2628 |
then have "A \<subseteq> {m..}" by auto |
|
2629 |
then have "closure A \<subseteq> {m..}" |
|
2630 |
using closed_real_atLeast by (rule closure_minimal) |
|
2631 |
then show ?thesis |
|
2632 |
by (auto simp: bdd_below_def) |
|
2633 |
qed |
|
2634 |
||
2635 |
||
2636 |
subsection \<open>Frontier (also known as boundary)\<close> |
|
33175 | 2637 |
|
67962 | 2638 |
definition%important "frontier S = closure S - interior S" |
33175 | 2639 |
|
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
2640 |
lemma frontier_closed [iff]: "closed (frontier S)" |
33175 | 2641 |
by (simp add: frontier_def closed_Diff) |
2642 |
||
64539 | 2643 |
lemma frontier_closures: "frontier S = closure S \<inter> closure (- S)" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
2644 |
by (auto simp: frontier_def interior_closure) |
33175 | 2645 |
|
66939
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents:
66884
diff
changeset
|
2646 |
lemma frontier_Int: "frontier(S \<inter> T) = closure(S \<inter> T) \<inter> (frontier S \<union> frontier T)" |
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents:
66884
diff
changeset
|
2647 |
proof - |
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents:
66884
diff
changeset
|
2648 |
have "closure (S \<inter> T) \<subseteq> closure S" "closure (S \<inter> T) \<subseteq> closure T" |
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents:
66884
diff
changeset
|
2649 |
by (simp_all add: closure_mono) |
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents:
66884
diff
changeset
|
2650 |
then show ?thesis |
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents:
66884
diff
changeset
|
2651 |
by (auto simp: frontier_closures) |
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents:
66884
diff
changeset
|
2652 |
qed |
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents:
66884
diff
changeset
|
2653 |
|
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents:
66884
diff
changeset
|
2654 |
lemma frontier_Int_subset: "frontier(S \<inter> T) \<subseteq> frontier S \<union> frontier T" |
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents:
66884
diff
changeset
|
2655 |
by (auto simp: frontier_Int) |
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents:
66884
diff
changeset
|
2656 |
|
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents:
66884
diff
changeset
|
2657 |
lemma frontier_Int_closed: |
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents:
66884
diff
changeset
|
2658 |
assumes "closed S" "closed T" |
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents:
66884
diff
changeset
|
2659 |
shows "frontier(S \<inter> T) = (frontier S \<inter> T) \<union> (S \<inter> frontier T)" |
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents:
66884
diff
changeset
|
2660 |
proof - |
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents:
66884
diff
changeset
|
2661 |
have "closure (S \<inter> T) = T \<inter> S" |
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents:
66884
diff
changeset
|
2662 |
using assms by (simp add: Int_commute closed_Int) |
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents:
66884
diff
changeset
|
2663 |
moreover have "T \<inter> (closure S \<inter> closure (- S)) = frontier S \<inter> T" |
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents:
66884
diff
changeset
|
2664 |
by (simp add: Int_commute frontier_closures) |
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents:
66884
diff
changeset
|
2665 |
ultimately show ?thesis |
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents:
66884
diff
changeset
|
2666 |
by (simp add: Int_Un_distrib Int_assoc Int_left_commute assms frontier_closures) |
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents:
66884
diff
changeset
|
2667 |
qed |
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents:
66884
diff
changeset
|
2668 |
|
33175 | 2669 |
lemma frontier_straddle: |
2670 |
fixes a :: "'a::metric_space" |
|
44909 | 2671 |
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))" |
2672 |
unfolding frontier_def closure_interior |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
2673 |
by (auto simp: mem_interior subset_eq ball_def) |
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
2674 |
|
33175 | 2675 |
lemma frontier_subset_closed: "closed S \<Longrightarrow> frontier S \<subseteq> S" |
2676 |
by (metis frontier_def closure_closed Diff_subset) |
|
2677 |
||
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
2678 |
lemma frontier_empty [simp]: "frontier {} = {}" |
36362
06475a1547cb
fix lots of looping simp calls and other warnings
huffman
parents:
36360
diff
changeset
|
2679 |
by (simp add: frontier_def) |
33175 | 2680 |
|
2681 |
lemma frontier_subset_eq: "frontier S \<subseteq> S \<longleftrightarrow> closed S" |
|
58757 | 2682 |
proof - |
53255 | 2683 |
{ |
2684 |
assume "frontier S \<subseteq> S" |
|
2685 |
then have "closure S \<subseteq> S" |
|
2686 |
using interior_subset unfolding frontier_def by auto |
|
2687 |
then have "closed S" |
|
2688 |
using closure_subset_eq by auto |
|
33175 | 2689 |
} |
53255 | 2690 |
then show ?thesis using frontier_subset_closed[of S] .. |
33175 | 2691 |
qed |
2692 |
||
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
2693 |
lemma frontier_complement [simp]: "frontier (- S) = frontier S" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
2694 |
by (auto simp: frontier_def closure_complement interior_complement) |
33175 | 2695 |
|
66939
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents:
66884
diff
changeset
|
2696 |
lemma frontier_Un_subset: "frontier(S \<union> T) \<subseteq> frontier S \<union> frontier T" |
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents:
66884
diff
changeset
|
2697 |
by (metis compl_sup frontier_Int_subset frontier_complement) |
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents:
66884
diff
changeset
|
2698 |
|
33175 | 2699 |
lemma frontier_disjoint_eq: "frontier S \<inter> S = {} \<longleftrightarrow> open S" |
34105 | 2700 |
using frontier_complement frontier_subset_eq[of "- S"] |
2701 |
unfolding open_closed by auto |
|
33175 | 2702 |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2703 |
lemma frontier_UNIV [simp]: "frontier UNIV = {}" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2704 |
using frontier_complement frontier_empty by fastforce |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2705 |
|
64788
19f3d4af7a7d
New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
64773
diff
changeset
|
2706 |
lemma frontier_interiors: "frontier s = - interior(s) - interior(-s)" |
19f3d4af7a7d
New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
64773
diff
changeset
|
2707 |
by (simp add: Int_commute frontier_def interior_closure) |
19f3d4af7a7d
New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
64773
diff
changeset
|
2708 |
|
19f3d4af7a7d
New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
64773
diff
changeset
|
2709 |
lemma frontier_interior_subset: "frontier(interior S) \<subseteq> frontier S" |
19f3d4af7a7d
New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
64773
diff
changeset
|
2710 |
by (simp add: Diff_mono frontier_interiors interior_mono interior_subset) |
19f3d4af7a7d
New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
64773
diff
changeset
|
2711 |
|
19f3d4af7a7d
New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
64773
diff
changeset
|
2712 |
lemma connected_Int_frontier: |
19f3d4af7a7d
New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
64773
diff
changeset
|
2713 |
"\<lbrakk>connected s; s \<inter> t \<noteq> {}; s - t \<noteq> {}\<rbrakk> \<Longrightarrow> (s \<inter> frontier t \<noteq> {})" |
19f3d4af7a7d
New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
64773
diff
changeset
|
2714 |
apply (simp add: frontier_interiors connected_openin, safe) |
19f3d4af7a7d
New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
64773
diff
changeset
|
2715 |
apply (drule_tac x="s \<inter> interior t" in spec, safe) |
19f3d4af7a7d
New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
64773
diff
changeset
|
2716 |
apply (drule_tac [2] x="s \<inter> interior (-t)" in spec) |
19f3d4af7a7d
New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
64773
diff
changeset
|
2717 |
apply (auto simp: disjoint_eq_subset_Compl dest: interior_subset [THEN subsetD]) |
19f3d4af7a7d
New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
64773
diff
changeset
|
2718 |
done |
19f3d4af7a7d
New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
64773
diff
changeset
|
2719 |
|
19f3d4af7a7d
New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
64773
diff
changeset
|
2720 |
lemma closure_Un_frontier: "closure S = S \<union> frontier S" |
19f3d4af7a7d
New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
64773
diff
changeset
|
2721 |
proof - |
19f3d4af7a7d
New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
64773
diff
changeset
|
2722 |
have "S \<union> interior S = S" |
19f3d4af7a7d
New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
64773
diff
changeset
|
2723 |
using interior_subset by auto |
19f3d4af7a7d
New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
64773
diff
changeset
|
2724 |
then show ?thesis |
19f3d4af7a7d
New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
64773
diff
changeset
|
2725 |
using closure_subset by (auto simp: frontier_def) |
19f3d4af7a7d
New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
64773
diff
changeset
|
2726 |
qed |
19f3d4af7a7d
New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
64773
diff
changeset
|
2727 |
|
58757 | 2728 |
|
67962 | 2729 |
subsection%unimportant \<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
|
2730 |
|
64539 | 2731 |
definition indirection :: "'a::real_normed_vector \<Rightarrow> 'a \<Rightarrow> 'a filter" (infixr "indirection" 70) |
52624 | 2732 |
where "a indirection v = at a within {b. \<exists>c\<ge>0. b - a = scaleR c v}" |
33175 | 2733 |
|
60420 | 2734 |
text \<open>Identify Trivial limits, where we can't approach arbitrarily closely.\<close> |
33175 | 2735 |
|
52624 | 2736 |
lemma trivial_limit_within: "trivial_limit (at a within S) \<longleftrightarrow> \<not> a islimpt S" |
33175 | 2737 |
proof |
2738 |
assume "trivial_limit (at a within S)" |
|
53255 | 2739 |
then show "\<not> a islimpt S" |
33175 | 2740 |
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
|
2741 |
unfolding eventually_at_topological |
33175 | 2742 |
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
|
2743 |
apply (clarsimp simp add: set_eq_iff) |
33175 | 2744 |
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
|
2745 |
apply (clarsimp, drule_tac x=y in bspec, simp_all) |
33175 | 2746 |
done |
2747 |
next |
|
2748 |
assume "\<not> a islimpt S" |
|
53255 | 2749 |
then show "trivial_limit (at a within S)" |
55775 | 2750 |
unfolding trivial_limit_def eventually_at_topological islimpt_def |
2751 |
by metis |
|
33175 | 2752 |
qed |
2753 |
||
2754 |
lemma trivial_limit_at_iff: "trivial_limit (at a) \<longleftrightarrow> \<not> a islimpt UNIV" |
|
45031 | 2755 |
using trivial_limit_within [of a UNIV] by simp |
33175 | 2756 |
|
64539 | 2757 |
lemma trivial_limit_at: "\<not> trivial_limit (at a)" |
2758 |
for a :: "'a::perfect_space" |
|
44571 | 2759 |
by (rule at_neq_bot) |
33175 | 2760 |
|
2761 |
lemma trivial_limit_at_infinity: |
|
44081
730f7cced3a6
rename type 'a net to 'a filter, following standard mathematical terminology
huffman
parents:
44076
diff
changeset
|
2762 |
"\<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
|
2763 |
unfolding trivial_limit_def eventually_at_infinity |
246493d61204
define nets directly as filters, instead of as filter bases
huffman
parents:
36336
diff
changeset
|
2764 |
apply clarsimp |
44072
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
2765 |
apply (subgoal_tac "\<exists>x::'a. x \<noteq> 0", clarify) |
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
2766 |
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
|
2767 |
apply (cut_tac islimpt_UNIV [of "0::'a", unfolded islimpt_def]) |
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
2768 |
apply (drule_tac x=UNIV in spec, simp) |
33175 | 2769 |
done |
2770 |
||
53640 | 2771 |
lemma not_trivial_limit_within: "\<not> trivial_limit (at x within S) = (x \<in> closure (S - {x}))" |
64539 | 2772 |
using islimpt_in_closure by (metis trivial_limit_within) |
2773 |
||
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2774 |
lemma not_in_closure_trivial_limitI: |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2775 |
"x \<notin> closure s \<Longrightarrow> trivial_limit (at x within s)" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2776 |
using not_trivial_limit_within[of x s] |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2777 |
by safe (metis Diff_empty Diff_insert0 closure_subset contra_subsetD) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2778 |
|
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2779 |
lemma filterlim_at_within_closure_implies_filterlim: "filterlim f l (at x within s)" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2780 |
if "x \<in> closure s \<Longrightarrow> filterlim f l (at x within s)" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2781 |
by (metis bot.extremum filterlim_filtercomap filterlim_mono not_in_closure_trivial_limitI that) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
2782 |
|
64539 | 2783 |
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
|
2784 |
using not_trivial_limit_within[of c A] by blast |
ab2e862263e7
Rounding function, uniform limits, cotangent, binomial identities
eberlm
parents:
61524
diff
changeset
|
2785 |
|
60420 | 2786 |
text \<open>Some property holds "sufficiently close" to the limit point.\<close> |
33175 | 2787 |
|
2788 |
lemma trivial_limit_eventually: "trivial_limit net \<Longrightarrow> eventually P net" |
|
45031 | 2789 |
by simp |
33175 | 2790 |
|
2791 |
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
|
2792 |
by (simp add: filter_eq_iff) |
33175 | 2793 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2794 |
|
60420 | 2795 |
subsection \<open>Limits\<close> |
33175 | 2796 |
|
67962 | 2797 |
lemma%important Lim: "(f \<longlongrightarrow> l) net \<longleftrightarrow> trivial_limit net \<or> (\<forall>e>0. eventually (\<lambda>x. dist (f x) l < e) net)" |
64539 | 2798 |
by (auto simp: tendsto_iff trivial_limit_eq) |
2799 |
||
2800 |
text \<open>Show that they yield usual definitions in the various cases.\<close> |
|
33175 | 2801 |
|
67962 | 2802 |
lemma%important Lim_within_le: "(f \<longlongrightarrow> l)(at a within S) \<longleftrightarrow> |
53640 | 2803 |
(\<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)" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
2804 |
by (auto simp: tendsto_iff eventually_at_le) |
33175 | 2805 |
|
67962 | 2806 |
lemma%important Lim_within: "(f \<longlongrightarrow> l) (at a within S) \<longleftrightarrow> |
53640 | 2807 |
(\<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)" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
2808 |
by (auto simp: tendsto_iff eventually_at) |
33175 | 2809 |
|
62131
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
2810 |
corollary Lim_withinI [intro?]: |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
2811 |
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
|
2812 |
shows "(f \<longlongrightarrow> l) (at a within S)" |
64539 | 2813 |
apply (simp add: Lim_within, clarify) |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
2814 |
apply (rule ex_forward [OF assms [OF half_gt_zero]], auto) |
64539 | 2815 |
done |
62131
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
2816 |
|
67962 | 2817 |
lemma%important Lim_at: "(f \<longlongrightarrow> l) (at a) \<longleftrightarrow> |
53640 | 2818 |
(\<forall>e >0. \<exists>d>0. \<forall>x. 0 < dist x a \<and> dist x a < d \<longrightarrow> dist (f x) l < e)" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
2819 |
by (auto simp: tendsto_iff eventually_at) |
33175 | 2820 |
|
67962 | 2821 |
lemma%important 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)" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
2822 |
by (auto simp: tendsto_iff eventually_at_infinity) |
33175 | 2823 |
|
62131
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
2824 |
corollary Lim_at_infinityI [intro?]: |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
2825 |
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
|
2826 |
shows "(f \<longlongrightarrow> l) at_infinity" |
64539 | 2827 |
apply (simp add: Lim_at_infinity, clarify) |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
2828 |
apply (rule ex_forward [OF assms [OF half_gt_zero]], auto) |
64539 | 2829 |
done |
62131
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
2830 |
|
61973 | 2831 |
lemma Lim_eventually: "eventually (\<lambda>x. f x = l) net \<Longrightarrow> (f \<longlongrightarrow> l) net" |
64539 | 2832 |
by (rule topological_tendstoI) (auto elim: eventually_mono) |
33175 | 2833 |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2834 |
lemma Lim_transform_within_set: |
63301 | 2835 |
fixes a :: "'a::metric_space" and l :: "'b::metric_space" |
2836 |
shows "\<lbrakk>(f \<longlongrightarrow> l) (at a within S); eventually (\<lambda>x. x \<in> S \<longleftrightarrow> x \<in> T) (at a)\<rbrakk> |
|
2837 |
\<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
|
2838 |
apply (clarsimp simp: eventually_at Lim_within) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2839 |
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
|
2840 |
apply (rename_tac k) |
63301 | 2841 |
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
|
2842 |
done |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2843 |
|
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2844 |
lemma Lim_transform_within_set_eq: |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2845 |
fixes a l :: "'a::real_normed_vector" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
2846 |
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
|
2847 |
\<Longrightarrow> ((f \<longlongrightarrow> l) (at a within s) \<longleftrightarrow> (f \<longlongrightarrow> l) (at a within t))" |
64539 | 2848 |
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
|
2849 |
|
63301 | 2850 |
lemma Lim_transform_within_openin: |
2851 |
fixes a :: "'a::metric_space" |
|
2852 |
assumes f: "(f \<longlongrightarrow> l) (at a within T)" |
|
64539 | 2853 |
and "openin (subtopology euclidean T) S" "a \<in> S" |
2854 |
and eq: "\<And>x. \<lbrakk>x \<in> S; x \<noteq> a\<rbrakk> \<Longrightarrow> f x = g x" |
|
63301 | 2855 |
shows "(g \<longlongrightarrow> l) (at a within T)" |
2856 |
proof - |
|
2857 |
obtain \<epsilon> where "0 < \<epsilon>" and \<epsilon>: "ball a \<epsilon> \<inter> T \<subseteq> S" |
|
2858 |
using assms by (force simp: openin_contains_ball) |
|
2859 |
then have "a \<in> ball a \<epsilon>" |
|
64539 | 2860 |
by simp |
63301 | 2861 |
show ?thesis |
64539 | 2862 |
by (rule Lim_transform_within [OF f \<open>0 < \<epsilon>\<close> eq]) (use \<epsilon> in \<open>auto simp: dist_commute subset_iff\<close>) |
63301 | 2863 |
qed |
2864 |
||
2865 |
lemma continuous_transform_within_openin: |
|
2866 |
fixes a :: "'a::metric_space" |
|
2867 |
assumes "continuous (at a within T) f" |
|
64539 | 2868 |
and "openin (subtopology euclidean T) S" "a \<in> S" |
2869 |
and eq: "\<And>x. x \<in> S \<Longrightarrow> f x = g x" |
|
63301 | 2870 |
shows "continuous (at a within T) g" |
64539 | 2871 |
using assms by (simp add: Lim_transform_within_openin continuous_within) |
2872 |
||
2873 |
text \<open>The expected monotonicity property.\<close> |
|
33175 | 2874 |
|
53255 | 2875 |
lemma Lim_Un: |
61973 | 2876 |
assumes "(f \<longlongrightarrow> l) (at x within S)" "(f \<longlongrightarrow> l) (at x within T)" |
2877 |
shows "(f \<longlongrightarrow> l) (at x within (S \<union> T))" |
|
53860 | 2878 |
using assms unfolding at_within_union by (rule filterlim_sup) |
33175 | 2879 |
|
2880 |
lemma Lim_Un_univ: |
|
61973 | 2881 |
"(f \<longlongrightarrow> l) (at x within S) \<Longrightarrow> (f \<longlongrightarrow> l) (at x within T) \<Longrightarrow> |
2882 |
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
|
2883 |
by (metis Lim_Un) |
33175 | 2884 |
|
64539 | 2885 |
text \<open>Interrelations between restricted and unrestricted limits.\<close> |
2886 |
||
2887 |
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
|
2888 |
by (metis order_refl filterlim_mono subset_UNIV at_le) |
33175 | 2889 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2890 |
lemma eventually_within_interior: |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2891 |
assumes "x \<in> interior S" |
53255 | 2892 |
shows "eventually P (at x within S) \<longleftrightarrow> eventually P (at x)" |
2893 |
(is "?lhs = ?rhs") |
|
2894 |
proof |
|
44519 | 2895 |
from assms obtain T where T: "open T" "x \<in> T" "T \<subseteq> S" .. |
53255 | 2896 |
{ |
64539 | 2897 |
assume ?lhs |
53640 | 2898 |
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 | 2899 |
by (auto simp: eventually_at_topological) |
53640 | 2900 |
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
|
2901 |
by auto |
64539 | 2902 |
then show ?rhs |
2903 |
by (auto simp: eventually_at_topological) |
|
53255 | 2904 |
next |
64539 | 2905 |
assume ?rhs |
2906 |
then show ?lhs |
|
61810 | 2907 |
by (auto elim: eventually_mono simp: eventually_at_filter) |
52624 | 2908 |
} |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2909 |
qed |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2910 |
|
64539 | 2911 |
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
|
2912 |
unfolding filter_eq_iff by (intro allI eventually_within_interior) |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
2913 |
|
43338 | 2914 |
lemma Lim_within_LIMSEQ: |
53862 | 2915 |
fixes a :: "'a::first_countable_topology" |
61969 | 2916 |
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 | 2917 |
shows "(X \<longlongrightarrow> L) (at a within T)" |
44584 | 2918 |
using assms unfolding tendsto_def [where l=L] |
2919 |
by (simp add: sequentially_imp_eventually_within) |
|
43338 | 2920 |
|
2921 |
lemma Lim_right_bound: |
|
51773 | 2922 |
fixes f :: "'a :: {linorder_topology, conditionally_complete_linorder, no_top} \<Rightarrow> |
2923 |
'b::{linorder_topology, conditionally_complete_linorder}" |
|
43338 | 2924 |
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 | 2925 |
and bnd: "\<And>a. a \<in> I \<Longrightarrow> x < a \<Longrightarrow> K \<le> f a" |
61973 | 2926 |
shows "(f \<longlongrightarrow> Inf (f ` ({x<..} \<inter> I))) (at x within ({x<..} \<inter> I))" |
53640 | 2927 |
proof (cases "{x<..} \<inter> I = {}") |
2928 |
case True |
|
53859 | 2929 |
then show ?thesis by simp |
43338 | 2930 |
next |
53640 | 2931 |
case False |
43338 | 2932 |
show ?thesis |
51518
6a56b7088a6a
separate SupInf into Conditional_Complete_Lattice, move instantiation of real to RealDef
hoelzl
parents:
51481
diff
changeset
|
2933 |
proof (rule order_tendstoI) |
53282 | 2934 |
fix a |
2935 |
assume a: "a < Inf (f ` ({x<..} \<inter> I))" |
|
53255 | 2936 |
{ |
2937 |
fix y |
|
2938 |
assume "y \<in> {x<..} \<inter> I" |
|
53640 | 2939 |
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
|
2940 |
by (auto intro!: cInf_lower bdd_belowI2) |
53255 | 2941 |
with a have "a < f y" |
2942 |
by (blast intro: less_le_trans) |
|
2943 |
} |
|
51518
6a56b7088a6a
separate SupInf into Conditional_Complete_Lattice, move instantiation of real to RealDef
hoelzl
parents:
51481
diff
changeset
|
2944 |
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
|
2945 |
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
|
2946 |
next |
53255 | 2947 |
fix a |
2948 |
assume "Inf (f ` ({x<..} \<inter> I)) < a" |
|
53640 | 2949 |
from cInf_lessD[OF _ this] False obtain y where y: "x < y" "y \<in> I" "f y < a" |
53255 | 2950 |
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
|
2951 |
then have "eventually (\<lambda>x. x \<in> I \<longrightarrow> f x < a) (at_right x)" |
60420 | 2952 |
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
|
2953 |
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
|
2954 |
unfolding eventually_at_filter by eventually_elim simp |
43338 | 2955 |
qed |
2956 |
qed |
|
2957 |
||
64539 | 2958 |
text \<open>Another limit point characterization.\<close> |
33175 | 2959 |
|
63301 | 2960 |
lemma limpt_sequential_inj: |
2961 |
fixes x :: "'a::metric_space" |
|
2962 |
shows "x islimpt S \<longleftrightarrow> |
|
2963 |
(\<exists>f. (\<forall>n::nat. f n \<in> S - {x}) \<and> inj f \<and> (f \<longlongrightarrow> x) sequentially)" |
|
2964 |
(is "?lhs = ?rhs") |
|
2965 |
proof |
|
2966 |
assume ?lhs |
|
2967 |
then have "\<forall>e>0. \<exists>x'\<in>S. x' \<noteq> x \<and> dist x' x < e" |
|
2968 |
by (force simp: islimpt_approachable) |
|
2969 |
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" |
|
2970 |
by metis |
|
2971 |
define f where "f \<equiv> rec_nat (y 1) (\<lambda>n fn. y (min (inverse(2 ^ (Suc n))) (dist fn x)))" |
|
2972 |
have [simp]: "f 0 = y 1" |
|
2973 |
"f(Suc n) = y (min (inverse(2 ^ (Suc n))) (dist (f n) x))" for n |
|
2974 |
by (simp_all add: f_def) |
|
2975 |
have f: "f n \<in> S \<and> (f n \<noteq> x) \<and> dist (f n) x < inverse(2 ^ n)" for n |
|
2976 |
proof (induction n) |
|
2977 |
case 0 show ?case |
|
2978 |
by (simp add: y) |
|
2979 |
next |
|
2980 |
case (Suc n) then show ?case |
|
2981 |
apply (auto simp: y) |
|
2982 |
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) |
|
2983 |
qed |
|
2984 |
show ?rhs |
|
2985 |
proof (rule_tac x=f in exI, intro conjI allI) |
|
2986 |
show "\<And>n. f n \<in> S - {x}" |
|
2987 |
using f by blast |
|
2988 |
have "dist (f n) x < dist (f m) x" if "m < n" for m n |
|
2989 |
using that |
|
2990 |
proof (induction n) |
|
2991 |
case 0 then show ?case by simp |
|
2992 |
next |
|
2993 |
case (Suc n) |
|
2994 |
then consider "m < n" | "m = n" using less_Suc_eq by blast |
|
2995 |
then show ?case |
|
2996 |
proof cases |
|
2997 |
assume "m < n" |
|
2998 |
have "dist (f(Suc n)) x = dist (y (min (inverse(2 ^ (Suc n))) (dist (f n) x))) x" |
|
2999 |
by simp |
|
3000 |
also have "... < dist (f n) x" |
|
3001 |
by (metis dist_pos_lt f min.strict_order_iff min_less_iff_conj y) |
|
3002 |
also have "... < dist (f m) x" |
|
3003 |
using Suc.IH \<open>m < n\<close> by blast |
|
3004 |
finally show ?thesis . |
|
3005 |
next |
|
3006 |
assume "m = n" then show ?case |
|
3007 |
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) |
|
3008 |
qed |
|
3009 |
qed |
|
3010 |
then show "inj f" |
|
3011 |
by (metis less_irrefl linorder_injI) |
|
3012 |
show "f \<longlonglongrightarrow> x" |
|
3013 |
apply (rule tendstoI) |
|
3014 |
apply (rule_tac c="nat (ceiling(1/e))" in eventually_sequentiallyI) |
|
3015 |
apply (rule less_trans [OF f [THEN conjunct2, THEN conjunct2]]) |
|
3016 |
apply (simp add: field_simps) |
|
3017 |
by (meson le_less_trans mult_less_cancel_left not_le of_nat_less_two_power) |
|
3018 |
qed |
|
3019 |
next |
|
3020 |
assume ?rhs |
|
3021 |
then show ?lhs |
|
3022 |
by (fastforce simp add: islimpt_approachable lim_sequentially) |
|
3023 |
qed |
|
3024 |
||
3025 |
(*could prove directly from islimpt_sequential_inj, but only for metric spaces*) |
|
33175 | 3026 |
lemma islimpt_sequential: |
50883 | 3027 |
fixes x :: "'a::first_countable_topology" |
61973 | 3028 |
shows "x islimpt S \<longleftrightarrow> (\<exists>f. (\<forall>n::nat. f n \<in> S - {x}) \<and> (f \<longlongrightarrow> x) sequentially)" |
33175 | 3029 |
(is "?lhs = ?rhs") |
3030 |
proof |
|
3031 |
assume ?lhs |
|
55522 | 3032 |
from countable_basis_at_decseq[of x] obtain A where A: |
3033 |
"\<And>i. open (A i)" |
|
3034 |
"\<And>i. x \<in> A i" |
|
3035 |
"\<And>S. open S \<Longrightarrow> x \<in> S \<Longrightarrow> eventually (\<lambda>i. A i \<subseteq> S) sequentially" |
|
3036 |
by blast |
|
63040 | 3037 |
define f where "f n = (SOME y. y \<in> S \<and> y \<in> A n \<and> x \<noteq> y)" for n |
53255 | 3038 |
{ |
3039 |
fix n |
|
60420 | 3040 |
from \<open>?lhs\<close> have "\<exists>y. y \<in> S \<and> y \<in> A n \<and> x \<noteq> y" |
50883 | 3041 |
unfolding islimpt_def using A(1,2)[of n] by auto |
3042 |
then have "f n \<in> S \<and> f n \<in> A n \<and> x \<noteq> f n" |
|
3043 |
unfolding f_def by (rule someI_ex) |
|
53255 | 3044 |
then have "f n \<in> S" "f n \<in> A n" "x \<noteq> f n" by auto |
3045 |
} |
|
50883 | 3046 |
then have "\<forall>n. f n \<in> S - {x}" by auto |
61969 | 3047 |
moreover have "(\<lambda>n. f n) \<longlonglongrightarrow> x" |
50883 | 3048 |
proof (rule topological_tendstoI) |
53255 | 3049 |
fix S |
3050 |
assume "open S" "x \<in> S" |
|
60420 | 3051 |
from A(3)[OF this] \<open>\<And>n. f n \<in> A n\<close> |
53255 | 3052 |
show "eventually (\<lambda>x. f x \<in> S) sequentially" |
61810 | 3053 |
by (auto elim!: eventually_mono) |
44584 | 3054 |
qed |
3055 |
ultimately show ?rhs by fast |
|
33175 | 3056 |
next |
3057 |
assume ?rhs |
|
61969 | 3058 |
then obtain f :: "nat \<Rightarrow> 'a" where f: "\<And>n. f n \<in> S - {x}" and lim: "f \<longlonglongrightarrow> x" |
53255 | 3059 |
by auto |
50883 | 3060 |
show ?lhs |
3061 |
unfolding islimpt_def |
|
3062 |
proof safe |
|
53255 | 3063 |
fix T |
3064 |
assume "open T" "x \<in> T" |
|
50883 | 3065 |
from lim[THEN topological_tendstoD, OF this] f |
3066 |
show "\<exists>y\<in>S. y \<in> T \<and> y \<noteq> x" |
|
3067 |
unfolding eventually_sequentially by auto |
|
3068 |
qed |
|
33175 | 3069 |
qed |
3070 |
||
3071 |
lemma Lim_null: |
|
3072 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
|
61973 | 3073 |
shows "(f \<longlongrightarrow> l) net \<longleftrightarrow> ((\<lambda>x. f(x) - l) \<longlongrightarrow> 0) net" |
33175 | 3074 |
by (simp add: Lim dist_norm) |
3075 |
||
3076 |
lemma Lim_null_comparison: |
|
3077 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
|
61973 | 3078 |
assumes "eventually (\<lambda>x. norm (f x) \<le> g x) net" "(g \<longlongrightarrow> 0) net" |
3079 |
shows "(f \<longlongrightarrow> 0) net" |
|
53282 | 3080 |
using assms(2) |
44252
10362a07eb7c
Topology_Euclidean_Space.thy: simplify some proofs
huffman
parents:
44250
diff
changeset
|
3081 |
proof (rule metric_tendsto_imp_tendsto) |
10362a07eb7c
Topology_Euclidean_Space.thy: simplify some proofs
huffman
parents:
44250
diff
changeset
|
3082 |
show "eventually (\<lambda>x. dist (f x) 0 \<le> dist (g x) 0) net" |
61810 | 3083 |
using assms(1) by (rule eventually_mono) (simp add: dist_norm) |
33175 | 3084 |
qed |
3085 |
||
3086 |
lemma Lim_transform_bound: |
|
3087 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
|
53255 | 3088 |
and g :: "'a \<Rightarrow> 'c::real_normed_vector" |
53640 | 3089 |
assumes "eventually (\<lambda>n. norm (f n) \<le> norm (g n)) net" |
61973 | 3090 |
and "(g \<longlongrightarrow> 0) net" |
3091 |
shows "(f \<longlongrightarrow> 0) net" |
|
44252
10362a07eb7c
Topology_Euclidean_Space.thy: simplify some proofs
huffman
parents:
44250
diff
changeset
|
3092 |
using assms(1) tendsto_norm_zero [OF assms(2)] |
10362a07eb7c
Topology_Euclidean_Space.thy: simplify some proofs
huffman
parents:
44250
diff
changeset
|
3093 |
by (rule Lim_null_comparison) |
33175 | 3094 |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3095 |
lemma lim_null_mult_right_bounded: |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3096 |
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
|
3097 |
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
|
3098 |
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
|
3099 |
proof - |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3100 |
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
|
3101 |
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
|
3102 |
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
|
3103 |
apply (rule Lim_null_comparison [OF _ *]) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3104 |
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
|
3105 |
done |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3106 |
then show ?thesis |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3107 |
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
|
3108 |
qed |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3109 |
|
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3110 |
lemma lim_null_mult_left_bounded: |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3111 |
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
|
3112 |
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
|
3113 |
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
|
3114 |
proof - |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3115 |
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
|
3116 |
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
|
3117 |
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
|
3118 |
apply (rule Lim_null_comparison [OF _ *]) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3119 |
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
|
3120 |
done |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3121 |
then show ?thesis |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3122 |
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
|
3123 |
qed |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3124 |
|
63128 | 3125 |
lemma lim_null_scaleR_bounded: |
3126 |
assumes f: "(f \<longlongrightarrow> 0) net" and gB: "eventually (\<lambda>a. f a = 0 \<or> norm(g a) \<le> B) net" |
|
3127 |
shows "((\<lambda>n. f n *\<^sub>R g n) \<longlongrightarrow> 0) net" |
|
3128 |
proof |
|
3129 |
fix \<epsilon>::real |
|
3130 |
assume "0 < \<epsilon>" |
|
3131 |
then have B: "0 < \<epsilon> / (abs B + 1)" by simp |
|
3132 |
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 |
|
3133 |
proof - |
|
3134 |
have "\<bar>f x\<bar> * norm (g x) \<le> \<bar>f x\<bar> * B" |
|
3135 |
by (simp add: mult_left_mono g) |
|
3136 |
also have "... \<le> \<bar>f x\<bar> * (\<bar>B\<bar> + 1)" |
|
3137 |
by (simp add: mult_left_mono) |
|
3138 |
also have "... < \<epsilon>" |
|
3139 |
by (rule f) |
|
3140 |
finally show ?thesis . |
|
3141 |
qed |
|
3142 |
show "\<forall>\<^sub>F x in net. dist (f x *\<^sub>R g x) 0 < \<epsilon>" |
|
3143 |
apply (rule eventually_mono [OF eventually_conj [OF tendstoD [OF f B] gB] ]) |
|
3144 |
apply (auto simp: \<open>0 < \<epsilon>\<close> divide_simps * split: if_split_asm) |
|
3145 |
done |
|
3146 |
qed |
|
3147 |
||
60420 | 3148 |
text\<open>Deducing things about the limit from the elements.\<close> |
33175 | 3149 |
|
3150 |
lemma Lim_in_closed_set: |
|
53255 | 3151 |
assumes "closed S" |
3152 |
and "eventually (\<lambda>x. f(x) \<in> S) net" |
|
61973 | 3153 |
and "\<not> trivial_limit net" "(f \<longlongrightarrow> l) net" |
33175 | 3154 |
shows "l \<in> S" |
3155 |
proof (rule ccontr) |
|
3156 |
assume "l \<notin> S" |
|
60420 | 3157 |
with \<open>closed S\<close> have "open (- S)" "l \<in> - S" |
33175 | 3158 |
by (simp_all add: open_Compl) |
3159 |
with assms(4) have "eventually (\<lambda>x. f x \<in> - S) net" |
|
3160 |
by (rule topological_tendstoD) |
|
3161 |
with assms(2) have "eventually (\<lambda>x. False) net" |
|
3162 |
by (rule eventually_elim2) simp |
|
3163 |
with assms(3) show "False" |
|
3164 |
by (simp add: eventually_False) |
|
3165 |
qed |
|
3166 |
||
60420 | 3167 |
text\<open>Need to prove closed(cball(x,e)) before deducing this as a corollary.\<close> |
33175 | 3168 |
|
3169 |
lemma Lim_dist_ubound: |
|
53255 | 3170 |
assumes "\<not>(trivial_limit net)" |
61973 | 3171 |
and "(f \<longlongrightarrow> l) net" |
53640 | 3172 |
and "eventually (\<lambda>x. dist a (f x) \<le> e) net" |
3173 |
shows "dist a l \<le> e" |
|
56290 | 3174 |
using assms by (fast intro: tendsto_le tendsto_intros) |
33175 | 3175 |
|
3176 |
lemma Lim_norm_ubound: |
|
3177 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
|
61973 | 3178 |
assumes "\<not>(trivial_limit net)" "(f \<longlongrightarrow> l) net" "eventually (\<lambda>x. norm(f x) \<le> e) net" |
53255 | 3179 |
shows "norm(l) \<le> e" |
56290 | 3180 |
using assms by (fast intro: tendsto_le tendsto_intros) |
33175 | 3181 |
|
3182 |
lemma Lim_norm_lbound: |
|
3183 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
|
53640 | 3184 |
assumes "\<not> trivial_limit net" |
61973 | 3185 |
and "(f \<longlongrightarrow> l) net" |
53640 | 3186 |
and "eventually (\<lambda>x. e \<le> norm (f x)) net" |
33175 | 3187 |
shows "e \<le> norm l" |
56290 | 3188 |
using assms by (fast intro: tendsto_le tendsto_intros) |
33175 | 3189 |
|
60420 | 3190 |
text\<open>Limit under bilinear function\<close> |
33175 | 3191 |
|
3192 |
lemma Lim_bilinear: |
|
61973 | 3193 |
assumes "(f \<longlongrightarrow> l) net" |
3194 |
and "(g \<longlongrightarrow> m) net" |
|
53282 | 3195 |
and "bounded_bilinear h" |
61973 | 3196 |
shows "((\<lambda>x. h (f x) (g x)) \<longlongrightarrow> (h l m)) net" |
3197 |
using \<open>bounded_bilinear h\<close> \<open>(f \<longlongrightarrow> l) net\<close> \<open>(g \<longlongrightarrow> m) net\<close> |
|
52624 | 3198 |
by (rule bounded_bilinear.tendsto) |
33175 | 3199 |
|
60420 | 3200 |
text\<open>These are special for limits out of the same vector space.\<close> |
33175 | 3201 |
|
61973 | 3202 |
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
|
3203 |
unfolding id_def by (rule tendsto_ident_at) |
33175 | 3204 |
|
61973 | 3205 |
lemma Lim_at_id: "(id \<longlongrightarrow> a) (at a)" |
45031 | 3206 |
unfolding id_def by (rule tendsto_ident_at) |
33175 | 3207 |
|
3208 |
lemma Lim_at_zero: |
|
3209 |
fixes a :: "'a::real_normed_vector" |
|
53291 | 3210 |
and l :: "'b::topological_space" |
61973 | 3211 |
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
|
3212 |
using LIM_offset_zero LIM_offset_zero_cancel .. |
33175 | 3213 |
|
60420 | 3214 |
text\<open>It's also sometimes useful to extract the limit point from the filter.\<close> |
33175 | 3215 |
|
52624 | 3216 |
abbreviation netlimit :: "'a::t2_space filter \<Rightarrow> 'a" |
3217 |
where "netlimit F \<equiv> Lim F (\<lambda>x. x)" |
|
33175 | 3218 |
|
53282 | 3219 |
lemma netlimit_within: "\<not> trivial_limit (at a within S) \<Longrightarrow> netlimit (at a within S) = a" |
51365 | 3220 |
by (rule tendsto_Lim) (auto intro: tendsto_intros) |
33175 | 3221 |
|
67979
53323937ee25
new material about vec, real^1, etc.
paulson <lp15@cam.ac.uk>
parents:
67968
diff
changeset
|
3222 |
lemma netlimit_at [simp]: |
44072
5b970711fb39
class perfect_space inherits from topological_space;
huffman
parents:
43338
diff
changeset
|
3223 |
fixes a :: "'a::{perfect_space,t2_space}" |
33175 | 3224 |
shows "netlimit (at a) = a" |
45031 | 3225 |
using netlimit_within [of a UNIV] by simp |
33175 | 3226 |
|
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
3227 |
lemma lim_within_interior: |
61973 | 3228 |
"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
|
3229 |
by (metis at_within_interior) |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
3230 |
|
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
3231 |
lemma netlimit_within_interior: |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
3232 |
fixes x :: "'a::{t2_space,perfect_space}" |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
3233 |
assumes "x \<in> interior S" |
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
3234 |
shows "netlimit (at x within S) = x" |
52624 | 3235 |
using assms by (metis at_within_interior netlimit_at) |
44210
eba74571833b
Topology_Euclidean_Space.thy: organize section headings
huffman
parents:
44207
diff
changeset
|
3236 |
|
61824
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
3237 |
lemma netlimit_at_vector: |
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
3238 |
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
|
3239 |
shows "netlimit (at a) = a" |
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
3240 |
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
|
3241 |
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
|
3242 |
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
|
3243 |
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
|
3244 |
apply clarsimp |
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
3245 |
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
|
3246 |
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
|
3247 |
done |
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
3248 |
then show ?thesis |
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
3249 |
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
|
3250 |
qed simp |
dcbe9f756ae0
not_leE -> not_le_imp_less and other tidying
paulson <lp15@cam.ac.uk>
parents:
61810
diff
changeset
|
3251 |
|
33175 | 3252 |
|
60420 | 3253 |
text\<open>Useful lemmas on closure and set of possible sequential limits.\<close> |
33175 | 3254 |
|
3255 |
lemma closure_sequential: |
|
50883 | 3256 |
fixes l :: "'a::first_countable_topology" |
61973 | 3257 |
shows "l \<in> closure S \<longleftrightarrow> (\<exists>x. (\<forall>n. x n \<in> S) \<and> (x \<longlongrightarrow> l) sequentially)" |
53291 | 3258 |
(is "?lhs = ?rhs") |
33175 | 3259 |
proof |
53282 | 3260 |
assume "?lhs" |
3261 |
moreover |
|
3262 |
{ |
|
3263 |
assume "l \<in> S" |
|
3264 |
then have "?rhs" using tendsto_const[of l sequentially] by auto |
|
52624 | 3265 |
} |
3266 |
moreover |
|
53282 | 3267 |
{ |
3268 |
assume "l islimpt S" |
|
3269 |
then have "?rhs" unfolding islimpt_sequential by auto |
|
52624 | 3270 |
} |
3271 |
ultimately show "?rhs" |
|
3272 |
unfolding closure_def by auto |
|
33175 | 3273 |
next |
3274 |
assume "?rhs" |
|
53282 | 3275 |
then show "?lhs" unfolding closure_def islimpt_sequential by auto |
33175 | 3276 |
qed |
3277 |
||
3278 |
lemma closed_sequential_limits: |
|
50883 | 3279 |
fixes S :: "'a::first_countable_topology set" |
61973 | 3280 |
shows "closed S \<longleftrightarrow> (\<forall>x l. (\<forall>n. x n \<in> S) \<and> (x \<longlongrightarrow> l) sequentially \<longrightarrow> l \<in> S)" |
55775 | 3281 |
by (metis closure_sequential closure_subset_eq subset_iff) |
33175 | 3282 |
|
3283 |
lemma closure_approachable: |
|
3284 |
fixes S :: "'a::metric_space set" |
|
3285 |
shows "x \<in> closure S \<longleftrightarrow> (\<forall>e>0. \<exists>y\<in>S. dist y x < e)" |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
3286 |
apply (auto simp: closure_def islimpt_approachable) |
52624 | 3287 |
apply (metis dist_self) |
3288 |
done |
|
33175 | 3289 |
|
66641
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
3290 |
lemma closure_approachable_le: |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
3291 |
fixes S :: "'a::metric_space set" |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
3292 |
shows "x \<in> closure S \<longleftrightarrow> (\<forall>e>0. \<exists>y\<in>S. dist y x \<le> e)" |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
3293 |
unfolding closure_approachable |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
3294 |
using dense by force |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
3295 |
|
67727
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
3296 |
lemma closure_approachableD: |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
3297 |
assumes "x \<in> closure S" "e>0" |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
3298 |
shows "\<exists>y\<in>S. dist x y < e" |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
3299 |
using assms unfolding closure_approachable by (auto simp add: dist_commute) |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
3300 |
|
33175 | 3301 |
lemma closed_approachable: |
3302 |
fixes S :: "'a::metric_space set" |
|
53291 | 3303 |
shows "closed S \<Longrightarrow> (\<forall>e>0. \<exists>y\<in>S. dist y x < e) \<longleftrightarrow> x \<in> S" |
33175 | 3304 |
by (metis closure_closed closure_approachable) |
3305 |
||
51351 | 3306 |
lemma closure_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 |
assumes "S \<noteq> {}" "bdd_below S" |
51351 | 3309 |
shows "Inf S \<in> closure S" |
52624 | 3310 |
proof - |
51351 | 3311 |
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
|
3312 |
using cInf_lower[of _ S] assms by metis |
52624 | 3313 |
{ |
53282 | 3314 |
fix e :: real |
3315 |
assume "e > 0" |
|
52624 | 3316 |
then have "Inf S < Inf S + e" by simp |
3317 |
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
|
3318 |
by (subst (asm) cInf_less_iff) auto |
52624 | 3319 |
with * have "\<exists>x\<in>S. dist x (Inf S) < e" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
3320 |
by (intro bexI[of _ x]) (auto simp: dist_real_def) |
52624 | 3321 |
} |
3322 |
then show ?thesis unfolding closure_approachable by auto |
|
51351 | 3323 |
qed |
3324 |
||
66641
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
3325 |
lemma closure_Int_ballI: |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
3326 |
fixes S :: "'a :: metric_space set" |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
3327 |
assumes "\<And>U. \<lbrakk>openin (subtopology euclidean S) U; U \<noteq> {}\<rbrakk> \<Longrightarrow> T \<inter> U \<noteq> {}" |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
3328 |
shows "S \<subseteq> closure T" |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
3329 |
proof (clarsimp simp: closure_approachable dist_commute) |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
3330 |
fix x and e::real |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
3331 |
assume "x \<in> S" "0 < e" |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
3332 |
with assms [of "S \<inter> ball x e"] show "\<exists>y\<in>T. dist x y < e" |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
3333 |
by force |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
3334 |
qed |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
3335 |
|
51351 | 3336 |
lemma closed_contains_Inf: |
3337 |
fixes S :: "real set" |
|
54258
adfc759263ab
use bdd_above and bdd_below for conditionally complete lattices
hoelzl
parents:
54230
diff
changeset
|
3338 |
shows "S \<noteq> {} \<Longrightarrow> bdd_below S \<Longrightarrow> closed S \<Longrightarrow> Inf S \<in> S" |
63092 | 3339 |
by (metis closure_contains_Inf closure_closed) |
51351 | 3340 |
|
62083 | 3341 |
lemma closed_subset_contains_Inf: |
3342 |
fixes A C :: "real set" |
|
3343 |
shows "closed C \<Longrightarrow> A \<subseteq> C \<Longrightarrow> A \<noteq> {} \<Longrightarrow> bdd_below A \<Longrightarrow> Inf A \<in> C" |
|
3344 |
by (metis closure_contains_Inf closure_minimal subset_eq) |
|
3345 |
||
3346 |
lemma atLeastAtMost_subset_contains_Inf: |
|
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
3347 |
fixes A :: "real set" and a b :: real |
62083 | 3348 |
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
|
3349 |
by (rule closed_subset_contains_Inf) |
62083 | 3350 |
(auto intro: closed_real_atLeastAtMost intro!: bdd_belowI[of A a]) |
3351 |
||
51351 | 3352 |
lemma not_trivial_limit_within_ball: |
53640 | 3353 |
"\<not> trivial_limit (at x within S) \<longleftrightarrow> (\<forall>e>0. S \<inter> ball x e - {x} \<noteq> {})" |
60462 | 3354 |
(is "?lhs \<longleftrightarrow> ?rhs") |
3355 |
proof |
|
3356 |
show ?rhs if ?lhs |
|
3357 |
proof - |
|
53282 | 3358 |
{ |
3359 |
fix e :: real |
|
3360 |
assume "e > 0" |
|
53640 | 3361 |
then obtain y where "y \<in> S - {x}" and "dist y x < e" |
60420 | 3362 |
using \<open>?lhs\<close> not_trivial_limit_within[of x S] closure_approachable[of x "S - {x}"] |
51351 | 3363 |
by auto |
53640 | 3364 |
then have "y \<in> S \<inter> ball x e - {x}" |
51351 | 3365 |
unfolding ball_def by (simp add: dist_commute) |
53640 | 3366 |
then have "S \<inter> ball x e - {x} \<noteq> {}" by blast |
52624 | 3367 |
} |
60462 | 3368 |
then show ?thesis by auto |
3369 |
qed |
|
3370 |
show ?lhs if ?rhs |
|
3371 |
proof - |
|
53282 | 3372 |
{ |
3373 |
fix e :: real |
|
3374 |
assume "e > 0" |
|
53640 | 3375 |
then obtain y where "y \<in> S \<inter> ball x e - {x}" |
60420 | 3376 |
using \<open>?rhs\<close> by blast |
53640 | 3377 |
then have "y \<in> S - {x}" and "dist y x < e" |
3378 |
unfolding ball_def by (simp_all add: dist_commute) |
|
3379 |
then have "\<exists>y \<in> S - {x}. dist y x < e" |
|
53282 | 3380 |
by auto |
51351 | 3381 |
} |
60462 | 3382 |
then show ?thesis |
53282 | 3383 |
using not_trivial_limit_within[of x S] closure_approachable[of x "S - {x}"] |
3384 |
by auto |
|
60462 | 3385 |
qed |
51351 | 3386 |
qed |
3387 |
||
67685
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
3388 |
lemma tendsto_If_within_closures: |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
3389 |
assumes f: "x \<in> s \<union> (closure s \<inter> closure t) \<Longrightarrow> |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
3390 |
(f \<longlongrightarrow> l x) (at x within s \<union> (closure s \<inter> closure t))" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
3391 |
assumes g: "x \<in> t \<union> (closure s \<inter> closure t) \<Longrightarrow> |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
3392 |
(g \<longlongrightarrow> l x) (at x within t \<union> (closure s \<inter> closure t))" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
3393 |
assumes "x \<in> s \<union> t" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
3394 |
shows "((\<lambda>x. if x \<in> s then f x else g x) \<longlongrightarrow> l x) (at x within s \<union> t)" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
3395 |
proof - |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
3396 |
have *: "(s \<union> t) \<inter> {x. x \<in> s} = s" "(s \<union> t) \<inter> {x. x \<notin> s} = t - s" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
3397 |
by auto |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
3398 |
have "(f \<longlongrightarrow> l x) (at x within s)" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
3399 |
by (rule filterlim_at_within_closure_implies_filterlim) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
3400 |
(use \<open>x \<in> _\<close> in \<open>auto simp: inf_commute closure_def intro: tendsto_within_subset[OF f]\<close>) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
3401 |
moreover |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
3402 |
have "(g \<longlongrightarrow> l x) (at x within t - s)" |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
3403 |
by (rule filterlim_at_within_closure_implies_filterlim) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
3404 |
(use \<open>x \<in> _\<close> in |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
3405 |
\<open>auto intro!: tendsto_within_subset[OF g] simp: closure_def intro: islimpt_subset\<close>) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
3406 |
ultimately show ?thesis |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
3407 |
by (intro filterlim_at_within_If) (simp_all only: *) |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
3408 |
qed |
bdff8bf0a75b
moved theorems from AFP/Affine_Arithmetic and AFP/Ordinary_Differential_Equations
immler
parents:
67613
diff
changeset
|
3409 |
|
52624 | 3410 |
|
60420 | 3411 |
subsection \<open>Boundedness\<close> |
33175 | 3412 |
|
3413 |
(* FIXME: This has to be unified with BSEQ!! *) |
|
67962 | 3414 |
definition%important (in metric_space) bounded :: "'a set \<Rightarrow> bool" |
52624 | 3415 |
where "bounded S \<longleftrightarrow> (\<exists>x e. \<forall>y\<in>S. dist x y \<le> e)" |
33175 | 3416 |
|
61426
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
3417 |
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
|
3418 |
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
|
3419 |
|
33175 | 3420 |
lemma bounded_any_center: "bounded S \<longleftrightarrow> (\<exists>e. \<forall>y\<in>S. dist a y \<le> e)" |
52624 | 3421 |
unfolding bounded_def |
57512
cc97b347b301
reduced name variants for assoc and commute on plus and mult
haftmann
parents:
57448
diff
changeset
|
3422 |
by auto (metis add.commute add_le_cancel_right dist_commute dist_triangle_le) |
33175 | 3423 |
|
3424 |
lemma bounded_iff: "bounded S \<longleftrightarrow> (\<exists>a. \<forall>x\<in>S. norm x \<le> a)" |
|
52624 | 3425 |
unfolding bounded_any_center [where a=0] |
3426 |
by (simp add: dist_norm) |
|
33175 | 3427 |
|
61552
980dd46a03fb
Added binomial identities to CONTRIBUTORS; small lemmas on of_int/pochhammer
eberlm
parents:
61531
diff
changeset
|
3428 |
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
|
3429 |
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
|
3430 |
|
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3431 |
lemma bounded_norm_comp: "bounded ((\<lambda>x. norm (f x)) ` S) = bounded (f ` S)" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3432 |
by (simp add: bounded_iff) |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3433 |
|
65036
ab7e11730ad8
Some new lemmas. Existing lemmas modified to use uniform_limit rather than its expansion
paulson <lp15@cam.ac.uk>
parents:
64911
diff
changeset
|
3434 |
lemma boundedI: |
ab7e11730ad8
Some new lemmas. Existing lemmas modified to use uniform_limit rather than its expansion
paulson <lp15@cam.ac.uk>
parents:
64911
diff
changeset
|
3435 |
assumes "\<And>x. x \<in> S \<Longrightarrow> norm x \<le> B" |
ab7e11730ad8
Some new lemmas. Existing lemmas modified to use uniform_limit rather than its expansion
paulson <lp15@cam.ac.uk>
parents:
64911
diff
changeset
|
3436 |
shows "bounded S" |
ab7e11730ad8
Some new lemmas. Existing lemmas modified to use uniform_limit rather than its expansion
paulson <lp15@cam.ac.uk>
parents:
64911
diff
changeset
|
3437 |
using assms bounded_iff by blast |
50104 | 3438 |
|
50948 | 3439 |
lemma bounded_empty [simp]: "bounded {}" |
3440 |
by (simp add: bounded_def) |
|
3441 |
||
53291 | 3442 |
lemma bounded_subset: "bounded T \<Longrightarrow> S \<subseteq> T \<Longrightarrow> bounded S" |
33175 | 3443 |
by (metis bounded_def subset_eq) |
3444 |
||
53291 | 3445 |
lemma bounded_interior[intro]: "bounded S \<Longrightarrow> bounded(interior S)" |
33175 | 3446 |
by (metis bounded_subset interior_subset) |
3447 |
||
52624 | 3448 |
lemma bounded_closure[intro]: |
3449 |
assumes "bounded S" |
|
3450 |
shows "bounded (closure S)" |
|
3451 |
proof - |
|
3452 |
from assms obtain x and a where a: "\<forall>y\<in>S. dist x y \<le> a" |
|
3453 |
unfolding bounded_def by auto |
|
3454 |
{ |
|
3455 |
fix y |
|
3456 |
assume "y \<in> closure S" |
|
61973 | 3457 |
then obtain f where f: "\<forall>n. f n \<in> S" "(f \<longlongrightarrow> y) sequentially" |
33175 | 3458 |
unfolding closure_sequential by auto |
3459 |
have "\<forall>n. f n \<in> S \<longrightarrow> dist x (f n) \<le> a" using a by simp |
|
53282 | 3460 |
then have "eventually (\<lambda>n. dist x (f n) \<le> a) sequentially" |
61810 | 3461 |
by (simp add: f(1)) |
33175 | 3462 |
have "dist x y \<le> a" |
3463 |
apply (rule Lim_dist_ubound [of sequentially f]) |
|
3464 |
apply (rule trivial_limit_sequentially) |
|
3465 |
apply (rule f(2)) |
|
3466 |
apply fact |
|
3467 |
done |
|
3468 |
} |
|
53282 | 3469 |
then show ?thesis |
3470 |
unfolding bounded_def by auto |
|
33175 | 3471 |
qed |
3472 |
||
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
3473 |
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
|
3474 |
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
|
3475 |
|
33175 | 3476 |
lemma bounded_cball[simp,intro]: "bounded (cball x e)" |
3477 |
apply (simp add: bounded_def) |
|
3478 |
apply (rule_tac x=x in exI) |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
3479 |
apply (rule_tac x=e in exI, auto) |
33175 | 3480 |
done |
3481 |
||
53640 | 3482 |
lemma bounded_ball[simp,intro]: "bounded (ball x e)" |
33175 | 3483 |
by (metis ball_subset_cball bounded_cball bounded_subset) |
3484 |
||
3485 |
lemma bounded_Un[simp]: "bounded (S \<union> T) \<longleftrightarrow> bounded S \<and> bounded T" |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
3486 |
by (auto simp: bounded_def) (metis Un_iff bounded_any_center le_max_iff_disj) |
33175 | 3487 |
|
53640 | 3488 |
lemma bounded_Union[intro]: "finite F \<Longrightarrow> \<forall>S\<in>F. bounded S \<Longrightarrow> bounded (\<Union>F)" |
52624 | 3489 |
by (induct rule: finite_induct[of F]) auto |
33175 | 3490 |
|
50955 | 3491 |
lemma bounded_UN [intro]: "finite A \<Longrightarrow> \<forall>x\<in>A. bounded (B x) \<Longrightarrow> bounded (\<Union>x\<in>A. B x)" |
52624 | 3492 |
by (induct set: finite) auto |
50955 | 3493 |
|
50948 | 3494 |
lemma bounded_insert [simp]: "bounded (insert x S) \<longleftrightarrow> bounded S" |
3495 |
proof - |
|
53640 | 3496 |
have "\<forall>y\<in>{x}. dist x y \<le> 0" |
3497 |
by simp |
|
3498 |
then have "bounded {x}" |
|
3499 |
unfolding bounded_def by fast |
|
3500 |
then show ?thesis |
|
3501 |
by (metis insert_is_Un bounded_Un) |
|
50948 | 3502 |
qed |
3503 |
||
65587
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65585
diff
changeset
|
3504 |
lemma bounded_subset_ballI: "S \<subseteq> ball x r \<Longrightarrow> bounded S" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65585
diff
changeset
|
3505 |
by (meson bounded_ball bounded_subset) |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65585
diff
changeset
|
3506 |
|
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65585
diff
changeset
|
3507 |
lemma bounded_subset_ballD: |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65585
diff
changeset
|
3508 |
assumes "bounded S" shows "\<exists>r. 0 < r \<and> S \<subseteq> ball x r" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65585
diff
changeset
|
3509 |
proof - |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65585
diff
changeset
|
3510 |
obtain e::real and y where "S \<subseteq> cball y e" "0 \<le> e" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65585
diff
changeset
|
3511 |
using assms by (auto simp: bounded_subset_cball) |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65585
diff
changeset
|
3512 |
then show ?thesis |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65585
diff
changeset
|
3513 |
apply (rule_tac x="dist x y + e + 1" in exI) |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65585
diff
changeset
|
3514 |
apply (simp add: add.commute add_pos_nonneg) |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65585
diff
changeset
|
3515 |
apply (erule subset_trans) |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65585
diff
changeset
|
3516 |
apply (clarsimp simp add: cball_def) |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65585
diff
changeset
|
3517 |
by (metis add_le_cancel_right add_strict_increasing dist_commute dist_triangle_le zero_less_one) |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65585
diff
changeset
|
3518 |
qed |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65585
diff
changeset
|
3519 |
|
50948 | 3520 |
lemma finite_imp_bounded [intro]: "finite S \<Longrightarrow> bounded S" |
52624 | 3521 |
by (induct set: finite) simp_all |
50948 | 3522 |
|
53640 | 3523 |
lemma bounded_pos: "bounded S \<longleftrightarrow> (\<exists>b>0. \<forall>x\<in> S. norm x \<le> b)" |
33175 | 3524 |
apply (simp add: bounded_iff) |
61945 | 3525 |
apply (subgoal_tac "\<And>x (y::real). 0 < 1 + \<bar>y\<bar> \<and> (x \<le> y \<longrightarrow> x \<le> 1 + \<bar>y\<bar>)") |
52624 | 3526 |
apply metis |
3527 |
apply arith |
|
3528 |
done |
|
33175 | 3529 |
|
60762 | 3530 |
lemma bounded_pos_less: "bounded S \<longleftrightarrow> (\<exists>b>0. \<forall>x\<in> S. norm x < b)" |
3531 |
apply (simp add: bounded_pos) |
|
3532 |
apply (safe; rule_tac x="b+1" in exI; force) |
|
3533 |
done |
|
3534 |
||
53640 | 3535 |
lemma Bseq_eq_bounded: |
3536 |
fixes f :: "nat \<Rightarrow> 'a::real_normed_vector" |
|
3537 |
shows "Bseq f \<longleftrightarrow> bounded (range f)" |
|
50972 | 3538 |
unfolding Bseq_def bounded_pos by auto |
3539 |
||
33175 | 3540 |
lemma bounded_Int[intro]: "bounded S \<or> bounded T \<Longrightarrow> bounded (S \<inter> T)" |
3541 |
by (metis Int_lower1 Int_lower2 bounded_subset) |
|
3542 |
||
53291 | 3543 |
lemma bounded_diff[intro]: "bounded S \<Longrightarrow> bounded (S - T)" |
52624 | 3544 |
by (metis Diff_subset bounded_subset) |
33175 | 3545 |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
3546 |
lemma not_bounded_UNIV[simp]: |
33175 | 3547 |
"\<not> bounded (UNIV :: 'a::{real_normed_vector, perfect_space} set)" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
3548 |
proof (auto simp: bounded_pos not_le) |
33175 | 3549 |
obtain x :: 'a where "x \<noteq> 0" |
3550 |
using perfect_choose_dist [OF zero_less_one] by fast |
|
53640 | 3551 |
fix b :: real |
3552 |
assume b: "b >0" |
|
3553 |
have b1: "b +1 \<ge> 0" |
|
3554 |
using b by simp |
|
60420 | 3555 |
with \<open>x \<noteq> 0\<close> have "b < norm (scaleR (b + 1) (sgn x))" |
33175 | 3556 |
by (simp add: norm_sgn) |
3557 |
then show "\<exists>x::'a. b < norm x" .. |
|
3558 |
qed |
|
3559 |
||
61426
d53db136e8fd
new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents:
61424
diff
changeset
|
3560 |
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
|
3561 |
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
|
3562 |
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
|
3563 |
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
|
3564 |
|
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3565 |
lemma bounded_dist_comp: |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3566 |
assumes "bounded (f ` S)" "bounded (g ` S)" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3567 |
shows "bounded ((\<lambda>x. dist (f x) (g x)) ` S)" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3568 |
proof - |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3569 |
from assms obtain M1 M2 where *: "dist (f x) undefined \<le> M1" "dist undefined (g x) \<le> M2" if "x \<in> S" for x |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3570 |
by (auto simp: bounded_any_center[of _ undefined] dist_commute) |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3571 |
have "dist (f x) (g x) \<le> M1 + M2" if "x \<in> S" for x |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3572 |
using *[OF that] |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3573 |
by (rule order_trans[OF dist_triangle add_mono]) |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3574 |
then show ?thesis |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3575 |
by (auto intro!: boundedI) |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3576 |
qed |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3577 |
|
33175 | 3578 |
lemma bounded_linear_image: |
53291 | 3579 |
assumes "bounded S" |
3580 |
and "bounded_linear f" |
|
3581 |
shows "bounded (f ` S)" |
|
52624 | 3582 |
proof - |
53640 | 3583 |
from assms(1) obtain b where b: "b > 0" "\<forall>x\<in>S. norm x \<le> b" |
52624 | 3584 |
unfolding bounded_pos by auto |
53640 | 3585 |
from assms(2) obtain B where B: "B > 0" "\<forall>x. norm (f x) \<le> B * norm x" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
3586 |
using bounded_linear.pos_bounded by (auto simp: ac_simps) |
52624 | 3587 |
{ |
53282 | 3588 |
fix x |
53640 | 3589 |
assume "x \<in> S" |
3590 |
then have "norm x \<le> b" |
|
3591 |
using b by auto |
|
3592 |
then have "norm (f x) \<le> B * b" |
|
3593 |
using B(2) |
|
52624 | 3594 |
apply (erule_tac x=x in allE) |
3595 |
apply (metis B(1) B(2) order_trans mult_le_cancel_left_pos) |
|
3596 |
done |
|
33175 | 3597 |
} |
53282 | 3598 |
then show ?thesis |
3599 |
unfolding bounded_pos |
|
52624 | 3600 |
apply (rule_tac x="b*B" in exI) |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
3601 |
using b B by (auto simp: mult.commute) |
33175 | 3602 |
qed |
3603 |
||
3604 |
lemma bounded_scaling: |
|
3605 |
fixes S :: "'a::real_normed_vector set" |
|
3606 |
shows "bounded S \<Longrightarrow> bounded ((\<lambda>x. c *\<^sub>R x) ` S)" |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
3607 |
apply (rule bounded_linear_image, assumption) |
44282
f0de18b62d63
remove bounded_(bi)linear locale interpretations, to avoid duplicating so many lemmas
huffman
parents:
44252
diff
changeset
|
3608 |
apply (rule bounded_linear_scaleR_right) |
33175 | 3609 |
done |
3610 |
||
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3611 |
lemma bounded_scaleR_comp: |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3612 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3613 |
assumes "bounded (f ` S)" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3614 |
shows "bounded ((\<lambda>x. r *\<^sub>R f x) ` S)" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3615 |
using bounded_scaling[of "f ` S" r] assms |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3616 |
by (auto simp: image_image) |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3617 |
|
33175 | 3618 |
lemma bounded_translation: |
3619 |
fixes S :: "'a::real_normed_vector set" |
|
52624 | 3620 |
assumes "bounded S" |
3621 |
shows "bounded ((\<lambda>x. a + x) ` S)" |
|
53282 | 3622 |
proof - |
53640 | 3623 |
from assms obtain b where b: "b > 0" "\<forall>x\<in>S. norm x \<le> b" |
52624 | 3624 |
unfolding bounded_pos by auto |
3625 |
{ |
|
3626 |
fix x |
|
53640 | 3627 |
assume "x \<in> S" |
53282 | 3628 |
then have "norm (a + x) \<le> b + norm a" |
52624 | 3629 |
using norm_triangle_ineq[of a x] b by auto |
33175 | 3630 |
} |
53282 | 3631 |
then show ?thesis |
52624 | 3632 |
unfolding bounded_pos |
3633 |
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
|
3634 |
by (auto intro!: exI[of _ "b + norm a"]) |
33175 | 3635 |
qed |
3636 |
||
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
3637 |
lemma bounded_translation_minus: |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
3638 |
fixes S :: "'a::real_normed_vector set" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
3639 |
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
|
3640 |
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
|
3641 |
|
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
3642 |
lemma bounded_uminus [simp]: |
62466 | 3643 |
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
|
3644 |
shows "bounded (uminus ` X) \<longleftrightarrow> bounded X" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
3645 |
by (auto simp: bounded_def dist_norm; rule_tac x="-x" in exI; force simp: add.commute norm_minus_commute) |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
3646 |
|
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3647 |
lemma uminus_bounded_comp [simp]: |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3648 |
fixes f :: "'a \<Rightarrow> 'b::real_normed_vector" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3649 |
shows "bounded ((\<lambda>x. - f x) ` S) \<longleftrightarrow> bounded (f ` S)" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3650 |
using bounded_uminus[of "f ` S"] |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3651 |
by (auto simp: image_image) |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3652 |
|
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3653 |
lemma bounded_plus_comp: |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3654 |
fixes f g::"'a \<Rightarrow> 'b::real_normed_vector" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3655 |
assumes "bounded (f ` S)" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3656 |
assumes "bounded (g ` S)" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3657 |
shows "bounded ((\<lambda>x. f x + g x) ` S)" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3658 |
proof - |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3659 |
{ |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3660 |
fix B C |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3661 |
assume "\<And>x. x\<in>S \<Longrightarrow> norm (f x) \<le> B" "\<And>x. x\<in>S \<Longrightarrow> norm (g x) \<le> C" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3662 |
then have "\<And>x. x \<in> S \<Longrightarrow> norm (f x + g x) \<le> B + C" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3663 |
by (auto intro!: norm_triangle_le add_mono) |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3664 |
} then show ?thesis |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3665 |
using assms by (fastforce simp: bounded_iff) |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3666 |
qed |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3667 |
|
67683
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
3668 |
lemma bounded_plus: |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
3669 |
fixes S ::"'a::real_normed_vector set" |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
3670 |
assumes "bounded S" "bounded T" |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
3671 |
shows "bounded ((\<lambda>(x,y). x + y) ` (S \<times> T))" |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
3672 |
using bounded_plus_comp [of fst "S \<times> T" snd] assms |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
3673 |
by (auto simp: split_def split: if_split_asm) |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
3674 |
|
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3675 |
lemma bounded_minus_comp: |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3676 |
"bounded (f ` S) \<Longrightarrow> bounded (g ` S) \<Longrightarrow> bounded ((\<lambda>x. f x - g x) ` S)" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3677 |
for f g::"'a \<Rightarrow> 'b::real_normed_vector" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3678 |
using bounded_plus_comp[of "f" S "\<lambda>x. - g x"] |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
3679 |
by auto |
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65038
diff
changeset
|
3680 |
|
67683
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
3681 |
lemma bounded_minus: |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
3682 |
fixes S ::"'a::real_normed_vector set" |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
3683 |
assumes "bounded S" "bounded T" |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
3684 |
shows "bounded ((\<lambda>(x,y). x - y) ` (S \<times> T))" |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
3685 |
using bounded_minus_comp [of fst "S \<times> T" snd] assms |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
3686 |
by (auto simp: split_def split: if_split_asm) |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
3687 |
|
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
3688 |
|
60420 | 3689 |
subsection \<open>Compactness\<close> |
3690 |
||
3691 |
subsubsection \<open>Bolzano-Weierstrass property\<close> |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3692 |
|
67962 | 3693 |
lemma%important heine_borel_imp_bolzano_weierstrass: |
53640 | 3694 |
assumes "compact s" |
3695 |
and "infinite t" |
|
3696 |
and "t \<subseteq> s" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3697 |
shows "\<exists>x \<in> s. x islimpt t" |
67962 | 3698 |
proof%unimportant (rule ccontr) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3699 |
assume "\<not> (\<exists>x \<in> s. x islimpt t)" |
53640 | 3700 |
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 | 3701 |
unfolding islimpt_def |
53282 | 3702 |
using bchoice[of s "\<lambda> x T. x \<in> T \<and> open T \<and> (\<forall>y\<in>t. y \<in> T \<longrightarrow> y = x)"] |
3703 |
by auto |
|
53640 | 3704 |
obtain g where g: "g \<subseteq> {t. \<exists>x. x \<in> s \<and> t = f x}" "finite g" "s \<subseteq> \<Union>g" |
52624 | 3705 |
using assms(1)[unfolded compact_eq_heine_borel, THEN spec[where x="{t. \<exists>x. x\<in>s \<and> t = f x}"]] |
3706 |
using f by auto |
|
53640 | 3707 |
from g(1,3) have g':"\<forall>x\<in>g. \<exists>xa \<in> s. x = f xa" |
3708 |
by auto |
|
52624 | 3709 |
{ |
3710 |
fix x y |
|
53640 | 3711 |
assume "x \<in> t" "y \<in> t" "f x = f y" |
53282 | 3712 |
then have "x \<in> f x" "y \<in> f x \<longrightarrow> y = x" |
60420 | 3713 |
using f[THEN bspec[where x=x]] and \<open>t \<subseteq> s\<close> by auto |
53282 | 3714 |
then have "x = y" |
60420 | 3715 |
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 | 3716 |
by auto |
52624 | 3717 |
} |
53282 | 3718 |
then have "inj_on f t" |
52624 | 3719 |
unfolding inj_on_def by simp |
53282 | 3720 |
then have "infinite (f ` t)" |
52624 | 3721 |
using assms(2) using finite_imageD by auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3722 |
moreover |
52624 | 3723 |
{ |
3724 |
fix x |
|
53640 | 3725 |
assume "x \<in> t" "f x \<notin> g" |
60420 | 3726 |
from g(3) assms(3) \<open>x \<in> t\<close> obtain h where "h \<in> g" and "x \<in> h" |
53640 | 3727 |
by auto |
3728 |
then obtain y where "y \<in> s" "h = f y" |
|
52624 | 3729 |
using g'[THEN bspec[where x=h]] by auto |
53282 | 3730 |
then have "y = x" |
60420 | 3731 |
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 | 3732 |
by auto |
53282 | 3733 |
then have False |
60420 | 3734 |
using \<open>f x \<notin> g\<close> \<open>h \<in> g\<close> unfolding \<open>h = f y\<close> |
53640 | 3735 |
by auto |
52624 | 3736 |
} |
53282 | 3737 |
then have "f ` t \<subseteq> g" by auto |
52624 | 3738 |
ultimately show False |
3739 |
using g(2) using finite_subset by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3740 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3741 |
|
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
|
3742 |
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
|
3743 |
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
|
3744 |
assumes l: "\<forall>U. l\<in>U \<longrightarrow> open U \<longrightarrow> infinite (U \<inter> range f)" |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
3745 |
shows "\<exists>r::nat\<Rightarrow>nat. strict_mono r \<and> (f \<circ> r) \<longlonglongrightarrow> l" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3746 |
proof - |
55522 | 3747 |
from countable_basis_at_decseq[of l] |
3748 |
obtain A where A: |
|
3749 |
"\<And>i. open (A i)" |
|
3750 |
"\<And>i. l \<in> A i" |
|
3751 |
"\<And>S. open S \<Longrightarrow> l \<in> S \<Longrightarrow> eventually (\<lambda>i. A i \<subseteq> S) sequentially" |
|
3752 |
by blast |
|
63040 | 3753 |
define s where "s n i = (SOME j. i < j \<and> f j \<in> A (Suc n))" for n i |
52624 | 3754 |
{ |
3755 |
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
|
3756 |
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
|
3757 |
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
|
3758 |
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
|
3759 |
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
|
3760 |
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
|
3761 |
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
|
3762 |
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
|
3763 |
by (auto simp: not_le) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3764 |
then have "i < s n i" "f (s n i) \<in> A (Suc n)" |
52624 | 3765 |
unfolding s_def by (auto intro: someI2_ex) |
3766 |
} |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3767 |
note s = this |
63040 | 3768 |
define r where "r = rec_nat (s 0 0) s" |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
3769 |
have "strict_mono r" |
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
3770 |
by (auto simp: r_def s strict_mono_Suc_iff) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3771 |
moreover |
61969 | 3772 |
have "(\<lambda>n. f (r n)) \<longlonglongrightarrow> l" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3773 |
proof (rule topological_tendstoI) |
53282 | 3774 |
fix S |
3775 |
assume "open S" "l \<in> S" |
|
53640 | 3776 |
with A(3) have "eventually (\<lambda>i. A i \<subseteq> S) sequentially" |
3777 |
by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3778 |
moreover |
52624 | 3779 |
{ |
3780 |
fix i |
|
53282 | 3781 |
assume "Suc 0 \<le> i" |
3782 |
then have "f (r i) \<in> A i" |
|
52624 | 3783 |
by (cases i) (simp_all add: r_def s) |
3784 |
} |
|
3785 |
then have "eventually (\<lambda>i. f (r i) \<in> A i) sequentially" |
|
3786 |
by (auto simp: eventually_sequentially) |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3787 |
ultimately show "eventually (\<lambda>i. f (r i) \<in> S) sequentially" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3788 |
by eventually_elim auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3789 |
qed |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
3790 |
ultimately show "\<exists>r::nat\<Rightarrow>nat. strict_mono r \<and> (f \<circ> r) \<longlonglongrightarrow> l" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3791 |
by (auto simp: convergent_def comp_def) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3792 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3793 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3794 |
lemma sequence_infinite_lemma: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3795 |
fixes f :: "nat \<Rightarrow> 'a::t1_space" |
53282 | 3796 |
assumes "\<forall>n. f n \<noteq> l" |
61973 | 3797 |
and "(f \<longlongrightarrow> l) sequentially" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3798 |
shows "infinite (range f)" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3799 |
proof |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3800 |
assume "finite (range f)" |
53640 | 3801 |
then have "closed (range f)" |
3802 |
by (rule finite_imp_closed) |
|
3803 |
then have "open (- range f)" |
|
3804 |
by (rule open_Compl) |
|
3805 |
from assms(1) have "l \<in> - range f" |
|
3806 |
by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3807 |
from assms(2) have "eventually (\<lambda>n. f n \<in> - range f) sequentially" |
60420 | 3808 |
using \<open>open (- range f)\<close> \<open>l \<in> - range f\<close> |
53640 | 3809 |
by (rule topological_tendstoD) |
3810 |
then show False |
|
3811 |
unfolding eventually_sequentially |
|
3812 |
by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3813 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3814 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3815 |
lemma closure_insert: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3816 |
fixes x :: "'a::t1_space" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3817 |
shows "closure (insert x s) = insert x (closure s)" |
52624 | 3818 |
apply (rule closure_unique) |
3819 |
apply (rule insert_mono [OF closure_subset]) |
|
3820 |
apply (rule closed_insert [OF closed_closure]) |
|
3821 |
apply (simp add: closure_minimal) |
|
3822 |
done |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3823 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3824 |
lemma islimpt_insert: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3825 |
fixes x :: "'a::t1_space" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3826 |
shows "x islimpt (insert a s) \<longleftrightarrow> x islimpt s" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3827 |
proof |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3828 |
assume *: "x islimpt (insert a s)" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3829 |
show "x islimpt s" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3830 |
proof (rule islimptI) |
53282 | 3831 |
fix t |
3832 |
assume t: "x \<in> t" "open t" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3833 |
show "\<exists>y\<in>s. y \<in> t \<and> y \<noteq> x" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3834 |
proof (cases "x = a") |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3835 |
case True |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3836 |
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
|
3837 |
using * t by (rule islimptE) |
60420 | 3838 |
with \<open>x = a\<close> show ?thesis by auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3839 |
next |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3840 |
case False |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3841 |
with t have t': "x \<in> t - {a}" "open (t - {a})" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3842 |
by (simp_all add: open_Diff) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3843 |
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
|
3844 |
using * t' by (rule islimptE) |
53282 | 3845 |
then show ?thesis by auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3846 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3847 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3848 |
next |
53282 | 3849 |
assume "x islimpt s" |
3850 |
then show "x islimpt (insert a s)" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3851 |
by (rule islimpt_subset) auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3852 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3853 |
|
50897
078590669527
generalize lemma islimpt_finite to class t1_space
huffman
parents:
50884
diff
changeset
|
3854 |
lemma islimpt_finite: |
078590669527
generalize lemma islimpt_finite to class t1_space
huffman
parents:
50884
diff
changeset
|
3855 |
fixes x :: "'a::t1_space" |
078590669527
generalize lemma islimpt_finite to class t1_space
huffman
parents:
50884
diff
changeset
|
3856 |
shows "finite s \<Longrightarrow> \<not> x islimpt s" |
52624 | 3857 |
by (induct set: finite) (simp_all add: islimpt_insert) |
50897
078590669527
generalize lemma islimpt_finite to class t1_space
huffman
parents:
50884
diff
changeset
|
3858 |
|
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
|
3859 |
lemma islimpt_Un_finite: |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3860 |
fixes x :: "'a::t1_space" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3861 |
shows "finite s \<Longrightarrow> x islimpt (s \<union> t) \<longleftrightarrow> x islimpt t" |
52624 | 3862 |
by (simp add: islimpt_Un islimpt_finite) |
50897
078590669527
generalize lemma islimpt_finite to class t1_space
huffman
parents:
50884
diff
changeset
|
3863 |
|
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
|
3864 |
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
|
3865 |
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
|
3866 |
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
|
3867 |
proof (safe intro!: islimptI) |
53282 | 3868 |
fix U |
3869 |
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
|
3870 |
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
|
3871 |
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
|
3872 |
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
|
3873 |
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
|
3874 |
next |
53282 | 3875 |
fix T |
3876 |
assume *: "\<forall>U. l\<in>U \<longrightarrow> open U \<longrightarrow> infinite (U \<inter> S)" "l \<in> T" "open T" |
|
3877 |
then have "infinite (T \<inter> S - {l})" |
|
3878 |
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
|
3879 |
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
|
3880 |
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
|
3881 |
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
|
3882 |
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
|
3883 |
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
|
3884 |
|
63938 | 3885 |
corollary infinite_openin: |
3886 |
fixes S :: "'a :: t1_space set" |
|
3887 |
shows "\<lbrakk>openin (subtopology euclidean U) S; x \<in> S; x islimpt U\<rbrakk> \<Longrightarrow> infinite S" |
|
3888 |
by (clarsimp simp add: openin_open islimpt_eq_acc_point inf_commute) |
|
3889 |
||
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
|
3890 |
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
|
3891 |
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
|
3892 |
assumes l: "l islimpt (range f)" |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
3893 |
shows "\<exists>r::nat\<Rightarrow>nat. strict_mono 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
|
3894 |
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
|
3895 |
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
|
3896 |
|
64773
223b2ebdda79
Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents:
64758
diff
changeset
|
3897 |
lemma islimpt_eq_infinite_ball: "x islimpt S \<longleftrightarrow> (\<forall>e>0. infinite(S \<inter> ball x e))" |
223b2ebdda79
Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents:
64758
diff
changeset
|
3898 |
apply (simp add: islimpt_eq_acc_point, safe) |
223b2ebdda79
Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents:
64758
diff
changeset
|
3899 |
apply (metis Int_commute open_ball centre_in_ball) |
223b2ebdda79
Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents:
64758
diff
changeset
|
3900 |
by (metis open_contains_ball Int_mono finite_subset inf_commute subset_refl) |
223b2ebdda79
Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents:
64758
diff
changeset
|
3901 |
|
223b2ebdda79
Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents:
64758
diff
changeset
|
3902 |
lemma islimpt_eq_infinite_cball: "x islimpt S \<longleftrightarrow> (\<forall>e>0. infinite(S \<inter> cball x e))" |
223b2ebdda79
Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents:
64758
diff
changeset
|
3903 |
apply (simp add: islimpt_eq_infinite_ball, safe) |
223b2ebdda79
Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents:
64758
diff
changeset
|
3904 |
apply (meson Int_mono ball_subset_cball finite_subset order_refl) |
223b2ebdda79
Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents:
64758
diff
changeset
|
3905 |
by (metis open_ball centre_in_ball finite_Int inf.absorb_iff2 inf_assoc open_contains_cball_eq) |
223b2ebdda79
Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents:
64758
diff
changeset
|
3906 |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3907 |
lemma sequence_unique_limpt: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3908 |
fixes f :: "nat \<Rightarrow> 'a::t2_space" |
61973 | 3909 |
assumes "(f \<longlongrightarrow> l) sequentially" |
53282 | 3910 |
and "l' islimpt (range f)" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3911 |
shows "l' = l" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3912 |
proof (rule ccontr) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3913 |
assume "l' \<noteq> l" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3914 |
obtain s t where "open s" "open t" "l' \<in> s" "l \<in> t" "s \<inter> t = {}" |
60420 | 3915 |
using hausdorff [OF \<open>l' \<noteq> l\<close>] by auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3916 |
have "eventually (\<lambda>n. f n \<in> t) sequentially" |
60420 | 3917 |
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
|
3918 |
then obtain N where "\<forall>n\<ge>N. f n \<in> t" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3919 |
unfolding eventually_sequentially by auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3920 |
|
53282 | 3921 |
have "UNIV = {..<N} \<union> {N..}" |
3922 |
by auto |
|
3923 |
then have "l' islimpt (f ` ({..<N} \<union> {N..}))" |
|
3924 |
using assms(2) by simp |
|
3925 |
then have "l' islimpt (f ` {..<N} \<union> f ` {N..})" |
|
3926 |
by (simp add: image_Un) |
|
3927 |
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
|
3928 |
by (simp add: islimpt_Un_finite) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3929 |
then obtain y where "y \<in> f ` {N..}" "y \<in> s" "y \<noteq> l'" |
60420 | 3930 |
using \<open>l' \<in> s\<close> \<open>open s\<close> by (rule islimptE) |
53282 | 3931 |
then obtain n where "N \<le> n" "f n \<in> s" "f n \<noteq> l'" |
3932 |
by auto |
|
60420 | 3933 |
with \<open>\<forall>n\<ge>N. f n \<in> t\<close> have "f n \<in> s \<inter> t" |
53282 | 3934 |
by simp |
60420 | 3935 |
with \<open>s \<inter> t = {}\<close> show False |
53282 | 3936 |
by simp |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3937 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3938 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3939 |
lemma bolzano_weierstrass_imp_closed: |
53640 | 3940 |
fixes s :: "'a::{first_countable_topology,t2_space} set" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3941 |
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
|
3942 |
shows "closed s" |
52624 | 3943 |
proof - |
3944 |
{ |
|
3945 |
fix x l |
|
61973 | 3946 |
assume as: "\<forall>n::nat. x n \<in> s" "(x \<longlongrightarrow> l) sequentially" |
53282 | 3947 |
then have "l \<in> s" |
52624 | 3948 |
proof (cases "\<forall>n. x n \<noteq> l") |
3949 |
case False |
|
53282 | 3950 |
then show "l\<in>s" using as(1) by auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3951 |
next |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3952 |
case True note cas = this |
52624 | 3953 |
with as(2) have "infinite (range x)" |
3954 |
using sequence_infinite_lemma[of x l] by auto |
|
3955 |
then obtain l' where "l'\<in>s" "l' islimpt (range x)" |
|
3956 |
using assms[THEN spec[where x="range x"]] as(1) by auto |
|
53282 | 3957 |
then show "l\<in>s" using sequence_unique_limpt[of x l l'] |
52624 | 3958 |
using as cas by auto |
3959 |
qed |
|
3960 |
} |
|
53282 | 3961 |
then show ?thesis |
3962 |
unfolding closed_sequential_limits by fast |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3963 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3964 |
|
50944 | 3965 |
lemma compact_imp_bounded: |
52624 | 3966 |
assumes "compact U" |
3967 |
shows "bounded U" |
|
50944 | 3968 |
proof - |
52624 | 3969 |
have "compact U" "\<forall>x\<in>U. open (ball x 1)" "U \<subseteq> (\<Union>x\<in>U. ball x 1)" |
3970 |
using assms by auto |
|
50944 | 3971 |
then obtain D where D: "D \<subseteq> U" "finite D" "U \<subseteq> (\<Union>x\<in>D. ball x 1)" |
65585
a043de9ad41e
Some fixes related to compactE_image
paulson <lp15@cam.ac.uk>
parents:
65204
diff
changeset
|
3972 |
by (metis compactE_image) |
60420 | 3973 |
from \<open>finite D\<close> have "bounded (\<Union>x\<in>D. ball x 1)" |
50955 | 3974 |
by (simp add: bounded_UN) |
60420 | 3975 |
then show "bounded U" using \<open>U \<subseteq> (\<Union>x\<in>D. ball x 1)\<close> |
50955 | 3976 |
by (rule bounded_subset) |
50944 | 3977 |
qed |
3978 |
||
60420 | 3979 |
text\<open>In particular, some common special cases.\<close> |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3980 |
|
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
|
3981 |
lemma compact_Un [intro]: |
53291 | 3982 |
assumes "compact s" |
3983 |
and "compact t" |
|
53282 | 3984 |
shows " compact (s \<union> t)" |
50898 | 3985 |
proof (rule compactI) |
52624 | 3986 |
fix f |
3987 |
assume *: "Ball f open" "s \<union> t \<subseteq> \<Union>f" |
|
60420 | 3988 |
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
|
3989 |
unfolding compact_eq_heine_borel by (auto elim!: allE[of _ f]) |
52624 | 3990 |
moreover |
60420 | 3991 |
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
|
3992 |
unfolding compact_eq_heine_borel by (auto elim!: allE[of _ f]) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3993 |
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
|
3994 |
by (auto intro!: exI[of _ "s' \<union> t'"]) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3995 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3996 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3997 |
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
|
3998 |
by (induct set: finite) auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
3999 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4000 |
lemma compact_UN [intro]: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4001 |
"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
|
4002 |
by (rule compact_Union) auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4003 |
|
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
|
4004 |
lemma closed_Int_compact [intro]: |
53282 | 4005 |
assumes "closed s" |
4006 |
and "compact t" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4007 |
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
|
4008 |
using compact_Int_closed [of t s] assms |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4009 |
by (simp add: Int_commute) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4010 |
|
62843
313d3b697c9a
Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
4011 |
lemma compact_Int [intro]: |
50898 | 4012 |
fixes s t :: "'a :: t2_space set" |
53282 | 4013 |
assumes "compact s" |
4014 |
and "compact t" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4015 |
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
|
4016 |
using assms by (intro compact_Int_closed compact_imp_closed) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4017 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4018 |
lemma compact_sing [simp]: "compact {a}" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4019 |
unfolding compact_eq_heine_borel by auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4020 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4021 |
lemma compact_insert [simp]: |
53282 | 4022 |
assumes "compact s" |
4023 |
shows "compact (insert x s)" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4024 |
proof - |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4025 |
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
|
4026 |
using compact_sing assms by (rule compact_Un) |
53282 | 4027 |
then show ?thesis by simp |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4028 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4029 |
|
52624 | 4030 |
lemma finite_imp_compact: "finite s \<Longrightarrow> compact s" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4031 |
by (induct set: finite) simp_all |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4032 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4033 |
lemma open_delete: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4034 |
fixes s :: "'a::t1_space set" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4035 |
shows "open s \<Longrightarrow> open (s - {x})" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4036 |
by (simp add: open_Diff) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4037 |
|
62948
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
4038 |
lemma openin_delete: |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
4039 |
fixes a :: "'a :: t1_space" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
4040 |
shows "openin (subtopology euclidean u) s |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
4041 |
\<Longrightarrow> openin (subtopology euclidean u) (s - {a})" |
7700f467892b
lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents:
62843
diff
changeset
|
4042 |
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
|
4043 |
|
60420 | 4044 |
text\<open>Compactness expressed with filters\<close> |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4045 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4046 |
lemma closure_iff_nhds_not_empty: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4047 |
"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
|
4048 |
proof safe |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4049 |
assume x: "x \<in> closure X" |
53282 | 4050 |
fix S A |
4051 |
assume "open S" "x \<in> S" "X \<inter> A = {}" "S \<subseteq> A" |
|
4052 |
then have "x \<notin> closure (-S)" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4053 |
by (auto simp: closure_complement subset_eq[symmetric] intro: interiorI) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4054 |
with x have "x \<in> closure X - closure (-S)" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4055 |
by auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4056 |
also have "\<dots> \<subseteq> closure (X \<inter> S)" |
63128 | 4057 |
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
|
4058 |
finally have "X \<inter> S \<noteq> {}" by auto |
60420 | 4059 |
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
|
4060 |
next |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4061 |
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
|
4062 |
from this[THEN spec, of "- X", THEN spec, of "- closure X"] |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4063 |
show "x \<in> closure X" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4064 |
by (simp add: closure_subset open_Compl) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4065 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4066 |
|
66641
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
4067 |
corollary closure_Int_ball_not_empty: |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
4068 |
assumes "S \<subseteq> closure T" "x \<in> S" "r > 0" |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
4069 |
shows "T \<inter> ball x r \<noteq> {}" |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
4070 |
using assms centre_in_ball closure_iff_nhds_not_empty by blast |
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
paulson <lp15@cam.ac.uk>
parents:
66466
diff
changeset
|
4071 |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4072 |
lemma compact_filter: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4073 |
"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
|
4074 |
proof (intro allI iffI impI compact_fip[THEN iffD2] notI) |
53282 | 4075 |
fix F |
4076 |
assume "compact U" |
|
4077 |
assume F: "F \<noteq> bot" "eventually (\<lambda>x. x \<in> U) F" |
|
4078 |
then have "U \<noteq> {}" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4079 |
by (auto simp: eventually_False) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4080 |
|
63040 | 4081 |
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
|
4082 |
then have "\<forall>z\<in>Z. closed z" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4083 |
by auto |
53282 | 4084 |
moreover |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4085 |
have ev_Z: "\<And>z. z \<in> Z \<Longrightarrow> eventually (\<lambda>x. x \<in> z) F" |
61810 | 4086 |
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
|
4087 |
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
|
4088 |
proof (intro allI impI) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4089 |
fix B assume "finite B" "B \<subseteq> Z" |
60420 | 4090 |
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
|
4091 |
by (auto simp: eventually_ball_finite_distrib eventually_conj_iff) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4092 |
with F show "U \<inter> \<Inter>B \<noteq> {}" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4093 |
by (intro notI) (simp add: eventually_False) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4094 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4095 |
ultimately have "U \<inter> \<Inter>Z \<noteq> {}" |
60420 | 4096 |
using \<open>compact U\<close> unfolding compact_fip by blast |
53282 | 4097 |
then obtain x where "x \<in> U" and x: "\<And>z. z \<in> Z \<Longrightarrow> x \<in> z" |
4098 |
by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4099 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4100 |
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
|
4101 |
unfolding eventually_inf eventually_nhds |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4102 |
proof safe |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4103 |
fix P Q R S |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4104 |
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
|
4105 |
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
|
4106 |
have "S \<inter> {x. R x} \<noteq> {}" by (auto simp: Z_def) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4107 |
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
|
4108 |
ultimately show False by (auto simp: set_eq_iff) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4109 |
qed |
60420 | 4110 |
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
|
4111 |
by (metis eventually_bot) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4112 |
next |
53282 | 4113 |
fix A |
4114 |
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 | 4115 |
define F where "F = (INF a:insert U A. principal a)" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4116 |
have "F \<noteq> bot" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4117 |
unfolding F_def |
57276 | 4118 |
proof (rule INF_filter_not_bot) |
63540 | 4119 |
fix X |
4120 |
assume X: "X \<subseteq> insert U A" "finite X" |
|
4121 |
with A(2)[THEN spec, of "X - {U}"] have "U \<inter> \<Inter>(X - {U}) \<noteq> {}" |
|
53282 | 4122 |
by auto |
63540 | 4123 |
with X show "(INF a:X. principal a) \<noteq> bot" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
4124 |
by (auto simp: INF_principal_finite principal_eq_bot_iff) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4125 |
qed |
57276 | 4126 |
moreover |
4127 |
have "F \<le> principal U" |
|
4128 |
unfolding F_def by auto |
|
4129 |
then have "eventually (\<lambda>x. x \<in> U) F" |
|
4130 |
by (auto simp: le_filter_def eventually_principal) |
|
53282 | 4131 |
moreover |
4132 |
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
|
4133 |
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
|
4134 |
by auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4135 |
|
57276 | 4136 |
{ fix V assume "V \<in> A" |
4137 |
then have "F \<le> principal V" |
|
4138 |
unfolding F_def by (intro INF_lower2[of V]) auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4139 |
then have V: "eventually (\<lambda>x. x \<in> V) F" |
57276 | 4140 |
by (auto simp: le_filter_def eventually_principal) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4141 |
have "x \<in> closure V" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4142 |
unfolding closure_iff_nhds_not_empty |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4143 |
proof (intro impI allI) |
53282 | 4144 |
fix S A |
4145 |
assume "open S" "x \<in> S" "S \<subseteq> A" |
|
4146 |
then have "eventually (\<lambda>x. x \<in> A) (nhds x)" |
|
4147 |
by (auto simp: eventually_nhds) |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4148 |
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
|
4149 |
by (auto simp: eventually_inf) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4150 |
with x show "V \<inter> A \<noteq> {}" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4151 |
by (auto simp del: Int_iff simp add: trivial_limit_def) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4152 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4153 |
then have "x \<in> V" |
60420 | 4154 |
using \<open>V \<in> A\<close> A(1) by simp |
53282 | 4155 |
} |
60420 | 4156 |
with \<open>x\<in>U\<close> have "x \<in> U \<inter> \<Inter>A" by auto |
4157 |
with \<open>U \<inter> \<Inter>A = {}\<close> show False by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4158 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4159 |
|
67962 | 4160 |
definition%important "countably_compact U \<longleftrightarrow> |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4161 |
(\<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
|
4162 |
|
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4163 |
lemma countably_compactE: |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4164 |
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
|
4165 |
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
|
4166 |
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
|
4167 |
|
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4168 |
lemma countably_compactI: |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4169 |
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
|
4170 |
shows "countably_compact s" |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4171 |
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
|
4172 |
|
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4173 |
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
|
4174 |
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
|
4175 |
|
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4176 |
lemma countably_compact_imp_compact: |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4177 |
assumes "countably_compact U" |
53282 | 4178 |
and ccover: "countable B" "\<forall>b\<in>B. open b" |
4179 |
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
|
4180 |
shows "compact U" |
60420 | 4181 |
using \<open>countably_compact U\<close> |
53282 | 4182 |
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
|
4183 |
proof safe |
53282 | 4184 |
fix A |
4185 |
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
|
4186 |
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 | 4187 |
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
|
4188 |
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
|
4189 |
unfolding C_def using ccover by auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4190 |
moreover |
50941
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4191 |
have "\<Union>A \<inter> U \<subseteq> \<Union>C" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4192 |
proof safe |
53282 | 4193 |
fix x a |
4194 |
assume "x \<in> U" "x \<in> a" "a \<in> A" |
|
4195 |
with basis[of a x] A obtain b where "b \<in> B" "x \<in> b" "b \<inter> U \<subseteq> a" |
|
4196 |
by blast |
|
60420 | 4197 |
with \<open>a \<in> A\<close> show "x \<in> \<Union>C" |
53282 | 4198 |
unfolding C_def by auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4199 |
qed |
60420 | 4200 |
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
|
4201 |
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
|
4202 |
using * by metis |
53374
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
53291
diff
changeset
|
4203 |
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
|
4204 |
by (auto simp: C_def) |
55522 | 4205 |
then obtain f where "\<forall>t\<in>T. f t \<in> A \<and> t \<inter> U \<subseteq> f t" |
4206 |
unfolding bchoice_iff Bex_def .. |
|
53374
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
53291
diff
changeset
|
4207 |
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
|
4208 |
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
|
4209 |
qed |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4210 |
|
67962 | 4211 |
lemma%important countably_compact_imp_compact_second_countable: |
50941
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4212 |
"countably_compact U \<Longrightarrow> compact (U :: 'a :: second_countable_topology set)" |
67962 | 4213 |
proof%unimportant (rule countably_compact_imp_compact) |
53282 | 4214 |
fix T and x :: 'a |
4215 |
assume "open T" "x \<in> T" |
|
55522 | 4216 |
from topological_basisE[OF is_basis this] obtain b where |
4217 |
"b \<in> (SOME B. countable B \<and> topological_basis B)" "x \<in> b" "b \<subseteq> T" . |
|
53282 | 4218 |
then show "\<exists>b\<in>SOME B. countable B \<and> topological_basis B. x \<in> b \<and> b \<inter> U \<subseteq> T" |
55522 | 4219 |
by blast |
50941
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4220 |
qed (insert countable_basis topological_basis_open[OF is_basis], auto) |
36437 | 4221 |
|
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
|
4222 |
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
|
4223 |
"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
|
4224 |
using countably_compact_imp_compact_second_countable compact_imp_countably_compact by blast |
53282 | 4225 |
|
60420 | 4226 |
subsubsection\<open>Sequential compactness\<close> |
33175 | 4227 |
|
67962 | 4228 |
definition%important seq_compact :: "'a::topological_space set \<Rightarrow> bool" |
53282 | 4229 |
where "seq_compact S \<longleftrightarrow> |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4230 |
(\<forall>f. (\<forall>n. f n \<in> S) \<longrightarrow> (\<exists>l\<in>S. \<exists>r::nat\<Rightarrow>nat. strict_mono r \<and> ((f \<circ> r) \<longlongrightarrow> l) sequentially))" |
33175 | 4231 |
|
54070 | 4232 |
lemma seq_compactI: |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4233 |
assumes "\<And>f. \<forall>n. f n \<in> S \<Longrightarrow> \<exists>l\<in>S. \<exists>r::nat\<Rightarrow>nat. strict_mono r \<and> ((f \<circ> r) \<longlongrightarrow> l) sequentially" |
54070 | 4234 |
shows "seq_compact S" |
4235 |
unfolding seq_compact_def using assms by fast |
|
4236 |
||
4237 |
lemma seq_compactE: |
|
4238 |
assumes "seq_compact S" "\<forall>n. f n \<in> S" |
|
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4239 |
obtains l r where "l \<in> S" "strict_mono (r :: nat \<Rightarrow> nat)" "((f \<circ> r) \<longlongrightarrow> l) sequentially" |
54070 | 4240 |
using assms unfolding seq_compact_def by fast |
4241 |
||
4242 |
lemma closed_sequentially: (* TODO: move upwards *) |
|
61969 | 4243 |
assumes "closed s" and "\<forall>n. f n \<in> s" and "f \<longlonglongrightarrow> l" |
54070 | 4244 |
shows "l \<in> s" |
4245 |
proof (rule ccontr) |
|
4246 |
assume "l \<notin> s" |
|
61969 | 4247 |
with \<open>closed s\<close> and \<open>f \<longlonglongrightarrow> l\<close> have "eventually (\<lambda>n. f n \<in> - s) sequentially" |
54070 | 4248 |
by (fast intro: topological_tendstoD) |
60420 | 4249 |
with \<open>\<forall>n. f n \<in> s\<close> show "False" |
54070 | 4250 |
by simp |
4251 |
qed |
|
4252 |
||
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
|
4253 |
lemma seq_compact_Int_closed: |
54070 | 4254 |
assumes "seq_compact s" and "closed t" |
4255 |
shows "seq_compact (s \<inter> t)" |
|
4256 |
proof (rule seq_compactI) |
|
4257 |
fix f assume "\<forall>n::nat. f n \<in> s \<inter> t" |
|
4258 |
hence "\<forall>n. f n \<in> s" and "\<forall>n. f n \<in> t" |
|
4259 |
by simp_all |
|
60420 | 4260 |
from \<open>seq_compact s\<close> and \<open>\<forall>n. f n \<in> s\<close> |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4261 |
obtain l r where "l \<in> s" and r: "strict_mono r" and l: "(f \<circ> r) \<longlonglongrightarrow> l" |
54070 | 4262 |
by (rule seq_compactE) |
60420 | 4263 |
from \<open>\<forall>n. f n \<in> t\<close> have "\<forall>n. (f \<circ> r) n \<in> t" |
54070 | 4264 |
by simp |
60420 | 4265 |
from \<open>closed t\<close> and this and l have "l \<in> t" |
54070 | 4266 |
by (rule closed_sequentially) |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4267 |
with \<open>l \<in> s\<close> and r and l show "\<exists>l\<in>s \<inter> t. \<exists>r. strict_mono r \<and> (f \<circ> r) \<longlonglongrightarrow> l" |
54070 | 4268 |
by fast |
4269 |
qed |
|
4270 |
||
4271 |
lemma seq_compact_closed_subset: |
|
4272 |
assumes "closed s" and "s \<subseteq> t" and "seq_compact t" |
|
4273 |
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
|
4274 |
using assms seq_compact_Int_closed [of t s] by (simp add: Int_absorb1) |
54070 | 4275 |
|
50941
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4276 |
lemma seq_compact_imp_countably_compact: |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4277 |
fixes U :: "'a :: first_countable_topology set" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4278 |
assumes "seq_compact U" |
50941
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4279 |
shows "countably_compact U" |
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4280 |
proof (safe intro!: countably_compactI) |
52624 | 4281 |
fix A |
4282 |
assume A: "\<forall>a\<in>A. open a" "U \<subseteq> \<Union>A" "countable A" |
|
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4283 |
have subseq: "\<And>X. range X \<subseteq> U \<Longrightarrow> \<exists>r x. x \<in> U \<and> strict_mono (r :: nat \<Rightarrow> nat) \<and> (X \<circ> r) \<longlonglongrightarrow> x" |
60420 | 4284 |
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
|
4285 |
show "\<exists>T\<subseteq>A. finite T \<and> U \<subseteq> \<Union>T" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4286 |
proof cases |
52624 | 4287 |
assume "finite A" |
4288 |
with A show ?thesis by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4289 |
next |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4290 |
assume "infinite A" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4291 |
then have "A \<noteq> {}" by auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4292 |
show ?thesis |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4293 |
proof (rule ccontr) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4294 |
assume "\<not> (\<exists>T\<subseteq>A. finite T \<and> U \<subseteq> \<Union>T)" |
53282 | 4295 |
then have "\<forall>T. \<exists>x. T \<subseteq> A \<and> finite T \<longrightarrow> (x \<in> U - \<Union>T)" |
4296 |
by auto |
|
4297 |
then obtain X' where T: "\<And>T. T \<subseteq> A \<Longrightarrow> finite T \<Longrightarrow> X' T \<in> U - \<Union>T" |
|
4298 |
by metis |
|
63040 | 4299 |
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
|
4300 |
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
|
4301 |
using \<open>A \<noteq> {}\<close> unfolding X_def by (intro T) (auto intro: from_nat_into) |
53282 | 4302 |
then have "range X \<subseteq> U" |
4303 |
by auto |
|
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4304 |
with subseq[of X] obtain r x where "x \<in> U" and r: "strict_mono r" "(X \<circ> r) \<longlonglongrightarrow> x" |
53282 | 4305 |
by auto |
60420 | 4306 |
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
|
4307 |
obtain n where "x \<in> from_nat_into A n" by auto |
60420 | 4308 |
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
|
4309 |
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
|
4310 |
unfolding tendsto_def by (auto simp: comp_def) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4311 |
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
|
4312 |
by (auto simp: eventually_sequentially) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4313 |
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
|
4314 |
by auto |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4315 |
moreover from \<open>strict_mono 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
|
4316 |
by (auto intro!: exI[of _ "max n N"]) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4317 |
ultimately show False |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4318 |
by auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4319 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4320 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4321 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4322 |
|
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4323 |
lemma compact_imp_seq_compact: |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4324 |
fixes U :: "'a :: first_countable_topology set" |
53282 | 4325 |
assumes "compact U" |
4326 |
shows "seq_compact U" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4327 |
unfolding seq_compact_def |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4328 |
proof safe |
52624 | 4329 |
fix X :: "nat \<Rightarrow> 'a" |
4330 |
assume "\<forall>n. X n \<in> U" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4331 |
then have "eventually (\<lambda>x. x \<in> U) (filtermap X sequentially)" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4332 |
by (auto simp: eventually_filtermap) |
52624 | 4333 |
moreover |
4334 |
have "filtermap X sequentially \<noteq> bot" |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4335 |
by (simp add: trivial_limit_def eventually_filtermap) |
52624 | 4336 |
ultimately |
4337 |
obtain x where "x \<in> U" and x: "inf (nhds x) (filtermap X sequentially) \<noteq> bot" (is "?F \<noteq> _") |
|
60420 | 4338 |
using \<open>compact U\<close> by (auto simp: compact_filter) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4339 |
|
55522 | 4340 |
from countable_basis_at_decseq[of x] |
4341 |
obtain A where A: |
|
4342 |
"\<And>i. open (A i)" |
|
4343 |
"\<And>i. x \<in> A i" |
|
4344 |
"\<And>S. open S \<Longrightarrow> x \<in> S \<Longrightarrow> eventually (\<lambda>i. A i \<subseteq> S) sequentially" |
|
4345 |
by blast |
|
63040 | 4346 |
define s where "s n i = (SOME j. i < j \<and> X j \<in> A (Suc n))" for n i |
52624 | 4347 |
{ |
4348 |
fix n i |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4349 |
have "\<exists>a. i < a \<and> X a \<in> A (Suc n)" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4350 |
proof (rule ccontr) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4351 |
assume "\<not> (\<exists>a>i. X a \<in> A (Suc n))" |
53282 | 4352 |
then have "\<And>a. Suc i \<le> a \<Longrightarrow> X a \<notin> A (Suc n)" |
4353 |
by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4354 |
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
|
4355 |
by (auto simp: eventually_filtermap eventually_sequentially) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4356 |
moreover have "eventually (\<lambda>x. x \<in> A (Suc n)) (nhds x)" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4357 |
using A(1,2)[of "Suc n"] by (auto simp: eventually_nhds) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4358 |
ultimately have "eventually (\<lambda>x. False) ?F" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
4359 |
by (auto simp: eventually_inf) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4360 |
with x show False |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4361 |
by (simp add: eventually_False) |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4362 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4363 |
then have "i < s n i" "X (s n i) \<in> A (Suc n)" |
52624 | 4364 |
unfolding s_def by (auto intro: someI2_ex) |
4365 |
} |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4366 |
note s = this |
63040 | 4367 |
define r where "r = rec_nat (s 0 0) s" |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4368 |
have "strict_mono r" |
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4369 |
by (auto simp: r_def s strict_mono_Suc_iff) |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4370 |
moreover |
61969 | 4371 |
have "(\<lambda>n. X (r n)) \<longlonglongrightarrow> x" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4372 |
proof (rule topological_tendstoI) |
52624 | 4373 |
fix S |
4374 |
assume "open S" "x \<in> S" |
|
53282 | 4375 |
with A(3) have "eventually (\<lambda>i. A i \<subseteq> S) sequentially" |
4376 |
by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4377 |
moreover |
52624 | 4378 |
{ |
4379 |
fix i |
|
4380 |
assume "Suc 0 \<le> i" |
|
4381 |
then have "X (r i) \<in> A i" |
|
4382 |
by (cases i) (simp_all add: r_def s) |
|
4383 |
} |
|
4384 |
then have "eventually (\<lambda>i. X (r i) \<in> A i) sequentially" |
|
4385 |
by (auto simp: eventually_sequentially) |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4386 |
ultimately show "eventually (\<lambda>i. X (r i) \<in> S) sequentially" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4387 |
by eventually_elim auto |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4388 |
qed |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4389 |
ultimately show "\<exists>x \<in> U. \<exists>r. strict_mono r \<and> (X \<circ> r) \<longlonglongrightarrow> x" |
60420 | 4390 |
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
|
4391 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4392 |
|
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
|
4393 |
lemma countably_compact_imp_acc_point: |
53291 | 4394 |
assumes "countably_compact s" |
4395 |
and "countable t" |
|
4396 |
and "infinite t" |
|
4397 |
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
|
4398 |
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
|
4399 |
proof (rule ccontr) |
63040 | 4400 |
define C where "C = (\<lambda>F. interior (F \<union> (- t))) ` {F. finite F \<and> F \<subseteq> t }" |
60420 | 4401 |
note \<open>countably_compact s\<close> |
53282 | 4402 |
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
|
4403 |
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
|
4404 |
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
|
4405 |
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
|
4406 |
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
|
4407 |
have "s \<subseteq> \<Union>C" |
60420 | 4408 |
using \<open>t \<subseteq> s\<close> |
62343
24106dc44def
prefer abbreviations for compound operators INFIMUM and SUPREMUM
haftmann
parents:
62131
diff
changeset
|
4409 |
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
|
4410 |
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
|
4411 |
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
|
4412 |
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
|
4413 |
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
|
4414 |
moreover |
60420 | 4415 |
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
|
4416 |
unfolding C_def by (auto intro: countable_Collect_finite_subset) |
55522 | 4417 |
ultimately |
4418 |
obtain D where "D \<subseteq> C" "finite D" "s \<subseteq> \<Union>D" |
|
4419 |
by (rule countably_compactE) |
|
53282 | 4420 |
then obtain E where E: "E \<subseteq> {F. finite F \<and> F \<subseteq> t }" "finite E" |
4421 |
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
|
4422 |
by (metis (lifting) finite_subset_image C_def) |
60420 | 4423 |
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
|
4424 |
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
|
4425 |
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
|
4426 |
using E by auto |
60420 | 4427 |
ultimately show False using \<open>infinite t\<close> |
53282 | 4428 |
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
|
4429 |
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
|
4430 |
|
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
|
4431 |
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
|
4432 |
fixes s :: "'a::first_countable_topology set" |
53291 | 4433 |
assumes "\<forall>t. infinite t \<and> countable t \<and> t \<subseteq> s \<longrightarrow> |
4434 |
(\<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
|
4435 |
shows "seq_compact s" |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4436 |
proof - |
52624 | 4437 |
{ |
4438 |
fix f :: "nat \<Rightarrow> 'a" |
|
4439 |
assume f: "\<forall>n. f n \<in> s" |
|
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4440 |
have "\<exists>l\<in>s. \<exists>r. strict_mono r \<and> ((f \<circ> r) \<longlongrightarrow> l) sequentially" |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4441 |
proof (cases "finite (range f)") |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4442 |
case True |
50941
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4443 |
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
|
4444 |
using pigeonhole_infinite[OF _ True] by auto |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4445 |
then obtain r :: "nat \<Rightarrow> nat" where "strict_mono r" and fr: "\<forall>n. f (r n) = f l" |
50941
3690724028b1
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite
hoelzl
parents:
50940
diff
changeset
|
4446 |
using infinite_enumerate by blast |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4447 |
then have "strict_mono 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
|
4448 |
by (simp add: fr o_def) |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4449 |
with f show "\<exists>l\<in>s. \<exists>r. strict_mono 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
|
4450 |
by auto |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4451 |
next |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4452 |
case False |
53282 | 4453 |
with f assms have "\<exists>x\<in>s. \<forall>U. x\<in>U \<and> open U \<longrightarrow> infinite (U \<inter> range f)" |
4454 |
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
|
4455 |
then obtain l where "l \<in> s" "\<forall>U. l\<in>U \<and> open U \<longrightarrow> infinite (U \<inter> range f)" .. |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4456 |
from this(2) have "\<exists>r. strict_mono 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
|
4457 |
using acc_point_range_imp_convergent_subsequence[of l f] by auto |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4458 |
with \<open>l \<in> s\<close> show "\<exists>l\<in>s. \<exists>r. strict_mono r \<and> ((f \<circ> r) \<longlongrightarrow> l) sequentially" .. |
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4459 |
qed |
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4460 |
} |
53282 | 4461 |
then show ?thesis |
4462 |
unfolding seq_compact_def by auto |
|
50884
2b21b4e2d7cb
differentiate (cover) compactness and sequential compactness
hoelzl
parents:
50883
diff
changeset
|
4463 |
qed |
44075 | 4464 |
|
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
|
4465 |
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
|
4466 |
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
|
4467 |
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
|
4468 |
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
|
4469 |
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
|
4470 |
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
|
4471 |
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
|
4472 |
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
|
4473 |
|
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
|
4474 |
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
|
4475 |
fixes s :: "'a :: first_countable_topology set" |
53291 | 4476 |
shows "seq_compact s \<longleftrightarrow> |
4477 |
(\<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
|
4478 |
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
|
4479 |
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
|
4480 |
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
|
4481 |
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
|
4482 |
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
|
4483 |
|
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
|
4484 |
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
|
4485 |
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
|
4486 |
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
|
4487 |
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
|
4488 |
|
67962 | 4489 |
lemma%important bolzano_weierstrass_imp_seq_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
|
4490 |
fixes s :: "'a::{t1_space, first_countable_topology} set" |
64539 | 4491 |
shows "\<forall>t. infinite t \<and> t \<subseteq> s \<longrightarrow> (\<exists>x \<in> s. x islimpt t) \<Longrightarrow> seq_compact s" |
67962 | 4492 |
by%unimportant (rule countable_acc_point_imp_seq_compact) (metis islimpt_eq_acc_point) |
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
|
4493 |
|
64539 | 4494 |
|
60420 | 4495 |
subsubsection\<open>Totally bounded\<close> |
50940
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4496 |
|
64539 | 4497 |
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 | 4498 |
unfolding Cauchy_def by metis |
4499 |
||
67962 | 4500 |
lemma%important seq_compact_imp_totally_bounded: |
50940
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4501 |
assumes "seq_compact s" |
58184
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4502 |
shows "\<forall>e>0. \<exists>k. finite k \<and> k \<subseteq> s \<and> s \<subseteq> (\<Union>x\<in>k. ball x e)" |
67962 | 4503 |
proof%unimportant - |
58184
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4504 |
{ 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
|
4505 |
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
|
4506 |
have "\<exists>x. \<forall>n::nat. ?Q x n (x n)" |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4507 |
proof (rule dependent_wellorder_choice) |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4508 |
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
|
4509 |
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
|
4510 |
using *[of "x ` {0 ..< n}"] by (auto simp: subset_eq) |
52624 | 4511 |
then obtain z where z:"z\<in>s" "z \<notin> (\<Union>x\<in>x ` {0..<n}. ball x e)" |
4512 |
unfolding subset_eq by auto |
|
58184
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4513 |
show "\<exists>r. ?Q x n r" |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4514 |
using z by auto |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4515 |
qed simp |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4516 |
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
|
4517 |
by blast |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4518 |
then obtain l r where "l \<in> s" and r:"strict_mono r" and "((x \<circ> r) \<longlongrightarrow> l) sequentially" |
58184
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4519 |
using assms by (metis seq_compact_def) |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4520 |
from this(3) have "Cauchy (x \<circ> r)" |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4521 |
using LIMSEQ_imp_Cauchy by auto |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4522 |
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 | 4523 |
unfolding cauchy_def using \<open>e > 0\<close> by blast |
58184
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4524 |
then have False |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4525 |
using x[of "r N" "r (N+1)"] r by (auto simp: strict_mono_def) } |
58184
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4526 |
then show ?thesis |
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4527 |
by metis |
50940
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4528 |
qed |
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4529 |
|
60420 | 4530 |
subsubsection\<open>Heine-Borel theorem\<close> |
50940
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4531 |
|
67962 | 4532 |
lemma%important seq_compact_imp_heine_borel: |
50940
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4533 |
fixes s :: "'a :: metric_space set" |
53282 | 4534 |
assumes "seq_compact s" |
4535 |
shows "compact s" |
|
67962 | 4536 |
proof%unimportant - |
60420 | 4537 |
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
|
4538 |
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 | 4539 |
unfolding choice_iff' .. |
63040 | 4540 |
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
|
4541 |
have "countably_compact s" |
60420 | 4542 |
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
|
4543 |
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
|
4544 |
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
|
4545 |
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
|
4546 |
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
|
4547 |
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
|
4548 |
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
|
4549 |
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
|
4550 |
next |
53282 | 4551 |
fix T x |
4552 |
assume T: "open T" "x \<in> T" and x: "x \<in> s" |
|
4553 |
from openE[OF T] obtain e where "0 < e" "ball x e \<subseteq> T" |
|
4554 |
by auto |
|
4555 |
then have "0 < e / 2" "ball x (e / 2) \<subseteq> T" |
|
4556 |
by auto |
|
60420 | 4557 |
from Rats_dense_in_real[OF \<open>0 < e / 2\<close>] obtain r where "r \<in> \<rat>" "0 < r" "r < e / 2" |
53282 | 4558 |
by auto |
60420 | 4559 |
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
|
4560 |
by auto |
60420 | 4561 |
from \<open>r \<in> \<rat>\<close> \<open>0 < r\<close> \<open>k \<in> f r\<close> have "ball k r \<in> K" |
53282 | 4562 |
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
|
4563 |
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
|
4564 |
proof (rule bexI[rotated], safe) |
53282 | 4565 |
fix y |
4566 |
assume "y \<in> ball k r" |
|
60420 | 4567 |
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
|
4568 |
by (intro dist_triangle_half_r [of k _ e]) (auto simp: dist_commute) |
60420 | 4569 |
with \<open>ball x e \<subseteq> T\<close> show "y \<in> T" |
53282 | 4570 |
by auto |
4571 |
next |
|
4572 |
show "x \<in> ball k r" by fact |
|
4573 |
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
|
4574 |
qed |
50940
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4575 |
qed |
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4576 |
|
67962 | 4577 |
lemma%important compact_eq_seq_compact_metric: |
50940
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4578 |
"compact (s :: 'a::metric_space set) \<longleftrightarrow> seq_compact s" |
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4579 |
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
|
4580 |
|
67962 | 4581 |
lemma%important compact_def: \<comment> \<open>this is the definition of compactness in HOL Light\<close> |
50940
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4582 |
"compact (S :: 'a::metric_space set) \<longleftrightarrow> |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4583 |
(\<forall>f. (\<forall>n. f n \<in> S) \<longrightarrow> (\<exists>l\<in>S. \<exists>r::nat\<Rightarrow>nat. strict_mono r \<and> (f \<circ> r) \<longlonglongrightarrow> l))" |
50940
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4584 |
unfolding compact_eq_seq_compact_metric seq_compact_def by auto |
a7c273a83d27
group compactness-eq-seq-compactness lemmas together
hoelzl
parents:
50939
diff
changeset
|
4585 |
|
60420 | 4586 |
subsubsection \<open>Complete the chain of compactness variants\<close> |
50944 | 4587 |
|
67962 | 4588 |
lemma%important compact_eq_bolzano_weierstrass: |
50944 | 4589 |
fixes s :: "'a::metric_space set" |
53282 | 4590 |
shows "compact s \<longleftrightarrow> (\<forall>t. infinite t \<and> t \<subseteq> s --> (\<exists>x \<in> s. x islimpt t))" |
4591 |
(is "?lhs = ?rhs") |
|
67962 | 4592 |
proof%unimportant |
52624 | 4593 |
assume ?lhs |
53282 | 4594 |
then show ?rhs |
4595 |
using heine_borel_imp_bolzano_weierstrass[of s] by auto |
|
50944 | 4596 |
next |
52624 | 4597 |
assume ?rhs |
53282 | 4598 |
then show ?lhs |
50944 | 4599 |
unfolding compact_eq_seq_compact_metric by (rule bolzano_weierstrass_imp_seq_compact) |
4600 |
qed |
|
4601 |
||
67962 | 4602 |
lemma%important bolzano_weierstrass_imp_bounded: |
53282 | 4603 |
"\<forall>t. infinite t \<and> t \<subseteq> s \<longrightarrow> (\<exists>x \<in> s. x islimpt t) \<Longrightarrow> bounded s" |
50944 | 4604 |
using compact_imp_bounded unfolding compact_eq_bolzano_weierstrass . |
4605 |
||
64773
223b2ebdda79
Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents:
64758
diff
changeset
|
4606 |
|
60420 | 4607 |
subsection \<open>Metric spaces with the Heine-Borel property\<close> |
4608 |
||
4609 |
text \<open> |
|
33175 | 4610 |
A metric space (or topological vector space) is said to have the |
4611 |
Heine-Borel property if every closed and bounded subset is compact. |
|
60420 | 4612 |
\<close> |
33175 | 4613 |
|
67962 | 4614 |
class%important heine_borel = metric_space + |
33175 | 4615 |
assumes bounded_imp_convergent_subsequence: |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4616 |
"bounded (range f) \<Longrightarrow> \<exists>l r. strict_mono (r::nat\<Rightarrow>nat) \<and> ((f \<circ> r) \<longlongrightarrow> l) sequentially" |
33175 | 4617 |
|
67962 | 4618 |
lemma%important bounded_closed_imp_seq_compact: |
33175 | 4619 |
fixes s::"'a::heine_borel set" |
53282 | 4620 |
assumes "bounded s" |
4621 |
and "closed s" |
|
4622 |
shows "seq_compact s" |
|
67962 | 4623 |
proof%unimportant (unfold seq_compact_def, clarify) |
53282 | 4624 |
fix f :: "nat \<Rightarrow> 'a" |
4625 |
assume f: "\<forall>n. f n \<in> s" |
|
60420 | 4626 |
with \<open>bounded s\<close> have "bounded (range f)" |
53282 | 4627 |
by (auto intro: bounded_subset) |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4628 |
obtain l r where r: "strict_mono (r :: nat \<Rightarrow> nat)" and l: "((f \<circ> r) \<longlongrightarrow> l) sequentially" |
60420 | 4629 |
using bounded_imp_convergent_subsequence [OF \<open>bounded (range f)\<close>] by auto |
53282 | 4630 |
from f have fr: "\<forall>n. (f \<circ> r) n \<in> s" |
4631 |
by simp |
|
60420 | 4632 |
have "l \<in> s" using \<open>closed s\<close> fr l |
54070 | 4633 |
by (rule closed_sequentially) |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4634 |
show "\<exists>l\<in>s. \<exists>r. strict_mono r \<and> ((f \<circ> r) \<longlongrightarrow> l) sequentially" |
60420 | 4635 |
using \<open>l \<in> s\<close> r l by blast |
33175 | 4636 |
qed |
4637 |
||
50944 | 4638 |
lemma compact_eq_bounded_closed: |
4639 |
fixes s :: "'a::heine_borel set" |
|
53291 | 4640 |
shows "compact s \<longleftrightarrow> bounded s \<and> closed s" |
4641 |
(is "?lhs = ?rhs") |
|
50944 | 4642 |
proof |
52624 | 4643 |
assume ?lhs |
53282 | 4644 |
then show ?rhs |
52624 | 4645 |
using compact_imp_closed compact_imp_bounded |
4646 |
by blast |
|
50944 | 4647 |
next |
52624 | 4648 |
assume ?rhs |
53282 | 4649 |
then show ?lhs |
52624 | 4650 |
using bounded_closed_imp_seq_compact[of s] |
4651 |
unfolding compact_eq_seq_compact_metric |
|
4652 |
by auto |
|
50944 | 4653 |
qed |
4654 |
||
66793
deabce3ccf1f
new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
66643
diff
changeset
|
4655 |
lemma compact_Inter: |
deabce3ccf1f
new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
66643
diff
changeset
|
4656 |
fixes \<F> :: "'a :: heine_borel set set" |
deabce3ccf1f
new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
66643
diff
changeset
|
4657 |
assumes com: "\<And>S. S \<in> \<F> \<Longrightarrow> compact S" and "\<F> \<noteq> {}" |
deabce3ccf1f
new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
66643
diff
changeset
|
4658 |
shows "compact(\<Inter> \<F>)" |
deabce3ccf1f
new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
66643
diff
changeset
|
4659 |
using assms |
deabce3ccf1f
new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
66643
diff
changeset
|
4660 |
by (meson Inf_lower all_not_in_conv bounded_subset closed_Inter compact_eq_bounded_closed) |
deabce3ccf1f
new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents:
66643
diff
changeset
|
4661 |
|
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62466
diff
changeset
|
4662 |
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
|
4663 |
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
|
4664 |
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
|
4665 |
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
|
4666 |
|
62381
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
4667 |
lemma not_compact_UNIV[simp]: |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
4668 |
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
|
4669 |
shows "~ compact (UNIV::'a set)" |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
4670 |
by (simp add: compact_eq_bounded_closed) |
a6479cb85944
New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents:
62343
diff
changeset
|
4671 |
|
67683
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
4672 |
text\<open>Representing sets as the union of a chain of compact sets.\<close> |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
4673 |
lemma closed_Union_compact_subsets: |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
4674 |
fixes S :: "'a::{heine_borel,real_normed_vector} set" |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
4675 |
assumes "closed S" |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
4676 |
obtains F where "\<And>n. compact(F n)" "\<And>n. F n \<subseteq> S" "\<And>n. F n \<subseteq> F(Suc n)" |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
4677 |
"(\<Union>n. F n) = S" "\<And>K. \<lbrakk>compact K; K \<subseteq> S\<rbrakk> \<Longrightarrow> \<exists>N. \<forall>n \<ge> N. K \<subseteq> F n" |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
4678 |
proof |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
4679 |
show "compact (S \<inter> cball 0 (of_nat n))" for n |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
4680 |
using assms compact_eq_bounded_closed by auto |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
4681 |
next |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
4682 |
show "(\<Union>n. S \<inter> cball 0 (real n)) = S" |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
4683 |
by (auto simp: real_arch_simple) |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
4684 |
next |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
4685 |
fix K :: "'a set" |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
4686 |
assume "compact K" "K \<subseteq> S" |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
4687 |
then obtain N where "K \<subseteq> cball 0 N" |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
4688 |
by (meson bounded_pos mem_cball_0 compact_imp_bounded subsetI) |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
4689 |
then show "\<exists>N. \<forall>n\<ge>N. K \<subseteq> S \<inter> cball 0 (real n)" |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
4690 |
by (metis of_nat_le_iff Int_subset_iff \<open>K \<subseteq> S\<close> real_arch_simple subset_cball subset_trans) |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
4691 |
qed auto |
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
4692 |
|
67962 | 4693 |
instance%important real :: heine_borel |
4694 |
proof%unimportant |
|
50998 | 4695 |
fix f :: "nat \<Rightarrow> real" |
4696 |
assume f: "bounded (range f)" |
|
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4697 |
obtain r :: "nat \<Rightarrow> nat" where r: "strict_mono r" "monoseq (f \<circ> r)" |
50972 | 4698 |
unfolding comp_def by (metis seq_monosub) |
4699 |
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
|
4700 |
unfolding Bseq_eq_bounded using f by (force intro: bounded_subset) |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4701 |
with r show "\<exists>l r. strict_mono r \<and> (f \<circ> r) \<longlonglongrightarrow> l" |
50972 | 4702 |
using Bseq_monoseq_convergent[of "f \<circ> r"] by (auto simp: convergent_def) |
33175 | 4703 |
qed |
4704 |
||
62127 | 4705 |
lemma compact_lemma_general: |
4706 |
fixes f :: "nat \<Rightarrow> 'a" |
|
4707 |
fixes proj::"'a \<Rightarrow> 'b \<Rightarrow> 'c::heine_borel" (infixl "proj" 60) |
|
4708 |
fixes unproj:: "('b \<Rightarrow> 'c) \<Rightarrow> 'a" |
|
4709 |
assumes finite_basis: "finite basis" |
|
4710 |
assumes bounded_proj: "\<And>k. k \<in> basis \<Longrightarrow> bounded ((\<lambda>x. x proj k) ` range f)" |
|
4711 |
assumes proj_unproj: "\<And>e k. k \<in> basis \<Longrightarrow> (unproj e) proj k = e k" |
|
4712 |
assumes unproj_proj: "\<And>x. unproj (\<lambda>k. x proj k) = x" |
|
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4713 |
shows "\<forall>d\<subseteq>basis. \<exists>l::'a. \<exists> r::nat\<Rightarrow>nat. |
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4714 |
strict_mono 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
|
4715 |
proof safe |
62127 | 4716 |
fix d :: "'b set" |
4717 |
assume d: "d \<subseteq> basis" |
|
4718 |
with finite_basis have "finite d" |
|
53282 | 4719 |
by (blast intro: finite_subset) |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4720 |
from this d show "\<exists>l::'a. \<exists>r::nat\<Rightarrow>nat. strict_mono r \<and> |
62127 | 4721 |
(\<forall>e>0. eventually (\<lambda>n. \<forall>i\<in>d. dist (f (r n) proj i) (l proj i) < e) sequentially)" |
52624 | 4722 |
proof (induct d) |
4723 |
case empty |
|
53282 | 4724 |
then show ?case |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4725 |
unfolding strict_mono_def by auto |
52624 | 4726 |
next |
4727 |
case (insert k d) |
|
62127 | 4728 |
have k[intro]: "k \<in> basis" |
53282 | 4729 |
using insert by auto |
62127 | 4730 |
have s': "bounded ((\<lambda>x. x proj k) ` range f)" |
4731 |
using k |
|
4732 |
by (rule bounded_proj) |
|
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4733 |
obtain l1::"'a" and r1 where r1: "strict_mono r1" |
62127 | 4734 |
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
|
4735 |
using insert(3) using insert(4) by auto |
62127 | 4736 |
have f': "\<forall>n. f (r1 n) proj k \<in> (\<lambda>x. x proj k) ` range f" |
53282 | 4737 |
by simp |
62127 | 4738 |
have "bounded (range (\<lambda>i. f (r1 i) proj k))" |
50998 | 4739 |
by (metis (lifting) bounded_subset f' image_subsetI s') |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4740 |
then obtain l2 r2 where r2:"strict_mono r2" and lr2:"((\<lambda>i. f (r1 (r2 i)) proj k) \<longlongrightarrow> l2) sequentially" |
62127 | 4741 |
using bounded_imp_convergent_subsequence[of "\<lambda>i. f (r1 i) proj k"] |
53282 | 4742 |
by (auto simp: o_def) |
63040 | 4743 |
define r where "r = r1 \<circ> r2" |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4744 |
have r:"strict_mono r" |
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4745 |
using r1 and r2 unfolding r_def o_def strict_mono_def by auto |
33175 | 4746 |
moreover |
63040 | 4747 |
define l where "l = unproj (\<lambda>i. if i = k then l2 else l1 proj i)" |
52624 | 4748 |
{ |
4749 |
fix e::real |
|
53282 | 4750 |
assume "e > 0" |
62127 | 4751 |
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 | 4752 |
by blast |
62127 | 4753 |
from lr2 \<open>e > 0\<close> have N2:"eventually (\<lambda>n. dist (f (r1 (r2 n)) proj k) l2 < e) sequentially" |
52624 | 4754 |
by (rule tendstoD) |
62127 | 4755 |
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 | 4756 |
by (rule eventually_subseq) |
62127 | 4757 |
have "eventually (\<lambda>n. \<forall>i\<in>(insert k d). dist (f (r n) proj i) (l proj i) < e) sequentially" |
53282 | 4758 |
using N1' N2 |
62127 | 4759 |
by eventually_elim (insert insert.prems, auto simp: l_def r_def o_def proj_unproj) |
33175 | 4760 |
} |
4761 |
ultimately show ?case by auto |
|
4762 |
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
|
4763 |
qed |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
37452
diff
changeset
|
4764 |
|
62127 | 4765 |
lemma compact_lemma: |
4766 |
fixes f :: "nat \<Rightarrow> 'a::euclidean_space" |
|
4767 |
assumes "bounded (range f)" |
|
4768 |
shows "\<forall>d\<subseteq>Basis. \<exists>l::'a. \<exists> r. |
|
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4769 |
strict_mono r \<and> (\<forall>e>0. eventually (\<lambda>n. \<forall>i\<in>d. dist (f (r n) \<bullet> i) (l \<bullet> i) < e) sequentially)" |
62127 | 4770 |
by (rule compact_lemma_general[where unproj="\<lambda>e. \<Sum>i\<in>Basis. e i *\<^sub>R i"]) |
4771 |
(auto intro!: assms bounded_linear_inner_left bounded_linear_image |
|
4772 |
simp: euclidean_representation) |
|
4773 |
||
67962 | 4774 |
instance%important euclidean_space \<subseteq> heine_borel |
4775 |
proof%unimportant |
|
50998 | 4776 |
fix f :: "nat \<Rightarrow> 'a" |
4777 |
assume f: "bounded (range f)" |
|
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4778 |
then obtain l::'a and r where r: "strict_mono 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
|
4779 |
and l: "\<forall>e>0. eventually (\<lambda>n. \<forall>i\<in>Basis. dist (f (r n) \<bullet> i) (l \<bullet> i) < e) sequentially" |
50998 | 4780 |
using compact_lemma [OF f] by blast |
52624 | 4781 |
{ |
4782 |
fix e::real |
|
53282 | 4783 |
assume "e > 0" |
56541 | 4784 |
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
|
4785 |
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 | 4786 |
by simp |
4787 |
moreover |
|
52624 | 4788 |
{ |
4789 |
fix n |
|
4790 |
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
|
4791 |
have "dist (f (r n)) l \<le> (\<Sum>i\<in>Basis. dist (f (r n) \<bullet> i) (l \<bullet> i))" |
52624 | 4792 |
apply (subst euclidean_dist_l2) |
4793 |
using zero_le_dist |
|
67155 | 4794 |
apply (rule L2_set_le_sum) |
53282 | 4795 |
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
|
4796 |
also have "\<dots> < (\<Sum>i\<in>(Basis::'a set). e / (real_of_nat DIM('a)))" |
64267 | 4797 |
apply (rule sum_strict_mono) |
52624 | 4798 |
using n |
53282 | 4799 |
apply auto |
4800 |
done |
|
4801 |
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
|
4802 |
by auto |
33175 | 4803 |
} |
4804 |
ultimately have "eventually (\<lambda>n. dist (f (r n)) l < e) sequentially" |
|
61810 | 4805 |
by (rule eventually_mono) |
33175 | 4806 |
} |
61973 | 4807 |
then have *: "((f \<circ> r) \<longlongrightarrow> l) sequentially" |
52624 | 4808 |
unfolding o_def tendsto_iff by simp |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4809 |
with r show "\<exists>l r. strict_mono r \<and> ((f \<circ> r) \<longlongrightarrow> l) sequentially" |
52624 | 4810 |
by auto |
33175 | 4811 |
qed |
4812 |
||
4813 |
lemma bounded_fst: "bounded s \<Longrightarrow> bounded (fst ` s)" |
|
52624 | 4814 |
unfolding bounded_def |
55775 | 4815 |
by (metis (erased, hide_lams) dist_fst_le image_iff order_trans) |
33175 | 4816 |
|
4817 |
lemma bounded_snd: "bounded s \<Longrightarrow> bounded (snd ` s)" |
|
52624 | 4818 |
unfolding bounded_def |
55775 | 4819 |
by (metis (no_types, hide_lams) dist_snd_le image_iff order.trans) |
33175 | 4820 |
|
67962 | 4821 |
instance%important prod :: (heine_borel, heine_borel) heine_borel |
4822 |
proof%unimportant |
|
50998 | 4823 |
fix f :: "nat \<Rightarrow> 'a \<times> 'b" |
4824 |
assume f: "bounded (range f)" |
|
56154
f0a927235162
more complete set of lemmas wrt. image and composition
haftmann
parents:
56073
diff
changeset
|
4825 |
then have "bounded (fst ` range f)" |
f0a927235162
more complete set of lemmas wrt. image and composition
haftmann
parents:
56073
diff
changeset
|
4826 |
by (rule bounded_fst) |
f0a927235162
more complete set of lemmas wrt. image and composition
haftmann
parents:
56073
diff
changeset
|
4827 |
then have s1: "bounded (range (fst \<circ> f))" |
f0a927235162
more complete set of lemmas wrt. image and composition
haftmann
parents:
56073
diff
changeset
|
4828 |
by (simp add: image_comp) |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4829 |
obtain l1 r1 where r1: "strict_mono r1" and l1: "(\<lambda>n. fst (f (r1 n))) \<longlonglongrightarrow> l1" |
50998 | 4830 |
using bounded_imp_convergent_subsequence [OF s1] unfolding o_def by fast |
4831 |
from f have s2: "bounded (range (snd \<circ> f \<circ> r1))" |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
4832 |
by (auto simp: image_comp intro: bounded_snd bounded_subset) |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4833 |
obtain l2 r2 where r2: "strict_mono r2" and l2: "((\<lambda>n. snd (f (r1 (r2 n)))) \<longlongrightarrow> l2) sequentially" |
50998 | 4834 |
using bounded_imp_convergent_subsequence [OF s2] |
33175 | 4835 |
unfolding o_def by fast |
61973 | 4836 |
have l1': "((\<lambda>n. fst (f (r1 (r2 n)))) \<longlongrightarrow> l1) sequentially" |
50972 | 4837 |
using LIMSEQ_subseq_LIMSEQ [OF l1 r2] unfolding o_def . |
61973 | 4838 |
have l: "((f \<circ> (r1 \<circ> r2)) \<longlongrightarrow> (l1, l2)) sequentially" |
33175 | 4839 |
using tendsto_Pair [OF l1' l2] unfolding o_def by simp |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4840 |
have r: "strict_mono (r1 \<circ> r2)" |
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4841 |
using r1 r2 unfolding strict_mono_def by simp |
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4842 |
show "\<exists>l r. strict_mono r \<and> ((f \<circ> r) \<longlongrightarrow> l) sequentially" |
33175 | 4843 |
using l r by fast |
4844 |
qed |
|
64910 | 4845 |
|
60420 | 4846 |
subsubsection \<open>Completeness\<close> |
33175 | 4847 |
|
67962 | 4848 |
lemma%important (in metric_space) completeI: |
61969 | 4849 |
assumes "\<And>f. \<forall>n. f n \<in> s \<Longrightarrow> Cauchy f \<Longrightarrow> \<exists>l\<in>s. f \<longlonglongrightarrow> l" |
54070 | 4850 |
shows "complete s" |
4851 |
using assms unfolding complete_def by fast |
|
4852 |
||
67962 | 4853 |
lemma%important (in metric_space) completeE: |
54070 | 4854 |
assumes "complete s" and "\<forall>n. f n \<in> s" and "Cauchy f" |
61969 | 4855 |
obtains l where "l \<in> s" and "f \<longlonglongrightarrow> l" |
54070 | 4856 |
using assms unfolding complete_def by fast |
4857 |
||
62101 | 4858 |
(* TODO: generalize to uniform spaces *) |
52624 | 4859 |
lemma compact_imp_complete: |
62101 | 4860 |
fixes s :: "'a::metric_space set" |
52624 | 4861 |
assumes "compact s" |
4862 |
shows "complete s" |
|
4863 |
proof - |
|
4864 |
{ |
|
4865 |
fix f |
|
4866 |
assume as: "(\<forall>n::nat. f n \<in> s)" "Cauchy f" |
|
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4867 |
from as(1) obtain l r where lr: "l\<in>s" "strict_mono r" "(f \<circ> r) \<longlonglongrightarrow> l" |
50971 | 4868 |
using assms unfolding compact_def by blast |
4869 |
||
4870 |
note lr' = seq_suble [OF lr(2)] |
|
52624 | 4871 |
{ |
53282 | 4872 |
fix e :: real |
4873 |
assume "e > 0" |
|
52624 | 4874 |
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" |
4875 |
unfolding cauchy_def |
|
60420 | 4876 |
using \<open>e > 0\<close> |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
4877 |
apply (erule_tac x="e/2" in allE, auto) |
52624 | 4878 |
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
|
4879 |
from lr(3)[unfolded lim_sequentially, THEN spec[where x="e/2"]] |
53282 | 4880 |
obtain M where M:"\<forall>n\<ge>M. dist ((f \<circ> r) n) l < e/2" |
60420 | 4881 |
using \<open>e > 0\<close> by auto |
52624 | 4882 |
{ |
53282 | 4883 |
fix n :: nat |
4884 |
assume n: "n \<ge> max N M" |
|
4885 |
have "dist ((f \<circ> r) n) l < e/2" |
|
4886 |
using n M by auto |
|
4887 |
moreover have "r n \<ge> N" |
|
4888 |
using lr'[of n] n by auto |
|
4889 |
then have "dist (f n) ((f \<circ> r) n) < e / 2" |
|
4890 |
using N and n by auto |
|
52624 | 4891 |
ultimately have "dist (f n) l < e" |
53282 | 4892 |
using dist_triangle_half_r[of "f (r n)" "f n" e l] |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
4893 |
by (auto simp: dist_commute) |
52624 | 4894 |
} |
53282 | 4895 |
then have "\<exists>N. \<forall>n\<ge>N. dist (f n) l < e" by blast |
52624 | 4896 |
} |
61973 | 4897 |
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
|
4898 |
unfolding lim_sequentially by auto |
52624 | 4899 |
} |
53282 | 4900 |
then show ?thesis unfolding complete_def by auto |
50971 | 4901 |
qed |
4902 |
||
67962 | 4903 |
lemma%important compact_eq_totally_bounded: |
58184
db1381d811ab
cleanup Wfrec; introduce dependent_wf/wellorder_choice
hoelzl
parents:
57865
diff
changeset
|
4904 |
"compact s \<longleftrightarrow> complete s \<and> (\<forall>e>0. \<exists>k. finite k \<and> s \<subseteq> (\<Union>x\<in>k. ball x e))" |
50971 | 4905 |
(is "_ \<longleftrightarrow> ?rhs") |
67962 | 4906 |
proof%unimportant |
50971 | 4907 |
assume assms: "?rhs" |
4908 |
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)" |
|
4909 |
by (auto simp: choice_iff') |
|
4910 |
||
4911 |
show "compact s" |
|
4912 |
proof cases |
|
53282 | 4913 |
assume "s = {}" |
4914 |
then show "compact s" by (simp add: compact_def) |
|
50971 | 4915 |
next |
4916 |
assume "s \<noteq> {}" |
|
4917 |
show ?thesis |
|
4918 |
unfolding compact_def |
|
4919 |
proof safe |
|
53282 | 4920 |
fix f :: "nat \<Rightarrow> 'a" |
4921 |
assume f: "\<forall>n. f n \<in> s" |
|
4922 |
||
63040 | 4923 |
define e where "e n = 1 / (2 * Suc n)" for n |
50971 | 4924 |
then have [simp]: "\<And>n. 0 < e n" by auto |
63040 | 4925 |
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 | 4926 |
{ |
4927 |
fix n U |
|
4928 |
assume "infinite {n. f n \<in> U}" |
|
50971 | 4929 |
then have "\<exists>b\<in>k (e n). infinite {i\<in>{n. f n \<in> U}. f i \<in> ball b (e n)}" |
4930 |
using k f by (intro pigeonhole_infinite_rel) (auto simp: subset_eq) |
|
55522 | 4931 |
then obtain a where |
4932 |
"a \<in> k (e n)" |
|
4933 |
"infinite {i \<in> {n. f n \<in> U}. f i \<in> ball a (e n)}" .. |
|
50971 | 4934 |
then have "\<exists>b. infinite {i. f i \<in> b} \<and> (\<exists>x. b \<subseteq> ball x (e n) \<inter> U)" |
4935 |
by (intro exI[of _ "ball a (e n) \<inter> U"] exI[of _ a]) (auto simp: ac_simps) |
|
4936 |
from someI_ex[OF this] |
|
4937 |
have "infinite {i. f i \<in> B n U}" "\<exists>x. B n U \<subseteq> ball x (e n) \<inter> U" |
|
53282 | 4938 |
unfolding B_def by auto |
4939 |
} |
|
50971 | 4940 |
note B = this |
4941 |
||
63040 | 4942 |
define F where "F = rec_nat (B 0 UNIV) B" |
53282 | 4943 |
{ |
4944 |
fix n |
|
4945 |
have "infinite {i. f i \<in> F n}" |
|
4946 |
by (induct n) (auto simp: F_def B) |
|
4947 |
} |
|
50971 | 4948 |
then have F: "\<And>n. \<exists>x. F (Suc n) \<subseteq> ball x (e n) \<inter> F n" |
4949 |
using B by (simp add: F_def) |
|
4950 |
then have F_dec: "\<And>m n. m \<le> n \<Longrightarrow> F n \<subseteq> F m" |
|
4951 |
using decseq_SucI[of F] by (auto simp: decseq_def) |
|
4952 |
||
4953 |
obtain sel where sel: "\<And>k i. i < sel k i" "\<And>k i. f (sel k i) \<in> F k" |
|
4954 |
proof (atomize_elim, unfold all_conj_distrib[symmetric], intro choice allI) |
|
4955 |
fix k i |
|
4956 |
have "infinite ({n. f n \<in> F k} - {.. i})" |
|
60420 | 4957 |
using \<open>infinite {n. f n \<in> F k}\<close> by auto |
50971 | 4958 |
from infinite_imp_nonempty[OF this] |
4959 |
show "\<exists>x>i. f x \<in> F k" |
|
4960 |
by (simp add: set_eq_iff not_le conj_commute) |
|
4961 |
qed |
|
4962 |
||
63040 | 4963 |
define t where "t = rec_nat (sel 0 0) (\<lambda>n i. sel (Suc n) i)" |
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4964 |
have "strict_mono t" |
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4965 |
unfolding strict_mono_Suc_iff by (simp add: t_def sel) |
50971 | 4966 |
moreover have "\<forall>i. (f \<circ> t) i \<in> s" |
4967 |
using f by auto |
|
4968 |
moreover |
|
53282 | 4969 |
{ |
4970 |
fix n |
|
4971 |
have "(f \<circ> t) n \<in> F n" |
|
4972 |
by (cases n) (simp_all add: t_def sel) |
|
4973 |
} |
|
50971 | 4974 |
note t = this |
4975 |
||
4976 |
have "Cauchy (f \<circ> t)" |
|
4977 |
proof (safe intro!: metric_CauchyI exI elim!: nat_approx_posE) |
|
53282 | 4978 |
fix r :: real and N n m |
4979 |
assume "1 / Suc N < r" "Suc N \<le> n" "Suc N \<le> m" |
|
50971 | 4980 |
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
|
4981 |
using F_dec t by (auto simp: e_def field_simps of_nat_Suc) |
50971 | 4982 |
with F[of N] obtain x where "dist x ((f \<circ> t) n) < e N" "dist x ((f \<circ> t) m) < e N" |
4983 |
by (auto simp: subset_eq) |
|
60420 | 4984 |
with dist_triangle[of "(f \<circ> t) m" "(f \<circ> t) n" x] \<open>2 * e N < r\<close> |
50971 | 4985 |
show "dist ((f \<circ> t) m) ((f \<circ> t) n) < r" |
4986 |
by (simp add: dist_commute) |
|
4987 |
qed |
|
4988 |
||
66447
a1f5c5c26fa6
Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents:
66408
diff
changeset
|
4989 |
ultimately show "\<exists>l\<in>s. \<exists>r. strict_mono r \<and> (f \<circ> r) \<longlonglongrightarrow> l" |
50971 | 4990 |
using assms unfolding complete_def by blast |
4991 |
qed |
|
4992 |
qed |
|
4993 |
qed (metis compact_imp_complete compact_imp_seq_compact seq_compact_imp_totally_bounded) |
|
33175 | 4994 |
|
53282 | 4995 |
lemma cauchy_imp_bounded: |
4996 |
assumes "Cauchy s" |
|
4997 |
shows "bounded (range s)" |
|
4998 |
proof - |
|
4999 |
from assms obtain N :: nat where "\<forall>m n. N \<le> m \<and> N \<le> n \<longrightarrow> dist (s m) (s n) < 1" |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
5000 |
unfolding cauchy_def by force |
53282 | 5001 |
then have N:"\<forall>n. N \<le> n \<longrightarrow> dist (s N) (s n) < 1" by auto |
33175 | 5002 |
moreover |
52624 | 5003 |
have "bounded (s ` {0..N})" |
5004 |
using finite_imp_bounded[of "s ` {1..N}"] by auto |
|
33175 | 5005 |
then obtain a where a:"\<forall>x\<in>s ` {0..N}. dist (s N) x \<le> a" |
5006 |
unfolding bounded_any_center [where a="s N"] by auto |
|
5007 |
ultimately show "?thesis" |
|
5008 |
unfolding bounded_any_center [where a="s N"] |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
5009 |
apply (rule_tac x="max a 1" in exI, auto) |
52624 | 5010 |
apply (erule_tac x=y in allE) |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
5011 |
apply (erule_tac x=y in ballE, auto) |
52624 | 5012 |
done |
33175 | 5013 |
qed |
5014 |
||
5015 |
instance heine_borel < complete_space |
|
5016 |
proof |
|
5017 |
fix f :: "nat \<Rightarrow> 'a" assume "Cauchy f" |
|
53282 | 5018 |
then have "bounded (range f)" |
34104 | 5019 |
by (rule cauchy_imp_bounded) |
53282 | 5020 |
then have "compact (closure (range f))" |
50971 | 5021 |
unfolding compact_eq_bounded_closed by auto |
53282 | 5022 |
then have "complete (closure (range f))" |
50971 | 5023 |
by (rule compact_imp_complete) |
33175 | 5024 |
moreover have "\<forall>n. f n \<in> closure (range f)" |
5025 |
using closure_subset [of "range f"] by auto |
|
61973 | 5026 |
ultimately have "\<exists>l\<in>closure (range f). (f \<longlongrightarrow> l) sequentially" |
60420 | 5027 |
using \<open>Cauchy f\<close> unfolding complete_def by auto |
33175 | 5028 |
then show "convergent f" |
36660
1cc4ab4b7ff7
make (X ----> L) an abbreviation for (X ---> L) sequentially
huffman
parents:
36659
diff
changeset
|
5029 |
unfolding convergent_def by auto |
33175 | 5030 |
qed |
5031 |
||
44632 | 5032 |
instance euclidean_space \<subseteq> banach .. |
5033 |
||
54070 | 5034 |
lemma complete_UNIV: "complete (UNIV :: ('a::complete_space) set)" |
5035 |
proof (rule completeI) |
|
5036 |
fix f :: "nat \<Rightarrow> 'a" assume "Cauchy f" |
|
53282 | 5037 |
then have "convergent f" by (rule Cauchy_convergent) |
61969 | 5038 |
then show "\<exists>l\<in>UNIV. f \<longlonglongrightarrow> l" unfolding convergent_def by simp |
53282 | 5039 |
qed |
5040 |
||
5041 |
lemma complete_imp_closed: |
|
64287 | 5042 |
fixes S :: "'a::metric_space set" |
5043 |
assumes "complete S" |
|
5044 |
shows "closed S" |
|
54070 | 5045 |
proof (unfold closed_sequential_limits, clarify) |
64287 | 5046 |
fix f x assume "\<forall>n. f n \<in> S" and "f \<longlonglongrightarrow> x" |
61969 | 5047 |
from \<open>f \<longlonglongrightarrow> x\<close> have "Cauchy f" |
54070 | 5048 |
by (rule LIMSEQ_imp_Cauchy) |
64287 | 5049 |
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 | 5050 |
by (rule completeE) |
61969 | 5051 |
from \<open>f \<longlonglongrightarrow> x\<close> and \<open>f \<longlonglongrightarrow> l\<close> have "x = l" |
54070 | 5052 |
by (rule LIMSEQ_unique) |
64287 | 5053 |
with \<open>l \<in> S\<close> show "x \<in> S" |
54070 | 5054 |
by simp |
5055 |
qed |
|
5056 |
||
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
|
5057 |
lemma complete_Int_closed: |
64287 | 5058 |
fixes S :: "'a::metric_space set" |
5059 |
assumes "complete S" and "closed t" |
|
5060 |
shows "complete (S \<inter> t)" |
|
54070 | 5061 |
proof (rule completeI) |
64287 | 5062 |
fix f assume "\<forall>n. f n \<in> S \<inter> t" and "Cauchy f" |
5063 |
then have "\<forall>n. f n \<in> S" and "\<forall>n. f n \<in> t" |
|
54070 | 5064 |
by simp_all |
64287 | 5065 |
from \<open>complete S\<close> obtain l where "l \<in> S" and "f \<longlonglongrightarrow> l" |
5066 |
using \<open>\<forall>n. f n \<in> S\<close> and \<open>Cauchy f\<close> by (rule completeE) |
|
61969 | 5067 |
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 | 5068 |
by (rule closed_sequentially) |
64287 | 5069 |
with \<open>l \<in> S\<close> and \<open>f \<longlonglongrightarrow> l\<close> show "\<exists>l\<in>S \<inter> t. f \<longlonglongrightarrow> l" |
54070 | 5070 |
by fast |
5071 |
qed |
|
5072 |
||
5073 |
lemma complete_closed_subset: |
|
64287 | 5074 |
fixes S :: "'a::metric_space set" |
5075 |
assumes "closed S" and "S \<subseteq> t" and "complete t" |
|
5076 |
shows "complete S" |
|
5077 |
using assms complete_Int_closed [of t S] by (simp add: Int_absorb1) |
|
33175 | 5078 |
|
5079 |
lemma complete_eq_closed: |
|
64287 | 5080 |
fixes S :: "('a::complete_space) set" |
5081 |
shows "complete S \<longleftrightarrow> closed S" |
|
33175 | 5082 |
proof |
64287 | 5083 |
assume "closed S" then show "complete S" |
54070 | 5084 |
using subset_UNIV complete_UNIV by (rule complete_closed_subset) |
33175 | 5085 |
next |
64287 | 5086 |
assume "complete S" then show "closed S" |
54070 | 5087 |
by (rule complete_imp_closed) |
33175 | 5088 |
qed |
5089 |
||
64287 | 5090 |
lemma convergent_eq_Cauchy: |
5091 |
fixes S :: "nat \<Rightarrow> 'a::complete_space" |
|
5092 |
shows "(\<exists>l. (S \<longlongrightarrow> l) sequentially) \<longleftrightarrow> Cauchy S" |
|
44632 | 5093 |
unfolding Cauchy_convergent_iff convergent_def .. |
33175 | 5094 |
|
5095 |
lemma convergent_imp_bounded: |
|
64287 | 5096 |
fixes S :: "nat \<Rightarrow> 'a::metric_space" |
5097 |
shows "(S \<longlongrightarrow> l) sequentially \<Longrightarrow> bounded (range S)" |
|
50939
ae7cd20ed118
replace convergent_imp_cauchy by LIMSEQ_imp_Cauchy
hoelzl
parents:
50938
diff
changeset
|
5098 |
by (intro cauchy_imp_bounded LIMSEQ_imp_Cauchy) |
33175 | 5099 |
|
5100 |
lemma frontier_subset_compact: |
|
64287 | 5101 |
fixes S :: "'a::heine_borel set" |
5102 |
shows "compact S \<Longrightarrow> frontier S \<subseteq> S" |
|
33175 | 5103 |
using frontier_subset_closed compact_eq_bounded_closed |
5104 |
by blast |
|
63075
60a42a4166af
lemmas about dimension, hyperplanes, span, etc.
paulson <lp15@cam.ac.uk>
parents:
63040
diff
changeset
|
5105 |
|
60420 | 5106 |
subsection \<open>Continuity\<close> |
5107 |
||
5108 |
text\<open>Derive the epsilon-delta forms, which we often use as "definitions"\<close> |
|
33175 | 5109 |
|
67962 | 5110 |
lemma%important continuous_within_eps_delta: |
33175 | 5111 |
"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)" |
67683
817944aeac3f
Lots of new material about matrices, etc.
paulson <lp15@cam.ac.uk>
parents:
67613
diff
changeset
|
5112 |
unfolding continuous_within and Lim_within by fastforce |
53282 | 5113 |
|
62131
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5114 |
corollary continuous_at_eps_delta: |
53282 | 5115 |
"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 | 5116 |
using continuous_within_eps_delta [of x UNIV f] by simp |
33175 | 5117 |
|
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
5118 |
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
|
5119 |
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
|
5120 |
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
|
5121 |
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
|
5122 |
apply (simp add: greaterThan_def dist_real_def continuous_within Lim_within_le) |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
5123 |
apply (intro all_cong ex_cong, safe) |
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
5124 |
apply (erule_tac x="a + d" in allE, simp) |
57448
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5125 |
apply (simp add: nondecF field_simps) |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
5126 |
apply (drule nondecF, simp) |
57448
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5127 |
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
|
5128 |
|
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
5129 |
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
|
5130 |
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
|
5131 |
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
|
5132 |
apply (simp add: lessThan_def dist_real_def continuous_within Lim_within_le) |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
5133 |
apply (intro all_cong ex_cong, safe) |
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
5134 |
apply (erule_tac x="a - d" in allE, simp) |
57448
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5135 |
apply (simp add: nondecF field_simps) |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
5136 |
apply (cut_tac x="a - d" and y=x in nondecF, simp_all) |
57448
159e45728ceb
more equalities of topological filters; strengthen dependent_nat_choice; tuned a couple of proofs
hoelzl
parents:
57447
diff
changeset
|
5137 |
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
|
5138 |
|
60420 | 5139 |
text\<open>Versions in terms of open balls.\<close> |
33175 | 5140 |
|
5141 |
lemma continuous_within_ball: |
|
53282 | 5142 |
"continuous (at x within s) f \<longleftrightarrow> |
5143 |
(\<forall>e > 0. \<exists>d > 0. f ` (ball x d \<inter> s) \<subseteq> ball (f x) e)" |
|
5144 |
(is "?lhs = ?rhs") |
|
33175 | 5145 |
proof |
5146 |
assume ?lhs |
|
53282 | 5147 |
{ |
5148 |
fix e :: real |
|
5149 |
assume "e > 0" |
|
33175 | 5150 |
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 | 5151 |
using \<open>?lhs\<close>[unfolded continuous_within Lim_within] by auto |
53282 | 5152 |
{ |
5153 |
fix y |
|
5154 |
assume "y \<in> f ` (ball x d \<inter> s)" |
|
5155 |
then have "y \<in> ball (f x) e" |
|
5156 |
using d(2) |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
5157 |
apply (auto simp: dist_commute) |
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
5158 |
apply (erule_tac x=xa in ballE, auto) |
60420 | 5159 |
using \<open>e > 0\<close> |
53282 | 5160 |
apply auto |
5161 |
done |
|
33175 | 5162 |
} |
53282 | 5163 |
then have "\<exists>d>0. f ` (ball x d \<inter> s) \<subseteq> ball (f x) e" |
60420 | 5164 |
using \<open>d > 0\<close> |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
5165 |
unfolding subset_eq ball_def by (auto simp: dist_commute) |
53282 | 5166 |
} |
5167 |
then show ?rhs by auto |
|
33175 | 5168 |
next |
53282 | 5169 |
assume ?rhs |
5170 |
then show ?lhs |
|
5171 |
unfolding continuous_within Lim_within ball_def subset_eq |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
5172 |
apply (auto simp: dist_commute) |
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
5173 |
apply (erule_tac x=e in allE, auto) |
53282 | 5174 |
done |
33175 | 5175 |
qed |
5176 |
||
5177 |
lemma continuous_at_ball: |
|
5178 |
"continuous (at x) f \<longleftrightarrow> (\<forall>e>0. \<exists>d>0. f ` (ball x d) \<subseteq> ball (f x) e)" (is "?lhs = ?rhs") |
|
5179 |
proof |
|
53282 | 5180 |
assume ?lhs |
5181 |
then show ?rhs |
|
5182 |
unfolding continuous_at Lim_at subset_eq Ball_def Bex_def image_iff mem_ball |
|
5183 |
apply auto |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
5184 |
apply (erule_tac x=e in allE, auto) |
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
5185 |
apply (rule_tac x=d in exI, auto) |
53282 | 5186 |
apply (erule_tac x=xa in allE) |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
5187 |
apply (auto simp: dist_commute) |
53282 | 5188 |
done |
33175 | 5189 |
next |
53282 | 5190 |
assume ?rhs |
5191 |
then show ?lhs |
|
5192 |
unfolding continuous_at Lim_at subset_eq Ball_def Bex_def image_iff mem_ball |
|
5193 |
apply auto |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
5194 |
apply (erule_tac x=e in allE, auto) |
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
5195 |
apply (rule_tac x=d in exI, auto) |
53282 | 5196 |
apply (erule_tac x="f xa" in allE) |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
5197 |
apply (auto simp: dist_commute) |
53282 | 5198 |
done |
33175 | 5199 |
qed |
5200 |
||
60420 | 5201 |
text\<open>Define setwise continuity in terms of limits within the set.\<close> |
33175 | 5202 |
|
36359 | 5203 |
lemma continuous_on_iff: |
5204 |
"continuous_on s f \<longleftrightarrow> |
|
36440
89a70297564d
simplify definition of continuous_on; generalize some lemmas
huffman
parents:
36439
diff
changeset
|
5205 |
(\<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 | 5206 |
unfolding continuous_on_def Lim_within |
55775 | 5207 |
by (metis dist_pos_lt dist_self) |
53282 | 5208 |
|
62131
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5209 |
lemma continuous_within_E: |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5210 |
assumes "continuous (at x within s) f" "e>0" |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5211 |
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
|
5212 |
using assms apply (simp add: continuous_within_eps_delta) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5213 |
apply (drule spec [of _ e], clarify) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5214 |
apply (rule_tac d="d/2" in that, auto) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5215 |
done |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5216 |
|
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5217 |
lemma continuous_onI [intro?]: |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5218 |
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
|
5219 |
shows "continuous_on s f" |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5220 |
apply (simp add: continuous_on_iff, clarify) |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5221 |
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
|
5222 |
done |
1baed43f453e
nonneg_Reals, nonpos_Reals, Cauchy integral formula, etc.
paulson
parents:
62127
diff
changeset
|
5223 |
|
60420 | 5224 |
text\<open>Some simple consequential lemmas.\<close> |
33175 | 5225 |
|
62397
5ae24f33d343
Substantial new material for multivariate analysis. Also removal of some duplicates.
paulson <lp15@cam.ac.uk>
parents:
62381
diff
changeset
|
5226 |
lemma continuous_onE: |
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
5227 |
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
|
5228 |
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
|
5229 |
using assms |
5ae24f33d343
Substantial new material for multivariate analysis. Also removal of some duplicates.
paulson <lp15@cam.ac.uk>
parents:
62381
diff
changeset
|
5230 |
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
|
5231 |
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
|
5232 |
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
|
5233 |
done |
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
5234 |
|
60974
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
5235 |
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
|
5236 |
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
|
5237 |
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
|
5238 |
using assms |
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
5239 |
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
|
5240 |
|
33175 | 5241 |
lemma continuous_at_imp_continuous_within: |
53282 | 5242 |
"continuous (at x) f \<Longrightarrow> continuous (at x within s) f" |
60762 | 5243 |
unfolding continuous_within continuous_at using Lim_at_imp_Lim_at_within by auto |
33175 | 5244 |
|
61973 | 5245 |
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
|
5246 |
by simp |
36440
89a70297564d
simplify definition of continuous_on; generalize some lemmas
huffman
parents:
36439
diff
changeset
|
5247 |
|
67443
3abf6a722518
standardized towards new-style formal comments: isabelle update_comments;
wenzelm
parents:
67399
diff
changeset
|
5248 |
lemmas continuous_on = continuous_on_def \<comment> \<open>legacy theorem name\<close> |
33175 | 5249 |
|
5250 |
lemma continuous_within_subset: |
|
53282 | 5251 |
"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
|
5252 |
unfolding continuous_within by(metis tendsto_within_subset) |
33175 | 5253 |
|
5254 |
lemma continuous_on_interior: |
|
53282 | 5255 |
"continuous_on s f \<Longrightarrow> x \<in> interior s \<Longrightarrow> continuous (at x) f" |
55775 | 5256 |
by (metis continuous_on_eq_continuous_at continuous_on_subset interiorE) |
33175 | 5257 |
|
5258 |
lemma continuous_on_eq: |
|
61204 | 5259 |
"\<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
|
5260 |
unfolding continuous_on_def tendsto_def eventually_at_topological |
36440
89a70297564d
simplify definition of continuous_on; generalize some lemmas
huffman
parents:
36439
diff
changeset
|
5261 |
by simp |
33175 | 5262 |
|
60420 | 5263 |
text \<open>Characterization of various kinds of continuity in terms of sequences.\<close> |
33175 | 5264 |
|
67727
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5265 |
lemma continuous_within_sequentiallyI: |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5266 |
fixes f :: "'a::{first_countable_topology, t2_space} \<Rightarrow> 'b::topological_space" |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5267 |
assumes "\<And>u::nat \<Rightarrow> 'a. u \<longlonglongrightarrow> a \<Longrightarrow> (\<forall>n. u n \<in> s) \<Longrightarrow> (\<lambda>n. f (u n)) \<longlonglongrightarrow> f a" |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5268 |
shows "continuous (at a within s) f" |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5269 |
using assms unfolding continuous_within tendsto_def[where l = "f a"] |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5270 |
by (auto intro!: sequentially_imp_eventually_within) |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5271 |
|
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5272 |
lemma continuous_within_tendsto_compose: |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5273 |
fixes f::"'a::t2_space \<Rightarrow> 'b::topological_space" |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5274 |
assumes "continuous (at a within s) f" |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5275 |
"eventually (\<lambda>n. x n \<in> s) F" |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5276 |
"(x \<longlongrightarrow> a) F " |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5277 |
shows "((\<lambda>n. f (x n)) \<longlongrightarrow> f a) F" |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5278 |
proof - |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5279 |
have *: "filterlim x (inf (nhds a) (principal s)) F" |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5280 |
using assms(2) assms(3) unfolding at_within_def filterlim_inf by (auto simp add: filterlim_principal eventually_mono) |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5281 |
show ?thesis |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5282 |
by (auto simp add: assms(1) continuous_within[symmetric] tendsto_at_within_iff_tendsto_nhds[symmetric] intro!: filterlim_compose[OF _ *]) |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5283 |
qed |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5284 |
|
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5285 |
lemma continuous_within_tendsto_compose': |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5286 |
fixes f::"'a::t2_space \<Rightarrow> 'b::topological_space" |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5287 |
assumes "continuous (at a within s) f" |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5288 |
"\<And>n. x n \<in> s" |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5289 |
"(x \<longlongrightarrow> a) F " |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5290 |
shows "((\<lambda>n. f (x n)) \<longlongrightarrow> f a) F" |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5291 |
by (auto intro!: continuous_within_tendsto_compose[OF assms(1)] simp add: assms) |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5292 |
|
33175 | 5293 |
lemma continuous_within_sequentially: |
67727
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5294 |
fixes f :: "'a::{first_countable_topology, t2_space} \<Rightarrow> 'b::topological_space" |
33175 | 5295 |
shows "continuous (at a within s) f \<longleftrightarrow> |
61973 | 5296 |
(\<forall>x. (\<forall>n::nat. x n \<in> s) \<and> (x \<longlongrightarrow> a) sequentially |
5297 |
\<longrightarrow> ((f \<circ> x) \<longlongrightarrow> f a) sequentially)" |
|
67727
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5298 |
using continuous_within_tendsto_compose'[of a s f _ sequentially] |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5299 |
continuous_within_sequentiallyI[of a s f] |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5300 |
by (auto simp: o_def) |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5301 |
|
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5302 |
lemma continuous_at_sequentiallyI: |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5303 |
fixes f :: "'a::{first_countable_topology, t2_space} \<Rightarrow> 'b::topological_space" |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5304 |
assumes "\<And>u. u \<longlonglongrightarrow> a \<Longrightarrow> (\<lambda>n. f (u n)) \<longlonglongrightarrow> f a" |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5305 |
shows "continuous (at a) f" |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5306 |
using continuous_within_sequentiallyI[of a UNIV f] assms by auto |
33175 | 5307 |
|
5308 |
lemma continuous_at_sequentially: |
|
44533
7abe4a59f75d
generalize and simplify proof of continuous_within_sequentially
huffman
parents:
44531
diff
changeset
|
5309 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::topological_space" |
53291 | 5310 |
shows "continuous (at a) f \<longleftrightarrow> |
61973 | 5311 |
(\<forall>x. (x \<longlongrightarrow> a) sequentially --> ((f \<circ> x) \<longlongrightarrow> f a) sequentially)" |
45031 | 5312 |
using continuous_within_sequentially[of a UNIV f] by simp |
33175 | 5313 |
|
67727
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5314 |
lemma continuous_on_sequentiallyI: |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5315 |
fixes f :: "'a::{first_countable_topology, t2_space} \<Rightarrow> 'b::topological_space" |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5316 |
assumes "\<And>u a. (\<forall>n. u n \<in> s) \<Longrightarrow> a \<in> s \<Longrightarrow> u \<longlonglongrightarrow> a \<Longrightarrow> (\<lambda>n. f (u n)) \<longlonglongrightarrow> f a" |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5317 |
shows "continuous_on s f" |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5318 |
using assms unfolding continuous_on_eq_continuous_within |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5319 |
using continuous_within_sequentiallyI[of _ s f] by auto |
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5320 |
|
33175 | 5321 |
lemma continuous_on_sequentially: |
44533
7abe4a59f75d
generalize and simplify proof of continuous_within_sequentially
huffman
parents:
44531
diff
changeset
|
5322 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::topological_space" |
36359 | 5323 |
shows "continuous_on s f \<longleftrightarrow> |
61973 | 5324 |
(\<forall>x. \<forall>a \<in> s. (\<forall>n. x(n) \<in> s) \<and> (x \<longlongrightarrow> a) sequentially |
5325 |
--> ((f \<circ> x) \<longlongrightarrow> f a) sequentially)" |
|
67727
ce3e87a51488
moved Lipschitz continuity from AFP/Ordinary_Differential_Equations and AFP/Gromov_Hyperbolicity; moved lemmas from AFP/Gromov_Hyperbolicity/Library_Complements
immler
parents:
67686
diff
changeset
|
5326 |
(is "?lhs = ?rhs") |
33175 | 5327 |
proof |
53282 | 5328 |
assume ?rhs |
5329 |
then show ?lhs |
|
5330 |
using continuous_within_sequentially[of _ s f] |
|
5331 |
unfolding continuous_on_eq_continuous_within |
|
5332 |
by auto |
|
33175 | 5333 |
next |
53282 | 5334 |
assume ?lhs |
5335 |
then show ?rhs |
|
5336 |
unfolding continuous_on_eq_continuous_within |
|
5337 |
using continuous_within_sequentially[of _ s f] |
|
5338 |
by auto |
|
33175 | 5339 |
qed |
5340 |
||
44648
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5341 |
lemma uniformly_continuous_on_sequentially: |
36441 | 5342 |
"uniformly_continuous_on s f \<longleftrightarrow> (\<forall>x y. (\<forall>n. x n \<in> s) \<and> (\<forall>n. y n \<in> s) \<and> |
62101 | 5343 |
(\<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 | 5344 |
proof |
5345 |
assume ?lhs |
|
53282 | 5346 |
{ |
5347 |
fix x y |
|
5348 |
assume x: "\<forall>n. x n \<in> s" |
|
5349 |
and y: "\<forall>n. y n \<in> s" |
|
61973 | 5350 |
and xy: "((\<lambda>n. dist (x n) (y n)) \<longlongrightarrow> 0) sequentially" |
53282 | 5351 |
{ |
5352 |
fix e :: real |
|
5353 |
assume "e > 0" |
|
5354 |
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 | 5355 |
using \<open>?lhs\<close>[unfolded uniformly_continuous_on_def, THEN spec[where x=e]] by auto |
53282 | 5356 |
obtain N where N: "\<forall>n\<ge>N. dist (x n) (y n) < d" |
60420 | 5357 |
using xy[unfolded lim_sequentially dist_norm] and \<open>d>0\<close> by auto |
53282 | 5358 |
{ |
5359 |
fix n |
|
5360 |
assume "n\<ge>N" |
|
5361 |
then have "dist (f (x n)) (f (y n)) < e" |
|
5362 |
using N[THEN spec[where x=n]] |
|
5363 |
using d[THEN bspec[where x="x n"], THEN bspec[where x="y n"]] |
|
5364 |
using x and y |
|
63170 | 5365 |
by (simp add: dist_commute) |
53282 | 5366 |
} |
5367 |
then have "\<exists>N. \<forall>n\<ge>N. dist (f (x n)) (f (y n)) < e" |
|
5368 |
by auto |
|
5369 |
} |
|
61973 | 5370 |
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
|
5371 |
unfolding lim_sequentially and dist_real_def by auto |
53282 | 5372 |
} |
5373 |
then show ?rhs by auto |
|
33175 | 5374 |
next |
5375 |
assume ?rhs |
|
53282 | 5376 |
{ |
5377 |
assume "\<not> ?lhs" |
|
5378 |
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" |
|
5379 |
unfolding uniformly_continuous_on_def by auto |
|
5380 |
then obtain fa where fa: |
|
5381 |
"\<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" |
|
5382 |
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"] |
|
5383 |
unfolding Bex_def |
|
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
5384 |
by (auto simp: dist_commute) |
63040 | 5385 |
define x where "x n = fst (fa (inverse (real n + 1)))" for n |
5386 |
define y where "y n = snd (fa (inverse (real n + 1)))" for n |
|
53282 | 5387 |
have xyn: "\<forall>n. x n \<in> s \<and> y n \<in> s" |
5388 |
and xy0: "\<forall>n. dist (x n) (y n) < inverse (real n + 1)" |
|
5389 |
and fxy:"\<forall>n. \<not> dist (f (x n)) (f (y n)) < e" |
|
5390 |
unfolding x_def and y_def using fa |
|
5391 |
by auto |
|
5392 |
{ |
|
5393 |
fix e :: real |
|
5394 |
assume "e > 0" |
|
5395 |
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
|
5396 |
unfolding real_arch_inverse[of e] by auto |
53282 | 5397 |
{ |
5398 |
fix n :: nat |
|
5399 |
assume "n \<ge> N" |
|
5400 |
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
|
5401 |
using of_nat_0_le_iff and \<open>N\<noteq>0\<close> by auto |
33175 | 5402 |
also have "\<dots> < e" using N by auto |
5403 |
finally have "inverse (real n + 1) < e" by auto |
|
53282 | 5404 |
then have "dist (x n) (y n) < e" |
5405 |
using xy0[THEN spec[where x=n]] by auto |
|
5406 |
} |
|
5407 |
then have "\<exists>N. \<forall>n\<ge>N. dist (x n) (y n) < e" by auto |
|
5408 |
} |
|
5409 |
then have "\<forall>e>0. \<exists>N. \<forall>n\<ge>N. dist (f (x n)) (f (y n)) < e" |
|
60420 | 5410 |
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
|
5411 |
unfolding lim_sequentially dist_real_def by auto |
60420 | 5412 |
then have False using fxy and \<open>e>0\<close> by auto |
53282 | 5413 |
} |
5414 |
then show ?lhs |
|
5415 |
unfolding uniformly_continuous_on_def by blast |
|
33175 | 5416 |
qed |
5417 |
||
64287 | 5418 |
lemma continuous_closed_imp_Cauchy_continuous: |
5419 |
fixes S :: "('a::complete_space) set" |
|
5420 |
shows "\<lbrakk>continuous_on S f; closed S; Cauchy \<sigma>; \<And>n. (\<sigma> n) \<in> S\<rbrakk> \<Longrightarrow> Cauchy(f o \<sigma>)" |
|
5421 |
apply (simp add: complete_eq_closed [symmetric] continuous_on_sequentially) |
|
5422 |
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
|
5423 |
|
60420 | 5424 |
text\<open>The usual transformation theorems.\<close> |
33175 | 5425 |
|
5426 |
lemma continuous_transform_within: |
|
36667 | 5427 |
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
|
5428 |
assumes "continuous (at x within s) f" |
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
5429 |
and "0 < d" |
53282 | 5430 |
and "x \<in> s" |
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
5431 |
and "\<And>x'. \<lbrakk>x' \<in> s; dist x' x < d\<rbrakk> \<Longrightarrow> f x' = g x'" |
33175 | 5432 |
shows "continuous (at x within s) g" |
62087
44841d07ef1d
revisions to limits and derivatives, plus new lemmas
paulson
parents:
62083
diff
changeset
|
5433 |
using assms |
53282 | 5434 |
unfolding continuous_within |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
5435 |
by (force intro: Lim_transform_within) |
62101 | 5436 |
|
53282 | 5437 |
|
67962 | 5438 |
subsubsection%unimportant \<open>Structural rules for pointwise continuity\<close> |
33175 | 5439 |
|
51361
21e5b6efb317
changed continuous_intros into a named theorems collection
hoelzl
parents:
51351
diff
changeset
|
5440 |
lemma continuous_infnorm[continuous_intros]: |
53282 | 5441 |
"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
|
5442 |
unfolding continuous_def by (rule tendsto_infnorm) |
33175 | 5443 |
|
51361
21e5b6efb317
changed continuous_intros into a named theorems collection
hoelzl
parents:
51351
diff
changeset
|
5444 |
lemma continuous_inner[continuous_intros]: |
53282 | 5445 |
assumes "continuous F f" |
5446 |
and "continuous F g" |
|
44647
e4de7750cdeb
modernize lemmas about 'continuous' and 'continuous_on';
huffman
parents:
44632
diff
changeset
|
5447 |
shows "continuous F (\<lambda>x. inner (f x) (g x))" |
e4de7750cdeb
modernize lemmas about 'continuous' and 'continuous_on';
huffman
parents:
44632
diff
changeset
|
5448 |
using assms unfolding continuous_def by (rule tendsto_inner) |
e4de7750cdeb
modernize lemmas about 'continuous' and 'continuous_on';
huffman
parents:
44632
diff
changeset
|
5449 |
|
67962 | 5450 |
subsubsection%unimportant \<open>Structural rules for setwise continuity\<close> |
33175 | 5451 |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
5452 |
lemma continuous_on_infnorm[continuous_intros]: |
53282 | 5453 |
"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
|
5454 |
unfolding continuous_on by (fast intro: tendsto_infnorm) |
e4de7750cdeb
modernize lemmas about 'continuous' and 'continuous_on';
huffman
parents:
44632
diff
changeset
|
5455 |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
5456 |
lemma continuous_on_inner[continuous_intros]: |
44531
1d477a2b1572
replace some continuous_on lemmas with more general versions
huffman
parents:
44530
diff
changeset
|
5457 |
fixes g :: "'a::topological_space \<Rightarrow> 'b::real_inner" |
53282 | 5458 |
assumes "continuous_on s f" |
5459 |
and "continuous_on s g" |
|
44531
1d477a2b1572
replace some continuous_on lemmas with more general versions
huffman
parents:
44530
diff
changeset
|
5460 |
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
|
5461 |
using bounded_bilinear_inner assms |
1d477a2b1572
replace some continuous_on lemmas with more general versions
huffman
parents:
44530
diff
changeset
|
5462 |
by (rule bounded_bilinear.continuous_on) |
1d477a2b1572
replace some continuous_on lemmas with more general versions
huffman
parents:
44530
diff
changeset
|
5463 |
|
67962 | 5464 |
subsubsection%unimportant \<open>Structural rules for uniform continuity\<close> |
33175 | 5465 |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
5466 |
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
|
5467 |
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
|
5468 |
assumes "uniformly_continuous_on s f" |
53282 | 5469 |
and "uniformly_continuous_on s g" |
44648
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5470 |
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
|
5471 |
proof - |
53282 | 5472 |
{ |
5473 |
fix a b c d :: 'b |
|
5474 |
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
|
5475 |
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
|
5476 |
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
|
5477 |
by arith |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5478 |
} note le = this |
53282 | 5479 |
{ |
5480 |
fix x y |
|
61969 | 5481 |
assume f: "(\<lambda>n. dist (f (x n)) (f (y n))) \<longlonglongrightarrow> 0" |
5482 |
assume g: "(\<lambda>n. dist (g (x n)) (g (y n))) \<longlonglongrightarrow> 0" |
|
5483 |
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
|
5484 |
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
|
5485 |
simp add: le) |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5486 |
} |
53282 | 5487 |
then show ?thesis |
5488 |
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
|
5489 |
unfolding dist_real_def by simp |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5490 |
qed |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5491 |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
5492 |
lemma uniformly_continuous_on_norm[continuous_intros]: |
62101 | 5493 |
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
|
5494 |
assumes "uniformly_continuous_on s f" |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5495 |
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
|
5496 |
unfolding norm_conv_dist using assms |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5497 |
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
|
5498 |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
5499 |
lemma (in bounded_linear) uniformly_continuous_on[continuous_intros]: |
62101 | 5500 |
fixes g :: "_::metric_space \<Rightarrow> _" |
44648
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5501 |
assumes "uniformly_continuous_on s g" |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5502 |
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
|
5503 |
using assms unfolding uniformly_continuous_on_sequentially |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5504 |
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
|
5505 |
by (auto intro: tendsto_zero) |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5506 |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
5507 |
lemma uniformly_continuous_on_cmul[continuous_intros]: |
36441 | 5508 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::real_normed_vector" |
33175 | 5509 |
assumes "uniformly_continuous_on s f" |
5510 |
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
|
5511 |
using bounded_linear_scaleR_right assms |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5512 |
by (rule bounded_linear.uniformly_continuous_on) |
33175 | 5513 |
|
5514 |
lemma dist_minus: |
|
5515 |
fixes x y :: "'a::real_normed_vector" |
|
5516 |
shows "dist (- x) (- y) = dist x y" |
|
5517 |
unfolding dist_norm minus_diff_minus norm_minus_cancel .. |
|
5518 |
||
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
5519 |
lemma uniformly_continuous_on_minus[continuous_intros]: |
33175 | 5520 |
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
|
5521 |
shows "uniformly_continuous_on s f \<Longrightarrow> uniformly_continuous_on s (\<lambda>x. - f x)" |
33175 | 5522 |
unfolding uniformly_continuous_on_def dist_minus . |
5523 |
||
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
5524 |
lemma uniformly_continuous_on_add[continuous_intros]: |
36441 | 5525 |
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
|
5526 |
assumes "uniformly_continuous_on s f" |
53282 | 5527 |
and "uniformly_continuous_on s g" |
33175 | 5528 |
shows "uniformly_continuous_on s (\<lambda>x. f x + g x)" |
53282 | 5529 |
using assms |
5530 |
unfolding uniformly_continuous_on_sequentially |
|
44648
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5531 |
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
|
5532 |
by (auto intro: tendsto_add_zero) |
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5533 |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56290
diff
changeset
|
5534 |
lemma uniformly_continuous_on_diff[continuous_intros]: |
36441 | 5535 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::real_normed_vector" |
53282 | 5536 |
assumes "uniformly_continuous_on s f" |
5537 |
and "uniformly_continuous_on s g" |
|
44648
897f32a827f2
simplify some proofs about uniform continuity, and add some new ones;
huffman
parents:
44647
diff
changeset
|
5538 |
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
|
5539 |
using assms uniformly_continuous_on_add [of s f "- g"] |
b1d955791529
more simplification rules on unary and binary minus
haftmann
parents:
54070
diff
changeset
|
5540 |
by (simp add: fun_Compl_def uniformly_continuous_on_minus) |
33175 | 5541 |
|
62101 | 5542 |
text \<open>Continuity in terms of open preimages.\<close> |
33175 | 5543 |
|
5544 |
lemma continuous_at_open: |
|
53282 | 5545 |
"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)))" |
5546 |
unfolding continuous_within_topological [of x UNIV f] |
|
5547 |
unfolding imp_conjL |
|
5548 |
by (intro all_cong imp_cong ex_cong conj_cong refl) auto |
|
33175 | 5549 |
|
51351 | 5550 |
lemma continuous_imp_tendsto: |
53282 | 5551 |
assumes "continuous (at x0) f" |
61969 | 5552 |
and "x \<longlonglongrightarrow> x0" |
5553 |
shows "(f \<circ> x) \<longlonglongrightarrow> (f x0)" |
|
51351 | 5554 |
proof (rule topological_tendstoI) |
5555 |
fix S |
|
5556 |
assume "open S" "f x0 \<in> S" |
|
5557 |
then obtain T where T_def: "open T" "x0 \<in> T" "\<forall>x\<in>T. f x \<in> S" |
|
5558 |
using assms continuous_at_open by metis |
|
5559 |
then have "eventually (\<lambda>n. x n \<in> T) sequentially" |
|
5560 |
using assms T_def by (auto simp: tendsto_def) |
|
5561 |
then show "eventually (\<lambda>n. (f \<circ> x) n \<in> S) sequentially" |
|
61810 | 5562 |
using T_def by (auto elim!: eventually_mono) |
51351 | 5563 |
qed |
5564 |
||
33175 | 5565 |
lemma continuous_on_open: |
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5566 |
"continuous_on S f \<longleftrightarrow> |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5567 |
(\<forall>T. openin (subtopology euclidean (f ` S)) T \<longrightarrow> |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5568 |
openin (subtopology euclidean S) (S \<inter> f -` T))" |
51481
ef949192e5d6
move continuous_on_inv to HOL image (simplifies isCont_inverse_function)
hoelzl
parents:
51480
diff
changeset
|
5569 |
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
|
5570 |
by (simp add: imp_ex imageI conj_commute eq_commute cong: conj_cong) |
36441 | 5571 |
|
63301 | 5572 |
lemma continuous_on_open_gen: |
5573 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::metric_space" |
|
5574 |
assumes "f ` S \<subseteq> T" |
|
5575 |
shows "continuous_on S f \<longleftrightarrow> |
|
5576 |
(\<forall>U. openin (subtopology euclidean T) U |
|
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5577 |
\<longrightarrow> openin (subtopology euclidean S) (S \<inter> f -` U))" |
63301 | 5578 |
(is "?lhs = ?rhs") |
5579 |
proof |
|
5580 |
assume ?lhs |
|
5581 |
then show ?rhs |
|
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5582 |
apply (clarsimp simp: openin_euclidean_subtopology_iff continuous_on_iff) |
63301 | 5583 |
by (metis assms image_subset_iff) |
5584 |
next |
|
5585 |
have ope: "openin (subtopology euclidean T) (ball y e \<inter> T)" for y e |
|
5586 |
by (simp add: Int_commute openin_open_Int) |
|
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5587 |
assume R [rule_format]: ?rhs |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5588 |
show ?lhs |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5589 |
proof (clarsimp simp add: continuous_on_iff) |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5590 |
fix x and e::real |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5591 |
assume "x \<in> S" and "0 < e" |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5592 |
then have x: "x \<in> S \<inter> (f -` ball (f x) e \<inter> f -` T)" |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5593 |
using assms by auto |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5594 |
show "\<exists>d>0. \<forall>x'\<in>S. dist x' x < d \<longrightarrow> dist (f x') (f x) < e" |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5595 |
using R [of "ball (f x) e \<inter> T"] x |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5596 |
by (fastforce simp add: ope openin_euclidean_subtopology_iff [of S] dist_commute) |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5597 |
qed |
63301 | 5598 |
qed |
5599 |
||
5600 |
lemma continuous_openin_preimage: |
|
5601 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::metric_space" |
|
5602 |
shows |
|
5603 |
"\<lbrakk>continuous_on S f; f ` S \<subseteq> T; openin (subtopology euclidean T) U\<rbrakk> |
|
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5604 |
\<Longrightarrow> openin (subtopology euclidean S) (S \<inter> f -` U)" |
63301 | 5605 |
by (simp add: continuous_on_open_gen) |
5606 |
||
60420 | 5607 |
text \<open>Similarly in terms of closed sets.\<close> |
33175 | 5608 |
|
5609 |
lemma continuous_on_closed: |
|
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5610 |
"continuous_on S f \<longleftrightarrow> |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5611 |
(\<forall>T. closedin (subtopology euclidean (f ` S)) T \<longrightarrow> |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5612 |
closedin (subtopology euclidean S) (S \<inter> f -` T))" |
51481
ef949192e5d6
move continuous_on_inv to HOL image (simplifies isCont_inverse_function)
hoelzl
parents:
51480
diff
changeset
|
5613 |
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
|
5614 |
by (simp add: imp_ex imageI conj_commute eq_commute cong: conj_cong) |
33175 | 5615 |
|
63301 | 5616 |
lemma continuous_on_closed_gen: |
5617 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::metric_space" |
|
5618 |
assumes "f ` S \<subseteq> T" |
|
5619 |
shows "continuous_on S f \<longleftrightarrow> |
|
5620 |
(\<forall>U. closedin (subtopology euclidean T) U |
|
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5621 |
\<longrightarrow> closedin (subtopology euclidean S) (S \<inter> f -` U))" |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5622 |
(is "?lhs = ?rhs") |
63301 | 5623 |
proof - |
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5624 |
have *: "U \<subseteq> T \<Longrightarrow> S \<inter> f -` (T - U) = S - (S \<inter> f -` U)" for U |
63301 | 5625 |
using assms by blast |
5626 |
show ?thesis |
|
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5627 |
proof |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5628 |
assume L: ?lhs |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5629 |
show ?rhs |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5630 |
proof clarify |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5631 |
fix U |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5632 |
assume "closedin (subtopology euclidean T) U" |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5633 |
then show "closedin (subtopology euclidean S) (S \<inter> f -` U)" |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5634 |
using L unfolding continuous_on_open_gen [OF assms] |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5635 |
by (metis * closedin_def inf_le1 topspace_euclidean_subtopology) |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5636 |
qed |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5637 |
next |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5638 |
assume R [rule_format]: ?rhs |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5639 |
show ?lhs |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5640 |
unfolding continuous_on_open_gen [OF assms] |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5641 |
by (metis * R inf_le1 openin_closedin_eq topspace_euclidean_subtopology) |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5642 |
qed |
63301 | 5643 |
qed |
5644 |
||
5645 |
lemma continuous_closedin_preimage_gen: |
|
5646 |
fixes f :: "'a::metric_space \<Rightarrow> 'b::metric_space" |
|
5647 |
assumes "continuous_on S f" "f ` S \<subseteq> T" "closedin (subtopology euclidean T) U" |
|
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5648 |
shows "closedin (subtopology euclidean S) (S \<inter> f -` U)" |
63301 | 5649 |
using assms continuous_on_closed_gen by blast |
5650 |
||
5651 |
lemma continuous_on_imp_closedin: |
|
5652 |
assumes "continuous_on S f" "closedin (subtopology euclidean (f ` S)) T" |
|
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5653 |
shows "closedin (subtopology euclidean S) (S \<inter> f -` T)" |
63301 | 5654 |
using assms continuous_on_closed by blast |
5655 |
||
67968 | 5656 |
subsection%unimportant \<open>Half-global and completely global cases\<close> |
33175 | 5657 |
|
63301 | 5658 |
lemma continuous_openin_preimage_gen: |
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5659 |
assumes "continuous_on S f" "open T" |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5660 |
shows "openin (subtopology euclidean S) (S \<inter> f -` T)" |
53282 | 5661 |
proof - |
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5662 |
have *: "(S \<inter> f -` T) = (S \<inter> f -` (T \<inter> f ` S))" |
53282 | 5663 |
by auto |
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5664 |
have "openin (subtopology euclidean (f ` S)) (T \<inter> f ` S)" |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5665 |
using openin_open_Int[of T "f ` S", OF assms(2)] unfolding openin_open by auto |
53282 | 5666 |
then show ?thesis |
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5667 |
using assms(1)[unfolded continuous_on_open, THEN spec[where x="T \<inter> f ` S"]] |
53282 | 5668 |
using * by auto |
33175 | 5669 |
qed |
5670 |
||
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61426
diff
changeset
|
5671 |
lemma continuous_closedin_preimage: |
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5672 |
assumes "continuous_on S f" and "closed T" |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5673 |
shows "closedin (subtopology euclidean S) (S \<inter> f -` T)" |
53282 | 5674 |
proof - |
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5675 |
have *: "(S \<inter> f -` T) = (S \<inter> f -` (T \<inter> f ` S))" |
53282 | 5676 |
by auto |
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5677 |
have "closedin (subtopology euclidean (f ` S)) (T \<inter> f ` S)" |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5678 |
using closedin_closed_Int[of T "f ` S", OF assms(2)] |
63170 | 5679 |
by (simp add: Int_commute) |
53282 | 5680 |
then show ?thesis |
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5681 |
using assms(1)[unfolded continuous_on_closed, THEN spec[where x="T \<inter> f ` S"]] |
53282 | 5682 |
using * by auto |
33175 | 5683 |
qed |
5684 |
||
63955 | 5685 |
lemma continuous_openin_preimage_eq: |
5686 |
"continuous_on S f \<longleftrightarrow> |
|
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5687 |
(\<forall>T. open T \<longrightarrow> openin (subtopology euclidean S) (S \<inter> f -` T))" |
63955 | 5688 |
apply safe |
5689 |
apply (simp add: continuous_openin_preimage_gen) |
|
5690 |
apply (fastforce simp add: continuous_on_open openin_open) |
|
5691 |
done |
|
5692 |
||
5693 |
lemma continuous_closedin_preimage_eq: |
|
5694 |
"continuous_on S f \<longleftrightarrow> |
|
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5695 |
(\<forall>T. closed T \<longrightarrow> closedin (subtopology euclidean S) (S \<inter> f -` T))" |
63955 | 5696 |
apply safe |
5697 |
apply (simp add: continuous_closedin_preimage) |
|
5698 |
apply (fastforce simp add: continuous_on_closed closedin_closed) |
|
5699 |
done |
|
5700 |
||
33175 | 5701 |
lemma continuous_open_preimage: |
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5702 |
assumes contf: "continuous_on S f" and "open S" "open T" |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5703 |
shows "open (S \<inter> f -` T)" |
33175 | 5704 |
proof- |
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5705 |
obtain U where "open U" "(S \<inter> f -` T) = S \<inter> U" |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5706 |
using continuous_openin_preimage_gen[OF contf \<open>open T\<close>] |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5707 |
unfolding openin_open by auto |
53282 | 5708 |
then show ?thesis |
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5709 |
using open_Int[of S U, OF \<open>open S\<close>] by auto |
33175 | 5710 |
qed |
5711 |
||
5712 |
lemma continuous_closed_preimage: |
|
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5713 |
assumes contf: "continuous_on S f" and "closed S" "closed T" |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5714 |
shows "closed (S \<inter> f -` T)" |
33175 | 5715 |
proof- |
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5716 |
obtain U where "closed U" "(S \<inter> f -` T) = S \<inter> U" |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5717 |
using continuous_closedin_preimage[OF contf \<open>closed T\<close>] |
53282 | 5718 |
unfolding closedin_closed by auto |
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5719 |
then show ?thesis using closed_Int[of S U, OF \<open>closed S\<close>] by auto |
33175 | 5720 |
qed |
5721 |
||
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5722 |
lemma continuous_open_vimage: "open S \<Longrightarrow> (\<And>x. continuous (at x) f) \<Longrightarrow> open (f -` S)" |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5723 |
by (metis continuous_on_eq_continuous_within open_vimage) |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5724 |
|
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5725 |
lemma continuous_closed_vimage: "closed S \<Longrightarrow> (\<And>x. continuous (at x) f) \<Longrightarrow> closed (f -` S)" |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5726 |
by (simp add: closed_vimage continuous_on_eq_continuous_within) |
33175 | 5727 |
|
36441 | 5728 |
lemma interior_image_subset: |
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
5729 |
assumes "inj f" "\<And>x. continuous (at x) f" |
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5730 |
shows "interior (f ` S) \<subseteq> f ` (interior S)" |
44519 | 5731 |
proof |
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5732 |
fix x assume "x \<in> interior (f ` S)" |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5733 |
then obtain T where as: "open T" "x \<in> T" "T \<subseteq> f ` S" .. |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5734 |
then have "x \<in> f ` S" by auto |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5735 |
then obtain y where y: "y \<in> S" "x = f y" by auto |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5736 |
have "open (f -` T)" |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5737 |
using assms \<open>open T\<close> by (simp add: continuous_at_imp_continuous_on open_vimage) |
44519 | 5738 |
moreover have "y \<in> vimage f T" |
60420 | 5739 |
using \<open>x = f y\<close> \<open>x \<in> T\<close> by simp |
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5740 |
moreover have "vimage f T \<subseteq> S" |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5741 |
using \<open>T \<subseteq> image f S\<close> \<open>inj f\<close> unfolding inj_on_def subset_eq by auto |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5742 |
ultimately have "y \<in> interior S" .. |
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
5743 |
with \<open>x = f y\<close> show "x \<in> f ` interior S" .. |
60420 | 5744 |
qed |
5745 |
||
67968 | 5746 |
subsection%unimportant \<open>Topological properties of linear functions\<close> |
36437 | 5747 |
|
5748 |
lemma linear_lim_0: |
|
53282 | 5749 |
assumes "bounded_linear f" |
61973 | 5750 |
shows "(f \<longlongrightarrow> 0) (at (0))" |
53282 | 5751 |
proof - |
36437 | 5752 |
interpret f: bounded_linear f by fact |
61973 | 5753 |
have "(f \<longlongrightarrow> f 0) (at 0)" |
36437 | 5754 |
using tendsto_ident_at by (rule f.tendsto) |
53282 | 5755 |
then show ?thesis unfolding f.zero . |
36437 | 5756 |
qed |
5757 |
||
5758 |
lemma linear_continuous_at: |
|
53282 | 5759 |
assumes "bounded_linear f" |
5760 |
shows "continuous (at a) f" |
|
36437 | 5761 |
unfolding continuous_at using assms |
5762 |
apply (rule bounded_linear.tendsto) |
|
5763 |
apply (rule tendsto_ident_at) |
|
5764 |
done |
|
5765 |
||
5766 |
lemma linear_continuous_within: |
|
53291 | 5767 |
"bounded_linear f \<Longrightarrow> continuous (at x within s) f" |
36437 | 5768 |
using continuous_at_imp_continuous_within[of x f s] using linear_continuous_at[of f] by auto |
5769 |
||
5770 |
lemma linear_continuous_on: |
|
53291 | 5771 |
"bounded_linear f \<Longrightarrow> continuous_on s f" |
36437 | 5772 |
using continuous_at_imp_continuous_on[of s f] using linear_continuous_at[of f] by auto |
5773 |
||
67962 | 5774 |
subsection%unimportant \<open>Intervals\<close> |
60974
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
5775 |
|
60420 | 5776 |
text \<open>Openness of halfspaces.\<close> |
33175 | 5777 |
|
5778 |
lemma open_halfspace_lt: "open {x. inner a x < b}" |
|
63332 | 5779 |
by (simp add: open_Collect_less continuous_on_inner continuous_on_const continuous_on_id) |
33175 | 5780 |
|
5781 |
lemma open_halfspace_gt: "open {x. inner a x > b}" |
|
63332 | 5782 |
by (simp add: open_Collect_less continuous_on_inner continuous_on_const continuous_on_id) |
33175 | 5783 |
|
53282 | 5784 |
lemma open_halfspace_component_lt: "open {x::'a::euclidean_space. x\<bullet>i < a}" |
63332 | 5785 |
by (simp add: open_Collect_less continuous_on_inner continuous_on_const continuous_on_id) |
33175 | 5786 |
|
53282 | 5787 |
lemma open_halfspace_component_gt: "open {x::'a::euclidean_space. x\<bullet>i > a}" |
63332 | 5788 |
by (simp add: open_Collect_less continuous_on_inner continuous_on_const continuous_on_id) |
33175 | 5789 |
|
60420 | 5790 |
text \<open>This gives a simple derivation of limit component bounds.\<close> |
33175 | 5791 |
|
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5792 |
lemma open_box[intro]: "open (box a b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5793 |
proof - |
67399 | 5794 |
have "open (\<Inter>i\<in>Basis. ((\<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
|
5795 |
by (auto intro!: continuous_open_vimage continuous_inner continuous_ident continuous_const) |
67399 | 5796 |
also have "(\<Inter>i\<in>Basis. ((\<bullet>) i) -` {a \<bullet> i <..< b \<bullet> i}) = box a b" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
5797 |
by (auto simp: box_def inner_commute) |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5798 |
finally show ?thesis . |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5799 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5800 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5801 |
instance euclidean_space \<subseteq> second_countable_topology |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5802 |
proof |
63040 | 5803 |
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
|
5804 |
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
|
5805 |
by simp |
63040 | 5806 |
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
|
5807 |
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
|
5808 |
by simp |
63040 | 5809 |
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
|
5810 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5811 |
have "Ball B open" by (simp add: B_def open_box) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5812 |
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
|
5813 |
proof safe |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5814 |
fix A::"'a set" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5815 |
assume "open A" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5816 |
show "\<exists>B'\<subseteq>B. \<Union>B' = A" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5817 |
apply (rule exI[of _ "{b\<in>B. b \<subseteq> A}"]) |
60420 | 5818 |
apply (subst (3) open_UNION_box[OF \<open>open A\<close>]) |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
5819 |
apply (auto simp: a b B_def) |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5820 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5821 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5822 |
ultimately |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5823 |
have "topological_basis B" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5824 |
unfolding topological_basis_def by blast |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5825 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5826 |
have "countable B" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5827 |
unfolding B_def |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5828 |
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
|
5829 |
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
|
5830 |
by (blast intro: topological_basis_imp_subbasis) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5831 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5832 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5833 |
instance euclidean_space \<subseteq> polish_space .. |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5834 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5835 |
lemma closed_cbox[intro]: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5836 |
fixes a b :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5837 |
shows "closed (cbox a b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5838 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5839 |
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
|
5840 |
by (intro closed_INT ballI continuous_closed_vimage allI |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5841 |
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
|
5842 |
also have "(\<Inter>i\<in>Basis. (\<lambda>x. x\<bullet>i) -` {a\<bullet>i .. b\<bullet>i}) = cbox a b" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
5843 |
by (auto simp: cbox_def) |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5844 |
finally show "closed (cbox a b)" . |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5845 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5846 |
|
62618
f7f2467ab854
Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents:
62533
diff
changeset
|
5847 |
lemma interior_cbox [simp]: |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5848 |
fixes a b :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5849 |
shows "interior (cbox a b) = box a b" (is "?L = ?R") |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5850 |
proof(rule subset_antisym) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5851 |
show "?R \<subseteq> ?L" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5852 |
using box_subset_cbox open_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5853 |
by (rule interior_maximal) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5854 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5855 |
fix x |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5856 |
assume "x \<in> interior (cbox a b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5857 |
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
|
5858 |
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
|
5859 |
unfolding open_dist and subset_eq by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5860 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5861 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5862 |
assume i: "i \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5863 |
have "dist (x - (e / 2) *\<^sub>R i) x < e" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5864 |
and "dist (x + (e / 2) *\<^sub>R i) x < e" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5865 |
unfolding dist_norm |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5866 |
apply auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5867 |
unfolding norm_minus_cancel |
60420 | 5868 |
using norm_Basis[OF i] \<open>e>0\<close> |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5869 |
apply auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5870 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5871 |
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
|
5872 |
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
|
5873 |
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
|
5874 |
unfolding mem_box |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5875 |
using i |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5876 |
by blast+ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5877 |
then have "a \<bullet> i < x \<bullet> i" and "x \<bullet> i < b \<bullet> i" |
60420 | 5878 |
using \<open>e>0\<close> i |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5879 |
by (auto simp: inner_diff_left inner_Basis inner_add_left) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5880 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5881 |
then have "x \<in> box a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5882 |
unfolding mem_box by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5883 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5884 |
then show "?L \<subseteq> ?R" .. |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5885 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5886 |
|
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63881
diff
changeset
|
5887 |
lemma bounded_cbox [simp]: |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5888 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5889 |
shows "bounded (cbox a b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5890 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5891 |
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
|
5892 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5893 |
fix x :: "'a" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5894 |
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
|
5895 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5896 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5897 |
assume "i \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5898 |
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
|
5899 |
using x[THEN bspec[where x=i]] by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5900 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5901 |
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
|
5902 |
apply - |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
5903 |
apply (rule sum_mono, auto) |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5904 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5905 |
then have "norm x \<le> ?b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5906 |
using norm_le_l1[of x] by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5907 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5908 |
then show ?thesis |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5909 |
unfolding cbox_def bounded_iff by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5910 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5911 |
|
62618
f7f2467ab854
Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents:
62533
diff
changeset
|
5912 |
lemma bounded_box [simp]: |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5913 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5914 |
shows "bounded (box a b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5915 |
using bounded_cbox[of a b] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5916 |
using box_subset_cbox[of a b] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5917 |
using bounded_subset[of "cbox a b" "box a b"] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5918 |
by simp |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5919 |
|
62618
f7f2467ab854
Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents:
62533
diff
changeset
|
5920 |
lemma not_interval_UNIV [simp]: |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5921 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5922 |
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
|
5923 |
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
|
5924 |
|
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
5925 |
lemma not_interval_UNIV2 [simp]: |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
5926 |
fixes a :: "'a::euclidean_space" |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63938
diff
changeset
|
5927 |
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
|
5928 |
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
|
5929 |
|
62618
f7f2467ab854
Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents:
62533
diff
changeset
|
5930 |
lemma compact_cbox [simp]: |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5931 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5932 |
shows "compact (cbox a b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5933 |
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
|
5934 |
by (auto simp: compact_eq_seq_compact_metric) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5935 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5936 |
lemma box_midpoint: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5937 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5938 |
assumes "box a b \<noteq> {}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5939 |
shows "((1/2) *\<^sub>R (a + b)) \<in> box a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5940 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5941 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5942 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5943 |
assume "i \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5944 |
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
|
5945 |
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
|
5946 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5947 |
then show ?thesis unfolding mem_box by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5948 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5949 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5950 |
lemma open_cbox_convex: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5951 |
fixes x :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5952 |
assumes x: "x \<in> box a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5953 |
and y: "y \<in> cbox a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5954 |
and e: "0 < e" "e \<le> 1" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5955 |
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
|
5956 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5957 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5958 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5959 |
assume i: "i \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5960 |
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
|
5961 |
unfolding left_diff_distrib by simp |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5962 |
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
|
5963 |
apply (rule add_less_le_mono) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5964 |
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
|
5965 |
apply simp_all |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5966 |
using x unfolding mem_box using i |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5967 |
apply simp |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5968 |
using y unfolding mem_box using i |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5969 |
apply simp |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5970 |
done |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5971 |
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
|
5972 |
unfolding inner_simps by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5973 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5974 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5975 |
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
|
5976 |
unfolding left_diff_distrib by simp |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5977 |
also have "\<dots> > e * (x \<bullet> i) + (1 - e) * (y \<bullet> i)" |
66827
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
5978 |
proof (rule add_less_le_mono) |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
5979 |
show "e * (x \<bullet> i) < e * (b \<bullet> i)" |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
5980 |
using e(1) i mem_box(1) x by auto |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
5981 |
show "(1 - e) * (y \<bullet> i) \<le> (1 - e) * (b \<bullet> i)" |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
5982 |
by (meson diff_ge_0_iff_ge e(2) i mem_box(2) ordered_comm_semiring_class.comm_mult_left_mono y) |
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents:
66794
diff
changeset
|
5983 |
qed |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5984 |
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
|
5985 |
unfolding inner_simps by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5986 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5987 |
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
|
5988 |
by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5989 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5990 |
then show ?thesis |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5991 |
unfolding mem_box by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5992 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5993 |
|
63881
b746b19197bd
lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents:
63627
diff
changeset
|
5994 |
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
|
5995 |
by (simp add: closed_cbox) |
b746b19197bd
lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents:
63627
diff
changeset
|
5996 |
|
b746b19197bd
lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents:
63627
diff
changeset
|
5997 |
lemma closure_box [simp]: |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5998 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
5999 |
assumes "box a b \<noteq> {}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6000 |
shows "closure (box a b) = cbox a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6001 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6002 |
have ab: "a <e b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6003 |
using assms by (simp add: eucl_less_def box_ne_empty) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6004 |
let ?c = "(1 / 2) *\<^sub>R (a + b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6005 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6006 |
fix x |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6007 |
assume as:"x \<in> cbox a b" |
63040 | 6008 |
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
|
6009 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6010 |
fix n |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6011 |
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
|
6012 |
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
|
6013 |
unfolding inverse_le_1_iff by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6014 |
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
|
6015 |
x + (inverse (real n + 1)) *\<^sub>R (((1 / 2) *\<^sub>R (a + b)) - x)" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
6016 |
by (auto simp: algebra_simps) |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6017 |
then have "f n <e b" and "a <e f n" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6018 |
using open_cbox_convex[OF box_midpoint[OF assms] as *] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6019 |
unfolding f_def by (auto simp: box_def eucl_less_def) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6020 |
then have False |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6021 |
using fn unfolding f_def using xc by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6022 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6023 |
moreover |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6024 |
{ |
61973 | 6025 |
assume "\<not> (f \<longlongrightarrow> x) sequentially" |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6026 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6027 |
fix e :: real |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6028 |
assume "e > 0" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6029 |
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
|
6030 |
using real_arch_inverse[of e] |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
6031 |
apply (auto simp: 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
|
6032 |
apply (metis Suc_pred' of_nat_Suc) |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6033 |
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
|
6034 |
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
|
6035 |
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
|
6036 |
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
|
6037 |
by (auto intro!: that le_less_trans [OF _ N]) |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6038 |
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
|
6039 |
} |
61973 | 6040 |
then have "((\<lambda>n. inverse (real n + 1)) \<longlongrightarrow> 0) sequentially" |
66643
f7e38b8583a0
Correction of typos and a bit of streamlining
paulson <lp15@cam.ac.uk>
parents:
66641
diff
changeset
|
6041 |
unfolding lim_sequentially by(auto simp: dist_norm) |
61973 | 6042 |
then have "(f \<longlongrightarrow> x) sequentially" |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6043 |
unfolding f_def |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6044 |
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
|
6045 |
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
|
6046 |
by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6047 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6048 |
ultimately have "x \<in> closure (box a b)" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6049 |
using as and box_midpoint[OF assms] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6050 |
unfolding closure_def |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6051 |
unfolding islimpt_sequential |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6052 |
by (cases "x=?c") (auto simp: in_box_eucl_less) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6053 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6054 |
then show ?thesis |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6055 |
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
|
6056 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6057 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6058 |
lemma bounded_subset_box_symmetric: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6059 |
fixes s::"('a::euclidean_space) set" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6060 |
assumes "bounded s" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6061 |
shows "\<exists>a. s \<subseteq> box (-a) a" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6062 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6063 |
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
|
6064 |
using assms[unfolded bounded_pos] by auto |
63040 | 6065 |
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
|
6066 |
{ |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6067 |
fix x |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6068 |
assume "x \<in> s" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6069 |
fix i :: 'a |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6070 |
assume i: "i \<in> Basis" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6071 |
then have "(-a)\<bullet>i < x\<bullet>i" and "x\<bullet>i < a\<bullet>i" |
60420 | 6072 |
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
|
6073 |
using Basis_le_norm[OF i, of x] |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6074 |
unfolding inner_simps and a_def |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6075 |
by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6076 |
} |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6077 |
then show ?thesis |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6078 |
by (auto intro: exI[where x=a] simp add: box_def) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6079 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6080 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6081 |
lemma bounded_subset_open_interval: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6082 |
fixes s :: "('a::euclidean_space) set" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6083 |
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
|
6084 |
by (auto dest!: bounded_subset_box_symmetric) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6085 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6086 |
lemma bounded_subset_cbox_symmetric: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6087 |
fixes s :: "('a::euclidean_space) set" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6088 |
assumes "bounded s" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6089 |
shows "\<exists>a. s \<subseteq> cbox (-a) a" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6090 |
proof - |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6091 |
obtain a where "s \<subseteq> box (-a) a" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6092 |
using bounded_subset_box_symmetric[OF assms] by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6093 |
then show ?thesis |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6094 |
using box_subset_cbox[of "-a" a] by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6095 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6096 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6097 |
lemma bounded_subset_cbox: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6098 |
fixes s :: "('a::euclidean_space) set" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6099 |
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
|
6100 |
using bounded_subset_cbox_symmetric[of s] by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6101 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6102 |
lemma frontier_cbox: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6103 |
fixes a b :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6104 |
shows "frontier (cbox a b) = cbox a b - box a b" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6105 |
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
|
6106 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6107 |
lemma frontier_box: |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6108 |
fixes a b :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6109 |
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
|
6110 |
proof (cases "box a b = {}") |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6111 |
case True |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6112 |
then show ?thesis |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6113 |
using frontier_empty by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6114 |
next |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6115 |
case False |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6116 |
then show ?thesis |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6117 |
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
|
6118 |
by auto |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6119 |
qed |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6120 |
|
66884
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents:
66827
diff
changeset
|
6121 |
lemma Int_interval_mixed_eq_empty: |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6122 |
fixes a :: "'a::euclidean_space" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6123 |
assumes "box c d \<noteq> {}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6124 |
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
|
6125 |
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
|
6126 |
unfolding open_Int_closure_eq_empty[OF open_box] .. |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6127 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6128 |
lemma eucl_less_eq_halfspaces: |
61076 | 6129 |
fixes a :: "'a::euclidean_space" |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6130 |
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
|
6131 |
"{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
|
6132 |
by (auto simp: eucl_less_def) |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6133 |
|
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6134 |
lemma open_Collect_eucl_less[simp, intro]: |
61076 | 6135 |
fixes a :: "'a::euclidean_space" |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6136 |
shows "open {x. x <e a}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6137 |
"open {x. a <e x}" |
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
6138 |
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
|
6139 |
|
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54489
diff
changeset
|
6140 |
no_notation |
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54489
diff
changeset
|
6141 |
eucl_less (infix "<e" 50) |
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54489
diff
changeset
|
6142 |
|
33175 | 6143 |
end |