definition✐‹tag important› pathstart :: "(real → 'a::topological_space) → 'a" where"pathstart g ≡ g 0"
definition✐‹tag important› pathfinish :: "(real → 'a::topological_space) → 'a" where"pathfinish g ≡ g 1"
definition✐‹tag important› path_image :: "(real → 'a::topological_space) → 'a set" where"path_image g ≡ g ` {0 .. 1}"
definition✐‹tag important› reversepath :: "(real → 'a::topological_space) → real → 'a" where"reversepath g ≡ (λx. g(1 - x))"
definition✐‹tag important› joinpaths :: "(real → 'a::topological_space) → (real → 'a)→ real → 'a"
(infixr‹+++›75) where"g1 +++ g2 ≡ (λx. if x ≤ 1/2 then g1 (2 * x) else g2 (2 * x - 1))"
definition✐‹tag important› loop_free :: "(real → 'a::topological_space) → bool" where"loop_free g ≡∀x∈{0..1}. ∀y∈{0..1}. g x = g y ⟶ x = y ∨ x = 0 ∧ y = 1 ∨ x = 1 ∧ y = 0"
definition✐‹tag important› simple_path :: "(real → 'a::topological_space) → bool" where"simple_path g ≡ path g ∧ loop_free g"
definition✐‹tag important› arc :: "(real → 'a :: topological_space) → bool" where"arc g ≡ path g ∧ inj_on g {0..1}"
lemma path_eq: "path p ==> (∧t. t ∈ {0..1} ==> p t = q t) ==> path q" using continuous_on_eq path_def by blast
lemma path_continuous_image: "path g ==> continuous_on (path_image g) f ==> path(f∘ g)" unfolding path_def path_image_def using continuous_on_compose by blast
lemma path_translation_eq: fixes g :: "real → 'a :: real_normed_vector" shows"path((λx. a + x) ∘ g) = path g" using continuous_on_translation_eq path_def by blast
lemma path_linear_image_eq: fixes f :: "'a::euclidean_space → 'b::euclidean_space" assumes"linear f""inj f" shows"path(f ∘ g) = path g" proof - from linear_injective_left_inverse [OF assms] obtain h where h: "linear h""h ∘ f = id" by blast with assms show ?thesis by (metis comp_assoc id_comp linear_continuous_on linear_linear path_continuous_image) qed
lemma pathstart_translation: "pathstart((λx. a + x) ∘ g) = a + pathstart g" by (simp add: pathstart_def)
lemma pathstart_linear_image_eq: "linear f ==> pathstart(f ∘ g) = f(pathstart g)" by (simp add: pathstart_def)
lemma pathfinish_translation: "pathfinish((λx. a + x) ∘ g) = a + pathfinish g" by (simp add: pathfinish_def)
lemma pathfinish_linear_image: "linear f ==> pathfinish(f ∘ g) = f(pathfinish g)" by (simp add: pathfinish_def)
lemma path_image_translation: "path_image((λx. a + x) ∘ g) = (λx. a + x) ` (path_image g)" by (simp add: image_comp path_image_def)
lemma path_image_linear_image: "linear f ==> path_image(f ∘ g) = f ` (path_image g)" by (simp add: image_comp path_image_def)
lemma reversepath_translation: "reversepath((λx. a + x) ∘ g) = (λx. a + x) ∘ reversepath g" by (rule ext) (simp add: reversepath_def)
lemma reversepath_linear_image: "linear f ==> reversepath(f ∘ g) = f ∘ reversepath g" by (rule ext) (simp add: reversepath_def)
lemma joinpaths_translation: "((λx. a + x) ∘ g1) +++ ((λx. a + x) ∘ g2) = (λx. a + x) ∘ (g1 +++ g2)" by (rule ext) (simp add: joinpaths_def)
lemma joinpaths_linear_image: "linear f ==> (f ∘ g1) +++ (f ∘ g2) = f ∘ (g1 +++ g2)" by (rule ext) (simp add: joinpaths_def)
lemma loop_free_translation_eq: fixes g :: "real → 'a::euclidean_space" shows"loop_free((λx. a + x) ∘ g) = loop_free g" by (simp add: loop_free_def)
lemma simple_path_translation_eq: fixes g :: "real → 'a::euclidean_space" shows"simple_path((λx. a + x) ∘ g) = simple_path g" by (simp add: simple_path_def loop_free_translation_eq path_translation_eq)
lemma loop_free_linear_image_eq: fixes f :: "'a::euclidean_space → 'b::euclidean_space" assumes"linear f""inj f" shows"loop_free(f ∘ g) = loop_free g" using assms inj_on_eq_iff [of f] by (auto simp: loop_free_def)
lemma simple_path_linear_image_eq: fixes f :: "'a::euclidean_space → 'b::euclidean_space" assumes"linear f""inj f" shows"simple_path(f ∘ g) = simple_path g" using assms by (simp add: loop_free_linear_image_eq path_linear_image_eq simple_path_def)
lemma simple_pathI [intro?]: assumes"path p" assumes"∧x y. 0 ≤ x ==> x < y ==> y ≤ 1 ==> p x = p y ==> x = 0 ∧ y = 1" shows"simple_path p" unfolding simple_path_def loop_free_def proof (intro ballI conjI impI) fix x y assume"x ∈ {0..1}""y ∈ {0..1}""p x = p y" thus"x = y ∨ x = 0 ∧ y = 1 ∨ x = 1 ∧ y = 0" by (metis assms(2) atLeastAtMost_iff linorder_less_linear) qed fact+
lemma arcD: "arc p ==> p x = p y ==> x ∈ {0..1} ==> y ∈ {0..1} ==> x = y" by (auto simp: arc_def inj_on_def)
lemma arc_translation_eq: fixes g :: "real → 'a::euclidean_space" shows"arc((λx. a + x) ∘ g) ⟷ arc g" by (auto simp: arc_def inj_on_def path_translation_eq)
lemma arc_linear_image_eq: fixes f :: "'a::euclidean_space → 'b::euclidean_space" assumes"linear f""inj f" shows"arc(f ∘ g) = arc g" using assms inj_on_eq_iff [of f] by (auto simp: arc_def inj_on_def path_linear_image_eq)
subsection✐‹tag unimportant›‹Basic lemmas about paths›
lemma path_compose_reversepath: "f ∘ reversepath p = reversepath(f ∘ p)" by (rule ext) (simp add: reversepath_def)
lemma joinpaths_eq: "(∧t. t ∈ {0..1} ==> p t = p' t) ==> (∧t. t ∈ {0..1} ==> q t = q' t) ==> t ∈ {0..1} ==> (p +++ q) t = (p' +++ q') t" by (auto simp: joinpaths_def)
lemma loop_free_inj_on: "loop_free g ==> inj_on g {0<..<1}" by (force simp: inj_on_def loop_free_def)
lemma simple_path_inj_on: "simple_path g ==> inj_on g {0<..<1}" using loop_free_inj_on simple_path_def by auto
subsection✐‹tag unimportant›\<open>Simple paths with the endpoints removed›
lemma simple_path_endless: assumes"simple_path c" shows"path_image c - {pathstart c,pathfinish c} = c ` {0<..<1}" (is"?lhs = ?rhs") proof show"?lhs ⊆ ?rhs" using less_eq_real_def by (auto simp: path_image_def pathstart_def pathfinish_def) show"?rhs ⊆ ?lhs" using assms apply (simp add: image_subset_iff path_image_def pathstart_def pathfinish_def simple_path_def loop_free_def Ball_def) by (smt (verit)) qed
lemma connected_simple_path_endless: assumes"simple_path c" shows"connected(path_image c - {pathstart c,pathfinish c})" proof - have"continuous_on {0<..<1} c" using assms by (simp add: simple_path_def continuous_on_path path_def subset_iff) thenhave"connected (c ` {0<..<1})" using connected_Ioo connected_continuous_image by blast thenshow ?thesis using assms by (simp add: simple_path_endless) qed
lemma nonempty_simple_path_endless: "simple_path c ==> path_image c - {pathstart c,pathfinish c} ≠ {}" by (simp add: simple_path_endless)
lemma simple_path_continuous_image: assumes"simple_path f""continuous_on (path_image f) g""inj_on g (path_image f)" shows"simple_path (g ∘ f)" unfolding simple_path_def proof show"path (g ∘ f)" using assms unfolding simple_path_def by (intro path_continuous_image) auto from assms have [simp]: "g (f x) = g (f y) ⟷ f x = f y"if"x ∈ {0..1}""y ∈ {0..1}"forx y unfolding inj_on_def path_image_def using that by fastforce show"loop_free (g ∘ f)" using assms(1) by (auto simp: loop_free_def simple_path_def) qed
subsection✐‹tag unimportant›‹The operations on paths›
lemmapath_component_path_image_pathstart: assumesp:"pathp"andx:"x\<in>path_imagep" shows"path_component(path_imagep)(pathstartp)x" proof- obtainywherex:"x=py"andy:"0\<le>y""y\<le>1" usingxby(autosimp:path_image_def) show?thesis unfoldingpath_component_def proof(introexIconjI)
have "continuous_on ((*) y ` {0..1}) p" by (simp add: continuous_on_path image_mult_atLeastAtMost_if p y) then have "continuous_on {0..1} (p ∘ ((*) y))" using continuous_on_compose continuous_on_mult_const by blast thenshow"path (λu. p (y * u))" by (simp add: path_def) show"path_image (λu. p (y * u)) ⊆ path_image p" using y mult_le_one by (fastforce simp: path_image_def image_iff) qed (auto simp: pathstart_def pathfinish_def x) qed
lemma path_connected_path_image: "path p ==> path_connected(path_image p)" unfolding path_connected_component by (meson path_component_path_image_pathstart path_component_sym path_component_trans)
lemma path_connected_path_component [simp]: "path_connected (path_component_set S x)" by (smt (verit) mem_Collect_eq path_component_def path_component_eq path_component_maximal
path_connected_component path_connected_path_image pathstart_in_path_image)
lemma path_component: "path_component S x y ⟷ (∃t. path_connected t ∧ t ⊆ S ∧ x ∈ t ∧ y ∈ t)"
(is"?lhs = ?rhs") proof assume ?lhs thenshow ?rhs by (metis path_component_def path_connected_path_image pathfinish_in_path_image pathstart_in_path_image) next assume ?rhs thenshow ?lhs by (meson path_component_of_subset path_connected_component) qed
lemma path_component_path_component [simp]: "path_component_set (path_component_set S x) x = path_component_set S x" by (metis (full_types) mem_Collect_eq path_component_eq_empty path_component_refl path_connected_component_set path_connected_path_component)
lemma path_component_subset_connected_component: "(path_component_set S x) ⊆ (connected_component_set S x)" proof (cases "x ∈ S") case True show ?thesis by (simp add: True connected_component_maximal path_component_refl path_component_subset path_connected_imp_connected) next case False thenshow ?thesis using path_component_eq_empty by auto qed
subsection✐‹tag unimportant›\<open>Lemmas about path-connectedness›
lemma path_connected_linear_image: fixes f :: "'a::real_normed_vector → 'b::real_normed_vector" assumes"path_connected S""bounded_linear f" shows"path_connected(f ` S)" by (auto simp: linear_continuous_on assms path_connected_continuous_image)
lemma is_interval_path_connected: "is_interval S ==> path_connected S" by (simp add: convex_imp_path_connected is_interval_convex)
lemma path_connected_Ioi[simp]: "path_connected {a<..}"for a :: real by (simp add: convex_imp_path_connected)
lemma path_connected_Ici[simp]: "path_connected {a..}"for a :: real by (simp add: convex_imp_path_connected)
lemma path_connected_Iio[simp]: "path_connected {..<a}"for a :: real by (simp add: convex_imp_path_connected)
lemma path_connected_Iic[simp]: "path_connected {..a}"for a :: real by (simp add: convex_imp_path_connected)
lemma path_connected_Ioo[simp]: "path_connected {a<..<b}"for a b :: real by (simp add: convex_imp_path_connected)
lemma path_connected_Ioc[simp]: "path_connected {a<..b}"for a b :: real by (simp add: convex_imp_path_connected)
lemma path_connected_Ico[simp]: "path_connected {a..<b}"for a b :: real by (simp add: convex_imp_path_connected)
lemma path_connectedin_path_image: assumes"pathin X g"shows"path_connectedin X (g ` ({0..1}))" unfolding pathin_def proof (rule path_connectedin_continuous_map_image) show"continuous_map (subtopology euclideanreal {0..1}) X g" using assms pathin_def by blast qed (auto simp: is_interval_1 is_interval_path_connected)
lemma path_connected_space_subconnected: "path_connected_space X ⟷ (∀x ∈ topspace X. ∀y ∈ topspace X. ∃S. path_connectedin X S ∧ x ∈ S ∧ y ∈ S)" by (metis path_connectedin path_connectedin_topspace path_connected_space_def)
lemma connectedin_path_image: "pathin X g ==> connectedin X (g ` ({0..1}))" by (simp add: path_connectedin_imp_connectedin path_connectedin_path_image)
lemma compactin_path_image: "pathin X g ==> compactin X (g ` ({0..1}))" unfolding pathin_def by (rule image_compactin [of "top_of_set {0..1}"]) auto
lemma linear_homeomorphism_image: fixes f :: "'a::euclidean_space → 'b::euclidean_space" assumes"linear f""inj f" obtains g where"homeomorphism (f ` S) S g f" proof - obtain g where"linear g""g ∘ f = id" using assms linear_injective_left_inverse by blast thenhave"homeomorphism (f ` S) S g f" using assms unfolding homeomorphism_def by (auto simp: eq_id_iff [symmetric] image_comp linear_conv_bounded_linear linear_continuous_on) thenshow thesis .. qed
lemma linear_homeomorphic_image: fixes f :: "'a::euclidean_space → 'b::euclidean_space" assumes"linear f""inj f" shows"S homeomorphic f ` S" by (meson homeomorphic_def homeomorphic_sym linear_homeomorphism_image [OF assms])
lemmapath_component_eq_eq: "path_componentSx=path_componentSy\<longleftrightarrow> (x\<notin>S)\<and>(y\<notin>S)\<or>x\<in>S\<and>y\<in>S\<and>path_componentSxy" (is"?lhs=?rhs") proof assume?lhsthenshow?rhs by(metis(no_types)path_component_mem(1)path_component_refl) next assume?rhsthenshow?lhs proof assume"x\<notin>S\<and>y\<notin>S"thenshow?lhs by(metisCollect_empty_eq_botpath_component_eq_empty) next assumeS:"x\<in>S\<and>y\<in>S\<and>path_componentSxy"show?lhs by(ruleext)(metisSpath_component_transpath_component_sym) qed qed
lemmacomplement_path_component_Union: fixesx::"'a::topological_space" shows"S-path_component_setSx= \<Union>({path_component_setSy|y.y\<in>S}-{path_component_setSx})" proof- have*:"(\<And>x.x\<in>S-{a}\<Longrightarrow>disjntax)\<Longrightarrow>\<Union>S-a=\<Union>(S-{a})" fora::"'aset"andS by(autosimp:disjnt_def) have"\<And>y.y\<in>{path_component_setSx|x.x\<in>S}-{path_component_setSx} \<Longrightarrow>disjnt(path_component_setSx)y" usingpath_component_disjointpath_component_eqbyfastforce thenhave"\<Union>{path_component_setSx|x.x\<in>S}-path_component_setSx= \<Union>({path_component_setSy|y.y\<in>S}-{path_component_setSx})"
by (meson *) thenshow ?thesis by simp qed
subsection‹Path components›
definition path_component_of where"path_component_of X x y ≡∃g. pathin X g ∧ g 0 = x ∧ g 1 = y"
abbreviation path_component_of_set where"path_component_of_set X x ≡ Collect (path_component_of X x)"
definition path_components_of :: "'a topology → 'a set set" where"path_components_of X ≡ path_component_of_set X ` topspace X"
lemma pathin_canon_iff: "pathin (top_of_set T) g ⟷ path g ∧ g ∈ {0..1} → T" by (simp add: path_def pathin_def image_subset_iff_funcset)
lemma path_component_of_canon_iff [simp]: "path_component_of (top_of_set T) a b ⟷ path_component T a b" by (simp add: path_component_of_def pathin_canon_iff path_defs image_subset_iff_funcset)
lemma path_component_in_topspace: "path_component_of X x y ==> x ∈ topspace X ∧ y ∈ topspace X" by (auto simp: path_component_of_def pathin_def continuous_map_def)
lemma path_component_of_refl: "path_component_of X x x ⟷ x ∈ topspace X" by (metis path_component_in_topspace path_component_of_def pathin_const)
lemma path_component_of_sym: assumes"path_component_of X x y" shows"path_component_of X y x" using assms apply (clarsimp simp: path_component_of_def pathin_def) apply (rule_tac x="g ∘ (λt. 1 - t)"in exI) apply (auto intro!: continuous_map_compose simp: continuous_map_in_subtopology continuous_on_op_minus) done
lemma path_component_of_sym_iff: "path_component_of X x y ⟷ path_component_of X y x" by (metis path_component_of_sym)
lemma continuous_map_cases_le: assumes contp: "continuous_map X euclideanreal p" and contq: "continuous_map X euclideanreal q" and contf: "continuous_map (subtopology X {x. x ∈ topspace X ∧ p x ≤ q x}) Y f" and contg: "continuous_map (subtopology X {x. x ∈ topspace X ∧ q x ≤ p x}) Y g" and fg: "∧x. [x ∈ topspace X; p x = q x]==> f x = g x" shows"continuous_map X Y (λx. if p x ≤ q x then f x else g x)" proof - have"continuous_map X Y (λx. if q x - p x ∈ {0..} then f x else g x)" proof (rule continuous_map_cases_function) show"continuous_map X euclideanreal (λx. q x - p x)" by (intro contp contq continuous_intros) show"continuous_map (subtopology X {x ∈ topspace X. q x - p x ∈ euclideanreal closure_of {0..}}) Y f" by (simp add: contf) show"continuous_map (subtopology X {x ∈ topspace X. q x - p x ∈ euclideanreal closure_of (topspace euclideanreal - {0..})}) Y g" by (simp add: contg flip: Compl_eq_Diff_UNIV) qed (auto simp: fg) thenshow ?thesis by simp qed
lemma continuous_map_cases_lt: assumes contp: "continuous_map X euclideanreal p" and contq: "continuous_map X euclideanreal q" and contf: "continuous_map (subtopology X {x. x ∈ topspace X ∧ p x ≤ q x}) Y f" and contg: "continuous_map (subtopology X {x. x ∈ topspace X ∧ q x ≤ p x}) Y g" and fg: "∧x. [x ∈ topspace X; p x = q x]==> f x = g x" shows"continuous_map X Y (λx. if p x < q x then f x else g x)" proof - have"continuous_map X Y (λx. if q x - p x ∈ {0<..} then f x else g x)" proof (rule continuous_map_cases_function) show"continuous_map X euclideanreal (λx. q x - p x)" by (intro contp contq continuous_intros) show"continuous_map (subtopology X {x ∈ topspace X. q x - p x ∈ euclideanreal closure_of {0<..}}) Y f" by (simp add: contf) show"continuous_map (subtopology X {x ∈ topspace X. q x - p x ∈ euclideanreal closure_of (topspace euclideanreal - {0<..})}) Y g" by (simp add: contg flip: Compl_eq_Diff_UNIV) qed (auto simp: fg) thenshow ?thesis by simp qed
lemma path_component_of_trans: assumes"path_component_of X x y"and"path_component_of X y z" shows"path_component_of X x z" unfolding path_component_of_def pathin_def proof - let ?T01 = "top_of_set {0..1::real}" obtain g1 g2 where g1: "continuous_map ?T01 X g1""x = g1 0""y = g1 1" and g2: "continuous_map ?T01 X g2""g2 0 = g1 1""z = g2 1" using assms unfolding path_component_of_def pathin_def by blast let ?g = "λx. if x ≤ 1/2 then (g1 ∘ (λt. 2 * t)) x else (g2 ∘ (λt. 2 * t -1)) x" show"∃g. continuous_map ?T01 X g ∧ g 0 = x ∧ g 1 = z" proof (intro exI conjI) show"continuous_map (subtopology euclideanreal {0..1}) X ?g" proof (intro continuous_map_cases_le continuous_map_compose, force, force) show"continuous_map (subtopology ?T01 {x ∈ topspace ?T01. x ≤ 1/2}) ?T01 ((*) 2)" by (auto simp: continuous_map_in_subtopology continuous_map_from_subtopology) have"continuous_map (subtopology (top_of_set {0..1}) {x. 0 ≤ x ∧ x ≤ 1 ∧ 1 ≤ x * 2}) euclideanreal (λt. 2 * t - 1)" by (intro continuous_intros) (force intro: continuous_map_from_subtopology) thenshow"continuous_map (subtopology ?T01 {x ∈ topspace ?T01. 1/2 ≤ x}) ?T01 (λt. 2 * t - 1)" by (force simp: continuous_map_in_subtopology) show"(g1 ∘ (*) 2) x = (g2 ∘ (λt. 2 * t - 1)) x"if"x ∈ topspace ?T01""x = 1/2"for x using that by (simp add: g2(2) mult.commute continuous_map_from_subtopology) qed (auto simp: g1 g2) qed (auto simp: g1 g2) qed
lemma path_component_of_mono: "[path_component_of (subtopology X S) x y; S ⊆ T]==> path_component_of (subtopology X T) x y" unfolding path_component_of_def by (metis subsetD pathin_subtopology)
lemma path_component_of: "path_component_of X x y ⟷ (∃T. path_connectedin X T ∧ x ∈ T ∧ y ∈ T)"
(is"?lhs = ?rhs") proof assume ?lhs thenshow ?rhs by (metis atLeastAtMost_iff image_eqI order_refl path_component_of_def path_connectedin_path_image zero_le_one) next assume ?rhs thenshow ?lhs by (metis path_component_of_def path_connectedin) qed
lemma path_component_of_set: "path_component_of X x y ⟷ (∃g. pathin X g ∧ g 0 = x ∧ g 1 = y)" by (auto simp: path_component_of_def)
lemma path_component_of_subset_topspace: "Collect(path_component_of X x) ⊆ topspace X" using path_component_in_topspace by fastforce
lemma path_component_of_eq_empty: "Collect(path_component_of X x) = {} ⟷ (x ∉ topspace X)" using path_component_in_topspace path_component_of_refl by fastforce
lemma path_connected_space_iff_path_component: "path_connected_space X ⟷ (∀x ∈ topspace X. ∀y ∈ topspace X. path_component_of X x y)" by (simp add: path_component_of path_connected_space_subconnected)
lemma path_connected_space_imp_path_component_of: "[path_connected_space X; a ∈ topspace X; b ∈ topspace X] ==> path_component_of X a b" by (simp add: path_connected_space_iff_path_component)
lemma path_connected_space_path_component_set: "path_connected_space X ⟷ (∀x ∈ topspace X. Collect(path_component_of X x) = topspace X)" using path_component_of_subset_topspace path_connected_space_iff_path_component by fastforce
lemma path_component_of_maximal: "[path_connectedin X s; x ∈ s]==> s ⊆ Collect(path_component_of X x)" using path_component_of by fastforce
lemma path_component_of_equiv: "path_component_of X x y ⟷ x ∈ topspace X ∧ y ∈ topspace X ∧ path_component_of X x = path_component_of X y"
(is"?lhs = ?rhs") proof assume ?lhs thenshow ?rhs unfolding fun_eq_iff path_component_in_topspace by (metis path_component_in_topspace path_component_of_sym path_component_of_trans) qed (simp add: path_component_of_refl)
lemma path_component_of_disjoint: "disjnt (Collect (path_component_of X x)) (Collect (path_component_of X y)) ⟷ ~(path_component_of X x y)" by (force simp: disjnt_def path_component_of_eq_empty path_component_of_equiv)
lemma path_component_of_eq: "path_component_of X x = path_component_of X y ⟷ (x ∉ topspace X) ∧ (y ∉ topspace X) ∨ x ∈ topspace X ∧ y ∈ topspace X ∧ path_component_of X x y" by (metis Collect_empty_eq_bot path_component_of_eq_empty path_component_of_equiv)
lemma path_component_of_aux: "path_component_of X x y ==> path_component_of (subtopology X (Collect (path_component_of X x))) x y" by (meson path_component_of path_component_of_maximal path_connectedin_subtopology)
lemma path_connectedin_path_component_of: "path_connectedin X (Collect (path_component_of X x))" proof - have"topspace (subtopology X (path_component_of_set X x)) = path_component_of_set X x" by (meson path_component_of_subset_topspace topspace_subtopology_subset) thenhave"path_connected_space (subtopology X (path_component_of_set X x))" by (metis mem_Collect_eq path_component_of_aux path_component_of_equiv path_connected_space_iff_path_component) thenshow ?thesis by (simp add: path_component_of_subset_topspace path_connectedin_def) qed
lemma path_connectedin_euclidean [simp]: "path_connectedin euclidean S ⟷ path_connected S" by (auto simp: path_connectedin_def path_connected_space_iff_path_component path_connected_component)
lemma path_connected_space_euclidean_subtopology [simp]: "path_connected_space(subtopology euclidean S) ⟷ path_connected S" using path_connectedin_topspace by force
lemma complement_path_components_of_Union: "C ∈ path_components_of X ==> topspace X - C = ∪(path_components_of X - {C})" by (metis Union_path_components_of bot.extremum ccpo_Sup_singleton diff_Union_pairwise_disjoint
insert_subsetI pairwise_disjoint_path_components_of)
lemma path_components_of_subset: "C ∈ path_components_of X ==> C ⊆ topspace X" by (auto simp: path_components_of_def path_component_of_equiv)
lemma path_connectedin_path_components_of: "C ∈ path_components_of X ==> path_connectedin X C" by (auto simp: path_components_of_def path_connectedin_path_component_of)
lemma path_component_in_path_components_of: "Collect (path_component_of X a) ∈ path_components_of X ⟷ a ∈ topspace X" by (metis imageI nonempty_path_components_of path_component_of_eq_empty path_components_of_def)
lemma path_connectedin_Union: assumesA: "∧S. S ∈A==> path_connectedin X S"and"∩A≠ {}" shows"path_connectedin X (∪A)" proof - obtain a where"∧S. S ∈A==> a ∈ S" using assms by blast thenhave"∧x. x ∈ topspace (subtopology X (∪A)) ==> path_component_of (subtopology X (∪A)) a x" unfolding topspace_subtopology path_component_of by (metis (full_types) IntD2 Union_iff Union_upper A path_connectedin_subtopology) thenshow ?thesis usingAunfolding path_connectedin_def by (metis Sup_le_iff path_component_of_equiv path_connected_space_iff_path_component) qed
lemma path_connectedin_Un: "[path_connectedin X S; path_connectedin X T; S ∩ T ≠ {}] ==> path_connectedin X (S ∪ T)" by (blast intro: path_connectedin_Union [of "{S,T}", simplified])
lemma path_connected_space_iff_components_eq: "path_connected_space X ⟷ (∀C ∈ path_components_of X. ∀C' ∈ path_components_of X. C = C')" unfolding path_components_of_def proof (intro iffI ballI) assume"∀C ∈ path_component_of_set X ` topspace X. ∀C' ∈ path_component_of_set X ` topspace X. C = C'" thenshow"path_connected_space X" using path_component_of_refl path_connected_space_iff_path_component by fastforce qed (auto simp: path_connected_space_path_component_set)
lemma path_components_of_eq_empty: "path_components_of X = {} ⟷ X = trivial_topology" by (metis image_is_empty path_components_of_def subtopology_eq_discrete_topology_empty)
lemma path_components_of_empty_space: "path_components_of trivial_topology = {}" by (simp add: path_components_of_eq_empty)
lemma path_components_of_subset_singleton: "path_components_of X ⊆ {S} ⟷ path_connected_space X ∧ (topspace X = {} ∨ topspace X = S)" proof (cases "topspace X = {}") case True thenshow ?thesis by (auto simp: path_components_of_empty_space path_connected_space_topspace_empty) next case False have"(path_components_of X = {S}) ⟷ (path_connected_space X ∧ topspace X = S)" by (metis False Set.set_insert ex_in_conv insert_iff path_component_in_path_components_of
path_connected_space_iff_components_eq path_connected_space_path_component_set) with False show ?thesis by (simp add: path_components_of_eq_empty subset_singleton_iff) qed
lemma path_connected_space_iff_components_subset_singleton: "path_connected_space X ⟷ (∃a. path_components_of X ⊆ {a})" by (simp add: path_components_of_subset_singleton)
lemma path_components_of_eq_singleton: "path_components_of X = {S} ⟷ path_connected_space X ∧ topspace X ≠ {} ∧ S = topspace X" by (metis cSup_singleton insert_not_empty path_components_of_subset_singleton subset_singleton_iff)
lemma path_components_of_path_connected_space: "path_connected_space X ==> path_components_of X = (if topspace X = {} then {} else {topspace X})" by (simp add: path_components_of_eq_empty path_components_of_eq_singleton)
lemma path_component_subset_connected_component_of: "path_component_of_set X x ⊆ connected_component_of_set X x" proof (cases "x ∈ topspace X") case True thenshow ?thesis by (simp add: connected_component_of_maximal path_component_of_refl path_connectedin_imp_connectedin path_connectedin_path_component_of) next case False thenshow ?thesis using path_component_of_eq_empty by fastforce qed
lemma exists_path_component_of_superset: assumes S: "path_connectedin X S"and ne: "topspace X ≠ {}" obtains C where"C ∈ path_components_of X""S ⊆ C" by (metis S ne ex_in_conv path_component_in_path_components_of path_component_of_maximal path_component_of_subset_topspace subset_eq that)
lemma path_component_of_eq_overlap: "path_component_of X x = path_component_of X y ⟷ (x ∉ topspace X) ∧ (y ∉ topspace X) ∨ Collect (path_component_of X x) ∩ Collect (path_component_of X y) ≠ {}" by (metis disjnt_def empty_iff inf_bot_right mem_Collect_eq path_component_of_disjoint path_component_of_eq path_component_of_eq_empty)
lemma path_component_of_nonoverlap: "Collect (path_component_of X x) ∩ Collect (path_component_of X y) = {} ⟷ (x ∉ topspace X) ∨ (y ∉ topspace X) ∨ path_component_of X x ≠ path_component_of X y" by (metis inf.idem path_component_of_eq_empty path_component_of_eq_overlap)
lemma path_component_of_overlap: "Collect (path_component_of X x) ∩ Collect (path_component_of X y) ≠ {} ⟷ x ∈ topspace X ∧ y ∈ topspace X ∧ path_component_of X x = path_component_of X y" by (meson path_component_of_nonoverlap)
lemma path_components_of_disjoint: "[C ∈ path_components_of X; C' ∈ path_components_of X]==> disjnt C C' ⟷ C ≠ C'" by (auto simp: path_components_of_def path_component_of_disjoint path_component_of_equiv)
lemma path_components_of_overlap: "[C ∈ path_components_of X; C' ∈ path_components_of X]==> C ∩ C' ≠ {} ⟷ C = C'" by (auto simp: path_components_of_def path_component_of_equiv)
lemma path_component_of_unique: "[x ∈ C; path_connectedin X C; ∧C'. [x ∈ C'; path_connectedin X C']==> C' ⊆ C] ==> Collect (path_component_of X x) = C" by (meson subsetD eq_iff path_component_of_maximal path_connectedin_path_component_of)
lemma path_component_of_discrete_topology [simp]: "Collect (path_component_of (discrete_topology U) x) = (if x ∈ U then {x} else {})" proof - have"∧C'. [x ∈ C'; path_connectedin (discrete_topology U) C']==> C' ⊆ {x}" by (metis path_connectedin_discrete_topology subsetD singletonD) thenhave"x ∈ U ==> Collect (path_component_of (discrete_topology U) x) = {x}" by (simp add: path_component_of_unique) thenshow ?thesis using path_component_in_topspace by fastforce qed
lemma path_component_of_discrete_topology_iff [simp]: "path_component_of (discrete_topology U) x y ⟷ x ∈ U ∧ y=x" by (metis empty_iff insertI1 mem_Collect_eq path_component_of_discrete_topology singletonD)
lemma homeomorphic_map_path_component_of: assumes f: "homeomorphic_map X Y f"and x: "x ∈ topspace X" shows"Collect (path_component_of Y (f x)) = f ` Collect(path_component_of X x)" proof - obtain g where g: "homeomorphic_maps X Y f g" using f homeomorphic_map_maps by blast show ?thesis proof have"Collect (path_component_of Y (f x)) ⊆ topspace Y" by (simp add: path_component_of_subset_topspace) moreoverhave"g ` Collect(path_component_of Y (f x)) ⊆ Collect (path_component_of X (g (f x)))" using f g x unfolding homeomorphic_maps_def by (metis image_Collect_subsetI image_eqI mem_Collect_eq path_component_of_equiv path_component_of_maximal
path_connectedin_continuous_map_image path_connectedin_path_component_of) ultimatelyshow"Collect (path_component_of Y (f x)) ⊆ f ` Collect (path_component_of X x)" using g x unfolding homeomorphic_maps_def continuous_map_def image_iff subset_iff by metis show"f ` Collect (path_component_of X x) ⊆ Collect (path_component_of Y (f x))" proof (rule path_component_of_maximal) show"path_connectedin Y (f ` Collect (path_component_of X x))" by (meson f homeomorphic_map_path_connectedness_eq path_connectedin_path_component_of) qed (simp add: path_component_of_refl x) qed qed
lemma homeomorphic_map_path_components_of: assumes"homeomorphic_map X Y f" shows"path_components_of Y = (image f) ` (path_components_of X)" unfolding path_components_of_def homeomorphic_imp_surjective_map [OF assms, symmetric] using assms homeomorphic_map_path_component_of by fastforce
subsection‹Paths and path-connectedness›
lemma path_connected_space_quotient_map_image: "[quotient_map X Y q; path_connected_space X]==> path_connected_space Y" by (metis path_connectedin_continuous_map_image path_connectedin_topspace quotient_imp_continuous_map quotient_imp_surjective_map)
lemma path_connected_space_retraction_map_image: "[retraction_map X Y r; path_connected_space X]==> path_connected_space Y" using path_connected_space_quotient_map_image retraction_imp_quotient_map by blast
lemma path_connected_space_prod_topology: "path_connected_space(prod_topology X Y) ⟷ topspace(prod_topology X Y) = {} ∨ path_connected_space X ∧ path_connected_space Y" proof (cases "topspace(prod_topology X Y) = {}") case True thenshow ?thesis using path_connected_space_topspace_empty by force next case False have"path_connected_space (prod_topology X Y)" if X: "path_connected_space X"and Y: "path_connected_space Y" proof (clarsimp simp: path_connected_space_def) fix x y x' y' assume"x ∈ topspace X"and"y ∈ topspace Y"and"x' ∈ topspace X"and"y' ∈ topspace Y" obtain f where"pathin X f""f 0 = x""f 1 = x'" by (meson X ‹x ∈ topspace X›‹x' ∈ topspace X› path_connected_space_def) obtain g where"pathin Y g""g 0 = y""g 1 = y'" by (meson Y ‹y ∈ topspace Y›‹y' ∈ topspace Y› path_connected_space_def) show"∃h. pathin (prod_topology X Y) h ∧ h 0 = (x,y) ∧ h 1 = (x',y')" proof (intro exI conjI) show"pathin (prod_topology X Y) (λt. (f t, g t))" using‹pathin X f›‹pathin Y g›by (simp add: continuous_map_paired pathin_def) show"(λt. (f t, g t)) 0 = (x, y)" using‹f 0 = x›‹g 0 = y›by blast show"(λt. (f t, g t)) 1 = (x', y')" using‹f 1 = x'›‹g 1 = y'›by blast qed qed thenshow ?thesis by (metis False path_connected_space_quotient_map_image prod_topology_trivial1 prod_topology_trivial2
quotient_map_fst quotient_map_snd topspace_discrete_topology) qed
lemma path_connectedin_Times: "path_connectedin (prod_topology X Y) (S × T) ⟷ S = {} ∨ T = {} ∨ path_connectedin X S ∧ path_connectedin Y T" by (auto simp add: path_connectedin_def subtopology_Times path_connected_space_prod_topology)
subsection‹Path components›
lemma path_component_of_subtopology_eq: "path_component_of (subtopology X U) x = path_component_of X x ⟷ path_component_of_set X x ⊆ U"
(is"?lhs = ?rhs") proof show"?lhs ==> ?rhs" by (metis path_connectedin_path_component_of path_connectedin_subtopology) next show"?rhs ==> ?lhs" unfolding fun_eq_iff by (metis path_connectedin_subtopology path_component_of path_component_of_aux path_component_of_mono) qed
lemma path_components_of_subtopology: assumes"C ∈ path_components_of X""C ⊆ U" shows"C ∈ path_components_of (subtopology X U)" using assms path_component_of_refl path_component_of_subtopology_eq topspace_subtopology by (smt (verit) imageE path_component_in_path_components_of path_components_of_def)
lemma path_imp_connected_component_of: "path_component_of X x y ==> connected_component_of X x y" by (metis in_mono mem_Collect_eq path_component_subset_connected_component_of)
lemma path_component_of_continuous_image: "[continuous_map X X' f; path_component_of X x y]==> path_component_of X' (f x) (f y)" by (meson image_eqI path_component_of path_connectedin_continuous_map_image)
lemma path_component_of_pair [simp]: "path_component_of_set (prod_topology X Y) (x,y) = path_component_of_set X x × path_component_of_set Y y" (is"?lhs = ?rhs") proof (cases "?lhs = {}") case True thenshow ?thesis by (metis Sigma_empty1 Sigma_empty2 mem_Sigma_iff path_component_of_eq_empty topspace_prod_topology) next case False thenhave"path_component_of X x x""path_component_of Y y y" using path_component_of_eq_empty path_component_of_refl by fastforce+ moreover have"path_connectedin (prod_topology X Y) (path_component_of_set X x × path_component_of_set Y y)" by (metis path_connectedin_Times path_connectedin_path_component_of) moreoverhave"path_component_of X x a""path_component_of Y y b" if"(x, y) ∈ C'""(a,b) ∈ C'"and"path_connectedin (prod_topology X Y) C'"for C' a b by (smt (verit, best) that continuous_map_fst continuous_map_snd fst_conv snd_conv path_component_of path_component_of_continuous_image)+ ultimatelyshow ?thesis by (intro path_component_of_unique) auto qed
lemma path_components_of_prod_topology: "path_components_of (prod_topology X Y) = (λ(C,D). C × D) ` (path_components_of X × path_components_of Y)" by (force simp add: image_iff path_components_of_def)
lemma path_components_of_prod_topology': "path_components_of (prod_topology X Y) = {C × D |C D. C ∈ path_components_of X ∧ D ∈ path_components_of Y}" by (auto simp: path_components_of_prod_topology)
lemma path_component_of_product_topology: "path_component_of_set (product_topology X I) f = (if f ∈ extensional I then PiE I (λi. path_component_of_set (X i) (f i)) else {})"
(is"?lhs = ?rhs") proof (cases "path_component_of_set (product_topology X I) f = {}") case True thenshow ?thesis by (smt (verit) PiE_eq_empty_iff PiE_iff path_component_of_eq_empty topspace_product_topology) next case False thenhave [simp]: "f ∈ extensional I" by (auto simp: path_component_of_eq_empty PiE_iff path_component_of_equiv) show ?thesis proof (intro path_component_of_unique) show"f ∈ ?rhs" using False path_component_of_eq_empty path_component_of_refl by force show"path_connectedin (product_topology X I) (if f ∈ extensional I then ΠE i∈I. path_component_of_set (X i) (f i) else {})" by (simp add: path_connectedin_PiE path_connectedin_path_component_of) fix C' assume"f ∈ C'"and C': "path_connectedin (product_topology X I) C'" show"C' ⊆ ?rhs" proof - have"C' ⊆ extensional I" using PiE_def C' path_connectedin_subset_topspace by fastforce with‹f ∈ C'› C' show ?thesis apply (clarsimp simp: PiE_iff subset_iff) by (smt (verit, ccfv_threshold) continuous_map_product_projection path_component_of path_component_of_continuous_image) qed qed qed
lemma path_components_of_product_topology: "path_components_of (product_topology X I) = {PiE I B |B. ∀i ∈ I. B i ∈ path_components_of(X i)}" (is"?lhs=?rhs") proof show"?lhs ⊆ ?rhs" unfolding path_components_of_def image_subset_iff by (smt (verit) image_iff mem_Collect_eq path_component_of_product_topology topspace_product_topology_alt) next show"?rhs ⊆ ?lhs" proof fix F assume"F ∈ ?rhs" thenobtain B where B: "F = PiE I B" and"∀i∈I. ∃x∈topspace (X i). B i = path_component_of_set (X i) x" by (force simp add: path_components_of_def image_iff) thenobtain f where ftop: "∧i. i ∈ I ==> f i ∈ topspace (X i)" and BF: "∧i. i ∈ I ==> B i = path_component_of_set (X i) (f i)" by metis thenhave"F = path_component_of_set (product_topology X I) (restrict f I)" by (metis (mono_tags, lifting) B PiE_cong path_component_of_product_topology restrict_apply' restrict_extensional) thenshow"F ∈ ?lhs" by (simp add: ftop path_component_in_path_components_of) qed qed
subsection‹Sphere is path-connected›
lemma path_connected_punctured_universe: assumes"2 ≤ DIM('a::euclidean_space)" shows"path_connected (- {a::'a})" proof - let ?A = "{x::'a. ∃i∈Basis. x ∙ i < a ∙ i}" let ?B = "{x::'a. ∃i∈Basis. a ∙ i < x ∙ i}"
have A: "path_connected ?A" unfolding Collect_bex_eq proof (rule path_connected_UNION) fix i :: 'a assume"i ∈ Basis" thenshow"(∑i∈Basis. (a ∙ i - 1)*R i) ∈ {x::'a. x ∙ i < a ∙ i}" by simp show"path_connected {x. x ∙ i < a ∙ i}" using convex_imp_path_connected [OF convex_halfspace_lt, of i "a ∙ i"] by (simp add: inner_commute) qed have B: "path_connected ?B" unfolding Collect_bex_eq proof (rule path_connected_UNION) fix i :: 'a assume"i ∈ Basis" thenshow"(∑i∈Basis. (a ∙ i + 1) *R i) ∈ {x::'a. a ∙ i < x ∙ i}" by simp show"path_connected {x. a ∙ i < x ∙ i}" using convex_imp_path_connected [OF convex_halfspace_gt, of "a ∙ i" i] by (simp add: inner_commute) qed obtain S :: "'a set"where"S ⊆ Basis"and"card S = Suc (Suc 0)" using obtain_subset_with_card_n[OF assms] by (force simp add: eval_nat_numeral) thenobtain b0 b1 :: 'a where"b0 ∈ Basis"and"b1 ∈ Basis"and"b0 ≠ b1" unfolding card_Suc_eq by auto thenhave"a + b0 - b1 ∈ ?A ∩ ?B" by (auto simp: inner_simps inner_Basis) thenhave"?A ∩ ?B ≠ {}" by fast with A B have"path_connected (?A ∪ ?B)" by (rule path_connected_Un) alsohave"?A ∪ ?B = {x. ∃i∈Basis. x ∙ i ≠ a ∙ i}" unfolding neq_iff bex_disj_distrib Collect_disj_eq .. alsohave"… = {x. x ≠ a}" unfolding euclidean_eq_iff [where 'a='a] by (simp add: Bex_def) alsohave"… = - {a}" by auto finallyshow ?thesis . qed
proposition path_connected_sphere: fixes a :: "'a :: euclidean_space" assumes"2 ≤ DIM('a)" shows"path_connected(sphere a r)" proof (cases r "0::real" rule: linorder_cases) case greater thenhave eq: "(sphere (0::'a) r) = (λx. (r / norm x) *R x) ` (- {0::'a})" by (force simp: image_iff split: if_split_asm) have"continuous_on (- {0::'a}) (λx. (r / norm x) *R x)" by (intro continuous_intros) auto thenhave"path_connected ((λx. (r / norm x) *R x) ` (- {0::'a}))" by (intro path_connected_continuous_image path_connected_punctured_universe assms) with eq have"path_connected((+) a ` (sphere (0::'a) r))" by (simp add: path_connected_translation) thenshow ?thesis by (metis add.right_neutral sphere_translation) qed auto
lemma connected_sphere: fixes a :: "'a :: euclidean_space" assumes"2 ≤ DIM('a)" shows"connected(sphere a r)" using path_connected_sphere [OF assms] by (simp add: path_connected_imp_connected)
corollary path_connected_complement_bounded_convex: fixes S :: "'a :: euclidean_space set" assumes"bounded S""convex S"and2: "2 ≤ DIM('a)" shows"path_connected (- S)" proof (cases "S = {}") case True thenshow ?thesis using convex_imp_path_connected by auto next case False thenobtain a where"a ∈ S"by auto have§ [rule_format]: "∀y∈S. ∀u. 0 ≤ u ∧ u ≤ 1 ⟶ (1 - u) *R a + u *R y ∈ S" using‹convex S›‹a ∈ S›by (simp add: convex_alt)
{ fix x y assume"x ∉ S""y ∉ S" thenhave"x ≠ a""y ≠ a"using‹a ∈ S›by auto thenhave bxy: "bounded(insert x (insert y S))" by (simp add: ‹bounded S›) thenobtain B::real where B: "0 < B"and Bx: "norm (a - x) < B"andBy: "norm (a - y) < B" and"S ⊆ ball a B" using bounded_subset_ballD [OF bxy, of a] by (auto simp: dist_norm) define C where"C = B / norm(x - a)" let ?Cxa = "a + C *R (x - a)"
{ fix u assume u: "(1 - u) *R x + u *R ?Cxa ∈ S"and"0 ≤ u""u ≤ 1" have CC: "1 ≤ 1 + (C - 1) * u" using‹x ≠ a›‹0 ≤ u› Bx by (auto simp add: C_def norm_minus_commute) have *: "∧v. (1 - u) *R x + u *R (a + v *R (x - a)) = a + (1 + (v - 1) * u) *R (x - a)" by (simp add: algebra_simps) have"a + ((1 / (1 + C * u - u)) *R x + ((u / (1 + C * u - u)) *R a + (C * u / (1 + C * u - u)) *R x)) = (1 + (u / (1 + C * u - u))) *R a + ((1 / (1 + C * u - u)) + (C * u / (1 + C * u - u))) *R x" by (simp add: algebra_simps) alsohave"… = (1 + (u / (1 + C * u - u))) *R a + (1 + (u / (1 + C * u - u))) *R x" using CC by (simp add: field_simps) alsohave"… = x + (1 + (u / (1 + C * u - u))) *R a + (u / (1 + C * u - u)) *R x" by (simp add: algebra_simps) alsohave"… = x + ((1 / (1 + C * u - u)) *R a + ((u / (1 + C * u - u)) *R x + (C * u / (1 + C * u - u)) *R a))" using CC by (simp add: field_simps) (simp add: add_divide_distrib scaleR_add_left) finallyhave xeq: "(1 - 1 / (1 + (C - 1) * u)) *R a + (1 / (1 + (C - 1) * u)) *R (a + (1 + (C - 1) * u) *R (x - a)) = x" by (simp add: algebra_simps) have False using§ [of "a + (1 + (C - 1) * u) *R (x - a)""1 / (1 + (C - 1) * u)"] using u ‹x ≠ a›‹x ∉ S›‹0 ≤ u› CC by (auto simp: xeq *)
} thenhave pcx: "path_component (- S) x ?Cxa" by (force simp: closed_segment_def intro!: path_component_linepath) define D where"D = B / norm(y - a)"―‹massive duplication with the proof above› let ?Dya = "a + D *R (y - a)"
{ fix u assume u: "(1 - u) *R y + u *R ?Dya ∈ S"and"0 ≤ u""u ≤ 1" have DD: "1 ≤ 1 + (D - 1) * u" using‹y ≠ a›‹0 ≤ u›By by (auto simp add: D_def norm_minus_commute) have *: "∧v. (1 - u) *R y + u *R (a + v *R (y - a)) = a + (1 + (v - 1) * u) *R (y - a)" by (simp add: algebra_simps) have"a + ((1 / (1 + D * u - u)) *R y + ((u / (1 + D * u - u)) *R a + (D * u / (1 + D * u - u)) *R y)) = (1 + (u / (1 + D * u - u))) *R a + ((1 / (1 + D * u - u)) + (D * u / (1 + D * u - u))) *R y" by (simp add: algebra_simps) alsohave"… = (1 + (u / (1 + D * u - u))) *R a + (1 + (u / (1 + D * u - u))) *R y" using DD by (simp add: field_simps) alsohave"… = y + (1 + (u / (1 + D * u - u))) *R a + (u / (1 + D * u - u)) *R y" by (simp add: algebra_simps) alsohave"… = y + ((1 / (1 + D * u - u)) *R a + ((u / (1 + D * u - u)) *R y + (D * u / (1 + D * u - u)) *R a))" using DD by (simp add: field_simps) (simp add: add_divide_distrib scaleR_add_left) finallyhave xeq: "(1 - 1 / (1 + (D - 1) * u)) *R a + (1 / (1 + (D - 1) * u)) *R (a + (1 + (D - 1) * u) *R (y - a)) = y" by (simp add: algebra_simps) have False using§ [of "a + (1 + (D - 1) * u) *R (y - a)""1 / (1 + (D - 1) * u)"] using u ‹y ≠ a›‹y ∉ S›‹0 ≤ u› DD by (auto simp: xeq *)
} thenhave pdy: "path_component (- S) y ?Dya" by (force simp: closed_segment_def intro!: path_component_linepath) have pyx: "path_component (- S) ?Dya ?Cxa" proof (rule path_component_of_subset) show"sphere a B ⊆ - S" using‹S ⊆ ball a B›by (force simp: ball_def dist_norm norm_minus_commute) have aB: "?Dya ∈ sphere a B""?Cxa ∈ sphere a B" using‹x ≠ a›using‹y ≠ a› B by (auto simp: dist_norm C_def D_def) thenshow"path_component (sphere a B) ?Dya ?Cxa" using path_connected_sphere [OF 2] path_connected_component by blast qed have"path_component (- S) x y" by (metis path_component_trans path_component_sym pcx pdy pyx)
} thenshow ?thesis by (auto simp: path_connected_component) qed
lemma connected_complement_bounded_convex: fixes S :: "'a :: euclidean_space set" assumes"bounded S""convex S""2 ≤ DIM('a)" shows"connected (- S)" using path_connected_complement_bounded_convex [OF assms] path_connected_imp_connected by blast
lemma connected_diff_ball: fixes S :: "'a :: euclidean_space set" assumes"connected S""cball a r ⊆ S""2 ≤ DIM('a)" shows"connected (S - ball a r)" proof (rule connected_diff_open_from_closed [OF ball_subset_cball]) show"connected (cball a r - ball a r)" using assms connected_sphere by (auto simp: cball_diff_eq_sphere) qed (auto simp: assms dist_norm)
proposition connected_open_delete: assumes"open S""connected S"and2: "2 ≤ DIM('N::euclidean_space)" shows"connected(S - {a::'N})" proof (cases "a ∈ S") case True with‹open S›obtain ε where"ε > 0"and ε: "cball a ε ⊆ S" using open_contains_cball_eq by blast define b where"b ≡ a + ε *R (SOME i. i ∈ Basis)" have"dist a b = ε" by (simp add: b_def dist_norm SOME_Basis ‹0 < \ε› less_imp_le) with ε have"b ∈∩{S - ball a r |r. 0 < r ∧ r < ε}" by auto thenhave nonemp: "(∩{S - ball a r |r. 0 < r ∧ r < ε}) = {} ==> False" by auto have con: "∧r. r < ε ==> connected (S - ball a r)" using ε by (force intro: connected_diff_ball [OF ‹connected S› _ 2]) have"x ∈∪{S - ball a r |r. 0 < r ∧ r < ε}"if"x ∈ S - {a}"for x using that ‹0 < \ε› by (intro UnionI [of "S - ball a (min ε (dist a x) / 2)"]) auto thenhave"S - {a} = ∪{S - ball a r | r. 0 < r ∧ r < ε}" by auto thenshow ?thesis by (auto intro: connected_Union con dest!: nonemp) next case False thenshow ?thesis by (simp add: ‹connected S›) qed
corollary path_connected_punctured_ball: "2 ≤ DIM('N::euclidean_space) ==> path_connected(ball a r - {a::'N})" by (simp add: path_connected_open_delete)
corollary connected_punctured_ball: "2 ≤ DIM('N::euclidean_space) ==> connected(ball a r - {a::'N})" by (simp add: connected_open_delete)
corollary connected_open_delete_finite: fixes S T::"'a::euclidean_space set" assumes S: "open S""connected S"and2: "2 ≤ DIM('a)"and"finite T" shows"connected(S - T)" using‹finite T› S proof (induct T) case empty show ?caseusing‹connected S›by simp next case (insert x T) thenhave"connected (S-T)" by auto moreoverhave"open (S - T)" using finite_imp_closed[OF ‹finite T›] ‹open S›by auto ultimatelyhave"connected (S - T - {x})" using connected_open_delete[OF _ _ 2] by auto thus ?caseby (metis Diff_insert) qed
lemma sphere_1D_doubleton_zero: assumes1: "DIM('a) = 1"and"r > 0" obtains x y::"'a::euclidean_space" where"sphere 0 r = {x,y} ∧ dist x y = 2*r" proof - obtain b::'a where b: "Basis = {b}" using1 card_1_singletonE by blast show ?thesis proof (intro that conjI) have"x = norm x *R b ∨ x = - norm x *R b"if"r = norm x"for x proof - have xb: "(x ∙ b) *R b = x" using euclidean_representation [of x, unfolded b] by force thenhave"norm ((x ∙ b) *R b) = norm x" by simp with b have"∣x ∙ b∣ = norm x" using norm_Basis by (simp add: b) with xb show ?thesis by (metis (mono_tags, opaque_lifting) abs_eq_iff abs_norm_cancel) qed with‹r > 0› b show"sphere 0 r = {r *R b, - r *R b}" by (force simp: sphere_def dist_norm) have"dist (r *R b) (- r *R b) = norm (r *R b + r *R b)" by (simp add: dist_norm) alsohave"… = norm ((2*r) *R b)" by (metis mult_2 scaleR_add_left) alsohave"… = 2*r" using‹r > 0› b norm_Basis by fastforce finallyshow"dist (r *R b) (- r *R b) = 2*r" . qed qed
lemma sphere_1D_doubleton: fixes a :: "'a :: euclidean_space" assumes"DIM('a) = 1"and"r > 0" obtains x y where"sphere a r = {x,y} ∧ dist x y = 2*r" using sphere_1D_doubleton_zero [OF assms] dist_add_cancel image_empty image_insert by (metis (no_types, opaque_lifting) add.right_neutral sphere_translation)
lemma psubset_sphere_Compl_connected: fixes S :: "'a::euclidean_space set" assumes S: "S ⊂ sphere a r"and"0 < r"and2: "2 ≤ DIM('a)" shows"connected(- S)" proof - have"S ⊆ sphere a r" using S by blast obtain b where"dist a b = r"and"b ∉ S" using S mem_sphere by blast have CS: "- S = {x. dist a x ≤ r ∧ (x ∉ S)} ∪ {x. r ≤ dist a x ∧ (x ∉ S)}" by auto have"{x. dist a x ≤ r ∧ x ∉ S} ∩ {x. r ≤ dist a x ∧ x ∉ S} ≠ {}" using‹b ∉ S›‹dist a b = r›by blast moreoverhave"connected {x. dist a x ≤ r ∧ x ∉ S}" using assms by (force intro: connected_intermediate_closure [of "ball a r"]) moreoverhave"connected {x. r ≤ dist a x ∧ x ∉ S}" proof (rule connected_intermediate_closure [of "- cball a r"]) show"{x. r ≤ dist a x ∧ x ∉ S} ⊆ closure (- cball a r)" using interior_closure by (force intro: connected_complement_bounded_convex) qed (use assms connected_complement_bounded_convex in auto) ultimatelyshow ?thesis by (simp add: CS connected_Un) qed
subsection‹Every annulus is a connected set›
lemma path_connected_2DIM_I: fixes a :: "'N::euclidean_space" assumes2: "2 ≤ DIM('N)"and pc: "path_connected {r. 0 ≤ r ∧ P r}" shows"path_connected {x. P(norm(x - a))}" proof - have"{x. P(norm(x - a))} = (+) a ` {x. P(norm x)}" by force moreoverhave"path_connected {x::'N. P(norm x)}" proof - let ?D = "{x. 0 ≤ x ∧ P x} × sphere (0::'N) 1" have"x ∈ (λz. fst z *R snd z) ` ?D" if"P (norm x)"for x::'N proof (cases "x=0") case True with that show ?thesis apply (simp add: image_iff) by (metis (no_types) mem_sphere_0 order_refl vector_choose_size zero_le_one) next case False with that show ?thesis by (rule_tac x="(norm x, x /R norm x)"in image_eqI) auto qed thenhave *: "{x::'N. P(norm x)} = (λz. fst z *R snd z) ` ?D" by auto have"continuous_on ?D (λz:: real×'N. fst z *R snd z)" by (intro continuous_intros) moreoverhave"path_connected ?D" by (metis path_connected_Times [OF pc] path_connected_sphere 2) ultimatelyshow ?thesis by (simp add: "*" path_connected_continuous_image) qed ultimatelyshow ?thesis using path_connected_translation by metis qed
proposition path_connected_annulus: fixes a :: "'N::euclidean_space" assumes"2 ≤ DIM('N)" shows"path_connected {x. r1 < norm(x - a) ∧ norm(x - a) < r2}" "path_connected {x. r1 < norm(x - a) ∧ norm(x - a) ≤ r2}" "path_connected {x. r1 ≤ norm(x - a) ∧ norm(x - a) < r2}" "path_connected {x. r1 ≤ norm(x - a) ∧ norm(x - a) ≤ r2}" by (auto simp: is_interval_def intro!: is_interval_convex convex_imp_path_connected path_connected_2DIM_I [OF assms])
proposition connected_annulus: fixes a :: "'N::euclidean_space" assumes"2 ≤ DIM('N::euclidean_space)" shows"connected {x. r1 < norm(x - a) ∧ norm(x - a) < r2}" "connected {x. r1 < norm(x - a) ∧ norm(x - a) ≤ r2}" "connected {x. r1 ≤ norm(x - a) ∧ norm(x - a) < r2}" "connected {x. r1 ≤ norm(x - a) ∧ norm(x - a) ≤ r2}" by (auto simp: path_connected_annulus [OF assms] path_connected_imp_connected)
subsection✐‹tag unimportant›\<open>Relations between components and path components›
lemma open_connected_component: fixes S :: "'a::real_normed_vector set" assumes"open S" shows"open (connected_component_set S x)" proof (clarsimp simp: open_contains_ball) fix y assume xy: "connected_component S x y" thenobtain e where"e>0""ball y e ⊆ S" using assms connected_component_in openE by blast thenshow"∃e>0. ball y e ⊆ connected_component_set S x" by (metis xy centre_in_ball connected_ball connected_component_eq_eq connected_component_in connected_component_maximal) qed
corollary open_components: fixes S :: "'a::real_normed_vector set" shows"[open u; S ∈ components u]==> open S" by (simp add: components_iff) (metis open_connected_component)
lemma in_closure_connected_component: fixes S :: "'a::real_normed_vector set" assumes x: "x ∈ S"and S: "open S" shows"x ∈ closure (connected_component_set S y) ⟷ x ∈ connected_component_set S y" proof - have"x islimpt connected_component_set S y ==> connected_component S y x" by (metis (no_types, lifting) S connected_component_eq connected_component_refl islimptE mem_Collect_eq open_connected_component x) thenshow ?thesis by (auto simp: closure_def) qed
lemma connected_disjoint_Union_open_pick: assumes"pairwise disjnt B" "∧S. S ∈ A ==> connected S ∧ S ≠ {}" "∧S. S ∈ B ==> open S" "∪A ⊆∪B" "S ∈ A" obtains T where"T ∈ B""S ⊆ T""S ∩∪(B - {T}) = {}" proof - have"S ⊆∪B""connected S""S ≠ {}" using assms ‹S ∈ A› by blast+ thenobtainTwhere"T\<in>B""S\<inter>T\<noteq>{}" by(metisSup_inf_eq_bot_iffinf.absorb_iff2inf_commute) have1:"openT"by(simpadd:\<open>T\<in>B\<close>assms) have2:"open(\<Union>(B-{T}))"usingassmsbyblast have3:"S\<subseteq>T\<union>\<Union>(B-{T})"using\<open>S\<subseteq>\<Union>B\<close>byblast have"T\<inter>\<Union>(B-{T})={}"using\<open>T\<in>B\<close>\<open>pairwisedisjntB\<close> by(autosimp:pairwise_defdisjnt_def) thenhave4:"T\<inter>\<Union>(B-{T})\<inter>S={}"byauto fromconnectedD[OF\<open>connectedS\<close>1243] have"S\<inter>\<Union>(B-{T})={}" by(autosimp:Int_commute\<open>S\<inter>T\<noteq>{}\<close>) with\<open>T\<in>B\<close>3thatshow?thesis by(metisIntIUnEempty_iffsubsetDsubsetI) qed
lemmacobounded_unbounded_component: fixesS::"'a::euclidean_spaceset" assumes"bounded(-S)" shows"\<exists>x.x\<in>S\<and>\<not>bounded(connected_component_setSx)" proof- obtaini::'awherei:"i\<in>Basis" usingnonempty_Basisbyblast obtainBwhereB:"B>0""-S\<subseteq>ball0B" usingbounded_subset_ballD[OFassms,of0]byauto thenhave*:"\<And>x.B\<le>normx\<Longrightarrow>x\<in>S" by(forcesimp:ball_defdist_norm) haveunbounded_inner:"\<not>bounded{x.innerix\<ge>B}" proof(clarsimpsimp:bounded_defdist_norm) fixex show"\<exists>y.B\<le>i\<bullet>y\<and>\<not>norm(x-y)\<le>e" usingi by(rule_tacx="x+(maxBe+1+\<bar>i\<bullet>x\<bar>)*\<^sub>Ri"inexI)(autosimp:inner_right_distrib) qed have\<section>:"\<And>x.B\<le>i\<bullet>x\<Longrightarrow>x\<in>S" using*Basis_le_norm[OFi]by(metisabs_ge_selfinner_commuteorder_trans) have"{x.B\<le>i\<bullet>x}\<subseteq>connected_component_setS(B*\<^sub>Ri)" by(introconnected_component_maximal)(autosimp:iintro:convex_connectedconvex_halfspace_ge[ofB]\<section>) thenhave"\<not>bounded(connected_component_setS(B*\<^sub>Ri))" usingbounded_subsetunbounded_innerbyblast moreoverhave"B*\<^sub>Ri\<in>S"
by (rule *) (simp add: norm_Basis [OF i]) ultimatelyshow ?thesis by blast qed
lemma cobounded_unique_unbounded_component: fixes S :: "'a :: euclidean_space set" assumes bs: "bounded (-S)"and"2 ≤ DIM('a)" and bo: "¬ bounded(connected_component_set S x)" "¬ bounded(connected_component_set S y)" shows"connected_component_set S x = connected_component_set S y" proof - obtain i::'a where i: "i ∈ Basis" using nonempty_Basis by blast obtain B where"B>0"and B: "-S ⊆ ball 0 B" using bounded_subset_ballD [OF bs, of 0] by auto thenhave *: "∧x. B ≤ norm x ==> x ∈ S" by (force simp: ball_def dist_norm) obtain x' y' where x': "connected_component S x x'""norm x' > B" and y': "connected_component S y y'""norm y' > B" using‹B>0› bo bounded_pos by (metis linorder_not_le mem_Collect_eq) have x'y': "connected_component S x' y'" unfolding connected_component_def proof (intro exI conjI) show"connected (- ball 0 B :: 'a set)" using assms by (auto intro: connected_complement_bounded_convex) qed (use x' y' dist_norm * in auto) show ?thesis using x' y' x'y' by (metis connected_component_eq mem_Collect_eq) qed
lemma cobounded_unbounded_components: fixes S :: "'a :: euclidean_space set" shows"bounded (-S) ==>∃c. c ∈ components S ∧¬bounded c" by (metis cobounded_unbounded_component components_def imageI)
lemma cobounded_unique_unbounded_components: fixes S :: "'a :: euclidean_space set" shows"[bounded (- S); c ∈ components S; ¬ bounded c; c' ∈ components S; ¬ bounded c'; 2 ≤ DIM('a)]==> c' = c" unfolding components_iff by (metis cobounded_unique_unbounded_component)
lemma cobounded_has_bounded_component: fixes S :: "'a :: euclidean_space set" assumes"bounded (- S)""¬ connected S""2 ≤ DIM('a)" obtains C where"C ∈ components S""bounded C" by (meson cobounded_unique_unbounded_components connected_eq_connected_components_eq assms)
subsection‹The ‹inside› and ‹outside› of a Set›
text✐‹tag important›\<open>The inside comprises the points in a bounded connected component of the set's complement.
The outside comprises the points in unbounded connected component of the complement.›
definition✐‹tag important› inside where "insideS\<equiv>{x.(x\<notin>S)\<and>bounded(connected_component_set(-S)x)}"
lemmainside_inside_compact_connected: fixesS::"'a::euclidean_spaceset" assumesS:"closedS"andT:"compactT"and"connectedT""S\<subseteq>insideT" shows"insideS\<subseteq>insideT" proof(cases"insideT={}") caseTruewithassmsshow?thesisbyauto next caseFalse consider"DIM('a)=1"|"DIM('a)\<ge>2" usingantisymnot_less_eq_eqbyfastforce thenshow?thesis proofcases case1thenshow?thesis usingconnected_convex_1_genassmsFalseinside_convexbyblast next case2 have"boundedS" usingassmsby(mesonbounded_insidebounded_subsetcompact_imp_bounded) thenhavecoms:"compactS" by(simpadd:Scompact_eq_bounded_closed) thenhavebst:"bounded(S\<union>T)" by(simpadd:compact_imp_boundedT) thenobtainrwhere"0<r"andr:"S\<union>T\<subseteq>ball0r" usingbounded_subset_ballDbyblast haveoutst:"outsideS\<inter>outsideT\<noteq>{}" by(metisbounded_Unbounded_subsetbstcobounded_outsidedisjoint_eq_subset_Complunbounded_outside) have"S\<inter>T={}"usingassms by(metisdisjoint_iff_not_equalinside_no_overlapsubsetCE) moreoverhave"outsideS\<inter>insideT\<noteq>{}" by(mesonFalseassms(4)compact_eq_bounded_closedcomsopen_insideoutside_compact_in_openT) ultimatelyhave"insideS\<inter>T={}" usinginside_outside_intersect_connected[OF\<open>connectedT\<close>,ofS] by(metis"2"compact_eq_bounded_closedcomsconnected_outsideinf.commuteinside_outside_intersect_connectedoutst) thenshow?thesis usinginside_inside[OF\<open>S\<subseteq>insideT\<close>]byblast qed qed
lemmaconnected_with_inside: fixesS::"'a::real_normed_vectorset" assumesS:"closedS"andcons:"connectedS" shows"connected(S\<union>insideS)" proof(cases"S\<union>insideS=UNIV") caseTruewithassmsshow?thesisbyauto next caseFalse thenobtainbwhereb:"b\<notin>S""b\<notin>insideS"byblast have*:"\<exists>yT.y\<in>S\<and>connectedT\<and>a\<in>T\<and>y\<in>T\<and>T\<subseteq>(S\<union>insideS)" if"a\<in>S\<union>insideS"fora usingthat proof assume"a\<in>S"thenshow?thesis usingconsbyblast next assumea:"a\<in>insideS" thenhaveain:"a\<in>closure(insideS)" by(simpadd:closure_def) obtainhwhereh:"pathh""pathstarth=a" "path_imageh-{pathfinishh}\<subseteq>interior(insideS)" "pathfinishh\<in>frontier(insideS)" usingainb by(metisexists_path_subpath_to_frontierpath_linepathpathfinish_linepathpathstart_linepath) moreover haveh1S:"pathfinishh\<in>S" usingShfrontier_inside_subsetbyblast moreover have"path_imageh\<subseteq>S\<union>insideS" usingIntD1Sh1Shinterior_eqopen_insidebyfastforce ultimatelyshow?thesisbyblast qed show?thesis apply(simpadd:connected_iff_connected_component)
apply (clarsimp simp add: connected_component_def dest!: *) subgoalfor x y u u' T t' by (rule_tac x = "S ∪ T ∪ t'"in exI) (auto intro!: connected_Un cons) done qed
text‹The proof is virtually the same as that above.› lemma connected_with_outside: fixes S :: "'a :: real_normed_vector set" assumes S: "closed S"and cons: "connected S" shows"connected(S ∪ outside S)" proof (cases "S ∪ outside S = UNIV") case True with assms show ?thesis by auto next case False thenobtain b where b: "b ∉ S""b ∉ outside S"by blast have *: "∃y T. y ∈ S ∧ connected T ∧ a ∈ T ∧ y ∈ T ∧ T ⊆ (S ∪ outside S)"if"a ∈ (S∪ outside S)"for a using that proof assume"a ∈ S"thenshow ?thesis by (rule_tac x=a in exI, rule_tac x="{a}"in exI, simp) next assume a: "a ∈ outside S" thenhave ain: "a ∈ closure (outside S)" by (simp add: closure_def) obtain h where h: "path h""pathstart h = a" "path_image h - {pathfinish h} ⊆ interior (outside S)" "pathfinish h ∈ frontier (outside S)" using ain b by (metis exists_path_subpath_to_frontier path_linepath pathfinish_linepath pathstart_linepath) moreover have h1S: "pathfinish h ∈ S" using S frontier_outside_subset h(4) by blast moreover have"path_image h ⊆ S ∪ outside S" using IntD1 S h1S h interior_eq open_outside by fastforce ultimatelyshow ?thesis by blast qed show ?thesis apply (simp add: connected_iff_connected_component) apply (clarsimp simp add: connected_component_def dest!: *) subgoalfor x y u u' T t' by (rule_tac x="(S ∪ T ∪ t')"in exI) (auto intro!: connected_Un cons) done qed
lemma inside_inside_eq_empty [simp]: fixes S :: "'a :: {real_normed_vector, perfect_space} set" assumes S: "closed S"and cons: "connected S" shows"inside (inside S) = {}" proof - have"connected (- inside S)" by (metis S connected_with_outside cons union_with_outside) thenshow ?thesis by (metis bounded_Un inside_complement_unbounded_connected_empty unbounded_outside union_with_outside) qed
lemma inside_in_components: "inside S ∈ components (- S) ⟷ connected(inside S) ∧ inside S ≠ {}" (is"?lhs = ?rhs") proof assume R: ?rhs thenhave"∧x. [x ∈ S; x ∈ inside S]==>¬ connected (inside S)" by (simp add: inside_outside) with R show ?lhs unfolding in_components_maximal by (auto intro: inside_same_component connected_componentI) qed (simp add: in_components_maximal)
text‹The proof is like that above.› lemma outside_in_components: "outside S ∈ components (- S) ⟷ connected(outside S) ∧ outside S ≠ {}" (is"?lhs = ?rhs") proof assume R: ?rhs thenhave"∧x. [x ∈ S; x ∈ outside S]==>¬ connected (outside S)" by (meson disjoint_iff outside_no_overlap) with R show ?lhs unfolding in_components_maximal by (auto intro: outside_same_component connected_componentI) qed (simp add: in_components_maximal)
lemma bounded_unique_outside: fixes S :: "'a :: euclidean_space set" assumes"bounded S""DIM('a) ≥ 2" shows"(c ∈ components (- S) ∧¬ bounded c) ⟷ c = outside S" using assms by (metis cobounded_unique_unbounded_components connected_outside double_compl outside_bounded_nonempty
outside_in_components unbounded_outside)
subsection‹Condition for an open map's image to contain a ball›
proposition ball_subset_open_map_image: fixes f :: "'a::heine_borel → 'b :: {real_normed_vector,heine_borel}" assumes contf: "continuous_on (closure S) f" and oint: "open (f ` interior S)" and le_no: "∧z. z ∈ frontier S ==> r ≤ norm(f z - f a)" and"bounded S""a ∈ S""0 < r" shows"ball (f a) r ⊆ f ` S" proof (cases "f ` S = UNIV") case True thenshow ?thesis by simp next case False thenhave"closed (frontier (f ` S))""frontier (f ` S) ≠ {}" using‹a ∈ S›by (auto simp: frontier_eq_empty) thenobtain w where w: "w ∈ frontier (f ` S)" and dw_le: "∧y. y ∈ frontier (f ` S) ==> norm (f a - w) ≤ norm (f a - y)" by (auto simp add: dist_norm intro: distance_attains_inf [of "frontier(f ` S)""f a"]) thenobtain ξ where ξ: "∧n. ξ n ∈ f ` S"and tendsw: "ξ <---- w" by (metis Diff_iff frontier_def closure_sequential) thenhave"∧n. ∃x ∈ S. ξ n = f x"by force thenobtain z where zs: "∧n. z n ∈ S"and fz: "∧n. ξ n = f (z n)" by metis thenobtain y K where y: "y ∈ closure S"and"strict_mono (K :: nat → nat)" and Klim: "(z ∘ K) <---- y" using‹bounded S› unfolding compact_closure [symmetric] compact_def by (meson closure_subset subset_iff) thenhave ftendsw: "((λn. f (z n)) ∘ K) <---- w" by (metis LIMSEQ_subseq_LIMSEQ fun.map_cong0 fz tendsw) have zKs: "∧n. (z ∘ K) n ∈ S"by (simp add: zs) have fz: "f ∘ z = ξ""(λn. f (z n)) = ξ" using fz by auto thenhave"(ξ ∘ K) <---- f y" by (metis (no_types) Klim zKs y contf comp_assoc continuous_on_closure_sequentially) with fz have wy: "w = f y"using fz LIMSEQ_unique ftendsw by auto have"r ≤ norm (f y - f a)" proof (rule le_no) show"y ∈ frontier S" using w wy oint by (force simp: imageI image_mono interiorI interior_subset frontier_def y) qed thenhave"∧y. [norm (f a - y) < r; y ∈ frontier (f ` S)]==> False" by (metis dw_le norm_minus_commute not_less order_trans wy) thenhave"ball (f a) r ∩ frontier (f ` S) = {}" by (metis disjoint_iff_not_equal dist_norm mem_ball) moreover have"ball (f a) r ∩ f ` S ≠ {}" using‹a ∈ S›‹0 < r› centre_in_ball by blast ultimatelyshow ?thesis by (meson connected_Int_frontier connected_ball diff_shunt_var) qed
subsubsection‹Special characterizations of classes of functions into and out of R.›
lemma Hausdorff_space_euclidean [simp]: "Hausdorff_space (euclidean :: 'a::metric_space topology)" proof - have"∃U V. open U ∧ open V ∧ x ∈ U ∧ y ∈ V ∧ disjnt U V" if"x ≠ y"for x y :: 'a proof (intro exI conjI) let ?r = "dist x y / 2" have [simp]: "?r > 0" by (simp add: that) show"open (ball x ?r)""open (ball y ?r)""x ∈ (ball x ?r)""y ∈ (ball y ?r)" by (auto simp add: that) show"disjnt (ball x ?r) (ball y ?r)" unfolding disjnt_def by (simp add: disjoint_ballI) qed thenshow ?thesis by (simp add: Hausdorff_space_def) qed
proposition embedding_map_into_euclideanreal: assumes"path_connected_space X" shows"embedding_map X euclideanreal f ⟷ continuous_map X euclideanreal f ∧ inj_on f (topspace X)" proof safe show"continuous_map X euclideanreal f" if"embedding_map X euclideanreal f" using continuous_map_in_subtopology homeomorphic_imp_continuous_map that unfolding embedding_map_def by blast show"inj_on f (topspace X)" if"embedding_map X euclideanreal f" using that homeomorphic_imp_injective_map unfolding embedding_map_def by blast show"embedding_map X euclideanreal f" if cont: "continuous_map X euclideanreal f"and inj: "inj_on f (topspace X)" proof - obtain g where gf: "∧x. x ∈ topspace X ==> g (f x) = x" using inv_into_f_f [OF inj] by auto show ?thesis unfolding embedding_map_def homeomorphic_map_maps homeomorphic_maps_def proof (intro exI conjI) show"continuous_map X (top_of_set (f ` topspace X)) f" by (simp add: cont continuous_map_in_subtopology) let ?S = "f ` topspace X" have eq: "{x ∈ ?S. g x ∈ U} = f ` U"if"openin X U"for U using openin_subset [OF that] by (auto simp: gf) have1: "g ` ?S ⊆ topspace X" using eq by blast have"openin (top_of_set ?S) {x ∈ ?S. g x ∈ T}" if"openin X T"for T proof - have"T ⊆ topspace X" by (simp add: openin_subset that) have RR: "∀x ∈ ?S ∩ g -` T. ∃d>0. ∀x' ∈ ?S ∩ ball x d. g x' ∈ T" proof (clarsimp simp add: gf) have pcS: "path_connectedin euclidean ?S" using assms cont path_connectedin_continuous_map_image path_connectedin_topspace by blast show"∃d>0. ∀x'∈f ` topspace X ∩ ball (f x) d. g x' ∈ T" if"x ∈ T"for x proof - have x: "x ∈ topspace X" using‹T ⊆ topspace X›‹x ∈ T›by blast obtain u v d where"0 < d""u ∈ topspace X""v ∈ topspace X" and sub_fuv: "?S ∩ {f x - d .. f x + d} ⊆ {f u..f v}" proof (cases "∃u ∈ topspace X. f u < f x") case True thenobtain u where u: "u ∈ topspace X""f u < f x" .. show ?thesis proof (cases "∃v ∈ topspace X. f x < f v") case True thenobtain v where v: "v ∈ topspace X""f x < f v" .. show ?thesis proof let ?d = "min (f x - f u) (f v - f x)" show"0 < ?d" by (simp add: ‹f u < f x›‹f x < f v›) show"f ` topspace X ∩ {f x - ?d..f x + ?d} ⊆ {f u..f v}" by fastforce qed (auto simp: u v) next case False show ?thesis proof let ?d = "f x - f u" show"0 < ?d" by (simp add: u) show"f ` topspace X ∩ {f x - ?d..f x + ?d} ⊆ {f u..f x}" using x u False by auto qed (auto simp: x u) qed next case False note no_u = False show ?thesis proof (cases "∃v ∈ topspace X. f x < f v") case True thenobtain v where v: "v ∈ topspace X""f x < f v" .. show ?thesis proof let ?d = "f v - f x" show"0 < ?d" by (simp add: v) show"f ` topspace X ∩ {f x - ?d..f x + ?d} ⊆ {f x..f v}" using False by auto qed (auto simp: x v) next case False show ?thesis proof show"f ` topspace X ∩ {f x - 1..f x + 1} ⊆ {f x..f x}" using False no_u by fastforce qed (auto simp: x) qed qed thenobtain h where"pathin X h""h 0 = u""h 1 = v" using assms unfolding path_connected_space_def by blast obtain C where"compactin X C""connectedin X C""u ∈ C""v ∈ C" proof show"compactin X (h ` {0..1})" using that by (simp add: ‹pathin X h› compactin_path_image) show"connectedin X (h ` {0..1})" using‹pathin X h› connectedin_path_image by blast qed (use‹h 0 = u›‹h 1 = v›in auto) have"continuous_map (subtopology euclideanreal (?S ∩ {f x - d .. f x + d})) (subtopology X C) g" proof (rule continuous_inverse_map) show"compact_space (subtopology X C)" using‹compactin X C› compactin_subspace by blast show"continuous_map (subtopology X C) euclideanreal f" by (simp add: cont continuous_map_from_subtopology) have"{f u .. f v} ⊆ f ` topspace (subtopology X C)" proof (rule connected_contains_Icc) show"connected (f ` topspace (subtopology X C))" using connectedin_continuous_map_image [OF cont] by (simp add: ‹compactin X C›‹connectedin X C› compactin_subset_topspace inf_absorb2) show"f u ∈ f ` topspace (subtopology X C)" by (simp add: ‹u ∈ C›‹u ∈ topspace X›) show"f v ∈ f ` topspace (subtopology X C)" by (simp add: ‹v ∈ C›‹v ∈ topspace X›) qed thenshow"f ` topspace X ∩ {f x - d..f x + d} ⊆ f ` topspace (subtopology X C)" using sub_fuv by blast qed (auto simp: gf) thenhave contg: "continuous_map (subtopology euclideanreal (?S ∩ {f x - d .. f x + d})) X g" using continuous_map_in_subtopology by blast have"∃e>0. ∀x ∈ ?S ∩ {f x - d .. f x + d} ∩ ball (f x) e. g x ∈ T" using openin_continuous_map_preimage [OF contg ‹openin X T›] x ‹x ∈ T›‹0 < d› unfolding openin_euclidean_subtopology_iff by (force simp: gf dist_commute) thenobtain e where"e > 0 ∧ (∀x∈f ` topspace X ∩ {f x - d..f x + d} ∩ ball (f x) e. g x ∈ T)" by metis with‹0 < d›have"min d e > 0""∀u. u ∈ topspace X ⟶∣f x - f u∣ < min d e ⟶ u ∈ T" using dist_real_def gf by force+ thenshow ?thesis by (metis (full_types) Int_iff dist_real_def image_iff mem_ball gf) qed qed thenobtain d where d: "∧r. r ∈ ?S ∩ g -` T ==> d r > 0 ∧ (∀x ∈ ?S ∩ ball r (d r). g x ∈ T)" by metis show ?thesis unfolding openin_subtopology proof (intro exI conjI) show"{x ∈ ?S. g x ∈ T} = (∪r ∈ ?S ∩ g -` T. ball r (d r)) ∩ f ` topspace X" using d by (auto simp: gf) qed auto qed thenshow"continuous_map (top_of_set ?S) X g" by (simp add: "1" continuous_map) qed (auto simp: gf) qed qed
subsubsection‹An injective function into R is a homeomorphism and so an open map.›
lemma injective_into_1d_eq_homeomorphism: fixes f :: "'a::topological_space → real" assumes f: "continuous_on S f"and S: "path_connected S" shows"inj_on f S ⟷ (∃g. homeomorphism S (f ` S) f g)" proof show"∃g. homeomorphism S (f ` S) f g" if"inj_on f S" proof - have"embedding_map (top_of_set S) euclideanreal f" using that embedding_map_into_euclideanreal [of "top_of_set S" f] assms by auto thenshow ?thesis unfolding embedding_map_def topspace_euclidean_subtopology by (metis f homeomorphic_map_closedness_eq homeomorphism_injective_closed_map that) qed qed (metis homeomorphism_def inj_onI)
lemma injective_into_1d_imp_open_map: fixes f :: "'a::topological_space → real" assumes"continuous_on S f""path_connected S""inj_on f S""openin (subtopology euclidean S) T" shows"openin (subtopology euclidean (f ` S)) (f ` T)" using assms homeomorphism_imp_open_map injective_into_1d_eq_homeomorphism by blast
lemma homeomorphism_into_1d: fixes f :: "'a::topological_space → real" assumes"path_connected S""continuous_on S f""f ` S = T""inj_on f S" shows"∃g. homeomorphism S T f g" using assms injective_into_1d_eq_homeomorphism by blast
lemma simple_path_rectpath [simp, intro]: assumes"Re a1 ≠ Re a3""Im a1 ≠ Im a3" shows"simple_path (rectpath a1 a3)" unfolding rectpath_def Let_def using assms by (intro simple_path_join_loop arc_join arc_linepath)
(auto simp: complex_eq_iff path_image_join closed_segment_same_Re closed_segment_same_Im)
lemma path_image_rectpath: assumes"Re a1 ≤ Re a3""Im a1 ≤ Im a3" shows"path_image (rectpath a1 a3) = {z. Re z ∈ {Re a1, Re a3} ∧ Im z ∈ {Im a1..Im a3}} ∪ {z. Im z ∈ {Im a1, Im a3} ∧ Re z ∈ {Re a1..Re a3}}" (is"?lhs = ?rhs") proof - define a2 a4 where"a2 = Complex (Re a3) (Im a1)"and"a4 = Complex (Re a1) (Im a3)" have"?lhs = closed_segment a1 a2 ∪ closed_segment a2 a3 ∪ closed_segment a4 a3 ∪ closed_segment a1 a4" by (simp_all add: rectpath_def Let_def path_image_join closed_segment_commute
a2_def a4_def Un_assoc) alsohave"… = ?rhs"using assms by (auto simp: rectpath_def Let_def path_image_join a2_def a4_def
closed_segment_same_Re closed_segment_same_Im closed_segment_eq_real_ivl) finallyshow ?thesis . qed
lemma path_image_rectpath_subset_cbox: assumes"Re a ≤ Re b""Im a ≤ Im b" shows"path_image (rectpath a b) ⊆ cbox a b" using assms by (auto simp: path_image_rectpath in_cbox_complex_iff)
lemma path_image_rectpath_inter_box: assumes"Re a ≤ Re b""Im a ≤ Im b" shows"path_image (rectpath a b) ∩ box a b = {}" using assms by (auto simp: path_image_rectpath in_box_complex_iff)
lemma path_image_rectpath_cbox_minus_box: assumes"Re a ≤ Re b""Im a ≤ Im b" shows"path_image (rectpath a b) = cbox a b - box a b" using assms by (auto simp: path_image_rectpath in_cbox_complex_iff in_box_complex_iff)
end
Messung V0.5 in Prozent
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen1.432Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-06-30)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.