diff -r 66c4567664b5 -r eddcc7c726f3 src/HOL/Analysis/Continuous_Extension.thy --- a/src/HOL/Analysis/Continuous_Extension.thy Sun Mar 17 21:26:42 2019 +0100 +++ b/src/HOL/Analysis/Continuous_Extension.thy Mon Mar 18 15:35:34 2019 +0000 @@ -14,7 +14,7 @@ so the "support" must be made explicit in the summation below!\ proposition subordinate_partition_of_unity: - fixes S :: "'a :: euclidean_space set" + fixes S :: "'a::metric_space set" assumes "S \ \\" and opC: "\T. T \ \ \ open T" and fin: "\x. x \ S \ \V. open V \ x \ V \ finite {U \ \. U \ V \ {}}" obtains F :: "['a set, 'a] \ real" @@ -26,9 +26,7 @@ case True then obtain W where "W \ \" "S \ W" by metis then show ?thesis - apply (rule_tac F = "\V x. if V = W then 1 else 0" in that) - apply (auto simp: continuous_on_const supp_sum_def support_on_def) - done + by (rule_tac F = "\V x. if V = W then 1 else 0" in that) (auto simp: supp_sum_def support_on_def) next case False have nonneg: "0 \ supp_sum (\V. setdist {x} (S - V)) \" for x @@ -37,9 +35,9 @@ proof - have "closedin (subtopology euclidean S) (S - V)" by (simp add: Diff_Diff_Int closedin_def opC openin_open_Int \V \ \\) - with that False setdist_eq_0_closedin [of S "S-V" x] setdist_pos_le [of "{x}" "S - V"] - show ?thesis - by (simp add: order_class.order.order_iff_strict) + with that False setdist_pos_le [of "{x}" "S - V"] + show ?thesis + using setdist_gt_0_closedin by fastforce qed have ss_pos: "0 < supp_sum (\V. setdist {x} (S - V)) \" if "x \ S" for x proof - @@ -50,17 +48,16 @@ then have *: "finite {A \ \. \ S \ A \ x \ closure (S - A)}" using closure_def that by (blast intro: rev_finite_subset) have "x \ closure (S - U)" - by (metis \U \ \\ \x \ U\ less_irrefl sd_pos setdist_eq_0_sing_1 that) + using \U \ \\ \x \ U\ opC open_Int_closure_eq_empty by fastforce then show ?thesis apply (simp add: setdist_eq_0_sing_1 supp_sum_def support_on_def) apply (rule ordered_comm_monoid_add_class.sum_pos2 [OF *, of U]) using \U \ \\ \x \ U\ False - apply (auto simp: setdist_pos_le sd_pos that) + apply (auto simp: sd_pos that) done qed define F where - "F \ \W x. if x \ S then setdist {x} (S - W) / supp_sum (\V. setdist {x} (S - V)) \ - else 0" + "F \ \W x. if x \ S then setdist {x} (S - W) / supp_sum (\V. setdist {x} (S - V)) \ else 0" show ?thesis proof (rule_tac F = F in that) have "continuous_on S (F U)" if "U \ \" for U @@ -302,7 +299,7 @@ text \See \cite{dugundji}.\ theorem Dugundji: - fixes f :: "'a::euclidean_space \ 'b::real_inner" + fixes f :: "'a::{metric_space,second_countable_topology} \ 'b::real_inner" assumes "convex C" "C \ {}" and cloin: "closedin (subtopology euclidean U) S" and contf: "continuous_on S f" and "f ` S \ C" @@ -325,9 +322,8 @@ by (auto simp: sd_pos \_def) obtain \ where USsub: "U - S \ \\" and nbrhd: "\U. U \ \ \ open U \ (\T. T \ \ \ U \ T)" - and fin: "\x. x \ U - S - \ \V. open V \ x \ V \ finite {U. U \ \ \ U \ V \ {}}" - using paracompact [OF USS] by auto + and fin: "\x. x \ U - S \ \V. open V \ x \ V \ finite {U. U \ \ \ U \ V \ {}}" + by (rule paracompact [OF USS]) auto have "\v a. v \ U \ v \ S \ a \ S \ T \ ball v (setdist {v} S / 2) \ dist v a \ 2 * setdist {v} S" if "T \ \" for T @@ -353,7 +349,7 @@ proof - have "dist (\ T) v < setdist {\ T} S / 2" using that VA mem_ball by blast - also have "... \ setdist {v} S" + also have "\ \ setdist {v} S" using sdle [OF \T \ \\ \v \ T\] by simp also have vS: "setdist {v} S \ dist a v" by (simp add: setdist_le_dist setdist_sym \a \ S\) @@ -362,9 +358,9 @@ using sdle that vS by force have "dist a (\ T) \ dist a v + dist v (\ T) + dist (\ T) (\ T)" by (metis add.commute add_le_cancel_left dist_commute dist_triangle2 dist_triangle_le) - also have "... \ dist a v + dist a v + dist (\ T) (\ T)" + also have "\ \ dist a v + dist a v + dist (\ T) (\ T)" using VTV by (simp add: dist_commute) - also have "... \ 2 * dist a v + 2 * setdist {\ T} S" + also have "\ \ 2 * dist a v + 2 * setdist {\ T} S" using VA [OF \T \ \\] by auto finally show ?thesis using VTS by linarith @@ -477,66 +473,65 @@ corollary Tietze: - fixes f :: "'a::euclidean_space \ 'b::real_inner" + fixes f :: "'a::{metric_space,second_countable_topology} \ 'b::real_inner" assumes "continuous_on S f" - and "closedin (subtopology euclidean U) S" - and "0 \ B" - and "\x. x \ S \ norm(f x) \ B" + and "closedin (subtopology euclidean U) S" + and "0 \ B" + and "\x. x \ S \ norm(f x) \ B" obtains g where "continuous_on U g" "\x. x \ S \ g x = f x" - "\x. x \ U \ norm(g x) \ B" - using assms -by (auto simp: image_subset_iff intro: Dugundji [of "cball 0 B" U S f]) + "\x. x \ U \ norm(g x) \ B" + using assms by (auto simp: image_subset_iff intro: Dugundji [of "cball 0 B" U S f]) corollary%unimportant Tietze_closed_interval: - fixes f :: "'a::euclidean_space \ 'b::euclidean_space" + fixes f :: "'a::{metric_space,second_countable_topology} \ 'b::euclidean_space" assumes "continuous_on S f" - and "closedin (subtopology euclidean U) S" - and "cbox a b \ {}" - and "\x. x \ S \ f x \ cbox a b" + and "closedin (subtopology euclidean U) S" + and "cbox a b \ {}" + and "\x. x \ S \ f x \ cbox a b" obtains g where "continuous_on U g" "\x. x \ S \ g x = f x" - "\x. x \ U \ g x \ cbox a b" -apply (rule Dugundji [of "cbox a b" U S f]) -using assms by auto + "\x. x \ U \ g x \ cbox a b" + apply (rule Dugundji [of "cbox a b" U S f]) + using assms by auto corollary%unimportant Tietze_closed_interval_1: - fixes f :: "'a::euclidean_space \ real" + fixes f :: "'a::{metric_space,second_countable_topology} \ real" assumes "continuous_on S f" - and "closedin (subtopology euclidean U) S" - and "a \ b" - and "\x. x \ S \ f x \ cbox a b" + and "closedin (subtopology euclidean U) S" + and "a \ b" + and "\x. x \ S \ f x \ cbox a b" obtains g where "continuous_on U g" "\x. x \ S \ g x = f x" - "\x. x \ U \ g x \ cbox a b" -apply (rule Dugundji [of "cbox a b" U S f]) -using assms by (auto simp: image_subset_iff) + "\x. x \ U \ g x \ cbox a b" + apply (rule Dugundji [of "cbox a b" U S f]) + using assms by (auto simp: image_subset_iff) corollary%unimportant Tietze_open_interval: - fixes f :: "'a::euclidean_space \ 'b::euclidean_space" + fixes f :: "'a::{metric_space,second_countable_topology} \ 'b::euclidean_space" assumes "continuous_on S f" - and "closedin (subtopology euclidean U) S" - and "box a b \ {}" - and "\x. x \ S \ f x \ box a b" + and "closedin (subtopology euclidean U) S" + and "box a b \ {}" + and "\x. x \ S \ f x \ box a b" obtains g where "continuous_on U g" "\x. x \ S \ g x = f x" - "\x. x \ U \ g x \ box a b" -apply (rule Dugundji [of "box a b" U S f]) -using assms by auto + "\x. x \ U \ g x \ box a b" + apply (rule Dugundji [of "box a b" U S f]) + using assms by auto corollary%unimportant Tietze_open_interval_1: - fixes f :: "'a::euclidean_space \ real" + fixes f :: "'a::{metric_space,second_countable_topology} \ real" assumes "continuous_on S f" - and "closedin (subtopology euclidean U) S" - and "a < b" - and no: "\x. x \ S \ f x \ box a b" + and "closedin (subtopology euclidean U) S" + and "a < b" + and no: "\x. x \ S \ f x \ box a b" obtains g where "continuous_on U g" "\x. x \ S \ g x = f x" - "\x. x \ U \ g x \ box a b" -apply (rule Dugundji [of "box a b" U S f]) -using assms by (auto simp: image_subset_iff) + "\x. x \ U \ g x \ box a b" + apply (rule Dugundji [of "box a b" U S f]) + using assms by (auto simp: image_subset_iff) corollary%unimportant Tietze_unbounded: - fixes f :: "'a::euclidean_space \ 'b::real_inner" + fixes f :: "'a::{metric_space,second_countable_topology} \ 'b::real_inner" assumes "continuous_on S f" - and "closedin (subtopology euclidean U) S" + and "closedin (subtopology euclidean U) S" obtains g where "continuous_on U g" "\x. x \ S \ g x = f x" -apply (rule Dugundji [of UNIV U S f]) -using assms by auto + apply (rule Dugundji [of UNIV U S f]) + using assms by auto end