src/HOL/Analysis/Further_Topology.thy
changeset 76943 f5a7f171d186
parent 76874 d6b02d54dbf8
child 76944 7ed303c02418
equal deleted inserted replaced
76942:c732fa27b60f 76943:f5a7f171d186
   166     using fim by (simp add: image_subset_iff)
   166     using fim by (simp add: image_subset_iff)
   167   have "compact (sphere 0 1 \<inter> S)"
   167   have "compact (sphere 0 1 \<inter> S)"
   168     by (simp add: \<open>subspace S\<close> closed_subspace compact_Int_closed)
   168     by (simp add: \<open>subspace S\<close> closed_subspace compact_Int_closed)
   169   then obtain g where pfg: "polynomial_function g" and gim: "g ` (sphere 0 1 \<inter> S) \<subseteq> T"
   169   then obtain g where pfg: "polynomial_function g" and gim: "g ` (sphere 0 1 \<inter> S) \<subseteq> T"
   170                 and g12: "\<And>x. x \<in> sphere 0 1 \<inter> S \<Longrightarrow> norm(f x - g x) < 1/2"
   170                 and g12: "\<And>x. x \<in> sphere 0 1 \<inter> S \<Longrightarrow> norm(f x - g x) < 1/2"
   171     apply (rule Stone_Weierstrass_polynomial_function_subspace [OF _ contf _ \<open>subspace T\<close>, of "1/2"])
   171     using Stone_Weierstrass_polynomial_function_subspace [OF _ contf _ \<open>subspace T\<close>, of "1/2"] fim by auto
   172     using fim by auto
       
   173   have gnz: "g x \<noteq> 0" if "x \<in> sphere 0 1 \<inter> S" for x
   172   have gnz: "g x \<noteq> 0" if "x \<in> sphere 0 1 \<inter> S" for x
   174   proof -
   173   proof -
   175     have "norm (f x) = 1"
   174     have "norm (f x) = 1"
   176       using fim that by (simp add: image_subset_iff)
   175       using fim that by (simp add: image_subset_iff)
   177     then show ?thesis
   176     then show ?thesis
   324   next
   323   next
   325     case False
   324     case False
   326     obtain T':: "'a set"
   325     obtain T':: "'a set"
   327       where "subspace T'" and affT': "aff_dim T' = aff_dim T"
   326       where "subspace T'" and affT': "aff_dim T' = aff_dim T"
   328         and homT: "rel_frontier T homeomorphic sphere 0 1 \<inter> T'"
   327         and homT: "rel_frontier T homeomorphic sphere 0 1 \<inter> T'"
   329       apply (rule spheremap_lemma3 [OF \<open>bounded T\<close> \<open>convex T\<close> subspace_UNIV, where 'b='a])
   328       using \<open>T \<noteq> {}\<close>  spheremap_lemma3 [OF \<open>bounded T\<close> \<open>convex T\<close> subspace_UNIV, where 'b='a] 
   330       using \<open>T \<noteq> {}\<close>  by (auto simp add: aff_dim_le_DIM)
   329       by (force simp add: aff_dim_le_DIM)
   331     with homeomorphic_imp_homotopy_eqv
   330     with homeomorphic_imp_homotopy_eqv
   332     have relT: "sphere 0 1 \<inter> T'  homotopy_eqv rel_frontier T"
   331     have relT: "sphere 0 1 \<inter> T'  homotopy_eqv rel_frontier T"
   333       using homotopy_equivalent_space_sym by blast
   332       using homotopy_equivalent_space_sym by blast
   334     have "aff_dim S \<le> int (dim T')"
   333     have "aff_dim S \<le> int (dim T')"
   335       using affT' \<open>subspace T'\<close> affST aff_dim_subspace by force
   334       using affT' \<open>subspace T'\<close> affST aff_dim_subspace by force
   342     have relS: "sphere 0 1 \<inter> S'  homotopy_eqv rel_frontier S"
   341     have relS: "sphere 0 1 \<inter> S'  homotopy_eqv rel_frontier S"
   343       using homotopy_equivalent_space_sym by blast
   342       using homotopy_equivalent_space_sym by blast
   344     have dimST': "dim S' < dim T'"
   343     have dimST': "dim S' < dim T'"
   345       by (metis \<open>S' \<subseteq> T'\<close> \<open>subspace S'\<close> \<open>subspace T'\<close> affS' affST affT' less_irrefl not_le subspace_dim_equal)
   344       by (metis \<open>S' \<subseteq> T'\<close> \<open>subspace S'\<close> \<open>subspace T'\<close> affS' affST affT' less_irrefl not_le subspace_dim_equal)
   346     have "\<exists>c. homotopic_with_canon (\<lambda>z. True) (rel_frontier S) (rel_frontier T) f (\<lambda>x. c)"
   345     have "\<exists>c. homotopic_with_canon (\<lambda>z. True) (rel_frontier S) (rel_frontier T) f (\<lambda>x. c)"
   347       apply (rule homotopy_eqv_homotopic_triviality_null_imp [OF relT contf fim])
   346       using spheremap_lemma2 homotopy_eqv_cohomotopic_triviality_null[OF relS] 
   348       apply (rule homotopy_eqv_cohomotopic_triviality_null[OF relS, THEN iffD1, rule_format])
   347       using homotopy_eqv_homotopic_triviality_null_imp [OF relT contf fim]
   349        apply (metis dimST' \<open>subspace S'\<close>  \<open>subspace T'\<close>  \<open>S' \<subseteq> T'\<close> spheremap_lemma2, blast)
   348       by (metis \<open>S' \<subseteq> T'\<close> \<open>subspace S'\<close> \<open>subspace T'\<close> dimST')
   350       done
       
   351     with that show ?thesis by blast
   349     with that show ?thesis by blast
   352   qed
   350   qed
   353 qed
   351 qed
   354 
   352 
   355 lemma inessential_spheremap_lowdim:
   353 lemma inessential_spheremap_lowdim:
   368       by (meson f nullhomotopic_from_contractible contractible_sphere that)
   366       by (meson f nullhomotopic_from_contractible contractible_sphere that)
   369   next
   367   next
   370     case False
   368     case False
   371     with \<open>\<not> s \<le> 0\<close> have "r > 0" "s > 0" by auto
   369     with \<open>\<not> s \<le> 0\<close> have "r > 0" "s > 0" by auto
   372     show thesis
   370     show thesis
   373       apply (rule inessential_spheremap_lowdim_gen [of "cball a r" "cball b s" f])
   371       using inessential_spheremap_lowdim_gen [of "cball a r" "cball b s" f]
   374       using  \<open>0 < r\<close> \<open>0 < s\<close> assms(1) that by (simp_all add: f aff_dim_cball)
   372       using  \<open>0 < r\<close> \<open>0 < s\<close> assms(1) that by (auto simp add: f aff_dim_cball)
   375   qed
   373   qed
   376 qed
   374 qed
   377 
   375 
   378 
   376 
   379 
   377 
   399     have "T \<inter> S \<subseteq> K \<or> S = T"
   397     have "T \<inter> S \<subseteq> K \<or> S = T"
   400       using that by (metis (no_types) insert.prems(2) insertCI)
   398       using that by (metis (no_types) insert.prems(2) insertCI)
   401     then show ?thesis
   399     then show ?thesis
   402       using UnionI feq geq \<open>S \<notin> \<F>\<close> subsetD that by fastforce
   400       using UnionI feq geq \<open>S \<notin> \<F>\<close> subsetD that by fastforce
   403   qed
   401   qed
   404   show ?case
   402   moreover have "continuous_on (S \<union> \<Union> \<F>) (\<lambda>x. if x \<in> S then f x else g x)"
   405     apply (rule_tac x="\<lambda>x. if x \<in> S then f x else g x" in exI, simp)
   403     by (auto simp: insert closed_Union contf contg  intro: fg continuous_on_cases)
   406     apply (intro conjI continuous_on_cases)
   404   ultimately show ?case
   407     using fim gim feq geq
   405     by (smt (verit, del_insts) Int_iff UnE complete_lattice_class.Sup_insert feq fim geq gim image_subset_iff)
   408     apply (force simp: insert closed_Union contf contg inf_commute intro: fg)+
       
   409     done
       
   410 qed
   406 qed
   411 
   407 
   412 lemma extending_maps_Union:
   408 lemma extending_maps_Union:
   413   assumes fin: "finite \<F>"
   409   assumes fin: "finite \<F>"
   414       and "\<And>S. S \<in> \<F> \<Longrightarrow> \<exists>g. continuous_on S g \<and> g ` S \<subseteq> T \<and> (\<forall>x \<in> S \<inter> K. g x = h x)"
   410       and "\<And>S. S \<in> \<F> \<Longrightarrow> \<exists>g. continuous_on S g \<and> g ` S \<subseteq> T \<and> (\<forall>x \<in> S \<inter> K. g x = h x)"
   571                 if "X \<in> \<G> \<union> ?Faces" "Y \<in> \<G> \<union> ?Faces" "\<not> Y \<subseteq> X" for X Y
   567                 if "X \<in> \<G> \<union> ?Faces" "Y \<in> \<G> \<union> ?Faces" "\<not> Y \<subseteq> X" for X Y
   572     proof -
   568     proof -
   573       have ff: "X \<inter> Y face_of X \<and> X \<inter> Y face_of Y"
   569       have ff: "X \<inter> Y face_of X \<and> X \<inter> Y face_of Y"
   574         if XY: "X face_of D" "Y face_of E" and DE: "D \<in> \<F>" "E \<in> \<F>" for D E
   570         if XY: "X face_of D" "Y face_of E" and DE: "D \<in> \<F>" "E \<in> \<F>" for D E
   575         by (rule face_of_Int_subface [OF _ _ XY]) (auto simp: face' DE)
   571         by (rule face_of_Int_subface [OF _ _ XY]) (auto simp: face' DE)
   576       show ?thesis
   572      show ?thesis
   577         using that
   573        using that
   578         apply auto
   574         apply clarsimp
   579         apply (drule_tac x="X \<inter> Y" in spec, safe)
   575         by (smt (verit, ccfv_SIG) IntI face_of_aff_dim_lt face_of_imp_convex [of X] face_of_imp_convex [of Y] face_of_trans ff)
   580         using ff face_of_imp_convex [of X] face_of_imp_convex [of Y]
       
   581         apply (fastforce dest: face_of_aff_dim_lt)
       
   582         by (meson face_of_trans ff)
       
   583     qed
   576     qed
   584     obtain g where "continuous_on (\<Union>(\<G> \<union> ?Faces)) g"
   577     obtain g where "continuous_on (\<Union>(\<G> \<union> ?Faces)) g"
   585                    "g ` \<Union>(\<G> \<union> ?Faces) \<subseteq> rel_frontier T"
   578                    "g ` \<Union>(\<G> \<union> ?Faces) \<subseteq> rel_frontier T"
   586                    "(\<forall>x \<in> \<Union>(\<G> \<union> ?Faces) \<inter>
   579                    "(\<forall>x \<in> \<Union>(\<G> \<union> ?Faces) \<inter>
   587                           \<Union>(\<G> \<union> {D. \<exists>C\<in>\<F>. D face_of C \<and> aff_dim D < p}). g x = h x)"
   580                           \<Union>(\<G> \<union> {D. \<exists>C\<in>\<F>. D face_of C \<and> aff_dim D < p}). g x = h x)"
   709   then have "finite \<H>"
   702   then have "finite \<H>"
   710     by (auto simp: \<H>_def \<open>finite \<G>\<close> intro: finite_subset [OF _ *])
   703     by (auto simp: \<H>_def \<open>finite \<G>\<close> intro: finite_subset [OF _ *])
   711   have face': "\<And>S T. \<lbrakk>S \<in> \<F>; T \<in> \<F>\<rbrakk> \<Longrightarrow> (S \<inter> T) face_of S \<and> (S \<inter> T) face_of T"
   704   have face': "\<And>S T. \<lbrakk>S \<in> \<F>; T \<in> \<F>\<rbrakk> \<Longrightarrow> (S \<inter> T) face_of S \<and> (S \<inter> T) face_of T"
   712     by (metis face inf_commute)
   705     by (metis face inf_commute)
   713   have *: "\<And>X Y. \<lbrakk>X \<in> \<H>; Y \<in> \<H>\<rbrakk> \<Longrightarrow> X \<inter> Y face_of X"
   706   have *: "\<And>X Y. \<lbrakk>X \<in> \<H>; Y \<in> \<H>\<rbrakk> \<Longrightarrow> X \<inter> Y face_of X"
   714     unfolding \<H>_def
   707     by (simp add: \<H>_def) (smt (verit) \<open>\<G> \<subseteq> \<F>\<close> DiffE face' face_of_Int_subface in_mono inf.idem)
   715     using subsetD [OF \<open>\<G> \<subseteq> \<F>\<close>] apply (auto simp add: face)
       
   716     apply (meson face' face_of_Int_subface face_of_refl_eq poly polytope_imp_convex)+
       
   717     done
       
   718   obtain h where conth: "continuous_on (\<Union>\<H>) h" and him: "h ` (\<Union>\<H>) \<subseteq> rel_frontier T"
   708   obtain h where conth: "continuous_on (\<Union>\<H>) h" and him: "h ` (\<Union>\<H>) \<subseteq> rel_frontier T"
   719              and hf: "\<And>x. x \<in> \<Union>\<G> \<Longrightarrow> h x = f x" 
   709              and hf: "\<And>x. x \<in> \<Union>\<G> \<Longrightarrow> h x = f x" 
   720   proof (rule extend_map_lemma [OF \<open>finite \<H>\<close> [unfolded \<H>_def] Un_upper1 T])
   710   proof (rule extend_map_lemma [OF \<open>finite \<H>\<close> [unfolded \<H>_def] Un_upper1 T])
   721     show "\<And>X. \<lbrakk>X \<in> \<G> \<union> {D. \<exists>C\<in>\<F> - \<G>. D face_of C \<and> aff_dim D < aff_dim T}\<rbrakk> \<Longrightarrow> polytope X"
   711     show "\<And>X. \<lbrakk>X \<in> \<G> \<union> {D. \<exists>C\<in>\<F> - \<G>. D face_of C \<and> aff_dim D < aff_dim T}\<rbrakk> \<Longrightarrow> polytope X"
   722       using \<open>\<G> \<subseteq> \<F>\<close> face_of_polytope_polytope poly by fastforce
   712       using \<open>\<G> \<subseteq> \<F>\<close> face_of_polytope_polytope poly by fastforce
  1141       and clo: "closedin (top_of_set U) S" and K: "disjnt K S" "K \<subseteq> U"
  1131       and clo: "closedin (top_of_set U) S" and K: "disjnt K S" "K \<subseteq> U"
  1142   obtains g where "continuous_on (U - L) g" "g ` (U - L) \<subseteq> T" "\<And>x. x \<in> S \<Longrightarrow> g x = f x"
  1132   obtains g where "continuous_on (U - L) g" "g ` (U - L) \<subseteq> T" "\<And>x. x \<in> S \<Longrightarrow> g x = f x"
  1143 proof (cases "K = {}")
  1133 proof (cases "K = {}")
  1144   case True
  1134   case True
  1145   then show ?thesis
  1135   then show ?thesis
  1146     by (metis Diff_empty Diff_subset contf fim continuous_on_subset image_subsetI rev_image_eqI subset_iff that)
  1136     by (metis Diff_empty Diff_subset contf fim continuous_on_subset image_subsetI image_eqI subset_iff that)
  1147 next
  1137 next
  1148   case False
  1138   case False
  1149   have "S \<subseteq> U"
  1139   have "S \<subseteq> U"
  1150     using clo closedin_limpt by blast
  1140     using clo closedin_limpt by blast
  1151   then have "(U - S) \<inter> K \<noteq> {}"
  1141   then have "(U - S) \<inter> K \<noteq> {}"
  1164   proof -
  1154   proof -
  1165     have "C \<subseteq> U-S" "C \<inter> L \<noteq> {}"
  1155     have "C \<subseteq> U-S" "C \<inter> L \<noteq> {}"
  1166       by (simp_all add: in_components_subset comps that)
  1156       by (simp_all add: in_components_subset comps that)
  1167     then obtain a where a: "a \<in> C" "a \<in> L" by auto
  1157     then obtain a where a: "a \<in> C" "a \<in> L" by auto
  1168     have opeUC: "openin (top_of_set U) C"
  1158     have opeUC: "openin (top_of_set U) C"
  1169     proof (rule openin_trans)
  1159       by (metis C \<open>locally connected U\<close> clo closedin_def locally_connected_open_component topspace_euclidean_subtopology)
  1170       show "openin (top_of_set (U-S)) C"
       
  1171         by (simp add: \<open>locally connected U\<close> clo locally_diff_closed openin_components_locally_connected [OF _ C])
       
  1172       show "openin (top_of_set U) (U - S)"
       
  1173         by (simp add: clo openin_diff)
       
  1174     qed
       
  1175     then obtain d where "C \<subseteq> U" "0 < d" and d: "cball a d \<inter> U \<subseteq> C"
  1160     then obtain d where "C \<subseteq> U" "0 < d" and d: "cball a d \<inter> U \<subseteq> C"
  1176       using openin_contains_cball by (metis \<open>a \<in> C\<close>)
  1161       using openin_contains_cball by (metis \<open>a \<in> C\<close>)
  1177     then have "ball a d \<inter> U \<subseteq> C"
  1162     then have "ball a d \<inter> U \<subseteq> C"
  1178       by auto
  1163       by auto
  1179     obtain h k where homhk: "homeomorphism (S \<union> C) (S \<union> C) h k"
  1164     obtain h k where homhk: "homeomorphism (S \<union> C) (S \<union> C) h k"
  1188       show "ball a d \<inter> U \<noteq> {}"
  1173       show "ball a d \<inter> U \<noteq> {}"
  1189         using \<open>0 < d\<close> \<open>C \<subseteq> U\<close> \<open>a \<in> C\<close> by force
  1174         using \<open>0 < d\<close> \<open>C \<subseteq> U\<close> \<open>a \<in> C\<close> by force
  1190       show "finite (C \<inter> K)"
  1175       show "finite (C \<inter> K)"
  1191         by (simp add: \<open>finite K\<close>)
  1176         by (simp add: \<open>finite K\<close>)
  1192       show "S \<union> C \<subseteq> affine hull C"
  1177       show "S \<union> C \<subseteq> affine hull C"
  1193         by (metis \<open>C \<subseteq> U\<close> \<open>S \<subseteq> U\<close> \<open>a \<in> C\<close> opeUC affine_hull_eq affine_hull_openin all_not_in_conv assms(2) sup.bounded_iff)
  1178         by (metis \<open>S \<subseteq> U\<close> \<open>a \<in> C\<close> affine_hull_eq affine_hull_openin assms(2) empty_iff hull_subset le_sup_iff opeUC)
  1194       show "connected C"
  1179       show "connected C"
  1195         by (metis C in_components_connected)
  1180         by (metis C in_components_connected)
  1196     qed auto
  1181     qed auto
  1197     have a_BU: "a \<in> ball a d \<inter> U"
  1182     have a_BU: "a \<in> ball a d \<inter> U"
  1198       using \<open>0 < d\<close> \<open>C \<subseteq> U\<close> \<open>a \<in> C\<close> by auto
  1183       using \<open>0 < d\<close> \<open>C \<subseteq> U\<close> \<open>a \<in> C\<close> by auto
  1358     using \<open>S \<subseteq> U\<close> in_components_subset by (auto simp: F_def G_def UF_def)
  1343     using \<open>S \<subseteq> U\<close> in_components_subset by (auto simp: F_def G_def UF_def)
  1359   have clo1: "closedin (top_of_set (S \<union> \<Union>G \<union> (S \<union> UF))) (S \<union> \<Union>G)"
  1344   have clo1: "closedin (top_of_set (S \<union> \<Union>G \<union> (S \<union> UF))) (S \<union> \<Union>G)"
  1360   proof (rule closedin_closed_subset [OF _ SU'])
  1345   proof (rule closedin_closed_subset [OF _ SU'])
  1361     have *: "\<And>C. C \<in> F \<Longrightarrow> openin (top_of_set U) C"
  1346     have *: "\<And>C. C \<in> F \<Longrightarrow> openin (top_of_set U) C"
  1362       unfolding F_def
  1347       unfolding F_def
  1363       by clarify (metis (no_types, lifting) \<open>locally connected U\<close> clo closedin_def locally_diff_closed openin_components_locally_connected openin_trans topspace_euclidean_subtopology)
  1348       by (metis (no_types, lifting) \<open>locally connected U\<close> clo closedin_def locally_connected_open_component mem_Collect_eq topspace_euclidean_subtopology)
  1364     show "closedin (top_of_set U) (U - UF)"
  1349     show "closedin (top_of_set U) (U - UF)"
  1365       unfolding UF_def
  1350       unfolding UF_def by (force intro: openin_delete *)
  1366       by (force intro: openin_delete *)
  1351     have "(\<Union>x\<in>F. x - {a x}) \<inter> S = {}" "\<Union> G \<subseteq> U"
  1367     show "S \<union> \<Union>G = (U - UF) \<inter> (S \<union> \<Union>G \<union> (S \<union> UF))"
  1352       using in_components_subset by (auto simp: F_def G_def)
  1368       using \<open>S \<subseteq> U\<close> apply (auto simp: F_def G_def UF_def)
  1353     moreover have "\<Union> G \<inter> UF = {}"
  1369         apply (metis Diff_iff UnionI Union_components)
  1354       using components_nonoverlap by (fastforce simp: F_def G_def UF_def)
  1370        apply (metis DiffD1 UnionI Union_components)
  1355     ultimately show "S \<union> \<Union>G = (U - UF) \<inter> (S \<union> \<Union>G \<union> (S \<union> UF))"
  1371       by (metis (no_types, lifting) IntI components_nonoverlap empty_iff)
  1356       using UF_def \<open>S \<subseteq> U\<close> by auto
  1372   qed
  1357   qed
  1373   have clo2: "closedin (top_of_set (S \<union> \<Union>G \<union> (S \<union> UF))) (S \<union> UF)"
  1358   have clo2: "closedin (top_of_set (S \<union> \<Union>G \<union> (S \<union> UF))) (S \<union> UF)"
  1374   proof (rule closedin_closed_subset [OF _ SU'])
  1359   proof (rule closedin_closed_subset [OF _ SU'])
  1375     show "closedin (top_of_set U) (\<Union>C\<in>F. S \<union> C)"
  1360     show "closedin (top_of_set U) (\<Union>C\<in>F. S \<union> C)"
  1376     proof (rule closedin_Union)
  1361     proof (rule closedin_Union)
  1377       show "\<And>T. T \<in> (\<union>) S ` F \<Longrightarrow> closedin (top_of_set U) T"
  1362       show "\<And>T. T \<in> (\<union>) S ` F \<Longrightarrow> closedin (top_of_set U) T"
  1378         using F_def \<open>locally connected U\<close> clo closedin_Un_complement_component by blast
  1363         using F_def \<open>locally connected U\<close> clo closedin_Un_complement_component by blast
  1379     qed (simp add: \<open>finite F\<close>)
  1364     qed (simp add: \<open>finite F\<close>)
  1380     show "S \<union> UF = (\<Union>C\<in>F. S \<union> C) \<inter> (S \<union> \<Union>G \<union> (S \<union> UF))"
  1365     show "S \<union> UF = (\<Union>C\<in>F. S \<union> C) \<inter> (S \<union> \<Union>G \<union> (S \<union> UF))"
  1381       using \<open>S \<subseteq> U\<close> apply (auto simp: F_def G_def UF_def)
  1366     proof
  1382       using C0 apply blast
  1367       show "\<Union> ((\<union>) S ` F) \<inter> (S \<union> \<Union> G \<union> (S \<union> UF)) \<subseteq> S \<union> UF"
  1383       by (metis components_nonoverlap disjoint_iff)
  1368         using components_eq [of _ "U-S"]
       
  1369         by (auto simp add: F_def G_def UF_def disjoint_iff_not_equal)
       
  1370     qed (use UF_def \<open>C0 \<in> F\<close> in blast)
  1384   qed
  1371   qed
  1385   have SUG: "S \<union> \<Union>G \<subseteq> U - K"
  1372   have SUG: "S \<union> \<Union>G \<subseteq> U - K"
  1386     using \<open>S \<subseteq> U\<close> K apply (auto simp: G_def disjnt_iff)
  1373     using \<open>S \<subseteq> U\<close> K in_components_subset[of _ "U-S"] by (force simp: G_def disjnt_iff)
  1387     by (meson Diff_iff subsetD in_components_subset)
       
  1388   then have contf': "continuous_on (S \<union> \<Union>G) f"
  1374   then have contf': "continuous_on (S \<union> \<Union>G) f"
  1389     by (rule continuous_on_subset [OF contf])
  1375     by (rule continuous_on_subset [OF contf])
  1390   have contg': "continuous_on (S \<union> UF) g"
  1376   have contg': "continuous_on (S \<union> UF) g"
  1391     by (simp add: contg)
  1377     by (simp add: contg)
  1392   have  "\<And>x. \<lbrakk>S \<subseteq> U; x \<in> S\<rbrakk> \<Longrightarrow> f x = g x"
  1378   have  "\<And>x. \<lbrakk>S \<subseteq> U; x \<in> S\<rbrakk> \<Longrightarrow> f x = g x"
  1393     by (subst gh) (auto simp: ah C0 intro: \<open>C0 \<in> F\<close>)
  1379     by (subst gh) (auto simp: ah C0 intro: \<open>C0 \<in> F\<close>)
  1394   then have f_eq_g: "\<And>x. x \<in> S \<union> UF \<and> x \<in> S \<union> \<Union>G \<Longrightarrow> f x = g x"
  1380   then have f_eq_g: "\<And>x. x \<in> S \<union> UF \<and> x \<in> S \<union> \<Union>G \<Longrightarrow> f x = g x"
  1395     using \<open>S \<subseteq> U\<close> apply (auto simp: F_def G_def UF_def dest: in_components_subset)
  1381     using \<open>S \<subseteq> U\<close> components_eq [of _ "U-S"] by (fastforce simp add: F_def G_def UF_def)
  1396     using components_eq by blast
       
  1397   have cont: "continuous_on (S \<union> \<Union>G \<union> (S \<union> UF)) (\<lambda>x. if x \<in> S \<union> \<Union>G then f x else g x)"
  1382   have cont: "continuous_on (S \<union> \<Union>G \<union> (S \<union> UF)) (\<lambda>x. if x \<in> S \<union> \<Union>G then f x else g x)"
  1398     by (blast intro: continuous_on_cases_local [OF clo1 clo2 contf' contg' f_eq_g, of "\<lambda>x. x \<in> S \<union> \<Union>G"])
  1383     by (blast intro: continuous_on_cases_local [OF clo1 clo2 contf' contg' f_eq_g, of "\<lambda>x. x \<in> S \<union> \<Union>G"])
  1399   show ?thesis
  1384   show ?thesis
  1400   proof
  1385   proof
  1401     have UF: "\<Union>F - L \<subseteq> UF"
  1386     have UF: "\<Union>F - L \<subseteq> UF"