| author | wenzelm | 
| Wed, 16 Oct 2024 21:41:05 +0200 | |
| changeset 81177 | 137ea3d464be | 
| parent 80175 | 200107cdd3ac | 
| child 82323 | b022c013b04b | 
| permissions | -rw-r--r-- | 
| 69722 
b5163b2132c5
minor tagging updates in 13 theories
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
69712diff
changeset | 1 | section \<open>Extending Continous Maps, Invariance of Domain, etc\<close> (*FIX rename? *) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 2 | |
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 3 | text\<open>Ported from HOL Light (moretop.ml) by L C Paulson\<close> | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 4 | |
| 64289 
42f28160bad9
HOL-Analysis: move Function Topology from AFP/Ergodict_Theory; HOL-Probability: move Essential Supremum from AFP/Lp
 hoelzl parents: 
64287diff
changeset | 5 | theory Further_Topology | 
| 70642 
de9c4ed2d5df
Half of Brouwer_Fixpoint split off to form a separate theory: Retracts.
 paulson <lp15@cam.ac.uk> parents: 
70620diff
changeset | 6 | imports Weierstrass_Theorems Polytope Complex_Transcendental Equivalence_Lebesgue_Henstock_Integration Retracts | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 7 | begin | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 8 | |
| 69683 | 9 | subsection\<open>A map from a sphere to a higher dimensional sphere is nullhomotopic\<close> | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68634diff
changeset | 10 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 11 | lemma spheremap_lemma1: | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 12 | fixes f :: "'a::euclidean_space \<Rightarrow> 'a::euclidean_space" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 13 | assumes "subspace S" "subspace T" and dimST: "dim S < dim T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 14 | and "S \<subseteq> T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 15 | and diff_f: "f differentiable_on sphere 0 1 \<inter> S" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 16 | shows "f ` (sphere 0 1 \<inter> S) \<noteq> sphere 0 1 \<inter> T" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 17 | proof | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 18 | assume fim: "f ` (sphere 0 1 \<inter> S) = sphere 0 1 \<inter> T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 19 | have inS: "\<And>x. \<lbrakk>x \<in> S; x \<noteq> 0\<rbrakk> \<Longrightarrow> (x /\<^sub>R norm x) \<in> S" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 20 | using subspace_mul \<open>subspace S\<close> by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 21 |   have subS01: "(\<lambda>x. x /\<^sub>R norm x) ` (S - {0}) \<subseteq> sphere 0 1 \<inter> S"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 22 | using \<open>subspace S\<close> subspace_mul by fastforce | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 23 |   then have diff_f': "f differentiable_on (\<lambda>x. x /\<^sub>R norm x) ` (S - {0})"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 24 | by (rule differentiable_on_subset [OF diff_f]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 25 | define g where "g \<equiv> \<lambda>x. norm x *\<^sub>R f(inverse(norm x) *\<^sub>R x)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 26 |   have gdiff: "g differentiable_on S - {0}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 27 | unfolding g_def | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 28 | by (rule diff_f' derivative_intros differentiable_on_compose [where f=f] | force)+ | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 29 |   have geq: "g ` (S - {0}) = T - {0}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 30 | proof | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 31 | have "\<And>u. \<lbrakk>u \<in> S; norm u *\<^sub>R f (u /\<^sub>R norm u) \<notin> T\<rbrakk> \<Longrightarrow> u = 0" | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 32 | by (metis (mono_tags, lifting) DiffI subS01 subspace_mul [OF \<open>subspace T\<close>] fim image_subset_iff inf_le2 singletonD) | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 33 |     then have "g \<in> (S - {0}) \<rightarrow> T"
 | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 34 | using g_def by blast | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 35 |     moreover have "g \<in> (S - {0}) \<rightarrow> UNIV - {0}"
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 36 | proof (clarsimp simp: g_def) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 37 | fix y | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 38 | assume "y \<in> S" and f0: "f (y /\<^sub>R norm y) = 0" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 39 | then have "y \<noteq> 0 \<Longrightarrow> y /\<^sub>R norm y \<in> sphere 0 1 \<inter> S" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 40 | by (auto simp: subspace_mul [OF \<open>subspace S\<close>]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 41 | then show "y = 0" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 42 | by (metis fim f0 Int_iff image_iff mem_sphere_0 norm_eq_zero zero_neq_one) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 43 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 44 |     ultimately show "g ` (S - {0}) \<subseteq> T - {0}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 45 | by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 46 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 47 | have *: "sphere 0 1 \<inter> T \<subseteq> f ` (sphere 0 1 \<inter> S)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 48 | using fim by (simp add: image_subset_iff) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 49 |     have "x \<in> (\<lambda>x. norm x *\<^sub>R f (x /\<^sub>R norm x)) ` (S - {0})"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 50 | if "x \<in> T" "x \<noteq> 0" for x | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 51 | proof - | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 52 | have "x /\<^sub>R norm x \<in> T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 53 | using \<open>subspace T\<close> subspace_mul that by blast | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 54 | then obtain u where u: "f u \<in> T" "x /\<^sub>R norm x = f u" "norm u = 1" "u \<in> S" | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 55 | using * [THEN subsetD, of "x /\<^sub>R norm x"] \<open>x \<noteq> 0\<close> by auto | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 56 | with that have [simp]: "norm x *\<^sub>R f u = x" | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 57 | by (metis divideR_right norm_eq_zero) | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 58 |       moreover have "norm x *\<^sub>R u \<in> S - {0}"
 | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 59 | using \<open>subspace S\<close> subspace_scale that(2) u by auto | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 60 | with u show ?thesis | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 61 | by (simp add: image_eqI [where x="norm x *\<^sub>R u"]) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 62 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 63 |     then have "T - {0} \<subseteq> (\<lambda>x. norm x *\<^sub>R f (x /\<^sub>R norm x)) ` (S - {0})"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 64 | by force | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 65 |     then show "T - {0} \<subseteq> g ` (S - {0})"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 66 | by (simp add: g_def) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 67 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 68 |   define T' where "T' \<equiv> {y. \<forall>x \<in> T. orthogonal x y}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 69 | have "subspace T'" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 70 | by (simp add: subspace_orthogonal_to_vectors T'_def) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 71 |   have dim_eq: "dim T' + dim T = DIM('a)"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 72 | using dim_subspace_orthogonal_to_vectors [of T UNIV] \<open>subspace T\<close> | 
| 68072 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 immler parents: 
67968diff
changeset | 73 | by (simp add: T'_def) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 74 | have "\<exists>v1 v2. v1 \<in> span T \<and> (\<forall>w \<in> span T. orthogonal v2 w) \<and> x = v1 + v2" for x | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 75 | by (force intro: orthogonal_subspace_decomp_exists [of T x]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 76 | then obtain p1 p2 where p1span: "p1 x \<in> span T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 77 | and "\<And>w. w \<in> span T \<Longrightarrow> orthogonal (p2 x) w" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 78 | and eq: "p1 x + p2 x = x" for x | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 79 | by metis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 80 | then have p1: "\<And>z. p1 z \<in> T" and ortho: "\<And>w. w \<in> T \<Longrightarrow> orthogonal (p2 x) w" for x | 
| 68072 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 immler parents: 
67968diff
changeset | 81 | using span_eq_iff \<open>subspace T\<close> by blast+ | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 82 | then have p2: "\<And>z. p2 z \<in> T'" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 83 | by (simp add: T'_def orthogonal_commute) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 84 | have p12_eq: "\<And>x y. \<lbrakk>x \<in> T; y \<in> T'\<rbrakk> \<Longrightarrow> p1(x + y) = x \<and> p2(x + y) = y" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 85 | proof (rule orthogonal_subspace_decomp_unique [OF eq p1span, where T=T']) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 86 | show "\<And>x y. \<lbrakk>x \<in> T; y \<in> T'\<rbrakk> \<Longrightarrow> p2 (x + y) \<in> span T'" | 
| 68072 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 immler parents: 
67968diff
changeset | 87 | using span_eq_iff p2 \<open>subspace T'\<close> by blast | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 88 | show "\<And>a b. \<lbrakk>a \<in> T; b \<in> T'\<rbrakk> \<Longrightarrow> orthogonal a b" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 89 | using T'_def by blast | 
| 68072 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 immler parents: 
67968diff
changeset | 90 | qed (auto simp: span_base) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 91 | then have "\<And>c x. p1 (c *\<^sub>R x) = c *\<^sub>R p1 x \<and> p2 (c *\<^sub>R x) = c *\<^sub>R p2 x" | 
| 68072 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 immler parents: 
67968diff
changeset | 92 | proof - | 
| 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 immler parents: 
67968diff
changeset | 93 | fix c :: real and x :: 'a | 
| 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 immler parents: 
67968diff
changeset | 94 | have f1: "c *\<^sub>R x = c *\<^sub>R p1 x + c *\<^sub>R p2 x" | 
| 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 immler parents: 
67968diff
changeset | 95 | by (metis eq pth_6) | 
| 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 immler parents: 
67968diff
changeset | 96 | have f2: "c *\<^sub>R p2 x \<in> T'" | 
| 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 immler parents: 
67968diff
changeset | 97 | by (simp add: \<open>subspace T'\<close> p2 subspace_scale) | 
| 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 immler parents: 
67968diff
changeset | 98 | have "c *\<^sub>R p1 x \<in> T" | 
| 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 immler parents: 
67968diff
changeset | 99 | by (metis (full_types) assms(2) p1span span_eq_iff subspace_scale) | 
| 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 immler parents: 
67968diff
changeset | 100 | then show "p1 (c *\<^sub>R x) = c *\<^sub>R p1 x \<and> p2 (c *\<^sub>R x) = c *\<^sub>R p2 x" | 
| 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 immler parents: 
67968diff
changeset | 101 | using f2 f1 p12_eq by presburger | 
| 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 immler parents: 
67968diff
changeset | 102 | qed | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 103 | moreover have lin_add: "\<And>x y. p1 (x + y) = p1 x + p1 y \<and> p2 (x + y) = p2 x + p2 y" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 104 | proof (rule orthogonal_subspace_decomp_unique [OF _ p1span, where T=T']) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 105 | show "\<And>x y. p1 (x + y) + p2 (x + y) = p1 x + p1 y + (p2 x + p2 y)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 106 | by (simp add: add.assoc add.left_commute eq) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 107 | show "\<And>a b. \<lbrakk>a \<in> T; b \<in> T'\<rbrakk> \<Longrightarrow> orthogonal a b" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 108 | using T'_def by blast | 
| 68072 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 immler parents: 
67968diff
changeset | 109 | qed (auto simp: p1span p2 span_base span_add) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 110 | ultimately have "linear p1" "linear p2" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 111 | by unfold_locales auto | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 112 |   have "g differentiable_on p1 ` {x + y |x y. x \<in> S - {0} \<and> y \<in> T'}"
 | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 113 | using p12_eq \<open>S \<subseteq> T\<close> by (force intro: differentiable_on_subset [OF gdiff]) | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 114 |   then have "(\<lambda>z. g (p1 z)) differentiable_on {x + y |x y. x \<in> S - {0} \<and> y \<in> T'}"
 | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 115 | by (rule differentiable_on_compose [OF linear_imp_differentiable_on [OF \<open>linear p1\<close>]]) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 116 |   then have diff: "(\<lambda>x. g (p1 x) + p2 x) differentiable_on {x + y |x y. x \<in> S - {0} \<and> y \<in> T'}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 117 | by (intro derivative_intros linear_imp_differentiable_on [OF \<open>linear p2\<close>]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 118 |   have "dim {x + y |x y. x \<in> S - {0} \<and> y \<in> T'} \<le> dim {x + y |x y. x \<in> S  \<and> y \<in> T'}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 119 | by (blast intro: dim_subset) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 120 | also have "... = dim S + dim T' - dim (S \<inter> T')" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 121 | using dim_sums_Int [OF \<open>subspace S\<close> \<open>subspace T'\<close>] | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 122 | by (simp add: algebra_simps) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 123 |   also have "... < DIM('a)"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 124 | using dimST dim_eq by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 125 |   finally have neg: "negligible {x + y |x y. x \<in> S - {0} \<and> y \<in> T'}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 126 | by (rule negligible_lowdim) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 127 |   have "negligible ((\<lambda>x. g (p1 x) + p2 x) ` {x + y |x y. x \<in> S - {0} \<and> y \<in> T'})"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 128 | by (rule negligible_differentiable_image_negligible [OF order_refl neg diff]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 129 |   then have "negligible {x + y |x y. x \<in> g ` (S - {0}) \<and> y \<in> T'}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 130 | proof (rule negligible_subset) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 131 | have "\<lbrakk>t' \<in> T'; s \<in> S; s \<noteq> 0\<rbrakk> | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 132 | \<Longrightarrow> g s + t' \<in> (\<lambda>x. g (p1 x) + p2 x) ` | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 133 |                          {x + t' |x t'. x \<in> S \<and> x \<noteq> 0 \<and> t' \<in> T'}" for t' s
 | 
| 72245 | 134 | using \<open>S \<subseteq> T\<close> p12_eq by (rule_tac x="s + t'" in image_eqI) auto | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 135 |     then show "{x + y |x y. x \<in> g ` (S - {0}) \<and> y \<in> T'}
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 136 |           \<subseteq> (\<lambda>x. g (p1 x) + p2 x) ` {x + y |x y. x \<in> S - {0} \<and> y \<in> T'}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 137 | by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 138 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 139 |   moreover have "- T' \<subseteq> {x + y |x y. x \<in> g ` (S - {0}) \<and> y \<in> T'}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 140 | proof clarsimp | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 141 | fix z assume "z \<notin> T'" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 142 |     show "\<exists>x y. z = x + y \<and> x \<in> g ` (S - {0}) \<and> y \<in> T'"
 | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 143 | by (metis Diff_iff \<open>z \<notin> T'\<close> add.left_neutral eq geq p1 p2 singletonD) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 144 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 145 | ultimately have "negligible (-T')" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 146 | using negligible_subset by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 147 | moreover have "negligible T'" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 148 | using negligible_lowdim | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 149 | by (metis add.commute assms(3) diff_add_inverse2 diff_self_eq_0 dim_eq le_add1 le_antisym linordered_semidom_class.add_diff_inverse not_less0) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 150 | ultimately have "negligible (-T' \<union> T')" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 151 | by (metis negligible_Un_eq) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 152 | then show False | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 153 | using negligible_Un_eq non_negligible_UNIV by simp | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 154 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 155 | |
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 156 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 157 | lemma spheremap_lemma2: | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 158 | fixes f :: "'a::euclidean_space \<Rightarrow> 'a::euclidean_space" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 159 | assumes ST: "subspace S" "subspace T" "dim S < dim T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 160 | and "S \<subseteq> T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 161 | and contf: "continuous_on (sphere 0 1 \<inter> S) f" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 162 | and fim: "f \<in> (sphere 0 1 \<inter> S) \<rightarrow> sphere 0 1 \<inter> T" | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 163 | shows "\<exists>c. homotopic_with_canon (\<lambda>x. True) (sphere 0 1 \<inter> S) (sphere 0 1 \<inter> T) f (\<lambda>x. c)" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 164 | proof - | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 165 | have [simp]: "\<And>x. \<lbrakk>norm x = 1; x \<in> S\<rbrakk> \<Longrightarrow> norm (f x) = 1" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 166 | using fim by auto | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 167 | have "compact (sphere 0 1 \<inter> S)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 168 | by (simp add: \<open>subspace S\<close> closed_subspace compact_Int_closed) | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 169 | then obtain g where pfg: "polynomial_function g" and gim: "g \<in> (sphere 0 1 \<inter> S) \<rightarrow> T" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 170 | and g12: "\<And>x. x \<in> sphere 0 1 \<inter> S \<Longrightarrow> norm(f x - g x) < 1/2" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 171 | using Stone_Weierstrass_polynomial_function_subspace [OF _ contf _ \<open>subspace T\<close>, of "1/2"] fim | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 172 | by (auto simp: image_subset_iff_funcset) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 173 | have gnz: "g x \<noteq> 0" if "x \<in> sphere 0 1 \<inter> S" for x | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 174 | using g12 that by fastforce | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 175 | have diffg: "g differentiable_on sphere 0 1 \<inter> S" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 176 | by (metis pfg differentiable_on_polynomial_function) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 177 | define h where "h \<equiv> \<lambda>x. inverse(norm(g x)) *\<^sub>R g x" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 178 | have h: "x \<in> sphere 0 1 \<inter> S \<Longrightarrow> h x \<in> sphere 0 1 \<inter> T" for x | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 179 | unfolding h_def using \<open>subspace T\<close> gim gnz subspace_mul by fastforce | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 180 | have diffh: "h differentiable_on sphere 0 1 \<inter> S" | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 181 | unfolding h_def using gnz | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 182 | by (fastforce intro: derivative_intros diffg differentiable_on_compose [OF diffg]) | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 183 |   have homfg: "homotopic_with_canon (\<lambda>z. True) (sphere 0 1 \<inter> S) (T - {0}) f g"
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 184 | proof (rule homotopic_with_linear [OF contf]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 185 | show "continuous_on (sphere 0 1 \<inter> S) g" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 186 | using pfg by (simp add: differentiable_imp_continuous_on diffg) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 187 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 188 | have non0fg: "0 \<notin> closed_segment (f x) (g x)" if "norm x = 1" "x \<in> S" for x | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 189 | proof - | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 190 | have "f x \<in> sphere 0 1" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 191 | using fim that by (simp add: image_subset_iff) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 192 | moreover have "norm(f x - g x) < 1/2" | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 193 | using g12 that by auto | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 194 | ultimately show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 195 | by (auto simp: norm_minus_commute dest: segment_bound) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 196 | qed | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 197 |     show "closed_segment (f x) (g x) \<subseteq> T - {0}" if "x \<in> sphere 0 1 \<inter> S" for x
 | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 198 | proof - | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 199 | have "convex T" | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 200 | by (simp add: \<open>subspace T\<close> subspace_imp_convex) | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 201 |       then have "convex hull {f x, g x} \<subseteq> T"
 | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 202 | by (metis IntD2 PiE closed_segment_subset fim gim segment_convex_hull that) | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 203 | then show ?thesis | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 204 | using that non0fg segment_convex_hull by fastforce | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 205 | qed | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 206 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 207 | obtain d where d: "d \<in> (sphere 0 1 \<inter> T) - h ` (sphere 0 1 \<inter> S)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 208 | using h spheremap_lemma1 [OF ST \<open>S \<subseteq> T\<close> diffh] by force | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 209 | then have non0hd: "0 \<notin> closed_segment (h x) (- d)" if "norm x = 1" "x \<in> S" for x | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 210 | using midpoint_between [of 0 "h x" "-d"] that h [of x] | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 211 | by (auto simp: between_mem_segment midpoint_def) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 212 | have conth: "continuous_on (sphere 0 1 \<inter> S) h" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 213 | using differentiable_imp_continuous_on diffh by blast | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 214 |   have hom_hd: "homotopic_with_canon (\<lambda>z. True) (sphere 0 1 \<inter> S) (T - {0}) h (\<lambda>x. -d)"
 | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 215 | proof (rule homotopic_with_linear [OF conth continuous_on_const]) | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 216 | fix x | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 217 | assume x: "x \<in> sphere 0 1 \<inter> S" | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 218 |     have "convex hull {h x, - d} \<subseteq> T"
 | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 219 | proof (rule hull_minimal) | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 220 |       show "{h x, - d} \<subseteq> T"
 | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 221 | using h d x by (force simp: subspace_neg [OF \<open>subspace T\<close>]) | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 222 | qed (simp add: subspace_imp_convex [OF \<open>subspace T\<close>]) | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 223 |     with x segment_convex_hull show "closed_segment (h x) (- d) \<subseteq> T - {0}"
 | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 224 | by (auto simp add: subset_Diff_insert non0hd) | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 225 | qed | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 226 |   have conT0: "continuous_on (T - {0}) (\<lambda>y. inverse(norm y) *\<^sub>R y)"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 227 | by (intro continuous_intros) auto | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 228 |   have sub0T: "(\<lambda>y. y /\<^sub>R norm y) \<in> (T - {0}) \<rightarrow> sphere 0 1 \<inter> T"
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 229 | by (fastforce simp: assms(2) subspace_mul) | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 230 | obtain c where homhc: "homotopic_with_canon (\<lambda>z. True) (sphere 0 1 \<inter> S) (sphere 0 1 \<inter> T) h (\<lambda>x. c)" | 
| 72245 | 231 | proof | 
| 232 | show "homotopic_with_canon (\<lambda>z. True) (sphere 0 1 \<inter> S) (sphere 0 1 \<inter> T) h (\<lambda>x. - d)" | |
| 233 | using d | |
| 234 | by (force simp: h_def | |
| 235 | intro: homotopic_with_eq homotopic_with_compose_continuous_left [OF hom_hd conT0 sub0T]) | |
| 236 | qed | |
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 237 | have "homotopic_with_canon (\<lambda>x. True) (sphere 0 1 \<inter> S) (sphere 0 1 \<inter> T) f h" | 
| 72245 | 238 | by (force simp: h_def | 
| 239 | intro: homotopic_with_eq homotopic_with_compose_continuous_left [OF homfg conT0 sub0T]) | |
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 240 | then show ?thesis | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 241 | by (metis homotopic_with_trans [OF _ homhc]) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 242 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 243 | |
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 244 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 245 | lemma spheremap_lemma3: | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 246 | assumes "bounded S" "convex S" "subspace U" and affSU: "aff_dim S \<le> dim U" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 247 |   obtains T where "subspace T" "T \<subseteq> U" "S \<noteq> {} \<Longrightarrow> aff_dim T = aff_dim S"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 248 | "(rel_frontier S) homeomorphic (sphere 0 1 \<inter> T)" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 249 | proof (cases "S = {}")
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 250 | case True | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 251 | with \<open>subspace U\<close> subspace_0 show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 252 |     by (rule_tac T = "{0}" in that) auto
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 253 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 254 | case False | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 255 | then obtain a where "a \<in> S" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 256 | by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 257 | then have affS: "aff_dim S = int (dim ((\<lambda>x. -a+x) ` S))" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 258 | by (metis hull_inc aff_dim_eq_dim) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 259 | with affSU have "dim ((\<lambda>x. -a+x) ` S) \<le> dim U" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 260 | by linarith | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 261 | with choose_subspace_of_subspace | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 262 | obtain T where "subspace T" "T \<subseteq> span U" and dimT: "dim T = dim ((\<lambda>x. -a+x) ` S)" . | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 263 | show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 264 | proof (rule that [OF \<open>subspace T\<close>]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 265 | show "T \<subseteq> U" | 
| 68072 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 immler parents: 
67968diff
changeset | 266 | using span_eq_iff \<open>subspace U\<close> \<open>T \<subseteq> span U\<close> by blast | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 267 | show "aff_dim T = aff_dim S" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 268 | using dimT \<open>subspace T\<close> affS aff_dim_subspace by fastforce | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 269 | show "rel_frontier S homeomorphic sphere 0 1 \<inter> T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 270 | proof - | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 271 | have "aff_dim (ball 0 1 \<inter> T) = aff_dim (T)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 272 | by (metis IntI interior_ball \<open>subspace T\<close> aff_dim_convex_Int_nonempty_interior centre_in_ball empty_iff inf_commute subspace_0 subspace_imp_convex zero_less_one) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 273 | then have affS_eq: "aff_dim S = aff_dim (ball 0 1 \<inter> T)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 274 | using \<open>aff_dim T = aff_dim S\<close> by simp | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 275 | have "rel_frontier S homeomorphic rel_frontier(ball 0 1 \<inter> T)" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 276 | using homeomorphic_rel_frontiers_convex_bounded_sets [OF \<open>convex S\<close> \<open>bounded S\<close>] | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 277 | by (simp add: \<open>subspace T\<close> affS_eq assms bounded_Int convex_Int | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 278 | homeomorphic_rel_frontiers_convex_bounded_sets subspace_imp_convex) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 279 | also have "... = frontier (ball 0 1) \<inter> T" | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 280 | proof (rule convex_affine_rel_frontier_Int [OF convex_ball]) | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 281 | show "affine T" | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 282 | by (simp add: \<open>subspace T\<close> subspace_imp_affine) | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 283 |         show "interior (ball 0 1) \<inter> T \<noteq> {}"
 | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 284 | using \<open>subspace T\<close> subspace_0 by force | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 285 | qed | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 286 | also have "... = sphere 0 1 \<inter> T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 287 | by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 288 | finally show ?thesis . | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 289 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 290 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 291 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 292 | |
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 293 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 294 | proposition inessential_spheremap_lowdim_gen: | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 295 | fixes f :: "'M::euclidean_space \<Rightarrow> 'a::euclidean_space" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 296 | assumes "convex S" "bounded S" "convex T" "bounded T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 297 | and affST: "aff_dim S < aff_dim T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 298 | and contf: "continuous_on (rel_frontier S) f" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 299 | and fim: "f \<in> (rel_frontier S) \<rightarrow> rel_frontier T" | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 300 | obtains c where "homotopic_with_canon (\<lambda>z. True) (rel_frontier S) (rel_frontier T) f (\<lambda>x. c)" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 301 | proof (cases "S = {}")
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 302 | case True | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 303 | then show ?thesis | 
| 78336 | 304 | using homotopic_with_canon_on_empty that by auto | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 305 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 306 | case False | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 307 | then show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 308 |   proof (cases "T = {}")
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 309 | case True | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 310 | then show ?thesis | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 311 | by (smt (verit, best) False affST aff_dim_negative_iff) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 312 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 313 | case False | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 314 | obtain T':: "'a set" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 315 | where "subspace T'" and affT': "aff_dim T' = aff_dim T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 316 | and homT: "rel_frontier T homeomorphic sphere 0 1 \<inter> T'" | 
| 76943 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 317 |       using \<open>T \<noteq> {}\<close>  spheremap_lemma3 [OF \<open>bounded T\<close> \<open>convex T\<close> subspace_UNIV, where 'b='a] 
 | 
| 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 318 | by (force simp add: aff_dim_le_DIM) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 319 | with homeomorphic_imp_homotopy_eqv | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 320 | have relT: "sphere 0 1 \<inter> T' homotopy_eqv rel_frontier T" | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 321 | using homotopy_equivalent_space_sym by blast | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 322 | have "aff_dim S \<le> int (dim T')" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 323 | using affT' \<open>subspace T'\<close> affST aff_dim_subspace by force | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 324 |     with spheremap_lemma3 [OF \<open>bounded S\<close> \<open>convex S\<close> \<open>subspace T'\<close>] \<open>S \<noteq> {}\<close>
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 325 | obtain S':: "'a set" where "subspace S'" "S' \<subseteq> T'" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 326 | and affS': "aff_dim S' = aff_dim S" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 327 | and homT: "rel_frontier S homeomorphic sphere 0 1 \<inter> S'" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 328 | by metis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 329 | with homeomorphic_imp_homotopy_eqv | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 330 | have relS: "sphere 0 1 \<inter> S' homotopy_eqv rel_frontier S" | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 331 | using homotopy_equivalent_space_sym by blast | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 332 | have dimST': "dim S' < dim T'" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 333 | 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) | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 334 | have "\<exists>c. homotopic_with_canon (\<lambda>z. True) (rel_frontier S) (rel_frontier T) f (\<lambda>x. c)" | 
| 76943 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 335 | using spheremap_lemma2 homotopy_eqv_cohomotopic_triviality_null[OF relS] | 
| 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 336 | using homotopy_eqv_homotopic_triviality_null_imp [OF relT contf fim] | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 337 | by (metis \<open>S' \<subseteq> T'\<close> \<open>subspace S'\<close> \<open>subspace T'\<close> dimST' image_subset_iff_funcset) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 338 | with that show ?thesis by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 339 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 340 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 341 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 342 | lemma inessential_spheremap_lowdim: | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 343 | fixes f :: "'M::euclidean_space \<Rightarrow> 'a::euclidean_space" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 344 | assumes | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 345 |    "DIM('M) < DIM('a)" and f: "continuous_on (sphere a r) f" "f \<in> (sphere a r) \<rightarrow> (sphere b s)"
 | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 346 | obtains c where "homotopic_with_canon (\<lambda>z. True) (sphere a r) (sphere b s) f (\<lambda>x. c)" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 347 | proof (cases "s \<le> 0") | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 348 | case True then show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 349 | by (meson nullhomotopic_into_contractible f contractible_sphere that) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 350 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 351 | case False | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 352 | show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 353 | proof (cases "r \<le> 0") | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 354 | case True then show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 355 | by (meson f nullhomotopic_from_contractible contractible_sphere that) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 356 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 357 | case False | 
| 69508 | 358 | with \<open>\<not> s \<le> 0\<close> have "r > 0" "s > 0" by auto | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 359 | show thesis | 
| 76943 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 360 | using inessential_spheremap_lowdim_gen [of "cball a r" "cball b s" f] | 
| 76944 | 361 | using \<open>0 < r\<close> \<open>0 < s\<close> assms(1) that by (auto simp add: f aff_dim_cball) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 362 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 363 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 364 | |
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 365 | |
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 366 | |
| 69683 | 367 | subsection\<open> Some technical lemmas about extending maps from cell complexes\<close> | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68634diff
changeset | 368 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 369 | lemma extending_maps_Union_aux: | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 370 | assumes fin: "finite \<F>" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 371 | and "\<And>S. S \<in> \<F> \<Longrightarrow> closed S" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 372 | and "\<And>S T. \<lbrakk>S \<in> \<F>; T \<in> \<F>; S \<noteq> T\<rbrakk> \<Longrightarrow> S \<inter> T \<subseteq> K" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 373 | and "\<And>S. S \<in> \<F> \<Longrightarrow> \<exists>g. continuous_on S g \<and> g \<in> S \<rightarrow> T \<and> (\<forall>x \<in> S \<inter> K. g x = h x)" | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 374 | shows "\<exists>g. continuous_on (\<Union>\<F>) g \<and> g \<in> (\<Union>\<F>) \<rightarrow> T \<and> (\<forall>x \<in> \<Union>\<F> \<inter> K. g x = h x)" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 375 | using assms | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 376 | proof (induction \<F>) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 377 | case empty show ?case by simp | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 378 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 379 | case (insert S \<F>) | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 380 | then obtain f where contf: "continuous_on S f" and fim: "f \<in> S \<rightarrow> T" and feq: "\<forall>x \<in> S \<inter> K. f x = h x" | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 381 | by (metis funcset_image insert_iff) | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 382 | obtain g where contg: "continuous_on (\<Union>\<F>) g" and gim: "g \<in> (\<Union>\<F>) \<rightarrow> T" and geq: "\<forall>x \<in> \<Union>\<F> \<inter> K. g x = h x" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 383 | using insert by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 384 | have fg: "f x = g x" if "x \<in> T" "T \<in> \<F>" "x \<in> S" for x T | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 385 | proof - | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 386 | have "T \<inter> S \<subseteq> K \<or> S = T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 387 | using that by (metis (no_types) insert.prems(2) insertCI) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 388 | then show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 389 | using UnionI feq geq \<open>S \<notin> \<F>\<close> subsetD that by fastforce | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 390 | qed | 
| 76943 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 391 | moreover have "continuous_on (S \<union> \<Union> \<F>) (\<lambda>x. if x \<in> S then f x else g x)" | 
| 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 392 | by (auto simp: insert closed_Union contf contg intro: fg continuous_on_cases) | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 393 | moreover have "S \<union> \<Union> \<F> = \<Union> (insert S \<F>)" | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 394 | by auto | 
| 76943 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 395 | ultimately show ?case | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 396 | by (smt (verit) Int_iff Pi_iff UnE feq fim geq gim) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 397 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 398 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 399 | lemma extending_maps_Union: | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 400 | assumes fin: "finite \<F>" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 401 | and "\<And>S. S \<in> \<F> \<Longrightarrow> \<exists>g. continuous_on S g \<and> g \<in> S \<rightarrow> T \<and> (\<forall>x \<in> S \<inter> K. g x = h x)" | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 402 | and "\<And>S. S \<in> \<F> \<Longrightarrow> closed S" | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 403 | and K: "\<And>X Y. \<lbrakk>X \<in> \<F>; Y \<in> \<F>; \<not> X \<subseteq> Y; \<not> Y \<subseteq> X\<rbrakk> \<Longrightarrow> X \<inter> Y \<subseteq> K" | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 404 | shows "\<exists>g. continuous_on (\<Union>\<F>) g \<and> g \<in> (\<Union>\<F>) \<rightarrow> T \<and> (\<forall>x \<in> \<Union>\<F> \<inter> K. g x = h x)" | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 405 | proof - | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 406 | have "\<And>S T. \<lbrakk>S \<in> \<F>; \<forall>U\<in>\<F>. \<not> S \<subset> U; T \<in> \<F>; \<forall>U\<in>\<F>. \<not> T \<subset> U; S \<noteq> T\<rbrakk> \<Longrightarrow> S \<inter> T \<subseteq> K" | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 407 | by (metis K psubsetI) | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 408 | then show ?thesis | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 409 | apply (simp flip: Union_maximal_sets [OF fin]) | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 410 | apply (rule extending_maps_Union_aux, simp_all add: Union_maximal_sets [OF fin] assms) | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 411 | done | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 412 | qed | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 413 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 414 | lemma extend_map_lemma: | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 415 | assumes "finite \<F>" "\<G> \<subseteq> \<F>" "convex T" "bounded T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 416 | and poly: "\<And>X. X \<in> \<F> \<Longrightarrow> polytope X" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 417 | and aff: "\<And>X. X \<in> \<F> - \<G> \<Longrightarrow> aff_dim X < aff_dim T" | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 418 | and face: "\<And>S T. \<lbrakk>S \<in> \<F>; T \<in> \<F>\<rbrakk> \<Longrightarrow> (S \<inter> T) face_of S" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 419 | and contf: "continuous_on (\<Union>\<G>) f" and fim: "f \<in> (\<Union>\<G>) \<rightarrow> rel_frontier T" | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 420 | obtains g where "continuous_on (\<Union>\<F>) g" "g \<in> (\<Union>\<F>) \<rightarrow> rel_frontier T" "\<And>x. x \<in> \<Union>\<G> \<Longrightarrow> g x = f x" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 421 | proof (cases "\<F> - \<G> = {}")
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 422 | case True | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 423 | show ?thesis | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 424 | using True assms(2) contf fim that by force | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 425 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 426 | case False | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 427 | then have "0 \<le> aff_dim T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 428 | by (metis aff aff_dim_empty aff_dim_geq aff_dim_negative_iff all_not_in_conv not_less) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 429 | then obtain i::nat where i: "int i = aff_dim T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 430 | by (metis nonneg_eq_int) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 431 |   have Union_empty_eq: "\<Union>{D. D = {} \<and> P D} = {}" for P :: "'a set \<Rightarrow> bool"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 432 | by auto | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 433 | 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" | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 434 | by (metis face inf_commute) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 435 |   have extendf: "\<exists>g. continuous_on (\<Union>(\<G> \<union> {D. \<exists>C \<in> \<F>. D face_of C \<and> aff_dim D < i})) g \<and>
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 436 |                      g ` (\<Union> (\<G> \<union> {D. \<exists>C \<in> \<F>. D face_of C \<and> aff_dim D < i})) \<subseteq> rel_frontier T \<and>
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 437 | (\<forall>x \<in> \<Union>\<G>. g x = f x)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 438 | if "i \<le> aff_dim T" for i::nat | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 439 | using that | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 440 | proof (induction i) | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 441 | case 0 | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 442 | show ?case | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 443 | using 0 contf fim by (auto simp add: Union_empty_eq) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 444 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 445 | case (Suc p) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 446 |     with \<open>bounded T\<close> have "rel_frontier T \<noteq> {}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 447 | by (auto simp: rel_frontier_eq_empty affine_bounded_eq_lowdim [of T]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 448 | then obtain t where t: "t \<in> rel_frontier T" by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 449 | have ple: "int p \<le> aff_dim T" using Suc.prems by force | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 450 |     obtain h where conth: "continuous_on (\<Union>(\<G> \<union> {D. \<exists>C \<in> \<F>. D face_of C \<and> aff_dim D < p})) h"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 451 |                and him: "h ` (\<Union> (\<G> \<union> {D. \<exists>C \<in> \<F>. D face_of C \<and> aff_dim D < p}))
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 452 | \<subseteq> rel_frontier T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 453 | and heq: "\<And>x. x \<in> \<Union>\<G> \<Longrightarrow> h x = f x" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 454 | using Suc.IH [OF ple] by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 455 |     let ?Faces = "{D. \<exists>C \<in> \<F>. D face_of C \<and> aff_dim D \<le> p}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 456 | have extendh: "\<exists>g. continuous_on D g \<and> | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 457 | g \<in> D \<rightarrow> rel_frontier T \<and> | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 458 |                        (\<forall>x \<in> D \<inter> \<Union>(\<G> \<union> {D. \<exists>C \<in> \<F>. D face_of C \<and> aff_dim D < p}). g x = h x)"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 459 | if D: "D \<in> \<G> \<union> ?Faces" for D | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 460 |     proof (cases "D \<subseteq> \<Union>(\<G> \<union> {D. \<exists>C \<in> \<F>. D face_of C \<and> aff_dim D < p})")
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 461 | case True | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 462 | have "continuous_on D h" | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 463 | using True conth continuous_on_subset by blast | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 464 | moreover have "h \<in> D \<rightarrow> rel_frontier T" | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 465 | using True him by blast | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 466 | ultimately show ?thesis | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 467 | by blast | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 468 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 469 | case False | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 470 | note notDsub = False | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 471 | show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 472 |       proof (cases "\<exists>a. D = {a}")
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 473 | case True | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 474 |         then obtain a where "D = {a}" by auto
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 475 | with notDsub t show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 476 | by (rule_tac x="\<lambda>x. t" in exI) simp | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 477 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 478 | case False | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 479 |         have "D \<noteq> {}" using notDsub by auto
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 480 |         have Dnotin: "D \<notin> \<G> \<union> {D. \<exists>C \<in> \<F>. D face_of C \<and> aff_dim D < p}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 481 | using notDsub by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 482 | then have "D \<notin> \<G>" by simp | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 483 |         have "D \<in> ?Faces - {D. \<exists>C \<in> \<F>. D face_of C \<and> aff_dim D < p}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 484 | using Dnotin that by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 485 | then obtain C where "C \<in> \<F>" "D face_of C" and affD: "aff_dim D = int p" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 486 | by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 487 | then have "bounded D" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 488 | using face_of_polytope_polytope poly polytope_imp_bounded by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 489 | then have [simp]: "\<not> affine D" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 490 |           using affine_bounded_eq_trivial False \<open>D \<noteq> {}\<close> \<open>bounded D\<close> by blast
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 491 |         have "{F. F facet_of D} \<subseteq> {E. E face_of C \<and> aff_dim E < int p}"
 | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 492 | by clarify (metis \<open>D face_of C\<close> affD eq_iff face_of_trans facet_of_def zle_diff1_eq) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 493 | moreover have "polyhedron D" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 494 | using \<open>C \<in> \<F>\<close> \<open>D face_of C\<close> face_of_polytope_polytope poly polytope_imp_polyhedron by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 495 |         ultimately have relf_sub: "rel_frontier D \<subseteq> \<Union> {E. E face_of C \<and> aff_dim E < p}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 496 | by (simp add: rel_frontier_of_polyhedron Union_mono) | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 497 | then have him_relf: "h \<in> rel_frontier D \<rightarrow> rel_frontier T" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 498 | using \<open>C \<in> \<F>\<close> him by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 499 | have "convex D" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 500 | by (simp add: \<open>polyhedron D\<close> polyhedron_imp_convex) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 501 | have affD_lessT: "aff_dim D < aff_dim T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 502 | using Suc.prems affD by linarith | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 503 | have contDh: "continuous_on (rel_frontier D) h" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 504 | using \<open>C \<in> \<F>\<close> relf_sub by (blast intro: continuous_on_subset [OF conth]) | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 505 | then have *: "(\<exists>c. homotopic_with_canon (\<lambda>x. True) (rel_frontier D) (rel_frontier T) h (\<lambda>x. c)) = | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 506 | (\<exists>g. continuous_on UNIV g \<and> range g \<subseteq> rel_frontier T \<and> | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 507 | (\<forall>x\<in>rel_frontier D. g x = h x))" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 508 | by (simp add: assms image_subset_iff_funcset rel_frontier_eq_empty him_relf nullhomotopic_into_rel_frontier_extension [OF closed_rel_frontier]) | 
| 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 509 | have "\<exists>c. homotopic_with_canon (\<lambda>x. True) (rel_frontier D) (rel_frontier T) h (\<lambda>x. c)" | 
| 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 510 | by (metis inessential_spheremap_lowdim_gen | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 511 | [OF \<open>convex D\<close> \<open>bounded D\<close> \<open>convex T\<close> \<open>bounded T\<close> affD_lessT contDh him_relf]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 512 | then obtain g where contg: "continuous_on UNIV g" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 513 | and gim: "range g \<subseteq> rel_frontier T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 514 | and gh: "\<And>x. x \<in> rel_frontier D \<Longrightarrow> g x = h x" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 515 | by (metis *) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 516 | have "D \<inter> E \<subseteq> rel_frontier D" | 
| 67399 | 517 |              if "E \<in> \<G> \<union> {D. Bex \<F> ((face_of) D) \<and> aff_dim D < int p}" for E
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 518 | proof (rule face_of_subset_rel_frontier) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 519 | show "D \<inter> E face_of D" | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 520 | using that | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 521 | proof safe | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 522 | assume "E \<in> \<G>" | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 523 | then show "D \<inter> E face_of D" | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 524 | by (meson \<open>C \<in> \<F>\<close> \<open>D face_of C\<close> assms(2) face' face_of_Int_subface face_of_refl_eq poly polytope_imp_convex subsetD) | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 525 | next | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 526 | fix x | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 527 | assume "aff_dim E < int p" "x \<in> \<F>" "E face_of x" | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 528 | then show "D \<inter> E face_of D" | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 529 | by (meson \<open>C \<in> \<F>\<close> \<open>D face_of C\<close> face' face_of_Int_subface that) | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 530 | qed | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 531 | show "D \<inter> E \<noteq> D" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 532 | using that notDsub by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 533 | qed | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 534 | moreover have "continuous_on D g" | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 535 | using contg continuous_on_subset by blast | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 536 | ultimately show ?thesis | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 537 | by (rule_tac x=g in exI) (use gh gim in fastforce) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 538 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 539 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 540 | have intle: "i < 1 + int j \<longleftrightarrow> i \<le> int j" for i j | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 541 | by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 542 | have "finite \<G>" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 543 | using \<open>finite \<F>\<close> \<open>\<G> \<subseteq> \<F>\<close> rev_finite_subset by blast | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 544 | moreover have "finite (?Faces)" | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 545 | proof - | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 546 |       have \<section>: "finite (\<Union> {{D. D face_of C} |C. C \<in> \<F>})"
 | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 547 | by (auto simp: \<open>finite \<F>\<close> finite_polytope_faces poly) | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 548 | show ?thesis | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 549 | by (auto intro: finite_subset [OF _ \<section>]) | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 550 | qed | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 551 | ultimately have fin: "finite (\<G> \<union> ?Faces)" | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 552 | by simp | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 553 | have clo: "closed S" if "S \<in> \<G> \<union> ?Faces" for S | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 554 | using that \<open>\<G> \<subseteq> \<F>\<close> face_of_polytope_polytope poly polytope_imp_closed by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 555 |     have K: "X \<inter> Y \<subseteq> \<Union>(\<G> \<union> {D. \<exists>C\<in>\<F>. D face_of C \<and> aff_dim D < int p})"
 | 
| 69508 | 556 | if "X \<in> \<G> \<union> ?Faces" "Y \<in> \<G> \<union> ?Faces" "\<not> Y \<subseteq> X" for X Y | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 557 | proof - | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 558 | have ff: "X \<inter> Y face_of X \<and> X \<inter> Y face_of Y" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 559 | if XY: "X face_of D" "Y face_of E" and DE: "D \<in> \<F>" "E \<in> \<F>" for D E | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 560 | by (rule face_of_Int_subface [OF _ _ XY]) (auto simp: face' DE) | 
| 76943 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 561 | show ?thesis | 
| 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 562 | using that | 
| 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 563 | apply clarsimp | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 564 | by (smt (verit) IntI face_of_aff_dim_lt face_of_imp_convex face_of_trans ff inf_commute) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 565 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 566 | obtain g where "continuous_on (\<Union>(\<G> \<union> ?Faces)) g" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 567 | "g ` \<Union>(\<G> \<union> ?Faces) \<subseteq> rel_frontier T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 568 | "(\<forall>x \<in> \<Union>(\<G> \<union> ?Faces) \<inter> | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 569 |                           \<Union>(\<G> \<union> {D. \<exists>C\<in>\<F>. D face_of C \<and> aff_dim D < p}). g x = h x)"
 | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 570 | by (rule exE [OF extending_maps_Union [OF fin extendh clo K]], blast+) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 571 | then show ?case | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 572 | by (simp add: intle local.heq [symmetric], blast) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 573 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 574 |   have eq: "\<Union>(\<G> \<union> {D. \<exists>C \<in> \<F>. D face_of C \<and> aff_dim D < i}) = \<Union>\<F>"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 575 | proof | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 576 |     show "\<Union>(\<G> \<union> {D. \<exists>C\<in>\<F>. D face_of C \<and> aff_dim D < int i}) \<subseteq> \<Union>\<F>"
 | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 577 | using \<open>\<G> \<subseteq> \<F>\<close> face_of_imp_subset by fastforce | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 578 |     show "\<Union>\<F> \<subseteq> \<Union>(\<G> \<union> {D. \<exists>C\<in>\<F>. D face_of C \<and> aff_dim D < i})"
 | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 579 | using face by (intro Union_mono) (fastforce simp: aff i) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 580 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 581 | have "int i \<le> aff_dim T" by (simp add: i) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 582 | then show ?thesis | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 583 | using extendf [of i] that unfolding eq by fastforce | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 584 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 585 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 586 | lemma extend_map_lemma_cofinite0: | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 587 | assumes "finite \<F>" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 588 | and "pairwise (\<lambda>S T. S \<inter> T \<subseteq> K) \<F>" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 589 |       and "\<And>S. S \<in> \<F> \<Longrightarrow> \<exists>a g. a \<notin> U \<and> continuous_on (S - {a}) g \<and> g \<in> (S - {a}) \<rightarrow> T \<and> (\<forall>x \<in> S \<inter> K. g x = h x)"
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 590 | and "\<And>S. S \<in> \<F> \<Longrightarrow> closed S" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 591 | shows "\<exists>C g. finite C \<and> disjnt C U \<and> card C \<le> card \<F> \<and> | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 592 | continuous_on (\<Union>\<F> - C) g \<and> g \<in> (\<Union>\<F> - C) \<rightarrow> T | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 593 | \<and> (\<forall>x \<in> (\<Union>\<F> - C) \<inter> K. g x = h x)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 594 | using assms | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 595 | proof induction | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 596 | case empty then show ?case | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 597 | by force | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 598 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 599 | case (insert X \<F>) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 600 | then have "closed X" and clo: "\<And>X. X \<in> \<F> \<Longrightarrow> closed X" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 601 |         and \<F>: "\<And>S. S \<in> \<F> \<Longrightarrow> \<exists>a g. a \<notin> U \<and> continuous_on (S - {a}) g \<and> g \<in> (S - {a}) \<rightarrow> T \<and> (\<forall>x \<in> S \<inter> K. g x = h x)"
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 602 | and pwX: "\<And>Y. Y \<in> \<F> \<and> Y \<noteq> X \<longrightarrow> X \<inter> Y \<subseteq> K \<and> Y \<inter> X \<subseteq> K" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 603 | and pwF: "pairwise (\<lambda> S T. S \<inter> T \<subseteq> K) \<F>" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 604 | by (simp_all add: pairwise_insert) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 605 | obtain C g where C: "finite C" "disjnt C U" "card C \<le> card \<F>" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 606 | and contg: "continuous_on (\<Union>\<F> - C) g" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 607 | and gim: "g \<in> (\<Union>\<F> - C) \<rightarrow> T" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 608 | and gh: "\<And>x. x \<in> (\<Union>\<F> - C) \<inter> K \<Longrightarrow> g x = h x" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 609 | using insert.IH [OF pwF \<F> clo] by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 610 | obtain a f where "a \<notin> U" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 611 |                and contf: "continuous_on (X - {a}) f"
 | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 612 |                and fim: "f \<in> (X - {a}) \<rightarrow> T"
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 613 | and fh: "(\<forall>x \<in> X \<inter> K. f x = h x)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 614 | using insert.prems by (meson insertI1) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 615 | show ?case | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 616 | proof (intro exI conjI) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 617 | show "finite (insert a C)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 618 | by (simp add: C) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 619 | show "disjnt (insert a C) U" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 620 | using C \<open>a \<notin> U\<close> by simp | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 621 | show "card (insert a C) \<le> card (insert X \<F>)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 622 | by (simp add: C card_insert_if insert.hyps le_SucI) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 623 | have "closed (\<Union>\<F>)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 624 | using clo insert.hyps by blast | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 625 | have "continuous_on (X - insert a C) f" | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 626 | using contf by (force simp: elim: continuous_on_subset) | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 627 | moreover have "continuous_on (\<Union> \<F> - insert a C) g" | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 628 | using contg by (force simp: elim: continuous_on_subset) | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 629 | ultimately | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 630 | have "continuous_on (X - insert a C \<union> (\<Union>\<F> - insert a C)) (\<lambda>x. if x \<in> X then f x else g x)" | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 631 | apply (intro continuous_on_cases_local; simp add: closedin_closed) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 632 | using \<open>closed X\<close> apply blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 633 | using \<open>closed (\<Union>\<F>)\<close> apply blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 634 | using fh gh insert.hyps pwX by fastforce | 
| 69745 | 635 | then show "continuous_on (\<Union>(insert X \<F>) - insert a C) (\<lambda>a. if a \<in> X then f a else g a)" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 636 | by (blast intro: continuous_on_subset) | 
| 69745 | 637 | show "\<forall>x\<in>(\<Union>(insert X \<F>) - insert a C) \<inter> K. (if x \<in> X then f x else g x) = h x" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 638 | using gh by (auto simp: fh) | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 639 | show "(\<lambda>a. if a \<in> X then f a else g a) \<in> (\<Union>(insert X \<F>) - insert a C) \<rightarrow> T" | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 640 | using fim gim Pi_iff by fastforce | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 641 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 642 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 643 | |
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 644 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 645 | lemma extend_map_lemma_cofinite1: | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 646 | assumes "finite \<F>" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 647 |     and \<F>: "\<And>X. X \<in> \<F> \<Longrightarrow> \<exists>a g. a \<notin> U \<and> continuous_on (X - {a}) g \<and> g \<in> (X - {a}) \<rightarrow> T \<and> (\<forall>x \<in> X \<inter> K. g x = h x)"
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 648 | and clo: "\<And>X. X \<in> \<F> \<Longrightarrow> closed X" | 
| 69508 | 649 | and K: "\<And>X Y. \<lbrakk>X \<in> \<F>; Y \<in> \<F>; \<not> X \<subseteq> Y; \<not> Y \<subseteq> X\<rbrakk> \<Longrightarrow> X \<inter> Y \<subseteq> K" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 650 | obtains C g where "finite C" "disjnt C U" "card C \<le> card \<F>" "continuous_on (\<Union>\<F> - C) g" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 651 | "g \<in> (\<Union>\<F> - C) \<rightarrow> T" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 652 | "\<And>x. x \<in> (\<Union>\<F> - C) \<inter> K \<Longrightarrow> g x = h x" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 653 | proof - | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 654 |   let ?\<F> = "{X \<in> \<F>. \<forall>Y\<in>\<F>. \<not> X \<subset> Y}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 655 | have [simp]: "\<Union>?\<F> = \<Union>\<F>" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 656 | by (simp add: Union_maximal_sets assms) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 657 | have fin: "finite ?\<F>" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 658 | by (force intro: finite_subset [OF _ \<open>finite \<F>\<close>]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 659 | have pw: "pairwise (\<lambda> S T. S \<inter> T \<subseteq> K) ?\<F>" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 660 | by (simp add: pairwise_def) (metis K psubsetI) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 661 |   have "card {X \<in> \<F>. \<forall>Y\<in>\<F>. \<not> X \<subset> Y} \<le> card \<F>"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 662 | by (simp add: \<open>finite \<F>\<close> card_mono) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 663 | moreover | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 664 | obtain C g where "finite C \<and> disjnt C U \<and> card C \<le> card ?\<F> \<and> | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 665 | continuous_on (\<Union>?\<F> - C) g \<and> g \<in> (\<Union>?\<F> - C) \<rightarrow> T | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 666 | \<and> (\<forall>x \<in> (\<Union>?\<F> - C) \<inter> K. g x = h x)" | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 667 | using extend_map_lemma_cofinite0 [OF fin pw, of U T h] by (fastforce intro!: clo \<F>) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 668 | ultimately show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 669 | by (rule_tac C=C and g=g in that) auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 670 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 671 | |
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 672 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 673 | lemma extend_map_lemma_cofinite: | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 674 | assumes "finite \<F>" "\<G> \<subseteq> \<F>" and T: "convex T" "bounded T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 675 | and poly: "\<And>X. X \<in> \<F> \<Longrightarrow> polytope X" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 676 | and contf: "continuous_on (\<Union>\<G>) f" and fim: "f \<in> (\<Union>\<G>) \<rightarrow> rel_frontier T" | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 677 | and face: "\<And>X Y. \<lbrakk>X \<in> \<F>; Y \<in> \<F>\<rbrakk> \<Longrightarrow> (X \<inter> Y) face_of X" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 678 | and aff: "\<And>X. X \<in> \<F> - \<G> \<Longrightarrow> aff_dim X \<le> aff_dim T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 679 | obtains C g where | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 680 | "finite C" "disjnt C (\<Union>\<G>)" "card C \<le> card \<F>" "continuous_on (\<Union>\<F> - C) g" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 681 | "g \<in> (\<Union> \<F> - C) \<rightarrow> rel_frontier T" "\<And>x. x \<in> \<Union>\<G> \<Longrightarrow> g x = f x" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 682 | proof - | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 683 |   define \<H> where "\<H> \<equiv> \<G> \<union> {D. \<exists>C \<in> \<F> - \<G>. D face_of C \<and> aff_dim D < aff_dim T}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 684 | have "finite \<G>" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 685 | using assms finite_subset by blast | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 686 |   have *: "finite (\<Union>{{D. D face_of C} |C. C \<in> \<F>})"
 | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 687 | using finite_polytope_faces poly \<open>finite \<F>\<close> by force | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 688 | then have "finite \<H>" | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 689 | by (auto simp: \<H>_def \<open>finite \<G>\<close> intro: finite_subset [OF _ *]) | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 690 | 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" | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 691 | by (metis face inf_commute) | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 692 | have *: "\<And>X Y. \<lbrakk>X \<in> \<H>; Y \<in> \<H>\<rbrakk> \<Longrightarrow> X \<inter> Y face_of X" | 
| 76943 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 693 | by (simp add: \<H>_def) (smt (verit) \<open>\<G> \<subseteq> \<F>\<close> DiffE face' face_of_Int_subface in_mono inf.idem) | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 694 | obtain h where conth: "continuous_on (\<Union>\<H>) h" and him: "h \<in> (\<Union>\<H>) \<rightarrow> rel_frontier T" | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 695 | and hf: "\<And>x. x \<in> \<Union>\<G> \<Longrightarrow> h x = f x" | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 696 | proof (rule extend_map_lemma [OF \<open>finite \<H>\<close> [unfolded \<H>_def] Un_upper1 T]) | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 697 |     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"
 | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 698 | using \<open>\<G> \<subseteq> \<F>\<close> face_of_polytope_polytope poly by fastforce | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 699 | qed (use * \<H>_def contf fim in auto) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 700 | have "bounded (\<Union>\<G>)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 701 | using \<open>finite \<G>\<close> \<open>\<G> \<subseteq> \<F>\<close> poly polytope_imp_bounded by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 702 | then have "\<Union>\<G> \<noteq> UNIV" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 703 | by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 704 | then obtain a where a: "a \<notin> \<Union>\<G>" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 705 | by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 706 |   have \<F>: "\<exists>a g. a \<notin> \<Union>\<G> \<and> continuous_on (D - {a}) g \<and>
 | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 707 |                   g \<in> (D - {a}) \<rightarrow> rel_frontier T \<and> (\<forall>x \<in> D \<inter> \<Union>\<H>. g x = h x)"
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 708 | if "D \<in> \<F>" for D | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 709 | proof (cases "D \<subseteq> \<Union>\<H>") | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 710 | case True | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 711 |     then have "h \<in> (D - {a}) \<rightarrow> rel_frontier T" "continuous_on (D - {a}) h"
 | 
| 72245 | 712 | using him by (blast intro!: \<open>a \<notin> \<Union>\<G>\<close> continuous_on_subset [OF conth])+ | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 713 | then show ?thesis | 
| 72245 | 714 | using a by blast | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 715 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 716 | case False | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 717 | note D_not_subset = False | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 718 | show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 719 | proof (cases "D \<in> \<G>") | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 720 | case True | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 721 | with D_not_subset show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 722 | by (auto simp: \<H>_def) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 723 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 724 | case False | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 725 | then have affD: "aff_dim D \<le> aff_dim T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 726 | by (simp add: \<open>D \<in> \<F>\<close> aff) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 727 | show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 728 |       proof (cases "rel_interior D = {}")
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 729 | case True | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 730 | with \<open>D \<in> \<F>\<close> poly a show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 731 | by (force simp: rel_interior_eq_empty polytope_imp_convex) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 732 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 733 | case False | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 734 | then obtain b where brelD: "b \<in> rel_interior D" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 735 | by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 736 | have "polyhedron D" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 737 | by (simp add: poly polytope_imp_polyhedron that) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 738 |         have "rel_frontier D retract_of affine hull D - {b}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 739 | by (simp add: rel_frontier_retract_of_punctured_affine_hull poly polytope_imp_bounded polytope_imp_convex that brelD) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 740 |         then obtain r where relfD: "rel_frontier D \<subseteq> affine hull D - {b}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 741 |                         and contr: "continuous_on (affine hull D - {b}) r"
 | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 742 |                         and rim: "r \<in> (affine hull D - {b}) \<rightarrow> rel_frontier D"
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 743 | and rid: "\<And>x. x \<in> rel_frontier D \<Longrightarrow> r x = x" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 744 | by (auto simp: retract_of_def retraction_def) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 745 | show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 746 | proof (intro exI conjI ballI) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 747 | show "b \<notin> \<Union>\<G>" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 748 | proof clarify | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 749 | fix E | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 750 | assume "b \<in> E" "E \<in> \<G>" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 751 | then have "E \<inter> D face_of E \<and> E \<inter> D face_of D" | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 752 | using \<open>\<G> \<subseteq> \<F>\<close> face' that by auto | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 753 | with face_of_subset_rel_frontier \<open>E \<in> \<G>\<close> \<open>b \<in> E\<close> brelD rel_interior_subset [of D] | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 754 | D_not_subset rel_frontier_def \<H>_def | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 755 | show False | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 756 | by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 757 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 758 |           have "r ` (D - {b}) \<subseteq> r ` (affine hull D - {b})"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 759 | by (simp add: Diff_mono hull_subset image_mono) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 760 | also have "... \<subseteq> rel_frontier D" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 761 | using rim by auto | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 762 |           also have "... \<subseteq> \<Union>{E. E face_of D \<and> aff_dim E < aff_dim T}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 763 | using affD | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 764 | by (force simp: rel_frontier_of_polyhedron [OF \<open>polyhedron D\<close>] facet_of_def) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 765 | also have "... \<subseteq> \<Union>(\<H>)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 766 | using D_not_subset \<H>_def that by fastforce | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 767 |           finally have rsub: "r ` (D - {b}) \<subseteq> \<Union>(\<H>)" .
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 768 |           show "continuous_on (D - {b}) (h \<circ> r)"
 | 
| 72245 | 769 | proof (rule continuous_on_compose) | 
| 770 |             show "continuous_on (D - {b}) r"
 | |
| 771 | by (meson Diff_mono continuous_on_subset contr hull_subset order_refl) | |
| 772 |             show "continuous_on (r ` (D - {b})) h"
 | |
| 773 | by (simp add: Diff_mono hull_subset continuous_on_subset [OF conth rsub]) | |
| 774 | qed | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 775 |           show "(h \<circ> r) \<in> (D - {b}) \<rightarrow> rel_frontier T"
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 776 | using brelD him rsub by fastforce | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 777 | show "(h \<circ> r) x = h x" if x: "x \<in> D \<inter> \<Union>\<H>" for x | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 778 | proof - | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 779 | consider A where "x \<in> D" "A \<in> \<G>" "x \<in> A" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 780 | | A B where "x \<in> D" "A face_of B" "B \<in> \<F>" "B \<notin> \<G>" "aff_dim A < aff_dim T" "x \<in> A" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 781 | using x by (auto simp: \<H>_def) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 782 | then have xrel: "x \<in> rel_frontier D" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 783 | proof cases | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 784 | case 1 show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 785 | proof (rule face_of_subset_rel_frontier [THEN subsetD]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 786 | show "D \<inter> A face_of D" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 787 | using \<open>A \<in> \<G>\<close> \<open>\<G> \<subseteq> \<F>\<close> face \<open>D \<in> \<F>\<close> by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 788 | show "D \<inter> A \<noteq> D" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 789 | using \<open>A \<in> \<G>\<close> D_not_subset \<H>_def by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 790 | qed (auto simp: 1) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 791 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 792 | case 2 show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 793 | proof (rule face_of_subset_rel_frontier [THEN subsetD]) | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 794 | have "D face_of D" | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 795 | by (simp add: \<open>polyhedron D\<close> polyhedron_imp_convex face_of_refl) | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 796 | then show "D \<inter> A face_of D" | 
| 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 797 | by (meson "2"(2) "2"(3) \<open>D \<in> \<F>\<close> face' face_of_Int_Int face_of_face) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 798 | show "D \<inter> A \<noteq> D" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 799 | using "2" D_not_subset \<H>_def by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 800 | qed (auto simp: 2) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 801 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 802 | show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 803 | by (simp add: rid xrel) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 804 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 805 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 806 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 807 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 808 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 809 | have clo: "\<And>S. S \<in> \<F> \<Longrightarrow> closed S" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 810 | by (simp add: poly polytope_imp_closed) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 811 | obtain C g where "finite C" "disjnt C (\<Union>\<G>)" "card C \<le> card \<F>" "continuous_on (\<Union>\<F> - C) g" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 812 | "g \<in> (\<Union>\<F> - C) \<rightarrow> rel_frontier T" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 813 | and gh: "\<And>x. x \<in> (\<Union>\<F> - C) \<inter> \<Union>\<H> \<Longrightarrow> g x = h x" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 814 | proof (rule extend_map_lemma_cofinite1 [OF \<open>finite \<F>\<close> \<F> clo]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 815 | show "X \<inter> Y \<subseteq> \<Union>\<H>" if XY: "X \<in> \<F>" "Y \<in> \<F>" and "\<not> X \<subseteq> Y" "\<not> Y \<subseteq> X" for X Y | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 816 | proof (cases "X \<in> \<G>") | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 817 | case True | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 818 | then show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 819 | by (auto simp: \<H>_def) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 820 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 821 | case False | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 822 | have "X \<inter> Y \<noteq> X" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 823 | using \<open>\<not> X \<subseteq> Y\<close> by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 824 | with XY | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 825 | show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 826 | by (clarsimp simp: \<H>_def) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 827 | (metis Diff_iff Int_iff aff antisym_conv face face_of_aff_dim_lt face_of_refl | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 828 | not_le poly polytope_imp_convex) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 829 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 830 | qed (blast)+ | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 831 | with \<open>\<G> \<subseteq> \<F>\<close> show ?thesis | 
| 72245 | 832 | by (rule_tac C=C and g=g in that) (auto simp: disjnt_def hf [symmetric] \<H>_def intro!: gh) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 833 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 834 | |
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 835 | text\<open>The next two proofs are similar\<close> | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 836 | theorem extend_map_cell_complex_to_sphere: | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 837 | assumes "finite \<F>" and S: "S \<subseteq> \<Union>\<F>" "closed S" and T: "convex T" "bounded T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 838 | and poly: "\<And>X. X \<in> \<F> \<Longrightarrow> polytope X" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 839 | and aff: "\<And>X. X \<in> \<F> \<Longrightarrow> aff_dim X < aff_dim T" | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 840 | and face: "\<And>X Y. \<lbrakk>X \<in> \<F>; Y \<in> \<F>\<rbrakk> \<Longrightarrow> (X \<inter> Y) face_of X" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 841 | and contf: "continuous_on S f" and fim: "f \<in> S \<rightarrow> rel_frontier T" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 842 | obtains g where "continuous_on (\<Union>\<F>) g" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 843 | "g \<in> (\<Union>\<F>) \<rightarrow> rel_frontier T" "\<And>x. x \<in> S \<Longrightarrow> g x = f x" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 844 | proof - | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 845 | obtain V g where "S \<subseteq> V" "open V" "continuous_on V g" and gim: "g \<in> V \<rightarrow> rel_frontier T" and gf: "\<And>x. x \<in> S \<Longrightarrow> g x = f x" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 846 | using neighbourhood_extension_into_ANR [OF contf fim _ \<open>closed S\<close>] ANR_rel_frontier_convex T by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 847 | have "compact S" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 848 | by (meson assms compact_Union poly polytope_imp_compact seq_compact_closed_subset seq_compact_eq_compact) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 849 | then obtain d where "d > 0" and d: "\<And>x y. \<lbrakk>x \<in> S; y \<in> - V\<rbrakk> \<Longrightarrow> d \<le> dist x y" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 850 | using separate_compact_closed [of S "-V"] \<open>open V\<close> \<open>S \<subseteq> V\<close> by force | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 851 | obtain \<G> where "finite \<G>" "\<Union>\<G> = \<Union>\<F>" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 852 | and diaG: "\<And>X. X \<in> \<G> \<Longrightarrow> diameter X < d" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 853 | and polyG: "\<And>X. X \<in> \<G> \<Longrightarrow> polytope X" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 854 | and affG: "\<And>X. X \<in> \<G> \<Longrightarrow> aff_dim X \<le> aff_dim T - 1" | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 855 | and faceG: "\<And>X Y. \<lbrakk>X \<in> \<G>; Y \<in> \<G>\<rbrakk> \<Longrightarrow> X \<inter> Y face_of X" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 856 | proof (rule cell_complex_subdivision_exists [OF \<open>d>0\<close> \<open>finite \<F>\<close> poly _ face]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 857 | show "\<And>X. X \<in> \<F> \<Longrightarrow> aff_dim X \<le> aff_dim T - 1" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 858 | by (simp add: aff) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 859 | qed auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 860 | obtain h where conth: "continuous_on (\<Union>\<G>) h" and him: "h ` \<Union>\<G> \<subseteq> rel_frontier T" and hg: "\<And>x. x \<in> \<Union>(\<G> \<inter> Pow V) \<Longrightarrow> h x = g x" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 861 | proof (rule extend_map_lemma [of \<G> "\<G> \<inter> Pow V" T g]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 862 | show "continuous_on (\<Union>(\<G> \<inter> Pow V)) g" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 863 | by (metis Union_Int_subset Union_Pow_eq \<open>continuous_on V g\<close> continuous_on_subset le_inf_iff) | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 864 | qed (use \<open>finite \<G>\<close> T polyG affG faceG gim image_subset_iff_funcset in auto) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 865 | show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 866 | proof | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 867 | show "continuous_on (\<Union>\<F>) h" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 868 | using \<open>\<Union>\<G> = \<Union>\<F>\<close> conth by auto | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 869 | show "h \<in> \<Union>\<F> \<rightarrow> rel_frontier T" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 870 | using \<open>\<Union>\<G> = \<Union>\<F>\<close> him by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 871 | show "h x = f x" if "x \<in> S" for x | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 872 | proof - | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 873 | have "x \<in> \<Union>\<G>" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 874 | using \<open>\<Union>\<G> = \<Union>\<F>\<close> \<open>S \<subseteq> \<Union>\<F>\<close> that by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 875 | then obtain X where "x \<in> X" "X \<in> \<G>" by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 876 | then have "diameter X < d" "bounded X" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 877 | by (auto simp: diaG \<open>X \<in> \<G>\<close> polyG polytope_imp_bounded) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 878 | then have "X \<subseteq> V" using d [OF \<open>x \<in> S\<close>] diameter_bounded_bound [OF \<open>bounded X\<close> \<open>x \<in> X\<close>] | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 879 | by fastforce | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 880 | have "h x = g x" | 
| 72245 | 881 | using \<open>X \<in> \<G>\<close> \<open>X \<subseteq> V\<close> \<open>x \<in> X\<close> hg by auto | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 882 | also have "... = f x" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 883 | by (simp add: gf that) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 884 | finally show "h x = f x" . | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 885 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 886 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 887 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 888 | |
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 889 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 890 | theorem extend_map_cell_complex_to_sphere_cofinite: | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 891 | assumes "finite \<F>" and S: "S \<subseteq> \<Union>\<F>" "closed S" and T: "convex T" "bounded T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 892 | and poly: "\<And>X. X \<in> \<F> \<Longrightarrow> polytope X" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 893 | and aff: "\<And>X. X \<in> \<F> \<Longrightarrow> aff_dim X \<le> aff_dim T" | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 894 | and face: "\<And>X Y. \<lbrakk>X \<in> \<F>; Y \<in> \<F>\<rbrakk> \<Longrightarrow> (X \<inter> Y) face_of X" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 895 | and contf: "continuous_on S f" and fim: "f \<in> S \<rightarrow> rel_frontier T" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 896 | obtains C g where "finite C" "disjnt C S" "continuous_on (\<Union>\<F> - C) g" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 897 | "g \<in> (\<Union>\<F> - C) \<rightarrow> rel_frontier T" "\<And>x. x \<in> S \<Longrightarrow> g x = f x" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 898 | proof - | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 899 | obtain V g where "S \<subseteq> V" "open V" "continuous_on V g" and gim: "g \<in> V \<rightarrow> rel_frontier T" and gf: "\<And>x. x \<in> S \<Longrightarrow> g x = f x" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 900 | using neighbourhood_extension_into_ANR [OF contf fim _ \<open>closed S\<close>] ANR_rel_frontier_convex T by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 901 | have "compact S" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 902 | by (meson assms compact_Union poly polytope_imp_compact seq_compact_closed_subset seq_compact_eq_compact) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 903 | then obtain d where "d > 0" and d: "\<And>x y. \<lbrakk>x \<in> S; y \<in> - V\<rbrakk> \<Longrightarrow> d \<le> dist x y" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 904 | using separate_compact_closed [of S "-V"] \<open>open V\<close> \<open>S \<subseteq> V\<close> by force | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 905 | obtain \<G> where "finite \<G>" "\<Union>\<G> = \<Union>\<F>" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 906 | and diaG: "\<And>X. X \<in> \<G> \<Longrightarrow> diameter X < d" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 907 | and polyG: "\<And>X. X \<in> \<G> \<Longrightarrow> polytope X" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 908 | and affG: "\<And>X. X \<in> \<G> \<Longrightarrow> aff_dim X \<le> aff_dim T" | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 909 | and faceG: "\<And>X Y. \<lbrakk>X \<in> \<G>; Y \<in> \<G>\<rbrakk> \<Longrightarrow> X \<inter> Y face_of X" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 910 | by (rule cell_complex_subdivision_exists [OF \<open>d>0\<close> \<open>finite \<F>\<close> poly aff face]) auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 911 | obtain C h where "finite C" and dis: "disjnt C (\<Union>(\<G> \<inter> Pow V))" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 912 | and card: "card C \<le> card \<G>" and conth: "continuous_on (\<Union>\<G> - C) h" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 913 | and him: "h \<in> (\<Union>\<G> - C) \<rightarrow> rel_frontier T" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 914 | and hg: "\<And>x. x \<in> \<Union>(\<G> \<inter> Pow V) \<Longrightarrow> h x = g x" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 915 | proof (rule extend_map_lemma_cofinite [of \<G> "\<G> \<inter> Pow V" T g]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 916 | show "continuous_on (\<Union>(\<G> \<inter> Pow V)) g" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 917 | by (metis Union_Int_subset Union_Pow_eq \<open>continuous_on V g\<close> continuous_on_subset le_inf_iff) | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 918 | show "g \<in> \<Union>(\<G> \<inter> Pow V) \<rightarrow> rel_frontier T" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 919 | using gim by force | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 920 | qed (auto intro: \<open>finite \<G>\<close> T polyG affG dest: faceG) | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 921 | have "S \<subseteq> \<Union>(\<G> \<inter> Pow V)" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 922 | proof | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 923 | fix x | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 924 | assume "x \<in> S" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 925 | then have "x \<in> \<Union>\<G>" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 926 | using \<open>\<Union>\<G> = \<Union>\<F>\<close> \<open>S \<subseteq> \<Union>\<F>\<close> by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 927 | then obtain X where "x \<in> X" "X \<in> \<G>" by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 928 | then have "diameter X < d" "bounded X" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 929 | by (auto simp: diaG \<open>X \<in> \<G>\<close> polyG polytope_imp_bounded) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 930 | then have "X \<subseteq> V" using d [OF \<open>x \<in> S\<close>] diameter_bounded_bound [OF \<open>bounded X\<close> \<open>x \<in> X\<close>] | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 931 | by fastforce | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 932 | then show "x \<in> \<Union>(\<G> \<inter> Pow V)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 933 | using \<open>X \<in> \<G>\<close> \<open>x \<in> X\<close> by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 934 | qed | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 935 | then show ?thesis | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 936 | by (metis PowI Union_Pow_eq \<open>\<Union> \<G> = \<Union> \<F>\<close> \<open>finite C\<close> conth dis disjnt_Union2 gf hg him subsetD that) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 937 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 938 | |
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 939 | |
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 940 | |
| 69683 | 941 | subsection\<open> Special cases and corollaries involving spheres\<close> | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68634diff
changeset | 942 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 943 | proposition extend_map_affine_to_sphere_cofinite_simple: | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 944 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 945 | assumes "compact S" "convex U" "bounded U" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 946 | and aff: "aff_dim T \<le> aff_dim U" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 947 | and "S \<subseteq> T" and contf: "continuous_on S f" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 948 | and fim: "f \<in> S \<rightarrow> rel_frontier U" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 949 | obtains K g where "finite K" "K \<subseteq> T" "disjnt K S" "continuous_on (T - K) g" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 950 | "g \<in> (T - K) \<rightarrow> rel_frontier U" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 951 | "\<And>x. x \<in> S \<Longrightarrow> g x = f x" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 952 | proof - | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 953 | have "\<exists>K g. finite K \<and> disjnt K S \<and> continuous_on (T - K) g \<and> | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 954 | g \<in> (T - K) \<rightarrow> rel_frontier U \<and> (\<forall>x \<in> S. g x = f x)" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 955 | if "affine T" "S \<subseteq> T" and aff: "aff_dim T \<le> aff_dim U" for T | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 956 |   proof (cases "S = {}")
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 957 | case True | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 958 | show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 959 |     proof (cases "rel_frontier U = {}")
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 960 | case True | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 961 | with \<open>bounded U\<close> have "aff_dim U \<le> 0" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 962 | using affine_bounded_eq_lowdim rel_frontier_eq_empty by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 963 | with aff have "aff_dim T \<le> 0" by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 964 |       then obtain a where "T \<subseteq> {a}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 965 | using \<open>affine T\<close> affine_bounded_eq_lowdim affine_bounded_eq_trivial by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 966 | then show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 967 |         using \<open>S = {}\<close> fim
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 968 | by (metis Diff_cancel contf disjnt_empty2 finite.emptyI finite_insert finite_subset) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 969 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 970 | case False | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 971 | then obtain a where "a \<in> rel_frontier U" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 972 | by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 973 | then show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 974 |         using continuous_on_const [of _ a] \<open>S = {}\<close> by force
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 975 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 976 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 977 | case False | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 978 | have "bounded S" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 979 | by (simp add: \<open>compact S\<close> compact_imp_bounded) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 980 | then obtain b where b: "S \<subseteq> cbox (-b) b" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 981 | using bounded_subset_cbox_symmetric by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 982 | define bbox where "bbox \<equiv> cbox (-(b+One)) (b+One)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 983 | have "cbox (-b) b \<subseteq> bbox" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 984 | by (auto simp: bbox_def algebra_simps intro!: subset_box_imp) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 985 | with b \<open>S \<subseteq> T\<close> have "S \<subseteq> bbox \<inter> T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 986 | by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 987 |     then have Ssub: "S \<subseteq> \<Union>{bbox \<inter> T}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 988 | by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 989 | then have "aff_dim (bbox \<inter> T) \<le> aff_dim U" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 990 | by (metis aff aff_dim_subset inf_commute inf_le1 order_trans) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 991 | obtain K g where K: "finite K" "disjnt K S" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 992 |                  and contg: "continuous_on (\<Union>{bbox \<inter> T} - K) g"
 | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 993 |                  and gim: "g \<in> (\<Union>{bbox \<inter> T} - K) \<rightarrow> rel_frontier U"
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 994 | and gf: "\<And>x. x \<in> S \<Longrightarrow> g x = f x" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 995 | proof (rule extend_map_cell_complex_to_sphere_cofinite | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 996 | [OF _ Ssub _ \<open>convex U\<close> \<open>bounded U\<close> _ _ _ contf fim]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 997 | show "closed S" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 998 | using \<open>compact S\<close> compact_eq_bounded_closed by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 999 |       show poly: "\<And>X. X \<in> {bbox \<inter> T} \<Longrightarrow> polytope X"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1000 | by (simp add: polytope_Int_polyhedron bbox_def polytope_interval affine_imp_polyhedron \<open>affine T\<close>) | 
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 1001 |       show "\<And>X Y. \<lbrakk>X \<in> {bbox \<inter> T}; Y \<in> {bbox \<inter> T}\<rbrakk> \<Longrightarrow> X \<inter> Y face_of X"
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1002 | by (simp add:poly face_of_refl polytope_imp_convex) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1003 |       show "\<And>X. X \<in> {bbox \<inter> T} \<Longrightarrow> aff_dim X \<le> aff_dim U"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1004 | by (simp add: \<open>aff_dim (bbox \<inter> T) \<le> aff_dim U\<close>) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1005 | qed auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1006 | define fro where "fro \<equiv> \<lambda>d. frontier(cbox (-(b + d *\<^sub>R One)) (b + d *\<^sub>R One))" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1007 | obtain d where d12: "1/2 \<le> d" "d \<le> 1" and dd: "disjnt K (fro d)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1008 | proof (rule disjoint_family_elem_disjnt [OF _ \<open>finite K\<close>]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1009 |       show "infinite {1/2..1::real}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1010 | by (simp add: infinite_Icc) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1011 | have dis1: "disjnt (fro x) (fro y)" if "x<y" for x y | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1012 | by (auto simp: algebra_simps that subset_box_imp disjnt_Diff1 frontier_def fro_def) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1013 |       then show "disjoint_family_on fro {1/2..1}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1014 | by (auto simp: disjoint_family_on_def disjnt_def neq_iff) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1015 | qed auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1016 | define c where "c \<equiv> b + d *\<^sub>R One" | 
| 72245 | 1017 | have cbsub: "cbox (-b) b \<subseteq> box (-c) c" "cbox (-b) b \<subseteq> cbox (-c) c" "cbox (-c) c \<subseteq> bbox" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1018 | using d12 by (auto simp: algebra_simps subset_box_imp c_def bbox_def) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1019 | have clo_cbT: "closed (cbox (- c) c \<inter> T)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1020 | by (simp add: affine_closed closed_Int closed_cbox \<open>affine T\<close>) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1021 |     have cpT_ne: "cbox (- c) c \<inter> T \<noteq> {}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1022 |       using \<open>S \<noteq> {}\<close> b cbsub(2) \<open>S \<subseteq> T\<close> by fastforce
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1023 | have "closest_point (cbox (- c) c \<inter> T) x \<notin> K" if "x \<in> T" "x \<notin> K" for x | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1024 | proof (cases "x \<in> cbox (-c) c") | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1025 | case True with that show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1026 | by (simp add: closest_point_self) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1027 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1028 | case False | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1029 |       have int_ne: "interior (cbox (-c) c) \<inter> T \<noteq> {}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1030 |         using \<open>S \<noteq> {}\<close> \<open>S \<subseteq> T\<close> b \<open>cbox (- b) b \<subseteq> box (- c) c\<close> by force
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1031 | have "convex T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1032 | by (meson \<open>affine T\<close> affine_imp_convex) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1033 | then have "x \<in> affine hull (cbox (- c) c \<inter> T)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1034 |           by (metis Int_commute Int_iff \<open>S \<noteq> {}\<close> \<open>S \<subseteq> T\<close> cbsub(1) \<open>x \<in> T\<close> affine_hull_convex_Int_nonempty_interior all_not_in_conv b hull_inc inf.orderE interior_cbox)
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1035 | then have "x \<in> affine hull (cbox (- c) c \<inter> T) - rel_interior (cbox (- c) c \<inter> T)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1036 | by (meson DiffI False Int_iff rel_interior_subset subsetCE) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1037 | then have "closest_point (cbox (- c) c \<inter> T) x \<in> rel_frontier (cbox (- c) c \<inter> T)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1038 | by (rule closest_point_in_rel_frontier [OF clo_cbT cpT_ne]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1039 | moreover have "(rel_frontier (cbox (- c) c \<inter> T)) \<subseteq> fro d" | 
| 72245 | 1040 | by (subst convex_affine_rel_frontier_Int [OF _ \<open>affine T\<close> int_ne]) (auto simp: fro_def c_def) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1041 | ultimately show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1042 | using dd by (force simp: disjnt_def) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1043 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1044 |     then have cpt_subset: "closest_point (cbox (- c) c \<inter> T) ` (T - K) \<subseteq> \<Union>{bbox \<inter> T} - K"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1045 | using closest_point_in_set [OF clo_cbT cpT_ne] cbsub(3) by force | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1046 | show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1047 | proof (intro conjI ballI exI) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1048 | have "continuous_on (T - K) (closest_point (cbox (- c) c \<inter> T))" | 
| 72245 | 1049 | proof (rule continuous_on_closest_point) | 
| 1050 | show "convex (cbox (- c) c \<inter> T)" | |
| 1051 | by (simp add: affine_imp_convex convex_Int \<open>affine T\<close>) | |
| 1052 | show "closed (cbox (- c) c \<inter> T)" | |
| 1053 | using clo_cbT by blast | |
| 1054 |         show "cbox (- c) c \<inter> T \<noteq> {}"
 | |
| 1055 |           using \<open>S \<noteq> {}\<close> cbsub(2) b that by auto
 | |
| 1056 | qed | |
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1057 | then show "continuous_on (T - K) (g \<circ> closest_point (cbox (- c) c \<inter> T))" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1058 | by (metis continuous_on_compose continuous_on_subset [OF contg cpt_subset]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1059 |       have "(g \<circ> closest_point (cbox (- c) c \<inter> T)) ` (T - K) \<subseteq> g ` (\<Union>{bbox \<inter> T} - K)"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1060 | by (metis image_comp image_mono cpt_subset) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1061 | also have "... \<subseteq> rel_frontier U" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 1062 | using gim by blast | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1063 | finally show "(g \<circ> closest_point (cbox (- c) c \<inter> T)) \<in> (T - K) \<rightarrow> rel_frontier U" | 
| 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1064 | by blast | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1065 | show "(g \<circ> closest_point (cbox (- c) c \<inter> T)) x = f x" if "x \<in> S" for x | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1066 | proof - | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1067 | have "(g \<circ> closest_point (cbox (- c) c \<inter> T)) x = g x" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1068 | unfolding o_def | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1069 | by (metis IntI \<open>S \<subseteq> T\<close> b cbsub(2) closest_point_self subset_eq that) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1070 | also have "... = f x" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1071 | by (simp add: that gf) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1072 | finally show ?thesis . | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1073 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1074 | qed (auto simp: K) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1075 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1076 | then obtain K g where "finite K" "disjnt K S" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1077 | and contg: "continuous_on (affine hull T - K) g" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1078 | and gim: "g \<in> (affine hull T - K) \<rightarrow> rel_frontier U" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1079 | and gf: "\<And>x. x \<in> S \<Longrightarrow> g x = f x" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1080 | by (metis aff affine_affine_hull aff_dim_affine_hull | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1081 | order_trans [OF \<open>S \<subseteq> T\<close> hull_subset [of T affine]]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1082 | then obtain K g where "finite K" "disjnt K S" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1083 | and contg: "continuous_on (T - K) g" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 1084 | and gim: "g \<in> (T - K) \<rightarrow> rel_frontier U" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1085 | and gf: "\<And>x. x \<in> S \<Longrightarrow> g x = f x" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1086 | by (rule_tac K=K and g=g in that) (auto simp: hull_inc elim: continuous_on_subset) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1087 | then show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1088 | by (rule_tac K="K \<inter> T" and g=g in that) (auto simp: disjnt_iff Diff_Int contg) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1089 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1090 | |
| 69683 | 1091 | subsection\<open>Extending maps to spheres\<close> | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1092 | |
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1093 | (*Up to extend_map_affine_to_sphere_cofinite_gen*) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1094 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 1095 | lemma extend_map_affine_to_sphere1: | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1096 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::topological_space" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1097 | assumes "finite K" "affine U" and contf: "continuous_on (U - K) f" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1098 | and fim: "f \<in> (U - K) \<rightarrow> T" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1099 |       and comps: "\<And>C. \<lbrakk>C \<in> components(U - S); C \<inter> K \<noteq> {}\<rbrakk> \<Longrightarrow> C \<inter> L \<noteq> {}"
 | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1100 | and clo: "closedin (top_of_set U) S" and K: "disjnt K S" "K \<subseteq> U" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1101 | obtains g where "continuous_on (U - L) g" "g \<in> (U - L) \<rightarrow> T" "\<And>x. x \<in> S \<Longrightarrow> g x = f x" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 1102 | proof (cases "K = {}")
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1103 | case True | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1104 | then show ?thesis | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1105 | by (metis DiffD1 Diff_empty Diff_subset PiE Pi_I contf continuous_on_subset fim that) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1106 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1107 | case False | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1108 | have "S \<subseteq> U" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1109 | using clo closedin_limpt by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1110 |   then have "(U - S) \<inter> K \<noteq> {}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1111 | by (metis Diff_triv False Int_Diff K disjnt_def inf.absorb_iff2 inf_commute) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1112 |   then have "\<Union>(components (U - S)) \<inter> K \<noteq> {}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1113 | using Union_components by simp | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1114 |   then obtain C0 where C0: "C0 \<in> components (U - S)" "C0 \<inter> K \<noteq> {}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1115 | by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1116 | have "convex U" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1117 | by (simp add: affine_imp_convex \<open>affine U\<close>) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1118 | then have "locally connected U" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1119 | by (rule convex_imp_locally_connected) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1120 |   have "\<exists>a g. a \<in> C \<and> a \<in> L \<and> continuous_on (S \<union> (C - {a})) g \<and>
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1121 |               g ` (S \<union> (C - {a})) \<subseteq> T \<and> (\<forall>x \<in> S. g x = f x)"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1122 |        if C: "C \<in> components (U - S)" and CK: "C \<inter> K \<noteq> {}" for C
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1123 | proof - | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1124 |     have "C \<subseteq> U-S" "C \<inter> L \<noteq> {}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1125 | by (simp_all add: in_components_subset comps that) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1126 | then obtain a where a: "a \<in> C" "a \<in> L" by auto | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1127 | have opeUC: "openin (top_of_set U) C" | 
| 76943 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 1128 | by (metis C \<open>locally connected U\<close> clo closedin_def locally_connected_open_component topspace_euclidean_subtopology) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1129 | then obtain d where "C \<subseteq> U" "0 < d" and d: "cball a d \<inter> U \<subseteq> C" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1130 | using openin_contains_cball by (metis \<open>a \<in> C\<close>) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1131 | then have "ball a d \<inter> U \<subseteq> C" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1132 | by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1133 | obtain h k where homhk: "homeomorphism (S \<union> C) (S \<union> C) h k" | 
| 69508 | 1134 |                  and subC: "{x. (\<not> (h x = x \<and> k x = x))} \<subseteq> C"
 | 
| 1135 |                  and bou: "bounded {x. (\<not> (h x = x \<and> k x = x))}"
 | |
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1136 | and hin: "\<And>x. x \<in> C \<inter> K \<Longrightarrow> h x \<in> ball a d \<inter> U" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1137 | proof (rule homeomorphism_grouping_points_exists_gen [of C "ball a d \<inter> U" "C \<inter> K" "S \<union> C"]) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1138 | show "openin (top_of_set C) (ball a d \<inter> U)" | 
| 66827 
c94531b5007d
Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
 paulson <lp15@cam.ac.uk> parents: 
65064diff
changeset | 1139 | by (metis open_ball \<open>C \<subseteq> U\<close> \<open>ball a d \<inter> U \<subseteq> C\<close> inf.absorb_iff2 inf.orderE inf_assoc open_openin openin_subtopology) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1140 | show "openin (top_of_set (affine hull C)) C" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1141 | by (metis \<open>a \<in> C\<close> \<open>openin (top_of_set U) C\<close> affine_hull_eq affine_hull_openin all_not_in_conv \<open>affine U\<close>) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1142 |       show "ball a d \<inter> U \<noteq> {}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1143 | using \<open>0 < d\<close> \<open>C \<subseteq> U\<close> \<open>a \<in> C\<close> by force | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1144 | show "finite (C \<inter> K)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1145 | by (simp add: \<open>finite K\<close>) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1146 | show "S \<union> C \<subseteq> affine hull C" | 
| 76943 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 1147 | 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) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1148 | show "connected C" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1149 | by (metis C in_components_connected) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1150 | qed auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1151 | have a_BU: "a \<in> ball a d \<inter> U" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1152 | using \<open>0 < d\<close> \<open>C \<subseteq> U\<close> \<open>a \<in> C\<close> by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1153 |     have "rel_frontier (cball a d \<inter> U) retract_of (affine hull (cball a d \<inter> U) - {a})"
 | 
| 72245 | 1154 | proof (rule rel_frontier_retract_of_punctured_affine_hull) | 
| 1155 | show "bounded (cball a d \<inter> U)" "convex (cball a d \<inter> U)" | |
| 1156 | by (auto simp: \<open>convex U\<close> convex_Int) | |
| 1157 | show "a \<in> rel_interior (cball a d \<inter> U)" | |
| 1158 | by (metis \<open>affine U\<close> convex_cball empty_iff interior_cball a_BU rel_interior_convex_Int_affine) | |
| 1159 | qed | |
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1160 | moreover have "rel_frontier (cball a d \<inter> U) = frontier (cball a d) \<inter> U" | 
| 72245 | 1161 | by (metis a_BU \<open>affine U\<close> convex_affine_rel_frontier_Int convex_cball equals0D interior_cball) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1162 | moreover have "affine hull (cball a d \<inter> U) = U" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1163 | by (metis \<open>convex U\<close> a_BU affine_hull_convex_Int_nonempty_interior affine_hull_eq \<open>affine U\<close> equals0D inf.commute interior_cball) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1164 |     ultimately have "frontier (cball a d) \<inter> U retract_of (U - {a})"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1165 | by metis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1166 |     then obtain r where contr: "continuous_on (U - {a}) r"
 | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 1167 |                     and rim: "r \<in> (U - {a}) \<rightarrow> sphere a d"  "r \<in> (U - {a}) \<rightarrow> U"
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1168 | and req: "\<And>x. x \<in> sphere a d \<inter> U \<Longrightarrow> r x = x" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1169 | using \<open>affine U\<close> by (force simp: retract_of_def retraction_def hull_same) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1170 | define j where "j \<equiv> \<lambda>x. if x \<in> ball a d then r x else x" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1171 | have kj: "\<And>x. x \<in> S \<Longrightarrow> k (j x) = x" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1172 | using \<open>C \<subseteq> U - S\<close> \<open>S \<subseteq> U\<close> \<open>ball a d \<inter> U \<subseteq> C\<close> j_def subC by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1173 |     have Uaeq: "U - {a} = (cball a d - {a}) \<inter> U \<union> (U - ball a d)"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1174 | using \<open>0 < d\<close> by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1175 |     have jim: "j ` (S \<union> (C - {a})) \<subseteq> (S \<union> C) - ball a d"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1176 | proof clarify | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1177 |       fix y  assume "y \<in> S \<union> (C - {a})"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1178 |       then have "y \<in> U - {a}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1179 | using \<open>C \<subseteq> U - S\<close> \<open>S \<subseteq> U\<close> \<open>a \<in> C\<close> by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1180 | then have "r y \<in> sphere a d" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1181 | using rim by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1182 | then show "j y \<in> S \<union> C - ball a d" | 
| 72245 | 1183 | unfolding j_def | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 1184 |         using \<open>y \<in> S \<union> (C - {a})\<close> \<open>y \<in> U - {a}\<close> d rim(2) by auto
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1185 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1186 |     have contj: "continuous_on (U - {a}) j"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1187 | unfolding j_def Uaeq | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1188 | proof (intro continuous_on_cases_local continuous_on_id, simp_all add: req closedin_closed Uaeq [symmetric]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1189 |       show "\<exists>T. closed T \<and> (cball a d - {a}) \<inter> U = (U - {a}) \<inter> T"
 | 
| 72245 | 1190 | using affine_closed \<open>affine U\<close> by (rule_tac x="(cball a d) \<inter> U" in exI) blast | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1191 |       show "\<exists>T. closed T \<and> U - ball a d = (U - {a}) \<inter> T"
 | 
| 72245 | 1192 | using \<open>0 < d\<close> \<open>affine U\<close> | 
| 1193 | by (rule_tac x="U - ball a d" in exI) (force simp: affine_closed) | |
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1194 |       show "continuous_on ((cball a d - {a}) \<inter> U) r"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1195 | by (force intro: continuous_on_subset [OF contr]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1196 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1197 | have fT: "x \<in> U - K \<Longrightarrow> f x \<in> T" for x | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1198 | using fim by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1199 | show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1200 | proof (intro conjI exI) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1201 |       show "continuous_on (S \<union> (C - {a})) (f \<circ> k \<circ> j)"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1202 | proof (intro continuous_on_compose) | 
| 72245 | 1203 |         have "S \<union> (C - {a}) \<subseteq> U - {a}"
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1204 | using \<open>C \<subseteq> U - S\<close> \<open>S \<subseteq> U\<close> \<open>a \<in> C\<close> by force | 
| 72245 | 1205 |         then show "continuous_on (S \<union> (C - {a})) j"
 | 
| 1206 | by (rule continuous_on_subset [OF contj]) | |
| 1207 |         have "j ` (S \<union> (C - {a})) \<subseteq> S \<union> C"
 | |
| 71840 
8ed78bb0b915
Tuned some proofs in HOL-Analysis
 Manuel Eberl <eberlm@in.tum.de> parents: 
71772diff
changeset | 1208 | using jim \<open>C \<subseteq> U - S\<close> \<open>S \<subseteq> U\<close> \<open>ball a d \<inter> U \<subseteq> C\<close> j_def by blast | 
| 72245 | 1209 |         then show "continuous_on (j ` (S \<union> (C - {a}))) k"
 | 
| 1210 | by (rule continuous_on_subset [OF homeomorphism_cont2 [OF homhk]]) | |
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1211 |         show "continuous_on (k ` j ` (S \<union> (C - {a}))) f"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1212 | proof (clarify intro!: continuous_on_subset [OF contf]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1213 |           fix y  assume "y \<in> S \<union> (C - {a})"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1214 | have ky: "k y \<in> S \<union> C" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1215 |             using homeomorphism_image2 [OF homhk] \<open>y \<in> S \<union> (C - {a})\<close> by blast
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1216 | have jy: "j y \<in> S \<union> C - ball a d" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1217 |             using Un_iff \<open>y \<in> S \<union> (C - {a})\<close> jim by auto
 | 
| 72245 | 1218 | have "k (j y) \<in> U" | 
| 1219 | using \<open>C \<subseteq> U\<close> \<open>S \<subseteq> U\<close> homeomorphism_image2 [OF homhk] jy by blast | |
| 1220 | moreover have "k (j y) \<notin> K" | |
| 1221 | using K unfolding disjnt_iff | |
| 1222 | by (metis DiffE Int_iff Un_iff hin homeomorphism_def homhk image_eqI jy) | |
| 1223 | ultimately show "k (j y) \<in> U - K" | |
| 1224 | by blast | |
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1225 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1226 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1227 | have ST: "\<And>x. x \<in> S \<Longrightarrow> (f \<circ> k \<circ> j) x \<in> T" | 
| 72245 | 1228 | proof (simp add: kj) | 
| 1229 | show "\<And>x. x \<in> S \<Longrightarrow> f x \<in> T" | |
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1230 | using K \<open>S \<subseteq> U\<close> fT unfolding disjnt_iff by auto | 
| 72245 | 1231 | qed | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1232 | moreover have "(f \<circ> k \<circ> j) x \<in> T" if "x \<in> C" "x \<noteq> a" "x \<notin> S" for x | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1233 | proof - | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1234 | have rx: "r x \<in> sphere a d" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1235 | using \<open>C \<subseteq> U\<close> rim that by fastforce | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1236 | have jj: "j x \<in> S \<union> C - ball a d" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1237 | using jim that by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1238 | have "k (j x) = j x \<longrightarrow> k (j x) \<in> C \<or> j x \<in> C" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1239 | by (metis Diff_iff Int_iff Un_iff \<open>S \<subseteq> U\<close> subsetD d j_def jj rx sphere_cball that(1)) | 
| 72245 | 1240 | then have kj: "k (j x) \<in> C" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1241 | using homeomorphism_apply2 [OF homhk, of "j x"] \<open>C \<subseteq> U\<close> \<open>S \<subseteq> U\<close> a rx | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1242 | by (metis (mono_tags, lifting) Diff_iff subsetD jj mem_Collect_eq subC) | 
| 72245 | 1243 | then show ?thesis | 
| 1244 | by (metis DiffE DiffI IntD1 IntI \<open>C \<subseteq> U\<close> comp_apply fT hin homeomorphism_apply2 homhk jj kj subset_eq) | |
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1245 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1246 |       ultimately show "(f \<circ> k \<circ> j) ` (S \<union> (C - {a})) \<subseteq> T"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1247 | by force | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1248 | show "\<forall>x\<in>S. (f \<circ> k \<circ> j) x = f x" using kj by simp | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1249 | qed (auto simp: a) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1250 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1251 | then obtain a h where | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1252 |     ah: "\<And>C. \<lbrakk>C \<in> components (U - S); C \<inter> K \<noteq> {}\<rbrakk>
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1253 |            \<Longrightarrow> a C \<in> C \<and> a C \<in> L \<and> continuous_on (S \<union> (C - {a C})) (h C) \<and>
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1254 |                h C ` (S \<union> (C - {a C})) \<subseteq> T \<and> (\<forall>x \<in> S. h C x = f x)"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1255 | using that by metis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1256 |   define F where "F \<equiv> {C \<in> components (U - S). C \<inter> K \<noteq> {}}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1257 |   define G where "G \<equiv> {C \<in> components (U - S). C \<inter> K = {}}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1258 |   define UF where "UF \<equiv> (\<Union>C\<in>F. C - {a C})"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1259 | have "C0 \<in> F" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1260 | by (auto simp: F_def C0) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1261 | have "finite F" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1262 | proof (subst finite_image_iff [of "\<lambda>C. C \<inter> K" F, symmetric]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1263 | show "inj_on (\<lambda>C. C \<inter> K) F" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1264 | unfolding F_def inj_on_def | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1265 | using components_nonoverlap by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1266 | show "finite ((\<lambda>C. C \<inter> K) ` F)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1267 | unfolding F_def | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1268 | by (rule finite_subset [of _ "Pow K"]) (auto simp: \<open>finite K\<close>) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1269 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1270 | obtain g where contg: "continuous_on (S \<union> UF) g" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1271 |              and gh: "\<And>x i. \<lbrakk>i \<in> F; x \<in> (S \<union> UF) \<inter> (S \<union> (i - {a i}))\<rbrakk>
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1272 | \<Longrightarrow> g x = h i x" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1273 | proof (rule pasting_lemma_exists_closed [OF \<open>finite F\<close>]) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1274 | let ?X = "top_of_set (S \<union> UF)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1275 |     show "topspace ?X \<subseteq> (\<Union>C\<in>F. S \<union> (C - {a C}))"
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1276 | using \<open>C0 \<in> F\<close> by (force simp: UF_def) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1277 |     show "closedin (top_of_set (S \<union> UF)) (S \<union> (C - {a C}))"
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1278 | if "C \<in> F" for C | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1279 | proof (rule closedin_closed_subset [of U "S \<union> C"]) | 
| 72245 | 1280 | have "C \<in> components (U - S)" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1281 | using F_def that by blast | 
| 72245 | 1282 | then show "closedin (top_of_set U) (S \<union> C)" | 
| 1283 | by (rule closedin_Un_complement_component [OF \<open>locally connected U\<close> clo]) | |
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1284 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1285 | have "x = a C'" if "C' \<in> F" "x \<in> C'" "x \<notin> U" for x C' | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1286 | proof - | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1287 | have "\<forall>A. x \<in> \<Union>A \<or> C' \<notin> A" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1288 | using \<open>x \<in> C'\<close> by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1289 | with that show "x = a C'" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1290 | by (metis (lifting) DiffD1 F_def Union_components mem_Collect_eq) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1291 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1292 | then show "S \<union> UF \<subseteq> U" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1293 | using \<open>S \<subseteq> U\<close> by (force simp: UF_def) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1294 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1295 |       show "S \<union> (C - {a C}) = (S \<union> C) \<inter> (S \<union> UF)"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1296 | using F_def UF_def components_nonoverlap that by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1297 | qed | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1298 |     show "continuous_map (subtopology ?X (S \<union> (C' - {a C'}))) euclidean (h C')" if "C' \<in> F" for C'
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1299 | proof - | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1300 |       have C': "C' \<in> components (U - S)" "C' \<inter> K \<noteq> {}"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1301 | using F_def that by blast+ | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1302 | show ?thesis | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1303 | using ah [OF C'] by (auto simp: F_def subtopology_subtopology intro: continuous_on_subset) | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1304 | qed | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1305 | show "\<And>i j x. \<lbrakk>i \<in> F; j \<in> F; | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1306 |                    x \<in> topspace ?X \<inter> (S \<union> (i - {a i})) \<inter> (S \<union> (j - {a j}))\<rbrakk>
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1307 | \<Longrightarrow> h i x = h j x" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1308 | using components_eq by (fastforce simp: components_eq F_def ah) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1309 | qed auto | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1310 | have SU': "S \<union> \<Union>G \<union> (S \<union> UF) \<subseteq> U" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1311 | using \<open>S \<subseteq> U\<close> in_components_subset by (auto simp: F_def G_def UF_def) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1312 | have clo1: "closedin (top_of_set (S \<union> \<Union>G \<union> (S \<union> UF))) (S \<union> \<Union>G)" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1313 | proof (rule closedin_closed_subset [OF _ SU']) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1314 | have *: "\<And>C. C \<in> F \<Longrightarrow> openin (top_of_set U) C" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1315 | unfolding F_def | 
| 76943 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 1316 | by (metis (no_types, lifting) \<open>locally connected U\<close> clo closedin_def locally_connected_open_component mem_Collect_eq topspace_euclidean_subtopology) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1317 | show "closedin (top_of_set U) (U - UF)" | 
| 76943 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 1318 | unfolding UF_def by (force intro: openin_delete *) | 
| 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 1319 |     have "(\<Union>x\<in>F. x - {a x}) \<inter> S = {}" "\<Union> G \<subseteq> U"
 | 
| 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 1320 | using in_components_subset by (auto simp: F_def G_def) | 
| 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 1321 |     moreover have "\<Union> G \<inter> UF = {}"
 | 
| 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 1322 | using components_nonoverlap by (fastforce simp: F_def G_def UF_def) | 
| 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 1323 | ultimately show "S \<union> \<Union>G = (U - UF) \<inter> (S \<union> \<Union>G \<union> (S \<union> UF))" | 
| 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 1324 | using UF_def \<open>S \<subseteq> U\<close> by auto | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1325 | qed | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1326 | have clo2: "closedin (top_of_set (S \<union> \<Union>G \<union> (S \<union> UF))) (S \<union> UF)" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1327 | proof (rule closedin_closed_subset [OF _ SU']) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1328 | show "closedin (top_of_set U) (\<Union>C\<in>F. S \<union> C)" | 
| 72245 | 1329 | proof (rule closedin_Union) | 
| 1330 | show "\<And>T. T \<in> (\<union>) S ` F \<Longrightarrow> closedin (top_of_set U) T" | |
| 1331 | using F_def \<open>locally connected U\<close> clo closedin_Un_complement_component by blast | |
| 1332 | qed (simp add: \<open>finite F\<close>) | |
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1333 | show "S \<union> UF = (\<Union>C\<in>F. S \<union> C) \<inter> (S \<union> \<Union>G \<union> (S \<union> UF))" | 
| 76943 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 1334 | proof | 
| 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 1335 | show "\<Union> ((\<union>) S ` F) \<inter> (S \<union> \<Union> G \<union> (S \<union> UF)) \<subseteq> S \<union> UF" | 
| 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 1336 | using components_eq [of _ "U-S"] | 
| 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 1337 | by (auto simp add: F_def G_def UF_def disjoint_iff_not_equal) | 
| 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 1338 | qed (use UF_def \<open>C0 \<in> F\<close> in blast) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1339 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1340 | have SUG: "S \<union> \<Union>G \<subseteq> U - K" | 
| 76943 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 1341 | using \<open>S \<subseteq> U\<close> K in_components_subset[of _ "U-S"] by (force simp: G_def disjnt_iff) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1342 | then have contf': "continuous_on (S \<union> \<Union>G) f" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1343 | by (rule continuous_on_subset [OF contf]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1344 | have contg': "continuous_on (S \<union> UF) g" | 
| 72245 | 1345 | by (simp add: contg) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1346 | have "\<And>x. \<lbrakk>S \<subseteq> U; x \<in> S\<rbrakk> \<Longrightarrow> f x = g x" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1347 | by (subst gh) (auto simp: ah C0 intro: \<open>C0 \<in> F\<close>) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1348 | then have f_eq_g: "\<And>x. x \<in> S \<union> UF \<and> x \<in> S \<union> \<Union>G \<Longrightarrow> f x = g x" | 
| 76943 
f5a7f171d186
Partial round of clearing up applys, etc
 paulson <lp15@cam.ac.uk> parents: 
76874diff
changeset | 1349 | using \<open>S \<subseteq> U\<close> components_eq [of _ "U-S"] by (fastforce simp add: F_def G_def UF_def) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1350 | 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)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1351 | by (blast intro: continuous_on_cases_local [OF clo1 clo2 contf' contg' f_eq_g, of "\<lambda>x. x \<in> S \<union> \<Union>G"]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1352 | show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1353 | proof | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1354 | have UF: "\<Union>F - L \<subseteq> UF" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1355 | unfolding F_def UF_def using ah by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1356 | have "U - S - L = \<Union>(components (U - S)) - L" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1357 | by simp | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1358 | also have "... = \<Union>F \<union> \<Union>G - L" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1359 | unfolding F_def G_def by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1360 | also have "... \<subseteq> UF \<union> \<Union>G" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1361 | using UF by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1362 | finally have "U - L \<subseteq> S \<union> \<Union>G \<union> (S \<union> UF)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1363 | by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1364 | then show "continuous_on (U - L) (\<lambda>x. if x \<in> S \<union> \<Union>G then f x else g x)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1365 | by (rule continuous_on_subset [OF cont]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1366 |     have "((U - L) \<inter> {x. x \<notin> S \<and> (\<forall>xa\<in>G. x \<notin> xa)}) \<subseteq>  ((U - L) \<inter> (-S \<inter> UF))"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1367 | using \<open>U - L \<subseteq> S \<union> \<Union>G \<union> (S \<union> UF)\<close> by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1368 | moreover have "g ` ((U - L) \<inter> (-S \<inter> UF)) \<subseteq> T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1369 | proof - | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1370 | have "g x \<in> T" if "x \<in> U" "x \<notin> L" "x \<notin> S" "C \<in> F" "x \<in> C" "x \<noteq> a C" for x C | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1371 | proof (subst gh) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1372 |         show "x \<in> (S \<union> UF) \<inter> (S \<union> (C - {a C}))"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1373 | using that by (auto simp: UF_def) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1374 | show "h C x \<in> T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1375 | using ah that by (fastforce simp add: F_def) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1376 | qed (rule that) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1377 | then show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1378 | by (force simp: UF_def) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1379 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1380 |     ultimately have "g ` ((U - L) \<inter> {x. x \<notin> S \<and> (\<forall>xa\<in>G. x \<notin> xa)}) \<subseteq> T"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1381 | using image_mono order_trans by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1382 | moreover have "f ` ((U - L) \<inter> (S \<union> \<Union>G)) \<subseteq> T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1383 | using fim SUG by blast | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1384 | ultimately show "(\<lambda>x. if x \<in> S \<union> \<Union>G then f x else g x) \<in> (U - L) \<rightarrow> T" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1385 | by force | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1386 | show "\<And>x. x \<in> S \<Longrightarrow> (if x \<in> S \<union> \<Union>G then f x else g x) = f x" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1387 | by (simp add: F_def G_def) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1388 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1389 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1390 | |
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1391 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 1392 | lemma extend_map_affine_to_sphere2: | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1393 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1394 | assumes "compact S" "convex U" "bounded U" "affine T" "S \<subseteq> T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1395 | and affTU: "aff_dim T \<le> aff_dim U" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1396 | and contf: "continuous_on S f" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1397 | and fim: "f \<in> S \<rightarrow> rel_frontier U" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1398 |       and ovlap: "\<And>C. C \<in> components(T - S) \<Longrightarrow> C \<inter> L \<noteq> {}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1399 | obtains K g where "finite K" "K \<subseteq> L" "K \<subseteq> T" "disjnt K S" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1400 | "continuous_on (T - K) g" "g \<in> (T - K) \<rightarrow> rel_frontier U" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1401 | "\<And>x. x \<in> S \<Longrightarrow> g x = f x" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 1402 | proof - | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1403 | obtain K g where K: "finite K" "K \<subseteq> T" "disjnt K S" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1404 | and contg: "continuous_on (T - K) g" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1405 | and gim: "g \<in> (T - K) \<rightarrow> rel_frontier U" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1406 | and gf: "\<And>x. x \<in> S \<Longrightarrow> g x = f x" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1407 | using assms extend_map_affine_to_sphere_cofinite_simple by metis | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 1408 | have "\<exists>y C. C \<in> components (T - S) \<and> x \<in> C \<and> y \<in> C \<and> y \<in> L" if "x \<in> K" for x | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1409 | proof - | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1410 | have "x \<in> T-S" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1411 | using \<open>K \<subseteq> T\<close> \<open>disjnt K S\<close> disjnt_def that by fastforce | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1412 | then obtain C where "C \<in> components(T - S)" "x \<in> C" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1413 | by (metis UnionE Union_components) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1414 | with ovlap [of C] show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1415 | by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1416 | qed | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 1417 | then obtain \<xi> where \<xi>: "\<And>x. x \<in> K \<Longrightarrow> \<exists>C. C \<in> components (T - S) \<and> x \<in> C \<and> \<xi> x \<in> C \<and> \<xi> x \<in> L" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1418 | by metis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1419 | obtain h where conth: "continuous_on (T - \<xi> ` K) h" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1420 | and him: "h \<in> (T - \<xi> ` K) \<rightarrow> rel_frontier U" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1421 | and hg: "\<And>x. x \<in> S \<Longrightarrow> h x = g x" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1422 | proof (rule extend_map_affine_to_sphere1 [OF \<open>finite K\<close> \<open>affine T\<close> contg gim, of S "\<xi> ` K"]) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1423 | show cloTS: "closedin (top_of_set T) S" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1424 | by (simp add: \<open>compact S\<close> \<open>S \<subseteq> T\<close> closed_subset compact_imp_closed) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1425 |     show "\<And>C. \<lbrakk>C \<in> components (T - S); C \<inter> K \<noteq> {}\<rbrakk> \<Longrightarrow> C \<inter> \<xi> ` K \<noteq> {}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1426 | using \<xi> components_eq by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1427 | qed (use K in auto) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1428 | show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1429 | proof | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1430 | show *: "\<xi> ` K \<subseteq> L" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1431 | using \<xi> by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1432 | show "finite (\<xi> ` K)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1433 | by (simp add: K) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1434 | show "\<xi> ` K \<subseteq> T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1435 | by clarify (meson \<xi> Diff_iff contra_subsetD in_components_subset) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1436 | show "continuous_on (T - \<xi> ` K) h" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1437 | by (rule conth) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1438 | show "disjnt (\<xi> ` K) S" | 
| 72245 | 1439 | using K \<xi> in_components_subset by (fastforce simp: disjnt_def) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1440 | qed (simp_all add: him hg gf) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1441 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1442 | |
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1443 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 1444 | proposition extend_map_affine_to_sphere_cofinite_gen: | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1445 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1446 | assumes SUT: "compact S" "convex U" "bounded U" "affine T" "S \<subseteq> T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1447 | and aff: "aff_dim T \<le> aff_dim U" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1448 | and contf: "continuous_on S f" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1449 | and fim: "f \<in> S \<rightarrow> rel_frontier U" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1450 |       and dis: "\<And>C. \<lbrakk>C \<in> components(T - S); bounded C\<rbrakk> \<Longrightarrow> C \<inter> L \<noteq> {}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1451 | obtains K g where "finite K" "K \<subseteq> L" "K \<subseteq> T" "disjnt K S" "continuous_on (T - K) g" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1452 | "g \<in> (T - K) \<rightarrow> rel_frontier U" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1453 | "\<And>x. x \<in> S \<Longrightarrow> g x = f x" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 1454 | proof (cases "S = {}")
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1455 | case True | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1456 | show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1457 |   proof (cases "rel_frontier U = {}")
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1458 | case True | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1459 | with aff have "aff_dim T \<le> 0" | 
| 72245 | 1460 | using affine_bounded_eq_lowdim \<open>bounded U\<close> order_trans | 
| 1461 | by (auto simp add: rel_frontier_eq_empty) | |
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1462 | with aff_dim_geq [of T] consider "aff_dim T = -1" | "aff_dim T = 0" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1463 | by linarith | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1464 | then show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1465 | proof cases | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1466 | assume "aff_dim T = -1" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1467 |       then have "T = {}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1468 | by (simp add: aff_dim_empty) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1469 | then show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1470 |         by (rule_tac K="{}" in that) auto
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1471 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1472 | assume "aff_dim T = 0" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1473 |       then obtain a where "T = {a}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1474 | using aff_dim_eq_0 by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1475 | then have "a \<in> L" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1476 |         using dis [of "{a}"] \<open>S = {}\<close> by (auto simp: in_components_self)
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1477 |       with \<open>S = {}\<close> \<open>T = {a}\<close> show ?thesis
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1478 |         by (rule_tac K="{a}" and g=f in that) auto
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1479 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1480 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1481 | case False | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1482 | then obtain y where "y \<in> rel_frontier U" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1483 | by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1484 |     with \<open>S = {}\<close> show ?thesis
 | 
| 71172 | 1485 |       by (rule_tac K="{}" and g="\<lambda>x. y" in that)  (auto)
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1486 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1487 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1488 | case False | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1489 | have "bounded S" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1490 | by (simp add: assms compact_imp_bounded) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1491 | then obtain b where b: "S \<subseteq> cbox (-b) b" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1492 | using bounded_subset_cbox_symmetric by blast | 
| 69508 | 1493 |   define LU where "LU \<equiv> L \<union> (\<Union> {C \<in> components (T - S). \<not>bounded C} - cbox (-(b+One)) (b+One))"
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1494 | obtain K g where "finite K" "K \<subseteq> LU" "K \<subseteq> T" "disjnt K S" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1495 | and contg: "continuous_on (T - K) g" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 1496 | and gim: "g \<in> (T - K) \<rightarrow> rel_frontier U" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1497 | and gf: "\<And>x. x \<in> S \<Longrightarrow> g x = f x" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1498 | proof (rule extend_map_affine_to_sphere2 [OF SUT aff contf fim]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1499 |     show "C \<inter> LU \<noteq> {}" if "C \<in> components (T - S)" for C
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1500 | proof (cases "bounded C") | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1501 | case True | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1502 | with dis that show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1503 | unfolding LU_def by fastforce | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1504 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1505 | case False | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1506 |       then have "\<not> bounded (\<Union>{C \<in> components (T - S). \<not> bounded C})"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1507 | by (metis (no_types, lifting) Sup_upper bounded_subset mem_Collect_eq that) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1508 | then show ?thesis | 
| 76944 | 1509 | by (simp add: LU_def disjoint_iff) (meson False bounded_cbox bounded_subset subset_iff that) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1510 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1511 | qed blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1512 | have *: False if "x \<in> cbox (- b - m *\<^sub>R One) (b + m *\<^sub>R One)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1513 | "x \<notin> box (- b - n *\<^sub>R One) (b + n *\<^sub>R One)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1514 | "0 \<le> m" "m < n" "n \<le> 1" for m n x | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1515 | using that by (auto simp: mem_box algebra_simps) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1516 |   have "disjoint_family_on (\<lambda>d. frontier (cbox (- b - d *\<^sub>R One) (b + d *\<^sub>R One))) {1 / 2..1}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1517 | by (auto simp: disjoint_family_on_def neq_iff frontier_def dest: *) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1518 | then obtain d where d12: "1/2 \<le> d" "d \<le> 1" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1519 | and ddis: "disjnt K (frontier (cbox (-(b + d *\<^sub>R One)) (b + d *\<^sub>R One)))" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1520 |     using disjoint_family_elem_disjnt [of "{1/2..1::real}" K "\<lambda>d. frontier (cbox (-(b + d *\<^sub>R One)) (b + d *\<^sub>R One))"]
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1521 | by (auto simp: \<open>finite K\<close>) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1522 | define c where "c \<equiv> b + d *\<^sub>R One" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1523 | have cbsub: "cbox (-b) b \<subseteq> box (-c) c" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1524 | "cbox (-b) b \<subseteq> cbox (-c) c" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1525 | "cbox (-c) c \<subseteq> cbox (-(b+One)) (b+One)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1526 | using d12 by (simp_all add: subset_box c_def inner_diff_left inner_left_distrib) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1527 | have clo_cT: "closed (cbox (- c) c \<inter> T)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1528 | using affine_closed \<open>affine T\<close> by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1529 |   have cT_ne: "cbox (- c) c \<inter> T \<noteq> {}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1530 |     using \<open>S \<noteq> {}\<close> \<open>S \<subseteq> T\<close> b cbsub by fastforce
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1531 | have S_sub_cc: "S \<subseteq> cbox (- c) c" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1532 | using \<open>cbox (- b) b \<subseteq> cbox (- c) c\<close> b by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1533 | show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1534 | proof | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1535 | show "finite (K \<inter> cbox (-(b+One)) (b+One))" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1536 | using \<open>finite K\<close> by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1537 | show "K \<inter> cbox (- (b + One)) (b + One) \<subseteq> L" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1538 | using \<open>K \<subseteq> LU\<close> by (auto simp: LU_def) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1539 | show "K \<inter> cbox (- (b + One)) (b + One) \<subseteq> T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1540 | using \<open>K \<subseteq> T\<close> by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1541 | show "disjnt (K \<inter> cbox (- (b + One)) (b + One)) S" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1542 | using \<open>disjnt K S\<close> by (simp add: disjnt_def disjoint_eq_subset_Compl inf.coboundedI1) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1543 | have cloTK: "closest_point (cbox (- c) c \<inter> T) x \<in> T - K" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1544 | if "x \<in> T" and Knot: "x \<in> K \<longrightarrow> x \<notin> cbox (- b - One) (b + One)" for x | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1545 | proof (cases "x \<in> cbox (- c) c") | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1546 | case True | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1547 | with \<open>x \<in> T\<close> show ?thesis | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 1548 | using cbsub(3) Knot by (force simp: closest_point_self) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1549 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1550 | case False | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1551 | have clo_in_rf: "closest_point (cbox (- c) c \<inter> T) x \<in> rel_frontier (cbox (- c) c \<inter> T)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1552 | proof (intro closest_point_in_rel_frontier [OF clo_cT cT_ne] DiffI notI) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1553 |         have "T \<inter> interior (cbox (- c) c) \<noteq> {}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1554 |           using \<open>S \<noteq> {}\<close> \<open>S \<subseteq> T\<close> b cbsub(1) by fastforce
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1555 | then show "x \<in> affine hull (cbox (- c) c \<inter> T)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1556 | by (simp add: Int_commute affine_hull_affine_Int_nonempty_interior \<open>affine T\<close> hull_inc that(1)) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1557 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1558 | show "False" if "x \<in> rel_interior (cbox (- c) c \<inter> T)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1559 | proof - | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1560 |           have "interior (cbox (- c) c) \<inter> T \<noteq> {}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1561 |             using \<open>S \<noteq> {}\<close> \<open>S \<subseteq> T\<close> b cbsub(1) by fastforce
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1562 | then have "affine hull (T \<inter> cbox (- c) c) = T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1563 | using affine_hull_convex_Int_nonempty_interior [of T "cbox (- c) c"] | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1564 | by (simp add: affine_imp_convex \<open>affine T\<close> inf_commute) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1565 | then show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1566 | by (meson subsetD le_inf_iff rel_interior_subset that False) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1567 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1568 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1569 | have "closest_point (cbox (- c) c \<inter> T) x \<notin> K" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1570 | proof | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1571 | assume inK: "closest_point (cbox (- c) c \<inter> T) x \<in> K" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1572 | have "\<And>x. x \<in> K \<Longrightarrow> x \<notin> frontier (cbox (- (b + d *\<^sub>R One)) (b + d *\<^sub>R One))" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1573 | by (metis ddis disjnt_iff) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1574 | then show False | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1575 | by (metis DiffI Int_iff \<open>affine T\<close> cT_ne c_def clo_cT clo_in_rf closest_point_in_set | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1576 | convex_affine_rel_frontier_Int convex_box(1) empty_iff frontier_cbox inK interior_cbox) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1577 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1578 | then show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1579 | using cT_ne clo_cT closest_point_in_set by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1580 | qed | 
| 76944 | 1581 | have "convex (cbox (- c) c \<inter> T)" | 
| 1582 | by (simp add: affine_imp_convex assms(4) convex_Int) | |
| 1583 | then show "continuous_on (T - K \<inter> cbox (- (b + One)) (b + One)) (g \<circ> closest_point (cbox (-c) c \<inter> T))" | |
| 1584 | using cloTK clo_cT cT_ne | |
| 1585 | by (intro continuous_on_compose continuous_on_closest_point continuous_on_subset [OF contg]; force) | |
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1586 | have "g (closest_point (cbox (- c) c \<inter> T) x) \<in> rel_frontier U" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1587 | if "x \<in> T" "x \<in> K \<longrightarrow> x \<notin> cbox (- b - One) (b + One)" for x | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 1588 | using cloTK gim that by auto | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1589 | then show "(g \<circ> closest_point (cbox (- c) c \<inter> T)) \<in> (T - K \<inter> cbox (- (b + One)) (b + One)) | 
| 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1590 | \<rightarrow> rel_frontier U" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1591 | by force | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1592 | show "\<And>x. x \<in> S \<Longrightarrow> (g \<circ> closest_point (cbox (- c) c \<inter> T)) x = f x" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1593 | by simp (metis (mono_tags, lifting) IntI \<open>S \<subseteq> T\<close> cT_ne clo_cT closest_point_refl gf subsetD S_sub_cc) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1594 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1595 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1596 | |
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1597 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 1598 | corollary extend_map_affine_to_sphere_cofinite: | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1599 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1600 | assumes SUT: "compact S" "affine T" "S \<subseteq> T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1601 |       and aff: "aff_dim T \<le> DIM('b)" and "0 \<le> r"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1602 | and contf: "continuous_on S f" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1603 | and fim: "f \<in> S \<rightarrow> sphere a r" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1604 |       and dis: "\<And>C. \<lbrakk>C \<in> components(T - S); bounded C\<rbrakk> \<Longrightarrow> C \<inter> L \<noteq> {}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1605 | obtains K g where "finite K" "K \<subseteq> L" "K \<subseteq> T" "disjnt K S" "continuous_on (T - K) g" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1606 | "g \<in> (T - K) \<rightarrow> sphere a r" "\<And>x. x \<in> S \<Longrightarrow> g x = f x" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 1607 | proof (cases "r = 0") | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1608 | case True | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1609 | with fim show ?thesis | 
| 71172 | 1610 |     by (rule_tac K="{}" and g = "\<lambda>x. a" in that) (auto)
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1611 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1612 | case False | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1613 | show thesis | 
| 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1614 | proof (rule extend_map_affine_to_sphere_cofinite_gen | 
| 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1615 | [OF \<open>compact S\<close> convex_cball bounded_cball \<open>affine T\<close> \<open>S \<subseteq> T\<close> _ contf]) | 
| 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1616 | have "0 < r" | 
| 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1617 | using assms False by auto | 
| 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1618 | then show "aff_dim T \<le> aff_dim (cball a r)" | 
| 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1619 | by (simp add: aff aff_dim_cball) | 
| 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1620 | show "f \<in> S \<rightarrow> rel_frontier (cball a r)" | 
| 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1621 | by (simp add: False fim) | 
| 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1622 | qed (use dis False that in auto) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1623 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1624 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 1625 | corollary extend_map_UNIV_to_sphere_cofinite: | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1626 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 72245 | 1627 |   assumes "DIM('a) \<le> DIM('b)" and "0 \<le> r"
 | 
| 1628 | and "compact S" | |
| 1629 | and "continuous_on S f" | |
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1630 | and "f \<in> S \<rightarrow> sphere a r" | 
| 72245 | 1631 |       and "\<And>C. \<lbrakk>C \<in> components(- S); bounded C\<rbrakk> \<Longrightarrow> C \<inter> L \<noteq> {}"
 | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1632 | obtains K g where "finite K" "K \<subseteq> L" "disjnt K S" "continuous_on (- K) g" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1633 | "g \<in> (- K) \<rightarrow> sphere a r" "\<And>x. x \<in> S \<Longrightarrow> g x = f x" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 1634 | using assms extend_map_affine_to_sphere_cofinite [OF \<open>compact S\<close> affine_UNIV subset_UNIV] | 
| 72245 | 1635 | by (metis Compl_eq_Diff_UNIV aff_dim_UNIV of_nat_le_iff) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1636 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 1637 | corollary extend_map_UNIV_to_sphere_no_bounded_component: | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1638 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1639 |   assumes aff: "DIM('a) \<le> DIM('b)" and "0 \<le> r"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1640 | and SUT: "compact S" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1641 | and contf: "continuous_on S f" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1642 | and fim: "f \<in> S \<rightarrow> sphere a r" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1643 | and dis: "\<And>C. C \<in> components(- S) \<Longrightarrow> \<not> bounded C" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1644 | obtains g where "continuous_on UNIV g" "g \<in> UNIV \<rightarrow> sphere a r" "\<And>x. x \<in> S \<Longrightarrow> g x = f x" | 
| 76944 | 1645 |   using extend_map_UNIV_to_sphere_cofinite [OF aff \<open>0 \<le> r\<close> \<open>compact S\<close> contf fim, of "{}"]
 | 
| 1646 | by (metis Compl_empty_eq dis subset_empty) | |
| 1647 | ||
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1648 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 1649 | theorem Borsuk_separation_theorem_gen: | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1650 | fixes S :: "'a::euclidean_space set" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1651 | assumes "compact S" | 
| 69508 | 1652 | shows "(\<forall>c \<in> components(- S). \<not>bounded c) \<longleftrightarrow> | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1653 | (\<forall>f. continuous_on S f \<and> f \<in> S \<rightarrow> sphere (0::'a) 1 | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 1654 | \<longrightarrow> (\<exists>c. homotopic_with_canon (\<lambda>x. True) S (sphere 0 1) f (\<lambda>x. c)))" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1655 | (is "?lhs = ?rhs") | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 1656 | proof | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1657 | assume L [rule_format]: ?lhs | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1658 | show ?rhs | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1659 | proof clarify | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1660 | fix f :: "'a \<Rightarrow> 'a" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1661 | assume contf: "continuous_on S f" and fim: "f \<in> S \<rightarrow> sphere 0 1" | 
| 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1662 | obtain g where contg: "continuous_on UNIV g" and gim: "g \<in> UNIV \<rightarrow> sphere 0 1" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1663 | and gf: "\<And>x. x \<in> S \<Longrightarrow> g x = f x" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1664 | by (rule extend_map_UNIV_to_sphere_no_bounded_component [OF _ _ \<open>compact S\<close> contf fim L]) auto | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 1665 | then obtain c where c: "homotopic_with_canon (\<lambda>h. True) UNIV (sphere 0 1) g (\<lambda>x. c)" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1666 | by (metis contractible_UNIV nullhomotopic_from_contractible) | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 1667 | then show "\<exists>c. homotopic_with_canon (\<lambda>x. True) S (sphere 0 1) f (\<lambda>x. c)" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1668 | by (metis assms compact_imp_closed contf contg contractible_empty fim gf gim nullhomotopic_from_contractible nullhomotopic_into_sphere_extension image_subset_iff_funcset) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1669 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1670 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1671 | assume R [rule_format]: ?rhs | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1672 | show ?lhs | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1673 | unfolding components_def | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1674 | proof clarify | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1675 | fix a | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1676 | assume "a \<notin> S" and a: "bounded (connected_component_set (- S) a)" | 
| 72245 | 1677 | have "\<forall>x\<in>S. norm (x - a) \<noteq> 0" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1678 | using \<open>a \<notin> S\<close> by auto | 
| 72245 | 1679 | then have cont: "continuous_on S (\<lambda>x. inverse(norm(x - a)) *\<^sub>R (x - a))" | 
| 1680 | by (intro continuous_intros) | |
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1681 | have im: "(\<lambda>x. inverse(norm(x - a)) *\<^sub>R (x - a)) ` S \<subseteq> sphere 0 1" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1682 | by clarsimp (metis \<open>a \<notin> S\<close> eq_iff_diff_eq_0 left_inverse norm_eq_zero) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1683 | show False | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1684 | using R cont im Borsuk_map_essential_bounded_component [OF \<open>compact S\<close> \<open>a \<notin> S\<close>] a by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1685 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1686 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1687 | |
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1688 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 1689 | corollary Borsuk_separation_theorem: | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1690 | fixes S :: "'a::euclidean_space set" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1691 |   assumes "compact S" and 2: "2 \<le> DIM('a)"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1692 | shows "connected(- S) \<longleftrightarrow> | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 1693 | (\<forall>f. continuous_on S f \<and> f \<in> S \<rightarrow> sphere (0::'a) 1 | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 1694 | \<longrightarrow> (\<exists>c. homotopic_with_canon (\<lambda>x. True) S (sphere 0 1) f (\<lambda>x. c)))" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1695 | (is "?lhs = ?rhs") | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 1696 | proof | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1697 | assume L: ?lhs | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1698 | show ?rhs | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1699 |   proof (cases "S = {}")
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1700 | case True | 
| 78336 | 1701 | then show ?thesis | 
| 1702 | using homotopic_with_canon_on_empty by blast | |
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1703 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1704 | case False | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1705 | then have "(\<forall>c\<in>components (- S). \<not> bounded c)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1706 | by (metis L assms(1) bounded_empty cobounded_imp_unbounded compact_imp_bounded in_components_maximal order_refl) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1707 | then show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1708 | by (simp add: Borsuk_separation_theorem_gen [OF \<open>compact S\<close>]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1709 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1710 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1711 | assume R: ?rhs | 
| 76944 | 1712 | then have "\<forall>c\<in>components (- S). \<not> bounded c \<Longrightarrow> connected (- S)" | 
| 1713 | by (metis "2" assms(1) cobounded_has_bounded_component compact_imp_bounded double_complement) | |
| 1714 | with R show ?lhs | |
| 1715 | by (simp add: Borsuk_separation_theorem_gen [OF \<open>compact S\<close>]) | |
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1716 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1717 | |
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1718 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 1719 | lemma homotopy_eqv_separation: | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1720 | fixes S :: "'a::euclidean_space set" and T :: "'a set" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1721 | assumes "S homotopy_eqv T" and "compact S" and "compact T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1722 | shows "connected(- S) \<longleftrightarrow> connected(- T)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1723 | proof - | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1724 |   consider "DIM('a) = 1" | "2 \<le> DIM('a)"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1725 | by (metis DIM_ge_Suc0 One_nat_def Suc_1 dual_order.antisym not_less_eq_eq) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1726 | then show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1727 | proof cases | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1728 | case 1 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1729 | then show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1730 | using bounded_connected_Compl_1 compact_imp_bounded homotopy_eqv_empty1 homotopy_eqv_empty2 assms by metis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1731 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1732 | case 2 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1733 | with assms show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1734 | by (simp add: Borsuk_separation_theorem homotopy_eqv_cohomotopic_triviality_null) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1735 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1736 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1737 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 1738 | proposition Jordan_Brouwer_separation: | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1739 | fixes S :: "'a::euclidean_space set" and a::'a | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1740 | assumes hom: "S homeomorphic sphere a r" and "0 < r" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1741 | shows "\<not> connected(- S)" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 1742 | proof - | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1743 |   have "- sphere a r \<inter> ball a r \<noteq> {}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1744 | using \<open>0 < r\<close> by (simp add: Int_absorb1 subset_eq) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1745 | moreover | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1746 | have eq: "- sphere a r - ball a r = - cball a r" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1747 | by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1748 |   have "- cball a r \<noteq> {}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1749 | proof - | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1750 |     have "frontier (cball a r) \<noteq> {}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1751 | using \<open>0 < r\<close> by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1752 | then show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1753 | by (metis frontier_complement frontier_empty) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1754 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1755 |   with eq have "- sphere a r - ball a r \<noteq> {}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1756 | by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1757 | moreover | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1758 | have "connected (- S) = connected (- sphere a r)" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 1759 | by (meson hom compact_sphere homeomorphic_compactness homeomorphic_imp_homotopy_eqv homotopy_eqv_separation) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1760 | ultimately show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1761 | using connected_Int_frontier [of "- sphere a r" "ball a r"] by (auto simp: \<open>0 < r\<close>) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1762 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1763 | |
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1764 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 1765 | proposition Jordan_Brouwer_frontier: | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1766 | fixes S :: "'a::euclidean_space set" and a::'a | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1767 |   assumes S: "S homeomorphic sphere a r" and T: "T \<in> components(- S)" and 2: "2 \<le> DIM('a)"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1768 | shows "frontier T = S" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 1769 | proof (cases r rule: linorder_cases) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1770 | assume "r < 0" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1771 | with S T show ?thesis by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1772 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1773 | assume "r = 0" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1774 |   with S T card_eq_SucD obtain b where "S = {b}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1775 |     by (auto simp: homeomorphic_finite [of "{a}" S])
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1776 |   have "components (- {b}) = { -{b}}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1777 |     using T \<open>S = {b}\<close> by (auto simp: components_eq_sing_iff connected_punctured_universe 2)
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1778 | with T show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1779 |     by (metis \<open>S = {b}\<close> cball_trivial frontier_cball frontier_complement singletonD sphere_trivial)
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1780 | next | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1781 | assume "r > 0" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1782 | have "compact S" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1783 | using homeomorphic_compactness compact_sphere S by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1784 | show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1785 | proof (rule frontier_minimal_separating_closed) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1786 | show "closed S" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1787 | using \<open>compact S\<close> compact_eq_bounded_closed by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1788 | show "\<not> connected (- S)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1789 | using Jordan_Brouwer_separation S \<open>0 < r\<close> by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1790 | obtain f g where hom: "homeomorphism S (sphere a r) f g" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1791 | using S by (auto simp: homeomorphic_def) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1792 | show "connected (- T)" if "closed T" "T \<subset> S" for T | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1793 | proof - | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 1794 | have "f \<in> T \<rightarrow> sphere a r" | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1795 | using \<open>T \<subset> S\<close> hom homeomorphism_image1 by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1796 | moreover have "f ` T \<noteq> sphere a r" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1797 | using \<open>T \<subset> S\<close> hom | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1798 | by (metis homeomorphism_image2 homeomorphism_of_subsets order_refl psubsetE) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1799 | ultimately have "f ` T \<subset> sphere a r" by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1800 | then have "connected (- f ` T)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1801 | by (rule psubset_sphere_Compl_connected [OF _ \<open>0 < r\<close> 2]) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1802 | moreover have "compact T" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1803 | using \<open>compact S\<close> bounded_subset compact_eq_bounded_closed that by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1804 | moreover then have "compact (f ` T)" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1805 | by (meson compact_continuous_image continuous_on_subset hom homeomorphism_def psubsetE \<open>T \<subset> S\<close>) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1806 | moreover have "T homotopy_eqv f ` T" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 1807 | by (meson hom homeomorphic_def homeomorphic_imp_homotopy_eqv homeomorphism_of_subsets order.refl psubsetE that(2)) | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1808 | ultimately show ?thesis | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1809 | using homotopy_eqv_separation [of T "f`T"] by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1810 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1811 | qed (rule T) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1812 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1813 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 1814 | proposition Jordan_Brouwer_nonseparation: | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1815 | fixes S :: "'a::euclidean_space set" and a::'a | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1816 |   assumes S: "S homeomorphic sphere a r" and "T \<subset> S" and 2: "2 \<le> DIM('a)"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1817 | shows "connected(- T)" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 1818 | proof - | 
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1819 | have *: "connected(C \<union> (S - T))" if "C \<in> components(- S)" for C | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1820 | proof (rule connected_intermediate_closure) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1821 | show "connected C" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1822 | using in_components_connected that by auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1823 | have "S = frontier C" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1824 | using "2" Jordan_Brouwer_frontier S that by blast | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1825 | with closure_subset show "C \<union> (S - T) \<subseteq> closure C" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1826 | by (auto simp: frontier_def) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1827 | qed auto | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1828 |   have "components(- S) \<noteq> {}"
 | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1829 | by (metis S bounded_empty cobounded_imp_unbounded compact_eq_bounded_closed compact_sphere | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1830 | components_eq_empty homeomorphic_compactness) | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1831 | then have "- T = (\<Union>C \<in> components(- S). C \<union> (S - T))" | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1832 | using Union_components [of "-S"] \<open>T \<subset> S\<close> by auto | 
| 72245 | 1833 | moreover have "connected ..." | 
| 1834 | using \<open>T \<subset> S\<close> by (intro connected_Union) (auto simp: *) | |
| 1835 | ultimately show ?thesis | |
| 1836 | by simp | |
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1837 | qed | 
| 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 1838 | |
| 69683 | 1839 | subsection\<open> Invariance of domain and corollaries\<close> | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68634diff
changeset | 1840 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 1841 | lemma invariance_of_domain_ball: | 
| 64122 | 1842 | fixes f :: "'a \<Rightarrow> 'a::euclidean_space" | 
| 1843 | assumes contf: "continuous_on (cball a r) f" and "0 < r" | |
| 1844 | and inj: "inj_on f (cball a r)" | |
| 1845 | shows "open(f ` ball a r)" | |
| 1846 | proof (cases "DIM('a) = 1")
 | |
| 1847 | case True | |
| 1848 | obtain h::"'a\<Rightarrow>real" and k | |
| 72245 | 1849 | where "linear h" "linear k" "h ` UNIV = UNIV" "k ` UNIV = UNIV" | 
| 1850 | "\<And>x. norm(h x) = norm x" "\<And>x. norm(k x) = norm x" | |
| 1851 | and kh: "\<And>x. k(h x) = x" and "\<And>x. h(k x) = x" | |
| 1852 | proof (rule isomorphisms_UNIV_UNIV) | |
| 1853 |     show "DIM('a) = DIM(real)"
 | |
| 1854 | using True by force | |
| 1855 | qed (metis UNIV_I UNIV_eq_I imageI) | |
| 1856 | have cont: "continuous_on S h" "continuous_on T k" for S T | |
| 64122 | 1857 | by (simp_all add: \<open>linear h\<close> \<open>linear k\<close> linear_continuous_on linear_linear) | 
| 1858 | have "continuous_on (h ` cball a r) (h \<circ> f \<circ> k)" | |
| 72245 | 1859 | by (intro continuous_on_compose cont continuous_on_subset [OF contf]) (auto simp: kh) | 
| 64122 | 1860 | moreover have "is_interval (h ` cball a r)" | 
| 1861 | by (simp add: is_interval_connected_1 \<open>linear h\<close> linear_continuous_on linear_linear connected_continuous_image) | |
| 1862 | moreover have "inj_on (h \<circ> f \<circ> k) (h ` cball a r)" | |
| 1863 | using inj by (simp add: inj_on_def) (metis \<open>\<And>x. k (h x) = x\<close>) | |
| 1864 | ultimately have *: "\<And>T. \<lbrakk>open T; T \<subseteq> h ` cball a r\<rbrakk> \<Longrightarrow> open ((h \<circ> f \<circ> k) ` T)" | |
| 1865 | using injective_eq_1d_open_map_UNIV by blast | |
| 1866 | have "open ((h \<circ> f \<circ> k) ` (h ` ball a r))" | |
| 1867 | by (rule *) (auto simp: \<open>linear h\<close> \<open>range h = UNIV\<close> open_surjective_linear_image) | |
| 1868 | then have "open ((h \<circ> f) ` ball a r)" | |
| 1869 | by (simp add: image_comp \<open>\<And>x. k (h x) = x\<close> cong: image_cong) | |
| 1870 | then show ?thesis | |
| 72245 | 1871 | unfolding image_comp [symmetric] | 
| 1872 | by (metis open_bijective_linear_image_eq \<open>linear h\<close> kh \<open>range h = UNIV\<close> bijI inj_on_def) | |
| 64122 | 1873 | next | 
| 1874 | case False | |
| 1875 |   then have 2: "DIM('a) \<ge> 2"
 | |
| 1876 | by (metis DIM_ge_Suc0 One_nat_def Suc_1 antisym not_less_eq_eq) | |
| 1877 | have fimsub: "f ` ball a r \<subseteq> - f ` sphere a r" | |
| 1878 | using inj by clarsimp (metis inj_onD less_eq_real_def mem_cball order_less_irrefl) | |
| 1879 | have hom: "f ` sphere a r homeomorphic sphere a r" | |
| 1880 | by (meson compact_sphere contf continuous_on_subset homeomorphic_compact homeomorphic_sym inj inj_on_subset sphere_cball) | |
| 1881 | then have nconn: "\<not> connected (- f ` sphere a r)" | |
| 1882 | by (rule Jordan_Brouwer_separation) (auto simp: \<open>0 < r\<close>) | |
| 72245 | 1883 | have "bounded (f ` sphere a r)" | 
| 64122 | 1884 | by (meson compact_imp_bounded compact_continuous_image_eq compact_sphere contf inj sphere_cball) | 
| 72245 | 1885 | then obtain C where C: "C \<in> components (- f ` sphere a r)" and "bounded C" | 
| 1886 | using cobounded_has_bounded_component [OF _ nconn] "2" by auto | |
| 64122 | 1887 | moreover have "f ` (ball a r) = C" | 
| 1888 | proof | |
| 1889 |     have "C \<noteq> {}"
 | |
| 1890 | by (rule in_components_nonempty [OF C]) | |
| 1891 | show "C \<subseteq> f ` ball a r" | |
| 1892 | proof (rule ccontr) | |
| 1893 | assume nonsub: "\<not> C \<subseteq> f ` ball a r" | |
| 1894 | have "- f ` cball a r \<subseteq> C" | |
| 1895 | proof (rule components_maximal [OF C]) | |
| 1896 | have "f ` cball a r homeomorphic cball a r" | |
| 1897 | using compact_cball contf homeomorphic_compact homeomorphic_sym inj by blast | |
| 1898 | then show "connected (- f ` cball a r)" | |
| 1899 | by (auto intro: connected_complement_homeomorphic_convex_compact 2) | |
| 1900 | show "- f ` cball a r \<subseteq> - f ` sphere a r" | |
| 1901 | by auto | |
| 1902 |         then show "C \<inter> - f ` cball a r \<noteq> {}"
 | |
| 1903 |           using \<open>C \<noteq> {}\<close> in_components_subset [OF C] nonsub
 | |
| 1904 | using image_iff by fastforce | |
| 1905 | qed | |
| 1906 | then have "bounded (- f ` cball a r)" | |
| 1907 | using bounded_subset \<open>bounded C\<close> by auto | |
| 1908 | then have "\<not> bounded (f ` cball a r)" | |
| 1909 | using cobounded_imp_unbounded by blast | |
| 1910 | then show "False" | |
| 1911 | using compact_continuous_image [OF contf] compact_cball compact_imp_bounded by blast | |
| 1912 | qed | |
| 1913 |     with \<open>C \<noteq> {}\<close> have "C \<inter> f ` ball a r \<noteq> {}"
 | |
| 1914 | by (simp add: inf.absorb_iff1) | |
| 1915 | then show "f ` ball a r \<subseteq> C" | |
| 1916 | by (metis components_maximal [OF C _ fimsub] connected_continuous_image ball_subset_cball connected_ball contf continuous_on_subset) | |
| 1917 | qed | |
| 1918 | moreover have "open (- f ` sphere a r)" | |
| 1919 | using hom compact_eq_bounded_closed compact_sphere homeomorphic_compactness by blast | |
| 1920 | ultimately show ?thesis | |
| 1921 | using open_components by blast | |
| 1922 | qed | |
| 1923 | ||
| 1924 | ||
| 1925 | text\<open>Proved by L. E. J. Brouwer (1912)\<close> | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 1926 | theorem invariance_of_domain: | 
| 64122 | 1927 | fixes f :: "'a \<Rightarrow> 'a::euclidean_space" | 
| 1928 | assumes "continuous_on S f" "open S" "inj_on f S" | |
| 1929 | shows "open(f ` S)" | |
| 1930 | unfolding open_subopen [of "f`S"] | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 1931 | proof clarify | 
| 64122 | 1932 | fix a | 
| 1933 | assume "a \<in> S" | |
| 1934 | obtain \<delta> where "\<delta> > 0" and \<delta>: "cball a \<delta> \<subseteq> S" | |
| 1935 | using \<open>open S\<close> \<open>a \<in> S\<close> open_contains_cball_eq by blast | |
| 1936 | show "\<exists>T. open T \<and> f a \<in> T \<and> T \<subseteq> f ` S" | |
| 1937 | proof (intro exI conjI) | |
| 1938 | show "open (f ` (ball a \<delta>))" | |
| 1939 | by (meson \<delta> \<open>0 < \<delta>\<close> assms continuous_on_subset inj_on_subset invariance_of_domain_ball) | |
| 1940 | show "f a \<in> f ` ball a \<delta>" | |
| 1941 | by (simp add: \<open>0 < \<delta>\<close>) | |
| 1942 | show "f ` ball a \<delta> \<subseteq> f ` S" | |
| 1943 | using \<delta> ball_subset_cball by blast | |
| 1944 | qed | |
| 1945 | qed | |
| 1946 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 1947 | lemma inv_of_domain_ss0: | 
| 64122 | 1948 | fixes f :: "'a \<Rightarrow> 'a::euclidean_space" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 1949 | assumes contf: "continuous_on U f" and injf: "inj_on f U" and fim: "f \<in> U \<rightarrow> S" | 
| 64122 | 1950 |       and "subspace S" and dimS: "dim S = DIM('b::euclidean_space)"
 | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1951 | and ope: "openin (top_of_set S) U" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1952 | shows "openin (top_of_set S) (f ` U)" | 
| 64122 | 1953 | proof - | 
| 1954 | have "U \<subseteq> S" | |
| 1955 | using ope openin_imp_subset by blast | |
| 1956 | have "(UNIV::'b set) homeomorphic S" | |
| 68072 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 immler parents: 
67968diff
changeset | 1957 | by (simp add: \<open>subspace S\<close> dimS homeomorphic_subspaces) | 
| 64122 | 1958 | then obtain h k where homhk: "homeomorphism (UNIV::'b set) S h k" | 
| 1959 | using homeomorphic_def by blast | |
| 1960 | have homkh: "homeomorphism S (k ` S) k h" | |
| 1961 | using homhk homeomorphism_image2 homeomorphism_sym by fastforce | |
| 1962 | have "open ((k \<circ> f \<circ> h) ` k ` U)" | |
| 1963 | proof (rule invariance_of_domain) | |
| 1964 | show "continuous_on (k ` U) (k \<circ> f \<circ> h)" | |
| 1965 | proof (intro continuous_intros) | |
| 1966 | show "continuous_on (k ` U) h" | |
| 1967 | by (meson continuous_on_subset [OF homeomorphism_cont1 [OF homhk]] top_greatest) | |
| 72245 | 1968 | have "h ` k ` U \<subseteq> U" | 
| 1969 | by (metis \<open>U \<subseteq> S\<close> dual_order.eq_iff homeomorphism_image2 homeomorphism_of_subsets homkh) | |
| 1970 | then show "continuous_on (h ` k ` U) f" | |
| 1971 | by (rule continuous_on_subset [OF contf]) | |
| 1972 | have "f ` h ` k ` U \<subseteq> S" | |
| 1973 | using \<open>h ` k ` U \<subseteq> U\<close> fim by blast | |
| 1974 | then show "continuous_on (f ` h ` k ` U) k" | |
| 1975 | by (rule continuous_on_subset [OF homeomorphism_cont2 [OF homhk]]) | |
| 64122 | 1976 | qed | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1977 | have ope_iff: "\<And>T. open T \<longleftrightarrow> openin (top_of_set (k ` S)) T" | 
| 64122 | 1978 | using homhk homeomorphism_image2 open_openin by fastforce | 
| 1979 | show "open (k ` U)" | |
| 1980 | by (simp add: ope_iff homeomorphism_imp_open_map [OF homkh ope]) | |
| 1981 | show "inj_on (k \<circ> f \<circ> h) (k ` U)" | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 1982 | unfolding inj_on_def | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 1983 | by (smt (verit, ccfv_threshold) PiE \<open>U \<subseteq> S\<close> assms(3) comp_apply homeomorphism_def homhk imageE inj_on_def injf subset_eq) | 
| 64122 | 1984 | qed | 
| 1985 | moreover | |
| 1986 | have eq: "f ` U = h ` (k \<circ> f \<circ> h \<circ> k) ` U" | |
| 69661 | 1987 | unfolding image_comp [symmetric] using \<open>U \<subseteq> S\<close> fim | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 1988 | by (metis homeomorphism_image2 homeomorphism_of_subsets homhk homkh image_subset_iff_funcset top_greatest) | 
| 64122 | 1989 | ultimately show ?thesis | 
| 73932 
fd21b4a93043
added opaque_combs and renamed hide_lams to opaque_lifting
 desharna parents: 
72245diff
changeset | 1990 | by (metis (no_types, opaque_lifting) homeomorphism_imp_open_map homhk image_comp open_openin subtopology_UNIV) | 
| 64122 | 1991 | qed | 
| 1992 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 1993 | lemma inv_of_domain_ss1: | 
| 64122 | 1994 | fixes f :: "'a \<Rightarrow> 'a::euclidean_space" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 1995 | assumes contf: "continuous_on U f" and injf: "inj_on f U" and fim: "f \<in> U \<rightarrow> S" | 
| 64122 | 1996 | and "subspace S" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1997 | and ope: "openin (top_of_set S) U" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 1998 | shows "openin (top_of_set S) (f ` U)" | 
| 64122 | 1999 | proof - | 
| 2000 |   define S' where "S' \<equiv> {y. \<forall>x \<in> S. orthogonal x y}"
 | |
| 2001 | have "subspace S'" | |
| 2002 | by (simp add: S'_def subspace_orthogonal_to_vectors) | |
| 2003 | define g where "g \<equiv> \<lambda>z::'a*'a. ((f \<circ> fst)z, snd z)" | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 2004 | have "openin (top_of_set (S \<times> S')) (g ` (U \<times> S'))" | 
| 64122 | 2005 | proof (rule inv_of_domain_ss0) | 
| 2006 | show "continuous_on (U \<times> S') g" | |
| 72245 | 2007 | unfolding g_def | 
| 2008 | by (auto intro!: continuous_intros continuous_on_compose2 [OF contf continuous_on_fst]) | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2009 | show "g \<in> (U \<times> S') \<rightarrow> S \<times> S'" | 
| 64122 | 2010 | using fim by (auto simp: g_def) | 
| 2011 | show "inj_on g (U \<times> S')" | |
| 2012 | using injf by (auto simp: g_def inj_on_def) | |
| 2013 | show "subspace (S \<times> S')" | |
| 2014 | by (simp add: \<open>subspace S'\<close> \<open>subspace S\<close> subspace_Times) | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 2015 | show "openin (top_of_set (S \<times> S')) (U \<times> S')" | 
| 64122 | 2016 | by (simp add: openin_Times [OF ope]) | 
| 2017 | have "dim (S \<times> S') = dim S + dim S'" | |
| 2018 | by (simp add: \<open>subspace S'\<close> \<open>subspace S\<close> dim_Times) | |
| 2019 |     also have "... = DIM('a)"
 | |
| 2020 | using dim_subspace_orthogonal_to_vectors [OF \<open>subspace S\<close> subspace_UNIV] | |
| 2021 | by (simp add: add.commute S'_def) | |
| 2022 |     finally show "dim (S \<times> S') = DIM('a)" .
 | |
| 2023 | qed | |
| 2024 | moreover have "g ` (U \<times> S') = f ` U \<times> S'" | |
| 2025 | by (auto simp: g_def image_iff) | |
| 2026 | moreover have "0 \<in> S'" | |
| 2027 | using \<open>subspace S'\<close> subspace_affine by blast | |
| 2028 | ultimately show ?thesis | |
| 2029 | by (auto simp: openin_Times_eq) | |
| 2030 | qed | |
| 2031 | ||
| 2032 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2033 | corollary invariance_of_domain_subspaces: | 
| 64122 | 2034 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 2035 | assumes ope: "openin (top_of_set U) S" | 
| 64122 | 2036 | and "subspace U" "subspace V" and VU: "dim V \<le> dim U" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2037 | and contf: "continuous_on S f" and fim: "f \<in> S \<rightarrow> V" | 
| 64122 | 2038 | and injf: "inj_on f S" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 2039 | shows "openin (top_of_set V) (f ` S)" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2040 | proof - | 
| 64122 | 2041 | obtain V' where "subspace V'" "V' \<subseteq> U" "dim V' = dim V" | 
| 2042 | using choose_subspace_of_subspace [OF VU] | |
| 68072 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 immler parents: 
67968diff
changeset | 2043 | by (metis span_eq_iff \<open>subspace U\<close>) | 
| 64122 | 2044 | then have "V homeomorphic V'" | 
| 2045 | by (simp add: \<open>subspace V\<close> homeomorphic_subspaces) | |
| 2046 | then obtain h k where homhk: "homeomorphism V V' h k" | |
| 2047 | using homeomorphic_def by blast | |
| 2048 | have eq: "f ` S = k ` (h \<circ> f) ` S" | |
| 2049 | proof - | |
| 2050 | have "k ` h ` f ` S = f ` S" | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2051 | by (meson equalityD2 fim funcset_image homeomorphism_image2 homeomorphism_of_subsets homhk) | 
| 64122 | 2052 | then show ?thesis | 
| 2053 | by (simp add: image_comp) | |
| 2054 | qed | |
| 2055 | show ?thesis | |
| 2056 | unfolding eq | |
| 2057 | proof (rule homeomorphism_imp_open_map) | |
| 2058 | show homkh: "homeomorphism V' V k h" | |
| 2059 | by (simp add: homeomorphism_symD homhk) | |
| 2060 | have hfV': "(h \<circ> f) ` S \<subseteq> V'" | |
| 2061 | using fim homeomorphism_image1 homhk by fastforce | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 2062 | moreover have "openin (top_of_set U) ((h \<circ> f) ` S)" | 
| 64122 | 2063 | proof (rule inv_of_domain_ss1) | 
| 2064 | show "continuous_on S (h \<circ> f)" | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2065 | by (meson contf continuous_on_compose continuous_on_subset fim funcset_image homeomorphism_cont2 homkh) | 
| 64122 | 2066 | show "inj_on (h \<circ> f) S" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2067 | by (smt (verit, ccfv_SIG) Pi_iff comp_apply fim homeomorphism_apply2 homkh inj_on_def injf) | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2068 | show "h \<circ> f \<in> S \<rightarrow> U" | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2069 | using \<open>V' \<subseteq> U\<close> hfV' by blast | 
| 64122 | 2070 | qed (auto simp: assms) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 2071 | ultimately show "openin (top_of_set V') ((h \<circ> f) ` S)" | 
| 64122 | 2072 | using openin_subset_trans \<open>V' \<subseteq> U\<close> by force | 
| 2073 | qed | |
| 2074 | qed | |
| 2075 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2076 | corollary invariance_of_dimension_subspaces: | 
| 64122 | 2077 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 2078 | assumes ope: "openin (top_of_set U) S" | 
| 64122 | 2079 | and "subspace U" "subspace V" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2080 | and contf: "continuous_on S f" and fim: "f \<in> S \<rightarrow> V" | 
| 64122 | 2081 |       and injf: "inj_on f S" and "S \<noteq> {}"
 | 
| 2082 | shows "dim U \<le> dim V" | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2083 | proof - | 
| 64122 | 2084 | have "False" if "dim V < dim U" | 
| 2085 | proof - | |
| 2086 | obtain T where "subspace T" "T \<subseteq> U" "dim T = dim V" | |
| 2087 | using choose_subspace_of_subspace [of "dim V" U] | |
| 68072 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 immler parents: 
67968diff
changeset | 2088 | by (metis \<open>dim V < dim U\<close> assms(2) order.strict_implies_order span_eq_iff) | 
| 64122 | 2089 | then have "V homeomorphic T" | 
| 2090 | by (simp add: \<open>subspace V\<close> homeomorphic_subspaces) | |
| 2091 | then obtain h k where homhk: "homeomorphism V T h k" | |
| 2092 | using homeomorphic_def by blast | |
| 2093 | have "continuous_on S (h \<circ> f)" | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2094 | by (meson contf continuous_on_compose continuous_on_subset fim homeomorphism_def homhk image_subset_iff_funcset) | 
| 64122 | 2095 | moreover have "(h \<circ> f) ` S \<subseteq> U" | 
| 2096 | using \<open>T \<subseteq> U\<close> fim homeomorphism_image1 homhk by fastforce | |
| 2097 | moreover have "inj_on (h \<circ> f) S" | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2098 | unfolding inj_on_def | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2099 | by (metis Pi_iff comp_apply fim homeomorphism_def homhk inj_on_def injf) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 2100 | ultimately have ope_hf: "openin (top_of_set U) ((h \<circ> f) ` S)" | 
| 69661 | 2101 | using invariance_of_domain_subspaces [OF ope \<open>subspace U\<close> \<open>subspace U\<close>] by blast | 
| 64122 | 2102 | have "(h \<circ> f) ` S \<subseteq> T" | 
| 2103 | using fim homeomorphism_image1 homhk by fastforce | |
| 69661 | 2104 | then have "dim ((h \<circ> f) ` S) \<le> dim T" | 
| 2105 | by (rule dim_subset) | |
| 2106 | also have "dim ((h \<circ> f) ` S) = dim U" | |
| 2107 |       using \<open>S \<noteq> {}\<close> \<open>subspace U\<close>
 | |
| 2108 | by (blast intro: dim_openin ope_hf) | |
| 2109 | finally show False | |
| 2110 | using \<open>dim V < dim U\<close> \<open>dim T = dim V\<close> by simp | |
| 64122 | 2111 | qed | 
| 2112 | then show ?thesis | |
| 2113 | using not_less by blast | |
| 2114 | qed | |
| 2115 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2116 | corollary invariance_of_domain_affine_sets: | 
| 64122 | 2117 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 2118 | assumes ope: "openin (top_of_set U) S" | 
| 64122 | 2119 | and aff: "affine U" "affine V" "aff_dim V \<le> aff_dim U" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2120 | and contf: "continuous_on S f" and fim: "f \<in> S \<rightarrow> V" | 
| 64122 | 2121 | and injf: "inj_on f S" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 2122 | shows "openin (top_of_set V) (f ` S)" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2123 | proof (cases "S = {}")
 | 
| 64122 | 2124 | case True | 
| 2125 | then show ?thesis by auto | |
| 2126 | next | |
| 2127 | case False | |
| 2128 | obtain a b where "a \<in> S" "a \<in> U" "b \<in> V" | |
| 2129 | using False fim ope openin_contains_cball by fastforce | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 2130 | have "openin (top_of_set ((+) (- b) ` V)) (((+) (- b) \<circ> f \<circ> (+) a) ` (+) (- a) ` S)" | 
| 64122 | 2131 | proof (rule invariance_of_domain_subspaces) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 2132 | show "openin (top_of_set ((+) (- a) ` U)) ((+) (- a) ` S)" | 
| 64122 | 2133 | by (metis ope homeomorphism_imp_open_map homeomorphism_translation translation_galois) | 
| 67399 | 2134 | show "subspace ((+) (- a) ` U)" | 
| 69661 | 2135 | by (simp add: \<open>a \<in> U\<close> affine_diffs_subspace_subtract \<open>affine U\<close> cong: image_cong_simp) | 
| 67399 | 2136 | show "subspace ((+) (- b) ` V)" | 
| 69661 | 2137 | by (simp add: \<open>b \<in> V\<close> affine_diffs_subspace_subtract \<open>affine V\<close> cong: image_cong_simp) | 
| 67399 | 2138 | show "dim ((+) (- b) ` V) \<le> dim ((+) (- a) ` U)" | 
| 64122 | 2139 | by (metis \<open>a \<in> U\<close> \<open>b \<in> V\<close> aff_dim_eq_dim affine_hull_eq aff of_nat_le_iff) | 
| 67399 | 2140 | show "continuous_on ((+) (- a) ` S) ((+) (- b) \<circ> f \<circ> (+) a)" | 
| 64122 | 2141 | by (metis contf continuous_on_compose homeomorphism_cont2 homeomorphism_translation translation_galois) | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2142 | show "(+) (- b) \<circ> f \<circ> (+) a \<in> (+) (- a) ` S \<rightarrow> (+) (- b) ` V" | 
| 64122 | 2143 | using fim by auto | 
| 67399 | 2144 | show "inj_on ((+) (- b) \<circ> f \<circ> (+) a) ((+) (- a) ` S)" | 
| 64122 | 2145 | by (auto simp: inj_on_def) (meson inj_onD injf) | 
| 2146 | qed | |
| 2147 | then show ?thesis | |
| 2148 | by (metis (no_types, lifting) homeomorphism_imp_open_map homeomorphism_translation image_comp translation_galois) | |
| 2149 | qed | |
| 2150 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2151 | corollary invariance_of_dimension_affine_sets: | 
| 64122 | 2152 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 2153 | assumes ope: "openin (top_of_set U) S" | 
| 64122 | 2154 | and aff: "affine U" "affine V" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2155 | and contf: "continuous_on S f" and fim: "f \<in> S \<rightarrow> V" | 
| 64122 | 2156 |       and injf: "inj_on f S" and "S \<noteq> {}"
 | 
| 2157 | shows "aff_dim U \<le> aff_dim V" | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2158 | proof - | 
| 64122 | 2159 | obtain a b where "a \<in> S" "a \<in> U" "b \<in> V" | 
| 2160 |     using \<open>S \<noteq> {}\<close> fim ope openin_contains_cball by fastforce
 | |
| 67399 | 2161 | have "dim ((+) (- a) ` U) \<le> dim ((+) (- b) ` V)" | 
| 64122 | 2162 | proof (rule invariance_of_dimension_subspaces) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 2163 | show "openin (top_of_set ((+) (- a) ` U)) ((+) (- a) ` S)" | 
| 64122 | 2164 | by (metis ope homeomorphism_imp_open_map homeomorphism_translation translation_galois) | 
| 67399 | 2165 | show "subspace ((+) (- a) ` U)" | 
| 69661 | 2166 | by (simp add: \<open>a \<in> U\<close> affine_diffs_subspace_subtract \<open>affine U\<close> cong: image_cong_simp) | 
| 67399 | 2167 | show "subspace ((+) (- b) ` V)" | 
| 69661 | 2168 | by (simp add: \<open>b \<in> V\<close> affine_diffs_subspace_subtract \<open>affine V\<close> cong: image_cong_simp) | 
| 67399 | 2169 | show "continuous_on ((+) (- a) ` S) ((+) (- b) \<circ> f \<circ> (+) a)" | 
| 64122 | 2170 | by (metis contf continuous_on_compose homeomorphism_cont2 homeomorphism_translation translation_galois) | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2171 | show "(+) (- b) \<circ> f \<circ> (+) a \<in> (+) (- a) ` S \<rightarrow> (+) (- b) ` V" | 
| 64122 | 2172 | using fim by auto | 
| 67399 | 2173 | show "inj_on ((+) (- b) \<circ> f \<circ> (+) a) ((+) (- a) ` S)" | 
| 64122 | 2174 | by (auto simp: inj_on_def) (meson inj_onD injf) | 
| 2175 |   qed (use \<open>S \<noteq> {}\<close> in auto)
 | |
| 2176 | then show ?thesis | |
| 2177 | by (metis \<open>a \<in> U\<close> \<open>b \<in> V\<close> aff_dim_eq_dim affine_hull_eq aff of_nat_le_iff) | |
| 2178 | qed | |
| 2179 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2180 | corollary invariance_of_dimension: | 
| 64122 | 2181 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 2182 | assumes contf: "continuous_on S f" and "open S" | |
| 2183 |       and injf: "inj_on f S" and "S \<noteq> {}"
 | |
| 2184 |     shows "DIM('a) \<le> DIM('b)"
 | |
| 70136 | 2185 | using invariance_of_dimension_subspaces [of UNIV S UNIV f] assms | 
| 64122 | 2186 | by auto | 
| 2187 | ||
| 2188 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2189 | corollary continuous_injective_image_subspace_dim_le: | 
| 64122 | 2190 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 2191 | assumes "subspace S" "subspace T" | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2192 | and contf: "continuous_on S f" and fim: "f \<in> S \<rightarrow> T" | 
| 64122 | 2193 | and injf: "inj_on f S" | 
| 2194 | shows "dim S \<le> dim T" | |
| 72245 | 2195 | using invariance_of_dimension_subspaces [of S S _ f] assms by (auto simp: subspace_affine) | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68634diff
changeset | 2196 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2197 | lemma invariance_of_dimension_convex_domain: | 
| 64122 | 2198 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 2199 | assumes "convex S" | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2200 | and contf: "continuous_on S f" and fim: "f \<in> S \<rightarrow> affine hull T" | 
| 64122 | 2201 | and injf: "inj_on f S" | 
| 2202 | shows "aff_dim S \<le> aff_dim T" | |
| 2203 | proof (cases "S = {}")
 | |
| 2204 | case True | |
| 2205 | then show ?thesis by (simp add: aff_dim_geq) | |
| 2206 | next | |
| 2207 | case False | |
| 2208 | have "aff_dim (affine hull S) \<le> aff_dim (affine hull T)" | |
| 2209 | proof (rule invariance_of_dimension_affine_sets) | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 2210 | show "openin (top_of_set (affine hull S)) (rel_interior S)" | 
| 64122 | 2211 | by (simp add: openin_rel_interior) | 
| 2212 | show "continuous_on (rel_interior S) f" | |
| 2213 | using contf continuous_on_subset rel_interior_subset by blast | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2214 | show "f \<in> rel_interior S \<rightarrow> affine hull T" | 
| 64122 | 2215 | using fim rel_interior_subset by blast | 
| 2216 | show "inj_on f (rel_interior S)" | |
| 2217 | using inj_on_subset injf rel_interior_subset by blast | |
| 2218 |     show "rel_interior S \<noteq> {}"
 | |
| 2219 | by (simp add: False \<open>convex S\<close> rel_interior_eq_empty) | |
| 2220 | qed auto | |
| 2221 | then show ?thesis | |
| 2222 | by simp | |
| 2223 | qed | |
| 2224 | ||
| 2225 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2226 | lemma homeomorphic_convex_sets_le: | 
| 64122 | 2227 | assumes "convex S" "S homeomorphic T" | 
| 2228 | shows "aff_dim S \<le> aff_dim T" | |
| 2229 | proof - | |
| 2230 | obtain h k where homhk: "homeomorphism S T h k" | |
| 2231 | using homeomorphic_def assms by blast | |
| 2232 | show ?thesis | |
| 2233 | proof (rule invariance_of_dimension_convex_domain [OF \<open>convex S\<close>]) | |
| 2234 | show "continuous_on S h" | |
| 2235 | using homeomorphism_def homhk by blast | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2236 | show "h \<in> S \<rightarrow> affine hull T" | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2237 | using homeomorphism_image1 homhk hull_subset by fastforce | 
| 64122 | 2238 | show "inj_on h S" | 
| 2239 | by (meson homeomorphism_apply1 homhk inj_on_inverseI) | |
| 2240 | qed | |
| 2241 | qed | |
| 2242 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2243 | lemma homeomorphic_convex_sets: | 
| 64122 | 2244 | assumes "convex S" "convex T" "S homeomorphic T" | 
| 2245 | shows "aff_dim S = aff_dim T" | |
| 2246 | by (meson assms dual_order.antisym homeomorphic_convex_sets_le homeomorphic_sym) | |
| 2247 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2248 | lemma homeomorphic_convex_compact_sets_eq: | 
| 64122 | 2249 | assumes "convex S" "compact S" "convex T" "compact T" | 
| 2250 | shows "S homeomorphic T \<longleftrightarrow> aff_dim S = aff_dim T" | |
| 2251 | by (meson assms homeomorphic_convex_compact_sets homeomorphic_convex_sets) | |
| 2252 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2253 | lemma invariance_of_domain_gen: | 
| 64122 | 2254 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 2255 |   assumes "open S" "continuous_on S f" "inj_on f S" "DIM('b) \<le> DIM('a)"
 | |
| 2256 | shows "open(f ` S)" | |
| 2257 | using invariance_of_domain_subspaces [of UNIV S UNIV f] assms by auto | |
| 2258 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2259 | lemma injective_into_1d_imp_open_map_UNIV: | 
| 64122 | 2260 | fixes f :: "'a::euclidean_space \<Rightarrow> real" | 
| 2261 | assumes "open T" "continuous_on S f" "inj_on f S" "T \<subseteq> S" | |
| 76944 | 2262 | shows "open (f ` T)" | 
| 2263 | proof - | |
| 2264 |   have "DIM(real) \<le> DIM('a)"
 | |
| 2265 | by simp | |
| 2266 | then show ?thesis | |
| 2267 | using invariance_of_domain_gen assms continuous_on_subset subset_inj_on by metis | |
| 2268 | qed | |
| 64122 | 2269 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2270 | lemma continuous_on_inverse_open: | 
| 64122 | 2271 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 2272 |   assumes "open S" "continuous_on S f" "DIM('b) \<le> DIM('a)" and gf: "\<And>x. x \<in> S \<Longrightarrow> g(f x) = x"
 | |
| 2273 | shows "continuous_on (f ` S) g" | |
| 2274 | proof (clarsimp simp add: continuous_openin_preimage_eq) | |
| 2275 | fix T :: "'a set" | |
| 2276 | assume "open T" | |
| 66884 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 2277 | have eq: "f ` S \<inter> g -` T = f ` (S \<inter> T)" | 
| 64122 | 2278 | by (auto simp: gf) | 
| 72245 | 2279 | have "open (f ` S)" | 
| 2280 | by (rule invariance_of_domain_gen) (use assms inj_on_inverseI in auto) | |
| 2281 | moreover have "open (f ` (S \<inter> T))" | |
| 64122 | 2282 | using assms | 
| 2283 | by (metis \<open>open T\<close> continuous_on_subset inj_onI inj_on_subset invariance_of_domain_gen openin_open openin_open_eq) | |
| 72245 | 2284 | ultimately show "openin (top_of_set (f ` S)) (f ` S \<inter> g -` T)" | 
| 2285 | unfolding eq by (auto intro: open_openin_trans) | |
| 64122 | 2286 | qed | 
| 2287 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2288 | lemma invariance_of_domain_homeomorphism: | 
| 64122 | 2289 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 2290 |   assumes "open S" "continuous_on S f" "DIM('b) \<le> DIM('a)" "inj_on f S"
 | |
| 2291 | obtains g where "homeomorphism S (f ` S) f g" | |
| 2292 | proof | |
| 2293 | show "homeomorphism S (f ` S) f (inv_into S f)" | |
| 2294 | by (simp add: assms continuous_on_inverse_open homeomorphism_def) | |
| 2295 | qed | |
| 2296 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2297 | corollary invariance_of_domain_homeomorphic: | 
| 64122 | 2298 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 2299 |   assumes "open S" "continuous_on S f" "DIM('b) \<le> DIM('a)" "inj_on f S"
 | |
| 2300 | shows "S homeomorphic (f ` S)" | |
| 70136 | 2301 | using invariance_of_domain_homeomorphism [OF assms] | 
| 2302 | by (meson homeomorphic_def) | |
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68634diff
changeset | 2303 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2304 | lemma continuous_image_subset_interior: | 
| 64287 | 2305 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 2306 |   assumes "continuous_on S f" "inj_on f S" "DIM('b) \<le> DIM('a)"
 | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2307 | shows "f \<in> (interior S) \<rightarrow> interior(f ` S)" | 
| 72245 | 2308 | proof - | 
| 2309 | have "open (f ` interior S)" | |
| 2310 | using assms | |
| 2311 | by (intro invariance_of_domain_gen) (auto simp: subset_inj_on interior_subset continuous_on_subset) | |
| 2312 | then show ?thesis | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2313 | by (simp add: image_mono interiorI interior_subset) | 
| 72245 | 2314 | qed | 
| 64287 | 2315 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2316 | lemma homeomorphic_interiors_same_dimension: | 
| 64287 | 2317 | fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set" | 
| 2318 |   assumes "S homeomorphic T" and dimeq: "DIM('a) = DIM('b)"
 | |
| 2319 | shows "(interior S) homeomorphic (interior T)" | |
| 2320 | using assms [unfolded homeomorphic_minimal] | |
| 2321 | unfolding homeomorphic_def | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2322 | proof (clarify elim!: ex_forward) | 
| 64287 | 2323 | fix f g | 
| 2324 | assume S: "\<forall>x\<in>S. f x \<in> T \<and> g (f x) = x" and T: "\<forall>y\<in>T. g y \<in> S \<and> f (g y) = y" | |
| 2325 | and contf: "continuous_on S f" and contg: "continuous_on T g" | |
| 2326 | then have fST: "f ` S = T" and gTS: "g ` T = S" and "inj_on f S" "inj_on g T" | |
| 2327 | by (auto simp: inj_on_def intro: rev_image_eqI) metis+ | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2328 | have fim: "f \<in> interior S \<rightarrow> interior T" | 
| 64287 | 2329 | using continuous_image_subset_interior [OF contf \<open>inj_on f S\<close>] dimeq fST by simp | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2330 | have gim: "g \<in> interior T \<rightarrow> interior S" | 
| 64287 | 2331 | using continuous_image_subset_interior [OF contg \<open>inj_on g T\<close>] dimeq gTS by simp | 
| 2332 | show "homeomorphism (interior S) (interior T) f g" | |
| 2333 | unfolding homeomorphism_def | |
| 2334 | proof (intro conjI ballI) | |
| 2335 | show "\<And>x. x \<in> interior S \<Longrightarrow> g (f x) = x" | |
| 2336 | by (meson \<open>\<forall>x\<in>S. f x \<in> T \<and> g (f x) = x\<close> subsetD interior_subset) | |
| 2337 | have "interior T \<subseteq> f ` interior S" | |
| 2338 | proof | |
| 2339 | fix x assume "x \<in> interior T" | |
| 2340 | then have "g x \<in> interior S" | |
| 2341 | using gim by blast | |
| 2342 | then show "x \<in> f ` interior S" | |
| 2343 | by (metis T \<open>x \<in> interior T\<close> image_iff interior_subset subsetCE) | |
| 2344 | qed | |
| 2345 | then show "f ` interior S = interior T" | |
| 2346 | using fim by blast | |
| 2347 | show "continuous_on (interior S) f" | |
| 2348 | by (metis interior_subset continuous_on_subset contf) | |
| 2349 | show "\<And>y. y \<in> interior T \<Longrightarrow> f (g y) = y" | |
| 2350 | by (meson T subsetD interior_subset) | |
| 2351 | have "interior S \<subseteq> g ` interior T" | |
| 2352 | proof | |
| 2353 | fix x assume "x \<in> interior S" | |
| 2354 | then have "f x \<in> interior T" | |
| 2355 | using fim by blast | |
| 2356 | then show "x \<in> g ` interior T" | |
| 2357 | by (metis S \<open>x \<in> interior S\<close> image_iff interior_subset subsetCE) | |
| 2358 | qed | |
| 2359 | then show "g ` interior T = interior S" | |
| 2360 | using gim by blast | |
| 2361 | show "continuous_on (interior T) g" | |
| 2362 | by (metis interior_subset continuous_on_subset contg) | |
| 2363 | qed | |
| 2364 | qed | |
| 2365 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2366 | lemma homeomorphic_open_imp_same_dimension: | 
| 64287 | 2367 | fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set" | 
| 2368 |   assumes "S homeomorphic T" "open S" "S \<noteq> {}" "open T" "T \<noteq> {}"
 | |
| 2369 |   shows "DIM('a) = DIM('b)"
 | |
| 76944 | 2370 | using assms | 
| 64287 | 2371 | apply (simp add: homeomorphic_minimal) | 
| 2372 | apply (rule order_antisym; metis inj_onI invariance_of_dimension) | |
| 2373 | done | |
| 2374 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2375 | proposition homeomorphic_interiors: | 
| 64287 | 2376 | fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set" | 
| 2377 |   assumes "S homeomorphic T" "interior S = {} \<longleftrightarrow> interior T = {}"
 | |
| 2378 | shows "(interior S) homeomorphic (interior T)" | |
| 2379 | proof (cases "interior T = {}")
 | |
| 2380 | case False | |
| 2381 |   then have "DIM('a) = DIM('b)"
 | |
| 2382 | using assms | |
| 2383 | apply (simp add: homeomorphic_minimal) | |
| 2384 | apply (rule order_antisym; metis continuous_on_subset inj_onI inj_on_subset interior_subset invariance_of_dimension open_interior) | |
| 2385 | done | |
| 2386 | then show ?thesis | |
| 2387 | by (rule homeomorphic_interiors_same_dimension [OF \<open>S homeomorphic T\<close>]) | |
| 76944 | 2388 | qed (use assms in auto) | 
| 64287 | 2389 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2390 | lemma homeomorphic_frontiers_same_dimension: | 
| 64287 | 2391 | fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set" | 
| 2392 |   assumes "S homeomorphic T" "closed S" "closed T" and dimeq: "DIM('a) = DIM('b)"
 | |
| 2393 | shows "(frontier S) homeomorphic (frontier T)" | |
| 2394 | using assms [unfolded homeomorphic_minimal] | |
| 2395 | unfolding homeomorphic_def | |
| 2396 | proof (clarify elim!: ex_forward) | |
| 2397 | fix f g | |
| 2398 | assume S: "\<forall>x\<in>S. f x \<in> T \<and> g (f x) = x" and T: "\<forall>y\<in>T. g y \<in> S \<and> f (g y) = y" | |
| 2399 | and contf: "continuous_on S f" and contg: "continuous_on T g" | |
| 2400 | then have fST: "f ` S = T" and gTS: "g ` T = S" and "inj_on f S" "inj_on g T" | |
| 2401 | by (auto simp: inj_on_def intro: rev_image_eqI) metis+ | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2402 | have "g \<in> interior T \<rightarrow> interior S" | 
| 64287 | 2403 | using continuous_image_subset_interior [OF contg \<open>inj_on g T\<close>] dimeq gTS by simp | 
| 2404 | then have fim: "f ` frontier S \<subseteq> frontier T" | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2405 | unfolding frontier_def using Pi_mem S assms by fastforce | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2406 | have "f \<in> interior S \<rightarrow> interior T" | 
| 64287 | 2407 | using continuous_image_subset_interior [OF contf \<open>inj_on f S\<close>] dimeq fST by simp | 
| 2408 | then have gim: "g ` frontier T \<subseteq> frontier S" | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2409 | unfolding frontier_def using Pi_mem T assms by fastforce | 
| 64287 | 2410 | show "homeomorphism (frontier S) (frontier T) f g" | 
| 2411 | unfolding homeomorphism_def | |
| 2412 | proof (intro conjI ballI) | |
| 2413 | show gf: "\<And>x. x \<in> frontier S \<Longrightarrow> g (f x) = x" | |
| 2414 | by (simp add: S assms(2) frontier_def) | |
| 2415 | show fg: "\<And>y. y \<in> frontier T \<Longrightarrow> f (g y) = y" | |
| 2416 | by (simp add: T assms(3) frontier_def) | |
| 2417 | have "frontier T \<subseteq> f ` frontier S" | |
| 2418 | proof | |
| 2419 | fix x assume "x \<in> frontier T" | |
| 2420 | then have "g x \<in> frontier S" | |
| 2421 | using gim by blast | |
| 2422 | then show "x \<in> f ` frontier S" | |
| 2423 | by (metis fg \<open>x \<in> frontier T\<close> imageI) | |
| 2424 | qed | |
| 2425 | then show "f ` frontier S = frontier T" | |
| 2426 | using fim by blast | |
| 2427 | show "continuous_on (frontier S) f" | |
| 2428 | by (metis Diff_subset assms(2) closure_eq contf continuous_on_subset frontier_def) | |
| 2429 | have "frontier S \<subseteq> g ` frontier T" | |
| 2430 | proof | |
| 2431 | fix x assume "x \<in> frontier S" | |
| 2432 | then have "f x \<in> frontier T" | |
| 2433 | using fim by blast | |
| 2434 | then show "x \<in> g ` frontier T" | |
| 2435 | by (metis gf \<open>x \<in> frontier S\<close> imageI) | |
| 2436 | qed | |
| 2437 | then show "g ` frontier T = frontier S" | |
| 2438 | using gim by blast | |
| 2439 | show "continuous_on (frontier T) g" | |
| 2440 | by (metis Diff_subset assms(3) closure_closed contg continuous_on_subset frontier_def) | |
| 2441 | qed | |
| 2442 | qed | |
| 2443 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2444 | lemma homeomorphic_frontiers: | 
| 64287 | 2445 | fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set" | 
| 2446 | assumes "S homeomorphic T" "closed S" "closed T" | |
| 2447 |           "interior S = {} \<longleftrightarrow> interior T = {}"
 | |
| 2448 | shows "(frontier S) homeomorphic (frontier T)" | |
| 2449 | proof (cases "interior T = {}")
 | |
| 2450 | case True | |
| 2451 | then show ?thesis | |
| 2452 | by (metis Diff_empty assms closure_eq frontier_def) | |
| 2453 | next | |
| 2454 | case False | |
| 72245 | 2455 |   then have "DIM('a) = DIM('b)"
 | 
| 2456 | using assms homeomorphic_interiors homeomorphic_open_imp_same_dimension by blast | |
| 2457 | then show ?thesis | |
| 2458 | using assms homeomorphic_frontiers_same_dimension by blast | |
| 64287 | 2459 | qed | 
| 2460 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2461 | lemma continuous_image_subset_rel_interior: | 
| 64287 | 2462 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2463 | assumes contf: "continuous_on S f" and injf: "inj_on f S" and fim: "f \<in> S \<rightarrow> T" | 
| 64287 | 2464 | and TS: "aff_dim T \<le> aff_dim S" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2465 | shows "f \<in> (rel_interior S) \<rightarrow> rel_interior(f ` S)" | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2466 | unfolding image_subset_iff_funcset [symmetric] | 
| 64287 | 2467 | proof (rule rel_interior_maximal) | 
| 2468 | show "f ` rel_interior S \<subseteq> f ` S" | |
| 2469 | by(simp add: image_mono rel_interior_subset) | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 2470 | show "openin (top_of_set (affine hull f ` S)) (f ` rel_interior S)" | 
| 64287 | 2471 | proof (rule invariance_of_domain_affine_sets) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 2472 | show "openin (top_of_set (affine hull S)) (rel_interior S)" | 
| 64287 | 2473 | by (simp add: openin_rel_interior) | 
| 2474 | show "aff_dim (affine hull f ` S) \<le> aff_dim (affine hull S)" | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2475 | by (metis TS aff_dim_affine_hull aff_dim_subset fim image_subset_iff_funcset order_trans) | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2476 | show "f \<in> rel_interior S \<rightarrow> affine hull f ` S" | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2477 | using \<open>f ` rel_interior S \<subseteq> f ` S\<close> hull_subset by fastforce | 
| 64287 | 2478 | show "continuous_on (rel_interior S) f" | 
| 2479 | using contf continuous_on_subset rel_interior_subset by blast | |
| 2480 | show "inj_on f (rel_interior S)" | |
| 2481 | using inj_on_subset injf rel_interior_subset by blast | |
| 2482 | qed auto | |
| 2483 | qed | |
| 2484 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2485 | lemma homeomorphic_rel_interiors_same_dimension: | 
| 64287 | 2486 | fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set" | 
| 2487 | assumes "S homeomorphic T" and aff: "aff_dim S = aff_dim T" | |
| 2488 | shows "(rel_interior S) homeomorphic (rel_interior T)" | |
| 2489 | using assms [unfolded homeomorphic_minimal] | |
| 2490 | unfolding homeomorphic_def | |
| 2491 | proof (clarify elim!: ex_forward) | |
| 2492 | fix f g | |
| 2493 | assume S: "\<forall>x\<in>S. f x \<in> T \<and> g (f x) = x" and T: "\<forall>y\<in>T. g y \<in> S \<and> f (g y) = y" | |
| 2494 | and contf: "continuous_on S f" and contg: "continuous_on T g" | |
| 2495 | then have fST: "f ` S = T" and gTS: "g ` T = S" and "inj_on f S" "inj_on g T" | |
| 2496 | by (auto simp: inj_on_def intro: rev_image_eqI) metis+ | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2497 | have fim: "f \<in> rel_interior S \<rightarrow> rel_interior T" | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2498 | by (smt (verit, best) PiE Pi_I S \<open>inj_on f S\<close> aff contf continuous_image_subset_rel_interior fST) | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2499 | have gim: "g \<in> rel_interior T \<rightarrow> rel_interior S" | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2500 | by (metis T \<open>inj_on g T\<close> aff contg continuous_image_subset_rel_interior dual_order.refl funcsetI gTS) | 
| 64287 | 2501 | show "homeomorphism (rel_interior S) (rel_interior T) f g" | 
| 2502 | unfolding homeomorphism_def | |
| 2503 | proof (intro conjI ballI) | |
| 2504 | show gf: "\<And>x. x \<in> rel_interior S \<Longrightarrow> g (f x) = x" | |
| 2505 | using S rel_interior_subset by blast | |
| 2506 | show fg: "\<And>y. y \<in> rel_interior T \<Longrightarrow> f (g y) = y" | |
| 2507 | using T mem_rel_interior_ball by blast | |
| 2508 | have "rel_interior T \<subseteq> f ` rel_interior S" | |
| 2509 | proof | |
| 2510 | fix x assume "x \<in> rel_interior T" | |
| 2511 | then have "g x \<in> rel_interior S" | |
| 2512 | using gim by blast | |
| 2513 | then show "x \<in> f ` rel_interior S" | |
| 2514 | by (metis fg \<open>x \<in> rel_interior T\<close> imageI) | |
| 2515 | qed | |
| 2516 | moreover have "f ` rel_interior S \<subseteq> rel_interior T" | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2517 | using fim by blast | 
| 64287 | 2518 | ultimately show "f ` rel_interior S = rel_interior T" | 
| 2519 | by blast | |
| 2520 | show "continuous_on (rel_interior S) f" | |
| 2521 | using contf continuous_on_subset rel_interior_subset by blast | |
| 2522 | have "rel_interior S \<subseteq> g ` rel_interior T" | |
| 2523 | proof | |
| 2524 | fix x assume "x \<in> rel_interior S" | |
| 2525 | then have "f x \<in> rel_interior T" | |
| 2526 | using fim by blast | |
| 2527 | then show "x \<in> g ` rel_interior T" | |
| 2528 | by (metis gf \<open>x \<in> rel_interior S\<close> imageI) | |
| 2529 | qed | |
| 2530 | then show "g ` rel_interior T = rel_interior S" | |
| 2531 | using gim by blast | |
| 2532 | show "continuous_on (rel_interior T) g" | |
| 2533 | using contg continuous_on_subset rel_interior_subset by blast | |
| 2534 | qed | |
| 2535 | qed | |
| 2536 | ||
| 72245 | 2537 | |
| 2538 | lemma homeomorphic_aff_dim_le: | |
| 2539 | fixes S :: "'a::euclidean_space set" | |
| 2540 |   assumes "S homeomorphic T" "rel_interior S \<noteq> {}"
 | |
| 2541 | shows "aff_dim (affine hull S) \<le> aff_dim (affine hull T)" | |
| 2542 | proof - | |
| 2543 | obtain f g | |
| 2544 | where S: "\<forall>x\<in>S. f x \<in> T \<and> g (f x) = x" and T: "\<forall>y\<in>T. g y \<in> S \<and> f (g y) = y" | |
| 2545 | and contf: "continuous_on S f" and contg: "continuous_on T g" | |
| 2546 | using assms [unfolded homeomorphic_minimal] by auto | |
| 2547 | show ?thesis | |
| 2548 | proof (rule invariance_of_dimension_affine_sets) | |
| 2549 | show "continuous_on (rel_interior S) f" | |
| 2550 | using contf continuous_on_subset rel_interior_subset by blast | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2551 | show "f \<in> rel_interior S \<rightarrow> affine hull T" | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2552 | by (simp add: S hull_inc mem_rel_interior_ball) | 
| 72245 | 2553 | show "inj_on f (rel_interior S)" | 
| 2554 | by (metis S inj_on_inverseI inj_on_subset rel_interior_subset) | |
| 2555 | qed (simp_all add: openin_rel_interior assms) | |
| 2556 | qed | |
| 2557 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2558 | lemma homeomorphic_rel_interiors: | 
| 64287 | 2559 | fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set" | 
| 2560 |   assumes "S homeomorphic T" "rel_interior S = {} \<longleftrightarrow> rel_interior T = {}"
 | |
| 2561 | shows "(rel_interior S) homeomorphic (rel_interior T)" | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2562 | proof (cases "rel_interior T = {}")
 | 
| 64287 | 2563 | case True | 
| 2564 | with assms show ?thesis by auto | |
| 2565 | next | |
| 2566 | case False | |
| 2567 | have "aff_dim (affine hull S) \<le> aff_dim (affine hull T)" | |
| 72245 | 2568 | using False assms homeomorphic_aff_dim_le by blast | 
| 64287 | 2569 | moreover have "aff_dim (affine hull T) \<le> aff_dim (affine hull S)" | 
| 72245 | 2570 | using False assms(1) homeomorphic_aff_dim_le homeomorphic_sym by auto | 
| 64287 | 2571 | ultimately have "aff_dim S = aff_dim T" by force | 
| 2572 | then show ?thesis | |
| 2573 | by (rule homeomorphic_rel_interiors_same_dimension [OF \<open>S homeomorphic T\<close>]) | |
| 2574 | qed | |
| 2575 | ||
| 2576 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2577 | lemma homeomorphic_rel_boundaries_same_dimension: | 
| 64287 | 2578 | fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set" | 
| 2579 | assumes "S homeomorphic T" and aff: "aff_dim S = aff_dim T" | |
| 2580 | shows "(S - rel_interior S) homeomorphic (T - rel_interior T)" | |
| 2581 | using assms [unfolded homeomorphic_minimal] | |
| 2582 | unfolding homeomorphic_def | |
| 2583 | proof (clarify elim!: ex_forward) | |
| 2584 | fix f g | |
| 2585 | assume S: "\<forall>x\<in>S. f x \<in> T \<and> g (f x) = x" and T: "\<forall>y\<in>T. g y \<in> S \<and> f (g y) = y" | |
| 2586 | and contf: "continuous_on S f" and contg: "continuous_on T g" | |
| 2587 | then have fST: "f ` S = T" and gTS: "g ` T = S" and "inj_on f S" "inj_on g T" | |
| 2588 | by (auto simp: inj_on_def intro: rev_image_eqI) metis+ | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2589 | have fim: "f \<in> rel_interior S \<rightarrow> rel_interior T" | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2590 | by (metis \<open>inj_on f S\<close> aff contf continuous_image_subset_rel_interior dual_order.refl fST image_subset_iff_funcset) | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2591 | have gim: "g \<in> rel_interior T \<rightarrow> rel_interior S" | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2592 | by (metis \<open>inj_on g T\<close> aff contg continuous_image_subset_rel_interior dual_order.refl gTS image_subset_iff_funcset) | 
| 64287 | 2593 | show "homeomorphism (S - rel_interior S) (T - rel_interior T) f g" | 
| 2594 | unfolding homeomorphism_def | |
| 2595 | proof (intro conjI ballI) | |
| 2596 | show gf: "\<And>x. x \<in> S - rel_interior S \<Longrightarrow> g (f x) = x" | |
| 2597 | using S rel_interior_subset by blast | |
| 2598 | show fg: "\<And>y. y \<in> T - rel_interior T \<Longrightarrow> f (g y) = y" | |
| 2599 | using T mem_rel_interior_ball by blast | |
| 2600 | show "f ` (S - rel_interior S) = T - rel_interior T" | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2601 | using S fST fim gim image_subset_iff_funcset by fastforce | 
| 64287 | 2602 | show "continuous_on (S - rel_interior S) f" | 
| 2603 | using contf continuous_on_subset rel_interior_subset by blast | |
| 2604 | show "g ` (T - rel_interior T) = S - rel_interior S" | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2605 | using T gTS gim fim image_subset_iff_funcset by fastforce | 
| 64287 | 2606 | show "continuous_on (T - rel_interior T) g" | 
| 2607 | using contg continuous_on_subset rel_interior_subset by blast | |
| 2608 | qed | |
| 2609 | qed | |
| 2610 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2611 | lemma homeomorphic_rel_boundaries: | 
| 64287 | 2612 | fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set" | 
| 2613 |   assumes "S homeomorphic T" "rel_interior S = {} \<longleftrightarrow> rel_interior T = {}"
 | |
| 2614 | shows "(S - rel_interior S) homeomorphic (T - rel_interior T)" | |
| 2615 | proof (cases "rel_interior T = {}")
 | |
| 2616 | case True | |
| 2617 | with assms show ?thesis by auto | |
| 2618 | next | |
| 2619 | case False | |
| 2620 | obtain f g | |
| 2621 | where S: "\<forall>x\<in>S. f x \<in> T \<and> g (f x) = x" and T: "\<forall>y\<in>T. g y \<in> S \<and> f (g y) = y" | |
| 2622 | and contf: "continuous_on S f" and contg: "continuous_on T g" | |
| 76944 | 2623 | using assms by (auto simp: homeomorphic_minimal) | 
| 64287 | 2624 | have "aff_dim (affine hull S) \<le> aff_dim (affine hull T)" | 
| 72245 | 2625 | using False assms homeomorphic_aff_dim_le by blast | 
| 64287 | 2626 | moreover have "aff_dim (affine hull T) \<le> aff_dim (affine hull S)" | 
| 72245 | 2627 | by (meson False assms(1) homeomorphic_aff_dim_le homeomorphic_sym) | 
| 64287 | 2628 | ultimately have "aff_dim S = aff_dim T" by force | 
| 2629 | then show ?thesis | |
| 2630 | by (rule homeomorphic_rel_boundaries_same_dimension [OF \<open>S homeomorphic T\<close>]) | |
| 2631 | qed | |
| 2632 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2633 | proposition uniformly_continuous_homeomorphism_UNIV_trivial: | 
| 64287 | 2634 | fixes f :: "'a::euclidean_space \<Rightarrow> 'a" | 
| 2635 | assumes contf: "uniformly_continuous_on S f" and hom: "homeomorphism S UNIV f g" | |
| 2636 | shows "S = UNIV" | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2637 | proof (cases "S = {}")
 | 
| 64287 | 2638 | case True | 
| 2639 | then show ?thesis | |
| 2640 | by (metis UNIV_I hom empty_iff homeomorphism_def image_eqI) | |
| 2641 | next | |
| 2642 | case False | |
| 2643 | have "inj g" | |
| 2644 | by (metis UNIV_I hom homeomorphism_apply2 injI) | |
| 2645 | then have "open (g ` UNIV)" | |
| 2646 | by (blast intro: invariance_of_domain hom homeomorphism_cont2) | |
| 2647 | then have "open S" | |
| 2648 | using hom homeomorphism_image2 by blast | |
| 2649 | moreover have "complete S" | |
| 2650 | unfolding complete_def | |
| 2651 | proof clarify | |
| 2652 | fix \<sigma> | |
| 2653 | assume \<sigma>: "\<forall>n. \<sigma> n \<in> S" and "Cauchy \<sigma>" | |
| 2654 | have "Cauchy (f o \<sigma>)" | |
| 78131 
1cadc477f644
Even more material from the HOL Light metric space library
 paulson <lp15@cam.ac.uk> parents: 
77935diff
changeset | 2655 | using uniformly_continuous_imp_Cauchy_continuous \<open>Cauchy \<sigma>\<close> \<sigma> contf | 
| 
1cadc477f644
Even more material from the HOL Light metric space library
 paulson <lp15@cam.ac.uk> parents: 
77935diff
changeset | 2656 | unfolding Cauchy_continuous_on_def by blast | 
| 64287 | 2657 | then obtain l where "(f \<circ> \<sigma>) \<longlonglongrightarrow> l" | 
| 2658 | by (auto simp: convergent_eq_Cauchy [symmetric]) | |
| 2659 | show "\<exists>l\<in>S. \<sigma> \<longlonglongrightarrow> l" | |
| 2660 | proof | |
| 2661 | show "g l \<in> S" | |
| 2662 | using hom homeomorphism_image2 by blast | |
| 2663 | have "(g \<circ> (f \<circ> \<sigma>)) \<longlonglongrightarrow> g l" | |
| 2664 | by (meson UNIV_I \<open>(f \<circ> \<sigma>) \<longlonglongrightarrow> l\<close> continuous_on_sequentially hom homeomorphism_cont2) | |
| 2665 | then show "\<sigma> \<longlonglongrightarrow> g l" | |
| 2666 | proof - | |
| 2667 | have "\<forall>n. \<sigma> n = (g \<circ> (f \<circ> \<sigma>)) n" | |
| 2668 | by (metis (no_types) \<sigma> comp_eq_dest_lhs hom homeomorphism_apply1) | |
| 2669 | then show ?thesis | |
| 2670 | by (metis (no_types) LIMSEQ_iff \<open>(g \<circ> (f \<circ> \<sigma>)) \<longlonglongrightarrow> g l\<close>) | |
| 2671 | qed | |
| 2672 | qed | |
| 2673 | qed | |
| 2674 | then have "closed S" | |
| 2675 | by (simp add: complete_eq_closed) | |
| 2676 | ultimately show ?thesis | |
| 2677 | using clopen [of S] False by simp | |
| 2678 | qed | |
| 2679 | ||
| 71001 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2680 | subsection\<open>Formulation of loop homotopy in terms of maps out of type complex\<close> | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2681 | |
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2682 | lemma homotopic_circlemaps_imp_homotopic_loops: | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2683 | assumes "homotopic_with_canon (\<lambda>h. True) (sphere 0 1) S f g" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2684 | shows "homotopic_loops S (f \<circ> exp \<circ> (\<lambda>t. 2 * of_real pi * of_real t * \<i>)) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2685 | (g \<circ> exp \<circ> (\<lambda>t. 2 * of_real pi * of_real t * \<i>))" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2686 | proof - | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2687 |   have "homotopic_with_canon (\<lambda>f. True) {z. cmod z = 1} S f g"
 | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2688 | using assms by (auto simp: sphere_def) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2689 |   moreover have "continuous_on {0..1} (exp \<circ> (\<lambda>t. 2 * of_real pi * of_real t * \<i>))"
 | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2690 | by (intro continuous_intros) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2691 |   moreover have "(exp \<circ> (\<lambda>t. 2 * of_real pi * of_real t * \<i>)) ` {0..1} \<subseteq> {z. cmod z = 1}"
 | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2692 | by (auto simp: norm_mult) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2693 | ultimately | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2694 | show ?thesis | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2695 | apply (simp add: homotopic_loops_def comp_assoc) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2696 | apply (rule homotopic_with_compose_continuous_right) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2697 | apply (auto simp: pathstart_def pathfinish_def) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2698 | done | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2699 | qed | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2700 | |
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2701 | lemma homotopic_loops_imp_homotopic_circlemaps: | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2702 | assumes "homotopic_loops S p q" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2703 | shows "homotopic_with_canon (\<lambda>h. True) (sphere 0 1) S | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2704 | (p \<circ> (\<lambda>z. (Arg2pi z / (2 * pi)))) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2705 | (q \<circ> (\<lambda>z. (Arg2pi z / (2 * pi))))" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2706 | proof - | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2707 |   obtain h where conth: "continuous_on ({0..1::real} \<times> {0..1}) h"
 | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2708 |              and him: "h \<in> ({0..1} \<times> {0..1}) \<rightarrow> S"
 | 
| 71001 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2709 | and h0: "(\<forall>x. h (0, x) = p x)" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2710 | and h1: "(\<forall>x. h (1, x) = q x)" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2711 |              and h01: "(\<forall>t\<in>{0..1}. h (t, 1) = h (t, 0)) "
 | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2712 | using assms | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2713 | by (auto simp: homotopic_loops_def sphere_def homotopic_with_def pathstart_def pathfinish_def) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2714 | define j where "j \<equiv> \<lambda>z. if 0 \<le> Im (snd z) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2715 | then h (fst z, Arg2pi (snd z) / (2 * pi)) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2716 | else h (fst z, 1 - Arg2pi (cnj (snd z)) / (2 * pi))" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2717 | have Arg2pi_eq: "1 - Arg2pi (cnj y) / (2 * pi) = Arg2pi y / (2 * pi) \<or> Arg2pi y = 0 \<and> Arg2pi (cnj y) = 0" if "cmod y = 1" for y | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2718 | using that Arg2pi_eq_0_pi Arg2pi_eq_pi by (force simp: Arg2pi_cnj field_split_simps) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2719 | show ?thesis | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2720 | proof (simp add: homotopic_with; intro conjI ballI exI) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2721 |     show "continuous_on ({0..1} \<times> sphere 0 1) (\<lambda>w. h (fst w, Arg2pi (snd w) / (2 * pi)))"
 | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2722 | proof (rule continuous_on_eq) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2723 |       show j: "j x = h (fst x, Arg2pi (snd x) / (2 * pi))" if "x \<in> {0..1} \<times> sphere 0 1" for x
 | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2724 | using Arg2pi_eq that h01 by (force simp: j_def) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2725 |       have eq:  "S = S \<inter> (UNIV \<times> {z. 0 \<le> Im z}) \<union> S \<inter> (UNIV \<times> {z. Im z \<le> 0})" for S :: "(real*complex)set"
 | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2726 | by auto | 
| 76944 | 2727 | have \<section>: "Arg2pi z \<le> 2 * pi" for z | 
| 2728 | by (simp add: Arg2pi order_le_less) | |
| 71001 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2729 |       have c1: "continuous_on ({0..1} \<times> sphere 0 1 \<inter> UNIV \<times> {z. 0 \<le> Im z}) (\<lambda>x. h (fst x, Arg2pi (snd x) / (2 * pi)))"
 | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2730 | apply (intro continuous_intros continuous_on_compose2 [OF conth] continuous_on_compose2 [OF continuous_on_upperhalf_Arg2pi]) | 
| 76944 | 2731 | by (auto simp: Arg2pi \<section>) | 
| 71001 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2732 |       have c2: "continuous_on ({0..1} \<times> sphere 0 1 \<inter> UNIV \<times> {z. Im z \<le> 0}) (\<lambda>x. h (fst x, 1 - Arg2pi (cnj (snd x)) / (2 * pi)))"
 | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2733 | apply (intro continuous_intros continuous_on_compose2 [OF conth] continuous_on_compose2 [OF continuous_on_upperhalf_Arg2pi]) | 
| 76944 | 2734 | by (auto simp: Arg2pi \<section>) | 
| 71001 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2735 |       show "continuous_on ({0..1} \<times> sphere 0 1) j"
 | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2736 | apply (simp add: j_def) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2737 | apply (subst eq) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2738 | apply (rule continuous_on_cases_local) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2739 | using Arg2pi_eq h01 | 
| 72245 | 2740 | by (force simp add: eq [symmetric] closedin_closed_Int closed_Times closed_halfspace_Im_le closed_halfspace_Im_ge c1 c2)+ | 
| 71001 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2741 | qed | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2742 |     have "(\<lambda>w. h (fst w, Arg2pi (snd w) / (2 * pi))) ` ({0..1} \<times> sphere 0 1) \<subseteq> h ` ({0..1} \<times> {0..1})"
 | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2743 | by (auto simp: Arg2pi_ge_0 Arg2pi_lt_2pi less_imp_le) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2744 | also have "... \<subseteq> S" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2745 | using him by blast | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2746 |     finally show "(\<lambda>w. h (fst w, Arg2pi (snd w) / (2 * pi))) ` ({0..1} \<times> sphere 0 1) \<subseteq> S" .
 | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2747 | qed (auto simp: h0 h1) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2748 | qed | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2749 | |
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2750 | lemma simply_connected_homotopic_loops: | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2751 | "simply_connected S \<longleftrightarrow> | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2752 | (\<forall>p q. homotopic_loops S p p \<and> homotopic_loops S q q \<longrightarrow> homotopic_loops S p q)" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2753 | unfolding simply_connected_def using homotopic_loops_refl by metis | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2754 | |
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2755 | |
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2756 | lemma simply_connected_eq_homotopic_circlemaps1: | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2757 | fixes f :: "complex \<Rightarrow> 'a::topological_space" and g :: "complex \<Rightarrow> 'a" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2758 | assumes S: "simply_connected S" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2759 | and contf: "continuous_on (sphere 0 1) f" and fim: "f \<in> (sphere 0 1) \<rightarrow> S" | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2760 | and contg: "continuous_on (sphere 0 1) g" and gim: "g \<in> (sphere 0 1) \<rightarrow> S" | 
| 71001 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2761 | shows "homotopic_with_canon (\<lambda>h. True) (sphere 0 1) S f g" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2762 | proof - | 
| 76944 | 2763 | let ?h = "(\<lambda>t. complex_of_real (2 * pi * t) * \<i>)" | 
| 2764 | have "homotopic_loops S (f \<circ> exp \<circ> ?h) (f \<circ> exp \<circ> ?h) \<and> homotopic_loops S (g \<circ> exp \<circ> ?h) (g \<circ> exp \<circ> ?h)" | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2765 | by (simp add: homotopic_circlemaps_imp_homotopic_loops contf fim contg gim image_subset_iff_funcset) | 
| 76944 | 2766 | then have "homotopic_loops S (f \<circ> exp \<circ> ?h) (g \<circ> exp \<circ> ?h)" | 
| 2767 | using S simply_connected_homotopic_loops by blast | |
| 71001 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2768 | then show ?thesis | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2769 | apply (rule homotopic_with_eq [OF homotopic_loops_imp_homotopic_circlemaps]) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2770 | apply (auto simp: o_def complex_norm_eq_1_exp mult.commute) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2771 | done | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2772 | qed | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2773 | |
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2774 | lemma simply_connected_eq_homotopic_circlemaps2a: | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2775 | fixes h :: "complex \<Rightarrow> 'a::topological_space" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2776 | assumes conth: "continuous_on (sphere 0 1) h" and him: "h \<in> sphere 0 1 \<rightarrow> S" | 
| 71001 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2777 | and hom: "\<And>f g::complex \<Rightarrow> 'a. | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2778 | \<lbrakk>continuous_on (sphere 0 1) f; f \<in> (sphere 0 1) \<rightarrow> S; | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2779 | continuous_on (sphere 0 1) g; g \<in> (sphere 0 1) \<rightarrow> S\<rbrakk> | 
| 71001 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2780 | \<Longrightarrow> homotopic_with_canon (\<lambda>h. True) (sphere 0 1) S f g" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2781 | shows "\<exists>a. homotopic_with_canon (\<lambda>h. True) (sphere 0 1) S h (\<lambda>x. a)" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2782 | by (metis conth continuous_on_const him hom image_subset_iff image_subset_iff_funcset) | 
| 71001 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2783 | |
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2784 | lemma simply_connected_eq_homotopic_circlemaps2b: | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2785 | fixes S :: "'a::real_normed_vector set" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2786 | assumes "\<And>f g::complex \<Rightarrow> 'a. | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2787 | \<lbrakk>continuous_on (sphere 0 1) f; f \<in> (sphere 0 1) \<rightarrow> S; | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2788 | continuous_on (sphere 0 1) g; g \<in> (sphere 0 1) \<rightarrow> S\<rbrakk> | 
| 71001 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2789 | \<Longrightarrow> homotopic_with_canon (\<lambda>h. True) (sphere 0 1) S f g" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2790 | shows "path_connected S" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2791 | proof (clarsimp simp add: path_connected_eq_homotopic_points) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2792 | fix a b | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2793 | assume "a \<in> S" "b \<in> S" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2794 | then show "homotopic_loops S (linepath a a) (linepath b b)" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2795 | using homotopic_circlemaps_imp_homotopic_loops [OF assms [of "\<lambda>x. a" "\<lambda>x. b"]] | 
| 71172 | 2796 | by (auto simp: o_def linepath_def) | 
| 71001 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2797 | qed | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2798 | |
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2799 | lemma simply_connected_eq_homotopic_circlemaps3: | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2800 | fixes h :: "complex \<Rightarrow> 'a::real_normed_vector" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2801 | assumes "path_connected S" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2802 | and hom: "\<And>f::complex \<Rightarrow> 'a. | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2803 | \<lbrakk>continuous_on (sphere 0 1) f; f `(sphere 0 1) \<subseteq> S\<rbrakk> | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2804 | \<Longrightarrow> \<exists>a. homotopic_with_canon (\<lambda>h. True) (sphere 0 1) S f (\<lambda>x. a)" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2805 | shows "simply_connected S" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2806 | proof (clarsimp simp add: simply_connected_eq_contractible_loop_some assms) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2807 | fix p | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2808 | assume p: "path p" "path_image p \<subseteq> S" "pathfinish p = pathstart p" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2809 | then have "homotopic_loops S p p" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2810 | by (simp add: homotopic_loops_refl) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2811 | then obtain a where homp: "homotopic_with_canon (\<lambda>h. True) (sphere 0 1) S (p \<circ> (\<lambda>z. Arg2pi z / (2 * pi))) (\<lambda>x. a)" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2812 | by (metis homotopic_with_imp_subset2 homotopic_loops_imp_homotopic_circlemaps homotopic_with_imp_continuous hom) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2813 | show "\<exists>a. a \<in> S \<and> homotopic_loops S p (linepath a a)" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2814 | proof (intro exI conjI) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2815 | show "a \<in> S" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2816 | using homotopic_with_imp_subset2 [OF homp] | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2817 | by (metis dist_0_norm image_subset_iff mem_sphere norm_one) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2818 | have teq: "\<And>t. \<lbrakk>0 \<le> t; t \<le> 1\<rbrakk> | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2819 | \<Longrightarrow> t = Arg2pi (exp (2 * of_real pi * of_real t * \<i>)) / (2 * pi) \<or> t=1 \<and> Arg2pi (exp (2 * of_real pi * of_real t * \<i>)) = 0" | 
| 72245 | 2820 | using Arg2pi_of_real [of 1] by (force simp: Arg2pi_exp) | 
| 71001 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2821 | have "homotopic_loops S p (p \<circ> (\<lambda>z. Arg2pi z / (2 * pi)) \<circ> exp \<circ> (\<lambda>t. 2 * complex_of_real pi * complex_of_real t * \<i>))" | 
| 72245 | 2822 | using p teq by (fastforce simp: pathfinish_def pathstart_def intro: homotopic_loops_eq [OF p]) | 
| 2823 | then show "homotopic_loops S p (linepath a a)" | |
| 71001 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2824 | by (simp add: linepath_refl homotopic_loops_trans [OF _ homotopic_circlemaps_imp_homotopic_loops [OF homp, simplified K_record_comp]]) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2825 | qed | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2826 | qed | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2827 | |
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2828 | |
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2829 | proposition simply_connected_eq_homotopic_circlemaps: | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2830 | fixes S :: "'a::real_normed_vector set" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2831 | shows "simply_connected S \<longleftrightarrow> | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2832 | (\<forall>f g::complex \<Rightarrow> 'a. | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2833 | continuous_on (sphere 0 1) f \<and> f \<in> (sphere 0 1) \<rightarrow> S \<and> | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2834 | continuous_on (sphere 0 1) g \<and> g \<in> (sphere 0 1) \<rightarrow> S | 
| 71001 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2835 | \<longrightarrow> homotopic_with_canon (\<lambda>h. True) (sphere 0 1) S f g)" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2836 | by (metis image_subset_iff_funcset simply_connected_eq_homotopic_circlemaps1 simply_connected_eq_homotopic_circlemaps2a | 
| 76944 | 2837 | simply_connected_eq_homotopic_circlemaps2b simply_connected_eq_homotopic_circlemaps3) | 
| 71001 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2838 | |
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2839 | proposition simply_connected_eq_contractible_circlemap: | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2840 | fixes S :: "'a::real_normed_vector set" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2841 | shows "simply_connected S \<longleftrightarrow> | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2842 | path_connected S \<and> | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2843 | (\<forall>f::complex \<Rightarrow> 'a. | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2844 | continuous_on (sphere 0 1) f \<and> f `(sphere 0 1) \<subseteq> S | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2845 | \<longrightarrow> (\<exists>a. homotopic_with_canon (\<lambda>h. True) (sphere 0 1) S f (\<lambda>x. a)))" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2846 | by (metis image_subset_iff_funcset simply_connected_eq_homotopic_circlemaps simply_connected_eq_homotopic_circlemaps2a | 
| 76944 | 2847 | simply_connected_eq_homotopic_circlemaps3 simply_connected_imp_path_connected) | 
| 71001 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2848 | |
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2849 | corollary homotopy_eqv_simple_connectedness: | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2850 | fixes S :: "'a::real_normed_vector set" and T :: "'b::real_normed_vector set" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2851 | shows "S homotopy_eqv T \<Longrightarrow> simply_connected S \<longleftrightarrow> simply_connected T" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 2852 | by (simp add: simply_connected_eq_homotopic_circlemaps homotopy_eqv_homotopic_triviality image_subset_iff_funcset) | 
| 71001 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2853 | |
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2854 | |
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2855 | subsection\<open>Homeomorphism of simple closed curves to circles\<close> | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2856 | |
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2857 | proposition homeomorphic_simple_path_image_circle: | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2858 | fixes a :: complex and \<gamma> :: "real \<Rightarrow> 'a::t2_space" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2859 | assumes "simple_path \<gamma>" and loop: "pathfinish \<gamma> = pathstart \<gamma>" and "0 < r" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2860 | shows "(path_image \<gamma>) homeomorphic sphere a r" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2861 | proof - | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2862 | have "homotopic_loops (path_image \<gamma>) \<gamma> \<gamma>" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2863 | by (simp add: assms homotopic_loops_refl simple_path_imp_path) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2864 | then have hom: "homotopic_with_canon (\<lambda>h. True) (sphere 0 1) (path_image \<gamma>) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2865 | (\<gamma> \<circ> (\<lambda>z. Arg2pi z / (2*pi))) (\<gamma> \<circ> (\<lambda>z. Arg2pi z / (2*pi)))" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2866 | by (rule homotopic_loops_imp_homotopic_circlemaps) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2867 | have "\<exists>g. homeomorphism (sphere 0 1) (path_image \<gamma>) (\<gamma> \<circ> (\<lambda>z. Arg2pi z / (2*pi))) g" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2868 | proof (rule homeomorphism_compact) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2869 | show "continuous_on (sphere 0 1) (\<gamma> \<circ> (\<lambda>z. Arg2pi z / (2*pi)))" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2870 | using hom homotopic_with_imp_continuous by blast | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2871 | show "inj_on (\<gamma> \<circ> (\<lambda>z. Arg2pi z / (2*pi))) (sphere 0 1)" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2872 | proof | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2873 | fix x y | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2874 | assume xy: "x \<in> sphere 0 1" "y \<in> sphere 0 1" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2875 | and eq: "(\<gamma> \<circ> (\<lambda>z. Arg2pi z / (2*pi))) x = (\<gamma> \<circ> (\<lambda>z. Arg2pi z / (2*pi))) y" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2876 | then have "(Arg2pi x / (2*pi)) = (Arg2pi y / (2*pi))" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2877 | proof - | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2878 |         have "(Arg2pi x / (2*pi)) \<in> {0..1}" "(Arg2pi y / (2*pi)) \<in> {0..1}"
 | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2879 | using Arg2pi_ge_0 Arg2pi_lt_2pi dual_order.strict_iff_order by fastforce+ | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2880 | with eq show ?thesis | 
| 76874 
d6b02d54dbf8
Tidying up of paths, introducing "loop_free" as a separate predicate in the definition of "simple_path"
 paulson <lp15@cam.ac.uk> parents: 
73932diff
changeset | 2881 | using \<open>simple_path \<gamma>\<close> Arg2pi_lt_2pi | 
| 
d6b02d54dbf8
Tidying up of paths, introducing "loop_free" as a separate predicate in the definition of "simple_path"
 paulson <lp15@cam.ac.uk> parents: 
73932diff
changeset | 2882 | unfolding simple_path_def loop_free_def o_def | 
| 71001 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2883 | by (metis eq_divide_eq_1 not_less_iff_gr_or_eq) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2884 | qed | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2885 | with xy show "x = y" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2886 | by (metis is_Arg_def Arg2pi Arg2pi_0 dist_0_norm divide_cancel_right dual_order.strict_iff_order mem_sphere) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2887 | qed | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2888 |     have "\<And>z. cmod z = 1 \<Longrightarrow> \<exists>x\<in>{0..1}. \<gamma> (Arg2pi z / (2*pi)) = \<gamma> x"
 | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2889 | by (metis Arg2pi_ge_0 Arg2pi_lt_2pi atLeastAtMost_iff divide_less_eq_1 less_eq_real_def zero_less_mult_iff pi_gt_zero zero_le_divide_iff zero_less_numeral) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2890 | moreover have "\<exists>z\<in>sphere 0 1. \<gamma> x = \<gamma> (Arg2pi z / (2*pi))" if "0 \<le> x" "x \<le> 1" for x | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2891 | proof (cases "x=1") | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2892 | case True | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2893 | with Arg2pi_of_real [of 1] loop show ?thesis | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2894 | by (rule_tac x=1 in bexI) (auto simp: pathfinish_def pathstart_def \<open>0 \<le> x\<close>) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2895 | next | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2896 | case False | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2897 | then have *: "(Arg2pi (exp (\<i>*(2* of_real pi* of_real x))) / (2*pi)) = x" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2898 | using that by (auto simp: Arg2pi_exp field_split_simps) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2899 | show ?thesis | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2900 | by (rule_tac x="exp(\<i> * of_real(2*pi*x))" in bexI) (auto simp: *) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2901 | qed | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2902 | ultimately show "(\<gamma> \<circ> (\<lambda>z. Arg2pi z / (2*pi))) ` sphere 0 1 = path_image \<gamma>" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2903 | by (auto simp: path_image_def image_iff) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2904 | qed auto | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2905 | then have "path_image \<gamma> homeomorphic sphere (0::complex) 1" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2906 | using homeomorphic_def homeomorphic_sym by blast | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2907 | also have "... homeomorphic sphere a r" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2908 | by (simp add: assms homeomorphic_spheres) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2909 | finally show ?thesis . | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2910 | qed | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2911 | |
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2912 | lemma homeomorphic_simple_path_images: | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2913 | fixes \<gamma>1 :: "real \<Rightarrow> 'a::t2_space" and \<gamma>2 :: "real \<Rightarrow> 'b::t2_space" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2914 | assumes "simple_path \<gamma>1" and loop: "pathfinish \<gamma>1 = pathstart \<gamma>1" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2915 | assumes "simple_path \<gamma>2" and loop: "pathfinish \<gamma>2 = pathstart \<gamma>2" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2916 | shows "(path_image \<gamma>1) homeomorphic (path_image \<gamma>2)" | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2917 | by (meson assms homeomorphic_simple_path_image_circle homeomorphic_sym homeomorphic_trans loop pi_gt_zero) | 
| 
3e374c65f96b
reorganisation to eliminate Brouwer_Fixpoint from complex analysis
 paulson <lp15@cam.ac.uk> parents: 
70817diff
changeset | 2918 | |
| 69683 | 2919 | subsection\<open>Dimension-based conditions for various homeomorphisms\<close> | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68634diff
changeset | 2920 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2921 | lemma homeomorphic_subspaces_eq: | 
| 64396 | 2922 | fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set" | 
| 2923 | assumes "subspace S" "subspace T" | |
| 2924 | shows "S homeomorphic T \<longleftrightarrow> dim S = dim T" | |
| 2925 | proof | |
| 2926 | assume "S homeomorphic T" | |
| 2927 | then obtain f g where hom: "homeomorphism S T f g" | |
| 2928 | using homeomorphic_def by blast | |
| 2929 | show "dim S = dim T" | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2930 | by (metis \<open>S homeomorphic T\<close> aff_dim_subspace assms homeomorphic_convex_sets of_nat_eq_iff subspace_imp_convex) | 
| 64396 | 2931 | next | 
| 2932 | assume "dim S = dim T" | |
| 2933 | then show "S homeomorphic T" | |
| 2934 | by (simp add: assms homeomorphic_subspaces) | |
| 2935 | qed | |
| 2936 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2937 | lemma homeomorphic_affine_sets_eq: | 
| 64396 | 2938 | fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set" | 
| 2939 | assumes "affine S" "affine T" | |
| 2940 | shows "S homeomorphic T \<longleftrightarrow> aff_dim S = aff_dim T" | |
| 2941 | proof (cases "S = {} \<or> T = {}")
 | |
| 2942 | case True | |
| 2943 | then show ?thesis | |
| 2944 | using assms homeomorphic_affine_sets by force | |
| 2945 | next | |
| 2946 | case False | |
| 2947 | then obtain a b where "a \<in> S" "b \<in> T" | |
| 2948 | by blast | |
| 67399 | 2949 | then have "subspace ((+) (- a) ` S)" "subspace ((+) (- b) ` T)" | 
| 64396 | 2950 | using affine_diffs_subspace assms by blast+ | 
| 2951 | then show ?thesis | |
| 2952 | by (metis affine_imp_convex assms homeomorphic_affine_sets homeomorphic_convex_sets) | |
| 2953 | qed | |
| 2954 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2955 | lemma homeomorphic_hyperplanes_eq: | 
| 64396 | 2956 | fixes a :: "'a::euclidean_space" and c :: "'b::euclidean_space" | 
| 2957 | assumes "a \<noteq> 0" "c \<noteq> 0" | |
| 2958 |   shows "({x. a \<bullet> x = b} homeomorphic {x. c \<bullet> x = d} \<longleftrightarrow> DIM('a) = DIM('b))"
 | |
| 76944 | 2959 | proof - | 
| 2960 |   have "DIM('a) - Suc 0 = DIM('b) - Suc 0 \<Longrightarrow> DIM('a) = DIM('b)"
 | |
| 2961 | by (metis DIM_positive Suc_pred) | |
| 2962 | then show ?thesis | |
| 2963 | by (auto simp: homeomorphic_affine_sets_eq affine_hyperplane assms) | |
| 2964 | qed | |
| 64396 | 2965 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2966 | lemma homeomorphic_UNIV_UNIV: | 
| 64396 | 2967 | shows "(UNIV::'a set) homeomorphic (UNIV::'b set) \<longleftrightarrow> | 
| 2968 |     DIM('a::euclidean_space) = DIM('b::euclidean_space)"
 | |
| 2969 | by (simp add: homeomorphic_subspaces_eq) | |
| 2970 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2971 | lemma simply_connected_sphere_gen: | 
| 64396 | 2972 | assumes "convex S" "bounded S" and 3: "3 \<le> aff_dim S" | 
| 2973 | shows "simply_connected(rel_frontier S)" | |
| 2974 | proof - | |
| 2975 | have pa: "path_connected (rel_frontier S)" | |
| 2976 | using assms by (simp add: path_connected_sphere_gen) | |
| 2977 | show ?thesis | |
| 2978 | proof (clarsimp simp add: simply_connected_eq_contractible_circlemap pa) | |
| 2979 | fix f | |
| 2980 | assume f: "continuous_on (sphere (0::complex) 1) f" "f ` sphere 0 1 \<subseteq> rel_frontier S" | |
| 2981 | have eq: "sphere (0::complex) 1 = rel_frontier(cball 0 1)" | |
| 2982 | by simp | |
| 2983 | have "convex (cball (0::complex) 1)" | |
| 2984 | by (rule convex_cball) | |
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 2985 | then obtain c where "homotopic_with_canon (\<lambda>z. True) (sphere (0::complex) 1) (rel_frontier S) f (\<lambda>x. c)" | 
| 64396 | 2986 | apply (rule inessential_spheremap_lowdim_gen [OF _ bounded_cball \<open>convex S\<close> \<open>bounded S\<close>, where f=f]) | 
| 76944 | 2987 | using f 3 by (auto simp: aff_dim_cball) | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 2988 | then show "\<exists>a. homotopic_with_canon (\<lambda>h. True) (sphere 0 1) (rel_frontier S) f (\<lambda>x. a)" | 
| 64396 | 2989 | by blast | 
| 2990 | qed | |
| 2991 | qed | |
| 2992 | ||
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2993 | subsection\<open>more invariance of domain\<close> (*FIX ME title? *) | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2994 | |
| 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 2995 | proposition invariance_of_domain_sphere_affine_set_gen: | 
| 64396 | 2996 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 2997 | assumes contf: "continuous_on S f" and injf: "inj_on f S" and fim: "f \<in> S \<rightarrow> T" | 
| 64396 | 2998 | and U: "bounded U" "convex U" | 
| 2999 | and "affine T" and affTU: "aff_dim T < aff_dim U" | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3000 | and ope: "openin (top_of_set (rel_frontier U)) S" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3001 | shows "openin (top_of_set T) (f ` S)" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3002 | proof (cases "rel_frontier U = {}")
 | 
| 64396 | 3003 | case True | 
| 3004 | then show ?thesis | |
| 3005 | using ope openin_subset by force | |
| 3006 | next | |
| 3007 | case False | |
| 3008 | obtain b c where b: "b \<in> rel_frontier U" and c: "c \<in> rel_frontier U" and "b \<noteq> c" | |
| 3009 | using \<open>bounded U\<close> rel_frontier_not_sing [of U] subset_singletonD False by fastforce | |
| 3010 | obtain V :: "'a set" where "affine V" and affV: "aff_dim V = aff_dim U - 1" | |
| 3011 | proof (rule choose_affine_subset [OF affine_UNIV]) | |
| 3012 | show "- 1 \<le> aff_dim U - 1" | |
| 3013 | by (metis aff_dim_empty aff_dim_geq aff_dim_negative_iff affTU diff_0 diff_right_mono not_le) | |
| 3014 | show "aff_dim U - 1 \<le> aff_dim (UNIV::'a set)" | |
| 3015 | by (metis aff_dim_UNIV aff_dim_le_DIM le_cases not_le zle_diff1_eq) | |
| 3016 | qed auto | |
| 3017 | have SU: "S \<subseteq> rel_frontier U" | |
| 3018 | using ope openin_imp_subset by auto | |
| 3019 |   have homb: "rel_frontier U - {b} homeomorphic V"
 | |
| 3020 |    and homc: "rel_frontier U - {c} homeomorphic V"
 | |
| 3021 | using homeomorphic_punctured_sphere_affine_gen [of U _ V] | |
| 3022 | by (simp_all add: \<open>affine V\<close> affV U b c) | |
| 3023 | then obtain g h j k | |
| 3024 |            where gh: "homeomorphism (rel_frontier U - {b}) V g h"
 | |
| 3025 |              and jk: "homeomorphism (rel_frontier U - {c}) V j k"
 | |
| 3026 | by (auto simp: homeomorphic_def) | |
| 3027 |   with SU have hgsub: "(h ` g ` (S - {b})) \<subseteq> S" and kjsub: "(k ` j ` (S - {c})) \<subseteq> S"
 | |
| 3028 | by (simp_all add: homeomorphism_def subset_eq) | |
| 3029 | have [simp]: "aff_dim T \<le> aff_dim V" | |
| 3030 | by (simp add: affTU affV) | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3031 |   have "openin (top_of_set T) ((f \<circ> h) ` g ` (S - {b}))"
 | 
| 64396 | 3032 | proof (rule invariance_of_domain_affine_sets [OF _ \<open>affine V\<close>]) | 
| 72245 | 3033 |     have "openin (top_of_set (rel_frontier U - {b})) (S - {b})"
 | 
| 64396 | 3034 | by (meson Diff_mono Diff_subset SU ope openin_delete openin_subset_trans order_refl) | 
| 72245 | 3035 |     then show "openin (top_of_set V) (g ` (S - {b}))"
 | 
| 3036 | by (rule homeomorphism_imp_open_map [OF gh]) | |
| 64396 | 3037 |     show "continuous_on (g ` (S - {b})) (f \<circ> h)"
 | 
| 72245 | 3038 | proof (rule continuous_on_compose) | 
| 3039 |       show "continuous_on (g ` (S - {b})) h"
 | |
| 3040 | by (meson Diff_mono SU homeomorphism_def homeomorphism_of_subsets gh set_eq_subset) | |
| 3041 | qed (use contf continuous_on_subset hgsub in blast) | |
| 64396 | 3042 |     show "inj_on (f \<circ> h) (g ` (S - {b}))"
 | 
| 76944 | 3043 | by (smt (verit, del_insts) SU homeomorphism_def inj_on_def injf gh Diff_iff comp_apply imageE subset_iff) | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 3044 |     show "f \<circ> h \<in> g ` (S - {b}) \<rightarrow> T"
 | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 3045 | using fim hgsub by fastforce | 
| 64396 | 3046 | qed (auto simp: assms) | 
| 3047 | moreover | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3048 |   have "openin (top_of_set T) ((f \<circ> k) ` j ` (S - {c}))"
 | 
| 64396 | 3049 | proof (rule invariance_of_domain_affine_sets [OF _ \<open>affine V\<close>]) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3050 |     show "openin (top_of_set V) (j ` (S - {c}))"
 | 
| 72245 | 3051 | by (meson Diff_mono Diff_subset SU ope openin_delete openin_subset_trans order_refl homeomorphism_imp_open_map [OF jk]) | 
| 64396 | 3052 |     show "continuous_on (j ` (S - {c})) (f \<circ> k)"
 | 
| 72245 | 3053 | proof (rule continuous_on_compose) | 
| 3054 |       show "continuous_on (j ` (S - {c})) k"
 | |
| 3055 | by (meson Diff_mono SU homeomorphism_def homeomorphism_of_subsets jk set_eq_subset) | |
| 3056 | qed (use contf continuous_on_subset kjsub in blast) | |
| 64396 | 3057 |     show "inj_on (f \<circ> k) (j ` (S - {c}))"
 | 
| 76944 | 3058 | by (smt (verit, del_insts) SU homeomorphism_def inj_on_def injf jk Diff_iff comp_apply imageE subset_iff) | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 3059 |     show "f \<circ> k \<in> j ` (S - {c}) \<rightarrow> T"
 | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 3060 | using fim kjsub by fastforce | 
| 64396 | 3061 | qed (auto simp: assms) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3062 |   ultimately have "openin (top_of_set T) ((f \<circ> h) ` g ` (S - {b}) \<union> ((f \<circ> k) ` j ` (S - {c})))"
 | 
| 64396 | 3063 | by (rule openin_Un) | 
| 3064 |   moreover have "(f \<circ> h) ` g ` (S - {b}) = f ` (S - {b})"
 | |
| 3065 | proof - | |
| 3066 |     have "h ` g ` (S - {b}) = (S - {b})"
 | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 3067 | by (meson Diff_mono Diff_subset SU gh homeomorphism_def homeomorphism_of_subsets subset_singleton_iff) | 
| 64396 | 3068 | then show ?thesis | 
| 3069 | by (metis image_comp) | |
| 3070 | qed | |
| 3071 |   moreover have "(f \<circ> k) ` j ` (S - {c}) = f ` (S - {c})"
 | |
| 3072 | proof - | |
| 3073 |     have "k ` j ` (S - {c}) = (S - {c})"
 | |
| 76944 | 3074 | using homeomorphism_apply1 [OF jk] SU | 
| 3075 | by (meson Diff_mono homeomorphism_def homeomorphism_of_subsets jk subset_refl) | |
| 64396 | 3076 | then show ?thesis | 
| 3077 | by (metis image_comp) | |
| 3078 | qed | |
| 3079 |   moreover have "f ` (S - {b}) \<union> f ` (S - {c}) = f ` (S)"
 | |
| 3080 | using \<open>b \<noteq> c\<close> by blast | |
| 3081 | ultimately show ?thesis | |
| 3082 | by simp | |
| 3083 | qed | |
| 3084 | ||
| 3085 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3086 | lemma invariance_of_domain_sphere_affine_set: | 
| 64396 | 3087 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 3088 | assumes contf: "continuous_on S f" and injf: "inj_on f S" and fim: "f \<in> S \<rightarrow> T" | 
| 64396 | 3089 |       and "r \<noteq> 0" "affine T" and affTU: "aff_dim T < DIM('a)"
 | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3090 | and ope: "openin (top_of_set (sphere a r)) S" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3091 | shows "openin (top_of_set T) (f ` S)" | 
| 64396 | 3092 | proof (cases "sphere a r = {}")
 | 
| 3093 | case True | |
| 3094 | then show ?thesis | |
| 3095 | using ope openin_subset by force | |
| 3096 | next | |
| 3097 | case False | |
| 3098 | show ?thesis | |
| 3099 | proof (rule invariance_of_domain_sphere_affine_set_gen [OF contf injf fim bounded_cball convex_cball \<open>affine T\<close>]) | |
| 3100 | show "aff_dim T < aff_dim (cball a r)" | |
| 3101 | by (metis False affTU aff_dim_cball assms(4) linorder_cases sphere_empty) | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3102 | show "openin (top_of_set (rel_frontier (cball a r))) S" | 
| 64396 | 3103 | by (simp add: \<open>r \<noteq> 0\<close> ope) | 
| 3104 | qed | |
| 3105 | qed | |
| 3106 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3107 | lemma no_embedding_sphere_lowdim: | 
| 64396 | 3108 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 3109 | assumes contf: "continuous_on (sphere a r) f" and injf: "inj_on f (sphere a r)" and "r > 0" | |
| 3110 |    shows "DIM('a) \<le> DIM('b)"
 | |
| 3111 | proof - | |
| 3112 |   have "False" if "DIM('a) > DIM('b)"
 | |
| 3113 | proof - | |
| 3114 | have "compact (f ` sphere a r)" | |
| 3115 | using compact_continuous_image | |
| 3116 | by (simp add: compact_continuous_image contf) | |
| 3117 | then have "\<not> open (f ` sphere a r)" | |
| 3118 | using compact_open | |
| 3119 | by (metis assms(3) image_is_empty not_less_iff_gr_or_eq sphere_eq_empty) | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 3120 | then have "r=0" | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 3121 | by (metis Pi_I UNIV_I aff_dim_UNIV affine_UNIV contf injf invariance_of_domain_sphere_affine_set | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 3122 | of_nat_less_iff open_openin openin_subtopology_self subtopology_UNIV that) | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 3123 | with \<open>r>0\<close> show False by auto | 
| 64396 | 3124 | qed | 
| 3125 | then show ?thesis | |
| 3126 | using not_less by blast | |
| 3127 | qed | |
| 3128 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3129 | lemma simply_connected_sphere: | 
| 64396 | 3130 | fixes a :: "'a::euclidean_space" | 
| 3131 |   assumes "3 \<le> DIM('a)"
 | |
| 3132 | shows "simply_connected(sphere a r)" | |
| 3133 | proof (cases rule: linorder_cases [of r 0]) | |
| 3134 | case less | |
| 3135 | then show ?thesis by simp | |
| 3136 | next | |
| 3137 | case equal | |
| 3138 | then show ?thesis by (auto simp: convex_imp_simply_connected) | |
| 3139 | next | |
| 3140 | case greater | |
| 3141 | then show ?thesis | |
| 3142 | using simply_connected_sphere_gen [of "cball a r"] assms | |
| 3143 | by (simp add: aff_dim_cball) | |
| 3144 | qed | |
| 3145 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3146 | lemma simply_connected_sphere_eq: | 
| 64789 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3147 | fixes a :: "'a::euclidean_space" | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3148 |   shows "simply_connected(sphere a r) \<longleftrightarrow> 3 \<le> DIM('a) \<or> r \<le> 0"  (is "?lhs = ?rhs")
 | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3149 | proof (cases "r \<le> 0") | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3150 | case True | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3151 | have "simply_connected (sphere a r)" | 
| 72245 | 3152 | using True less_eq_real_def by (auto intro: convex_imp_simply_connected) | 
| 64789 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3153 | with True show ?thesis by auto | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3154 | next | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3155 | case False | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3156 | show ?thesis | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3157 | proof | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3158 | assume L: ?lhs | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3159 |     have "False" if "DIM('a) = 1 \<or> DIM('a) = 2"
 | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3160 | using that | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3161 | proof | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3162 |       assume "DIM('a) = 1"
 | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3163 | with L show False | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3164 | using connected_sphere_eq simply_connected_imp_connected | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3165 | by (metis False Suc_1 not_less_eq_eq order_refl) | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3166 | next | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3167 |       assume "DIM('a) = 2"
 | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3168 | then have "sphere a r homeomorphic sphere (0::complex) 1" | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3169 | by (metis DIM_complex False homeomorphic_spheres_gen not_less zero_less_one) | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3170 | then have "simply_connected(sphere (0::complex) 1)" | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3171 | using L homeomorphic_simply_connected_eq by blast | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 3172 | then obtain a::complex where "homotopic_with_canon (\<lambda>h. True) (sphere 0 1) (sphere 0 1) id (\<lambda>x. a)" | 
| 72245 | 3173 | by (metis continuous_on_id' id_apply image_id subset_refl simply_connected_eq_contractible_circlemap) | 
| 64789 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3174 | then show False | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3175 | using contractible_sphere contractible_def not_one_le_zero by blast | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3176 | qed | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3177 | with False show ?rhs | 
| 76944 | 3178 | by (metis DIM_ge_Suc0 One_nat_def Suc_1 not_less_eq_eq numeral_3_eq_3 order_antisym_conv) | 
| 64789 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3179 | next | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3180 | assume ?rhs | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3181 | with False show ?lhs by (simp add: simply_connected_sphere) | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3182 | qed | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3183 | qed | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3184 | |
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3185 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3186 | lemma simply_connected_punctured_universe_eq: | 
| 64789 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3187 | fixes a :: "'a::euclidean_space" | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3188 |   shows "simply_connected(- {a}) \<longleftrightarrow> 3 \<le> DIM('a)"
 | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3189 | proof - | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3190 | have [simp]: "a \<in> rel_interior (cball a 1)" | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3191 | by (simp add: rel_interior_nonempty_interior) | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3192 |   have [simp]: "affine hull cball a 1 - {a} = -{a}"
 | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3193 | by (metis Compl_eq_Diff_UNIV aff_dim_cball aff_dim_lt_full not_less_iff_gr_or_eq zero_less_one) | 
| 72245 | 3194 |   have "sphere a 1 homotopy_eqv - {a}"
 | 
| 3195 | using homotopy_eqv_rel_frontier_punctured_affine_hull [of "cball a 1" a] by auto | |
| 3196 |   then have "simply_connected(- {a}) \<longleftrightarrow> simply_connected(sphere a 1)"
 | |
| 3197 | using homotopy_eqv_simple_connectedness by blast | |
| 64789 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3198 |   also have "...  \<longleftrightarrow> 3 \<le> DIM('a)"
 | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3199 | by (simp add: simply_connected_sphere_eq) | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3200 | finally show ?thesis . | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3201 | qed | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3202 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3203 | lemma not_simply_connected_circle: | 
| 64789 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3204 | fixes a :: complex | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3205 | shows "0 < r \<Longrightarrow> \<not> simply_connected(sphere a r)" | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3206 | by (simp add: simply_connected_sphere_eq) | 
| 
6440577e34ee
connectedness, circles not simply connected , punctured universe
 paulson <lp15@cam.ac.uk> parents: 
64508diff
changeset | 3207 | |
| 64847 | 3208 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3209 | proposition simply_connected_punctured_convex: | 
| 64790 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3210 | fixes a :: "'a::euclidean_space" | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3211 | assumes "convex S" and 3: "3 \<le> aff_dim S" | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3212 |     shows "simply_connected(S - {a})"
 | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3213 | proof (cases "a \<in> rel_interior S") | 
| 64790 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3214 | case True | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3215 | then obtain e where "a \<in> S" "0 < e" and e: "cball a e \<inter> affine hull S \<subseteq> S" | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3216 | by (auto simp: rel_interior_cball) | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3217 | have con: "convex (cball a e \<inter> affine hull S)" | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3218 | by (simp add: convex_Int) | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3219 | have bo: "bounded (cball a e \<inter> affine hull S)" | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3220 | by (simp add: bounded_Int) | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3221 |   have "affine hull S \<inter> interior (cball a e) \<noteq> {}"
 | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3222 | using \<open>0 < e\<close> \<open>a \<in> S\<close> hull_subset by fastforce | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3223 | then have "3 \<le> aff_dim (affine hull S \<inter> cball a e)" | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3224 | by (simp add: 3 aff_dim_convex_Int_nonempty_interior [OF convex_affine_hull]) | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3225 | also have "... = aff_dim (cball a e \<inter> affine hull S)" | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3226 | by (simp add: Int_commute) | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3227 | finally have "3 \<le> aff_dim (cball a e \<inter> affine hull S)" . | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3228 |   moreover have "rel_frontier (cball a e \<inter> affine hull S) homotopy_eqv S - {a}"
 | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3229 | proof (rule homotopy_eqv_rel_frontier_punctured_convex) | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3230 | show "a \<in> rel_interior (cball a e \<inter> affine hull S)" | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3231 | by (meson IntI Int_mono \<open>a \<in> S\<close> \<open>0 < e\<close> e \<open>cball a e \<inter> affine hull S \<subseteq> S\<close> ball_subset_cball centre_in_cball dual_order.strict_implies_order hull_inc hull_mono mem_rel_interior_ball) | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3232 | have "closed (cball a e \<inter> affine hull S)" | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3233 | by blast | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3234 | then show "rel_frontier (cball a e \<inter> affine hull S) \<subseteq> S" | 
| 72245 | 3235 | by (metis Diff_subset closure_closed dual_order.trans e rel_frontier_def) | 
| 64790 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3236 | show "S \<subseteq> affine hull (cball a e \<inter> affine hull S)" | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3237 | by (metis (no_types, lifting) IntI \<open>a \<in> S\<close> \<open>0 < e\<close> affine_hull_convex_Int_nonempty_interior centre_in_ball convex_affine_hull empty_iff hull_subset inf_commute interior_cball subsetCE subsetI) | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3238 | qed (auto simp: assms con bo) | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3239 | ultimately show ?thesis | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3240 | using homotopy_eqv_simple_connectedness simply_connected_sphere_gen [OF con bo] | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3241 | by blast | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3242 | next | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3243 | case False | 
| 72245 | 3244 |   then have "rel_interior S \<subseteq> S - {a}"
 | 
| 3245 | by (simp add: False rel_interior_subset subset_Diff_insert) | |
| 3246 |   moreover have "S - {a} \<subseteq> closure S"
 | |
| 64790 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3247 | by (meson Diff_subset closure_subset subset_trans) | 
| 72245 | 3248 | ultimately show ?thesis | 
| 3249 | by (metis contractible_imp_simply_connected contractible_convex_tweak_boundary_points [OF \<open>convex S\<close>]) | |
| 64790 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3250 | qed | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3251 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3252 | corollary simply_connected_punctured_universe: | 
| 64790 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3253 | fixes a :: "'a::euclidean_space" | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3254 |   assumes "3 \<le> DIM('a)"
 | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3255 |   shows "simply_connected(- {a})"
 | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3256 | proof - | 
| 64790 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3257 | have [simp]: "affine hull cball a 1 = UNIV" | 
| 72245 | 3258 | by (simp add: aff_dim_cball affine_hull_UNIV) | 
| 3259 | have "a \<in> rel_interior (cball a 1)" | |
| 3260 | by (simp add: rel_interior_interior) | |
| 3261 | then | |
| 64790 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3262 |   have "simply_connected (rel_frontier (cball a 1)) = simply_connected (affine hull cball a 1 - {a})"
 | 
| 72245 | 3263 | using homotopy_eqv_rel_frontier_punctured_affine_hull homotopy_eqv_simple_connectedness by blast | 
| 64790 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3264 | then show ?thesis | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3265 | using simply_connected_sphere [of a 1, OF assms] by (auto simp: Compl_eq_Diff_UNIV) | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3266 | qed | 
| 
ed38f9a834d8
New theory of arcwise connected sets and other new material
 paulson <lp15@cam.ac.uk> parents: 
64789diff
changeset | 3267 | |
| 64396 | 3268 | |
| 69683 | 3269 | subsection\<open>The power, squaring and exponential functions as covering maps\<close> | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68634diff
changeset | 3270 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3271 | proposition covering_space_power_punctured_plane: | 
| 64287 | 3272 | assumes "0 < n" | 
| 3273 |     shows "covering_space (- {0}) (\<lambda>z::complex. z^n) (- {0})"
 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3274 | proof - | 
| 64287 | 3275 | consider "n = 1" | "2 \<le> n" using assms by linarith | 
| 3276 | then obtain e where "0 < e" | |
| 3277 | and e: "\<And>w z. cmod(w - z) < e * cmod z \<Longrightarrow> (w^n = z^n \<longleftrightarrow> w = z)" | |
| 3278 | proof cases | |
| 3279 | assume "n = 1" then show ?thesis | |
| 3280 | by (rule_tac e=1 in that) auto | |
| 3281 | next | |
| 3282 | assume "2 \<le> n" | |
| 3283 | have eq_if_pow_eq: | |
| 3284 | "w = z" if lt: "cmod (w - z) < 2 * sin (pi / real n) * cmod z" | |
| 3285 | and eq: "w^n = z^n" for w z | |
| 3286 | proof (cases "z = 0") | |
| 3287 | case True with eq assms show ?thesis by (auto simp: power_0_left) | |
| 3288 | next | |
| 3289 | case False | |
| 3290 | then have "z \<noteq> 0" by auto | |
| 3291 | have "(w/z)^n = 1" | |
| 3292 | by (metis False divide_self_if eq power_divide power_one) | |
| 77434 
da41823d09a7
Imported a theorem about Infinite_Sum. Importing this theory a bit earlier is causing syntactic ambiguities with Infinite_Set_Sum however; no_notation needed
 paulson <lp15@cam.ac.uk> parents: 
76944diff
changeset | 3293 | then obtain j::nat where j: "w / z = exp (2 * of_real pi * \<i> * j / n)" and "j < n" | 
| 64287 | 3294 | using Suc_leI assms \<open>2 \<le> n\<close> complex_roots_unity [THEN eqset_imp_iff, of n "w/z"] | 
| 3295 | by force | |
| 3296 | have "cmod (w/z - 1) < 2 * sin (pi / real n)" | |
| 70817 
dd675800469d
dedicated fact collections for algebraic simplification rules potentially splitting goals
 haftmann parents: 
70642diff
changeset | 3297 | using lt assms \<open>z \<noteq> 0\<close> by (simp add: field_split_simps norm_divide) | 
| 64287 | 3298 | then have "cmod (exp (\<i> * of_real (2 * pi * j / n)) - 1) < 2 * sin (pi / real n)" | 
| 3299 | by (simp add: j field_simps) | |
| 3300 | then have "2 * \<bar>sin((2 * pi * j / n) / 2)\<bar> < 2 * sin (pi / real n)" | |
| 65064 
a4abec71279a
Renamed ii to imaginary_unit in order to free up ii as a variable name.  Also replaced some legacy def commands
 paulson <lp15@cam.ac.uk> parents: 
65037diff
changeset | 3301 | by (simp only: dist_exp_i_1) | 
| 64287 | 3302 | then have sin_less: "sin((pi * j / n)) < sin (pi / real n)" | 
| 3303 | by (simp add: field_simps) | |
| 3304 | then have "w / z = 1" | |
| 3305 | proof (cases "j = 0") | |
| 3306 | case True then show ?thesis by (auto simp: j) | |
| 3307 | next | |
| 3308 | case False | |
| 3309 | then have "sin (pi / real n) \<le> sin((pi * j / n))" | |
| 3310 | proof (cases "j / n \<le> 1/2") | |
| 3311 | case True | |
| 3312 | show ?thesis | |
| 80175 
200107cdd3ac
Some new simprules – and patches for proofs
 paulson <lp15@cam.ac.uk> parents: 
78516diff
changeset | 3313 | using \<open>j \<noteq> 0\<close> \<open>j < n\<close> True | 
| 72245 | 3314 | by (intro sin_monotone_2pi_le) (auto simp: field_simps intro: order_trans [of _ 0]) | 
| 64287 | 3315 | next | 
| 3316 | case False | |
| 3317 | then have seq: "sin(pi * j / n) = sin(pi * (n - j) / n)" | |
| 3318 | using \<open>j < n\<close> by (simp add: algebra_simps diff_divide_distrib of_nat_diff) | |
| 80175 
200107cdd3ac
Some new simprules – and patches for proofs
 paulson <lp15@cam.ac.uk> parents: 
78516diff
changeset | 3319 | |
| 64287 | 3320 | show ?thesis | 
| 80175 
200107cdd3ac
Some new simprules – and patches for proofs
 paulson <lp15@cam.ac.uk> parents: 
78516diff
changeset | 3321 | unfolding seq | 
| 
200107cdd3ac
Some new simprules – and patches for proofs
 paulson <lp15@cam.ac.uk> parents: 
78516diff
changeset | 3322 | proof (intro sin_monotone_2pi_le) | 
| 
200107cdd3ac
Some new simprules – and patches for proofs
 paulson <lp15@cam.ac.uk> parents: 
78516diff
changeset | 3323 | show "- (pi / 2) \<le> pi / real n" | 
| 
200107cdd3ac
Some new simprules – and patches for proofs
 paulson <lp15@cam.ac.uk> parents: 
78516diff
changeset | 3324 | by (smt (verit) divide_nonneg_nonneg of_nat_0_le_iff pi_ge_zero) | 
| 
200107cdd3ac
Some new simprules – and patches for proofs
 paulson <lp15@cam.ac.uk> parents: 
78516diff
changeset | 3325 | qed (use \<open>j < n\<close> False in \<open>auto simp: divide_simps\<close>) | 
| 64287 | 3326 | qed | 
| 3327 | with sin_less show ?thesis by force | |
| 3328 | qed | |
| 3329 | then show ?thesis by simp | |
| 3330 | qed | |
| 3331 | show ?thesis | |
| 72245 | 3332 | proof | 
| 3333 | show "0 < 2 * sin (pi / real n)" | |
| 3334 | by (force simp: \<open>2 \<le> n\<close> sin_pi_divide_n_gt_0) | |
| 3335 | qed (meson eq_if_pow_eq) | |
| 64287 | 3336 | qed | 
| 3337 |   have zn1: "continuous_on (- {0}) (\<lambda>z::complex. z^n)"
 | |
| 3338 | by (rule continuous_intros)+ | |
| 3339 |   have zn2: "(\<lambda>z::complex. z^n) ` (- {0}) = - {0}"
 | |
| 3340 | using assms by (auto simp: image_def elim: exists_complex_root_nonzero [where n = n]) | |
| 3341 | have zn3: "\<exists>T. z^n \<in> T \<and> open T \<and> 0 \<notin> T \<and> | |
| 66884 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3342 |                (\<exists>v. \<Union>v = -{0} \<inter> (\<lambda>z. z ^ n) -` T \<and>
 | 
| 64287 | 3343 | (\<forall>u\<in>v. open u \<and> 0 \<notin> u) \<and> | 
| 3344 | pairwise disjnt v \<and> | |
| 3345 | (\<forall>u\<in>v. Ex (homeomorphism u T (\<lambda>z. z^n))))" | |
| 3346 | if "z \<noteq> 0" for z::complex | |
| 3347 | proof - | |
| 65064 
a4abec71279a
Renamed ii to imaginary_unit in order to free up ii as a variable name.  Also replaced some legacy def commands
 paulson <lp15@cam.ac.uk> parents: 
65037diff
changeset | 3348 | define d where "d \<equiv> min (1/2) (e/4) * norm z" | 
| 64287 | 3349 | have "0 < d" | 
| 3350 | by (simp add: d_def \<open>0 < e\<close> \<open>z \<noteq> 0\<close>) | |
| 3351 | have iff_x_eq_y: "x^n = y^n \<longleftrightarrow> x = y" | |
| 3352 | if eq: "w^n = z^n" and x: "x \<in> ball w d" and y: "y \<in> ball w d" for w x y | |
| 3353 | proof - | |
| 3354 | have [simp]: "norm z = norm w" using that | |
| 3355 | by (simp add: assms power_eq_imp_eq_norm) | |
| 3356 | show ?thesis | |
| 3357 | proof (cases "w = 0") | |
| 3358 | case True with \<open>z \<noteq> 0\<close> assms eq | |
| 3359 | show ?thesis by (auto simp: power_0_left) | |
| 3360 | next | |
| 3361 | case False | |
| 3362 | have "cmod (x - y) < 2*d" | |
| 3363 | using x y | |
| 3364 | by (simp add: dist_norm [symmetric]) (metis dist_commute mult_2 dist_triangle_less_add) | |
| 3365 | also have "... \<le> 2 * e / 4 * norm w" | |
| 3366 | using \<open>e > 0\<close> by (simp add: d_def min_mult_distrib_right) | |
| 3367 | also have "... = e * (cmod w / 2)" | |
| 3368 | by simp | |
| 3369 | also have "... \<le> e * cmod y" | |
| 72245 | 3370 | proof (rule mult_left_mono) | 
| 3371 | have "cmod (w - y) < cmod w / 2 \<Longrightarrow> cmod w / 2 \<le> cmod y" | |
| 3372 | by (metis (no_types) dist_0_norm dist_norm norm_triangle_half_l not_le order_less_irrefl) | |
| 3373 | then show "cmod w / 2 \<le> cmod y" | |
| 3374 | using y by (simp add: dist_norm d_def min_mult_distrib_right) | |
| 3375 | qed (use \<open>e > 0\<close> in auto) | |
| 64287 | 3376 | finally have "cmod (x - y) < e * cmod y" . | 
| 3377 | then show ?thesis by (rule e) | |
| 3378 | qed | |
| 3379 | qed | |
| 3380 | then have inj: "inj_on (\<lambda>w. w^n) (ball z d)" | |
| 3381 | by (simp add: inj_on_def) | |
| 3382 | have cont: "continuous_on (ball z d) (\<lambda>w. w ^ n)" | |
| 3383 | by (intro continuous_intros) | |
| 3384 | have noncon: "\<not> (\<lambda>w::complex. w^n) constant_on UNIV" | |
| 3385 | by (metis UNIV_I assms constant_on_def power_one zero_neq_one zero_power) | |
| 3386 | have im_eq: "(\<lambda>w. w^n) ` ball z' d = (\<lambda>w. w^n) ` ball z d" | |
| 3387 | if z': "z'^n = z^n" for z' | |
| 3388 | proof - | |
| 3389 | have nz': "norm z' = norm z" using that assms power_eq_imp_eq_norm by blast | |
| 3390 | have "(w \<in> (\<lambda>w. w^n) ` ball z' d) = (w \<in> (\<lambda>w. w^n) ` ball z d)" for w | |
| 3391 | proof (cases "w=0") | |
| 3392 | case True with assms show ?thesis | |
| 3393 | by (simp add: image_def ball_def nz') | |
| 3394 | next | |
| 3395 | case False | |
| 3396 | have "z' \<noteq> 0" using \<open>z \<noteq> 0\<close> nz' by force | |
| 72245 | 3397 | have 1: "(z*x / z')^n = x^n" if "x \<noteq> 0" for x | 
| 64287 | 3398 | using z' that by (simp add: field_simps \<open>z \<noteq> 0\<close>) | 
| 72245 | 3399 | have 2: "cmod (z - z * x / z') = cmod (z' - x)" if "x \<noteq> 0" for x | 
| 64287 | 3400 | proof - | 
| 3401 | have "cmod (z - z * x / z') = cmod z * cmod (1 - x / z')" | |
| 68499 
d4312962161a
Rationalisation of complex transcendentals, esp the Arg function
 paulson <lp15@cam.ac.uk> parents: 
68072diff
changeset | 3402 | by (metis (no_types) ab_semigroup_mult_class.mult_ac(1) divide_complex_def mult.right_neutral norm_mult right_diff_distrib') | 
| 64287 | 3403 | also have "... = cmod z' * cmod (1 - x / z')" | 
| 3404 | by (simp add: nz') | |
| 3405 | also have "... = cmod (z' - x)" | |
| 3406 | by (simp add: \<open>z' \<noteq> 0\<close> diff_divide_eq_iff norm_divide) | |
| 3407 | finally show ?thesis . | |
| 3408 | qed | |
| 72245 | 3409 | have 3: "(z'*x / z)^n = x^n" if "x \<noteq> 0" for x | 
| 64287 | 3410 | using z' that by (simp add: field_simps \<open>z \<noteq> 0\<close>) | 
| 72245 | 3411 | have 4: "cmod (z' - z' * x / z) = cmod (z - x)" if "x \<noteq> 0" for x | 
| 64287 | 3412 | proof - | 
| 3413 | have "cmod (z * (1 - x * inverse z)) = cmod (z - x)" | |
| 3414 | by (metis \<open>z \<noteq> 0\<close> diff_divide_distrib divide_complex_def divide_self_if nonzero_eq_divide_eq semiring_normalization_rules(7)) | |
| 3415 | then show ?thesis | |
| 68499 
d4312962161a
Rationalisation of complex transcendentals, esp the Arg function
 paulson <lp15@cam.ac.uk> parents: 
68072diff
changeset | 3416 | by (metis (no_types) mult.assoc divide_complex_def mult.right_neutral norm_mult nz' right_diff_distrib') | 
| 64287 | 3417 | qed | 
| 3418 | show ?thesis | |
| 72245 | 3419 | by (simp add: set_eq_iff image_def ball_def) (metis 1 2 3 4 diff_zero dist_norm nz') | 
| 64287 | 3420 | qed | 
| 3421 | then show ?thesis by blast | |
| 3422 | qed | |
| 66884 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3423 | |
| 64287 | 3424 | have ex_ball: "\<exists>B. (\<exists>z'. B = ball z' d \<and> z'^n = z^n) \<and> x \<in> B" | 
| 3425 | if "x \<noteq> 0" and eq: "x^n = w^n" and dzw: "dist z w < d" for x w | |
| 3426 | proof - | |
| 3427 | have "w \<noteq> 0" by (metis assms power_eq_0_iff that(1) that(2)) | |
| 3428 | have [simp]: "cmod x = cmod w" | |
| 3429 | using assms power_eq_imp_eq_norm eq by blast | |
| 3430 | have [simp]: "cmod (x * z / w - x) = cmod (z - w)" | |
| 3431 | proof - | |
| 3432 | have "cmod (x * z / w - x) = cmod x * cmod (z / w - 1)" | |
| 3433 | by (metis (no_types) mult.right_neutral norm_mult right_diff_distrib' times_divide_eq_right) | |
| 3434 | also have "... = cmod w * cmod (z / w - 1)" | |
| 3435 | by simp | |
| 3436 | also have "... = cmod (z - w)" | |
| 3437 | by (simp add: \<open>w \<noteq> 0\<close> divide_diff_eq_iff nonzero_norm_divide) | |
| 3438 | finally show ?thesis . | |
| 3439 | qed | |
| 3440 | show ?thesis | |
| 72245 | 3441 | proof (intro exI conjI) | 
| 3442 | show "(z / w * x) ^ n = z ^ n" | |
| 3443 | by (metis \<open>w \<noteq> 0\<close> eq nonzero_eq_divide_eq power_mult_distrib) | |
| 3444 | show "x \<in> ball (z / w * x) d" | |
| 3445 | using \<open>d > 0\<close> that | |
| 3446 | by (simp add: ball_eq_ball_iff \<open>z \<noteq> 0\<close> \<open>w \<noteq> 0\<close> field_simps) (simp add: dist_norm) | |
| 3447 | qed auto | |
| 64287 | 3448 | qed | 
| 66884 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3449 | |
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3450 | show ?thesis | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3451 | proof (rule exI, intro conjI) | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3452 | show "z ^ n \<in> (\<lambda>w. w ^ n) ` ball z d" | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3453 | using \<open>d > 0\<close> by simp | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3454 | show "open ((\<lambda>w. w ^ n) ` ball z d)" | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3455 | by (rule invariance_of_domain [OF cont open_ball inj]) | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3456 | show "0 \<notin> (\<lambda>w. w ^ n) ` ball z d" | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3457 | using \<open>z \<noteq> 0\<close> assms by (force simp: d_def) | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3458 |       show "\<exists>v. \<Union>v = - {0} \<inter> (\<lambda>z. z ^ n) -` (\<lambda>w. w ^ n) ` ball z d \<and>
 | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3459 | (\<forall>u\<in>v. open u \<and> 0 \<notin> u) \<and> | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3460 | disjoint v \<and> | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3461 | (\<forall>u\<in>v. Ex (homeomorphism u ((\<lambda>w. w ^ n) ` ball z d) (\<lambda>z. z ^ n)))" | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3462 | proof (rule exI, intro ballI conjI) | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3463 |         show "\<Union>{ball z' d |z'. z'^n = z^n} = - {0} \<inter> (\<lambda>z. z ^ n) -` (\<lambda>w. w ^ n) ` ball z d" (is "?l = ?r")
 | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3464 | proof | 
| 72245 | 3465 | have "\<And>z'. cmod z' < d \<Longrightarrow> z' ^ n \<noteq> z ^ n" | 
| 3466 | by (auto simp add: assms d_def power_eq_imp_eq_norm that) | |
| 3467 | then show "?l \<subseteq> ?r" | |
| 3468 | by auto (metis im_eq image_eqI mem_ball) | |
| 66884 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3469 | show "?r \<subseteq> ?l" | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3470 | by auto (meson ex_ball) | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3471 | qed | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3472 |         show "\<And>u. u \<in> {ball z' d |z'. z' ^ n = z ^ n} \<Longrightarrow> 0 \<notin> u"
 | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3473 | by (force simp add: assms d_def power_eq_imp_eq_norm that) | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3474 | |
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3475 |         show "disjoint {ball z' d |z'. z' ^ n = z ^ n}"
 | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3476 | proof (clarsimp simp add: pairwise_def disjnt_iff) | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3477 | fix \<xi> \<zeta> x | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3478 | assume "\<xi>^n = z^n" "\<zeta>^n = z^n" "ball \<xi> d \<noteq> ball \<zeta> d" | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3479 | and "dist \<xi> x < d" "dist \<zeta> x < d" | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3480 | then have "dist \<xi> \<zeta> < d+d" | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3481 | using dist_triangle_less_add by blast | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3482 | then have "cmod (\<xi> - \<zeta>) < 2*d" | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3483 | by (simp add: dist_norm) | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3484 | also have "... \<le> e * cmod z" | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3485 | using mult_right_mono \<open>0 < e\<close> that by (auto simp: d_def) | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3486 | finally have "cmod (\<xi> - \<zeta>) < e * cmod z" . | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3487 | with e have "\<xi> = \<zeta>" | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3488 | by (metis \<open>\<xi>^n = z^n\<close> \<open>\<zeta>^n = z^n\<close> assms power_eq_imp_eq_norm) | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3489 | then show "False" | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3490 | using \<open>ball \<xi> d \<noteq> ball \<zeta> d\<close> by blast | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3491 | qed | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3492 | show "Ex (homeomorphism u ((\<lambda>w. w ^ n) ` ball z d) (\<lambda>z. z ^ n))" | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3493 |           if "u \<in> {ball z' d |z'. z' ^ n = z ^ n}" for u
 | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3494 | proof (rule invariance_of_domain_homeomorphism [of "u" "\<lambda>z. z^n"]) | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3495 | show "open u" | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3496 | using that by auto | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3497 | show "continuous_on u (\<lambda>z. z ^ n)" | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3498 | by (intro continuous_intros) | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3499 | show "inj_on (\<lambda>z. z ^ n) u" | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3500 | using that by (auto simp: iff_x_eq_y inj_on_def) | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3501 | show "\<And>g. homeomorphism u ((\<lambda>z. z ^ n) ` u) (\<lambda>z. z ^ n) g \<Longrightarrow> Ex (homeomorphism u ((\<lambda>w. w ^ n) ` ball z d) (\<lambda>z. z ^ n))" | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3502 | using im_eq that by clarify metis | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3503 | qed auto | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3504 | qed auto | 
| 64287 | 3505 | qed | 
| 3506 | qed | |
| 3507 | show ?thesis | |
| 3508 | using assms | |
| 3509 | apply (simp add: covering_space_def zn1 zn2) | |
| 3510 | apply (subst zn2 [symmetric]) | |
| 72245 | 3511 | apply (simp add: openin_open_eq open_Compl zn3) | 
| 64287 | 3512 | done | 
| 3513 | qed | |
| 3514 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3515 | corollary covering_space_square_punctured_plane: | 
| 64287 | 3516 |   "covering_space (- {0}) (\<lambda>z::complex. z^2) (- {0})"
 | 
| 70136 | 3517 | by (simp add: covering_space_power_punctured_plane) | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68634diff
changeset | 3518 | |
| 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68634diff
changeset | 3519 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3520 | proposition covering_space_exp_punctured_plane: | 
| 64287 | 3521 |   "covering_space UNIV (\<lambda>z::complex. exp z) (- {0})"
 | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3522 | proof (simp add: covering_space_def, intro conjI ballI) | 
| 64287 | 3523 | show "continuous_on UNIV (\<lambda>z::complex. exp z)" | 
| 3524 | by (rule continuous_on_exp [OF continuous_on_id]) | |
| 3525 |   show "range exp = - {0::complex}"
 | |
| 3526 | by auto (metis exp_Ln range_eqI) | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3527 |   show "\<exists>T. z \<in> T \<and> openin (top_of_set (- {0})) T \<and>
 | 
| 66884 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 3528 | (\<exists>v. \<Union>v = exp -` T \<and> (\<forall>u\<in>v. open u) \<and> disjoint v \<and> | 
| 64287 | 3529 | (\<forall>u\<in>v. \<exists>q. homeomorphism u T exp q))" | 
| 3530 |         if "z \<in> - {0::complex}" for z
 | |
| 3531 | proof - | |
| 3532 | have "z \<noteq> 0" | |
| 3533 | using that by auto | |
| 72245 | 3534 | have "ball (Ln z) 1 \<subseteq> ball (Ln z) pi" | 
| 64287 | 3535 | using pi_ge_two by (simp add: ball_subset_ball_iff) | 
| 72245 | 3536 | then have inj_exp: "inj_on exp (ball (Ln z) 1)" | 
| 3537 | using inj_on_exp_pi inj_on_subset by blast | |
| 76944 | 3538 | define twopi where "twopi \<equiv> \<lambda>n. of_real (2 * of_int n * pi) * \<i>" | 
| 3539 | define \<V> where "\<V> \<equiv> range (\<lambda>n. (\<lambda>x. x + twopi n) ` (ball(Ln z) 1))" | |
| 3540 | have exp_eq': "exp w = exp z \<longleftrightarrow> (\<exists>n::int. w = z + twopi n)" for z w | |
| 3541 | by (simp add: exp_eq twopi_def) | |
| 64287 | 3542 | show ?thesis | 
| 3543 | proof (intro exI conjI) | |
| 3544 | show "z \<in> exp ` (ball(Ln z) 1)" | |
| 3545 | by (metis \<open>z \<noteq> 0\<close> centre_in_ball exp_Ln rev_image_eqI zero_less_one) | |
| 3546 |       have "open (- {0::complex})"
 | |
| 3547 | by blast | |
| 72245 | 3548 |       with inj_exp show "openin (top_of_set (- {0})) (exp ` ball (Ln z) 1)"
 | 
| 64287 | 3549 | by (auto simp: openin_open_eq invariance_of_domain continuous_on_exp [OF continuous_on_id]) | 
| 76944 | 3550 | show UV: "\<Union>\<V> = exp -` exp ` ball (Ln z) 1" | 
| 3551 | by (force simp: \<V>_def twopi_def Complex_Transcendental.exp_eq image_iff) | |
| 64287 | 3552 | show "\<forall>V\<in>\<V>. open V" | 
| 3553 | by (auto simp: \<V>_def inj_on_def continuous_intros invariance_of_domain) | |
| 76944 | 3554 | have "2 \<le> cmod (twopi m -twopi n)" if "m \<noteq> n" for m n | 
| 64287 | 3555 | proof - | 
| 76944 | 3556 | have "1 \<le> abs (m - n)" | 
| 64287 | 3557 | using that by linarith | 
| 76944 | 3558 | then have "1 \<le> cmod (of_int m - of_int n) * 1" | 
| 64287 | 3559 | by (metis mult.right_neutral norm_of_int of_int_1_le_iff of_int_abs of_int_diff) | 
| 76944 | 3560 | also have "... \<le> cmod (of_int m - of_int n) * of_real pi" | 
| 72245 | 3561 | using pi_ge_two | 
| 3562 | by (intro mult_left_mono) auto | |
| 76944 | 3563 | also have "... \<le> cmod ((of_int m - of_int n) * of_real pi * \<i>)" | 
| 64287 | 3564 | by (simp add: norm_mult) | 
| 76944 | 3565 | also have "... \<le> cmod (of_int m * of_real pi * \<i> - of_int n * of_real pi * \<i>)" | 
| 64287 | 3566 | by (simp add: algebra_simps) | 
| 76944 | 3567 | finally have "1 \<le> cmod (of_int m * of_real pi * \<i> - of_int n * of_real pi * \<i>)" . | 
| 3568 | then have "2 * 1 \<le> cmod (2 * (of_int m * of_real pi * \<i> - of_int n * of_real pi * \<i>))" | |
| 64287 | 3569 | by (metis mult_le_cancel_left_pos norm_mult_numeral1 zero_less_numeral) | 
| 3570 | then show ?thesis | |
| 76944 | 3571 | by (simp add: algebra_simps twopi_def) | 
| 64287 | 3572 | qed | 
| 76944 | 3573 | then show "disjoint \<V>" | 
| 3574 | unfolding \<V>_def pairwise_def disjnt_iff | |
| 3575 | by (smt (verit, best) add.commute add_diff_cancel_left' add_diff_eq dist_commute dist_complex_def dist_triangle imageE mem_ball) | |
| 64287 | 3576 | show "\<forall>u\<in>\<V>. \<exists>q. homeomorphism u (exp ` ball (Ln z) 1) exp q" | 
| 3577 | proof | |
| 3578 | fix u | |
| 3579 | assume "u \<in> \<V>" | |
| 76944 | 3580 | then obtain n where n: "u = (\<lambda>x. x + twopi n) ` (ball(Ln z) 1)" | 
| 64287 | 3581 | by (auto simp: \<V>_def) | 
| 3582 | have "compact (cball (Ln z) 1)" | |
| 3583 | by simp | |
| 3584 | moreover have "continuous_on (cball (Ln z) 1) exp" | |
| 3585 | by (rule continuous_on_exp [OF continuous_on_id]) | |
| 3586 | moreover have "inj_on exp (cball (Ln z) 1)" | |
| 76944 | 3587 | using pi_ge_two inj_on_subset [OF inj_on_exp_pi [of "Ln z"]] | 
| 3588 | by (simp add: subset_iff) | |
| 64287 | 3589 | ultimately obtain \<gamma> where hom: "homeomorphism (cball (Ln z) 1) (exp ` cball (Ln z) 1) exp \<gamma>" | 
| 3590 | using homeomorphism_compact by blast | |
| 3591 | have eq1: "exp ` u = exp ` ball (Ln z) 1" | |
| 76944 | 3592 | by (smt (verit) n exp_eq' image_cong image_image) | 
| 3593 | have \<gamma>exp: "\<gamma> (exp x) + twopi n = x" if "x \<in> u" for x | |
| 64287 | 3594 | proof - | 
| 76944 | 3595 | have "exp x = exp (x - twopi n)" | 
| 3596 | using exp_eq' by auto | |
| 3597 | then have "\<gamma> (exp x) = \<gamma> (exp (x - twopi n))" | |
| 64287 | 3598 | by simp | 
| 76944 | 3599 | also have "... = x - twopi n" | 
| 72245 | 3600 | using \<open>x \<in> u\<close> by (auto simp: n intro: homeomorphism_apply1 [OF hom]) | 
| 64287 | 3601 | finally show ?thesis | 
| 3602 | by simp | |
| 3603 | qed | |
| 76944 | 3604 | have exp2n: "exp (\<gamma> (exp x) + twopi n) = exp x" if "dist (Ln z) x < 1" for x | 
| 3605 | by (metis \<gamma>exp exp_eq' imageI mem_ball n that) | |
| 72245 | 3606 | have "continuous_on (exp ` ball (Ln z) 1) \<gamma>" | 
| 3607 | by (meson ball_subset_cball continuous_on_subset hom homeomorphism_cont2 image_mono) | |
| 76944 | 3608 | then have cont: "continuous_on (exp ` ball (Ln z) 1) (\<lambda>x. \<gamma> x + twopi n)" | 
| 72245 | 3609 | by (intro continuous_intros) | 
| 76944 | 3610 | have "homeomorphism u (exp ` ball (Ln z) 1) exp ((\<lambda>x. x + twopi n) \<circ> \<gamma>)" | 
| 64287 | 3611 | unfolding homeomorphism_def | 
| 3612 | apply (intro conjI ballI eq1 continuous_on_exp [OF continuous_on_id]) | |
| 3613 | apply (auto simp: \<gamma>exp exp2n cont n) | |
| 72245 | 3614 | apply (force simp: image_iff homeomorphism_apply1 [OF hom])+ | 
| 64287 | 3615 | done | 
| 76944 | 3616 | then show "\<exists>q. homeomorphism u (exp ` ball (Ln z) 1) exp q" by metis | 
| 64287 | 3617 | qed | 
| 3618 | qed | |
| 3619 | qed | |
| 3620 | qed | |
| 3621 | ||
| 64845 | 3622 | |
| 69683 | 3623 | subsection\<open>Hence the Borsukian results about mappings into circles\<close>(*FIX ME title *) | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3624 | |
| 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3625 | lemma inessential_eq_continuous_logarithm: | 
| 64845 | 3626 | fixes f :: "'a::real_normed_vector \<Rightarrow> complex" | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 3627 |   shows "(\<exists>a. homotopic_with_canon (\<lambda>h. True) S (-{0}) f (\<lambda>t. a)) \<longleftrightarrow>
 | 
| 64845 | 3628 | (\<exists>g. continuous_on S g \<and> (\<forall>x \<in> S. f x = exp(g x)))" | 
| 3629 | (is "?lhs \<longleftrightarrow> ?rhs") | |
| 3630 | proof | |
| 3631 | assume ?lhs thus ?rhs | |
| 3632 | by (metis covering_space_lift_inessential_function covering_space_exp_punctured_plane) | |
| 3633 | next | |
| 3634 | assume ?rhs | |
| 3635 | then obtain g where contg: "continuous_on S g" and f: "\<And>x. x \<in> S \<Longrightarrow> f x = exp(g x)" | |
| 3636 | by metis | |
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 3637 |   obtain a where "homotopic_with_canon (\<lambda>h. True) S (- {of_real 0}) (exp \<circ> g) (\<lambda>x. a)"
 | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 3638 | proof (rule nullhomotopic_through_contractible [OF contg _ _ _ contractible_UNIV]) | 
| 64845 | 3639 | show "continuous_on (UNIV::complex set) exp" | 
| 3640 | by (intro continuous_intros) | |
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 3641 |     show "exp \<in> UNIV \<rightarrow> -{of_real 0}"
 | 
| 64845 | 3642 | by auto | 
| 3643 | qed force | |
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 3644 |   then have "homotopic_with_canon (\<lambda>h. True) S (- {0}) f (\<lambda>t. a)"
 | 
| 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 3645 | using f homotopic_with_eq by fastforce | 
| 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 3646 | then show ?lhs .. | 
| 64845 | 3647 | qed | 
| 3648 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3649 | corollary inessential_imp_continuous_logarithm_circle: | 
| 64845 | 3650 | fixes f :: "'a::real_normed_vector \<Rightarrow> complex" | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 3651 | assumes "homotopic_with_canon (\<lambda>h. True) S (sphere 0 1) f (\<lambda>t. a)" | 
| 64845 | 3652 | obtains g where "continuous_on S g" and "\<And>x. x \<in> S \<Longrightarrow> f x = exp(g x)" | 
| 3653 | proof - | |
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 3654 |   have "homotopic_with_canon (\<lambda>h. True) S (- {0}) f (\<lambda>t. a)"
 | 
| 64845 | 3655 | using assms homotopic_with_subset_right by fastforce | 
| 3656 | then show ?thesis | |
| 3657 | by (metis inessential_eq_continuous_logarithm that) | |
| 3658 | qed | |
| 3659 | ||
| 3660 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3661 | lemma inessential_eq_continuous_logarithm_circle: | 
| 64845 | 3662 | fixes f :: "'a::real_normed_vector \<Rightarrow> complex" | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 3663 | shows "(\<exists>a. homotopic_with_canon (\<lambda>h. True) S (sphere 0 1) f (\<lambda>t. a)) \<longleftrightarrow> | 
| 65064 
a4abec71279a
Renamed ii to imaginary_unit in order to free up ii as a variable name.  Also replaced some legacy def commands
 paulson <lp15@cam.ac.uk> parents: 
65037diff
changeset | 3664 | (\<exists>g. continuous_on S g \<and> (\<forall>x \<in> S. f x = exp(\<i> * of_real(g x))))" | 
| 64845 | 3665 | (is "?lhs \<longleftrightarrow> ?rhs") | 
| 3666 | proof | |
| 3667 | assume L: ?lhs | |
| 3668 | then obtain g where contg: "continuous_on S g" and g: "\<And>x. x \<in> S \<Longrightarrow> f x = exp(g x)" | |
| 3669 | using inessential_imp_continuous_logarithm_circle by blast | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 3670 | have "f \<in> S \<rightarrow> sphere 0 1" | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 3671 | by (metis L image_subset_iff_funcset homotopic_with_imp_subset1) | 
| 64845 | 3672 | then have "\<And>x. x \<in> S \<Longrightarrow> Re (g x) = 0" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 3673 | using g by (simp add: Pi_iff) | 
| 64845 | 3674 | then show ?rhs | 
| 72245 | 3675 | by (rule_tac x="Im \<circ> g" in exI) (auto simp: Euler g intro: contg continuous_intros) | 
| 64845 | 3676 | next | 
| 3677 | assume ?rhs | |
| 65064 
a4abec71279a
Renamed ii to imaginary_unit in order to free up ii as a variable name.  Also replaced some legacy def commands
 paulson <lp15@cam.ac.uk> parents: 
65037diff
changeset | 3678 | then obtain g where contg: "continuous_on S g" and g: "\<And>x. x \<in> S \<Longrightarrow> f x = exp(\<i>* of_real(g x))" | 
| 64845 | 3679 | by metis | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 3680 | obtain a where "homotopic_with_canon (\<lambda>h. True) S (sphere 0 1) ((exp \<circ> (\<lambda>z. \<i>*z)) \<circ> (of_real \<circ> g)) (\<lambda>x. a)" | 
| 64845 | 3681 | proof (rule nullhomotopic_through_contractible) | 
| 3682 | show "continuous_on S (complex_of_real \<circ> g)" | |
| 3683 | by (intro conjI contg continuous_intros) | |
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 3684 | show "(complex_of_real \<circ> g) \<in> S \<rightarrow> \<real>" | 
| 64845 | 3685 | by auto | 
| 69064 
5840724b1d71
Prefix form of infix with * on either side no longer needs special treatment
 nipkow parents: 
68833diff
changeset | 3686 | show "continuous_on \<real> (exp \<circ> (*)\<i>)" | 
| 64845 | 3687 | by (intro continuous_intros) | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 3688 | show "(exp \<circ> (*)\<i>) \<in> \<real> \<rightarrow> sphere 0 1" | 
| 64845 | 3689 | by (auto simp: complex_is_Real_iff) | 
| 3690 | qed (auto simp: convex_Reals convex_imp_contractible) | |
| 69064 
5840724b1d71
Prefix form of infix with * on either side no longer needs special treatment
 nipkow parents: 
68833diff
changeset | 3691 | moreover have "\<And>x. x \<in> S \<Longrightarrow> (exp \<circ> (*)\<i> \<circ> (complex_of_real \<circ> g)) x = f x" | 
| 64845 | 3692 | by (simp add: g) | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 3693 | ultimately have "homotopic_with_canon (\<lambda>h. True) S (sphere 0 1) f (\<lambda>t. a)" | 
| 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 3694 | using homotopic_with_eq by force | 
| 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 3695 | then show ?lhs .. | 
| 64845 | 3696 | qed | 
| 3697 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3698 | proposition homotopic_with_sphere_times: | 
| 64845 | 3699 | fixes f :: "'a::real_normed_vector \<Rightarrow> complex" | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 3700 | assumes hom: "homotopic_with_canon (\<lambda>x. True) S (sphere 0 1) f g" and conth: "continuous_on S h" | 
| 64845 | 3701 | and hin: "\<And>x. x \<in> S \<Longrightarrow> h x \<in> sphere 0 1" | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 3702 | shows "homotopic_with_canon (\<lambda>x. True) S (sphere 0 1) (\<lambda>x. f x * h x) (\<lambda>x. g x * h x)" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3703 | proof - | 
| 64845 | 3704 |   obtain k where contk: "continuous_on ({0..1::real} \<times> S) k"
 | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 3705 |              and kim: "k \<in> ({0..1} \<times> S) \<rightarrow> sphere 0 1"
 | 
| 64845 | 3706 | and k0: "\<And>x. k(0, x) = f x" | 
| 3707 | and k1: "\<And>x. k(1, x) = g x" | |
| 3708 | using hom by (auto simp: homotopic_with_def) | |
| 3709 | show ?thesis | |
| 3710 | apply (simp add: homotopic_with) | |
| 76944 | 3711 | apply (rule_tac x="\<lambda>z. k z * (h \<circ> snd)z" in exI) | 
| 72245 | 3712 | using kim hin by (fastforce simp: conth norm_mult k0 k1 intro!: contk continuous_intros)+ | 
| 64845 | 3713 | qed | 
| 3714 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3715 | proposition homotopic_circlemaps_divide: | 
| 64845 | 3716 | fixes f :: "'a::real_normed_vector \<Rightarrow> complex" | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 3717 | shows "homotopic_with_canon (\<lambda>x. True) S (sphere 0 1) f g \<longleftrightarrow> | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 3718 | continuous_on S f \<and> f \<in> S \<rightarrow> sphere 0 1 \<and> | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 3719 | continuous_on S g \<and> g \<in> S \<rightarrow> sphere 0 1 \<and> | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 3720 | (\<exists>c. homotopic_with_canon (\<lambda>x. True) S (sphere 0 1) (\<lambda>x. f x / g x) (\<lambda>x. c))" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3721 | proof - | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 3722 | have "homotopic_with_canon (\<lambda>x. True) S (sphere 0 1) (\<lambda>x. f x / g x) (\<lambda>x. 1)" | 
| 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 3723 | if "homotopic_with_canon (\<lambda>x. True) S (sphere 0 1) (\<lambda>x. f x / g x) (\<lambda>x. c)" for c | 
| 64845 | 3724 | proof - | 
| 3725 |     have "S = {} \<or> path_component (sphere 0 1) 1 c"
 | |
| 3726 | using homotopic_with_imp_subset2 [OF that] path_connected_sphere [of "0::complex" 1] | |
| 3727 | by (auto simp: path_connected_component) | |
| 78336 | 3728 | with subtopology_empty_iff_trivial | 
| 3729 | have "homotopic_with_canon (\<lambda>x. True) S (sphere 0 1) (\<lambda>x. 1) (\<lambda>x. c)" | |
| 3730 | by (force simp add: homotopic_constant_maps) | |
| 64845 | 3731 | then show ?thesis | 
| 3732 | using homotopic_with_symD homotopic_with_trans that by blast | |
| 3733 | qed | |
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 3734 | then have *: "(\<exists>c. homotopic_with_canon (\<lambda>x. True) S (sphere 0 1) (\<lambda>x. f x / g x) (\<lambda>x. c)) \<longleftrightarrow> | 
| 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 3735 | homotopic_with_canon (\<lambda>x. True) S (sphere 0 1) (\<lambda>x. f x / g x) (\<lambda>x. 1)" | 
| 64845 | 3736 | by auto | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 3737 | have "homotopic_with_canon (\<lambda>x. True) S (sphere 0 1) f g \<longleftrightarrow> | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 3738 | continuous_on S f \<and> f \<in> S \<rightarrow> sphere 0 1 \<and> | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 3739 | continuous_on S g \<and> g \<in> S \<rightarrow> sphere 0 1 \<and> | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 3740 | homotopic_with_canon (\<lambda>x. True) S (sphere 0 1) (\<lambda>x. f x / g x) (\<lambda>x. 1)" | 
| 64845 | 3741 | (is "?lhs \<longleftrightarrow> ?rhs") | 
| 3742 | proof | |
| 3743 | assume L: ?lhs | |
| 3744 | have geq1 [simp]: "\<And>x. x \<in> S \<Longrightarrow> cmod (g x) = 1" | |
| 3745 | using homotopic_with_imp_subset2 [OF L] | |
| 3746 | by (simp add: image_subset_iff) | |
| 3747 | have cont: "continuous_on S (inverse \<circ> g)" | |
| 72245 | 3748 | proof (rule continuous_intros) | 
| 3749 | show "continuous_on S g" | |
| 3750 | using homotopic_with_imp_continuous [OF L] by blast | |
| 3751 | show "continuous_on (g ` S) inverse" | |
| 3752 | by (rule continuous_on_subset [of "sphere 0 1", OF continuous_on_inverse]) auto | |
| 3753 | qed | |
| 3754 | have [simp]: "\<And>x. x \<in> S \<Longrightarrow> g x \<noteq> 0" | |
| 3755 | using geq1 by fastforce | |
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 3756 | have "homotopic_with_canon (\<lambda>x. True) S (sphere 0 1) (\<lambda>x. f x / g x) (\<lambda>x. 1)" | 
| 76944 | 3757 | using homotopic_with_eq [OF homotopic_with_sphere_times [OF L cont]] | 
| 72245 | 3758 | by (auto simp: divide_inverse norm_inverse) | 
| 64845 | 3759 | with L show ?rhs | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 3760 | by (simp add: homotopic_with_imp_continuous homotopic_with_imp_funspace1) | 
| 64845 | 3761 | next | 
| 3762 | assume ?rhs then show ?lhs | |
| 71771 
7c0de1eb6075
removal of symmetries in Polytope, plus some tidying
 paulson <lp15@cam.ac.uk> parents: 
71745diff
changeset | 3763 | by (elim conjE homotopic_with_eq [OF homotopic_with_sphere_times]; force) | 
| 64845 | 3764 | qed | 
| 3765 | then show ?thesis | |
| 3766 | by (simp add: *) | |
| 3767 | qed | |
| 3768 | ||
| 69683 | 3769 | subsection\<open>Upper and lower hemicontinuous functions\<close> | 
| 64845 | 3770 | |
| 3771 | text\<open>And relation in the case of preimage map to open and closed maps, and fact that upper and lower | |
| 3772 | hemicontinuity together imply continuity in the sense of the Hausdorff metric (at points where the | |
| 3773 | function gives a bounded and nonempty set).\<close> | |
| 3774 | ||
| 3775 | ||
| 3776 | text\<open>Many similar proofs below.\<close> | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3777 | lemma upper_hemicontinuous: | 
| 64845 | 3778 | assumes "\<And>x. x \<in> S \<Longrightarrow> f x \<subseteq> T" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3779 | shows "((\<forall>U. openin (top_of_set T) U | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3780 |                  \<longrightarrow> openin (top_of_set S) {x \<in> S. f x \<subseteq> U}) \<longleftrightarrow>
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3781 | (\<forall>U. closedin (top_of_set T) U | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3782 |                  \<longrightarrow> closedin (top_of_set S) {x \<in> S. f x \<inter> U \<noteq> {}}))"
 | 
| 64845 | 3783 | (is "?lhs = ?rhs") | 
| 3784 | proof (intro iffI allI impI) | |
| 3785 | fix U | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3786 | assume * [rule_format]: ?lhs and "closedin (top_of_set T) U" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3787 | then have "openin (top_of_set T) (T - U)" | 
| 64845 | 3788 | by (simp add: openin_diff) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3789 |   then have "openin (top_of_set S) {x \<in> S. f x \<subseteq> T - U}"
 | 
| 64845 | 3790 | using * [of "T-U"] by blast | 
| 3791 |   moreover have "S - {x \<in> S. f x \<subseteq> T - U} = {x \<in> S. f x \<inter> U \<noteq> {}}"
 | |
| 3792 | using assms by blast | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3793 |   ultimately show "closedin (top_of_set S) {x \<in> S. f x \<inter> U \<noteq> {}}"
 | 
| 64845 | 3794 | by (simp add: openin_closedin_eq) | 
| 3795 | next | |
| 3796 | fix U | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3797 | assume * [rule_format]: ?rhs and "openin (top_of_set T) U" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3798 | then have "closedin (top_of_set T) (T - U)" | 
| 64845 | 3799 | by (simp add: closedin_diff) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3800 |   then have "closedin (top_of_set S) {x \<in> S. f x \<inter> (T - U) \<noteq> {}}"
 | 
| 64845 | 3801 | using * [of "T-U"] by blast | 
| 3802 |   moreover have "{x \<in> S. f x \<inter> (T - U) \<noteq> {}} = S - {x \<in> S. f x \<subseteq> U}"
 | |
| 3803 | using assms by auto | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3804 |   ultimately show "openin (top_of_set S) {x \<in> S. f x \<subseteq> U}"
 | 
| 64845 | 3805 | by (simp add: openin_closedin_eq) | 
| 3806 | qed | |
| 3807 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3808 | lemma lower_hemicontinuous: | 
| 64845 | 3809 | assumes "\<And>x. x \<in> S \<Longrightarrow> f x \<subseteq> T" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3810 | shows "((\<forall>U. closedin (top_of_set T) U | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3811 |                  \<longrightarrow> closedin (top_of_set S) {x \<in> S. f x \<subseteq> U}) \<longleftrightarrow>
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3812 | (\<forall>U. openin (top_of_set T) U | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3813 |                  \<longrightarrow> openin (top_of_set S) {x \<in> S. f x \<inter> U \<noteq> {}}))"
 | 
| 64845 | 3814 | (is "?lhs = ?rhs") | 
| 3815 | proof (intro iffI allI impI) | |
| 3816 | fix U | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3817 | assume * [rule_format]: ?lhs and "openin (top_of_set T) U" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3818 | then have "closedin (top_of_set T) (T - U)" | 
| 64845 | 3819 | by (simp add: closedin_diff) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3820 |   then have "closedin (top_of_set S) {x \<in> S. f x \<subseteq> T-U}"
 | 
| 64845 | 3821 | using * [of "T-U"] by blast | 
| 3822 |   moreover have "{x \<in> S. f x \<subseteq> T-U} = S - {x \<in> S. f x \<inter> U \<noteq> {}}"
 | |
| 3823 | using assms by auto | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3824 |   ultimately show "openin (top_of_set S) {x \<in> S. f x \<inter> U \<noteq> {}}"
 | 
| 64845 | 3825 | by (simp add: openin_closedin_eq) | 
| 3826 | next | |
| 3827 | fix U | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3828 | assume * [rule_format]: ?rhs and "closedin (top_of_set T) U" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3829 | then have "openin (top_of_set T) (T - U)" | 
| 64845 | 3830 | by (simp add: openin_diff) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3831 |   then have "openin (top_of_set S) {x \<in> S. f x \<inter> (T - U) \<noteq> {}}"
 | 
| 64845 | 3832 | using * [of "T-U"] by blast | 
| 3833 |   moreover have "S - {x \<in> S. f x \<inter> (T - U) \<noteq> {}} = {x \<in> S. f x \<subseteq> U}"
 | |
| 3834 | using assms by blast | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3835 |   ultimately show "closedin (top_of_set S) {x \<in> S. f x \<subseteq> U}"
 | 
| 64845 | 3836 | by (simp add: openin_closedin_eq) | 
| 3837 | qed | |
| 3838 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3839 | lemma open_map_iff_lower_hemicontinuous_preimage: | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 3840 | assumes "f \<in> S \<rightarrow> T" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3841 | shows "((\<forall>U. openin (top_of_set S) U | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3842 | \<longrightarrow> openin (top_of_set T) (f ` U)) \<longleftrightarrow> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3843 | (\<forall>U. closedin (top_of_set S) U | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3844 |                  \<longrightarrow> closedin (top_of_set T) {y \<in> T. {x. x \<in> S \<and> f x = y} \<subseteq> U}))"
 | 
| 64845 | 3845 | (is "?lhs = ?rhs") | 
| 3846 | proof (intro iffI allI impI) | |
| 3847 | fix U | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3848 | assume * [rule_format]: ?lhs and "closedin (top_of_set S) U" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3849 | then have "openin (top_of_set S) (S - U)" | 
| 64845 | 3850 | by (simp add: openin_diff) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3851 | then have "openin (top_of_set T) (f ` (S - U))" | 
| 64845 | 3852 | using * [of "S-U"] by blast | 
| 3853 |   moreover have "T - (f ` (S - U)) = {y \<in> T. {x \<in> S. f x = y} \<subseteq> U}"
 | |
| 3854 | using assms by blast | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3855 |   ultimately show "closedin (top_of_set T) {y \<in> T. {x \<in> S. f x = y} \<subseteq> U}"
 | 
| 64845 | 3856 | by (simp add: openin_closedin_eq) | 
| 3857 | next | |
| 3858 | fix U | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3859 | assume * [rule_format]: ?rhs and opeSU: "openin (top_of_set S) U" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3860 | then have "closedin (top_of_set S) (S - U)" | 
| 64845 | 3861 | by (simp add: closedin_diff) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3862 |   then have "closedin (top_of_set T) {y \<in> T. {x \<in> S. f x = y} \<subseteq> S - U}"
 | 
| 64845 | 3863 | using * [of "S-U"] by blast | 
| 3864 |   moreover have "{y \<in> T. {x \<in> S. f x = y} \<subseteq> S - U} = T - (f ` U)"
 | |
| 3865 | using assms openin_imp_subset [OF opeSU] by auto | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3866 | ultimately show "openin (top_of_set T) (f ` U)" | 
| 64845 | 3867 | using assms openin_imp_subset [OF opeSU] by (force simp: openin_closedin_eq) | 
| 3868 | qed | |
| 3869 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3870 | lemma closed_map_iff_upper_hemicontinuous_preimage: | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 3871 | assumes "f \<in> S \<rightarrow> T" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3872 | shows "((\<forall>U. closedin (top_of_set S) U | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3873 | \<longrightarrow> closedin (top_of_set T) (f ` U)) \<longleftrightarrow> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3874 | (\<forall>U. openin (top_of_set S) U | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3875 |                  \<longrightarrow> openin (top_of_set T) {y \<in> T. {x. x \<in> S \<and> f x = y} \<subseteq> U}))"
 | 
| 64845 | 3876 | (is "?lhs = ?rhs") | 
| 3877 | proof (intro iffI allI impI) | |
| 3878 | fix U | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3879 | assume * [rule_format]: ?lhs and opeSU: "openin (top_of_set S) U" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3880 | then have "closedin (top_of_set S) (S - U)" | 
| 64845 | 3881 | by (simp add: closedin_diff) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3882 | then have "closedin (top_of_set T) (f ` (S - U))" | 
| 64845 | 3883 | using * [of "S-U"] by blast | 
| 3884 |   moreover have "f ` (S - U) = T -  {y \<in> T. {x. x \<in> S \<and> f x = y} \<subseteq> U}"
 | |
| 3885 | using assms openin_imp_subset [OF opeSU] by auto | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3886 |   ultimately show "openin (top_of_set T)  {y \<in> T. {x. x \<in> S \<and> f x = y} \<subseteq> U}"
 | 
| 64845 | 3887 | using assms openin_imp_subset [OF opeSU] by (force simp: openin_closedin_eq) | 
| 3888 | next | |
| 3889 | fix U | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3890 | assume * [rule_format]: ?rhs and cloSU: "closedin (top_of_set S) U" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3891 | then have "openin (top_of_set S) (S - U)" | 
| 64845 | 3892 | by (simp add: openin_diff) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3893 |   then have "openin (top_of_set T) {y \<in> T. {x \<in> S. f x = y} \<subseteq> S - U}"
 | 
| 64845 | 3894 | using * [of "S-U"] by blast | 
| 3895 |   moreover have "(f ` U) = T - {y \<in> T. {x \<in> S. f x = y} \<subseteq> S - U}"
 | |
| 3896 | using assms closedin_imp_subset [OF cloSU] by auto | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3897 | ultimately show "closedin (top_of_set T) (f ` U)" | 
| 64845 | 3898 | by (simp add: openin_closedin_eq) | 
| 3899 | qed | |
| 3900 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3901 | proposition upper_lower_hemicontinuous_explicit: | 
| 64845 | 3902 |   fixes T :: "('b::{real_normed_vector,heine_borel}) set"
 | 
| 3903 | assumes fST: "\<And>x. x \<in> S \<Longrightarrow> f x \<subseteq> T" | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3904 | and ope: "\<And>U. openin (top_of_set T) U | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3905 |                      \<Longrightarrow> openin (top_of_set S) {x \<in> S. f x \<subseteq> U}"
 | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3906 | and clo: "\<And>U. closedin (top_of_set T) U | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3907 |                      \<Longrightarrow> closedin (top_of_set S) {x \<in> S. f x \<subseteq> U}"
 | 
| 64845 | 3908 |       and "x \<in> S" "0 < e" and bofx: "bounded(f x)" and fx_ne: "f x \<noteq> {}"
 | 
| 3909 | obtains d where "0 < d" | |
| 3910 | "\<And>x'. \<lbrakk>x' \<in> S; dist x x' < d\<rbrakk> | |
| 3911 | \<Longrightarrow> (\<forall>y \<in> f x. \<exists>y'. y' \<in> f x' \<and> dist y y' < e) \<and> | |
| 3912 | (\<forall>y' \<in> f x'. \<exists>y. y \<in> f x \<and> dist y' y < e)" | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3913 | proof - | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3914 |   have "openin (top_of_set T) (T \<inter> (\<Union>a\<in>f x. \<Union>b\<in>ball 0 e. {a + b}))"
 | 
| 64845 | 3915 | by (auto simp: open_sums openin_open_Int) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3916 | with ope have "openin (top_of_set S) | 
| 64845 | 3917 |                     {u \<in> S. f u \<subseteq> T \<inter> (\<Union>a\<in>f x. \<Union>b\<in>ball 0 e. {a + b})}" by blast
 | 
| 3918 | with \<open>0 < e\<close> \<open>x \<in> S\<close> obtain d1 where "d1 > 0" and | |
| 3919 |          d1: "\<And>x'. \<lbrakk>x' \<in> S; dist x' x < d1\<rbrakk> \<Longrightarrow> f x' \<subseteq> T \<and> f x' \<subseteq> (\<Union>a \<in> f x. \<Union>b \<in> ball 0 e. {a + b})"
 | |
| 3920 | by (force simp: openin_euclidean_subtopology_iff dest: fST) | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3921 | have oo: "\<And>U. openin (top_of_set T) U \<Longrightarrow> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3922 |                  openin (top_of_set S) {x \<in> S. f x \<inter> U \<noteq> {}}"
 | 
| 76944 | 3923 | using lower_hemicontinuous fST clo by blast | 
| 64845 | 3924 | have "compact (closure(f x))" | 
| 3925 | by (simp add: bofx) | |
| 3926 | moreover have "closure(f x) \<subseteq> (\<Union>a \<in> f x. ball a (e/2))" | |
| 3927 | using \<open>0 < e\<close> by (force simp: closure_approachable simp del: divide_const_simps) | |
| 3928 | ultimately obtain C where "C \<subseteq> f x" "finite C" "closure(f x) \<subseteq> (\<Union>a \<in> C. ball a (e/2))" | |
| 76944 | 3929 | by (meson compactE finite_subset_image Elementary_Metric_Spaces.open_ball compactE_image) | 
| 64845 | 3930 | then have fx_cover: "f x \<subseteq> (\<Union>a \<in> C. ball a (e/2))" | 
| 3931 | by (meson closure_subset order_trans) | |
| 3932 |   with fx_ne have "C \<noteq> {}"
 | |
| 3933 | by blast | |
| 3934 |   have xin: "x \<in> (\<Inter>a \<in> C. {x \<in> S. f x \<inter> T \<inter> ball a (e/2) \<noteq> {}})"
 | |
| 3935 | using \<open>x \<in> S\<close> \<open>0 < e\<close> fST \<open>C \<subseteq> f x\<close> by force | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3936 |   have "openin (top_of_set S) {x \<in> S. f x \<inter> (T \<inter> ball a (e/2)) \<noteq> {}}" for a
 | 
| 64845 | 3937 | by (simp add: openin_open_Int oo) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 3938 |   then have "openin (top_of_set S) (\<Inter>a \<in> C. {x \<in> S. f x \<inter> T \<inter> ball a (e/2) \<noteq> {}})"
 | 
| 64845 | 3939 |     by (simp add: Int_assoc openin_INT2 [OF \<open>finite C\<close> \<open>C \<noteq> {}\<close>])
 | 
| 3940 | with xin obtain d2 where "d2>0" | |
| 3941 |               and d2: "\<And>u v. \<lbrakk>u \<in> S; dist u x < d2; v \<in> C\<rbrakk> \<Longrightarrow> f u \<inter> T \<inter> ball v (e/2) \<noteq> {}"
 | |
| 66955 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 3942 | unfolding openin_euclidean_subtopology_iff using xin by fastforce | 
| 64845 | 3943 | show ?thesis | 
| 3944 | proof (intro that conjI ballI) | |
| 3945 | show "0 < min d1 d2" | |
| 3946 | using \<open>0 < d1\<close> \<open>0 < d2\<close> by linarith | |
| 3947 | next | |
| 3948 | fix x' y | |
| 3949 | assume "x' \<in> S" "dist x x' < min d1 d2" "y \<in> f x" | |
| 3950 | then have dd2: "dist x' x < d2" | |
| 3951 | by (auto simp: dist_commute) | |
| 3952 | obtain a where "a \<in> C" "y \<in> ball a (e/2)" | |
| 3953 | using fx_cover \<open>y \<in> f x\<close> by auto | |
| 3954 | then show "\<exists>y'. y' \<in> f x' \<and> dist y y' < e" | |
| 3955 | using d2 [OF \<open>x' \<in> S\<close> dd2] dist_triangle_half_r by fastforce | |
| 3956 | next | |
| 3957 | fix x' y' | |
| 3958 | assume "x' \<in> S" "dist x x' < min d1 d2" "y' \<in> f x'" | |
| 3959 | then have "dist x' x < d1" | |
| 3960 | by (auto simp: dist_commute) | |
| 3961 |     then have "y' \<in> (\<Union>a\<in>f x. \<Union>b\<in>ball 0 e. {a + b})"
 | |
| 3962 | using d1 [OF \<open>x' \<in> S\<close>] \<open>y' \<in> f x'\<close> by force | |
| 3963 | then show "\<exists>y. y \<in> f x \<and> dist y' y < e" | |
| 72245 | 3964 | by clarsimp (metis add_diff_cancel_left' dist_norm) | 
| 64845 | 3965 | qed | 
| 3966 | qed | |
| 3967 | ||
| 3968 | ||
| 69683 | 3969 | subsection\<open>Complex logs exist on various "well-behaved" sets\<close> | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68634diff
changeset | 3970 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3971 | lemma continuous_logarithm_on_contractible: | 
| 64845 | 3972 | fixes f :: "'a::real_normed_vector \<Rightarrow> complex" | 
| 3973 | assumes "continuous_on S f" "contractible S" "\<And>z. z \<in> S \<Longrightarrow> f z \<noteq> 0" | |
| 3974 | obtains g where "continuous_on S g" "\<And>x. x \<in> S \<Longrightarrow> f x = exp(g x)" | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3975 | proof - | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 3976 |   obtain c where hom: "homotopic_with_canon (\<lambda>h. True) S (-{0}) f (\<lambda>x. c)"
 | 
| 64845 | 3977 | using nullhomotopic_from_contractible assms | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 3978 | by (metis imageE subset_Compl_singleton image_subset_iff_funcset) | 
| 64845 | 3979 | then show ?thesis | 
| 66955 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 3980 | by (metis inessential_eq_continuous_logarithm that) | 
| 64845 | 3981 | qed | 
| 3982 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3983 | lemma continuous_logarithm_on_simply_connected: | 
| 64845 | 3984 | fixes f :: "'a::real_normed_vector \<Rightarrow> complex" | 
| 3985 | assumes contf: "continuous_on S f" and S: "simply_connected S" "locally path_connected S" | |
| 3986 | and f: "\<And>z. z \<in> S \<Longrightarrow> f z \<noteq> 0" | |
| 3987 | obtains g where "continuous_on S g" "\<And>x. x \<in> S \<Longrightarrow> f x = exp(g x)" | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3988 | using covering_space_lift [OF covering_space_exp_punctured_plane S contf] | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 3989 | by (metis (full_types) f imageE subset_Compl_singleton image_subset_iff_funcset) | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3990 | |
| 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3991 | lemma continuous_logarithm_on_cball: | 
| 64845 | 3992 | fixes f :: "'a::real_normed_vector \<Rightarrow> complex" | 
| 3993 | assumes "continuous_on (cball a r) f" and "\<And>z. z \<in> cball a r \<Longrightarrow> f z \<noteq> 0" | |
| 3994 | obtains h where "continuous_on (cball a r) h" "\<And>z. z \<in> cball a r \<Longrightarrow> f z = exp(h z)" | |
| 3995 | using assms continuous_logarithm_on_contractible convex_imp_contractible by blast | |
| 3996 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 3997 | lemma continuous_logarithm_on_ball: | 
| 64845 | 3998 | fixes f :: "'a::real_normed_vector \<Rightarrow> complex" | 
| 3999 | assumes "continuous_on (ball a r) f" and "\<And>z. z \<in> ball a r \<Longrightarrow> f z \<noteq> 0" | |
| 4000 | obtains h where "continuous_on (ball a r) h" "\<And>z. z \<in> ball a r \<Longrightarrow> f z = exp(h z)" | |
| 4001 | using assms continuous_logarithm_on_contractible convex_imp_contractible by blast | |
| 4002 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4003 | lemma continuous_sqrt_on_contractible: | 
| 64845 | 4004 | fixes f :: "'a::real_normed_vector \<Rightarrow> complex" | 
| 4005 | assumes "continuous_on S f" "contractible S" | |
| 4006 | and "\<And>z. z \<in> S \<Longrightarrow> f z \<noteq> 0" | |
| 4007 | obtains g where "continuous_on S g" "\<And>x. x \<in> S \<Longrightarrow> f x = (g x) ^ 2" | |
| 4008 | proof - | |
| 4009 | obtain g where contg: "continuous_on S g" and feq: "\<And>x. x \<in> S \<Longrightarrow> f x = exp(g x)" | |
| 4010 | using continuous_logarithm_on_contractible [OF assms] by blast | |
| 4011 | show ?thesis | |
| 4012 | proof | |
| 4013 | show "continuous_on S (\<lambda>z. exp (g z / 2))" | |
| 4014 | by (rule continuous_on_compose2 [of UNIV exp]; intro continuous_intros contg subset_UNIV) auto | |
| 4015 | show "\<And>x. x \<in> S \<Longrightarrow> f x = (exp (g x / 2))\<^sup>2" | |
| 4016 | by (metis exp_double feq nonzero_mult_div_cancel_left times_divide_eq_right zero_neq_numeral) | |
| 4017 | qed | |
| 4018 | qed | |
| 4019 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4020 | lemma continuous_sqrt_on_simply_connected: | 
| 64845 | 4021 | fixes f :: "'a::real_normed_vector \<Rightarrow> complex" | 
| 4022 | assumes contf: "continuous_on S f" and S: "simply_connected S" "locally path_connected S" | |
| 4023 | and f: "\<And>z. z \<in> S \<Longrightarrow> f z \<noteq> 0" | |
| 4024 | obtains g where "continuous_on S g" "\<And>x. x \<in> S \<Longrightarrow> f x = (g x) ^ 2" | |
| 4025 | proof - | |
| 4026 | obtain g where contg: "continuous_on S g" and feq: "\<And>x. x \<in> S \<Longrightarrow> f x = exp(g x)" | |
| 4027 | using continuous_logarithm_on_simply_connected [OF assms] by blast | |
| 4028 | show ?thesis | |
| 4029 | proof | |
| 4030 | show "continuous_on S (\<lambda>z. exp (g z / 2))" | |
| 4031 | by (rule continuous_on_compose2 [of UNIV exp]; intro continuous_intros contg subset_UNIV) auto | |
| 4032 | show "\<And>x. x \<in> S \<Longrightarrow> f x = (exp (g x / 2))\<^sup>2" | |
| 4033 | by (metis exp_double feq nonzero_mult_div_cancel_left times_divide_eq_right zero_neq_numeral) | |
| 4034 | qed | |
| 4035 | qed | |
| 4036 | ||
| 4037 | ||
| 69683 | 4038 | subsection\<open>Another simple case where sphere maps are nullhomotopic\<close> | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68634diff
changeset | 4039 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4040 | lemma inessential_spheremap_2_aux: | 
| 66955 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4041 | fixes f :: "'a::euclidean_space \<Rightarrow> complex" | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4042 |   assumes 2: "2 < DIM('a)" and contf: "continuous_on (sphere a r) f" 
 | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4043 | and fim: "f \<in> (sphere a r) \<rightarrow> (sphere 0 1)" | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 4044 | obtains c where "homotopic_with_canon (\<lambda>z. True) (sphere a r) (sphere 0 1) f (\<lambda>x. c)" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4045 | proof - | 
| 66955 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4046 | obtain g where contg: "continuous_on (sphere a r) g" | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4047 | and feq: "\<And>x. x \<in> sphere a r \<Longrightarrow> f x = exp(g x)" | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4048 | proof (rule continuous_logarithm_on_simply_connected [OF contf]) | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4049 | show "simply_connected (sphere a r)" | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4050 | using 2 by (simp add: simply_connected_sphere_eq) | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4051 | show "locally path_connected (sphere a r)" | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4052 | by (simp add: locally_path_connected_sphere) | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4053 | show "\<And>z. z \<in> sphere a r \<Longrightarrow> f z \<noteq> 0" | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4054 | using fim by force | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4055 | qed auto | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4056 | have "\<exists>g. continuous_on (sphere a r) g \<and> (\<forall>x\<in>sphere a r. f x = exp (\<i> * complex_of_real (g x)))" | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4057 | proof (intro exI conjI) | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4058 | show "continuous_on (sphere a r) (Im \<circ> g)" | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4059 | by (intro contg continuous_intros continuous_on_compose) | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4060 | show "\<forall>x\<in>sphere a r. f x = exp (\<i> * complex_of_real ((Im \<circ> g) x))" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4061 | using exp_eq_polar feq fim norm_exp_eq_Re | 
| 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4062 | by (auto simp flip: image_subset_iff_funcset) | 
| 66955 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4063 | qed | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4064 | with inessential_eq_continuous_logarithm_circle that show ?thesis | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4065 | by metis | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4066 | qed | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4067 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4068 | lemma inessential_spheremap_2: | 
| 66955 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4069 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4070 |   assumes a2: "2 < DIM('a)" and b2: "DIM('b) = 2" 
 | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4071 | and contf: "continuous_on (sphere a r) f" and fim: "f \<in> (sphere a r) \<rightarrow> (sphere b s)" | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 4072 | obtains c where "homotopic_with_canon (\<lambda>z. True) (sphere a r) (sphere b s) f (\<lambda>x. c)" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4073 | proof (cases "s \<le> 0") | 
| 66955 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4074 | case True | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4075 | then show ?thesis | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4076 | using contf contractible_sphere fim nullhomotopic_into_contractible that by blast | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4077 | next | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4078 | case False | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4079 | then have "sphere b s homeomorphic sphere (0::complex) 1" | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4080 | using assms by (simp add: homeomorphic_spheres_gen) | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4081 | then obtain h k where hk: "homeomorphism (sphere b s) (sphere (0::complex) 1) h k" | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4082 | by (auto simp: homeomorphic_def) | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4083 | then have conth: "continuous_on (sphere b s) h" | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4084 | and contk: "continuous_on (sphere 0 1) k" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4085 | and him: "h \<in> sphere b s \<rightarrow> sphere 0 1" | 
| 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4086 | and kim: "k \<in> sphere 0 1 \<rightarrow> sphere b s" | 
| 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4087 | by (force simp: homeomorphism_def)+ | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 4088 | obtain c where "homotopic_with_canon (\<lambda>z. True) (sphere a r) (sphere 0 1) (h \<circ> f) (\<lambda>x. c)" | 
| 66955 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4089 | proof (rule inessential_spheremap_2_aux [OF a2]) | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4090 | show "continuous_on (sphere a r) (h \<circ> f)" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4091 | by (meson contf conth continuous_on_compose continuous_on_subset fim image_subset_iff_funcset) | 
| 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4092 | show "(h \<circ> f) \<in> sphere a r \<rightarrow> sphere 0 1" | 
| 66955 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4093 | using fim him by force | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4094 | qed auto | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 4095 | then have "homotopic_with_canon (\<lambda>f. True) (sphere a r) (sphere b s) (k \<circ> (h \<circ> f)) (k \<circ> (\<lambda>x. c))" | 
| 71745 | 4096 | by (rule homotopic_with_compose_continuous_left [OF _ contk kim]) | 
| 76944 | 4097 | moreover have "\<And>x. r = dist a x \<Longrightarrow> f x = k (h (f x))" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4098 | by (metis fim hk homeomorphism_def image_subset_iff mem_sphere image_subset_iff_funcset) | 
| 76944 | 4099 | ultimately have "homotopic_with_canon (\<lambda>z. True) (sphere a r) (sphere b s) f (\<lambda>x. k c)" | 
| 4100 | by (auto intro: homotopic_with_eq) | |
| 66955 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4101 | then show ?thesis | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4102 | by (metis that) | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4103 | qed | 
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4104 | |
| 
289f390c4e57
A few more topological results. And made some slow proofs faster
 paulson <lp15@cam.ac.uk> parents: 
66941diff
changeset | 4105 | |
| 69683 | 4106 | subsection\<open>Holomorphic logarithms and square roots\<close> | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68634diff
changeset | 4107 | |
| 72245 | 4108 | lemma g_imp_holomorphic_log: | 
| 64845 | 4109 | assumes holf: "f holomorphic_on S" | 
| 72245 | 4110 | and contg: "continuous_on S g" and feq: "\<And>x. x \<in> S \<Longrightarrow> f x = exp (g x)" | 
| 64845 | 4111 | and fnz: "\<And>z. z \<in> S \<Longrightarrow> f z \<noteq> 0" | 
| 4112 | obtains g where "g holomorphic_on S" "\<And>z. z \<in> S \<Longrightarrow> f z = exp(g z)" | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4113 | proof - | 
| 64845 | 4114 | have contf: "continuous_on S f" | 
| 4115 | by (simp add: holf holomorphic_on_imp_continuous_on) | |
| 4116 | have "g field_differentiable at z within S" if "f field_differentiable at z within S" "z \<in> S" for z | |
| 4117 | proof - | |
| 4118 | obtain f' where f': "((\<lambda>y. (f y - f z) / (y - z)) \<longlongrightarrow> f') (at z within S)" | |
| 68634 | 4119 | using \<open>f field_differentiable at z within S\<close> by (auto simp: field_differentiable_def has_field_derivative_iff) | 
| 64845 | 4120 | then have ee: "((\<lambda>x. (exp(g x) - exp(g z)) / (x - z)) \<longlongrightarrow> f') (at z within S)" | 
| 4121 | by (simp add: feq \<open>z \<in> S\<close> Lim_transform_within [OF _ zero_less_one]) | |
| 4122 | have "(((\<lambda>y. if y = g z then exp (g z) else (exp y - exp (g z)) / (y - g z)) \<circ> g) \<longlongrightarrow> exp (g z)) | |
| 4123 | (at z within S)" | |
| 4124 | proof (rule tendsto_compose_at) | |
| 4125 | show "(g \<longlongrightarrow> g z) (at z within S)" | |
| 4126 | using contg continuous_on \<open>z \<in> S\<close> by blast | |
| 4127 | show "(\<lambda>y. if y = g z then exp (g z) else (exp y - exp (g z)) / (y - g z)) \<midarrow>g z\<rightarrow> exp (g z)" | |
| 72245 | 4128 | by (simp add: LIM_offset_zero_iff DERIV_D cong: if_cong Lim_cong_within) | 
| 64845 | 4129 | qed auto | 
| 4130 | then have dd: "((\<lambda>x. if g x = g z then exp(g z) else (exp(g x) - exp(g z)) / (g x - g z)) \<longlongrightarrow> exp(g z)) (at z within S)" | |
| 4131 | by (simp add: o_def) | |
| 4132 | have "continuous (at z within S) g" | |
| 4133 | using contg continuous_on_eq_continuous_within \<open>z \<in> S\<close> by blast | |
| 4134 | then have "(\<forall>\<^sub>F x in at z within S. dist (g x) (g z) < 2*pi)" | |
| 4135 | by (simp add: continuous_within tendsto_iff) | |
| 4136 | then have "\<forall>\<^sub>F x in at z within S. exp (g x) = exp (g z) \<longrightarrow> g x \<noteq> g z \<longrightarrow> x = z" | |
| 72245 | 4137 | by (rule eventually_mono) (auto simp: exp_eq dist_norm norm_mult) | 
| 64845 | 4138 | then have "((\<lambda>y. (g y - g z) / (y - z)) \<longlongrightarrow> f' / exp (g z)) (at z within S)" | 
| 70532 
fcf3b891ccb1
new material; rotated premises of Lim_transform_eventually
 paulson <lp15@cam.ac.uk> parents: 
70196diff
changeset | 4139 | by (auto intro!: Lim_transform_eventually [OF tendsto_divide [OF ee dd]]) | 
| 64845 | 4140 | then show ?thesis | 
| 68634 | 4141 | by (auto simp: field_differentiable_def has_field_derivative_iff) | 
| 64845 | 4142 | qed | 
| 4143 | then have "g holomorphic_on S" | |
| 4144 | using holf holomorphic_on_def by auto | |
| 4145 | then show ?thesis | |
| 4146 | using feq that by auto | |
| 4147 | qed | |
| 4148 | ||
| 72245 | 4149 | lemma contractible_imp_holomorphic_log: | 
| 4150 | assumes holf: "f holomorphic_on S" | |
| 4151 | and S: "contractible S" | |
| 4152 | and fnz: "\<And>z. z \<in> S \<Longrightarrow> f z \<noteq> 0" | |
| 4153 | obtains g where "g holomorphic_on S" "\<And>z. z \<in> S \<Longrightarrow> f z = exp(g z)" | |
| 4154 | proof - | |
| 4155 | have contf: "continuous_on S f" | |
| 4156 | by (simp add: holf holomorphic_on_imp_continuous_on) | |
| 4157 | obtain g where contg: "continuous_on S g" and feq: "\<And>x. x \<in> S \<Longrightarrow> f x = exp (g x)" | |
| 4158 | by (metis continuous_logarithm_on_contractible [OF contf S fnz]) | |
| 4159 | then show thesis | |
| 4160 | using fnz g_imp_holomorphic_log holf that by blast | |
| 4161 | qed | |
| 4162 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4163 | lemma simply_connected_imp_holomorphic_log: | 
| 64845 | 4164 | assumes holf: "f holomorphic_on S" | 
| 4165 | and S: "simply_connected S" "locally path_connected S" | |
| 4166 | and fnz: "\<And>z. z \<in> S \<Longrightarrow> f z \<noteq> 0" | |
| 4167 | obtains g where "g holomorphic_on S" "\<And>z. z \<in> S \<Longrightarrow> f z = exp(g z)" | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4168 | proof - | 
| 64845 | 4169 | have contf: "continuous_on S f" | 
| 4170 | by (simp add: holf holomorphic_on_imp_continuous_on) | |
| 4171 | obtain g where contg: "continuous_on S g" and feq: "\<And>x. x \<in> S \<Longrightarrow> f x = exp (g x)" | |
| 4172 | by (metis continuous_logarithm_on_simply_connected [OF contf S fnz]) | |
| 72245 | 4173 | then show thesis | 
| 4174 | using fnz g_imp_holomorphic_log holf that by blast | |
| 64845 | 4175 | qed | 
| 4176 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4177 | lemma contractible_imp_holomorphic_sqrt: | 
| 64845 | 4178 | assumes holf: "f holomorphic_on S" | 
| 4179 | and S: "contractible S" | |
| 4180 | and fnz: "\<And>z. z \<in> S \<Longrightarrow> f z \<noteq> 0" | |
| 4181 | obtains g where "g holomorphic_on S" "\<And>z. z \<in> S \<Longrightarrow> f z = g z ^ 2" | |
| 4182 | proof - | |
| 4183 | obtain g where holg: "g holomorphic_on S" and feq: "\<And>z. z \<in> S \<Longrightarrow> f z = exp(g z)" | |
| 4184 | using contractible_imp_holomorphic_log [OF assms] by blast | |
| 4185 | show ?thesis | |
| 4186 | proof | |
| 4187 | show "exp \<circ> (\<lambda>z. z / 2) \<circ> g holomorphic_on S" | |
| 4188 | by (intro holomorphic_on_compose holg holomorphic_intros) auto | |
| 4189 | show "\<And>z. z \<in> S \<Longrightarrow> f z = ((exp \<circ> (\<lambda>z. z / 2) \<circ> g) z)\<^sup>2" | |
| 72245 | 4190 | by (simp add: feq flip: exp_double) | 
| 64845 | 4191 | qed | 
| 4192 | qed | |
| 4193 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4194 | lemma simply_connected_imp_holomorphic_sqrt: | 
| 64845 | 4195 | assumes holf: "f holomorphic_on S" | 
| 4196 | and S: "simply_connected S" "locally path_connected S" | |
| 4197 | and fnz: "\<And>z. z \<in> S \<Longrightarrow> f z \<noteq> 0" | |
| 4198 | obtains g where "g holomorphic_on S" "\<And>z. z \<in> S \<Longrightarrow> f z = g z ^ 2" | |
| 4199 | proof - | |
| 4200 | obtain g where holg: "g holomorphic_on S" and feq: "\<And>z. z \<in> S \<Longrightarrow> f z = exp(g z)" | |
| 4201 | using simply_connected_imp_holomorphic_log [OF assms] by blast | |
| 4202 | show ?thesis | |
| 4203 | proof | |
| 4204 | show "exp \<circ> (\<lambda>z. z / 2) \<circ> g holomorphic_on S" | |
| 4205 | by (intro holomorphic_on_compose holg holomorphic_intros) auto | |
| 4206 | show "\<And>z. z \<in> S \<Longrightarrow> f z = ((exp \<circ> (\<lambda>z. z / 2) \<circ> g) z)\<^sup>2" | |
| 72245 | 4207 | by (simp add: feq flip: exp_double) | 
| 64845 | 4208 | qed | 
| 4209 | qed | |
| 4210 | ||
| 4211 | text\<open> Related theorems about holomorphic inverse cosines.\<close> | |
| 4212 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4213 | lemma contractible_imp_holomorphic_arccos: | 
| 64845 | 4214 | assumes holf: "f holomorphic_on S" and S: "contractible S" | 
| 4215 | and non1: "\<And>z. z \<in> S \<Longrightarrow> f z \<noteq> 1 \<and> f z \<noteq> -1" | |
| 4216 | obtains g where "g holomorphic_on S" "\<And>z. z \<in> S \<Longrightarrow> f z = cos(g z)" | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4217 | proof - | 
| 64845 | 4218 | have hol1f: "(\<lambda>z. 1 - f z ^ 2) holomorphic_on S" | 
| 4219 | by (intro holomorphic_intros holf) | |
| 4220 | obtain g where holg: "g holomorphic_on S" and eq: "\<And>z. z \<in> S \<Longrightarrow> 1 - (f z)\<^sup>2 = (g z)\<^sup>2" | |
| 4221 | using contractible_imp_holomorphic_sqrt [OF hol1f S] | |
| 4222 | by (metis eq_iff_diff_eq_0 non1 power2_eq_1_iff) | |
| 65064 
a4abec71279a
Renamed ii to imaginary_unit in order to free up ii as a variable name.  Also replaced some legacy def commands
 paulson <lp15@cam.ac.uk> parents: 
65037diff
changeset | 4223 | have holfg: "(\<lambda>z. f z + \<i>*g z) holomorphic_on S" | 
| 64845 | 4224 | by (intro holf holg holomorphic_intros) | 
| 4225 | have "\<And>z. z \<in> S \<Longrightarrow> f z + \<i>*g z \<noteq> 0" | |
| 4226 | by (metis Arccos_body_lemma eq add.commute add.inverse_unique complex_i_mult_minus power2_csqrt power2_eq_iff) | |
| 4227 | then obtain h where holh: "h holomorphic_on S" and fgeq: "\<And>z. z \<in> S \<Longrightarrow> f z + \<i>*g z = exp (h z)" | |
| 4228 | using contractible_imp_holomorphic_log [OF holfg S] by metis | |
| 4229 | show ?thesis | |
| 4230 | proof | |
| 65064 
a4abec71279a
Renamed ii to imaginary_unit in order to free up ii as a variable name.  Also replaced some legacy def commands
 paulson <lp15@cam.ac.uk> parents: 
65037diff
changeset | 4231 | show "(\<lambda>z. -\<i>*h z) holomorphic_on S" | 
| 64845 | 4232 | by (intro holh holomorphic_intros) | 
| 4233 | show "f z = cos (- \<i>*h z)" if "z \<in> S" for z | |
| 4234 | proof - | |
| 65064 
a4abec71279a
Renamed ii to imaginary_unit in order to free up ii as a variable name.  Also replaced some legacy def commands
 paulson <lp15@cam.ac.uk> parents: 
65037diff
changeset | 4235 | have "(f z + \<i>*g z)*(f z - \<i>*g z) = 1" | 
| 64845 | 4236 | using that eq by (auto simp: algebra_simps power2_eq_square) | 
| 65064 
a4abec71279a
Renamed ii to imaginary_unit in order to free up ii as a variable name.  Also replaced some legacy def commands
 paulson <lp15@cam.ac.uk> parents: 
65037diff
changeset | 4237 | then have "f z - \<i>*g z = inverse (f z + \<i>*g z)" | 
| 64845 | 4238 | using inverse_unique by force | 
| 4239 | also have "... = exp (- h z)" | |
| 4240 | by (simp add: exp_minus fgeq that) | |
| 4241 | finally have "f z = exp (- h z) + \<i>*g z" | |
| 4242 | by (simp add: diff_eq_eq) | |
| 76944 | 4243 | with that show ?thesis | 
| 4244 | by (simp add: cos_exp_eq flip: fgeq) | |
| 64845 | 4245 | qed | 
| 4246 | qed | |
| 4247 | qed | |
| 4248 | ||
| 4249 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4250 | lemma contractible_imp_holomorphic_arccos_bounded: | 
| 64845 | 4251 | assumes holf: "f holomorphic_on S" and S: "contractible S" and "a \<in> S" | 
| 4252 | and non1: "\<And>z. z \<in> S \<Longrightarrow> f z \<noteq> 1 \<and> f z \<noteq> -1" | |
| 4253 | obtains g where "g holomorphic_on S" "norm(g a) \<le> pi + norm(f a)" "\<And>z. z \<in> S \<Longrightarrow> f z = cos(g z)" | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4254 | proof - | 
| 64845 | 4255 | obtain g where holg: "g holomorphic_on S" and feq: "\<And>z. z \<in> S \<Longrightarrow> f z = cos (g z)" | 
| 4256 | using contractible_imp_holomorphic_arccos [OF holf S non1] by blast | |
| 4257 | obtain b where "cos b = f a" "norm b \<le> pi + norm (f a)" | |
| 4258 | using cos_Arccos norm_Arccos_bounded by blast | |
| 4259 | then have "cos b = cos (g a)" | |
| 4260 | by (simp add: \<open>a \<in> S\<close> feq) | |
| 4261 | then consider n where "n \<in> \<int>" "b = g a + of_real(2*n*pi)" | n where "n \<in> \<int>" "b = -g a + of_real(2*n*pi)" | |
| 4262 | by (auto simp: complex_cos_eq) | |
| 4263 | then show ?thesis | |
| 4264 | proof cases | |
| 4265 | case 1 | |
| 4266 | show ?thesis | |
| 4267 | proof | |
| 4268 | show "(\<lambda>z. g z + of_real(2*n*pi)) holomorphic_on S" | |
| 4269 | by (intro holomorphic_intros holg) | |
| 4270 | show "cmod (g a + of_real(2*n*pi)) \<le> pi + cmod (f a)" | |
| 4271 | using "1" \<open>cmod b \<le> pi + cmod (f a)\<close> by blast | |
| 4272 | show "\<And>z. z \<in> S \<Longrightarrow> f z = cos (g z + complex_of_real (2*n*pi))" | |
| 4273 | by (metis \<open>n \<in> \<int>\<close> complex_cos_eq feq) | |
| 4274 | qed | |
| 4275 | next | |
| 4276 | case 2 | |
| 4277 | show ?thesis | |
| 4278 | proof | |
| 4279 | show "(\<lambda>z. -g z + of_real(2*n*pi)) holomorphic_on S" | |
| 4280 | by (intro holomorphic_intros holg) | |
| 4281 | show "cmod (-g a + of_real(2*n*pi)) \<le> pi + cmod (f a)" | |
| 4282 | using "2" \<open>cmod b \<le> pi + cmod (f a)\<close> by blast | |
| 4283 | show "\<And>z. z \<in> S \<Longrightarrow> f z = cos (-g z + complex_of_real (2*n*pi))" | |
| 4284 | by (metis \<open>n \<in> \<int>\<close> complex_cos_eq feq) | |
| 4285 | qed | |
| 4286 | qed | |
| 4287 | qed | |
| 4288 | ||
| 4289 | ||
| 69683 | 4290 | subsection\<open>The "Borsukian" property of sets\<close> | 
| 64845 | 4291 | |
| 69566 | 4292 | text\<open>This doesn't have a standard name. Kuratowski uses ``contractible with respect to \<open>[S\<^sup>1]\<close>'' | 
| 64847 | 4293 | while Whyburn uses ``property b''. It's closely related to unicoherence.\<close> | 
| 64845 | 4294 | |
| 70136 | 4295 | definition\<^marker>\<open>tag important\<close> Borsukian where | 
| 64845 | 4296 | "Borsukian S \<equiv> | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4297 |         \<forall>f. continuous_on S f \<and> f \<in> S \<rightarrow> (- {0::complex})
 | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 4298 |             \<longrightarrow> (\<exists>a. homotopic_with_canon (\<lambda>h. True) S (- {0}) f (\<lambda>x. a))"
 | 
| 64845 | 4299 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4300 | lemma Borsukian_retraction_gen: | 
| 64845 | 4301 | assumes "Borsukian S" "continuous_on S h" "h ` S = T" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4302 | "continuous_on T k" "k \<in> T \<rightarrow> S" "\<And>y. y \<in> T \<Longrightarrow> h(k y) = y" | 
| 64845 | 4303 | shows "Borsukian T" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4304 | proof - | 
| 64845 | 4305 | interpret R: Retracts S h T k | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4306 | using assms by (simp add: image_subset_iff_funcset Retracts.intro) | 
| 64845 | 4307 | show ?thesis | 
| 4308 | using assms | |
| 72245 | 4309 | apply (clarsimp simp add: Borsukian_def) | 
| 64845 | 4310 |     apply (rule R.cohomotopically_trivial_retraction_null_gen [OF TrueI TrueI refl, of "-{0}"], auto)
 | 
| 4311 | done | |
| 4312 | qed | |
| 4313 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4314 | lemma retract_of_Borsukian: "\<lbrakk>Borsukian T; S retract_of T\<rbrakk> \<Longrightarrow> Borsukian S" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4315 | by (smt (verit) Borsukian_retraction_gen retract_of_def retraction retraction_def retraction_subset image_subset_iff_funcset) | 
| 64845 | 4316 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4317 | lemma homeomorphic_Borsukian: "\<lbrakk>Borsukian S; S homeomorphic T\<rbrakk> \<Longrightarrow> Borsukian T" | 
| 64845 | 4318 | using Borsukian_retraction_gen order_refl | 
| 4319 | by (fastforce simp add: homeomorphism_def homeomorphic_def) | |
| 4320 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4321 | lemma homeomorphic_Borsukian_eq: | 
| 64845 | 4322 | "S homeomorphic T \<Longrightarrow> Borsukian S \<longleftrightarrow> Borsukian T" | 
| 4323 | by (meson homeomorphic_Borsukian homeomorphic_sym) | |
| 4324 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4325 | lemma Borsukian_translation: | 
| 64845 | 4326 | fixes S :: "'a::real_normed_vector set" | 
| 4327 | shows "Borsukian (image (\<lambda>x. a + x) S) \<longleftrightarrow> Borsukian S" | |
| 72245 | 4328 | using homeomorphic_Borsukian_eq homeomorphic_translation by blast | 
| 64845 | 4329 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4330 | lemma Borsukian_injective_linear_image: | 
| 64845 | 4331 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 4332 | assumes "linear f" "inj f" | |
| 4333 | shows "Borsukian(f ` S) \<longleftrightarrow> Borsukian S" | |
| 72245 | 4334 | using assms homeomorphic_Borsukian_eq linear_homeomorphic_image by blast | 
| 64845 | 4335 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4336 | lemma homotopy_eqv_Borsukianness: | 
| 64845 | 4337 | fixes S :: "'a::real_normed_vector set" | 
| 4338 | and T :: "'b::real_normed_vector set" | |
| 4339 | assumes "S homotopy_eqv T" | |
| 4340 | shows "(Borsukian S \<longleftrightarrow> Borsukian T)" | |
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4341 | by (meson Borsukian_def assms homotopy_eqv_cohomotopic_triviality_null image_subset_iff_funcset) | 
| 64845 | 4342 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4343 | lemma Borsukian_alt: | 
| 64845 | 4344 | fixes S :: "'a::real_normed_vector set" | 
| 4345 | shows | |
| 4346 | "Borsukian S \<longleftrightarrow> | |
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4347 |         (\<forall>f g. continuous_on S f \<and> f \<in> S \<rightarrow> -{0} \<and>
 | 
| 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4348 |                continuous_on S g \<and> g \<in> S \<rightarrow> -{0}
 | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 4349 |                \<longrightarrow> homotopic_with_canon (\<lambda>h. True) S (- {0::complex}) f g)"
 | 
| 64845 | 4350 | unfolding Borsukian_def homotopic_triviality | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4351 | by (force simp add: path_connected_punctured_universe) | 
| 64845 | 4352 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4353 | lemma Borsukian_continuous_logarithm: | 
| 64845 | 4354 | fixes S :: "'a::real_normed_vector set" | 
| 4355 | shows "Borsukian S \<longleftrightarrow> | |
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4356 |             (\<forall>f. continuous_on S f \<and> f \<in> S \<rightarrow> (- {0::complex})
 | 
| 64845 | 4357 | \<longrightarrow> (\<exists>g. continuous_on S g \<and> (\<forall>x \<in> S. f x = exp(g x))))" | 
| 4358 | by (simp add: Borsukian_def inessential_eq_continuous_logarithm) | |
| 4359 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4360 | lemma Borsukian_continuous_logarithm_circle: | 
| 64845 | 4361 | fixes S :: "'a::real_normed_vector set" | 
| 4362 | shows "Borsukian S \<longleftrightarrow> | |
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4363 | (\<forall>f. continuous_on S f \<and> f \<in> S \<rightarrow> sphere (0::complex) 1 | 
| 64845 | 4364 | \<longrightarrow> (\<exists>g. continuous_on S g \<and> (\<forall>x \<in> S. f x = exp(g x))))" | 
| 4365 | (is "?lhs = ?rhs") | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4366 | proof | 
| 64845 | 4367 | assume ?lhs then show ?rhs | 
| 4368 | by (force simp: Borsukian_continuous_logarithm) | |
| 4369 | next | |
| 4370 | assume RHS [rule_format]: ?rhs | |
| 4371 | show ?lhs | |
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4372 | proof (clarsimp simp: Borsukian_continuous_logarithm Pi_iff) | 
| 64845 | 4373 | fix f :: "'a \<Rightarrow> complex" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4374 | assume contf: "continuous_on S f" and 0: "\<forall>i\<in>S. f i \<noteq> 0" | 
| 64845 | 4375 | then have "continuous_on S (\<lambda>x. f x / complex_of_real (cmod (f x)))" | 
| 4376 | by (intro continuous_intros) auto | |
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4377 | moreover have "(\<lambda>x. f x / complex_of_real (cmod (f x))) \<in> S \<rightarrow> sphere 0 1" | 
| 64845 | 4378 | using 0 by (auto simp: norm_divide) | 
| 4379 | ultimately obtain g where contg: "continuous_on S g" | |
| 4380 | and fg: "\<forall>x \<in> S. f x / complex_of_real (cmod (f x)) = exp(g x)" | |
| 4381 | using RHS [of "\<lambda>x. f x / of_real(norm(f x))"] by auto | |
| 4382 | show "\<exists>g. continuous_on S g \<and> (\<forall>x\<in>S. f x = exp (g x))" | |
| 4383 | proof (intro exI ballI conjI) | |
| 4384 | show "continuous_on S (\<lambda>x. (Ln \<circ> of_real \<circ> norm \<circ> f)x + g x)" | |
| 4385 | by (intro continuous_intros contf contg conjI) (use "0" in auto) | |
| 4386 | show "f x = exp ((Ln \<circ> complex_of_real \<circ> cmod \<circ> f) x + g x)" if "x \<in> S" for x | |
| 4387 | using 0 that | |
| 72245 | 4388 | apply (simp add: exp_add) | 
| 4389 | by (metis div_by_0 exp_Ln exp_not_eq_zero fg mult.commute nonzero_eq_divide_eq) | |
| 64845 | 4390 | qed | 
| 4391 | qed | |
| 4392 | qed | |
| 4393 | ||
| 4394 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4395 | lemma Borsukian_continuous_logarithm_circle_real: | 
| 64845 | 4396 | fixes S :: "'a::real_normed_vector set" | 
| 4397 | shows "Borsukian S \<longleftrightarrow> | |
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4398 | (\<forall>f. continuous_on S f \<and> f \<in> S \<rightarrow> sphere (0::complex) 1 | 
| 65064 
a4abec71279a
Renamed ii to imaginary_unit in order to free up ii as a variable name.  Also replaced some legacy def commands
 paulson <lp15@cam.ac.uk> parents: 
65037diff
changeset | 4399 | \<longrightarrow> (\<exists>g. continuous_on S (complex_of_real \<circ> g) \<and> (\<forall>x \<in> S. f x = exp(\<i> * of_real(g x)))))" | 
| 64845 | 4400 | (is "?lhs = ?rhs") | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4401 | proof | 
| 64845 | 4402 | assume LHS: ?lhs | 
| 4403 | show ?rhs | |
| 4404 | proof (clarify) | |
| 4405 | fix f :: "'a \<Rightarrow> complex" | |
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4406 | assume "continuous_on S f" and f01: "f \<in> S \<rightarrow> sphere 0 1" | 
| 64845 | 4407 | then obtain g where contg: "continuous_on S g" and "\<And>x. x \<in> S \<Longrightarrow> f x = exp(g x)" | 
| 4408 | using LHS by (auto simp: Borsukian_continuous_logarithm_circle) | |
| 4409 | then have "\<forall>x\<in>S. f x = exp (\<i> * complex_of_real ((Im \<circ> g) x))" | |
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4410 | using f01 exp_eq_polar norm_exp_eq_Re by (fastforce simp: Pi_iff) | 
| 64845 | 4411 | then show "\<exists>g. continuous_on S (complex_of_real \<circ> g) \<and> (\<forall>x\<in>S. f x = exp (\<i> * complex_of_real (g x)))" | 
| 4412 | by (rule_tac x="Im \<circ> g" in exI) (force intro: continuous_intros contg) | |
| 4413 | qed | |
| 4414 | next | |
| 4415 | assume RHS [rule_format]: ?rhs | |
| 4416 | show ?lhs | |
| 4417 | proof (clarsimp simp: Borsukian_continuous_logarithm_circle) | |
| 4418 | fix f :: "'a \<Rightarrow> complex" | |
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4419 | assume "continuous_on S f" and f01: "f \<in> S \<rightarrow> sphere 0 1" | 
| 65064 
a4abec71279a
Renamed ii to imaginary_unit in order to free up ii as a variable name.  Also replaced some legacy def commands
 paulson <lp15@cam.ac.uk> parents: 
65037diff
changeset | 4420 | then obtain g where contg: "continuous_on S (complex_of_real \<circ> g)" and "\<And>x. x \<in> S \<Longrightarrow> f x = exp(\<i> * of_real(g x))" | 
| 64845 | 4421 | by (metis RHS) | 
| 4422 | then show "\<exists>g. continuous_on S g \<and> (\<forall>x\<in>S. f x = exp (g x))" | |
| 65064 
a4abec71279a
Renamed ii to imaginary_unit in order to free up ii as a variable name.  Also replaced some legacy def commands
 paulson <lp15@cam.ac.uk> parents: 
65037diff
changeset | 4423 | by (rule_tac x="\<lambda>x. \<i>* of_real(g x)" in exI) (auto simp: continuous_intros contg) | 
| 64845 | 4424 | qed | 
| 4425 | qed | |
| 4426 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4427 | lemma Borsukian_circle: | 
| 64845 | 4428 | fixes S :: "'a::real_normed_vector set" | 
| 4429 | shows "Borsukian S \<longleftrightarrow> | |
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4430 | (\<forall>f. continuous_on S f \<and> f \<in> S \<rightarrow> sphere (0::complex) 1 | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 4431 | \<longrightarrow> (\<exists>a. homotopic_with_canon (\<lambda>h. True) S (sphere (0::complex) 1) f (\<lambda>x. a)))" | 
| 64845 | 4432 | by (simp add: inessential_eq_continuous_logarithm_circle Borsukian_continuous_logarithm_circle_real) | 
| 4433 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4434 | lemma contractible_imp_Borsukian: "contractible S \<Longrightarrow> Borsukian S" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4435 | by (meson Borsukian_def nullhomotopic_from_contractible image_subset_iff_funcset) | 
| 64845 | 4436 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4437 | lemma simply_connected_imp_Borsukian: | 
| 64845 | 4438 | fixes S :: "'a::real_normed_vector set" | 
| 4439 | shows "\<lbrakk>simply_connected S; locally path_connected S\<rbrakk> \<Longrightarrow> Borsukian S" | |
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4440 | by (smt (verit, del_insts) continuous_logarithm_on_simply_connected Borsukian_continuous_logarithm_circle | 
| 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4441 | PiE mem_sphere_0 norm_eq_zero zero_neq_one) | 
| 64845 | 4442 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4443 | lemma starlike_imp_Borsukian: | 
| 64845 | 4444 | fixes S :: "'a::real_normed_vector set" | 
| 4445 | shows "starlike S \<Longrightarrow> Borsukian S" | |
| 4446 | by (simp add: contractible_imp_Borsukian starlike_imp_contractible) | |
| 4447 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4448 | lemma Borsukian_empty: "Borsukian {}"
 | 
| 64845 | 4449 | by (auto simp: contractible_imp_Borsukian) | 
| 4450 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4451 | lemma Borsukian_UNIV: "Borsukian (UNIV :: 'a::real_normed_vector set)" | 
| 64845 | 4452 | by (auto simp: contractible_imp_Borsukian) | 
| 4453 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4454 | lemma convex_imp_Borsukian: | 
| 64845 | 4455 | fixes S :: "'a::real_normed_vector set" | 
| 4456 | shows "convex S \<Longrightarrow> Borsukian S" | |
| 4457 | by (meson Borsukian_def convex_imp_contractible nullhomotopic_from_contractible) | |
| 4458 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4459 | proposition Borsukian_sphere: | 
| 64845 | 4460 | fixes a :: "'a::euclidean_space" | 
| 4461 |   shows "3 \<le> DIM('a) \<Longrightarrow> Borsukian (sphere a r)"
 | |
| 72245 | 4462 | using ENR_sphere | 
| 4463 | by (blast intro: simply_connected_imp_Borsukian ENR_imp_locally_path_connected simply_connected_sphere) | |
| 4464 | ||
| 4465 | lemma Borsukian_Un_lemma: | |
| 64845 | 4466 | fixes S :: "'a::real_normed_vector set" | 
| 72245 | 4467 | assumes BS: "Borsukian S" and BT: "Borsukian T" and ST: "connected(S \<inter> T)" | 
| 4468 | and *: "\<And>f g::'a \<Rightarrow> complex. | |
| 4469 | \<lbrakk>continuous_on S f; continuous_on T g; \<And>x. x \<in> S \<and> x \<in> T \<Longrightarrow> f x = g x\<rbrakk> | |
| 4470 | \<Longrightarrow> continuous_on (S \<union> T) (\<lambda>x. if x \<in> S then f x else g x)" | |
| 4471 | shows "Borsukian(S \<union> T)" | |
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4472 | proof (clarsimp simp add: Borsukian_continuous_logarithm Pi_iff) | 
| 64845 | 4473 | fix f :: "'a \<Rightarrow> complex" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4474 | assume contf: "continuous_on (S \<union> T) f" and 0: "\<forall>i\<in>S \<union> T. f i \<noteq> 0" | 
| 64845 | 4475 | then have contfS: "continuous_on S f" and contfT: "continuous_on T f" | 
| 4476 | using continuous_on_subset by auto | |
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 4477 |   have "\<lbrakk>continuous_on S f; f \<in> S \<rightarrow> -{0}\<rbrakk> \<Longrightarrow> \<exists>g. continuous_on S g \<and> (\<forall>x \<in> S. f x = exp(g x))"
 | 
| 64845 | 4478 | using BS by (auto simp: Borsukian_continuous_logarithm) | 
| 4479 | then obtain g where contg: "continuous_on S g" and fg: "\<And>x. x \<in> S \<Longrightarrow> f x = exp(g x)" | |
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4480 | using "0" contfS by force | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 4481 |   have "\<lbrakk>continuous_on T f; f \<in> T \<rightarrow> -{0}\<rbrakk> \<Longrightarrow> \<exists>g. continuous_on T g \<and> (\<forall>x \<in> T. f x = exp(g x))"
 | 
| 64845 | 4482 | using BT by (auto simp: Borsukian_continuous_logarithm) | 
| 4483 | then obtain h where conth: "continuous_on T h" and fh: "\<And>x. x \<in> T \<Longrightarrow> f x = exp(h x)" | |
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4484 | using "0" contfT by force | 
| 64845 | 4485 | show "\<exists>g. continuous_on (S \<union> T) g \<and> (\<forall>x\<in>S \<union> T. f x = exp (g x))" | 
| 4486 |   proof (cases "S \<inter> T = {}")
 | |
| 4487 | case True | |
| 4488 | show ?thesis | |
| 4489 | proof (intro exI conjI) | |
| 4490 | show "continuous_on (S \<union> T) (\<lambda>x. if x \<in> S then g x else h x)" | |
| 72245 | 4491 | using True * [OF contg conth] | 
| 4492 | by (meson disjoint_iff) | |
| 64845 | 4493 | show "\<forall>x\<in>S \<union> T. f x = exp (if x \<in> S then g x else h x)" | 
| 4494 | using fg fh by auto | |
| 4495 | qed | |
| 4496 | next | |
| 4497 | case False | |
| 66884 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 4498 | have "(\<lambda>x. g x - h x) constant_on S \<inter> T" | 
| 64845 | 4499 | proof (rule continuous_discrete_range_constant [OF ST]) | 
| 4500 | show "continuous_on (S \<inter> T) (\<lambda>x. g x - h x)" | |
| 76944 | 4501 | by (metis contg conth continuous_on_diff continuous_on_subset inf_le1 inf_le2) | 
| 64845 | 4502 | show "\<exists>e>0. \<forall>y. y \<in> S \<inter> T \<and> g y - h y \<noteq> g x - h x \<longrightarrow> e \<le> cmod (g y - h y - (g x - h x))" | 
| 4503 | if "x \<in> S \<inter> T" for x | |
| 4504 | proof - | |
| 4505 | have "g y - g x = h y - h x" | |
| 4506 | if "y \<in> S" "y \<in> T" "cmod (g y - g x - (h y - h x)) < 2 * pi" for y | |
| 4507 | proof (rule exp_complex_eqI) | |
| 4508 | have "\<bar>Im (g y - g x) - Im (h y - h x)\<bar> \<le> cmod (g y - g x - (h y - h x))" | |
| 4509 | by (metis abs_Im_le_cmod minus_complex.simps(2)) | |
| 4510 | then show "\<bar>Im (g y - g x) - Im (h y - h x)\<bar> < 2 * pi" | |
| 4511 | using that by linarith | |
| 4512 | have "exp (g x) = exp (h x)" "exp (g y) = exp (h y)" | |
| 4513 | using fg fh that \<open>x \<in> S \<inter> T\<close> by fastforce+ | |
| 4514 | then show "exp (g y - g x) = exp (h y - h x)" | |
| 4515 | by (simp add: exp_diff) | |
| 4516 | qed | |
| 4517 | then show ?thesis | |
| 4518 | by (rule_tac x="2*pi" in exI) (fastforce simp add: algebra_simps) | |
| 4519 | qed | |
| 66884 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 4520 | qed | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 4521 | then obtain a where a: "\<And>x. x \<in> S \<inter> T \<Longrightarrow> g x - h x = a" | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 4522 | by (auto simp: constant_on_def) | 
| 64845 | 4523 | with False have "exp a = 1" | 
| 4524 | by (metis IntI disjoint_iff_not_equal divide_self_if exp_diff exp_not_eq_zero fg fh) | |
| 4525 | with a show ?thesis | |
| 4526 | apply (rule_tac x="\<lambda>x. if x \<in> S then g x else a + h x" in exI) | |
| 72245 | 4527 | apply (intro * contg conth continuous_intros conjI) | 
| 64845 | 4528 | apply (auto simp: algebra_simps fg fh exp_add) | 
| 65037 
2cf841ff23be
some new material, also recasting some theorems using “obtains”
 paulson <lp15@cam.ac.uk> parents: 
64911diff
changeset | 4529 | done | 
| 64845 | 4530 | qed | 
| 4531 | qed | |
| 4532 | ||
| 72245 | 4533 | proposition Borsukian_open_Un: | 
| 4534 | fixes S :: "'a::real_normed_vector set" | |
| 4535 | assumes opeS: "openin (top_of_set (S \<union> T)) S" | |
| 4536 | and opeT: "openin (top_of_set (S \<union> T)) T" | |
| 4537 | and BS: "Borsukian S" and BT: "Borsukian T" and ST: "connected(S \<inter> T)" | |
| 4538 | shows "Borsukian(S \<union> T)" | |
| 4539 | by (force intro: Borsukian_Un_lemma [OF BS BT ST] continuous_on_cases_local_open [OF opeS opeT]) | |
| 4540 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4541 | lemma Borsukian_closed_Un: | 
| 64845 | 4542 | fixes S :: "'a::real_normed_vector set" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 4543 | assumes cloS: "closedin (top_of_set (S \<union> T)) S" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 4544 | and cloT: "closedin (top_of_set (S \<union> T)) T" | 
| 64845 | 4545 | and BS: "Borsukian S" and BT: "Borsukian T" and ST: "connected(S \<inter> T)" | 
| 4546 | shows "Borsukian(S \<union> T)" | |
| 72245 | 4547 | by (force intro: Borsukian_Un_lemma [OF BS BT ST] continuous_on_cases_local [OF cloS cloT]) | 
| 64845 | 4548 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4549 | lemma Borsukian_separation_compact: | 
| 64845 | 4550 | fixes S :: "complex set" | 
| 4551 | assumes "compact S" | |
| 4552 | shows "Borsukian S \<longleftrightarrow> connected(- S)" | |
| 4553 | by (simp add: Borsuk_separation_theorem Borsukian_circle assms) | |
| 4554 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4555 | lemma Borsukian_monotone_image_compact: | 
| 64845 | 4556 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 4557 | assumes "Borsukian S" and contf: "continuous_on S f" and fim: "f ` S = T" | |
| 4558 |       and "compact S" and conn: "\<And>y. y \<in> T \<Longrightarrow> connected {x. x \<in> S \<and> f x = y}"
 | |
| 4559 | shows "Borsukian T" | |
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4560 | proof (clarsimp simp: Borsukian_continuous_logarithm Pi_iff) | 
| 64845 | 4561 | fix g :: "'b \<Rightarrow> complex" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4562 | assume contg: "continuous_on T g" and 0: "\<forall>i\<in>T. g i \<noteq> 0" | 
| 64845 | 4563 | have "continuous_on S (g \<circ> f)" | 
| 4564 | using contf contg continuous_on_compose fim by blast | |
| 4565 |   moreover have "(g \<circ> f) ` S \<subseteq> -{0}"
 | |
| 4566 | using fim 0 by auto | |
| 4567 | ultimately obtain h where conth: "continuous_on S h" and gfh: "\<And>x. x \<in> S \<Longrightarrow> (g \<circ> f) x = exp(h x)" | |
| 4568 | using \<open>Borsukian S\<close> by (auto simp: Borsukian_continuous_logarithm) | |
| 4569 | have "\<And>y. \<exists>x. y \<in> T \<longrightarrow> x \<in> S \<and> f x = y" | |
| 4570 | using fim by auto | |
| 4571 | then obtain f' where f': "\<And>y. y \<in> T \<longrightarrow> f' y \<in> S \<and> f (f' y) = y" | |
| 4572 | by metis | |
| 66884 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 4573 |   have *: "(\<lambda>x. h x - h(f' y)) constant_on {x. x \<in> S \<and> f x = y}" if "y \<in> T" for y
 | 
| 65037 
2cf841ff23be
some new material, also recasting some theorems using “obtains”
 paulson <lp15@cam.ac.uk> parents: 
64911diff
changeset | 4574 | proof (rule continuous_discrete_range_constant [OF conn [OF that], of "\<lambda>x. h x - h (f' y)"], simp_all add: algebra_simps) | 
| 
2cf841ff23be
some new material, also recasting some theorems using “obtains”
 paulson <lp15@cam.ac.uk> parents: 
64911diff
changeset | 4575 |     show "continuous_on {x \<in> S. f x = y} (\<lambda>x. h x - h (f' y))"
 | 
| 
2cf841ff23be
some new material, also recasting some theorems using “obtains”
 paulson <lp15@cam.ac.uk> parents: 
64911diff
changeset | 4576 | by (intro continuous_intros continuous_on_subset [OF conth]) auto | 
| 64845 | 4577 | show "\<exists>e>0. \<forall>u. u \<in> S \<and> f u = y \<and> h u \<noteq> h x \<longrightarrow> e \<le> cmod (h u - h x)" | 
| 4578 | if x: "x \<in> S \<and> f x = y" for x | |
| 4579 | proof - | |
| 4580 | have "h u = h x" if "u \<in> S" "f u = y" "cmod (h u - h x) < 2 * pi" for u | |
| 4581 | proof (rule exp_complex_eqI) | |
| 4582 | have "\<bar>Im (h u) - Im (h x)\<bar> \<le> cmod (h u - h x)" | |
| 4583 | by (metis abs_Im_le_cmod minus_complex.simps(2)) | |
| 4584 | then show "\<bar>Im (h u) - Im (h x)\<bar> < 2 * pi" | |
| 4585 | using that by linarith | |
| 4586 | show "exp (h u) = exp (h x)" | |
| 4587 | by (simp add: gfh [symmetric] x that) | |
| 4588 | qed | |
| 4589 | then show ?thesis | |
| 4590 | by (rule_tac x="2*pi" in exI) (fastforce simp add: algebra_simps) | |
| 4591 | qed | |
| 65037 
2cf841ff23be
some new material, also recasting some theorems using “obtains”
 paulson <lp15@cam.ac.uk> parents: 
64911diff
changeset | 4592 | qed | 
| 64845 | 4593 | show "\<exists>h. continuous_on T h \<and> (\<forall>x\<in>T. g x = exp (h x))" | 
| 4594 | proof (intro exI conjI) | |
| 4595 | show "continuous_on T (h \<circ> f')" | |
| 4596 | proof (rule continuous_from_closed_graph [of "h ` S"]) | |
| 4597 | show "compact (h ` S)" | |
| 4598 | by (simp add: \<open>compact S\<close> compact_continuous_image conth) | |
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4599 | show "(h \<circ> f') \<in> T \<rightarrow> h ` S" | 
| 64845 | 4600 | by (auto simp: f') | 
| 72245 | 4601 | have "h x = h (f' (f x))" if "x \<in> S" for x | 
| 4602 | using * [of "f x"] fim that unfolding constant_on_def by clarsimp (metis f' imageI right_minus_eq) | |
| 4603 | moreover have "\<And>x. x \<in> T \<Longrightarrow> \<exists>u. u \<in> S \<and> x = f u \<and> h (f' x) = h u" | |
| 4604 | using f' by fastforce | |
| 4605 | ultimately | |
| 4606 | have eq: "((\<lambda>x. (x, (h \<circ> f') x)) ` T) = | |
| 4607 |                 {p. \<exists>x. x \<in> S \<and> (x, p) \<in> (S \<times> UNIV) \<inter> ((\<lambda>z. snd z - ((f \<circ> fst) z, (h \<circ> fst) z)) -` {0})}"
 | |
| 4608 | using fim by (auto simp: image_iff) | |
| 4609 | moreover have "closed \<dots>" | |
| 64845 | 4610 | apply (intro closed_compact_projection [OF \<open>compact S\<close>] continuous_closed_preimage | 
| 4611 | continuous_intros continuous_on_subset [OF contf] continuous_on_subset [OF conth]) | |
| 72245 | 4612 | by (auto simp: \<open>compact S\<close> closed_Times compact_imp_closed) | 
| 4613 | ultimately show "closed ((\<lambda>x. (x, (h \<circ> f') x)) ` T)" | |
| 4614 | by simp | |
| 64845 | 4615 | qed | 
| 4616 | qed (use f' gfh in fastforce) | |
| 4617 | qed | |
| 4618 | ||
| 4619 | ||
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4620 | lemma Borsukian_open_map_image_compact: | 
| 64845 | 4621 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 4622 | assumes "Borsukian S" and contf: "continuous_on S f" and fim: "f ` S = T" and "compact S" | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 4623 | and ope: "\<And>U. openin (top_of_set S) U | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 4624 | \<Longrightarrow> openin (top_of_set T) (f ` U)" | 
| 64845 | 4625 | shows "Borsukian T" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4626 | proof (clarsimp simp add: Borsukian_continuous_logarithm_circle_real) | 
| 64845 | 4627 | fix g :: "'b \<Rightarrow> complex" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4628 | assume contg: "continuous_on T g" and gim: "g \<in> T \<rightarrow> sphere 0 1" | 
| 64845 | 4629 | have "continuous_on S (g \<circ> f)" | 
| 4630 | using contf contg continuous_on_compose fim by blast | |
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4631 | moreover have "(g \<circ> f) \<in> S \<rightarrow> sphere 0 1" | 
| 64845 | 4632 | using fim gim by auto | 
| 4633 | ultimately obtain h where cont_cxh: "continuous_on S (complex_of_real \<circ> h)" | |
| 65064 
a4abec71279a
Renamed ii to imaginary_unit in order to free up ii as a variable name.  Also replaced some legacy def commands
 paulson <lp15@cam.ac.uk> parents: 
65037diff
changeset | 4634 | and gfh: "\<And>x. x \<in> S \<Longrightarrow> (g \<circ> f) x = exp(\<i> * of_real(h x))" | 
| 64845 | 4635 | using \<open>Borsukian S\<close> Borsukian_continuous_logarithm_circle_real by metis | 
| 4636 | then have conth: "continuous_on S h" | |
| 4637 | by simp | |
| 4638 | have "\<exists>x. x \<in> S \<and> f x = y \<and> (\<forall>x' \<in> S. f x' = y \<longrightarrow> h x \<le> h x')" if "y \<in> T" for y | |
| 4639 | proof - | |
| 4640 |     have 1: "compact (h ` {x \<in> S. f x = y})"
 | |
| 4641 | proof (rule compact_continuous_image) | |
| 4642 |       show "continuous_on {x \<in> S. f x = y} h"
 | |
| 4643 | by (rule continuous_on_subset [OF conth]) auto | |
| 66884 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 4644 |       have "compact (S \<inter> f -` {y})"
 | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4645 | using that proper_map_from_compact [OF contf _ \<open>compact S\<close>] fim | 
| 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4646 | by force | 
| 66884 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 4647 |       then show "compact {x \<in> S. f x = y}" 
 | 
| 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 paulson <lp15@cam.ac.uk> parents: 
66827diff
changeset | 4648 | by (auto simp: vimage_def Int_def) | 
| 64845 | 4649 | qed | 
| 4650 |     have 2: "h ` {x \<in> S. f x = y} \<noteq> {}"
 | |
| 4651 | using fim that by auto | |
| 4652 |     have "\<exists>s \<in> h ` {x \<in> S. f x = y}. \<forall>t \<in> h ` {x \<in> S. f x = y}. s \<le> t"
 | |
| 4653 | using compact_attains_inf [OF 1 2] by blast | |
| 4654 | then show ?thesis by auto | |
| 4655 | qed | |
| 4656 | then obtain k where kTS: "\<And>y. y \<in> T \<Longrightarrow> k y \<in> S" | |
| 4657 | and fk: "\<And>y. y \<in> T \<Longrightarrow> f (k y) = y " | |
| 4658 | and hle: "\<And>x' y. \<lbrakk>y \<in> T; x' \<in> S; f x' = y\<rbrakk> \<Longrightarrow> h (k y) \<le> h x'" | |
| 4659 | by metis | |
| 4660 | have "continuous_on T (h \<circ> k)" | |
| 4661 | proof (clarsimp simp add: continuous_on_iff) | |
| 4662 | fix y and e::real | |
| 4663 | assume "y \<in> T" "0 < e" | |
| 4664 | moreover have "uniformly_continuous_on S (complex_of_real \<circ> h)" | |
| 4665 | using \<open>compact S\<close> cont_cxh compact_uniformly_continuous by blast | |
| 4666 | ultimately obtain d where "0 < d" | |
| 4667 | and d: "\<And>x x'. \<lbrakk>x\<in>S; x'\<in>S; dist x' x < d\<rbrakk> \<Longrightarrow> dist (h x') (h x) < e" | |
| 4668 | by (force simp: uniformly_continuous_on_def) | |
| 4669 | obtain \<delta> where "0 < \<delta>" and \<delta>: | |
| 4670 | "\<And>x'. \<lbrakk>x' \<in> T; dist y x' < \<delta>\<rbrakk> | |
| 4671 |                \<Longrightarrow> (\<forall>v \<in> {z \<in> S. f z = y}. \<exists>v'. v' \<in> {z \<in> S. f z = x'} \<and> dist v v' < d) \<and>
 | |
| 4672 |                    (\<forall>v' \<in> {z \<in> S. f z = x'}. \<exists>v. v \<in> {z \<in> S. f z = y} \<and> dist v' v < d)"
 | |
| 4673 |     proof (rule upper_lower_hemicontinuous_explicit [of T "\<lambda>y. {z \<in> S. f z = y}" S])
 | |
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 4674 | show "\<And>U. openin (top_of_set S) U | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 4675 |                  \<Longrightarrow> openin (top_of_set T) {x \<in> T. {z \<in> S. f z = x} \<subseteq> U}"
 | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 4676 | using closed_map_iff_upper_hemicontinuous_preimage [of f S T] fim contf \<open>compact S\<close> | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 4677 | using Abstract_Topology_2.continuous_imp_closed_map by blast | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 4678 | show "\<And>U. closedin (top_of_set S) U \<Longrightarrow> | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 4679 |                  closedin (top_of_set T) {x \<in> T. {z \<in> S. f z = x} \<subseteq> U}"
 | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 4680 | using ope open_map_iff_lower_hemicontinuous_preimage[of f S T] fim [THEN equalityD1] | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 4681 | by blast | 
| 64845 | 4682 |       show "bounded {z \<in> S. f z = y}"
 | 
| 4683 | by (metis (no_types, lifting) compact_imp_bounded [OF \<open>compact S\<close>] bounded_subset mem_Collect_eq subsetI) | |
| 4684 | qed (use \<open>y \<in> T\<close> \<open>0 < d\<close> fk kTS in \<open>force+\<close>) | |
| 4685 | have "dist (h (k y')) (h (k y)) < e" if "y' \<in> T" "dist y y' < \<delta>" for y' | |
| 4686 | proof - | |
| 4687 | have k1: "k y \<in> S" "f (k y) = y" and k2: "k y' \<in> S" "f (k y') = y'" | |
| 4688 | by (auto simp: \<open>y \<in> T\<close> \<open>y' \<in> T\<close> kTS fk) | |
| 4689 |       have 1: "\<And>v. \<lbrakk>v \<in> S; f v = y\<rbrakk> \<Longrightarrow> \<exists>v'. v' \<in> {z \<in> S. f z = y'} \<and> dist v v' < d"
 | |
| 4690 |        and 2: "\<And>v'. \<lbrakk>v' \<in> S; f v' = y'\<rbrakk> \<Longrightarrow> \<exists>v. v \<in> {z \<in> S. f z = y} \<and> dist v' v < d"
 | |
| 4691 | using \<delta> [OF that] by auto | |
| 4692 | then obtain w' w where "w' \<in> S" "f w' = y'" "dist (k y) w' < d" | |
| 4693 | and "w \<in> S" "f w = y" "dist (k y') w < d" | |
| 4694 | using 1 [OF k1] 2 [OF k2] by auto | |
| 4695 | then show ?thesis | |
| 4696 | using d [of w "k y'"] d [of w' "k y"] k1 k2 \<open>y' \<in> T\<close> \<open>y \<in> T\<close> hle | |
| 4697 | by (fastforce simp: dist_norm abs_diff_less_iff algebra_simps) | |
| 4698 | qed | |
| 4699 | then show "\<exists>d>0. \<forall>x'\<in>T. dist x' y < d \<longrightarrow> dist (h (k x')) (h (k y)) < e" | |
| 76944 | 4700 | using \<open>0 < \<delta>\<close> by (auto simp: dist_commute) | 
| 64845 | 4701 | qed | 
| 4702 | then show "\<exists>h. continuous_on T h \<and> (\<forall>x\<in>T. g x = exp (\<i> * complex_of_real (h x)))" | |
| 4703 | using fk gfh kTS by force | |
| 4704 | qed | |
| 4705 | ||
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4706 | |
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4707 | text\<open>If two points are separated by a closed set, there's a minimal one.\<close> | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4708 | proposition closed_irreducible_separator: | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4709 | fixes a :: "'a::real_normed_vector" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4710 | assumes "closed S" and ab: "\<not> connected_component (- S) a b" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4711 |   obtains T where "T \<subseteq> S" "closed T" "T \<noteq> {}" "\<not> connected_component (- T) a b"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4712 | "\<And>U. U \<subset> T \<Longrightarrow> connected_component (- U) a b" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4713 | proof (cases "a \<in> S \<or> b \<in> S") | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4714 | case True | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4715 | then show ?thesis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4716 | proof | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4717 | assume *: "a \<in> S" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4718 | show ?thesis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4719 | proof | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4720 |       show "{a} \<subseteq> S"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4721 | using * by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4722 |       show "\<not> connected_component (- {a}) a b"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4723 | using connected_component_in by auto | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4724 |       show "\<And>U. U \<subset> {a} \<Longrightarrow> connected_component (- U) a b"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4725 | by (metis connected_component_UNIV UNIV_I compl_bot_eq connected_component_eq_eq less_le_not_le subset_singletonD) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4726 | qed auto | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4727 | next | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4728 | assume *: "b \<in> S" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4729 | show ?thesis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4730 | proof | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4731 |       show "{b} \<subseteq> S"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4732 | using * by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4733 |       show "\<not> connected_component (- {b}) a b"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4734 | using connected_component_in by auto | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4735 |       show "\<And>U. U \<subset> {b} \<Longrightarrow> connected_component (- U) a b"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4736 | by (metis connected_component_UNIV UNIV_I compl_bot_eq connected_component_eq_eq less_le_not_le subset_singletonD) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4737 | qed auto | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4738 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4739 | next | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4740 | case False | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4741 | define A where "A \<equiv> connected_component_set (- S) a" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4742 | define B where "B \<equiv> connected_component_set (- (closure A)) b" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4743 | have "a \<in> A" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4744 | using False A_def by auto | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4745 | have "b \<in> B" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4746 | unfolding A_def B_def closure_Un_frontier | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4747 | using ab False \<open>closed S\<close> frontier_complement frontier_of_connected_component_subset frontier_subset_closed by force | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4748 | have "frontier B \<subseteq> frontier (connected_component_set (- closure A) b)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4749 | using B_def by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4750 | also have frsub: "... \<subseteq> frontier A" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4751 | proof - | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4752 | have "\<And>A. closure (- closure (- A)) \<subseteq> closure A" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4753 | by (metis (no_types) closure_mono closure_subset compl_le_compl_iff double_compl) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4754 | then show ?thesis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4755 | by (metis (no_types) closure_closure double_compl frontier_closures frontier_of_connected_component_subset le_inf_iff subset_trans) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4756 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4757 | finally have frBA: "frontier B \<subseteq> frontier A" . | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4758 | show ?thesis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4759 | proof | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4760 | show "frontier B \<subseteq> S" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4761 | proof - | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4762 | have "frontier S \<subseteq> S" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4763 | by (simp add: \<open>closed S\<close> frontier_subset_closed) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4764 | then show ?thesis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4765 | using frsub frontier_complement frontier_of_connected_component_subset | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4766 | unfolding A_def B_def by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4767 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4768 | show "closed (frontier B)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4769 | by simp | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4770 | show "\<not> connected_component (- frontier B) a b" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4771 | unfolding connected_component_def | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4772 | proof clarify | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4773 | fix T | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4774 | assume "connected T" and TB: "T \<subseteq> - frontier B" and "a \<in> T" and "b \<in> T" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4775 | have "a \<notin> B" | 
| 69712 | 4776 | by (metis A_def B_def ComplD \<open>a \<in> A\<close> assms(1) closed_open connected_component_subset in_closure_connected_component subsetD) | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4777 |       have "T \<inter> B \<noteq> {}"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4778 | using \<open>b \<in> B\<close> \<open>b \<in> T\<close> by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4779 |       moreover have "T - B \<noteq> {}"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4780 | using \<open>a \<notin> B\<close> \<open>a \<in> T\<close> by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4781 | ultimately show "False" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4782 | using connected_Int_frontier [of T B] TB \<open>connected T\<close> by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4783 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4784 |     moreover have "connected_component (- frontier B) a b" if "frontier B = {}"
 | 
| 72245 | 4785 | using connected_component_eq_UNIV that by auto | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4786 |     ultimately show "frontier B \<noteq> {}"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4787 | by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4788 | show "connected_component (- U) a b" if "U \<subset> frontier B" for U | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4789 | proof - | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4790 | obtain p where Usub: "U \<subseteq> frontier B" and p: "p \<in> frontier B" "p \<notin> U" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4791 | using \<open>U \<subset> frontier B\<close> by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4792 | show ?thesis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4793 | unfolding connected_component_def | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4794 | proof (intro exI conjI) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4795 | have "connected ((insert p A) \<union> (insert p B))" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4796 | proof (rule connected_Un) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4797 | show "connected (insert p A)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4798 | by (metis A_def IntD1 frBA \<open>p \<in> frontier B\<close> closure_insert closure_subset connected_connected_component connected_intermediate_closure frontier_closures insert_absorb subsetCE subset_insertI) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4799 | show "connected (insert p B)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4800 | by (metis B_def IntD1 \<open>p \<in> frontier B\<close> closure_insert closure_subset connected_connected_component connected_intermediate_closure frontier_closures insert_absorb subset_insertI) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4801 | qed blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4802 | then show "connected (insert p (B \<union> A))" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4803 | by (simp add: sup.commute) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4804 | have "A \<subseteq> - U" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4805 | using A_def Usub \<open>frontier B \<subseteq> S\<close> connected_component_subset by fastforce | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4806 | moreover have "B \<subseteq> - U" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4807 | using B_def Usub connected_component_subset frBA frontier_closures by fastforce | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4808 | ultimately show "insert p (B \<union> A) \<subseteq> - U" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4809 | using p by auto | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4810 | qed (auto simp: \<open>a \<in> A\<close> \<open>b \<in> B\<close>) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4811 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4812 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4813 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4814 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4815 | lemma frontier_minimal_separating_closed_pointwise: | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4816 | fixes S :: "'a::real_normed_vector set" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4817 | assumes S: "closed S" "a \<notin> S" and nconn: "\<not> connected_component (- S) a b" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4818 | and conn: "\<And>T. \<lbrakk>closed T; T \<subset> S\<rbrakk> \<Longrightarrow> connected_component (- T) a b" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4819 | shows "frontier(connected_component_set (- S) a) = S" (is "?F = S") | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4820 | proof - | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4821 | have "?F \<subseteq> S" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4822 | by (simp add: S componentsI frontier_of_components_closed_complement) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4823 | moreover have False if "?F \<subset> S" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4824 | proof - | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4825 | have "connected_component (- ?F) a b" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4826 | by (simp add: conn that) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4827 | then obtain T where "connected T" "T \<subseteq> -?F" "a \<in> T" "b \<in> T" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4828 | by (auto simp: connected_component_def) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4829 |     moreover have "T \<inter> ?F \<noteq> {}"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4830 | proof (rule connected_Int_frontier [OF \<open>connected T\<close>]) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4831 |       show "T \<inter> connected_component_set (- S) a \<noteq> {}"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4832 | using \<open>a \<notin> S\<close> \<open>a \<in> T\<close> by fastforce | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4833 |       show "T - connected_component_set (- S) a \<noteq> {}"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4834 | using \<open>b \<in> T\<close> nconn by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4835 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4836 | ultimately show ?thesis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4837 | by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4838 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4839 | ultimately show ?thesis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4840 | by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4841 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4842 | |
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4843 | |
| 69683 | 4844 | subsection\<open>Unicoherence (closed)\<close> | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68634diff
changeset | 4845 | |
| 70136 | 4846 | definition\<^marker>\<open>tag important\<close> unicoherent where | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4847 | "unicoherent U \<equiv> | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4848 | \<forall>S T. connected S \<and> connected T \<and> S \<union> T = U \<and> | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 4849 | closedin (top_of_set U) S \<and> closedin (top_of_set U) T | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4850 | \<longrightarrow> connected (S \<inter> T)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4851 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4852 | lemma unicoherentI [intro?]: | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 4853 | assumes "\<And>S T. \<lbrakk>connected S; connected T; U = S \<union> T; closedin (top_of_set U) S; closedin (top_of_set U) T\<rbrakk> | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4854 | \<Longrightarrow> connected (S \<inter> T)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4855 | shows "unicoherent U" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4856 | using assms unfolding unicoherent_def by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4857 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4858 | lemma unicoherentD: | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 4859 | assumes "unicoherent U" "connected S" "connected T" "U = S \<union> T" "closedin (top_of_set U) S" "closedin (top_of_set U) T" | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4860 | shows "connected (S \<inter> T)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4861 | using assms unfolding unicoherent_def by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4862 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4863 | proposition homeomorphic_unicoherent: | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4864 | assumes ST: "S homeomorphic T" and S: "unicoherent S" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4865 | shows "unicoherent T" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4866 | proof - | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4867 | obtain f g where gf: "\<And>x. x \<in> S \<Longrightarrow> g (f x) = x" and fim: "T = f ` S" and gfim: "g ` f ` S = S" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4868 | and contf: "continuous_on S f" and contg: "continuous_on (f ` S) g" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4869 | using ST by (auto simp: homeomorphic_def homeomorphism_def) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4870 | show ?thesis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4871 | proof | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4872 | fix U V | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4873 | assume "connected U" "connected V" and T: "T = U \<union> V" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 4874 | and cloU: "closedin (top_of_set T) U" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 4875 | and cloV: "closedin (top_of_set T) V" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 4876 | have "f \<in> (g ` U \<inter> g ` V) \<rightarrow> U" "f \<in> (g ` U \<inter> g ` V) \<rightarrow> V" | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4877 | using gf fim T by auto (metis UnCI image_iff)+ | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4878 | moreover have "U \<inter> V \<subseteq> f ` (g ` U \<inter> g ` V)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4879 | using gf fim by (force simp: image_iff T) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4880 | ultimately have "U \<inter> V = f ` (g ` U \<inter> g ` V)" by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4881 | moreover have "connected (f ` (g ` U \<inter> g ` V))" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4882 | proof (rule connected_continuous_image) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4883 | show "continuous_on (g ` U \<inter> g ` V) f" | 
| 72245 | 4884 | using T fim gfim by (metis Un_upper1 contf continuous_on_subset image_mono inf_le1) | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4885 | show "connected (g ` U \<inter> g ` V)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4886 | proof (intro conjI unicoherentD [OF S]) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4887 | show "connected (g ` U)" "connected (g ` V)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4888 | using \<open>connected U\<close> cloU \<open>connected V\<close> cloV | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4889 | by (metis Topological_Spaces.connected_continuous_image closedin_imp_subset contg continuous_on_subset fim)+ | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4890 | show "S = g ` U \<union> g ` V" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4891 | using T fim gfim by auto | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4892 | have hom: "homeomorphism T S g f" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4893 | by (simp add: contf contg fim gf gfim homeomorphism_def) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 4894 | have "closedin (top_of_set T) U" "closedin (top_of_set T) V" | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4895 | by (simp_all add: cloU cloV) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 4896 | then show "closedin (top_of_set S) (g ` U)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 4897 | "closedin (top_of_set S) (g ` V)" | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4898 | by (blast intro: homeomorphism_imp_closed_map [OF hom])+ | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4899 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4900 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4901 | ultimately show "connected (U \<inter> V)" by metis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4902 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4903 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4904 | |
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4905 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4906 | lemma homeomorphic_unicoherent_eq: | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4907 | "S homeomorphic T \<Longrightarrow> (unicoherent S \<longleftrightarrow> unicoherent T)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4908 | by (meson homeomorphic_sym homeomorphic_unicoherent) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4909 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4910 | lemma unicoherent_translation: | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4911 | fixes S :: "'a::real_normed_vector set" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4912 | shows | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4913 | "unicoherent (image (\<lambda>x. a + x) S) \<longleftrightarrow> unicoherent S" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4914 | using homeomorphic_translation homeomorphic_unicoherent_eq by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4915 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4916 | lemma unicoherent_injective_linear_image: | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4917 | fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4918 | assumes "linear f" "inj f" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4919 | shows "(unicoherent(f ` S) \<longleftrightarrow> unicoherent S)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4920 | using assms homeomorphic_unicoherent_eq linear_homeomorphic_image by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4921 | |
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4922 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 4923 | lemma Borsukian_imp_unicoherent: | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4924 | fixes U :: "'a::euclidean_space set" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4925 | assumes "Borsukian U" shows "unicoherent U" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4926 | unfolding unicoherent_def | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4927 | proof clarify | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4928 | fix S T | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4929 | assume "connected S" "connected T" "U = S \<union> T" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 4930 | and cloS: "closedin (top_of_set (S \<union> T)) S" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 4931 | and cloT: "closedin (top_of_set (S \<union> T)) T" | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4932 | show "connected (S \<inter> T)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4933 | unfolding connected_closedin_eq | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4934 | proof clarify | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4935 | fix V W | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 4936 | assume "closedin (top_of_set (S \<inter> T)) V" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 4937 | and "closedin (top_of_set (S \<inter> T)) W" | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4938 |        and VW: "V \<union> W = S \<inter> T" "V \<inter> W = {}" and "V \<noteq> {}" "W \<noteq> {}"
 | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 4939 | then have cloV: "closedin (top_of_set U) V" and cloW: "closedin (top_of_set U) W" | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4940 | using \<open>U = S \<union> T\<close> cloS cloT closedin_trans by blast+ | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4941 | obtain q where contq: "continuous_on U q" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4942 |          and q01: "\<And>x. x \<in> U \<Longrightarrow> q x \<in> {0..1::real}"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4943 | and qV: "\<And>x. x \<in> V \<Longrightarrow> q x = 0" and qW: "\<And>x. x \<in> W \<Longrightarrow> q x = 1" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4944 |       by (rule Urysohn_local [OF cloV cloW \<open>V \<inter> W = {}\<close>, of 0 1])
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4945 | (fastforce simp: closed_segment_eq_real_ivl) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4946 | let ?h = "\<lambda>x. if x \<in> S then exp(pi * \<i> * q x) else 1 / exp(pi * \<i> * q x)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4947 | have eqST: "exp(pi * \<i> * q x) = 1 / exp(pi * \<i> * q x)" if "x \<in> S \<inter> T" for x | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4948 | proof - | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4949 | have "x \<in> V \<union> W" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4950 | using that \<open>V \<union> W = S \<inter> T\<close> by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4951 | with qV qW show ?thesis by force | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4952 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4953 | obtain g where contg: "continuous_on U g" | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 4954 | and circle: "g \<in> U \<rightarrow> sphere 0 1" | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4955 | and S: "\<And>x. x \<in> S \<Longrightarrow> g x = exp(pi * \<i> * q x)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4956 | and T: "\<And>x. x \<in> T \<Longrightarrow> g x = 1 / exp(pi * \<i> * q x)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4957 | proof | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4958 | show "continuous_on U ?h" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4959 | unfolding \<open>U = S \<union> T\<close> | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4960 | proof (rule continuous_on_cases_local [OF cloS cloT]) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4961 | show "continuous_on S (\<lambda>x. exp (pi * \<i> * q x))" | 
| 72245 | 4962 | proof (intro continuous_intros) | 
| 4963 | show "continuous_on S q" | |
| 4964 | using \<open>U = S \<union> T\<close> continuous_on_subset contq by blast | |
| 4965 | qed | |
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4966 | show "continuous_on T (\<lambda>x. 1 / exp (pi * \<i> * q x))" | 
| 72245 | 4967 | proof (intro continuous_intros) | 
| 4968 | show "continuous_on T q" | |
| 4969 | using \<open>U = S \<union> T\<close> continuous_on_subset contq by auto | |
| 4970 | qed auto | |
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4971 | qed (use eqST in auto) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4972 | qed (use eqST in \<open>auto simp: norm_divide\<close>) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4973 | then obtain h where conth: "continuous_on U h" and heq: "\<And>x. x \<in> U \<Longrightarrow> g x = exp (h x)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4974 | by (metis Borsukian_continuous_logarithm_circle assms) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4975 | obtain v w where "v \<in> V" "w \<in> W" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4976 |       using \<open>V \<noteq> {}\<close> \<open>W \<noteq> {}\<close> by blast
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4977 | then have vw: "v \<in> S \<inter> T" "w \<in> S \<inter> T" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4978 | using VW by auto | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4979 | have iff: "2 * pi \<le> cmod (2 * of_int m * of_real pi * \<i> - 2 * of_int n * of_real pi * \<i>) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4980 | \<longleftrightarrow> 1 \<le> abs (m - n)" for m n | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4981 | proof - | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4982 | have "2 * pi \<le> cmod (2 * of_int m * of_real pi * \<i> - 2 * of_int n * of_real pi * \<i>) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4983 | \<longleftrightarrow> 2 * pi \<le> cmod ((2 * pi * \<i>) * (of_int m - of_int n))" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4984 | by (simp add: algebra_simps) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4985 | also have "... \<longleftrightarrow> 2 * pi \<le> 2 * pi * cmod (of_int m - of_int n)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4986 | by (simp add: norm_mult) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4987 | also have "... \<longleftrightarrow> 1 \<le> abs (m - n)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4988 | by simp (metis norm_of_int of_int_1_le_iff of_int_abs of_int_diff) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4989 | finally show ?thesis . | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4990 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4991 | have *: "\<exists>n::int. h x - (pi * \<i> * q x) = (of_int(2*n) * pi) * \<i>" if "x \<in> S" for x | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4992 | using that S \<open>U = S \<union> T\<close> heq exp_eq [symmetric] by (simp add: algebra_simps) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4993 | moreover have "(\<lambda>x. h x - (pi * \<i> * q x)) constant_on S" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4994 | proof (rule continuous_discrete_range_constant [OF \<open>connected S\<close>]) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4995 | have "continuous_on S h" "continuous_on S q" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4996 | using \<open>U = S \<union> T\<close> continuous_on_subset conth contq by blast+ | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4997 | then show "continuous_on S (\<lambda>x. h x - (pi * \<i> * q x))" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4998 | by (intro continuous_intros) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 4999 | have "2*pi \<le> cmod (h y - (pi * \<i> * q y) - (h x - (pi * \<i> * q x)))" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5000 | if "x \<in> S" "y \<in> S" and ne: "h y - (pi * \<i> * q y) \<noteq> h x - (pi * \<i> * q x)" for x y | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5001 | using * [OF \<open>x \<in> S\<close>] * [OF \<open>y \<in> S\<close>] ne by (auto simp: iff) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5002 | then show "\<And>x. x \<in> S \<Longrightarrow> | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5003 | \<exists>e>0. \<forall>y. y \<in> S \<and> h y - (pi * \<i> * q y) \<noteq> h x - (pi * \<i> * q x) \<longrightarrow> | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5004 | e \<le> cmod (h y - (pi * \<i> * q y) - (h x - (pi * \<i> * q x)))" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5005 | by (rule_tac x="2*pi" in exI) auto | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5006 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5007 | ultimately | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5008 | obtain m where m: "\<And>x. x \<in> S \<Longrightarrow> h x - (pi * \<i> * q x) = (of_int(2*m) * pi) * \<i>" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5009 | using vw by (force simp: constant_on_def) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5010 | have *: "\<exists>n::int. h x = - (pi * \<i> * q x) + (of_int(2*n) * pi) * \<i>" if "x \<in> T" for x | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5011 | unfolding exp_eq [symmetric] | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5012 | using that T \<open>U = S \<union> T\<close> by (simp add: exp_minus field_simps heq [symmetric]) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5013 | moreover have "(\<lambda>x. h x + (pi * \<i> * q x)) constant_on T" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5014 | proof (rule continuous_discrete_range_constant [OF \<open>connected T\<close>]) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5015 | have "continuous_on T h" "continuous_on T q" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5016 | using \<open>U = S \<union> T\<close> continuous_on_subset conth contq by blast+ | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5017 | then show "continuous_on T (\<lambda>x. h x + (pi * \<i> * q x))" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5018 | by (intro continuous_intros) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5019 | have "2*pi \<le> cmod (h y + (pi * \<i> * q y) - (h x + (pi * \<i> * q x)))" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5020 | if "x \<in> T" "y \<in> T" and ne: "h y + (pi * \<i> * q y) \<noteq> h x + (pi * \<i> * q x)" for x y | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5021 | using * [OF \<open>x \<in> T\<close>] * [OF \<open>y \<in> T\<close>] ne by (auto simp: iff) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5022 | then show "\<And>x. x \<in> T \<Longrightarrow> | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5023 | \<exists>e>0. \<forall>y. y \<in> T \<and> h y + (pi * \<i> * q y) \<noteq> h x + (pi * \<i> * q x) \<longrightarrow> | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5024 | e \<le> cmod (h y + (pi * \<i> * q y) - (h x + (pi * \<i> * q x)))" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5025 | by (rule_tac x="2*pi" in exI) auto | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5026 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5027 | ultimately | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5028 | obtain n where n: "\<And>x. x \<in> T \<Longrightarrow> h x + (pi * \<i> * q x) = (of_int(2*n) * pi) * \<i>" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5029 | using vw by (force simp: constant_on_def) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5030 | show "False" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5031 | using m [of v] m [of w] n [of v] n [of w] vw | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5032 | by (auto simp: algebra_simps \<open>v \<in> V\<close> \<open>w \<in> W\<close> qV qW) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5033 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5034 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5035 | |
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5036 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5037 | corollary contractible_imp_unicoherent: | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5038 | fixes U :: "'a::euclidean_space set" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5039 | assumes "contractible U" shows "unicoherent U" | 
| 70136 | 5040 | by (simp add: Borsukian_imp_unicoherent assms contractible_imp_Borsukian) | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68634diff
changeset | 5041 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5042 | corollary convex_imp_unicoherent: | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5043 | fixes U :: "'a::euclidean_space set" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5044 | assumes "convex U" shows "unicoherent U" | 
| 70136 | 5045 | by (simp add: Borsukian_imp_unicoherent assms convex_imp_Borsukian) | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5046 | |
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5047 | text\<open>If the type class constraint can be relaxed, I don't know how!\<close> | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5048 | corollary unicoherent_UNIV: "unicoherent (UNIV :: 'a :: euclidean_space set)" | 
| 70136 | 5049 | by (simp add: convex_imp_unicoherent) | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68634diff
changeset | 5050 | |
| 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68634diff
changeset | 5051 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5052 | lemma unicoherent_monotone_image_compact: | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5053 | fixes T :: "'b :: t2_space set" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5054 | assumes S: "unicoherent S" "compact S" and contf: "continuous_on S f" and fim: "f ` S = T" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5055 |   and conn: "\<And>y. y \<in> T \<Longrightarrow> connected (S \<inter> f -` {y})"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5056 | shows "unicoherent T" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5057 | proof | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5058 | fix U V | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5059 | assume UV: "connected U" "connected V" "T = U \<union> V" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 5060 | and cloU: "closedin (top_of_set T) U" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 5061 | and cloV: "closedin (top_of_set T) V" | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5062 | moreover have "compact T" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5063 | using \<open>compact S\<close> compact_continuous_image contf fim by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5064 | ultimately have "closed U" "closed V" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5065 | by (auto simp: closedin_closed_eq compact_imp_closed) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5066 | let ?SUV = "(S \<inter> f -` U) \<inter> (S \<inter> f -` V)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5067 | have UV_eq: "f ` ?SUV = U \<inter> V" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5068 | using \<open>T = U \<union> V\<close> fim by force+ | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5069 | have "connected (f ` ?SUV)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5070 | proof (rule connected_continuous_image) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5071 | show "continuous_on ?SUV f" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5072 | by (meson contf continuous_on_subset inf_le1) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5073 | show "connected ?SUV" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5074 | proof (rule unicoherentD [OF \<open>unicoherent S\<close>, of "S \<inter> f -` U" "S \<inter> f -` V"]) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 5075 | have "\<And>C. closedin (top_of_set S) C \<Longrightarrow> closedin (top_of_set T) (f ` C)" | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5076 | by (metis \<open>compact S\<close> closed_subset closedin_compact closedin_imp_subset compact_continuous_image compact_imp_closed contf continuous_on_subset fim image_mono) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5077 | then show "connected (S \<inter> f -` U)" "connected (S \<inter> f -` V)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5078 | using UV by (auto simp: conn intro: connected_closed_monotone_preimage [OF contf fim]) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5079 | show "S = (S \<inter> f -` U) \<union> (S \<inter> f -` V)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5080 | using UV fim by blast | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 5081 | show "closedin (top_of_set S) (S \<inter> f -` U)" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 5082 | "closedin (top_of_set S) (S \<inter> f -` V)" | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5083 | by (auto simp: continuous_on_imp_closedin cloU cloV contf fim) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5084 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5085 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5086 | with UV_eq show "connected (U \<inter> V)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5087 | by simp | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5088 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5089 | |
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5090 | |
| 69683 | 5091 | subsection\<open>Several common variants of unicoherence\<close> | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68634diff
changeset | 5092 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5093 | lemma connected_frontier_simple: | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5094 | fixes S :: "'a :: euclidean_space set" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5095 | assumes "connected S" "connected(- S)" shows "connected(frontier S)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5096 | unfolding frontier_closures | 
| 72245 | 5097 | by (rule unicoherentD [OF unicoherent_UNIV]; simp add: assms connected_imp_connected_closure flip: closure_Un) | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5098 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5099 | lemma connected_frontier_component_complement: | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5100 | fixes S :: "'a :: euclidean_space set" | 
| 72245 | 5101 | assumes "connected S" "C \<in> components(- S)" shows "connected(frontier C)" | 
| 5102 | by (meson assms component_complement_connected connected_frontier_simple in_components_connected) | |
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5103 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5104 | lemma connected_frontier_disjoint: | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5105 | fixes S :: "'a :: euclidean_space set" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5106 | assumes "connected S" "connected T" "disjnt S T" and ST: "frontier S \<subseteq> frontier T" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5107 | shows "connected(frontier S)" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5108 | proof (cases "S = UNIV") | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5109 | case True then show ?thesis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5110 | by simp | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5111 | next | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5112 | case False | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5113 |   then have "-S \<noteq> {}"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5114 | by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5115 | then obtain C where C: "C \<in> components(- S)" and "T \<subseteq> C" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5116 | by (metis ComplI disjnt_iff subsetI exists_component_superset \<open>disjnt S T\<close> \<open>connected T\<close>) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5117 | moreover have "frontier S = frontier C" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5118 | proof - | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5119 | have "frontier C \<subseteq> frontier S" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5120 | using C frontier_complement frontier_of_components_subset by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5121 | moreover have "x \<in> frontier C" if "x \<in> frontier S" for x | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5122 | proof - | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5123 | have "x \<in> closure C" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5124 | using that unfolding frontier_def | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5125 | by (metis (no_types) Diff_eq ST \<open>T \<subseteq> C\<close> closure_mono contra_subsetD frontier_def le_inf_iff that) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5126 | moreover have "x \<notin> interior C" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5127 | using that unfolding frontier_def | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5128 | by (metis C Compl_eq_Diff_UNIV Diff_iff subsetD in_components_subset interior_diff interior_mono) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5129 | ultimately show ?thesis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5130 | by (auto simp: frontier_def) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5131 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5132 | ultimately show ?thesis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5133 | by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5134 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5135 | ultimately show ?thesis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5136 | using \<open>connected S\<close> connected_frontier_component_complement by auto | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5137 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5138 | |
| 66941 
c67bb79a0ceb
More topological results overlooked last time
 paulson <lp15@cam.ac.uk> parents: 
66939diff
changeset | 5139 | |
| 69683 | 5140 | subsection\<open>Some separation results\<close> | 
| 68833 
fde093888c16
tagged 21 theories in the Analysis library for the manual
 Angeliki KoutsoukouArgyraki <ak2110@cam.ac.uk> parents: 
68634diff
changeset | 5141 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5142 | lemma separation_by_component_closed_pointwise: | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5143 | fixes S :: "'a :: euclidean_space set" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5144 | assumes "closed S" "\<not> connected_component (- S) a b" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5145 | obtains C where "C \<in> components S" "\<not> connected_component(- C) a b" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5146 | proof (cases "a \<in> S \<or> b \<in> S") | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5147 | case True | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5148 | then show ?thesis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5149 | using connected_component_in componentsI that by fastforce | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5150 | next | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5151 | case False | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5152 |   obtain T where "T \<subseteq> S" "closed T" "T \<noteq> {}"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5153 | and nab: "\<not> connected_component (- T) a b" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5154 | and conn: "\<And>U. U \<subset> T \<Longrightarrow> connected_component (- U) a b" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5155 | using closed_irreducible_separator [OF assms] by metis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5156 | moreover have "connected T" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5157 | proof - | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5158 | have ab: "frontier(connected_component_set (- T) a) = T" "frontier(connected_component_set (- T) b) = T" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5159 | using frontier_minimal_separating_closed_pointwise | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5160 | by (metis False \<open>T \<subseteq> S\<close> \<open>closed T\<close> connected_component_sym conn connected_component_eq_empty connected_component_intermediate_subset empty_subsetI nab)+ | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5161 | have "connected (frontier (connected_component_set (- T) a))" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5162 | proof (rule connected_frontier_disjoint) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5163 | show "disjnt (connected_component_set (- T) a) (connected_component_set (- T) b)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5164 | unfolding disjnt_iff | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5165 | by (metis connected_component_eq connected_component_eq_empty connected_component_idemp mem_Collect_eq nab) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5166 | show "frontier (connected_component_set (- T) a) \<subseteq> frontier (connected_component_set (- T) b)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5167 | by (simp add: ab) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5168 | qed auto | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5169 | with ab \<open>closed T\<close> show ?thesis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5170 | by simp | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5171 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5172 | ultimately obtain C where "C \<in> components S" "T \<subseteq> C" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5173 | using exists_component_superset [of T S] by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5174 | then show ?thesis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5175 | by (meson Compl_anti_mono connected_component_of_subset nab that) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5176 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5177 | |
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5178 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5179 | lemma separation_by_component_closed: | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5180 | fixes S :: "'a :: euclidean_space set" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5181 | assumes "closed S" "\<not> connected(- S)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5182 | obtains C where "C \<in> components S" "\<not> connected(- C)" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5183 | proof - | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5184 | obtain x y where "closed S" "x \<notin> S" "y \<notin> S" and "\<not> connected_component (- S) x y" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5185 | using assms by (auto simp: connected_iff_connected_component) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5186 | then obtain C where "C \<in> components S" "\<not> connected_component(- C) x y" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5187 | using separation_by_component_closed_pointwise by metis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5188 | then show "thesis" | 
| 72245 | 5189 | by (metis Compl_iff \<open>x \<notin> S\<close> \<open>y \<notin> S\<close> connected_component_eq_self in_components_subset mem_Collect_eq subsetD that) | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5190 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5191 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5192 | lemma separation_by_Un_closed_pointwise: | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5193 | fixes S :: "'a :: euclidean_space set" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5194 |   assumes ST: "closed S" "closed T" "S \<inter> T = {}"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5195 | and conS: "connected_component (- S) a b" and conT: "connected_component (- T) a b" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5196 | shows "connected_component (- (S \<union> T)) a b" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5197 | proof (rule ccontr) | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5198 | have "a \<notin> S" "b \<notin> S" "a \<notin> T" "b \<notin> T" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5199 | using conS conT connected_component_in by auto | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5200 | assume "\<not> connected_component (- (S \<union> T)) a b" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5201 | then obtain C where "C \<in> components (S \<union> T)" and C: "\<not> connected_component(- C) a b" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5202 | using separation_by_component_closed_pointwise assms by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5203 | then have "C \<subseteq> S \<or> C \<subseteq> T" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5204 | proof - | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5205 | have "connected C" "C \<subseteq> S \<union> T" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5206 | using \<open>C \<in> components (S \<union> T)\<close> in_components_subset by (blast elim: componentsE)+ | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5207 |     moreover then have "C \<inter> T = {} \<or> C \<inter> S = {}"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5208 | by (metis Int_empty_right ST inf.commute connected_closed) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5209 | ultimately show ?thesis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5210 | by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5211 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5212 | then show False | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5213 | by (meson Compl_anti_mono C conS conT connected_component_of_subset) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5214 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5215 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5216 | lemma separation_by_Un_closed: | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5217 | fixes S :: "'a :: euclidean_space set" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5218 |   assumes ST: "closed S" "closed T" "S \<inter> T = {}" and conS: "connected(- S)" and conT: "connected(- T)"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5219 | shows "connected(- (S \<union> T))" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5220 | using assms separation_by_Un_closed_pointwise | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5221 | by (fastforce simp add: connected_iff_connected_component) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5222 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5223 | lemma open_unicoherent_UNIV: | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5224 | fixes S :: "'a :: euclidean_space set" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5225 | assumes "open S" "open T" "connected S" "connected T" "S \<union> T = UNIV" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5226 | shows "connected(S \<inter> T)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5227 | proof - | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5228 | have "connected(- (-S \<union> -T))" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5229 | by (metis closed_Compl compl_sup compl_top_eq double_compl separation_by_Un_closed assms) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5230 | then show ?thesis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5231 | by simp | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5232 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5233 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5234 | lemma separation_by_component_open_aux: | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5235 | fixes S :: "'a :: euclidean_space set" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5236 |   assumes ST: "closed S" "closed T" "S \<inter> T = {}"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5237 |       and "S \<noteq> {}" "T \<noteq> {}"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5238 |   obtains C where "C \<in> components(-(S \<union> T))" "C \<noteq> {}" "frontier C \<inter> S \<noteq> {}" "frontier C \<inter> T \<noteq> {}"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5239 | proof (rule ccontr) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5240 |   let ?S = "S \<union> \<Union>{C \<in> components(- (S \<union> T)). frontier C \<subseteq> S}"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5241 |   let ?T = "T \<union> \<Union>{C \<in> components(- (S \<union> T)). frontier C \<subseteq> T}"
 | 
| 69508 | 5242 | assume "\<not> thesis" | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5243 |   with that have *: "frontier C \<inter> S = {} \<or> frontier C \<inter> T = {}"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5244 |             if C: "C \<in> components (- (S \<union> T))" "C \<noteq> {}" for C
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5245 | using C by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5246 |   have "\<exists>A B::'a set. closed A \<and> closed B \<and> UNIV \<subseteq> A \<union> B \<and> A \<inter> B = {} \<and> A \<noteq> {} \<and> B \<noteq> {}"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5247 | proof (intro exI conjI) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5248 |     have "frontier (\<Union>{C \<in> components (- S \<inter> - T). frontier C \<subseteq> S}) \<subseteq> S"
 | 
| 72245 | 5249 | using subset_trans [OF frontier_Union_subset_closure] | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5250 | by (metis (no_types, lifting) SUP_least \<open>closed S\<close> closure_minimal mem_Collect_eq) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5251 | then have "frontier ?S \<subseteq> S" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5252 | by (simp add: frontier_subset_eq assms subset_trans [OF frontier_Un_subset]) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5253 | then show "closed ?S" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5254 | using frontier_subset_eq by fastforce | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5255 |     have "frontier (\<Union>{C \<in> components (- S \<inter> - T). frontier C \<subseteq> T}) \<subseteq> T"
 | 
| 72245 | 5256 | using subset_trans [OF frontier_Union_subset_closure] | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5257 | by (metis (no_types, lifting) SUP_least \<open>closed T\<close> closure_minimal mem_Collect_eq) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5258 | then have "frontier ?T \<subseteq> T" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5259 | by (simp add: frontier_subset_eq assms subset_trans [OF frontier_Un_subset]) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5260 | then show "closed ?T" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5261 | using frontier_subset_eq by fastforce | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5262 | have "UNIV \<subseteq> (S \<union> T) \<union> \<Union>(components(- (S \<union> T)))" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5263 | using Union_components by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5264 | also have "... \<subseteq> ?S \<union> ?T" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5265 | proof - | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5266 | have "C \<in> components (-(S \<union> T)) \<and> frontier C \<subseteq> S \<or> | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5267 | C \<in> components (-(S \<union> T)) \<and> frontier C \<subseteq> T" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5268 |         if "C \<in> components (- (S \<union> T))" "C \<noteq> {}" for C
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5269 | using * [OF that] that | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5270 | by clarify (metis (no_types, lifting) UnE \<open>closed S\<close> \<open>closed T\<close> closed_Un disjoint_iff_not_equal frontier_of_components_closed_complement subsetCE) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5271 | then show ?thesis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5272 | by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5273 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5274 | finally show "UNIV \<subseteq> ?S \<union> ?T" . | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5275 |     have "\<Union>{C \<in> components (- (S \<union> T)). frontier C \<subseteq> S} \<union>
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5276 |           \<Union>{C \<in> components (- (S \<union> T)). frontier C \<subseteq> T} \<subseteq> - (S \<union> T)"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5277 | using in_components_subset by fastforce | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5278 |     moreover have "\<Union>{C \<in> components (- (S \<union> T)). frontier C \<subseteq> S} \<inter>
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5279 |                    \<Union>{C \<in> components (- (S \<union> T)). frontier C \<subseteq> T} = {}"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5280 | proof - | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5281 |       have "C \<inter> C' = {}" if "C \<in> components (- (S \<union> T))" "frontier C \<subseteq> S"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5282 | "C' \<in> components (- (S \<union> T))" "frontier C' \<subseteq> T" for C C' | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5283 | proof - | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5284 | have NUN: "- S \<inter> - T \<noteq> UNIV" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5285 |           using \<open>T \<noteq> {}\<close> by blast
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5286 | have "C \<noteq> C'" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5287 | proof | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5288 | assume "C = C'" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5289 | with that have "frontier C' \<subseteq> S \<inter> T" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5290 | by simp | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5291 |           also have "... = {}"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5292 |             using \<open>S \<inter> T = {}\<close> by blast
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5293 |           finally have "C' = {} \<or> C' = UNIV"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5294 | using frontier_eq_empty by auto | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5295 | then show False | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5296 | using \<open>C = C'\<close> NUN that by (force simp: dest: in_components_nonempty in_components_subset) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5297 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5298 | with that show ?thesis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5299 | by (simp add: components_nonoverlap [of _ "-(S \<union> T)"]) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5300 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5301 | then show ?thesis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5302 | by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5303 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5304 |     ultimately show "?S \<inter> ?T = {}"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5305 | using ST by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5306 |     show "?S \<noteq> {}" "?T \<noteq> {}"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5307 |       using \<open>S \<noteq> {}\<close> \<open>T \<noteq> {}\<close> by blast+
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5308 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5309 | then show False | 
| 69619 
3f7d8e05e0f2
split off Convex.thy: material that does not require Topology_Euclidean_Space
 immler parents: 
69566diff
changeset | 5310 | by (metis Compl_disjoint connected_UNIV compl_bot_eq compl_unique connected_closedD inf_sup_absorb sup_compl_top_left1 top.extremum_uniqueI) | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5311 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5312 | |
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5313 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5314 | proposition separation_by_component_open: | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5315 | fixes S :: "'a :: euclidean_space set" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5316 | assumes "open S" and non: "\<not> connected(- S)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5317 | obtains C where "C \<in> components S" "\<not> connected(- C)" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5318 | proof - | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5319 | obtain T U | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5320 |     where "closed T" "closed U" and TU: "T \<union> U = - S" "T \<inter> U = {}" "T \<noteq> {}" "U \<noteq> {}"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5321 | using assms by (auto simp: connected_closed_set closed_def) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5322 |   then obtain C where C: "C \<in> components(-(T \<union> U))" "C \<noteq> {}"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5323 |           and "frontier C \<inter> T \<noteq> {}" "frontier C \<inter> U \<noteq> {}"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5324 |     using separation_by_component_open_aux [OF \<open>closed T\<close> \<open>closed U\<close> \<open>T \<inter> U = {}\<close>] by force
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5325 | show "thesis" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5326 | proof | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5327 | show "C \<in> components S" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5328 | using C(1) TU(1) by auto | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5329 | show "\<not> connected (- C)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5330 | proof | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5331 | assume "connected (- C)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5332 | then have "connected (frontier C)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5333 | using connected_frontier_simple [of C] \<open>C \<in> components S\<close> in_components_connected by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5334 | then show False | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5335 | unfolding connected_closed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5336 |         by (metis C(1) TU(2) \<open>closed T\<close> \<open>closed U\<close> \<open>frontier C \<inter> T \<noteq> {}\<close> \<open>frontier C \<inter> U \<noteq> {}\<close> closed_Un frontier_of_components_closed_complement inf_bot_right inf_commute)
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5337 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5338 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5339 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5340 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5341 | lemma separation_by_Un_open: | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5342 | fixes S :: "'a :: euclidean_space set" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5343 |   assumes "open S" "open T" "S \<inter> T = {}" and cS: "connected(-S)" and cT: "connected(-T)"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5344 | shows "connected(- (S \<union> T))" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5345 | using assms unicoherent_UNIV unfolding unicoherent_def by force | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5346 | |
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5347 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5348 | lemma nonseparation_by_component_eq: | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5349 | fixes S :: "'a :: euclidean_space set" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5350 | assumes "open S \<or> closed S" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 5351 | shows "((\<forall>C \<in> components S. connected(-C)) \<longleftrightarrow> connected(- S))" | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 5352 | by (metis assms component_complement_connected double_complement separation_by_component_closed separation_by_component_open) | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5353 | |
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5354 | |
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5355 | text\<open>Another interesting equivalent of an inessential mapping into C-{0}\<close>
 | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5356 | proposition inessential_eq_extensible: | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5357 | fixes f :: "'a::euclidean_space \<Rightarrow> complex" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5358 | assumes "closed S" | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 5359 |   shows "(\<exists>a. homotopic_with_canon (\<lambda>h. True) S (-{0}) f (\<lambda>t. a)) \<longleftrightarrow>
 | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5360 | (\<exists>g. continuous_on UNIV g \<and> (\<forall>x \<in> S. g x = f x) \<and> (\<forall>x. g x \<noteq> 0))" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5361 | (is "?lhs = ?rhs") | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5362 | proof | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5363 | assume ?lhs | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 5364 |   then obtain a where a: "homotopic_with_canon (\<lambda>h. True) S (-{0}) f (\<lambda>t. a)" ..
 | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5365 | show ?rhs | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5366 |   proof (cases "S = {}")
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5367 | case True | 
| 71172 | 5368 | with a show ?thesis by force | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5369 | next | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5370 | case False | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5371 |     have anr: "ANR (-{0::complex})"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5372 | by (simp add: ANR_delete open_Compl open_imp_ANR) | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 5373 |     obtain g where contg: "continuous_on UNIV g" and gim: "g \<in> UNIV \<rightarrow> -{0}"
 | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5374 | and gf: "\<And>x. x \<in> S \<Longrightarrow> g x = f x" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5375 | proof (rule Borsuk_homotopy_extension_homotopic [OF _ _ continuous_on_const _ homotopic_with_symD [OF a]]) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 5376 | show "closedin (top_of_set UNIV) S" | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5377 | using assms by auto | 
| 78248 
740b23f1138a
EXPERIMENTAL replacement of f ` A <= B by f : A -> B in Analysis
 paulson <lp15@cam.ac.uk> parents: 
78131diff
changeset | 5378 |       show "(\<lambda>t. a) \<in> UNIV \<rightarrow> - {0}"
 | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5379 | using a homotopic_with_imp_subset2 False by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5380 | qed (use anr that in \<open>force+\<close>) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5381 | then show ?thesis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5382 | by force | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5383 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5384 | next | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5385 | assume ?rhs | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5386 | then obtain g where contg: "continuous_on UNIV g" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5387 | and gf: "\<And>x. x \<in> S \<Longrightarrow> g x = f x" and non0: "\<And>x. g x \<noteq> 0" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5388 | by metis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5389 | obtain h k::"'a\<Rightarrow>'a" where hk: "homeomorphism (ball 0 1) UNIV h k" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5390 | using homeomorphic_ball01_UNIV homeomorphic_def by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5391 | then have "continuous_on (ball 0 1) (g \<circ> h)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5392 | by (meson contg continuous_on_compose continuous_on_subset homeomorphism_cont1 top_greatest) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5393 | then obtain j where contj: "continuous_on (ball 0 1) j" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5394 | and j: "\<And>z. z \<in> ball 0 1 \<Longrightarrow> exp(j z) = (g \<circ> h) z" | 
| 73932 
fd21b4a93043
added opaque_combs and renamed hide_lams to opaque_lifting
 desharna parents: 
72245diff
changeset | 5395 | by (metis (mono_tags, opaque_lifting) continuous_logarithm_on_ball comp_apply non0) | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5396 | have [simp]: "\<And>x. x \<in> S \<Longrightarrow> h (k x) = x" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5397 | using hk homeomorphism_apply2 by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5398 | have "\<exists>\<zeta>. continuous_on S \<zeta>\<and> (\<forall>x\<in>S. f x = exp (\<zeta> x))" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5399 | proof (intro exI conjI ballI) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5400 | show "continuous_on S (j \<circ> k)" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5401 | proof (rule continuous_on_compose) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5402 | show "continuous_on S k" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5403 | by (meson continuous_on_subset hk homeomorphism_cont2 top_greatest) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5404 | show "continuous_on (k ` S) j" | 
| 72245 | 5405 | by (auto intro: continuous_on_subset [OF contj] simp flip: homeomorphism_image2 [OF hk]) | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5406 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5407 | show "f x = exp ((j \<circ> k) x)" if "x \<in> S" for x | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 5408 | by (metis UNIV_I comp_apply gf hk homeomorphism_def image_eqI j that) | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5409 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5410 | then show ?lhs | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5411 | by (simp add: inessential_eq_continuous_logarithm) | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5412 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5413 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5414 | lemma inessential_on_clopen_Union: | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5415 | fixes \<F> :: "'a::euclidean_space set set" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5416 | assumes T: "path_connected T" | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 5417 | and "\<And>S. S \<in> \<F> \<Longrightarrow> closedin (top_of_set (\<Union>\<F>)) S" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 5418 | and "\<And>S. S \<in> \<F> \<Longrightarrow> openin (top_of_set (\<Union>\<F>)) S" | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 5419 | and hom: "\<And>S. S \<in> \<F> \<Longrightarrow> \<exists>a. homotopic_with_canon (\<lambda>x. True) S T f (\<lambda>x. a)" | 
| 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 5420 | obtains a where "homotopic_with_canon (\<lambda>x. True) (\<Union>\<F>) T f (\<lambda>x. a)" | 
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5421 | proof (cases "\<Union>\<F> = {}")
 | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5422 | case True | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5423 | with that show ?thesis | 
| 78336 | 5424 | using homotopic_with_canon_on_empty by fastforce | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5425 | next | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5426 | case False | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5427 |   then obtain C where "C \<in> \<F>" "C \<noteq> {}"
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5428 | by blast | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 5429 | then obtain a where clo: "closedin (top_of_set (\<Union>\<F>)) C" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 5430 | and ope: "openin (top_of_set (\<Union>\<F>)) C" | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 5431 | and "homotopic_with_canon (\<lambda>x. True) C T f (\<lambda>x. a)" | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5432 | using assms by blast | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 5433 |   with \<open>C \<noteq> {}\<close> have "f \<in> C \<rightarrow> T" "a \<in> T"
 | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5434 | using homotopic_with_imp_subset1 homotopic_with_imp_subset2 by blast+ | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 5435 | have "homotopic_with_canon (\<lambda>x. True) (\<Union>\<F>) T f (\<lambda>x. a)" | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5436 | proof (rule homotopic_on_clopen_Union) | 
| 69922 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 5437 | show "\<And>S. S \<in> \<F> \<Longrightarrow> closedin (top_of_set (\<Union>\<F>)) S" | 
| 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 paulson <lp15@cam.ac.uk> parents: 
69745diff
changeset | 5438 | "\<And>S. S \<in> \<F> \<Longrightarrow> openin (top_of_set (\<Union>\<F>)) S" | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5439 | by (simp_all add: assms) | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 5440 | show "homotopic_with_canon (\<lambda>x. True) S T f (\<lambda>x. a)" if "S \<in> \<F>" for S | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5441 |     proof (cases "S = {}")
 | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5442 | case False | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5443 | then obtain b where "b \<in> S" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5444 | by blast | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 5445 | obtain c where c: "homotopic_with_canon (\<lambda>x. True) S T f (\<lambda>x. c)" | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5446 | using \<open>S \<in> \<F>\<close> hom by blast | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5447 | then have "c \<in> T" | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5448 | using \<open>b \<in> S\<close> homotopic_with_imp_subset2 by blast | 
| 69986 
f2d327275065
generalised homotopic_with to topologies; homotopic_with_canon is the old version
 paulson <lp15@cam.ac.uk> parents: 
69922diff
changeset | 5449 | then have "homotopic_with_canon (\<lambda>x. True) S T (\<lambda>x. a) (\<lambda>x. c)" | 
| 76944 | 5450 | using T \<open>a \<in> T\<close> by (simp add: homotopic_constant_maps path_connected_component) | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5451 | then show ?thesis | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5452 | using c homotopic_with_symD homotopic_with_trans by blast | 
| 78336 | 5453 | qed (simp add: homotopic_on_empty) | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5454 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5455 | then show ?thesis .. | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5456 | qed | 
| 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5457 | |
| 69681 
689997a8a582
redo tagging-related changes from a06b204527e6, 0f4d4a13dc16, and a8faf6f15da7
 immler parents: 
69680diff
changeset | 5458 | proposition Janiszewski_dual: | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5459 | fixes S :: "complex set" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 5460 | assumes "compact S" "compact T" "connected S" "connected T" "connected(- (S \<union> T))" | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5461 | shows "connected(S \<inter> T)" | 
| 78516 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 5462 | by (meson Borsukian_imp_unicoherent Borsukian_separation_compact assms closed_subset compact_Un | 
| 
56a408fa2440
substantial tidy-up, shortening many proofs
 paulson <lp15@cam.ac.uk> parents: 
78336diff
changeset | 5463 | compact_imp_closed sup_ge1 sup_ge2 unicoherentD) | 
| 66939 
04678058308f
New results in topology, mostly from HOL Light's moretop.ml
 paulson <lp15@cam.ac.uk> parents: 
66884diff
changeset | 5464 | |
| 64006 
0de4736dad8b
new theorems including the theory FurtherTopology
 paulson <lp15@cam.ac.uk> parents: diff
changeset | 5465 | end |