equal
deleted
inserted
replaced
1 (* Author: L C Paulson, University of Cambridge |
1 (* Author: L C Paulson, University of Cambridge |
2 Material split off from Topology_Euclidean_Space |
2 Material split off from Topology_Euclidean_Space |
3 *) |
3 *) |
4 |
4 |
5 section \<open>Connected Components, Homeomorphisms, Baire property, etc.\<close> |
5 section \<open>Connected Components, Homeomorphisms, Baire property, etc\<close> |
6 |
6 |
7 theory Connected |
7 theory Connected |
8 imports Topology_Euclidean_Space |
8 imports Topology_Euclidean_Space |
9 begin |
9 begin |
10 |
10 |
11 subsection%unimportant \<open>More properties of closed balls, spheres, etc.\<close> |
11 subsection%unimportant \<open>More properties of closed balls, spheres, etc\<close> |
12 |
12 |
13 lemma mem_interior_cball: "x \<in> interior S \<longleftrightarrow> (\<exists>e>0. cball x e \<subseteq> S)" |
13 lemma mem_interior_cball: "x \<in> interior S \<longleftrightarrow> (\<exists>e>0. cball x e \<subseteq> S)" |
14 apply (simp add: interior_def, safe) |
14 apply (simp add: interior_def, safe) |
15 apply (force simp: open_contains_cball) |
15 apply (force simp: open_contains_cball) |
16 apply (rule_tac x="ball x e" in exI) |
16 apply (rule_tac x="ball x e" in exI) |
959 ultimately show "\<exists>y \<in> \<Inter>\<G>. dist y x < e" |
959 ultimately show "\<exists>y \<in> \<Inter>\<G>. dist y x < e" |
960 by auto |
960 by auto |
961 qed |
961 qed |
962 qed |
962 qed |
963 |
963 |
964 subsection%unimportant \<open>Some theorems on sups and infs using the notion "bounded".\<close> |
964 subsection%unimportant \<open>Some theorems on sups and infs using the notion "bounded"\<close> |
965 |
965 |
966 lemma bounded_real: "bounded (S::real set) \<longleftrightarrow> (\<exists>a. \<forall>x\<in>S. \<bar>x\<bar> \<le> a)" |
966 lemma bounded_real: "bounded (S::real set) \<longleftrightarrow> (\<exists>a. \<forall>x\<in>S. \<bar>x\<bar> \<le> a)" |
967 by (simp add: bounded_iff) |
967 by (simp add: bounded_iff) |
968 |
968 |
969 lemma bounded_imp_bdd_above: "bounded S \<Longrightarrow> bdd_above (S :: real set)" |
969 lemma bounded_imp_bdd_above: "bounded S \<Longrightarrow> bdd_above (S :: real set)" |
1137 by (metis continuous_attains_inf) |
1137 by (metis continuous_attains_inf) |
1138 with that show ?thesis by fastforce |
1138 with that show ?thesis by fastforce |
1139 qed |
1139 qed |
1140 |
1140 |
1141 |
1141 |
1142 subsection%unimportant\<open>Relations among convergence and absolute convergence for power series.\<close> |
1142 subsection%unimportant\<open>Relations among convergence and absolute convergence for power series\<close> |
1143 |
1143 |
1144 lemma summable_imp_bounded: |
1144 lemma summable_imp_bounded: |
1145 fixes f :: "nat \<Rightarrow> 'a::real_normed_vector" |
1145 fixes f :: "nat \<Rightarrow> 'a::real_normed_vector" |
1146 shows "summable f \<Longrightarrow> bounded (range f)" |
1146 shows "summable f \<Longrightarrow> bounded (range f)" |
1147 by (frule summable_LIMSEQ_zero) (simp add: convergent_imp_bounded) |
1147 by (frule summable_LIMSEQ_zero) (simp add: convergent_imp_bounded) |
1513 by (auto simp: bounded_any_center[where a=x0] intro!: exI[where x="b + e"]) |
1513 by (auto simp: bounded_any_center[where a=x0] intro!: exI[where x="b + e"]) |
1514 ultimately show "compact {x. infdist x A \<le> e}" |
1514 ultimately show "compact {x. infdist x A \<le> e}" |
1515 by (simp add: compact_eq_bounded_closed) |
1515 by (simp add: compact_eq_bounded_closed) |
1516 qed |
1516 qed |
1517 |
1517 |
1518 subsection%unimportant \<open>Equality of continuous functions on closure and related results.\<close> |
1518 subsection%unimportant \<open>Equality of continuous functions on closure and related results\<close> |
1519 |
1519 |
1520 lemma continuous_closedin_preimage_constant: |
1520 lemma continuous_closedin_preimage_constant: |
1521 fixes f :: "_ \<Rightarrow> 'b::t1_space" |
1521 fixes f :: "_ \<Rightarrow> 'b::t1_space" |
1522 shows "continuous_on S f \<Longrightarrow> closedin (subtopology euclidean S) {x \<in> S. f x = a}" |
1522 shows "continuous_on S f \<Longrightarrow> closedin (subtopology euclidean S) {x \<in> S. f x = a}" |
1523 using continuous_closedin_preimage[of S f "{a}"] by (simp add: vimage_def Collect_conj_eq) |
1523 using continuous_closedin_preimage[of S f "{a}"] by (simp add: vimage_def Collect_conj_eq) |
2045 fixes f :: "'a :: heine_borel \<Rightarrow> 'b :: heine_borel" |
2045 fixes f :: "'a :: heine_borel \<Rightarrow> 'b :: heine_borel" |
2046 assumes "uniformly_continuous_on S f" "bounded S" |
2046 assumes "uniformly_continuous_on S f" "bounded S" |
2047 shows "bounded(f ` S)" |
2047 shows "bounded(f ` S)" |
2048 by (metis (no_types, lifting) assms bounded_closure_image compact_closure compact_continuous_image compact_eq_bounded_closed image_cong uniformly_continuous_imp_continuous uniformly_continuous_on_extension_on_closure) |
2048 by (metis (no_types, lifting) assms bounded_closure_image compact_closure compact_continuous_image compact_eq_bounded_closed image_cong uniformly_continuous_imp_continuous uniformly_continuous_on_extension_on_closure) |
2049 |
2049 |
2050 subsection%unimportant \<open>Making a continuous function avoid some value in a neighbourhood.\<close> |
2050 subsection%unimportant \<open>Making a continuous function avoid some value in a neighbourhood\<close> |
2051 |
2051 |
2052 lemma continuous_within_avoid: |
2052 lemma continuous_within_avoid: |
2053 fixes f :: "'a::metric_space \<Rightarrow> 'b::t1_space" |
2053 fixes f :: "'a::metric_space \<Rightarrow> 'b::t1_space" |
2054 assumes "continuous (at x within s) f" |
2054 assumes "continuous (at x within s) f" |
2055 and "f x \<noteq> a" |
2055 and "f x \<noteq> a" |
2361 unfolding subset_eq by auto |
2361 unfolding subset_eq by auto |
2362 then show "x \<in> interior ((+) a ` S)" |
2362 then show "x \<in> interior ((+) a ` S)" |
2363 unfolding mem_interior using \<open>e > 0\<close> by auto |
2363 unfolding mem_interior using \<open>e > 0\<close> by auto |
2364 qed |
2364 qed |
2365 |
2365 |
2366 subsection \<open>Continuity implies uniform continuity on a compact domain.\<close> |
2366 subsection \<open>Continuity implies uniform continuity on a compact domain\<close> |
2367 |
2367 |
2368 text\<open>From the proof of the Heine-Borel theorem: Lemma 2 in section 3.7, page 69 of |
2368 text\<open>From the proof of the Heine-Borel theorem: Lemma 2 in section 3.7, page 69 of |
2369 J. C. Burkill and H. Burkill. A Second Course in Mathematical Analysis (CUP, 2002)\<close> |
2369 J. C. Burkill and H. Burkill. A Second Course in Mathematical Analysis (CUP, 2002)\<close> |
2370 |
2370 |
2371 lemma Heine_Borel_lemma: |
2371 lemma Heine_Borel_lemma: |
2664 ultimately show ?thesis |
2664 ultimately show ?thesis |
2665 using continuous_attains_sup[of "s \<times> s" "\<lambda>x. dist (fst x) (snd x)"] by auto |
2665 using continuous_attains_sup[of "s \<times> s" "\<lambda>x. dist (fst x) (snd x)"] by auto |
2666 qed |
2666 qed |
2667 |
2667 |
2668 |
2668 |
2669 subsection \<open>The diameter of a set.\<close> |
2669 subsection \<open>The diameter of a set\<close> |
2670 |
2670 |
2671 definition%important diameter :: "'a::metric_space set \<Rightarrow> real" where |
2671 definition%important diameter :: "'a::metric_space set \<Rightarrow> real" where |
2672 "diameter S = (if S = {} then 0 else SUP (x,y):S\<times>S. dist x y)" |
2672 "diameter S = (if S = {} then 0 else SUP (x,y):S\<times>S. dist x y)" |
2673 |
2673 |
2674 lemma diameter_empty [simp]: "diameter{} = 0" |
2674 lemma diameter_empty [simp]: "diameter{} = 0" |
3012 finally show False by simp |
3012 finally show False by simp |
3013 qed |
3013 qed |
3014 qed |
3014 qed |
3015 |
3015 |
3016 |
3016 |
3017 subsection%unimportant \<open>Compact sets and the closure operation.\<close> |
3017 subsection%unimportant \<open>Compact sets and the closure operation\<close> |
3018 |
3018 |
3019 lemma closed_scaling: |
3019 lemma closed_scaling: |
3020 fixes S :: "'a::real_normed_vector set" |
3020 fixes S :: "'a::real_normed_vector set" |
3021 assumes "closed S" |
3021 assumes "closed S" |
3022 shows "closed ((\<lambda>x. c *\<^sub>R x) ` S)" |
3022 shows "closed ((\<lambda>x. c *\<^sub>R x) ` S)" |
3319 and "a \<in> s \<Longrightarrow> f a = g a" |
3319 and "a \<in> s \<Longrightarrow> f a = g a" |
3320 shows "continuous_on s (\<lambda>t. if t \<le> a then f(t) else g(t))" |
3320 shows "continuous_on s (\<lambda>t. if t \<le> a then f(t) else g(t))" |
3321 using assms |
3321 using assms |
3322 by (auto simp: continuous_on_id intro: continuous_on_cases_le [where h = id, simplified]) |
3322 by (auto simp: continuous_on_id intro: continuous_on_cases_le [where h = id, simplified]) |
3323 |
3323 |
3324 subsubsection\<open>Some more convenient intermediate-value theorem formulations.\<close> |
3324 subsubsection\<open>Some more convenient intermediate-value theorem formulations\<close> |
3325 |
3325 |
3326 lemma connected_ivt_hyperplane: |
3326 lemma connected_ivt_hyperplane: |
3327 assumes "connected S" and xy: "x \<in> S" "y \<in> S" and b: "inner a x \<le> b" "b \<le> inner a y" |
3327 assumes "connected S" and xy: "x \<in> S" "y \<in> S" and b: "inner a x \<le> b" "b \<le> inner a y" |
3328 shows "\<exists>z \<in> S. inner a z = b" |
3328 shows "\<exists>z \<in> S. inner a z = b" |
3329 proof (rule ccontr) |
3329 proof (rule ccontr) |
3899 ultimately show ?thesis |
3899 ultimately show ?thesis |
3900 by (simp add: continuous_on_closed oo) |
3900 by (simp add: continuous_on_closed oo) |
3901 qed |
3901 qed |
3902 |
3902 |
3903 |
3903 |
3904 subsection \<open>"Isometry" (up to constant bounds) of injective linear map etc.\<close> |
3904 subsection \<open>"Isometry" (up to constant bounds) of injective linear map etc\<close> |
3905 |
3905 |
3906 lemma cauchy_isometric: |
3906 lemma cauchy_isometric: |
3907 assumes e: "e > 0" |
3907 assumes e: "e > 0" |
3908 and s: "subspace s" |
3908 and s: "subspace s" |
3909 and f: "bounded_linear f" |
3909 and f: "bounded_linear f" |
4974 qed |
4974 qed |
4975 qed |
4975 qed |
4976 |
4976 |
4977 |
4977 |
4978 |
4978 |
4979 subsection\<open>A couple of lemmas about components (see Newman IV, 3.3 and 3.4).\<close> |
4979 subsection\<open>A couple of lemmas about components (see Newman IV, 3.3 and 3.4)\<close> |
4980 |
4980 |
4981 |
4981 |
4982 lemma connected_Un_clopen_in_complement: |
4982 lemma connected_Un_clopen_in_complement: |
4983 fixes S U :: "'a::metric_space set" |
4983 fixes S U :: "'a::metric_space set" |
4984 assumes "connected S" "connected U" "S \<subseteq> U" |
4984 assumes "connected S" "connected U" "S \<subseteq> U" |