diff -r 6440577e34ee -r ed38f9a834d8 src/HOL/Analysis/Path_Connected.thy --- a/src/HOL/Analysis/Path_Connected.thy Thu Jan 05 15:03:37 2017 +0000 +++ b/src/HOL/Analysis/Path_Connected.thy Thu Jan 05 16:03:23 2017 +0000 @@ -5302,6 +5302,106 @@ using compact_eq_bounded_closed locally_mono by blast qed +lemma locally_compact_openin_Un: + fixes S :: "'a::euclidean_space set" + assumes LCS: "locally compact S" and LCT:"locally compact T" + and opS: "openin (subtopology euclidean (S \ T)) S" + and opT: "openin (subtopology euclidean (S \ T)) T" + shows "locally compact (S \ T)" +proof - + have "\e>0. closed (cball x e \ (S \ T))" if "x \ S" for x + proof - + obtain e1 where "e1 > 0" and e1: "closed (cball x e1 \ S)" + using LCS \x \ S\ unfolding locally_compact_Int_cball by blast + moreover obtain e2 where "e2 > 0" and e2: "cball x e2 \ (S \ T) \ S" + by (meson \x \ S\ opS openin_contains_cball) + then have "cball x e2 \ (S \ T) = cball x e2 \ S" + by force + ultimately show ?thesis + apply (rule_tac x="min e1 e2" in exI) + apply (auto simp: cball_min_Int \e2 > 0\ inf_assoc closed_Int) + by (metis closed_Int closed_cball inf_left_commute) + qed + moreover have "\e>0. closed (cball x e \ (S \ T))" if "x \ T" for x + proof - + obtain e1 where "e1 > 0" and e1: "closed (cball x e1 \ T)" + using LCT \x \ T\ unfolding locally_compact_Int_cball by blast + moreover obtain e2 where "e2 > 0" and e2: "cball x e2 \ (S \ T) \ T" + by (meson \x \ T\ opT openin_contains_cball) + then have "cball x e2 \ (S \ T) = cball x e2 \ T" + by force + ultimately show ?thesis + apply (rule_tac x="min e1 e2" in exI) + apply (auto simp: cball_min_Int \e2 > 0\ inf_assoc closed_Int) + by (metis closed_Int closed_cball inf_left_commute) + qed + ultimately show ?thesis + by (force simp: locally_compact_Int_cball) +qed + +lemma locally_compact_closedin_Un: + fixes S :: "'a::euclidean_space set" + assumes LCS: "locally compact S" and LCT:"locally compact T" + and clS: "closedin (subtopology euclidean (S \ T)) S" + and clT: "closedin (subtopology euclidean (S \ T)) T" + shows "locally compact (S \ T)" +proof - + have "\e>0. closed (cball x e \ (S \ T))" if "x \ S" "x \ T" for x + proof - + obtain e1 where "e1 > 0" and e1: "closed (cball x e1 \ S)" + using LCS \x \ S\ unfolding locally_compact_Int_cball by blast + moreover + obtain e2 where "e2 > 0" and e2: "closed (cball x e2 \ T)" + using LCT \x \ T\ unfolding locally_compact_Int_cball by blast + ultimately show ?thesis + apply (rule_tac x="min e1 e2" in exI) + apply (auto simp: cball_min_Int \e2 > 0\ inf_assoc closed_Int Int_Un_distrib) + by (metis closed_Int closed_Un closed_cball inf_left_commute) + qed + moreover + have "\e>0. closed (cball x e \ (S \ T))" if x: "x \ S" "x \ T" for x + proof - + obtain e1 where "e1 > 0" and e1: "closed (cball x e1 \ S)" + using LCS \x \ S\ unfolding locally_compact_Int_cball by blast + moreover + obtain e2 where "e2>0" and "cball x e2 \ (S \ T) \ S - T" + using clT x by (fastforce simp: openin_contains_cball closedin_def) + then have "closed (cball x e2 \ T)" + proof - + have "{} = T - (T - cball x e2)" + using Diff_subset Int_Diff \cball x e2 \ (S \ T) \ S - T\ by auto + then show ?thesis + by (simp add: Diff_Diff_Int inf_commute) + qed + ultimately show ?thesis + apply (rule_tac x="min e1 e2" in exI) + apply (auto simp: cball_min_Int \e2 > 0\ inf_assoc closed_Int Int_Un_distrib) + by (metis closed_Int closed_Un closed_cball inf_left_commute) + qed + moreover + have "\e>0. closed (cball x e \ (S \ T))" if x: "x \ S" "x \ T" for x + proof - + obtain e1 where "e1 > 0" and e1: "closed (cball x e1 \ T)" + using LCT \x \ T\ unfolding locally_compact_Int_cball by blast + moreover + obtain e2 where "e2>0" and "cball x e2 \ (S \ T) \ S \ T - S" + using clS x by (fastforce simp: openin_contains_cball closedin_def) + then have "closed (cball x e2 \ S)" + by (metis Diff_disjoint Int_empty_right closed_empty inf.left_commute inf.orderE inf_sup_absorb) + ultimately show ?thesis + apply (rule_tac x="min e1 e2" in exI) + apply (auto simp: cball_min_Int \e2 > 0\ inf_assoc closed_Int Int_Un_distrib) + by (metis closed_Int closed_Un closed_cball inf_left_commute) + qed + ultimately show ?thesis + by (auto simp: locally_compact_Int_cball) +qed + +lemma locally_compact_Times: + fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set" + shows "\locally compact S; locally compact T\ \ locally compact (S \ T)" + by (auto simp: compact_Times locally_Times) + subsection\Important special cases of local connectedness and path connectedness\ lemma locally_connected_1: