src/HOL/Analysis/Homeomorphism.thy
author paulson <lp15@cam.ac.uk>
Thu, 19 Oct 2017 17:16:01 +0100
changeset 66884 c2128ab11f61
parent 66827 c94531b5007d
child 67399 eab6ce8368fa
permissions -rw-r--r--
Switching to inverse image and constant_on, plus some new material
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
63627
6ddb43c6b711 rename HOL-Multivariate_Analysis to HOL-Analysis.
hoelzl
parents: 63301
diff changeset
     1
(*  Title:      HOL/Analysis/Homeomorphism.thy
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
     2
    Author: LC Paulson (ported from HOL Light)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
     3
*)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
     4
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
     5
section \<open>Homeomorphism Theorems\<close>
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
     6
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
     7
theory Homeomorphism
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
     8
imports Path_Connected
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
     9
begin
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    10
64789
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    11
lemma homeomorphic_spheres':
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    12
  fixes a ::"'a::euclidean_space" and b ::"'b::euclidean_space"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    13
  assumes "0 < \<delta>" and dimeq: "DIM('a) = DIM('b)"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    14
  shows "(sphere a \<delta>) homeomorphic (sphere b \<delta>)"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    15
proof -
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    16
  obtain f :: "'a\<Rightarrow>'b" and g where "linear f" "linear g"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    17
     and fg: "\<And>x. norm(f x) = norm x" "\<And>y. norm(g y) = norm y" "\<And>x. g(f x) = x" "\<And>y. f(g y) = y"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    18
    by (blast intro: isomorphisms_UNIV_UNIV [OF dimeq])
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    19
  then have "continuous_on UNIV f" "continuous_on UNIV g"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    20
    using linear_continuous_on linear_linear by blast+
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    21
  then show ?thesis
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    22
    unfolding homeomorphic_minimal
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    23
    apply(rule_tac x="\<lambda>x. b + f(x - a)" in exI)
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    24
    apply(rule_tac x="\<lambda>x. a + g(x - b)" in exI)
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    25
    using assms
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    26
    apply (force intro: continuous_intros
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    27
                  continuous_on_compose2 [of _ f] continuous_on_compose2 [of _ g] simp: dist_commute dist_norm fg)
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    28
    done
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    29
qed
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    30
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    31
lemma homeomorphic_spheres_gen:
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    32
    fixes a :: "'a::euclidean_space" and b :: "'b::euclidean_space"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    33
  assumes "0 < r" "0 < s" "DIM('a::euclidean_space) = DIM('b::euclidean_space)"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    34
  shows "(sphere a r homeomorphic sphere b s)"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    35
  apply (rule homeomorphic_trans [OF homeomorphic_spheres homeomorphic_spheres'])
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    36
  using assms  apply auto
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    37
  done
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64773
diff changeset
    38
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    39
subsection \<open>Homeomorphism of all convex compact sets with nonempty interior\<close>
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    40
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    41
proposition ray_to_rel_frontier:
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    42
  fixes a :: "'a::real_inner"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    43
  assumes "bounded S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    44
      and a: "a \<in> rel_interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    45
      and aff: "(a + l) \<in> affine hull S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    46
      and "l \<noteq> 0"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    47
  obtains d where "0 < d" "(a + d *\<^sub>R l) \<in> rel_frontier S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    48
           "\<And>e. \<lbrakk>0 \<le> e; e < d\<rbrakk> \<Longrightarrow> (a + e *\<^sub>R l) \<in> rel_interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    49
proof -
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    50
  have aaff: "a \<in> affine hull S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    51
    by (meson a hull_subset rel_interior_subset rev_subsetD)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    52
  let ?D = "{d. 0 < d \<and> a + d *\<^sub>R l \<notin> rel_interior S}"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    53
  obtain B where "B > 0" and B: "S \<subseteq> ball a B"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    54
    using bounded_subset_ballD [OF \<open>bounded S\<close>] by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    55
  have "a + (B / norm l) *\<^sub>R l \<notin> ball a B"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    56
    by (simp add: dist_norm \<open>l \<noteq> 0\<close>)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    57
  with B have "a + (B / norm l) *\<^sub>R l \<notin> rel_interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    58
    using rel_interior_subset subsetCE by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    59
  with \<open>B > 0\<close> \<open>l \<noteq> 0\<close> have nonMT: "?D \<noteq> {}"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    60
    using divide_pos_pos zero_less_norm_iff by fastforce
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    61
  have bdd: "bdd_below ?D"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    62
    by (metis (no_types, lifting) bdd_belowI le_less mem_Collect_eq)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    63
  have relin_Ex: "\<And>x. x \<in> rel_interior S \<Longrightarrow>
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    64
                    \<exists>e>0. \<forall>x'\<in>affine hull S. dist x' x < e \<longrightarrow> x' \<in> rel_interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    65
    using openin_rel_interior [of S] by (simp add: openin_euclidean_subtopology_iff)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    66
  define d where "d = Inf ?D"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    67
  obtain \<epsilon> where "0 < \<epsilon>" and \<epsilon>: "\<And>\<eta>. \<lbrakk>0 \<le> \<eta>; \<eta> < \<epsilon>\<rbrakk> \<Longrightarrow> (a + \<eta> *\<^sub>R l) \<in> rel_interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    68
  proof -
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    69
    obtain e where "e>0"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    70
            and e: "\<And>x'. x' \<in> affine hull S \<Longrightarrow> dist x' a < e \<Longrightarrow> x' \<in> rel_interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    71
      using relin_Ex a by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    72
    show thesis
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    73
    proof (rule_tac \<epsilon> = "e / norm l" in that)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    74
      show "0 < e / norm l" by (simp add: \<open>0 < e\<close> \<open>l \<noteq> 0\<close>)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    75
    next
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    76
      show "a + \<eta> *\<^sub>R l \<in> rel_interior S" if "0 \<le> \<eta>" "\<eta> < e / norm l" for \<eta>
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    77
      proof (rule e)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    78
        show "a + \<eta> *\<^sub>R l \<in> affine hull S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    79
          by (metis (no_types) add_diff_cancel_left' aff affine_affine_hull mem_affine_3_minus aaff)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    80
        show "dist (a + \<eta> *\<^sub>R l) a < e"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    81
          using that by (simp add: \<open>l \<noteq> 0\<close> dist_norm pos_less_divide_eq)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    82
      qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    83
    qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    84
  qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    85
  have inint: "\<And>e. \<lbrakk>0 \<le> e; e < d\<rbrakk> \<Longrightarrow> a + e *\<^sub>R l \<in> rel_interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    86
    unfolding d_def using cInf_lower [OF _ bdd]
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    87
    by (metis (no_types, lifting) a add.right_neutral le_less mem_Collect_eq not_less real_vector.scale_zero_left)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    88
  have "\<epsilon> \<le> d"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    89
    unfolding d_def
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    90
    apply (rule cInf_greatest [OF nonMT])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    91
    using \<epsilon> dual_order.strict_implies_order le_less_linear by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    92
  with \<open>0 < \<epsilon>\<close> have "0 < d" by simp
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    93
  have "a + d *\<^sub>R l \<notin> rel_interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    94
  proof
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    95
    assume adl: "a + d *\<^sub>R l \<in> rel_interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    96
    obtain e where "e > 0"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    97
             and e: "\<And>x'. x' \<in> affine hull S \<Longrightarrow> dist x' (a + d *\<^sub>R l) < e \<Longrightarrow> x' \<in> rel_interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    98
      using relin_Ex adl by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
    99
    have "d + e / norm l \<le> Inf {d. 0 < d \<and> a + d *\<^sub>R l \<notin> rel_interior S}"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   100
    proof (rule cInf_greatest [OF nonMT], clarsimp)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   101
      fix x::real
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   102
      assume "0 < x" and nonrel: "a + x *\<^sub>R l \<notin> rel_interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   103
      show "d + e / norm l \<le> x"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   104
      proof (cases "x < d")
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   105
        case True with inint nonrel \<open>0 < x\<close>
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   106
          show ?thesis by auto
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   107
      next
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   108
        case False
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   109
          then have dle: "x < d + e / norm l \<Longrightarrow> dist (a + x *\<^sub>R l) (a + d *\<^sub>R l) < e"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   110
            by (simp add: field_simps \<open>l \<noteq> 0\<close>)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   111
          have ain: "a + x *\<^sub>R l \<in> affine hull S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   112
            by (metis add_diff_cancel_left' aff affine_affine_hull mem_affine_3_minus aaff)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   113
          show ?thesis
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   114
            using e [OF ain] nonrel dle by force
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   115
      qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   116
    qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   117
    then show False
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   118
      using \<open>0 < e\<close> \<open>l \<noteq> 0\<close> by (simp add: d_def [symmetric] divide_simps)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   119
  qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   120
  moreover have "a + d *\<^sub>R l \<in> closure S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   121
  proof (clarsimp simp: closure_approachable)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   122
    fix \<eta>::real assume "0 < \<eta>"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   123
    have 1: "a + (d - min d (\<eta> / 2 / norm l)) *\<^sub>R l \<in> S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   124
      apply (rule subsetD [OF rel_interior_subset inint])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   125
      using \<open>l \<noteq> 0\<close> \<open>0 < d\<close> \<open>0 < \<eta>\<close> by auto
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   126
    have "norm l * min d (\<eta> / (norm l * 2)) \<le> norm l * (\<eta> / (norm l * 2))"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   127
      by (metis min_def mult_left_mono norm_ge_zero order_refl)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   128
    also have "... < \<eta>"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   129
      using \<open>l \<noteq> 0\<close> \<open>0 < \<eta>\<close> by (simp add: divide_simps)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   130
    finally have 2: "norm l * min d (\<eta> / (norm l * 2)) < \<eta>" .
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   131
    show "\<exists>y\<in>S. dist y (a + d *\<^sub>R l) < \<eta>"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   132
      apply (rule_tac x="a + (d - min d (\<eta> / 2 / norm l)) *\<^sub>R l" in bexI)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   133
      using 1 2 \<open>0 < d\<close> \<open>0 < \<eta>\<close> apply (auto simp: algebra_simps)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   134
      done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   135
  qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   136
  ultimately have infront: "a + d *\<^sub>R l \<in> rel_frontier S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   137
    by (simp add: rel_frontier_def)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   138
  show ?thesis
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   139
    by (rule that [OF \<open>0 < d\<close> infront inint])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   140
qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   141
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   142
corollary ray_to_frontier:
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   143
  fixes a :: "'a::euclidean_space"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   144
  assumes "bounded S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   145
      and a: "a \<in> interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   146
      and "l \<noteq> 0"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   147
  obtains d where "0 < d" "(a + d *\<^sub>R l) \<in> frontier S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   148
           "\<And>e. \<lbrakk>0 \<le> e; e < d\<rbrakk> \<Longrightarrow> (a + e *\<^sub>R l) \<in> interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   149
proof -
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   150
  have "interior S = rel_interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   151
    using a rel_interior_nonempty_interior by auto
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   152
  then have "a \<in> rel_interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   153
    using a by simp
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   154
  then show ?thesis
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   155
    apply (rule ray_to_rel_frontier [OF \<open>bounded S\<close> _ _ \<open>l \<noteq> 0\<close>])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   156
     using a affine_hull_nonempty_interior apply blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   157
    by (simp add: \<open>interior S = rel_interior S\<close> frontier_def rel_frontier_def that)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   158
qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   159
66287
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   160
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   161
lemma segment_to_rel_frontier_aux:
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   162
  fixes x :: "'a::euclidean_space"
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   163
  assumes "convex S" "bounded S" and x: "x \<in> rel_interior S" and y: "y \<in> S" and xy: "x \<noteq> y"
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   164
  obtains z where "z \<in> rel_frontier S" "y \<in> closed_segment x z"
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   165
                   "open_segment x z \<subseteq> rel_interior S"
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   166
proof -
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   167
  have "x + (y - x) \<in> affine hull S"
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   168
    using hull_inc [OF y] by auto
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   169
  then obtain d where "0 < d" and df: "(x + d *\<^sub>R (y-x)) \<in> rel_frontier S"
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   170
                  and di: "\<And>e. \<lbrakk>0 \<le> e; e < d\<rbrakk> \<Longrightarrow> (x + e *\<^sub>R (y-x)) \<in> rel_interior S"
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   171
    by (rule ray_to_rel_frontier [OF \<open>bounded S\<close> x]) (use xy in auto)
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   172
  show ?thesis
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   173
  proof
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   174
    show "x + d *\<^sub>R (y - x) \<in> rel_frontier S"
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   175
      by (simp add: df)
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   176
  next
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   177
    have "open_segment x y \<subseteq> rel_interior S"
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   178
      using rel_interior_closure_convex_segment [OF \<open>convex S\<close> x] closure_subset y by blast
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   179
    moreover have "x + d *\<^sub>R (y - x) \<in> open_segment x y" if "d < 1"
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   180
      using xy
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   181
      apply (auto simp: in_segment)
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   182
      apply (rule_tac x="d" in exI)
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   183
      using \<open>0 < d\<close> that apply (auto simp: divide_simps algebra_simps)
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   184
      done
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   185
    ultimately have "1 \<le> d"
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   186
      using df rel_frontier_def by fastforce
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   187
    moreover have "x = (1 / d) *\<^sub>R x + ((d - 1) / d) *\<^sub>R x"
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   188
      by (metis \<open>0 < d\<close> add.commute add_divide_distrib diff_add_cancel divide_self_if less_irrefl scaleR_add_left scaleR_one)
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   189
    ultimately show "y \<in> closed_segment x (x + d *\<^sub>R (y - x))"
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   190
      apply (auto simp: in_segment)
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   191
      apply (rule_tac x="1/d" in exI)
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   192
      apply (auto simp: divide_simps algebra_simps)
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   193
      done
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   194
  next
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   195
    show "open_segment x (x + d *\<^sub>R (y - x)) \<subseteq> rel_interior S"
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   196
      apply (rule rel_interior_closure_convex_segment [OF \<open>convex S\<close> x])
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   197
      using df rel_frontier_def by auto
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   198
  qed
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   199
qed
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   200
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   201
lemma segment_to_rel_frontier:
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   202
  fixes x :: "'a::euclidean_space"
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   203
  assumes S: "convex S" "bounded S" and x: "x \<in> rel_interior S"
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   204
      and y: "y \<in> S" and xy: "~(x = y \<and> S = {x})"
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   205
  obtains z where "z \<in> rel_frontier S" "y \<in> closed_segment x z"
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   206
                  "open_segment x z \<subseteq> rel_interior S"
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   207
proof (cases "x=y")
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   208
  case True
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   209
  with xy have "S \<noteq> {x}"
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   210
    by blast
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   211
  with True show ?thesis
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   212
    by (metis Set.set_insert all_not_in_conv ends_in_segment(1) insert_iff segment_to_rel_frontier_aux[OF S x] that y)
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   213
next
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   214
  case False
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   215
  then show ?thesis
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   216
    using segment_to_rel_frontier_aux [OF S x y] that by blast
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   217
qed
005a30862ed0 new material: Colinearity, convex sets, polytopes
paulson <lp15@cam.ac.uk>
parents: 65064
diff changeset
   218
64394
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   219
proposition rel_frontier_not_sing:
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   220
  fixes a :: "'a::euclidean_space"
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   221
  assumes "bounded S"
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   222
    shows "rel_frontier S \<noteq> {a}"
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   223
proof (cases "S = {}")
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   224
  case True  then show ?thesis  by simp
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   225
next
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   226
  case False
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   227
  then obtain z where "z \<in> S"
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   228
    by blast
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   229
  then show ?thesis
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   230
  proof (cases "S = {z}")
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   231
    case True then show ?thesis  by simp
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   232
  next
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   233
    case False
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   234
    then obtain w where "w \<in> S" "w \<noteq> z"
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   235
      using \<open>z \<in> S\<close> by blast
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   236
    show ?thesis
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   237
    proof
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   238
      assume "rel_frontier S = {a}"
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   239
      then consider "w \<notin> rel_frontier S" | "z \<notin> rel_frontier S"
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   240
        using \<open>w \<noteq> z\<close> by auto
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   241
      then show False
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   242
      proof cases
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   243
        case 1
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   244
        then have w: "w \<in> rel_interior S"
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   245
          using \<open>w \<in> S\<close> closure_subset rel_frontier_def by fastforce
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   246
        have "w + (w - z) \<in> affine hull S"
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   247
          by (metis \<open>w \<in> S\<close> \<open>z \<in> S\<close> affine_affine_hull hull_inc mem_affine_3_minus scaleR_one)
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   248
        then obtain e where "0 < e" "(w + e *\<^sub>R (w - z)) \<in> rel_frontier S"
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   249
          using \<open>w \<noteq> z\<close>  \<open>z \<in> S\<close> by (metis assms ray_to_rel_frontier right_minus_eq w)
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   250
        moreover obtain d where "0 < d" "(w + d *\<^sub>R (z - w)) \<in> rel_frontier S"
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   251
          using ray_to_rel_frontier [OF \<open>bounded S\<close> w, of "1 *\<^sub>R (z - w)"]  \<open>w \<noteq> z\<close>  \<open>z \<in> S\<close>
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   252
          by (metis add.commute add.right_neutral diff_add_cancel hull_inc scaleR_one)
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   253
        ultimately have "d *\<^sub>R (z - w) = e *\<^sub>R (w - z)"
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   254
          using \<open>rel_frontier S = {a}\<close> by force
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   255
        moreover have "e \<noteq> -d "
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   256
          using \<open>0 < e\<close> \<open>0 < d\<close> by force
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   257
        ultimately show False
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   258
          by (metis (no_types, lifting) \<open>w \<noteq> z\<close> eq_iff_diff_eq_0 minus_diff_eq real_vector.scale_cancel_right real_vector.scale_minus_right scaleR_left.minus)
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   259
      next
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   260
        case 2
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   261
        then have z: "z \<in> rel_interior S"
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   262
          using \<open>z \<in> S\<close> closure_subset rel_frontier_def by fastforce
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   263
        have "z + (z - w) \<in> affine hull S"
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   264
          by (metis \<open>z \<in> S\<close> \<open>w \<in> S\<close> affine_affine_hull hull_inc mem_affine_3_minus scaleR_one)
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   265
        then obtain e where "0 < e" "(z + e *\<^sub>R (z - w)) \<in> rel_frontier S"
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   266
          using \<open>w \<noteq> z\<close>  \<open>w \<in> S\<close> by (metis assms ray_to_rel_frontier right_minus_eq z)
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   267
        moreover obtain d where "0 < d" "(z + d *\<^sub>R (w - z)) \<in> rel_frontier S"
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   268
          using ray_to_rel_frontier [OF \<open>bounded S\<close> z, of "1 *\<^sub>R (w - z)"]  \<open>w \<noteq> z\<close>  \<open>w \<in> S\<close>
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   269
          by (metis add.commute add.right_neutral diff_add_cancel hull_inc scaleR_one)
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   270
        ultimately have "d *\<^sub>R (w - z) = e *\<^sub>R (z - w)"
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   271
          using \<open>rel_frontier S = {a}\<close> by force
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   272
        moreover have "e \<noteq> -d "
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   273
          using \<open>0 < e\<close> \<open>0 < d\<close> by force
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   274
        ultimately show False
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   275
          by (metis (no_types, lifting) \<open>w \<noteq> z\<close> eq_iff_diff_eq_0 minus_diff_eq real_vector.scale_cancel_right real_vector.scale_minus_right scaleR_left.minus)
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   276
      qed
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   277
    qed
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   278
  qed
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   279
qed
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
   280
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   281
proposition
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   282
  fixes S :: "'a::euclidean_space set"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   283
  assumes "compact S" and 0: "0 \<in> rel_interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   284
      and star: "\<And>x. x \<in> S \<Longrightarrow> open_segment 0 x \<subseteq> rel_interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   285
    shows starlike_compact_projective1_0:
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   286
            "S - rel_interior S homeomorphic sphere 0 1 \<inter> affine hull S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   287
            (is "?SMINUS homeomorphic ?SPHER")
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   288
      and starlike_compact_projective2_0:
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   289
            "S homeomorphic cball 0 1 \<inter> affine hull S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   290
            (is "S homeomorphic ?CBALL")
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   291
proof -
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   292
  have starI: "(u *\<^sub>R x) \<in> rel_interior S" if "x \<in> S" "0 \<le> u" "u < 1" for x u
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   293
  proof (cases "x=0 \<or> u=0")
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   294
    case True with 0 show ?thesis by force
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   295
  next
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   296
    case False with that show ?thesis
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   297
      by (auto simp: in_segment intro: star [THEN subsetD])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   298
  qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   299
  have "0 \<in> S"  using assms rel_interior_subset by auto
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   300
  define proj where "proj \<equiv> \<lambda>x::'a. x /\<^sub>R norm x"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   301
  have eqI: "x = y" if "proj x = proj y" "norm x = norm y" for x y
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   302
    using that  by (force simp: proj_def)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   303
  then have iff_eq: "\<And>x y. (proj x = proj y \<and> norm x = norm y) \<longleftrightarrow> x = y"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   304
    by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   305
  have projI: "x \<in> affine hull S \<Longrightarrow> proj x \<in> affine hull S" for x
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   306
    by (metis \<open>0 \<in> S\<close> affine_hull_span_0 hull_inc span_mul proj_def)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   307
  have nproj1 [simp]: "x \<noteq> 0 \<Longrightarrow> norm(proj x) = 1" for x
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   308
    by (simp add: proj_def)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   309
  have proj0_iff [simp]: "proj x = 0 \<longleftrightarrow> x = 0" for x
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   310
    by (simp add: proj_def)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   311
  have cont_proj: "continuous_on (UNIV - {0}) proj"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   312
    unfolding proj_def by (rule continuous_intros | force)+
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   313
  have proj_spherI: "\<And>x. \<lbrakk>x \<in> affine hull S; x \<noteq> 0\<rbrakk> \<Longrightarrow> proj x \<in> ?SPHER"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   314
    by (simp add: projI)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   315
  have "bounded S" "closed S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   316
    using \<open>compact S\<close> compact_eq_bounded_closed by blast+
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   317
  have inj_on_proj: "inj_on proj (S - rel_interior S)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   318
  proof
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   319
    fix x y
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   320
    assume x: "x \<in> S - rel_interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   321
       and y: "y \<in> S - rel_interior S" and eq: "proj x = proj y"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   322
    then have xynot: "x \<noteq> 0" "y \<noteq> 0" "x \<in> S" "y \<in> S" "x \<notin> rel_interior S" "y \<notin> rel_interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   323
      using 0 by auto
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   324
    consider "norm x = norm y" | "norm x < norm y" | "norm x > norm y" by linarith
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   325
    then show "x = y"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   326
    proof cases
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   327
      assume "norm x = norm y"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   328
        with iff_eq eq show "x = y" by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   329
    next
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   330
      assume *: "norm x < norm y"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   331
      have "x /\<^sub>R norm x = norm x *\<^sub>R (x /\<^sub>R norm x) /\<^sub>R norm (norm x *\<^sub>R (x /\<^sub>R norm x))"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   332
        by force
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   333
      then have "proj ((norm x / norm y) *\<^sub>R y) = proj x"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   334
        by (metis (no_types) divide_inverse local.proj_def eq scaleR_scaleR)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   335
      then have [simp]: "(norm x / norm y) *\<^sub>R y = x"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   336
        by (rule eqI) (simp add: \<open>y \<noteq> 0\<close>)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   337
      have no: "0 \<le> norm x / norm y" "norm x / norm y < 1"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   338
        using * by (auto simp: divide_simps)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   339
      then show "x = y"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   340
        using starI [OF \<open>y \<in> S\<close> no] xynot by auto
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   341
    next
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   342
      assume *: "norm x > norm y"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   343
      have "y /\<^sub>R norm y = norm y *\<^sub>R (y /\<^sub>R norm y) /\<^sub>R norm (norm y *\<^sub>R (y /\<^sub>R norm y))"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   344
        by force
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   345
      then have "proj ((norm y / norm x) *\<^sub>R x) = proj y"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   346
        by (metis (no_types) divide_inverse local.proj_def eq scaleR_scaleR)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   347
      then have [simp]: "(norm y / norm x) *\<^sub>R x = y"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   348
        by (rule eqI) (simp add: \<open>x \<noteq> 0\<close>)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   349
      have no: "0 \<le> norm y / norm x" "norm y / norm x < 1"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   350
        using * by (auto simp: divide_simps)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   351
      then show "x = y"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   352
        using starI [OF \<open>x \<in> S\<close> no] xynot by auto
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   353
    qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   354
  qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   355
  have "\<exists>surf. homeomorphism (S - rel_interior S) ?SPHER proj surf"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   356
  proof (rule homeomorphism_compact)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   357
    show "compact (S - rel_interior S)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   358
       using \<open>compact S\<close> compact_rel_boundary by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   359
    show "continuous_on (S - rel_interior S) proj"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   360
      using 0 by (blast intro: continuous_on_subset [OF cont_proj])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   361
    show "proj ` (S - rel_interior S) = ?SPHER"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   362
    proof
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   363
      show "proj ` (S - rel_interior S) \<subseteq> ?SPHER"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   364
        using 0 by (force simp: hull_inc projI intro: nproj1)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   365
      show "?SPHER \<subseteq> proj ` (S - rel_interior S)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   366
      proof (clarsimp simp: proj_def)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   367
        fix x
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   368
        assume "x \<in> affine hull S" and nox: "norm x = 1"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   369
        then have "x \<noteq> 0" by auto
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   370
        obtain d where "0 < d" and dx: "(d *\<^sub>R x) \<in> rel_frontier S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   371
                   and ri: "\<And>e. \<lbrakk>0 \<le> e; e < d\<rbrakk> \<Longrightarrow> (e *\<^sub>R x) \<in> rel_interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   372
          using ray_to_rel_frontier [OF \<open>bounded S\<close> 0] \<open>x \<in> affine hull S\<close> \<open>x \<noteq> 0\<close> by auto
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   373
        show "x \<in> (\<lambda>x. x /\<^sub>R norm x) ` (S - rel_interior S)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   374
          apply (rule_tac x="d *\<^sub>R x" in image_eqI)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   375
          using \<open>0 < d\<close>
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   376
          using dx \<open>closed S\<close> apply (auto simp: rel_frontier_def divide_simps nox)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   377
          done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   378
      qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   379
    qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   380
  qed (rule inj_on_proj)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   381
  then obtain surf where surf: "homeomorphism (S - rel_interior S) ?SPHER proj surf"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   382
    by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   383
  then have cont_surf: "continuous_on (proj ` (S - rel_interior S)) surf"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   384
    by (auto simp: homeomorphism_def)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   385
  have surf_nz: "\<And>x. x \<in> ?SPHER \<Longrightarrow> surf x \<noteq> 0"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   386
    by (metis "0" DiffE homeomorphism_def imageI surf)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   387
  have cont_nosp: "continuous_on (?SPHER) (\<lambda>x. norm x *\<^sub>R ((surf o proj) x))"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   388
    apply (rule continuous_intros)+
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   389
    apply (rule continuous_on_subset [OF cont_proj], force)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   390
    apply (rule continuous_on_subset [OF cont_surf])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   391
    apply (force simp: homeomorphism_image1 [OF surf] dest: proj_spherI)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   392
    done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   393
  have surfpS: "\<And>x. \<lbrakk>norm x = 1; x \<in> affine hull S\<rbrakk> \<Longrightarrow> surf (proj x) \<in> S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   394
    by (metis (full_types) DiffE \<open>0 \<in> S\<close> homeomorphism_def image_eqI norm_zero proj_spherI real_vector.scale_zero_left scaleR_one surf)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   395
  have *: "\<exists>y. norm y = 1 \<and> y \<in> affine hull S \<and> x = surf (proj y)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   396
          if "x \<in> S" "x \<notin> rel_interior S" for x
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   397
  proof -
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   398
    have "proj x \<in> ?SPHER"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   399
      by (metis (full_types) "0" hull_inc proj_spherI that)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   400
    moreover have "surf (proj x) = x"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   401
      by (metis Diff_iff homeomorphism_def surf that)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   402
    ultimately show ?thesis
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   403
      by (metis \<open>\<And>x. x \<in> ?SPHER \<Longrightarrow> surf x \<noteq> 0\<close> hull_inc inverse_1 local.proj_def norm_sgn projI scaleR_one sgn_div_norm that(1))
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   404
  qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   405
  have surfp_notin: "\<And>x. \<lbrakk>norm x = 1; x \<in> affine hull S\<rbrakk> \<Longrightarrow> surf (proj x) \<notin> rel_interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   406
    by (metis (full_types) DiffE one_neq_zero homeomorphism_def image_eqI norm_zero proj_spherI surf)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   407
  have no_sp_im: "(\<lambda>x. norm x *\<^sub>R surf (proj x)) ` (?SPHER) = S - rel_interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   408
    by (auto simp: surfpS image_def Bex_def surfp_notin *)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   409
  have inj_spher: "inj_on (\<lambda>x. norm x *\<^sub>R surf (proj x)) ?SPHER"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   410
  proof
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   411
    fix x y
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   412
    assume xy: "x \<in> ?SPHER" "y \<in> ?SPHER"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   413
       and eq: " norm x *\<^sub>R surf (proj x) = norm y *\<^sub>R surf (proj y)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   414
    then have "norm x = 1" "norm y = 1" "x \<in> affine hull S" "y \<in> affine hull S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   415
      using 0 by auto
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   416
    with eq show "x = y"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   417
      by (simp add: proj_def) (metis surf xy homeomorphism_def)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   418
  qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   419
  have co01: "compact ?SPHER"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   420
    by (simp add: closed_affine_hull compact_Int_closed)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   421
  show "?SMINUS homeomorphic ?SPHER"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   422
    apply (subst homeomorphic_sym)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   423
    apply (rule homeomorphic_compact [OF co01 cont_nosp [unfolded o_def] no_sp_im inj_spher])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   424
    done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   425
  have proj_scaleR: "\<And>a x. 0 < a \<Longrightarrow> proj (a *\<^sub>R x) = proj x"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   426
    by (simp add: proj_def)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   427
  have cont_sp0: "continuous_on (affine hull S - {0}) (surf o proj)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   428
    apply (rule continuous_on_compose [OF continuous_on_subset [OF cont_proj]], force)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   429
    apply (rule continuous_on_subset [OF cont_surf])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   430
    using homeomorphism_image1 proj_spherI surf by fastforce
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   431
  obtain B where "B>0" and B: "\<And>x. x \<in> S \<Longrightarrow> norm x \<le> B"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   432
    by (metis compact_imp_bounded \<open>compact S\<close> bounded_pos_less less_eq_real_def)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   433
  have cont_nosp: "continuous (at x within ?CBALL) (\<lambda>x. norm x *\<^sub>R surf (proj x))"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   434
         if "norm x \<le> 1" "x \<in> affine hull S" for x
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   435
  proof (cases "x=0")
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   436
    case True
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   437
    show ?thesis using True
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   438
      apply (simp add: continuous_within)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   439
      apply (rule lim_null_scaleR_bounded [where B=B])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   440
      apply (simp_all add: tendsto_norm_zero eventually_at)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   441
      apply (rule_tac x=B in exI)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   442
      using B surfpS proj_def projI apply (auto simp: \<open>B > 0\<close>)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   443
      done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   444
  next
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   445
    case False
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   446
    then have "\<forall>\<^sub>F x in at x. (x \<in> affine hull S - {0}) = (x \<in> affine hull S)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   447
      apply (simp add: eventually_at)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   448
      apply (rule_tac x="norm x" in exI)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   449
      apply (auto simp: False)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   450
      done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   451
    with cont_sp0 have *: "continuous (at x within affine hull S) (\<lambda>x. surf (proj x))"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   452
      apply (simp add: continuous_on_eq_continuous_within)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   453
      apply (drule_tac x=x in bspec, force simp: False that)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   454
      apply (simp add: continuous_within Lim_transform_within_set)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   455
      done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   456
    show ?thesis
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   457
      apply (rule continuous_within_subset [where s = "affine hull S", OF _ Int_lower2])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   458
      apply (rule continuous_intros *)+
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   459
      done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   460
  qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   461
  have cont_nosp2: "continuous_on ?CBALL (\<lambda>x. norm x *\<^sub>R ((surf o proj) x))"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   462
    by (simp add: continuous_on_eq_continuous_within cont_nosp)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   463
  have "norm y *\<^sub>R surf (proj y) \<in> S"  if "y \<in> cball 0 1" and yaff: "y \<in> affine hull S" for y
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   464
  proof (cases "y=0")
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   465
    case True then show ?thesis
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   466
      by (simp add: \<open>0 \<in> S\<close>)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   467
  next
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   468
    case False
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   469
    then have "norm y *\<^sub>R surf (proj y) = norm y *\<^sub>R surf (proj (y /\<^sub>R norm y))"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   470
      by (simp add: proj_def)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   471
    have "norm y \<le> 1" using that by simp
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   472
    have "surf (proj (y /\<^sub>R norm y)) \<in> S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   473
      apply (rule surfpS)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   474
      using proj_def projI yaff
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   475
      by (auto simp: False)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   476
    then have "surf (proj y) \<in> S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   477
      by (simp add: False proj_def)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   478
    then show "norm y *\<^sub>R surf (proj y) \<in> S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   479
      by (metis dual_order.antisym le_less_linear norm_ge_zero rel_interior_subset scaleR_one
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   480
                starI subset_eq \<open>norm y \<le> 1\<close>)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   481
  qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   482
  moreover have "x \<in> (\<lambda>x. norm x *\<^sub>R surf (proj x)) ` (?CBALL)" if "x \<in> S" for x
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   483
  proof (cases "x=0")
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   484
    case True with that hull_inc  show ?thesis by fastforce
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   485
  next
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   486
    case False
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   487
    then have psp: "proj (surf (proj x)) = proj x"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   488
      by (metis homeomorphism_def hull_inc proj_spherI surf that)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   489
    have nxx: "norm x *\<^sub>R proj x = x"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   490
      by (simp add: False local.proj_def)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   491
    have affineI: "(1 / norm (surf (proj x))) *\<^sub>R x \<in> affine hull S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   492
      by (metis \<open>0 \<in> S\<close> affine_hull_span_0 hull_inc span_clauses(4) that)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   493
    have sproj_nz: "surf (proj x) \<noteq> 0"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   494
      by (metis False proj0_iff psp)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   495
    then have "proj x = proj (proj x)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   496
      by (metis False nxx proj_scaleR zero_less_norm_iff)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   497
    moreover have scaleproj: "\<And>a r. r *\<^sub>R proj a = (r / norm a) *\<^sub>R a"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   498
      by (simp add: divide_inverse local.proj_def)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   499
    ultimately have "(norm (surf (proj x)) / norm x) *\<^sub>R x \<notin> rel_interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   500
      by (metis (no_types) sproj_nz divide_self_if hull_inc norm_eq_zero nproj1 projI psp scaleR_one surfp_notin that)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   501
    then have "(norm (surf (proj x)) / norm x) \<ge> 1"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   502
      using starI [OF that] by (meson starI [OF that] le_less_linear norm_ge_zero zero_le_divide_iff)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   503
    then have nole: "norm x \<le> norm (surf (proj x))"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   504
      by (simp add: le_divide_eq_1)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   505
    show ?thesis
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   506
      apply (rule_tac x="inverse(norm(surf (proj x))) *\<^sub>R x" in image_eqI)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   507
      apply (metis (no_types, hide_lams) mult.commute scaleproj abs_inverse abs_norm_cancel divide_inverse norm_scaleR nxx positive_imp_inverse_positive proj_scaleR psp sproj_nz zero_less_norm_iff)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   508
      apply (auto simp: divide_simps nole affineI)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   509
      done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   510
  qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   511
  ultimately have im_cball: "(\<lambda>x. norm x *\<^sub>R surf (proj x)) ` ?CBALL = S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   512
    by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   513
  have inj_cball: "inj_on (\<lambda>x. norm x *\<^sub>R surf (proj x)) ?CBALL"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   514
  proof
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   515
    fix x y
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   516
    assume "x \<in> ?CBALL" "y \<in> ?CBALL"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   517
       and eq: "norm x *\<^sub>R surf (proj x) = norm y *\<^sub>R surf (proj y)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   518
    then have x: "x \<in> affine hull S" and y: "y \<in> affine hull S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   519
      using 0 by auto
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   520
    show "x = y"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   521
    proof (cases "x=0 \<or> y=0")
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   522
      case True then show "x = y" using eq proj_spherI surf_nz x y by force
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   523
    next
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   524
      case False
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   525
      with x y have speq: "surf (proj x) = surf (proj y)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   526
        by (metis eq homeomorphism_apply2 proj_scaleR proj_spherI surf zero_less_norm_iff)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   527
      then have "norm x = norm y"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   528
        by (metis \<open>x \<in> affine hull S\<close> \<open>y \<in> affine hull S\<close> eq proj_spherI real_vector.scale_cancel_right surf_nz)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   529
      moreover have "proj x = proj y"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   530
        by (metis (no_types) False speq homeomorphism_apply2 proj_spherI surf x y)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   531
      ultimately show "x = y"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   532
        using eq eqI by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   533
    qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   534
  qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   535
  have co01: "compact ?CBALL"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   536
    by (simp add: closed_affine_hull compact_Int_closed)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   537
  show "S homeomorphic ?CBALL"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   538
    apply (subst homeomorphic_sym)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   539
    apply (rule homeomorphic_compact [OF co01 cont_nosp2 [unfolded o_def] im_cball inj_cball])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   540
    done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   541
qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   542
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   543
corollary
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   544
  fixes S :: "'a::euclidean_space set"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   545
  assumes "compact S" and a: "a \<in> rel_interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   546
      and star: "\<And>x. x \<in> S \<Longrightarrow> open_segment a x \<subseteq> rel_interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   547
    shows starlike_compact_projective1:
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   548
            "S - rel_interior S homeomorphic sphere a 1 \<inter> affine hull S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   549
      and starlike_compact_projective2:
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   550
            "S homeomorphic cball a 1 \<inter> affine hull S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   551
proof -
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   552
  have 1: "compact (op+ (-a) ` S)" by (meson assms compact_translation)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   553
  have 2: "0 \<in> rel_interior (op+ (-a) ` S)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   554
    by (simp add: a rel_interior_translation)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   555
  have 3: "open_segment 0 x \<subseteq> rel_interior (op+ (-a) ` S)" if "x \<in> (op+ (-a) ` S)" for x
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   556
  proof -
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   557
    have "x+a \<in> S" using that by auto
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   558
    then have "open_segment a (x+a) \<subseteq> rel_interior S" by (metis star)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   559
    then show ?thesis using open_segment_translation
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   560
      using rel_interior_translation by fastforce
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   561
  qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   562
  have "S - rel_interior S homeomorphic (op+ (-a) ` S) - rel_interior (op+ (-a) ` S)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   563
    by (metis rel_interior_translation translation_diff homeomorphic_translation)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   564
  also have "... homeomorphic sphere 0 1 \<inter> affine hull (op+ (-a) ` S)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   565
    by (rule starlike_compact_projective1_0 [OF 1 2 3])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   566
  also have "... = op+ (-a) ` (sphere a 1 \<inter> affine hull S)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   567
    by (metis affine_hull_translation left_minus sphere_translation translation_Int)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   568
  also have "... homeomorphic sphere a 1 \<inter> affine hull S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   569
    using homeomorphic_translation homeomorphic_sym by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   570
  finally show "S - rel_interior S homeomorphic sphere a 1 \<inter> affine hull S" .
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   571
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   572
  have "S homeomorphic (op+ (-a) ` S)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   573
    by (metis homeomorphic_translation)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   574
  also have "... homeomorphic cball 0 1 \<inter> affine hull (op+ (-a) ` S)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   575
    by (rule starlike_compact_projective2_0 [OF 1 2 3])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   576
  also have "... = op+ (-a) ` (cball a 1 \<inter> affine hull S)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   577
    by (metis affine_hull_translation left_minus cball_translation translation_Int)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   578
  also have "... homeomorphic cball a 1 \<inter> affine hull S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   579
    using homeomorphic_translation homeomorphic_sym by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   580
  finally show "S homeomorphic cball a 1 \<inter> affine hull S" .
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   581
qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   582
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   583
corollary starlike_compact_projective_special:
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   584
  assumes "compact S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   585
    and cb01: "cball (0::'a::euclidean_space) 1 \<subseteq> S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   586
    and scale: "\<And>x u. \<lbrakk>x \<in> S; 0 \<le> u; u < 1\<rbrakk> \<Longrightarrow> u *\<^sub>R x \<in> S - frontier S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   587
  shows "S homeomorphic (cball (0::'a::euclidean_space) 1)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   588
proof -
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   589
  have "ball 0 1 \<subseteq> interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   590
    using cb01 interior_cball interior_mono by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   591
  then have 0: "0 \<in> rel_interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   592
    by (meson centre_in_ball subsetD interior_subset_rel_interior le_numeral_extra(2) not_le)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   593
  have [simp]: "affine hull S = UNIV"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   594
    using \<open>ball 0 1 \<subseteq> interior S\<close> by (auto intro!: affine_hull_nonempty_interior)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   595
  have star: "open_segment 0 x \<subseteq> rel_interior S" if "x \<in> S" for x
63627
6ddb43c6b711 rename HOL-Multivariate_Analysis to HOL-Analysis.
hoelzl
parents: 63301
diff changeset
   596
  proof
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   597
    fix p assume "p \<in> open_segment 0 x"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   598
    then obtain u where "x \<noteq> 0" and u: "0 \<le> u" "u < 1" and p: "u *\<^sub>R x = p"
63627
6ddb43c6b711 rename HOL-Multivariate_Analysis to HOL-Analysis.
hoelzl
parents: 63301
diff changeset
   599
      by (auto simp: in_segment)
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   600
    then show "p \<in> rel_interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   601
      using scale [OF that u] closure_subset frontier_def interior_subset_rel_interior by fastforce
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   602
  qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   603
  show ?thesis
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   604
    using starlike_compact_projective2_0 [OF \<open>compact S\<close> 0 star] by simp
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   605
qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   606
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   607
lemma homeomorphic_convex_lemma:
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   608
  fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   609
  assumes "convex S" "compact S" "convex T" "compact T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   610
      and affeq: "aff_dim S = aff_dim T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   611
    shows "(S - rel_interior S) homeomorphic (T - rel_interior T) \<and>
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   612
           S homeomorphic T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   613
proof (cases "rel_interior S = {} \<or> rel_interior T = {}")
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   614
  case True
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   615
    then show ?thesis
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   616
      by (metis Diff_empty affeq \<open>convex S\<close> \<open>convex T\<close> aff_dim_empty homeomorphic_empty rel_interior_eq_empty aff_dim_empty)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   617
next
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   618
  case False
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   619
  then obtain a b where a: "a \<in> rel_interior S" and b: "b \<in> rel_interior T" by auto
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   620
  have starS: "\<And>x. x \<in> S \<Longrightarrow> open_segment a x \<subseteq> rel_interior S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   621
    using rel_interior_closure_convex_segment
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   622
          a \<open>convex S\<close> closure_subset subsetCE by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   623
  have starT: "\<And>x. x \<in> T \<Longrightarrow> open_segment b x \<subseteq> rel_interior T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   624
    using rel_interior_closure_convex_segment
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   625
          b \<open>convex T\<close> closure_subset subsetCE by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   626
  let ?aS = "op+ (-a) ` S" and ?bT = "op+ (-b) ` T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   627
  have 0: "0 \<in> affine hull ?aS" "0 \<in> affine hull ?bT"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   628
    by (metis a b subsetD hull_inc image_eqI left_minus rel_interior_subset)+
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   629
  have subs: "subspace (span ?aS)" "subspace (span ?bT)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   630
    by (rule subspace_span)+
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   631
  moreover
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   632
  have "dim (span (op + (- a) ` S)) = dim (span (op + (- b) ` T))"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   633
    by (metis 0 aff_dim_translation_eq aff_dim_zero affeq dim_span nat_int)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   634
  ultimately obtain f g where "linear f" "linear g"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   635
                and fim: "f ` span ?aS = span ?bT"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   636
                and gim: "g ` span ?bT = span ?aS"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   637
                and fno: "\<And>x. x \<in> span ?aS \<Longrightarrow> norm(f x) = norm x"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   638
                and gno: "\<And>x. x \<in> span ?bT \<Longrightarrow> norm(g x) = norm x"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   639
                and gf: "\<And>x. x \<in> span ?aS \<Longrightarrow> g(f x) = x"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   640
                and fg: "\<And>x. x \<in> span ?bT \<Longrightarrow> f(g x) = x"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   641
    by (rule isometries_subspaces) blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   642
  have [simp]: "continuous_on A f" for A
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   643
    using \<open>linear f\<close> linear_conv_bounded_linear linear_continuous_on by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   644
  have [simp]: "continuous_on B g" for B
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   645
    using \<open>linear g\<close> linear_conv_bounded_linear linear_continuous_on by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   646
  have eqspanS: "affine hull ?aS = span ?aS"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   647
    by (metis a affine_hull_span_0 subsetD hull_inc image_eqI left_minus rel_interior_subset)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   648
  have eqspanT: "affine hull ?bT = span ?bT"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   649
    by (metis b affine_hull_span_0 subsetD hull_inc image_eqI left_minus rel_interior_subset)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   650
  have "S homeomorphic cball a 1 \<inter> affine hull S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   651
    by (rule starlike_compact_projective2 [OF \<open>compact S\<close> a starS])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   652
  also have "... homeomorphic op+ (-a) ` (cball a 1 \<inter> affine hull S)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   653
    by (metis homeomorphic_translation)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   654
  also have "... = cball 0 1 \<inter> op+ (-a) ` (affine hull S)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   655
    by (auto simp: dist_norm)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   656
  also have "... = cball 0 1 \<inter> span ?aS"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   657
    using eqspanS affine_hull_translation by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   658
  also have "... homeomorphic cball 0 1 \<inter> span ?bT"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   659
    proof (rule homeomorphicI [where f=f and g=g])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   660
      show fim1: "f ` (cball 0 1 \<inter> span ?aS) = cball 0 1 \<inter> span ?bT"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   661
        apply (rule subset_antisym)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   662
         using fim fno apply (force simp:, clarify)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   663
        by (metis IntI fg gim gno image_eqI mem_cball_0)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   664
      show "g ` (cball 0 1 \<inter> span ?bT) = cball 0 1 \<inter> span ?aS"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   665
        apply (rule subset_antisym)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   666
         using gim gno apply (force simp:, clarify)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   667
        by (metis IntI fim1 gf image_eqI)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   668
    qed (auto simp: fg gf)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   669
  also have "... = cball 0 1 \<inter> op+ (-b) ` (affine hull T)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   670
    using eqspanT affine_hull_translation by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   671
  also have "... = op+ (-b) ` (cball b 1 \<inter> affine hull T)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   672
    by (auto simp: dist_norm)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   673
  also have "... homeomorphic (cball b 1 \<inter> affine hull T)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   674
    by (metis homeomorphic_translation homeomorphic_sym)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   675
  also have "... homeomorphic T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   676
    by (metis starlike_compact_projective2 [OF \<open>compact T\<close> b starT] homeomorphic_sym)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   677
  finally have 1: "S homeomorphic T" .
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   678
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   679
  have "S - rel_interior S homeomorphic sphere a 1 \<inter> affine hull S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   680
    by (rule starlike_compact_projective1 [OF \<open>compact S\<close> a starS])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   681
  also have "... homeomorphic op+ (-a) ` (sphere a 1 \<inter> affine hull S)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   682
    by (metis homeomorphic_translation)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   683
  also have "... = sphere 0 1 \<inter> op+ (-a) ` (affine hull S)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   684
    by (auto simp: dist_norm)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   685
  also have "... = sphere 0 1 \<inter> span ?aS"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   686
    using eqspanS affine_hull_translation by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   687
  also have "... homeomorphic sphere 0 1 \<inter> span ?bT"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   688
    proof (rule homeomorphicI [where f=f and g=g])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   689
      show fim1: "f ` (sphere 0 1 \<inter> span ?aS) = sphere 0 1 \<inter> span ?bT"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   690
        apply (rule subset_antisym)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   691
        using fim fno apply (force simp:, clarify)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   692
        by (metis IntI fg gim gno image_eqI mem_sphere_0)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   693
      show "g ` (sphere 0 1 \<inter> span ?bT) = sphere 0 1 \<inter> span ?aS"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   694
        apply (rule subset_antisym)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   695
        using gim gno apply (force simp:, clarify)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   696
        by (metis IntI fim1 gf image_eqI)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   697
    qed (auto simp: fg gf)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   698
  also have "... = sphere 0 1 \<inter> op+ (-b) ` (affine hull T)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   699
    using eqspanT affine_hull_translation by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   700
  also have "... = op+ (-b) ` (sphere b 1 \<inter> affine hull T)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   701
    by (auto simp: dist_norm)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   702
  also have "... homeomorphic (sphere b 1 \<inter> affine hull T)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   703
    by (metis homeomorphic_translation homeomorphic_sym)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   704
  also have "... homeomorphic T - rel_interior T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   705
    by (metis starlike_compact_projective1 [OF \<open>compact T\<close> b starT] homeomorphic_sym)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   706
  finally have 2: "S - rel_interior S homeomorphic T - rel_interior T" .
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   707
  show ?thesis
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   708
    using 1 2 by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   709
qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   710
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   711
lemma homeomorphic_convex_compact_sets:
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   712
  fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   713
  assumes "convex S" "compact S" "convex T" "compact T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   714
      and affeq: "aff_dim S = aff_dim T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   715
    shows "S homeomorphic T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   716
using homeomorphic_convex_lemma [OF assms] assms
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   717
by (auto simp: rel_frontier_def)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   718
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   719
lemma homeomorphic_rel_frontiers_convex_bounded_sets:
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   720
  fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   721
  assumes "convex S" "bounded S" "convex T" "bounded T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   722
      and affeq: "aff_dim S = aff_dim T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   723
    shows  "rel_frontier S homeomorphic rel_frontier T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   724
using assms homeomorphic_convex_lemma [of "closure S" "closure T"]
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   725
by (simp add: rel_frontier_def convex_rel_interior_closure)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   726
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   727
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   728
subsection\<open>Homeomorphisms between punctured spheres and affine sets\<close>
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   729
text\<open>Including the famous stereoscopic projection of the 3-D sphere to the complex plane\<close>
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   730
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   731
text\<open>The special case with centre 0 and radius 1\<close>
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   732
lemma homeomorphic_punctured_affine_sphere_affine_01:
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   733
  assumes "b \<in> sphere 0 1" "affine T" "0 \<in> T" "b \<in> T" "affine p"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   734
      and affT: "aff_dim T = aff_dim p + 1"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   735
    shows "(sphere 0 1 \<inter> T) - {b} homeomorphic p"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   736
proof -
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   737
  have [simp]: "norm b = 1" "b\<bullet>b = 1"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   738
    using assms by (auto simp: norm_eq_1)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   739
  have [simp]: "T \<inter> {v. b\<bullet>v = 0} \<noteq> {}"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   740
    using \<open>0 \<in> T\<close> by auto
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   741
  have [simp]: "\<not> T \<subseteq> {v. b\<bullet>v = 0}"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   742
    using \<open>norm b = 1\<close> \<open>b \<in> T\<close> by auto
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   743
  define f where "f \<equiv> \<lambda>x. 2 *\<^sub>R b + (2 / (1 - b\<bullet>x)) *\<^sub>R (x - b)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   744
  define g where "g \<equiv> \<lambda>y. b + (4 / (norm y ^ 2 + 4)) *\<^sub>R (y - 2 *\<^sub>R b)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   745
  have [simp]: "\<And>x. \<lbrakk>x \<in> T; b\<bullet>x = 0\<rbrakk> \<Longrightarrow> f (g x) = x"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   746
    unfolding f_def g_def by (simp add: algebra_simps divide_simps add_nonneg_eq_0_iff)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   747
  have no: "\<And>x. \<lbrakk>norm x = 1; b\<bullet>x \<noteq> 1\<rbrakk> \<Longrightarrow> (norm (f x))\<^sup>2 = 4 * (1 + b\<bullet>x) / (1 - b\<bullet>x)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   748
    apply (simp add: dot_square_norm [symmetric])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   749
    apply (simp add: f_def vector_add_divide_simps divide_simps norm_eq_1)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   750
    apply (simp add: algebra_simps inner_commute)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   751
    done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   752
  have [simp]: "\<And>u::real. 8 + u * (u * 8) = u * 16 \<longleftrightarrow> u=1"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   753
    by algebra
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   754
  have [simp]: "\<And>x. \<lbrakk>norm x = 1; b \<bullet> x \<noteq> 1\<rbrakk> \<Longrightarrow> g (f x) = x"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   755
    unfolding g_def no by (auto simp: f_def divide_simps)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   756
  have [simp]: "\<And>x. \<lbrakk>x \<in> T; b \<bullet> x = 0\<rbrakk> \<Longrightarrow> norm (g x) = 1"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   757
    unfolding g_def
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   758
    apply (rule power2_eq_imp_eq)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   759
    apply (simp_all add: dot_square_norm [symmetric] divide_simps vector_add_divide_simps)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   760
    apply (simp add: algebra_simps inner_commute)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   761
    done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   762
  have [simp]: "\<And>x. \<lbrakk>x \<in> T; b \<bullet> x = 0\<rbrakk> \<Longrightarrow> b \<bullet> g x \<noteq> 1"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   763
    unfolding g_def
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   764
    apply (simp_all add: dot_square_norm [symmetric] divide_simps vector_add_divide_simps add_nonneg_eq_0_iff)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   765
    apply (auto simp: algebra_simps)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   766
    done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   767
  have "subspace T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   768
    by (simp add: assms subspace_affine)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   769
  have [simp]: "\<And>x. \<lbrakk>x \<in> T; b \<bullet> x = 0\<rbrakk> \<Longrightarrow> g x \<in> T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   770
    unfolding g_def
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   771
    by (blast intro: \<open>subspace T\<close> \<open>b \<in> T\<close> subspace_add subspace_mul subspace_diff)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   772
  have "f ` {x. norm x = 1 \<and> b\<bullet>x \<noteq> 1} \<subseteq> {x. b\<bullet>x = 0}"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   773
    unfolding f_def using \<open>norm b = 1\<close> norm_eq_1
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   774
    by (force simp: field_simps inner_add_right inner_diff_right)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   775
  moreover have "f ` T \<subseteq> T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   776
    unfolding f_def using assms
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   777
    apply (auto simp: field_simps inner_add_right inner_diff_right)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   778
    by (metis add_0 diff_zero mem_affine_3_minus)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   779
  moreover have "{x. b\<bullet>x = 0} \<inter> T \<subseteq> f ` ({x. norm x = 1 \<and> b\<bullet>x \<noteq> 1} \<inter> T)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   780
    apply clarify
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   781
    apply (rule_tac x = "g x" in image_eqI, auto)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   782
    done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   783
  ultimately have imf: "f ` ({x. norm x = 1 \<and> b\<bullet>x \<noteq> 1} \<inter> T) = {x. b\<bullet>x = 0} \<inter> T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   784
    by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   785
  have no4: "\<And>y. b\<bullet>y = 0 \<Longrightarrow> norm ((y\<bullet>y + 4) *\<^sub>R b + 4 *\<^sub>R (y - 2 *\<^sub>R b)) = y\<bullet>y + 4"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   786
    apply (rule power2_eq_imp_eq)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   787
    apply (simp_all add: dot_square_norm [symmetric])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   788
    apply (auto simp: power2_eq_square algebra_simps inner_commute)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   789
    done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   790
  have [simp]: "\<And>x. \<lbrakk>norm x = 1; b \<bullet> x \<noteq> 1\<rbrakk> \<Longrightarrow> b \<bullet> f x = 0"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   791
    by (simp add: f_def algebra_simps divide_simps)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   792
  have [simp]: "\<And>x. \<lbrakk>x \<in> T; norm x = 1; b \<bullet> x \<noteq> 1\<rbrakk> \<Longrightarrow> f x \<in> T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   793
    unfolding f_def
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   794
    by (blast intro: \<open>subspace T\<close> \<open>b \<in> T\<close> subspace_add subspace_mul subspace_diff)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   795
  have "g ` {x. b\<bullet>x = 0} \<subseteq> {x. norm x = 1 \<and> b\<bullet>x \<noteq> 1}"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   796
    unfolding g_def
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   797
    apply (clarsimp simp: no4 vector_add_divide_simps divide_simps add_nonneg_eq_0_iff dot_square_norm [symmetric])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   798
    apply (auto simp: algebra_simps)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   799
    done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   800
  moreover have "g ` T \<subseteq> T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   801
    unfolding g_def
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   802
    by (blast intro: \<open>subspace T\<close> \<open>b \<in> T\<close> subspace_add subspace_mul subspace_diff)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   803
  moreover have "{x. norm x = 1 \<and> b\<bullet>x \<noteq> 1} \<inter> T \<subseteq> g ` ({x. b\<bullet>x = 0} \<inter> T)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   804
    apply clarify
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   805
    apply (rule_tac x = "f x" in image_eqI, auto)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   806
    done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   807
  ultimately have img: "g ` ({x. b\<bullet>x = 0} \<inter> T) = {x. norm x = 1 \<and> b\<bullet>x \<noteq> 1} \<inter> T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   808
    by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   809
  have aff: "affine ({x. b\<bullet>x = 0} \<inter> T)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   810
    by (blast intro: affine_hyperplane assms)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   811
  have contf: "continuous_on ({x. norm x = 1 \<and> b\<bullet>x \<noteq> 1} \<inter> T) f"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   812
    unfolding f_def by (rule continuous_intros | force)+
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   813
  have contg: "continuous_on ({x. b\<bullet>x = 0} \<inter> T) g"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   814
    unfolding g_def by (rule continuous_intros | force simp: add_nonneg_eq_0_iff)+
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   815
  have "(sphere 0 1 \<inter> T) - {b} = {x. norm x = 1 \<and> (b\<bullet>x \<noteq> 1)} \<inter> T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   816
    using  \<open>norm b = 1\<close> by (auto simp: norm_eq_1) (metis vector_eq  \<open>b\<bullet>b = 1\<close>)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   817
  also have "... homeomorphic {x. b\<bullet>x = 0} \<inter> T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   818
    by (rule homeomorphicI [OF imf img contf contg]) auto
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   819
  also have "... homeomorphic p"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   820
    apply (rule homeomorphic_affine_sets [OF aff \<open>affine p\<close>])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   821
    apply (simp add: Int_commute aff_dim_affine_Int_hyperplane [OF \<open>affine T\<close>] affT)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   822
    done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   823
  finally show ?thesis .
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   824
qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   825
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   826
theorem homeomorphic_punctured_affine_sphere_affine:
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   827
  fixes a :: "'a :: euclidean_space"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   828
  assumes "0 < r" "b \<in> sphere a r" "affine T" "a \<in> T" "b \<in> T" "affine p"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   829
      and aff: "aff_dim T = aff_dim p + 1"
66710
676258a1cf01 eliminated a needless dependence on the theorem homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66690
diff changeset
   830
    shows "(sphere a r \<inter> T) - {b} homeomorphic p"
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   831
proof -
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   832
  have "a \<noteq> b" using assms by auto
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   833
  then have inj: "inj (\<lambda>x::'a. x /\<^sub>R norm (a - b))"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   834
    by (simp add: inj_on_def)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   835
  have "((sphere a r \<inter> T) - {b}) homeomorphic
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   836
        op+ (-a) ` ((sphere a r \<inter> T) - {b})"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   837
    by (rule homeomorphic_translation)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   838
  also have "... homeomorphic op *\<^sub>R (inverse r) ` op + (- a) ` (sphere a r \<inter> T - {b})"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   839
    by (metis \<open>0 < r\<close> homeomorphic_scaling inverse_inverse_eq inverse_zero less_irrefl)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   840
  also have "... = sphere 0 1 \<inter> (op *\<^sub>R (inverse r) ` op + (- a) ` T) - {(b - a) /\<^sub>R r}"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   841
    using assms by (auto simp: dist_norm norm_minus_commute divide_simps)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   842
  also have "... homeomorphic p"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   843
    apply (rule homeomorphic_punctured_affine_sphere_affine_01)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   844
    using assms
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   845
    apply (auto simp: dist_norm norm_minus_commute affine_scaling affine_translation [symmetric] aff_dim_translation_eq inj)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   846
    done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   847
  finally show ?thesis .
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   848
qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   849
66710
676258a1cf01 eliminated a needless dependence on the theorem homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66690
diff changeset
   850
corollary homeomorphic_punctured_sphere_affine:
676258a1cf01 eliminated a needless dependence on the theorem homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66690
diff changeset
   851
  fixes a :: "'a :: euclidean_space"
676258a1cf01 eliminated a needless dependence on the theorem homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66690
diff changeset
   852
  assumes "0 < r" and b: "b \<in> sphere a r"
676258a1cf01 eliminated a needless dependence on the theorem homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66690
diff changeset
   853
      and "affine T" and affS: "aff_dim T + 1 = DIM('a)"
676258a1cf01 eliminated a needless dependence on the theorem homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66690
diff changeset
   854
    shows "(sphere a r - {b}) homeomorphic T"
676258a1cf01 eliminated a needless dependence on the theorem homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66690
diff changeset
   855
  using homeomorphic_punctured_affine_sphere_affine [of r b a UNIV T] assms by auto
676258a1cf01 eliminated a needless dependence on the theorem homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66690
diff changeset
   856
676258a1cf01 eliminated a needless dependence on the theorem homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66690
diff changeset
   857
corollary homeomorphic_punctured_sphere_hyperplane:
676258a1cf01 eliminated a needless dependence on the theorem homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66690
diff changeset
   858
  fixes a :: "'a :: euclidean_space"
676258a1cf01 eliminated a needless dependence on the theorem homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66690
diff changeset
   859
  assumes "0 < r" and b: "b \<in> sphere a r"
676258a1cf01 eliminated a needless dependence on the theorem homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66690
diff changeset
   860
      and "c \<noteq> 0"
676258a1cf01 eliminated a needless dependence on the theorem homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66690
diff changeset
   861
    shows "(sphere a r - {b}) homeomorphic {x::'a. c \<bullet> x = d}"
676258a1cf01 eliminated a needless dependence on the theorem homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66690
diff changeset
   862
apply (rule homeomorphic_punctured_sphere_affine)
676258a1cf01 eliminated a needless dependence on the theorem homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66690
diff changeset
   863
using assms
676258a1cf01 eliminated a needless dependence on the theorem homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66690
diff changeset
   864
apply (auto simp: affine_hyperplane of_nat_diff)
676258a1cf01 eliminated a needless dependence on the theorem homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66690
diff changeset
   865
done
676258a1cf01 eliminated a needless dependence on the theorem homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66690
diff changeset
   866
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   867
proposition homeomorphic_punctured_sphere_affine_gen:
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   868
  fixes a :: "'a :: euclidean_space"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   869
  assumes "convex S" "bounded S" and a: "a \<in> rel_frontier S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   870
      and "affine T" and affS: "aff_dim S = aff_dim T + 1"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   871
    shows "rel_frontier S - {a} homeomorphic T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   872
proof -
66690
6953b1a29e19 Tiny presentational improvements to homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66287
diff changeset
   873
  obtain U :: "'a set" where "affine U" "convex U" and affdS: "aff_dim U = aff_dim S"
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   874
    using choose_affine_subset [OF affine_UNIV aff_dim_geq]
66690
6953b1a29e19 Tiny presentational improvements to homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66287
diff changeset
   875
    by (meson aff_dim_affine_hull affine_affine_hull affine_imp_convex)
6953b1a29e19 Tiny presentational improvements to homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66287
diff changeset
   876
  have "S \<noteq> {}" using assms by auto
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   877
  then obtain z where "z \<in> U"
66690
6953b1a29e19 Tiny presentational improvements to homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66287
diff changeset
   878
    by (metis aff_dim_negative_iff equals0I affdS)
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   879
  then have bne: "ball z 1 \<inter> U \<noteq> {}" by force
66690
6953b1a29e19 Tiny presentational improvements to homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66287
diff changeset
   880
  then have [simp]: "aff_dim(ball z 1 \<inter> U) = aff_dim U"
6953b1a29e19 Tiny presentational improvements to homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66287
diff changeset
   881
    using aff_dim_convex_Int_open [OF \<open>convex U\<close> open_ball]
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   882
    by (fastforce simp add: Int_commute)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   883
  have "rel_frontier S homeomorphic rel_frontier (ball z 1 \<inter> U)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   884
    apply (rule homeomorphic_rel_frontiers_convex_bounded_sets)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   885
    apply (auto simp: \<open>affine U\<close> affine_imp_convex convex_Int affdS assms)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   886
    done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   887
  also have "... = sphere z 1 \<inter> U"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   888
    using convex_affine_rel_frontier_Int [of "ball z 1" U]
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   889
    by (simp add: \<open>affine U\<close> bne)
66690
6953b1a29e19 Tiny presentational improvements to homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66287
diff changeset
   890
  finally have "rel_frontier S homeomorphic sphere z 1 \<inter> U" . 
6953b1a29e19 Tiny presentational improvements to homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66287
diff changeset
   891
  then obtain h k where him: "h ` rel_frontier S = sphere z 1 \<inter> U"
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   892
                    and kim: "k ` (sphere z 1 \<inter> U) = rel_frontier S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   893
                    and hcon: "continuous_on (rel_frontier S) h"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   894
                    and kcon: "continuous_on (sphere z 1 \<inter> U) k"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   895
                    and kh:  "\<And>x. x \<in> rel_frontier S \<Longrightarrow> k(h(x)) = x"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   896
                    and hk:  "\<And>y. y \<in> sphere z 1 \<inter> U \<Longrightarrow> h(k(y)) = y"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   897
    unfolding homeomorphic_def homeomorphism_def by auto
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   898
  have "rel_frontier S - {a} homeomorphic (sphere z 1 \<inter> U) - {h a}"
66690
6953b1a29e19 Tiny presentational improvements to homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66287
diff changeset
   899
  proof (rule homeomorphicI)
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   900
    show h: "h ` (rel_frontier S - {a}) = sphere z 1 \<inter> U - {h a}"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   901
      using him a kh by auto metis
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   902
    show "k ` (sphere z 1 \<inter> U - {h a}) = rel_frontier S - {a}"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   903
      by (force simp: h [symmetric] image_comp o_def kh)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   904
  qed (auto intro: continuous_on_subset hcon kcon simp: kh hk)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   905
  also have "... homeomorphic T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   906
    apply (rule homeomorphic_punctured_affine_sphere_affine)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   907
    using a him
66690
6953b1a29e19 Tiny presentational improvements to homeomorphic_punctured_sphere_affine_gen
paulson <lp15@cam.ac.uk>
parents: 66287
diff changeset
   908
    by (auto simp: affS affdS \<open>affine T\<close> \<open>affine U\<close> \<open>z \<in> U\<close>)
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   909
  finally show ?thesis .
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   910
qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   911
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   912
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   913
text\<open> When dealing with AR, ANR and ANR later, it's useful to know that every set
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   914
  is homeomorphic to a closed subset of a convex set, and
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   915
  if the set is locally compact we can take the convex set to be the universe.\<close>
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   916
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   917
proposition homeomorphic_closedin_convex:
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   918
  fixes S :: "'m::euclidean_space set"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   919
  assumes "aff_dim S < DIM('n)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   920
  obtains U and T :: "'n::euclidean_space set"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   921
     where "convex U" "U \<noteq> {}" "closedin (subtopology euclidean U) T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   922
           "S homeomorphic T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   923
proof (cases "S = {}")
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   924
  case True then show ?thesis
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   925
    by (rule_tac U=UNIV and T="{}" in that) auto
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   926
next
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   927
  case False
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   928
  then obtain a where "a \<in> S" by auto
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   929
  obtain i::'n where i: "i \<in> Basis" "i \<noteq> 0"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   930
    using SOME_Basis Basis_zero by force
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   931
  have "0 \<in> affine hull (op + (- a) ` S)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   932
    by (simp add: \<open>a \<in> S\<close> hull_inc)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   933
  then have "dim (op + (- a) ` S) = aff_dim (op + (- a) ` S)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   934
    by (simp add: aff_dim_zero)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   935
  also have "... < DIM('n)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   936
    by (simp add: aff_dim_translation_eq assms)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   937
  finally have dd: "dim (op + (- a) ` S) < DIM('n)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   938
    by linarith
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   939
  obtain T where "subspace T" and Tsub: "T \<subseteq> {x. i \<bullet> x = 0}"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   940
             and dimT: "dim T = dim (op + (- a) ` S)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   941
    apply (rule choose_subspace_of_subspace [of "dim (op + (- a) ` S)" "{x::'n. i \<bullet> x = 0}"])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   942
     apply (simp add: dim_hyperplane [OF \<open>i \<noteq> 0\<close>])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   943
     apply (metis DIM_positive Suc_pred dd not_le not_less_eq_eq)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   944
    apply (metis span_eq subspace_hyperplane)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   945
    done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   946
  have "subspace (span (op + (- a) ` S))"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   947
    using subspace_span by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   948
  then obtain h k where "linear h" "linear k"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   949
               and heq: "h ` span (op + (- a) ` S) = T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   950
               and keq:"k ` T = span (op + (- a) ` S)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   951
               and hinv [simp]:  "\<And>x. x \<in> span (op + (- a) ` S) \<Longrightarrow> k(h x) = x"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   952
               and kinv [simp]:  "\<And>x. x \<in> T \<Longrightarrow> h(k x) = x"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   953
    apply (rule isometries_subspaces [OF _ \<open>subspace T\<close>])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   954
    apply (auto simp: dimT)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   955
    done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   956
  have hcont: "continuous_on A h" and kcont: "continuous_on B k" for A B
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   957
    using \<open>linear h\<close> \<open>linear k\<close> linear_continuous_on linear_conv_bounded_linear by blast+
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   958
  have ihhhh[simp]: "\<And>x. x \<in> S \<Longrightarrow> i \<bullet> h (x - a) = 0"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   959
    using Tsub [THEN subsetD] heq span_inc by fastforce
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   960
  have "sphere 0 1 - {i} homeomorphic {x. i \<bullet> x = 0}"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   961
    apply (rule homeomorphic_punctured_sphere_affine)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   962
    using i
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   963
    apply (auto simp: affine_hyperplane)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   964
    by (metis DIM_positive Suc_eq_plus1 add.left_neutral diff_add_cancel not_le not_less_eq_eq of_nat_1 of_nat_diff)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   965
  then obtain f g where fg: "homeomorphism (sphere 0 1 - {i}) {x. i \<bullet> x = 0} f g"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   966
    by (force simp: homeomorphic_def)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   967
  have "h ` op + (- a) ` S \<subseteq> T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   968
    using heq span_clauses(1) span_linear_image by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   969
  then have "g ` h ` op + (- a) ` S \<subseteq> g ` {x. i \<bullet> x = 0}"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   970
    using Tsub by (simp add: image_mono)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   971
  also have "... \<subseteq> sphere 0 1 - {i}"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   972
    by (simp add: fg [unfolded homeomorphism_def])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   973
  finally have gh_sub_sph: "(g \<circ> h) ` op + (- a) ` S \<subseteq> sphere 0 1 - {i}"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   974
    by (metis image_comp)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   975
  then have gh_sub_cb: "(g \<circ> h) ` op + (- a) ` S \<subseteq> cball 0 1"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   976
    by (metis Diff_subset order_trans sphere_cball)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   977
  have [simp]: "\<And>u. u \<in> S \<Longrightarrow> norm (g (h (u - a))) = 1"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   978
    using gh_sub_sph [THEN subsetD] by (auto simp: o_def)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   979
  have ghcont: "continuous_on (op + (- a) ` S) (\<lambda>x. g (h x))"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   980
    apply (rule continuous_on_compose2 [OF homeomorphism_cont2 [OF fg] hcont], force)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   981
    done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   982
  have kfcont: "continuous_on ((g \<circ> h \<circ> op + (- a)) ` S) (\<lambda>x. k (f x))"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   983
    apply (rule continuous_on_compose2 [OF kcont])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   984
    using homeomorphism_cont1 [OF fg] gh_sub_sph apply (force intro: continuous_on_subset, blast)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   985
    done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   986
  have "S homeomorphic op + (- a) ` S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   987
    by (simp add: homeomorphic_translation)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   988
  also have Shom: "\<dots> homeomorphic (g \<circ> h) ` op + (- a) ` S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   989
    apply (simp add: homeomorphic_def homeomorphism_def)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   990
    apply (rule_tac x="g \<circ> h" in exI)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   991
    apply (rule_tac x="k \<circ> f" in exI)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   992
    apply (auto simp: ghcont kfcont span_clauses(1) homeomorphism_apply2 [OF fg] image_comp)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   993
    apply (force simp: o_def homeomorphism_apply2 [OF fg] span_clauses(1))
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   994
    done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   995
  finally have Shom: "S homeomorphic (g \<circ> h) ` op + (- a) ` S" .
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   996
  show ?thesis
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   997
    apply (rule_tac U = "ball 0 1 \<union> image (g o h) (op + (- a) ` S)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   998
                and T = "image (g o h) (op + (- a) ` S)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
   999
                    in that)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1000
    apply (rule convex_intermediate_ball [of 0 1], force)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1001
    using gh_sub_cb apply force
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1002
    apply force
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1003
    apply (simp add: closedin_closed)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1004
    apply (rule_tac x="sphere 0 1" in exI)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1005
    apply (auto simp: Shom)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1006
    done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1007
qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1008
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1009
subsection\<open>Locally compact sets in an open set\<close>
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1010
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1011
text\<open> Locally compact sets are closed in an open set and are homeomorphic
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1012
  to an absolutely closed set if we have one more dimension to play with.\<close>
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1013
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1014
lemma locally_compact_open_Int_closure:
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1015
  fixes S :: "'a :: metric_space set"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1016
  assumes "locally compact S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1017
  obtains T where "open T" "S = T \<inter> closure S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1018
proof -
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1019
  have "\<forall>x\<in>S. \<exists>T v u. u = S \<inter> T \<and> x \<in> u \<and> u \<subseteq> v \<and> v \<subseteq> S \<and> open T \<and> compact v"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1020
    by (metis assms locally_compact openin_open)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1021
  then obtain t v where
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1022
        tv: "\<And>x. x \<in> S
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1023
             \<Longrightarrow> v x \<subseteq> S \<and> open (t x) \<and> compact (v x) \<and> (\<exists>u. x \<in> u \<and> u \<subseteq> v x \<and> u = S \<inter> t x)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1024
    by metis
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1025
  then have o: "open (UNION S t)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1026
    by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1027
  have "S = \<Union> (v ` S)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1028
    using tv by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1029
  also have "... = UNION S t \<inter> closure S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1030
  proof
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1031
    show "UNION S v \<subseteq> UNION S t \<inter> closure S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1032
      apply safe
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1033
       apply (metis Int_iff subsetD UN_iff tv)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1034
      apply (simp add: closure_def rev_subsetD tv)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1035
      done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1036
    have "t x \<inter> closure S \<subseteq> v x" if "x \<in> S" for x
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1037
    proof -
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1038
      have "t x \<inter> closure S \<subseteq> closure (t x \<inter> S)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1039
        by (simp add: open_Int_closure_subset that tv)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1040
      also have "... \<subseteq> v x"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1041
        by (metis Int_commute closure_minimal compact_imp_closed that tv)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1042
      finally show ?thesis .
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1043
    qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1044
    then show "UNION S t \<inter> closure S \<subseteq> UNION S v"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1045
      by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1046
  qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1047
  finally have e: "S = UNION S t \<inter> closure S" .
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1048
  show ?thesis
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1049
    by (rule that [OF o e])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1050
qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1051
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1052
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1053
lemma locally_compact_closedin_open:
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1054
    fixes S :: "'a :: metric_space set"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1055
    assumes "locally compact S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1056
    obtains T where "open T" "closedin (subtopology euclidean T) S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1057
  by (metis locally_compact_open_Int_closure [OF assms] closed_closure closedin_closed_Int)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1058
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1059
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1060
lemma locally_compact_homeomorphism_projection_closed:
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1061
  assumes "locally compact S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1062
  obtains T and f :: "'a \<Rightarrow> 'a :: euclidean_space \<times> 'b :: euclidean_space"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1063
    where "closed T" "homeomorphism S T f fst"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1064
proof (cases "closed S")
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1065
  case True
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1066
    then show ?thesis
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1067
      apply (rule_tac T = "S \<times> {0}" and f = "\<lambda>x. (x, 0)" in that)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1068
      apply (auto simp: closed_Times homeomorphism_def continuous_intros)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1069
      done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1070
next
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1071
  case False
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1072
    obtain U where "open U" and US: "U \<inter> closure S = S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1073
      by (metis locally_compact_open_Int_closure [OF assms])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1074
    with False have Ucomp: "-U \<noteq> {}"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1075
      using closure_eq by auto
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1076
    have [simp]: "closure (- U) = -U"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1077
      by (simp add: \<open>open U\<close> closed_Compl)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1078
    define f :: "'a \<Rightarrow> 'a \<times> 'b" where "f \<equiv> \<lambda>x. (x, One /\<^sub>R setdist {x} (- U))"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1079
    have "continuous_on U (\<lambda>x. (x, One /\<^sub>R setdist {x} (- U)))"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1080
      apply (intro continuous_intros continuous_on_setdist)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1081
      by (simp add: Ucomp setdist_eq_0_sing_1)
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1082
    then have homU: "homeomorphism U (f`U) f fst"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1083
      by (auto simp: f_def homeomorphism_def image_iff continuous_intros)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1084
    have cloS: "closedin (subtopology euclidean U) S"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1085
      by (metis US closed_closure closedin_closed_Int)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1086
    have cont: "isCont ((\<lambda>x. setdist {x} (- U)) o fst) z" for z :: "'a \<times> 'b"
66827
c94531b5007d Divided Topology_Euclidean_Space in two, creating new theory Connected. Also deleted some duplicate / variant theorems
paulson <lp15@cam.ac.uk>
parents: 66710
diff changeset
  1087
      by (rule continuous_at_compose continuous_intros continuous_at_setdist)+
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1088
    have setdist1D: "setdist {a} (- U) *\<^sub>R b = One \<Longrightarrow> setdist {a} (- U) \<noteq> 0" for a::'a and b::'b
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1089
      by force
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1090
    have *: "r *\<^sub>R b = One \<Longrightarrow> b = (1 / r) *\<^sub>R One" for r and b::'b
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1091
      by (metis One_non_0 nonzero_divide_eq_eq real_vector.scale_eq_0_iff real_vector.scale_scale scaleR_one)
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1092
    have "f ` U = (\<lambda>z. (setdist {fst z} (- U) *\<^sub>R snd z)) -` {One}"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1093
      apply (auto simp: f_def setdist_eq_0_sing_1 field_simps Ucomp)
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1094
      apply (rule_tac x=a in image_eqI)
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1095
      apply (auto simp: * setdist_eq_0_sing_1 dest: setdist1D)
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1096
      done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1097
    then have clfU: "closed (f ` U)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1098
      apply (rule ssubst)
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1099
      apply (rule continuous_closed_vimage)
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1100
      apply (auto intro: continuous_intros cont [unfolded o_def])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1101
      done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1102
    have "closed (f ` S)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1103
       apply (rule closedin_closed_trans [OF _ clfU])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1104
       apply (rule homeomorphism_imp_closed_map [OF homU cloS])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1105
       done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1106
    then show ?thesis
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1107
      apply (rule that)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1108
      apply (rule homeomorphism_of_subsets [OF homU])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1109
      using US apply auto
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1110
      done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1111
qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1112
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1113
lemma locally_compact_closed_Int_open:
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1114
  fixes S :: "'a :: euclidean_space set"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1115
  shows
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1116
    "locally compact S \<longleftrightarrow> (\<exists>U u. closed U \<and> open u \<and> S = U \<inter> u)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1117
by (metis closed_closure closed_imp_locally_compact inf_commute locally_compact_Int locally_compact_open_Int_closure open_imp_locally_compact)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1118
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1119
63945
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1120
lemma lowerdim_embeddings:
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1121
  assumes  "DIM('a) < DIM('b)"
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1122
  obtains f :: "'a::euclidean_space*real \<Rightarrow> 'b::euclidean_space" 
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1123
      and g :: "'b \<Rightarrow> 'a*real"
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1124
      and j :: 'b
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1125
  where "linear f" "linear g" "\<And>z. g (f z) = z" "j \<in> Basis" "\<And>x. f(x,0) \<bullet> j = 0"
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1126
proof -
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1127
  let ?B = "Basis :: ('a*real) set"
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1128
  have b01: "(0,1) \<in> ?B"
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1129
    by (simp add: Basis_prod_def)
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1130
  have "DIM('a * real) \<le> DIM('b)"
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1131
    by (simp add: Suc_leI assms)
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1132
  then obtain basf :: "'a*real \<Rightarrow> 'b" where sbf: "basf ` ?B \<subseteq> Basis" and injbf: "inj_on basf Basis"
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1133
    by (metis finite_Basis card_le_inj)
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1134
  define basg:: "'b \<Rightarrow> 'a * real" where
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1135
    "basg \<equiv> \<lambda>i. if i \<in> basf ` Basis then inv_into Basis basf i else (0,1)"
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1136
  have bgf[simp]: "basg (basf i) = i" if "i \<in> Basis" for i
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1137
    using inv_into_f_f injbf that by (force simp: basg_def)
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1138
  have sbg: "basg ` Basis \<subseteq> ?B" 
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1139
    by (force simp: basg_def injbf b01)
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1140
  define f :: "'a*real \<Rightarrow> 'b" where "f \<equiv> \<lambda>u. \<Sum>j\<in>Basis. (u \<bullet> basg j) *\<^sub>R j"
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1141
  define g :: "'b \<Rightarrow> 'a*real" where "g \<equiv> \<lambda>z. (\<Sum>i\<in>Basis. (z \<bullet> basf i) *\<^sub>R i)" 
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1142
  show ?thesis
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1143
  proof
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1144
    show "linear f"
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1145
      unfolding f_def
64267
b9a1486e79be setsum -> sum
nipkow
parents: 63945
diff changeset
  1146
      by (intro linear_compose_sum linearI ballI) (auto simp: algebra_simps)
63945
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1147
    show "linear g"
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1148
      unfolding g_def
64267
b9a1486e79be setsum -> sum
nipkow
parents: 63945
diff changeset
  1149
      by (intro linear_compose_sum linearI ballI) (auto simp: algebra_simps)
63945
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1150
    have *: "(\<Sum>a \<in> Basis. a \<bullet> basf b * (x \<bullet> basg a)) = x \<bullet> b" if "b \<in> Basis" for x b
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1151
      using sbf that by auto
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1152
    show gf: "g (f x) = x" for x
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1153
      apply (rule euclidean_eqI)
64267
b9a1486e79be setsum -> sum
nipkow
parents: 63945
diff changeset
  1154
      apply (simp add: f_def g_def inner_sum_left scaleR_sum_left algebra_simps)
b9a1486e79be setsum -> sum
nipkow
parents: 63945
diff changeset
  1155
      apply (simp add: Groups_Big.sum_distrib_left [symmetric] *)
63945
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1156
      done
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1157
    show "basf(0,1) \<in> Basis"
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1158
      using b01 sbf by auto
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1159
    then show "f(x,0) \<bullet> basf(0,1) = 0" for x
64267
b9a1486e79be setsum -> sum
nipkow
parents: 63945
diff changeset
  1160
      apply (simp add: f_def inner_sum_left)
b9a1486e79be setsum -> sum
nipkow
parents: 63945
diff changeset
  1161
      apply (rule comm_monoid_add_class.sum.neutral)
63945
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1162
      using b01 inner_not_same_Basis by fastforce
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1163
  qed
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1164
qed
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1165
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1166
proposition locally_compact_homeomorphic_closed:
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1167
  fixes S :: "'a::euclidean_space set"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1168
  assumes "locally compact S" and dimlt: "DIM('a) < DIM('b)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1169
  obtains T :: "'b::euclidean_space set" where "closed T" "S homeomorphic T"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1170
proof -
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1171
  obtain U:: "('a*real)set" and h
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1172
    where "closed U" and homU: "homeomorphism S U h fst"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1173
    using locally_compact_homeomorphism_projection_closed assms by metis
63945
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1174
  obtain f :: "'a*real \<Rightarrow> 'b" and g :: "'b \<Rightarrow> 'a*real"
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1175
    where "linear f" "linear g" and gf [simp]: "\<And>z. g (f z) = z"
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1176
    using lowerdim_embeddings [OF dimlt] by metis 
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1177
  then have "inj f"
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1178
    by (metis injI)
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1179
  have gfU: "g ` f ` U = U"
63945
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1180
    by (simp add: image_comp o_def)
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1181
  have "S homeomorphic U"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1182
    using homU homeomorphic_def by blast
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1183
  also have "... homeomorphic f ` U"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1184
    apply (rule homeomorphicI [OF refl gfU])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1185
       apply (meson \<open>inj f\<close> \<open>linear f\<close> homeomorphism_cont2 linear_homeomorphism_image)
63945
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1186
    using \<open>linear g\<close> linear_continuous_on linear_conv_bounded_linear apply blast
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1187
    apply (auto simp: o_def)
444eafb6e864 a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents: 63918
diff changeset
  1188
    done
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1189
  finally show ?thesis
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1190
    apply (rule_tac T = "f ` U" in that)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1191
    apply (rule closed_injective_linear_image [OF \<open>closed U\<close> \<open>linear f\<close> \<open>inj f\<close>], assumption)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1192
    done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1193
qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1194
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1195
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1196
lemma homeomorphic_convex_compact_lemma:
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1197
  fixes S :: "'a::euclidean_space set"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1198
  assumes "convex S"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1199
    and "compact S"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1200
    and "cball 0 1 \<subseteq> S"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1201
  shows "S homeomorphic (cball (0::'a) 1)"
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1202
proof (rule starlike_compact_projective_special[OF assms(2-3)])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1203
  fix x u
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1204
  assume "x \<in> S" and "0 \<le> u" and "u < (1::real)"
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1205
  have "open (ball (u *\<^sub>R x) (1 - u))"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1206
    by (rule open_ball)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1207
  moreover have "u *\<^sub>R x \<in> ball (u *\<^sub>R x) (1 - u)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1208
    unfolding centre_in_ball using \<open>u < 1\<close> by simp
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1209
  moreover have "ball (u *\<^sub>R x) (1 - u) \<subseteq> S"
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1210
  proof
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1211
    fix y
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1212
    assume "y \<in> ball (u *\<^sub>R x) (1 - u)"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1213
    then have "dist (u *\<^sub>R x) y < 1 - u"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1214
      unfolding mem_ball .
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1215
    with \<open>u < 1\<close> have "inverse (1 - u) *\<^sub>R (y - u *\<^sub>R x) \<in> cball 0 1"
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1216
      by (simp add: dist_norm inverse_eq_divide norm_minus_commute)
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1217
    with assms(3) have "inverse (1 - u) *\<^sub>R (y - u *\<^sub>R x) \<in> S" ..
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1218
    with assms(1) have "(1 - u) *\<^sub>R ((y - u *\<^sub>R x) /\<^sub>R (1 - u)) + u *\<^sub>R x \<in> S"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1219
      using \<open>x \<in> S\<close> \<open>0 \<le> u\<close> \<open>u < 1\<close> [THEN less_imp_le] by (rule convexD_alt)
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1220
    then show "y \<in> S" using \<open>u < 1\<close>
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1221
      by simp
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1222
  qed
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1223
  ultimately have "u *\<^sub>R x \<in> interior S" ..
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1224
  then show "u *\<^sub>R x \<in> S - frontier S"
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1225
    using frontier_def and interior_subset by auto
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1226
qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1227
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1228
proposition homeomorphic_convex_compact_cball:
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1229
  fixes e :: real
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1230
    and S :: "'a::euclidean_space set"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1231
  assumes "convex S"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1232
    and "compact S"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1233
    and "interior S \<noteq> {}"
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1234
    and "e > 0"
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1235
  shows "S homeomorphic (cball (b::'a) e)"
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1236
proof -
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1237
  obtain a where "a \<in> interior S"
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1238
    using assms(3) by auto
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1239
  then obtain d where "d > 0" and d: "cball a d \<subseteq> S"
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1240
    unfolding mem_interior_cball by auto
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1241
  let ?d = "inverse d" and ?n = "0::'a"
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1242
  have "cball ?n 1 \<subseteq> (\<lambda>x. inverse d *\<^sub>R (x - a)) ` S"
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1243
    apply rule
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1244
    apply (rule_tac x="d *\<^sub>R x + a" in image_eqI)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1245
    defer
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1246
    apply (rule d[unfolded subset_eq, rule_format])
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1247
    using \<open>d > 0\<close>
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1248
    unfolding mem_cball dist_norm
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1249
    apply (auto simp add: mult_right_le_one_le)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1250
    done
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1251
  then have "(\<lambda>x. inverse d *\<^sub>R (x - a)) ` S homeomorphic cball ?n 1"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1252
    using homeomorphic_convex_compact_lemma[of "(\<lambda>x. ?d *\<^sub>R -a + ?d *\<^sub>R x) ` S",
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1253
      OF convex_affinity compact_affinity]
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1254
    using assms(1,2)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1255
    by (auto simp add: scaleR_right_diff_distrib)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1256
  then show ?thesis
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1257
    apply (rule_tac homeomorphic_trans[OF _ homeomorphic_balls(2)[of 1 _ ?n]])
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1258
    apply (rule homeomorphic_trans[OF homeomorphic_affinity[of "?d" S "?d *\<^sub>R -a"]])
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1259
    using \<open>d>0\<close> \<open>e>0\<close>
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1260
    apply (auto simp add: scaleR_right_diff_distrib)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1261
    done
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1262
qed
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1263
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1264
corollary homeomorphic_convex_compact:
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1265
  fixes S :: "'a::euclidean_space set"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1266
    and T :: "'a set"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1267
  assumes "convex S" "compact S" "interior S \<noteq> {}"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1268
    and "convex T" "compact T" "interior T \<noteq> {}"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1269
  shows "S homeomorphic T"
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1270
  using assms
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1271
  by (meson zero_less_one homeomorphic_trans homeomorphic_convex_compact_cball homeomorphic_sym)
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  1272
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1273
subsection\<open>Covering spaces and lifting results for them\<close>
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1274
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1275
definition covering_space
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1276
           :: "'a::topological_space set \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'b::topological_space set \<Rightarrow> bool"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1277
  where
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1278
  "covering_space c p S \<equiv>
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1279
       continuous_on c p \<and> p ` c = S \<and>
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1280
       (\<forall>x \<in> S. \<exists>T. x \<in> T \<and> openin (subtopology euclidean S) T \<and>
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1281
                    (\<exists>v. \<Union>v = c \<inter> p -` T \<and>
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1282
                        (\<forall>u \<in> v. openin (subtopology euclidean c) u) \<and>
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1283
                        pairwise disjnt v \<and>
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1284
                        (\<forall>u \<in> v. \<exists>q. homeomorphism u T p q)))"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1285
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1286
lemma covering_space_imp_continuous: "covering_space c p S \<Longrightarrow> continuous_on c p"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1287
  by (simp add: covering_space_def)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1288
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1289
lemma covering_space_imp_surjective: "covering_space c p S \<Longrightarrow> p ` c = S"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1290
  by (simp add: covering_space_def)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1291
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1292
lemma homeomorphism_imp_covering_space: "homeomorphism S T f g \<Longrightarrow> covering_space S f T"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1293
  apply (simp add: homeomorphism_def covering_space_def, clarify)
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1294
  apply (rule_tac x=T in exI, simp)
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1295
  apply (rule_tac x="{S}" in exI, auto)
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1296
  done
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1297
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1298
lemma covering_space_local_homeomorphism:
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1299
  assumes "covering_space c p S" "x \<in> c"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1300
  obtains T u q where "x \<in> T" "openin (subtopology euclidean c) T"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1301
                      "p x \<in> u" "openin (subtopology euclidean S) u"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1302
                      "homeomorphism T u p q"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1303
using assms
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1304
apply (simp add: covering_space_def, clarify)
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1305
  apply (drule_tac x="p x" in bspec, force)
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1306
  by (metis IntI UnionE vimage_eq) 
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1307
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1308
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1309
lemma covering_space_local_homeomorphism_alt:
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1310
  assumes p: "covering_space c p S" and "y \<in> S"
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1311
  obtains x T U q where "p x = y"
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1312
                        "x \<in> T" "openin (subtopology euclidean c) T"
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1313
                        "y \<in> U" "openin (subtopology euclidean S) U"
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1314
                          "homeomorphism T U p q"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1315
proof -
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1316
  obtain x where "p x = y" "x \<in> c"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1317
    using assms covering_space_imp_surjective by blast
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1318
  show ?thesis
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1319
    apply (rule covering_space_local_homeomorphism [OF p \<open>x \<in> c\<close>])
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1320
    using that \<open>p x = y\<close> by blast
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1321
qed
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1322
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1323
proposition covering_space_open_map:
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1324
  fixes S :: "'a :: metric_space set" and T :: "'b :: metric_space set"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1325
  assumes p: "covering_space c p S" and T: "openin (subtopology euclidean c) T"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1326
    shows "openin (subtopology euclidean S) (p ` T)"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1327
proof -
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1328
  have pce: "p ` c = S"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1329
   and covs:
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1330
       "\<And>x. x \<in> S \<Longrightarrow>
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1331
            \<exists>X VS. x \<in> X \<and> openin (subtopology euclidean S) X \<and>
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1332
                  \<Union>VS = c \<inter> p -` X \<and>
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1333
                  (\<forall>u \<in> VS. openin (subtopology euclidean c) u) \<and>
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1334
                  pairwise disjnt VS \<and>
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1335
                  (\<forall>u \<in> VS. \<exists>q. homeomorphism u X p q)"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1336
    using p by (auto simp: covering_space_def)
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1337
  have "T \<subseteq> c"  by (metis openin_euclidean_subtopology_iff T)
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1338
  have "\<exists>X. openin (subtopology euclidean S) X \<and> y \<in> X \<and> X \<subseteq> p ` T"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1339
          if "y \<in> p ` T" for y
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1340
  proof -
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1341
    have "y \<in> S" using \<open>T \<subseteq> c\<close> pce that by blast
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1342
    obtain U VS where "y \<in> U" and U: "openin (subtopology euclidean S) U"
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1343
                  and VS: "\<Union>VS = c \<inter> p -` U"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1344
                  and openVS: "\<forall>V \<in> VS. openin (subtopology euclidean c) V"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1345
                  and homVS: "\<And>V. V \<in> VS \<Longrightarrow> \<exists>q. homeomorphism V U p q"
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1346
      using covs [OF \<open>y \<in> S\<close>] by auto
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1347
    obtain x where "x \<in> c" "p x \<in> U" "x \<in> T" "p x = y"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1348
      apply simp
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1349
      using T [unfolded openin_euclidean_subtopology_iff] \<open>y \<in> U\<close> \<open>y \<in> p ` T\<close> by blast
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1350
    with VS obtain V where "x \<in> V" "V \<in> VS" by auto
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1351
    then obtain q where q: "homeomorphism V U p q" using homVS by blast
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1352
    then have ptV: "p ` (T \<inter> V) = U \<inter> q -` (T \<inter> V)"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1353
      using VS \<open>V \<in> VS\<close> by (auto simp: homeomorphism_def)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1354
    have ocv: "openin (subtopology euclidean c) V"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1355
      by (simp add: \<open>V \<in> VS\<close> openVS)
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1356
    have "openin (subtopology euclidean U) (U \<inter> q -` (T \<inter> V))"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1357
      apply (rule continuous_on_open [THEN iffD1, rule_format])
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1358
       using homeomorphism_def q apply blast
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1359
      using openin_subtopology_Int_subset [of c] q T unfolding homeomorphism_def
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1360
      by (metis inf.absorb_iff2 Int_commute ocv openin_euclidean_subtopology_iff)
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1361
    then have os: "openin (subtopology euclidean S) (U \<inter> q -` (T \<inter> V))"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1362
      using openin_trans [of U] by (simp add: Collect_conj_eq U)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1363
    show ?thesis
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1364
      apply (rule_tac x = "p ` (T \<inter> V)" in exI)
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1365
      apply (rule conjI)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1366
      apply (simp only: ptV os)
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1367
      using \<open>p x = y\<close> \<open>x \<in> V\<close> \<open>x \<in> T\<close> apply blast
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1368
      done
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1369
  qed
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1370
  with openin_subopen show ?thesis by blast
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1371
qed
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1372
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1373
lemma covering_space_lift_unique_gen:
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1374
  fixes f :: "'a::topological_space \<Rightarrow> 'b::topological_space"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1375
  fixes g1 :: "'a \<Rightarrow> 'c::real_normed_vector"
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1376
  assumes cov: "covering_space c p S"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1377
      and eq: "g1 a = g2 a"
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1378
      and f: "continuous_on T f"  "f ` T \<subseteq> S"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1379
      and g1: "continuous_on T g1"  "g1 ` T \<subseteq> c"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1380
      and fg1: "\<And>x. x \<in> T \<Longrightarrow> f x = p(g1 x)"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1381
      and g2: "continuous_on T g2"  "g2 ` T \<subseteq> c"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1382
      and fg2: "\<And>x. x \<in> T \<Longrightarrow> f x = p(g2 x)"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1383
      and u_compt: "U \<in> components T" and "a \<in> U" "x \<in> U"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1384
    shows "g1 x = g2 x"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1385
proof -
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1386
  have "U \<subseteq> T" by (rule in_components_subset [OF u_compt])
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: 64792
diff changeset
  1387
  define G12 where "G12 \<equiv> {x \<in> U. g1 x - g2 x = 0}"
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1388
  have "connected U" by (rule in_components_connected [OF u_compt])
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1389
  have contu: "continuous_on U g1" "continuous_on U g2"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1390
       using \<open>U \<subseteq> T\<close> continuous_on_subset g1 g2 by blast+
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1391
  have o12: "openin (subtopology euclidean U) G12"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1392
  unfolding G12_def
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1393
  proof (subst openin_subopen, clarify)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1394
    fix z
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1395
    assume z: "z \<in> U" "g1 z - g2 z = 0"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1396
    obtain v w q where "g1 z \<in> v" and ocv: "openin (subtopology euclidean c) v"
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1397
                   and "p (g1 z) \<in> w" and osw: "openin (subtopology euclidean S) w"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1398
                   and hom: "homeomorphism v w p q"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1399
      apply (rule_tac x = "g1 z" in covering_space_local_homeomorphism [OF cov])
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1400
       using \<open>U \<subseteq> T\<close> \<open>z \<in> U\<close> g1(2) apply blast+
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1401
      done
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1402
    have "g2 z \<in> v" using \<open>g1 z \<in> v\<close> z by auto
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1403
    have gg: "U \<inter> g -` v = U \<inter> g -` (v \<inter> g ` U)" for g
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1404
      by auto
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1405
    have "openin (subtopology euclidean (g1 ` U)) (v \<inter> g1 ` U)"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1406
      using ocv \<open>U \<subseteq> T\<close> g1 by (fastforce simp add: openin_open)
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1407
    then have 1: "openin (subtopology euclidean U) (U \<inter> g1 -` v)"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1408
      unfolding gg by (blast intro: contu continuous_on_open [THEN iffD1, rule_format])
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1409
    have "openin (subtopology euclidean (g2 ` U)) (v \<inter> g2 ` U)"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1410
      using ocv \<open>U \<subseteq> T\<close> g2 by (fastforce simp add: openin_open)
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1411
    then have 2: "openin (subtopology euclidean U) (U \<inter> g2 -` v)"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1412
      unfolding gg by (blast intro: contu continuous_on_open [THEN iffD1, rule_format])
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1413
    show "\<exists>T. openin (subtopology euclidean U) T \<and> z \<in> T \<and> T \<subseteq> {z \<in> U. g1 z - g2 z = 0}"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1414
      using z
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1415
      apply (rule_tac x = "(U \<inter> g1 -` v) \<inter> (U \<inter> g2 -` v)" in exI)
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1416
      apply (intro conjI)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1417
      apply (rule openin_Int [OF 1 2])
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1418
      using \<open>g1 z \<in> v\<close>  \<open>g2 z \<in> v\<close>  apply (force simp:, clarify)
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1419
      apply (metis \<open>U \<subseteq> T\<close> subsetD eq_iff_diff_eq_0 fg1 fg2 hom homeomorphism_def)
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1420
      done
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1421
  qed
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1422
  have c12: "closedin (subtopology euclidean U) G12"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1423
    unfolding G12_def
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1424
    by (intro continuous_intros continuous_closedin_preimage_constant contu)
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1425
  have "G12 = {} \<or> G12 = U"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1426
    by (intro connected_clopen [THEN iffD1, rule_format] \<open>connected U\<close> conjI o12 c12)
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1427
  with eq \<open>a \<in> U\<close> have "\<And>x. x \<in> U \<Longrightarrow> g1 x - g2 x = 0" by (auto simp: G12_def)
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1428
  then show ?thesis
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1429
    using \<open>x \<in> U\<close> by force
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1430
qed
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1431
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1432
proposition covering_space_lift_unique:
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1433
  fixes f :: "'a::topological_space \<Rightarrow> 'b::topological_space"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1434
  fixes g1 :: "'a \<Rightarrow> 'c::real_normed_vector"
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1435
  assumes "covering_space c p S"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1436
          "g1 a = g2 a"
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1437
          "continuous_on T f"  "f ` T \<subseteq> S"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1438
          "continuous_on T g1"  "g1 ` T \<subseteq> c"  "\<And>x. x \<in> T \<Longrightarrow> f x = p(g1 x)"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1439
          "continuous_on T g2"  "g2 ` T \<subseteq> c"  "\<And>x. x \<in> T \<Longrightarrow> f x = p(g2 x)"
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1440
          "connected T"  "a \<in> T"   "x \<in> T"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1441
   shows "g1 x = g2 x"
64773
223b2ebdda79 Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1442
using covering_space_lift_unique_gen [of c p S] in_components_self assms ex_in_conv by blast
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63130
diff changeset
  1443
64791
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1444
lemma covering_space_locally:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1445
  fixes p :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1446
  assumes loc: "locally \<phi> C" and cov: "covering_space C p S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1447
      and pim: "\<And>T. \<lbrakk>T \<subseteq> C; \<phi> T\<rbrakk> \<Longrightarrow> \<psi>(p ` T)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1448
    shows "locally \<psi> S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1449
proof -
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1450
  have "locally \<psi> (p ` C)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1451
    apply (rule locally_open_map_image [OF loc])
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1452
    using cov covering_space_imp_continuous apply blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1453
    using cov covering_space_imp_surjective covering_space_open_map apply blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1454
    by (simp add: pim)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1455
  then show ?thesis
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1456
    using covering_space_imp_surjective [OF cov] by metis
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1457
qed
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1458
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1459
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1460
proposition covering_space_locally_eq:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1461
  fixes p :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1462
  assumes cov: "covering_space C p S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1463
      and pim: "\<And>T. \<lbrakk>T \<subseteq> C; \<phi> T\<rbrakk> \<Longrightarrow> \<psi>(p ` T)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1464
      and qim: "\<And>q U. \<lbrakk>U \<subseteq> S; continuous_on U q; \<psi> U\<rbrakk> \<Longrightarrow> \<phi>(q ` U)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1465
    shows "locally \<psi> S \<longleftrightarrow> locally \<phi> C"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1466
         (is "?lhs = ?rhs")
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1467
proof
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1468
  assume L: ?lhs
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1469
  show ?rhs
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1470
  proof (rule locallyI)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1471
    fix V x
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1472
    assume V: "openin (subtopology euclidean C) V" and "x \<in> V"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1473
    have "p x \<in> p ` C"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1474
      by (metis IntE V \<open>x \<in> V\<close> imageI openin_open)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1475
    then obtain T \<V> where "p x \<in> T"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1476
                      and opeT: "openin (subtopology euclidean S) T"
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1477
                      and veq: "\<Union>\<V> = C \<inter> p -` T"
64791
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1478
                      and ope: "\<forall>U\<in>\<V>. openin (subtopology euclidean C) U"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1479
                      and hom: "\<forall>U\<in>\<V>. \<exists>q. homeomorphism U T p q"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1480
      using cov unfolding covering_space_def by (blast intro: that)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1481
    have "x \<in> \<Union>\<V>"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1482
      using V veq \<open>p x \<in> T\<close> \<open>x \<in> V\<close> openin_imp_subset by fastforce
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1483
    then obtain U where "x \<in> U" "U \<in> \<V>"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1484
      by blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1485
    then obtain q where opeU: "openin (subtopology euclidean C) U" and q: "homeomorphism U T p q"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1486
      using ope hom by blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1487
    with V have "openin (subtopology euclidean C) (U \<inter> V)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1488
      by blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1489
    then have UV: "openin (subtopology euclidean S) (p ` (U \<inter> V))"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1490
      using cov covering_space_open_map by blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1491
    obtain W W' where opeW: "openin (subtopology euclidean S) W" and "\<psi> W'" "p x \<in> W" "W \<subseteq> W'" and W'sub: "W' \<subseteq> p ` (U \<inter> V)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1492
      using locallyE [OF L UV] \<open>x \<in> U\<close> \<open>x \<in> V\<close> by blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1493
    then have "W \<subseteq> T"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1494
      by (metis Int_lower1 q homeomorphism_image1 image_Int_subset order_trans)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1495
    show "\<exists>U Z. openin (subtopology euclidean C) U \<and>
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1496
                 \<phi> Z \<and> x \<in> U \<and> U \<subseteq> Z \<and> Z \<subseteq> V"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1497
    proof (intro exI conjI)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1498
      have "openin (subtopology euclidean T) W"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1499
        by (meson opeW opeT openin_imp_subset openin_subset_trans \<open>W \<subseteq> T\<close>)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1500
      then have "openin (subtopology euclidean U) (q ` W)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1501
        by (meson homeomorphism_imp_open_map homeomorphism_symD q)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1502
      then show "openin (subtopology euclidean C) (q ` W)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1503
        using opeU openin_trans by blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1504
      show "\<phi> (q ` W')"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1505
        by (metis (mono_tags, lifting) Int_subset_iff UV W'sub \<open>\<psi> W'\<close> continuous_on_subset dual_order.trans homeomorphism_def image_Int_subset openin_imp_subset q qim)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1506
      show "x \<in> q ` W"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1507
        by (metis \<open>p x \<in> W\<close> \<open>x \<in> U\<close> homeomorphism_def imageI q)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1508
      show "q ` W \<subseteq> q ` W'"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1509
        using \<open>W \<subseteq> W'\<close> by blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1510
      have "W' \<subseteq> p ` V"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1511
        using W'sub by blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1512
      then show "q ` W' \<subseteq> V"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1513
        using W'sub homeomorphism_apply1 [OF q] by auto
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1514
      qed
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1515
  qed
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1516
next
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1517
  assume ?rhs
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1518
  then show ?lhs
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1519
    using cov covering_space_locally pim by blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1520
qed
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1521
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1522
lemma covering_space_locally_compact_eq:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1523
  fixes p :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1524
  assumes "covering_space C p S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1525
  shows "locally compact S \<longleftrightarrow> locally compact C"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1526
  apply (rule covering_space_locally_eq [OF assms])
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1527
   apply (meson assms compact_continuous_image continuous_on_subset covering_space_imp_continuous)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1528
  using compact_continuous_image by blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1529
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1530
lemma covering_space_locally_connected_eq:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1531
  fixes p :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1532
  assumes "covering_space C p S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1533
    shows "locally connected S \<longleftrightarrow> locally connected C"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1534
  apply (rule covering_space_locally_eq [OF assms])
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1535
   apply (meson connected_continuous_image assms continuous_on_subset covering_space_imp_continuous)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1536
  using connected_continuous_image by blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1537
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1538
lemma covering_space_locally_path_connected_eq:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1539
  fixes p :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1540
  assumes "covering_space C p S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1541
    shows "locally path_connected S \<longleftrightarrow> locally path_connected C"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1542
  apply (rule covering_space_locally_eq [OF assms])
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1543
   apply (meson path_connected_continuous_image assms continuous_on_subset covering_space_imp_continuous)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1544
  using path_connected_continuous_image by blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1545
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1546
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1547
lemma covering_space_locally_compact:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1548
  fixes p :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1549
  assumes "locally compact C" "covering_space C p S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1550
  shows "locally compact S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1551
  using assms covering_space_locally_compact_eq by blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1552
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1553
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1554
lemma covering_space_locally_connected:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1555
  fixes p :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1556
  assumes "locally connected C" "covering_space C p S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1557
  shows "locally connected S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1558
  using assms covering_space_locally_connected_eq by blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1559
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1560
lemma covering_space_locally_path_connected:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1561
  fixes p :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1562
  assumes "locally path_connected C" "covering_space C p S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1563
  shows "locally path_connected S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1564
  using assms covering_space_locally_path_connected_eq by blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  1565
64792
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1566
proposition covering_space_lift_homotopy:
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1567
  fixes p :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1568
    and h :: "real \<times> 'c::real_normed_vector \<Rightarrow> 'b"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1569
  assumes cov: "covering_space C p S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1570
      and conth: "continuous_on ({0..1} \<times> U) h"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1571
      and him: "h ` ({0..1} \<times> U) \<subseteq> S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1572
      and heq: "\<And>y. y \<in> U \<Longrightarrow> h (0,y) = p(f y)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1573
      and contf: "continuous_on U f" and fim: "f ` U \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1574
    obtains k where "continuous_on ({0..1} \<times> U) k"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1575
                    "k ` ({0..1} \<times> U) \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1576
                    "\<And>y. y \<in> U \<Longrightarrow> k(0, y) = f y"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1577
                    "\<And>z. z \<in> {0..1} \<times> U \<Longrightarrow> h z = p(k z)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1578
proof -
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1579
  have "\<exists>V k. openin (subtopology euclidean U) V \<and> y \<in> V \<and>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1580
              continuous_on ({0..1} \<times> V) k \<and> k ` ({0..1} \<times> V) \<subseteq> C \<and>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1581
              (\<forall>z \<in> V. k(0, z) = f z) \<and> (\<forall>z \<in> {0..1} \<times> V. h z = p(k z))"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1582
        if "y \<in> U" for y
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1583
  proof -
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1584
    obtain UU where UU: "\<And>s. s \<in> S \<Longrightarrow> s \<in> (UU s) \<and> openin (subtopology euclidean S) (UU s) \<and>
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1585
                                        (\<exists>\<V>. \<Union>\<V> = C \<inter> p -` UU s \<and>
64792
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1586
                                            (\<forall>U \<in> \<V>. openin (subtopology euclidean C) U) \<and>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1587
                                            pairwise disjnt \<V> \<and>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1588
                                            (\<forall>U \<in> \<V>. \<exists>q. homeomorphism U (UU s) p q))"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1589
      using cov unfolding covering_space_def by (metis (mono_tags))
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1590
    then have ope: "\<And>s. s \<in> S \<Longrightarrow> s \<in> (UU s) \<and> openin (subtopology euclidean S) (UU s)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1591
      by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1592
    have "\<exists>k n i. open k \<and> open n \<and>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1593
                  t \<in> k \<and> y \<in> n \<and> i \<in> S \<and> h ` (({0..1} \<inter> k) \<times> (U \<inter> n)) \<subseteq> UU i" if "t \<in> {0..1}" for t
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1594
    proof -
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1595
      have hinS: "h (t, y) \<in> S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1596
        using \<open>y \<in> U\<close> him that by blast
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1597
      then have "(t,y) \<in> ({0..1} \<times> U) \<inter> h -` UU(h(t, y))"
64792
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1598
        using \<open>y \<in> U\<close> \<open>t \<in> {0..1}\<close>  by (auto simp: ope)
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1599
      moreover have ope_01U: "openin (subtopology euclidean ({0..1} \<times> U)) (({0..1} \<times> U) \<inter> h -` UU(h(t, y)))"
64792
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1600
        using hinS ope continuous_on_open_gen [OF him] conth by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1601
      ultimately obtain V W where opeV: "open V" and "t \<in> {0..1} \<inter> V" "t \<in> {0..1} \<inter> V"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1602
                              and opeW: "open W" and "y \<in> U" "y \<in> W"
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1603
                              and VW: "({0..1} \<inter> V) \<times> (U \<inter> W)  \<subseteq> (({0..1} \<times> U) \<inter> h -` UU(h(t, y)))"
64792
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1604
        by (rule Times_in_interior_subtopology) (auto simp: openin_open)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1605
      then show ?thesis
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1606
        using hinS by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1607
    qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1608
    then obtain K NN X where
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1609
              K: "\<And>t. t \<in> {0..1} \<Longrightarrow> open (K t)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1610
          and NN: "\<And>t. t \<in> {0..1} \<Longrightarrow> open (NN t)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1611
          and inUS: "\<And>t. t \<in> {0..1} \<Longrightarrow> t \<in> K t \<and> y \<in> NN t \<and> X t \<in> S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1612
          and him: "\<And>t. t \<in> {0..1} \<Longrightarrow> h ` (({0..1} \<inter> K t) \<times> (U \<inter> NN t)) \<subseteq> UU (X t)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1613
    by (metis (mono_tags))
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1614
    obtain \<T> where "\<T> \<subseteq> ((\<lambda>i. K i \<times> NN i)) ` {0..1}" "finite \<T>" "{0::real..1} \<times> {y} \<subseteq> \<Union>\<T>"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1615
    proof (rule compactE)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1616
      show "compact ({0::real..1} \<times> {y})"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1617
        by (simp add: compact_Times)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1618
      show "{0..1} \<times> {y} \<subseteq> (\<Union>i\<in>{0..1}. K i \<times> NN i)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1619
        using K inUS by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1620
      show "\<And>B. B \<in> (\<lambda>i. K i \<times> NN i) ` {0..1} \<Longrightarrow> open B"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1621
        using K NN by (auto simp: open_Times)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1622
    qed blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1623
    then obtain tk where "tk \<subseteq> {0..1}" "finite tk"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1624
                     and tk: "{0::real..1} \<times> {y} \<subseteq> (\<Union>i \<in> tk. K i \<times> NN i)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1625
      by (metis (no_types, lifting) finite_subset_image)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1626
    then have "tk \<noteq> {}"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1627
      by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1628
    define n where "n = INTER tk NN"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1629
    have "y \<in> n" "open n"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1630
      using inUS NN \<open>tk \<subseteq> {0..1}\<close> \<open>finite tk\<close>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1631
      by (auto simp: n_def open_INT subset_iff)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1632
    obtain \<delta> where "0 < \<delta>" and \<delta>: "\<And>T. \<lbrakk>T \<subseteq> {0..1}; diameter T < \<delta>\<rbrakk> \<Longrightarrow> \<exists>B\<in>K ` tk. T \<subseteq> B"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1633
    proof (rule Lebesgue_number_lemma [of "{0..1}" "K ` tk"])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1634
      show "K ` tk \<noteq> {}"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1635
        using \<open>tk \<noteq> {}\<close> by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1636
      show "{0..1} \<subseteq> UNION tk K"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1637
        using tk by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1638
      show "\<And>B. B \<in> K ` tk \<Longrightarrow> open B"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1639
        using \<open>tk \<subseteq> {0..1}\<close> K by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1640
    qed auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1641
    obtain N::nat where N: "N > 1 / \<delta>"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1642
      using reals_Archimedean2 by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1643
    then have "N > 0"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1644
      using \<open>0 < \<delta>\<close> order.asym by force
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1645
    have *: "\<exists>V k. openin (subtopology euclidean U) V \<and> y \<in> V \<and>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1646
                   continuous_on ({0..of_nat n / N} \<times> V) k \<and>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1647
                   k ` ({0..of_nat n / N} \<times> V) \<subseteq> C \<and>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1648
                   (\<forall>z\<in>V. k (0, z) = f z) \<and>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1649
                   (\<forall>z\<in>{0..of_nat n / N} \<times> V. h z = p (k z))" if "n \<le> N" for n
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1650
      using that
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1651
    proof (induction n)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1652
      case 0
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1653
      show ?case
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1654
        apply (rule_tac x=U in exI)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1655
        apply (rule_tac x="f \<circ> snd" in exI)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1656
        apply (intro conjI \<open>y \<in> U\<close> continuous_intros continuous_on_subset [OF contf])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1657
        using fim  apply (auto simp: heq)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1658
        done
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1659
    next
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1660
      case (Suc n)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1661
      then obtain V k where opeUV: "openin (subtopology euclidean U) V"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1662
                        and "y \<in> V"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1663
                        and contk: "continuous_on ({0..real n / real N} \<times> V) k"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1664
                        and kim: "k ` ({0..real n / real N} \<times> V) \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1665
                        and keq: "\<And>z. z \<in> V \<Longrightarrow> k (0, z) = f z"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1666
                        and heq: "\<And>z. z \<in> {0..real n / real N} \<times> V \<Longrightarrow> h z = p (k z)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1667
        using Suc_leD by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1668
      have "n \<le> N"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1669
        using Suc.prems by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1670
      obtain t where "t \<in> tk" and t: "{real n / real N .. (1 + real n) / real N} \<subseteq> K t"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1671
      proof (rule bexE [OF \<delta>])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1672
        show "{real n / real N .. (1 + real n) / real N} \<subseteq> {0..1}"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1673
          using Suc.prems by (auto simp: divide_simps algebra_simps)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1674
        show diameter_less: "diameter {real n / real N .. (1 + real n) / real N} < \<delta>"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1675
          using \<open>0 < \<delta>\<close> N by (auto simp: divide_simps algebra_simps)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1676
      qed blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1677
      have t01: "t \<in> {0..1}"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1678
        using \<open>t \<in> tk\<close> \<open>tk \<subseteq> {0..1}\<close> by blast
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1679
      obtain \<V> where \<V>: "\<Union>\<V> = C \<inter> p -` UU (X t)"
64792
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1680
                 and opeC: "\<And>U. U \<in> \<V> \<Longrightarrow> openin (subtopology euclidean C) U"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1681
                 and "pairwise disjnt \<V>"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1682
                 and homuu: "\<And>U. U \<in> \<V> \<Longrightarrow> \<exists>q. homeomorphism U (UU (X t)) p q"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1683
        using inUS [OF t01] UU by meson
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1684
      have n_div_N_in: "real n / real N \<in> {real n / real N .. (1 + real n) / real N}"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1685
        using N by (auto simp: divide_simps algebra_simps)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1686
      with t have nN_in_kkt: "real n / real N \<in> K t"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1687
        by blast
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1688
      have "k (real n / real N, y) \<in> C \<inter> p -` UU (X t)"
64792
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1689
      proof (simp, rule conjI)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1690
        show "k (real n / real N, y) \<in> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1691
          using \<open>y \<in> V\<close> kim keq by force
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1692
        have "p (k (real n / real N, y)) = h (real n / real N, y)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1693
          by (simp add: \<open>y \<in> V\<close> heq)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1694
        also have "... \<in> h ` (({0..1} \<inter> K t) \<times> (U \<inter> NN t))"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1695
          apply (rule imageI)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1696
           using \<open>y \<in> V\<close> t01 \<open>n \<le> N\<close>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1697
          apply (simp add: nN_in_kkt \<open>y \<in> U\<close> inUS divide_simps)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1698
          done
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1699
        also have "... \<subseteq> UU (X t)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1700
          using him t01 by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1701
        finally show "p (k (real n / real N, y)) \<in> UU (X t)" .
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1702
      qed
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1703
      with \<V> have "k (real n / real N, y) \<in> \<Union>\<V>"
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1704
        by blast
64792
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1705
      then obtain W where W: "k (real n / real N, y) \<in> W" and "W \<in> \<V>"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1706
        by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1707
      then obtain p' where opeC': "openin (subtopology euclidean C) W"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1708
                       and hom': "homeomorphism W (UU (X t)) p p'"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1709
        using homuu opeC by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1710
      then have "W \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1711
        using openin_imp_subset by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1712
      define W' where "W' = UU(X t)"
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1713
      have opeVW: "openin (subtopology euclidean V) (V \<inter> (k \<circ> Pair (n / N)) -` W)"
64792
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1714
        apply (rule continuous_openin_preimage [OF _ _ opeC'])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1715
         apply (intro continuous_intros continuous_on_subset [OF contk])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1716
        using kim apply (auto simp: \<open>y \<in> V\<close> W)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1717
        done
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1718
      obtain N' where opeUN': "openin (subtopology euclidean U) N'"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1719
                  and "y \<in> N'" and kimw: "k ` ({(real n / real N)} \<times> N') \<subseteq> W"
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  1720
        apply (rule_tac N' = "(V \<inter> (k \<circ> Pair (n / N)) -` W)" in that)
64792
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1721
        apply (fastforce simp:  \<open>y \<in> V\<close> W intro!: openin_trans [OF opeVW opeUV])+
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1722
        done
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1723
      obtain Q Q' where opeUQ: "openin (subtopology euclidean U) Q"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1724
                    and cloUQ': "closedin (subtopology euclidean U) Q'"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1725
                    and "y \<in> Q" "Q \<subseteq> Q'"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1726
                    and Q': "Q' \<subseteq> (U \<inter> NN(t)) \<inter> N' \<inter> V"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1727
      proof -
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1728
        obtain VO VX where "open VO" "open VX" and VO: "V = U \<inter> VO" and VX: "N' = U \<inter> VX"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1729
          using opeUV opeUN' by (auto simp: openin_open)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1730
        then have "open (NN(t) \<inter> VO \<inter> VX)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1731
          using NN t01 by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1732
        then obtain e where "e > 0" and e: "cball y e \<subseteq> NN(t) \<inter> VO \<inter> VX"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1733
          by (metis Int_iff \<open>N' = U \<inter> VX\<close> \<open>V = U \<inter> VO\<close> \<open>y \<in> N'\<close> \<open>y \<in> V\<close> inUS open_contains_cball t01)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1734
        show ?thesis
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1735
        proof
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1736
          show "openin (subtopology euclidean U) (U \<inter> ball y e)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1737
            by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1738
          show "closedin (subtopology euclidean U) (U \<inter> cball y e)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1739
            using e by (auto simp: closedin_closed)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1740
        qed (use \<open>y \<in> U\<close> \<open>e > 0\<close> VO VX e in auto)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1741
      qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1742
      then have "y \<in> Q'" "Q \<subseteq> (U \<inter> NN(t)) \<inter> N' \<inter> V"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1743
        by blast+
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1744
      have neq: "{0..real n / real N} \<union> {real n / real N..(1 + real n) / real N} = {0..(1 + real n) / real N}"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1745
        apply (auto simp: divide_simps)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1746
        by (metis mult_zero_left of_nat_0_le_iff of_nat_0_less_iff order_trans real_mult_le_cancel_iff1)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1747
      then have neqQ': "{0..real n / real N} \<times> Q' \<union> {real n / real N..(1 + real n) / real N} \<times> Q' = {0..(1 + real n) / real N} \<times> Q'"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1748
        by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1749
      have cont: "continuous_on ({0..(1 + real n) / real N} \<times> Q')
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1750
        (\<lambda>x. if x \<in> {0..real n / real N} \<times> Q' then k x else (p' \<circ> h) x)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1751
        unfolding neqQ' [symmetric]
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1752
      proof (rule continuous_on_cases_local, simp_all add: neqQ' del: comp_apply)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1753
        show "closedin (subtopology euclidean ({0..(1 + real n) / real N} \<times> Q'))
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1754
                       ({0..real n / real N} \<times> Q')"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1755
          apply (simp add: closedin_closed)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1756
          apply (rule_tac x="{0 .. real n / real N} \<times> UNIV" in exI)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1757
          using n_div_N_in apply (auto simp: closed_Times)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1758
          done
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1759
        show "closedin (subtopology euclidean ({0..(1 + real n) / real N} \<times> Q'))
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1760
                       ({real n / real N..(1 + real n) / real N} \<times> Q')"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1761
          apply (simp add: closedin_closed)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1762
          apply (rule_tac x="{real n / real N .. (1 + real n) / real N} \<times> UNIV" in exI)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1763
          apply (auto simp: closed_Times)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1764
          by (meson divide_nonneg_nonneg of_nat_0_le_iff order_trans)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1765
        show "continuous_on ({0..real n / real N} \<times> Q') k"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1766
          apply (rule continuous_on_subset [OF contk])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1767
          using Q' by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1768
        have "continuous_on ({real n / real N..(1 + real n) / real N} \<times> Q') h"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1769
        proof (rule continuous_on_subset [OF conth])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1770
          show "{real n / real N..(1 + real n) / real N} \<times> Q' \<subseteq> {0..1} \<times> U"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1771
            using \<open>N > 0\<close>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1772
            apply auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1773
              apply (meson divide_nonneg_nonneg of_nat_0_le_iff order_trans)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1774
            using Suc.prems order_trans apply fastforce
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1775
            apply (metis IntE  cloUQ' closedin_closed)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1776
            done
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1777
        qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1778
        moreover have "continuous_on (h ` ({real n / real N..(1 + real n) / real N} \<times> Q')) p'"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1779
        proof (rule continuous_on_subset [OF homeomorphism_cont2 [OF hom']])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1780
          have "h ` ({real n / real N..(1 + real n) / real N} \<times> Q') \<subseteq> h ` (({0..1} \<inter> K t) \<times> (U \<inter> NN t))"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1781
            apply (rule image_mono)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1782
            using \<open>0 < \<delta>\<close> \<open>N > 0\<close> Suc.prems apply auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1783
              apply (meson divide_nonneg_nonneg of_nat_0_le_iff order_trans)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1784
            using Suc.prems order_trans apply fastforce
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1785
            using t Q' apply auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1786
            done
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1787
          with him show "h ` ({real n / real N..(1 + real n) / real N} \<times> Q') \<subseteq> UU (X t)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1788
            using t01 by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1789
        qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1790
        ultimately show "continuous_on ({real n / real N..(1 + real n) / real N} \<times> Q') (p' \<circ> h)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1791
          by (rule continuous_on_compose)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1792
        have "k (real n / real N, b) = p' (h (real n / real N, b))" if "b \<in> Q'" for b
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1793
        proof -
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1794
          have "k (real n / real N, b) \<in> W"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1795
            using that Q' kimw  by force
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1796
          then have "k (real n / real N, b) = p' (p (k (real n / real N, b)))"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1797
            by (simp add:  homeomorphism_apply1 [OF hom'])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1798
          then show ?thesis
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1799
            using Q' that by (force simp: heq)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1800
        qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1801
        then show "\<And>x. x \<in> {real n / real N..(1 + real n) / real N} \<times> Q' \<and>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1802
                  x \<in> {0..real n / real N} \<times> Q' \<Longrightarrow> k x = (p' \<circ> h) x"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1803
          by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1804
      qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1805
      have h_in_UU: "h (x, y) \<in> UU (X t)" if "y \<in> Q" "\<not> x \<le> real n / real N" "0 \<le> x" "x \<le> (1 + real n) / real N" for x y
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1806
      proof -
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1807
        have "x \<le> 1"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1808
          using Suc.prems that order_trans by force
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1809
        moreover have "x \<in> K t"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1810
          by (meson atLeastAtMost_iff le_less not_le subset_eq t that)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1811
        moreover have "y \<in> U"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1812
          using \<open>y \<in> Q\<close> opeUQ openin_imp_subset by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1813
        moreover have "y \<in> NN t"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1814
          using Q' \<open>Q \<subseteq> Q'\<close> \<open>y \<in> Q\<close> by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1815
        ultimately have "(x, y) \<in> (({0..1} \<inter> K t) \<times> (U \<inter> NN t))"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1816
          using that by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1817
        then have "h (x, y) \<in> h ` (({0..1} \<inter> K t) \<times> (U \<inter> NN t))"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1818
          by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1819
        also have "... \<subseteq> UU (X t)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1820
          by (metis him t01)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1821
        finally show ?thesis .
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1822
      qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1823
      let ?k = "(\<lambda>x. if x \<in> {0..real n / real N} \<times> Q' then k x else (p' \<circ> h) x)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1824
      show ?case
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1825
      proof (intro exI conjI)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1826
        show "continuous_on ({0..real (Suc n) / real N} \<times> Q) ?k"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1827
          apply (rule continuous_on_subset [OF cont])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1828
          using \<open>Q \<subseteq> Q'\<close> by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1829
        have "\<And>a b. \<lbrakk>a \<le> real n / real N; b \<in> Q'; 0 \<le> a\<rbrakk> \<Longrightarrow> k (a, b) \<in> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1830
          using kim Q' by force
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1831
        moreover have "\<And>a b. \<lbrakk>b \<in> Q; 0 \<le> a; a \<le> (1 + real n) / real N; \<not> a \<le> real n / real N\<rbrakk> \<Longrightarrow> p' (h (a, b)) \<in> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1832
          apply (rule \<open>W \<subseteq> C\<close> [THEN subsetD])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1833
          using homeomorphism_image2 [OF hom', symmetric]  h_in_UU  Q' \<open>Q \<subseteq> Q'\<close> \<open>W \<subseteq> C\<close>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1834
          apply auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1835
          done
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1836
        ultimately show "?k ` ({0..real (Suc n) / real N} \<times> Q) \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1837
          using Q' \<open>Q \<subseteq> Q'\<close> by force
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1838
        show "\<forall>z\<in>Q. ?k (0, z) = f z"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1839
          using Q' keq  \<open>Q \<subseteq> Q'\<close> by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1840
        show "\<forall>z \<in> {0..real (Suc n) / real N} \<times> Q. h z = p(?k z)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1841
          using \<open>Q \<subseteq> U \<inter> NN t \<inter> N' \<inter> V\<close> heq apply clarsimp
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1842
          using h_in_UU Q' \<open>Q \<subseteq> Q'\<close> apply (auto simp: homeomorphism_apply2 [OF hom', symmetric])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1843
          done
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1844
        qed (auto simp: \<open>y \<in> Q\<close> opeUQ)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1845
    qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1846
    show ?thesis
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1847
      using*[OF order_refl] N \<open>0 < \<delta>\<close> by (simp add: split: if_split_asm)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1848
  qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1849
  then obtain V fs where opeV: "\<And>y. y \<in> U \<Longrightarrow> openin (subtopology euclidean U) (V y)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1850
          and V: "\<And>y. y \<in> U \<Longrightarrow> y \<in> V y"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1851
          and contfs: "\<And>y. y \<in> U \<Longrightarrow> continuous_on ({0..1} \<times> V y) (fs y)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1852
          and *: "\<And>y. y \<in> U \<Longrightarrow> (fs y) ` ({0..1} \<times> V y) \<subseteq> C \<and>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1853
                            (\<forall>z \<in> V y. fs y (0, z) = f z) \<and>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1854
                            (\<forall>z \<in> {0..1} \<times> V y. h z = p(fs y z))"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1855
    by (metis (mono_tags))
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1856
  then have VU: "\<And>y. y \<in> U \<Longrightarrow> V y \<subseteq> U"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1857
    by (meson openin_imp_subset)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1858
  obtain k where contk: "continuous_on ({0..1} \<times> U) k"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1859
             and k: "\<And>x i. \<lbrakk>i \<in> U; x \<in> {0..1} \<times> U \<inter> {0..1} \<times> V i\<rbrakk> \<Longrightarrow> k x = fs i x"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1860
  proof (rule pasting_lemma_exists)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1861
    show "{0..1} \<times> U \<subseteq> (\<Union>i\<in>U. {0..1} \<times> V i)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1862
      apply auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1863
      using V by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1864
    show "\<And>i. i \<in> U \<Longrightarrow> openin (subtopology euclidean ({0..1} \<times> U)) ({0..1} \<times> V i)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1865
      by (simp add: opeV openin_Times)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1866
    show "\<And>i. i \<in> U \<Longrightarrow> continuous_on ({0..1} \<times> V i) (fs i)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1867
      using contfs by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1868
    show "fs i x = fs j x"  if "i \<in> U" "j \<in> U" and x: "x \<in> {0..1} \<times> U \<inter> {0..1} \<times> V i \<inter> {0..1} \<times> V j"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1869
         for i j x
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1870
    proof -
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1871
      obtain u y where "x = (u, y)" "y \<in> V i" "y \<in> V j" "0 \<le> u" "u \<le> 1"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1872
        using x by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1873
      show ?thesis
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1874
      proof (rule covering_space_lift_unique [OF cov, of _ "(0,y)" _ "{0..1} \<times> {y}" h])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1875
        show "fs i (0, y) = fs j (0, y)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1876
          using*V by (simp add: \<open>y \<in> V i\<close> \<open>y \<in> V j\<close> that)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1877
        show conth_y: "continuous_on ({0..1} \<times> {y}) h"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1878
          apply (rule continuous_on_subset [OF conth])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1879
          using VU \<open>y \<in> V j\<close> that by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1880
        show "h ` ({0..1} \<times> {y}) \<subseteq> S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1881
          using \<open>y \<in> V i\<close> assms(3) VU that by fastforce
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1882
        show "continuous_on ({0..1} \<times> {y}) (fs i)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1883
          using continuous_on_subset [OF contfs] \<open>i \<in> U\<close>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1884
          by (simp add: \<open>y \<in> V i\<close> subset_iff)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1885
        show "fs i ` ({0..1} \<times> {y}) \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1886
          using "*" \<open>y \<in> V i\<close> \<open>i \<in> U\<close> by fastforce
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1887
        show "\<And>x. x \<in> {0..1} \<times> {y} \<Longrightarrow> h x = p (fs i x)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1888
          using "*" \<open>y \<in> V i\<close> \<open>i \<in> U\<close> by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1889
        show "continuous_on ({0..1} \<times> {y}) (fs j)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1890
          using continuous_on_subset [OF contfs] \<open>j \<in> U\<close>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1891
          by (simp add: \<open>y \<in> V j\<close> subset_iff)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1892
        show "fs j ` ({0..1} \<times> {y}) \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1893
          using "*" \<open>y \<in> V j\<close> \<open>j \<in> U\<close> by fastforce
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1894
        show "\<And>x. x \<in> {0..1} \<times> {y} \<Longrightarrow> h x = p (fs j x)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1895
          using "*" \<open>y \<in> V j\<close> \<open>j \<in> U\<close> by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1896
        show "connected ({0..1::real} \<times> {y})"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1897
          using connected_Icc connected_Times connected_sing by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1898
        show "(0, y) \<in> {0..1::real} \<times> {y}"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1899
          by force
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1900
        show "x \<in> {0..1} \<times> {y}"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1901
          using \<open>x = (u, y)\<close> x by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1902
      qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1903
    qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1904
  qed blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1905
  show ?thesis
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1906
  proof
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1907
    show "k ` ({0..1} \<times> U) \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1908
      using V*k VU by fastforce
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1909
    show "\<And>y. y \<in> U \<Longrightarrow> k (0, y) = f y"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1910
      by (simp add: V*k)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1911
    show "\<And>z. z \<in> {0..1} \<times> U \<Longrightarrow> h z = p (k z)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1912
      using V*k by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1913
  qed (auto simp: contk)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1914
qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1915
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1916
corollary covering_space_lift_homotopy_alt:
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1917
  fixes p :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1918
    and h :: "'c::real_normed_vector \<times> real \<Rightarrow> 'b"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1919
  assumes cov: "covering_space C p S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1920
      and conth: "continuous_on (U \<times> {0..1}) h"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1921
      and him: "h ` (U \<times> {0..1}) \<subseteq> S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1922
      and heq: "\<And>y. y \<in> U \<Longrightarrow> h (y,0) = p(f y)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1923
      and contf: "continuous_on U f" and fim: "f ` U \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1924
  obtains k where "continuous_on (U \<times> {0..1}) k"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1925
                  "k ` (U \<times> {0..1}) \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1926
                  "\<And>y. y \<in> U \<Longrightarrow> k(y, 0) = f y"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1927
                  "\<And>z. z \<in> U \<times> {0..1} \<Longrightarrow> h z = p(k z)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1928
proof -
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1929
  have "continuous_on ({0..1} \<times> U) (h \<circ> (\<lambda>z. (snd z, fst z)))"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1930
    by (intro continuous_intros continuous_on_subset [OF conth]) auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1931
  then obtain k where contk: "continuous_on ({0..1} \<times> U) k"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1932
                  and kim:  "k ` ({0..1} \<times> U) \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1933
                  and k0: "\<And>y. y \<in> U \<Longrightarrow> k(0, y) = f y"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1934
                  and heqp: "\<And>z. z \<in> {0..1} \<times> U \<Longrightarrow> (h \<circ> (\<lambda>z. Pair (snd z) (fst z))) z = p(k z)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1935
    apply (rule covering_space_lift_homotopy [OF cov _ _ _ contf fim])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1936
    using him  by (auto simp: contf heq)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1937
  show ?thesis
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1938
    apply (rule_tac k="k \<circ> (\<lambda>z. Pair (snd z) (fst z))" in that)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1939
       apply (intro continuous_intros continuous_on_subset [OF contk])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1940
    using kim heqp apply (auto simp: k0)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1941
    done
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1942
qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1943
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1944
corollary covering_space_lift_homotopic_function:
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1945
  fixes p :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" and g:: "'c::real_normed_vector \<Rightarrow> 'a"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1946
  assumes cov: "covering_space C p S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1947
      and contg: "continuous_on U g"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1948
      and gim: "g ` U \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1949
      and pgeq: "\<And>y. y \<in> U \<Longrightarrow> p(g y) = f y"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1950
      and hom: "homotopic_with (\<lambda>x. True) U S f f'"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1951
    obtains g' where "continuous_on U g'" "image g' U \<subseteq> C" "\<And>y. y \<in> U \<Longrightarrow> p(g' y) = f' y"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1952
proof -
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1953
  obtain h where conth: "continuous_on ({0..1::real} \<times> U) h"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1954
             and him: "h ` ({0..1} \<times> U) \<subseteq> S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1955
             and h0:  "\<And>x. h(0, x) = f x"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1956
             and h1: "\<And>x. h(1, x) = f' x"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1957
    using hom by (auto simp: homotopic_with_def)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1958
  have "\<And>y. y \<in> U \<Longrightarrow> h (0, y) = p (g y)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1959
    by (simp add: h0 pgeq)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1960
  then obtain k where contk: "continuous_on ({0..1} \<times> U) k"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1961
                  and kim: "k ` ({0..1} \<times> U) \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1962
                  and k0: "\<And>y. y \<in> U \<Longrightarrow> k(0, y) = g y"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1963
                  and heq: "\<And>z. z \<in> {0..1} \<times> U \<Longrightarrow> h z = p(k z)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1964
    using covering_space_lift_homotopy [OF cov conth him _ contg gim] by metis
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1965
  show ?thesis
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1966
  proof
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1967
    show "continuous_on U (k \<circ> Pair 1)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1968
      by (meson contk atLeastAtMost_iff continuous_on_o_Pair order_refl zero_le_one)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1969
    show "(k \<circ> Pair 1) ` U \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1970
      using kim by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1971
    show "\<And>y. y \<in> U \<Longrightarrow> p ((k \<circ> Pair 1) y) = f' y"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1972
      by (auto simp: h1 heq [symmetric])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1973
  qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1974
qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1975
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1976
corollary covering_space_lift_inessential_function:
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1977
  fixes p :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector" and U :: "'c::real_normed_vector set"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1978
  assumes cov: "covering_space C p S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1979
      and hom: "homotopic_with (\<lambda>x. True) U S f (\<lambda>x. a)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1980
  obtains g where "continuous_on U g" "g ` U \<subseteq> C" "\<And>y. y \<in> U \<Longrightarrow> p(g y) = f y"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1981
proof (cases "U = {}")
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1982
  case True
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1983
  then show ?thesis
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1984
    using that continuous_on_empty by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1985
next
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1986
  case False
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1987
  then obtain b where b: "b \<in> C" "p b = a"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1988
    using covering_space_imp_surjective [OF cov] homotopic_with_imp_subset2 [OF hom]
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1989
    by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1990
  then have gim: "(\<lambda>y. b) ` U \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1991
    by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1992
  show ?thesis
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1993
    apply (rule covering_space_lift_homotopic_function
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1994
                  [OF cov continuous_on_const gim _ homotopic_with_symD [OF hom]])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1995
    using b that apply auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1996
    done
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1997
qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1998
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  1999
subsection\<open> Lifting of general functions to covering space\<close>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2000
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2001
proposition covering_space_lift_path_strong:
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2002
  fixes p :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2003
    and f :: "'c::real_normed_vector \<Rightarrow> 'b"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2004
  assumes cov: "covering_space C p S" and "a \<in> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2005
      and "path g" and pag: "path_image g \<subseteq> S" and pas: "pathstart g = p a"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2006
    obtains h where "path h" "path_image h \<subseteq> C" "pathstart h = a"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2007
                and "\<And>t. t \<in> {0..1} \<Longrightarrow> p(h t) = g t"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2008
proof -
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2009
  obtain k:: "real \<times> 'c \<Rightarrow> 'a"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2010
    where contk: "continuous_on ({0..1} \<times> {undefined}) k"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2011
      and kim: "k ` ({0..1} \<times> {undefined}) \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2012
      and k0:  "k (0, undefined) = a"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2013
      and pk: "\<And>z. z \<in> {0..1} \<times> {undefined} \<Longrightarrow> p(k z) = (g \<circ> fst) z"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2014
  proof (rule covering_space_lift_homotopy [OF cov, of "{undefined}" "g \<circ> fst"])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2015
    show "continuous_on ({0..1::real} \<times> {undefined::'c}) (g \<circ> fst)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2016
      apply (intro continuous_intros)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2017
      using \<open>path g\<close> by (simp add: path_def)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2018
    show "(g \<circ> fst) ` ({0..1} \<times> {undefined}) \<subseteq> S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2019
      using pag by (auto simp: path_image_def)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2020
    show "(g \<circ> fst) (0, y) = p a" if "y \<in> {undefined}" for y::'c
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2021
      by (metis comp_def fst_conv pas pathstart_def)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2022
  qed (use assms in auto)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2023
  show ?thesis
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2024
  proof
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2025
    show "path (k \<circ> (\<lambda>t. Pair t undefined))"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2026
      unfolding path_def
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2027
      by (intro continuous_on_compose continuous_intros continuous_on_subset [OF contk]) auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2028
    show "path_image (k \<circ> (\<lambda>t. (t, undefined))) \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2029
      using kim by (auto simp: path_image_def)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2030
    show "pathstart (k \<circ> (\<lambda>t. (t, undefined))) = a"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2031
      by (auto simp: pathstart_def k0)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2032
    show "\<And>t. t \<in> {0..1} \<Longrightarrow> p ((k \<circ> (\<lambda>t. (t, undefined))) t) = g t"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2033
      by (auto simp: pk)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2034
  qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2035
qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2036
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2037
corollary covering_space_lift_path:
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2038
  fixes p :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2039
  assumes cov: "covering_space C p S" and "path g" and pig: "path_image g \<subseteq> S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2040
  obtains h where "path h" "path_image h \<subseteq> C" "\<And>t. t \<in> {0..1} \<Longrightarrow> p(h t) = g t"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2041
proof -
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2042
  obtain a where "a \<in> C" "pathstart g = p a"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2043
    by (metis pig cov covering_space_imp_surjective imageE pathstart_in_path_image subsetCE)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2044
  show ?thesis
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2045
    using covering_space_lift_path_strong [OF cov \<open>a \<in> C\<close> \<open>path g\<close> pig]
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2046
    by (metis \<open>pathstart g = p a\<close> that)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2047
qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2048
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2049
  
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2050
proposition covering_space_lift_homotopic_paths:
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2051
  fixes p :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2052
  assumes cov: "covering_space C p S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2053
      and "path g1" and pig1: "path_image g1 \<subseteq> S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2054
      and "path g2" and pig2: "path_image g2 \<subseteq> S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2055
      and hom: "homotopic_paths S g1 g2"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2056
      and "path h1" and pih1: "path_image h1 \<subseteq> C" and ph1: "\<And>t. t \<in> {0..1} \<Longrightarrow> p(h1 t) = g1 t"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2057
      and "path h2" and pih2: "path_image h2 \<subseteq> C" and ph2: "\<And>t. t \<in> {0..1} \<Longrightarrow> p(h2 t) = g2 t"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2058
      and h1h2: "pathstart h1 = pathstart h2"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2059
    shows "homotopic_paths C h1 h2"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2060
proof -
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2061
  obtain h :: "real \<times> real \<Rightarrow> 'b"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2062
     where conth: "continuous_on ({0..1} \<times> {0..1}) h"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2063
       and him: "h ` ({0..1} \<times> {0..1}) \<subseteq> S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2064
       and h0: "\<And>x. h (0, x) = g1 x" and h1: "\<And>x. h (1, x) = g2 x"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2065
       and heq0: "\<And>t. t \<in> {0..1} \<Longrightarrow> h (t, 0) = g1 0"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2066
       and heq1: "\<And>t. t \<in> {0..1} \<Longrightarrow> h (t, 1) = g1 1"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2067
    using hom by (auto simp: homotopic_paths_def homotopic_with_def pathstart_def pathfinish_def)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2068
  obtain k where contk: "continuous_on ({0..1} \<times> {0..1}) k"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2069
             and kim: "k ` ({0..1} \<times> {0..1}) \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2070
             and kh2: "\<And>y. y \<in> {0..1} \<Longrightarrow> k (y, 0) = h2 0"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2071
             and hpk: "\<And>z. z \<in> {0..1} \<times> {0..1} \<Longrightarrow> h z = p (k z)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2072
    apply (rule covering_space_lift_homotopy_alt [OF cov conth him, of "\<lambda>x. h2 0"])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2073
    using h1h2 ph1 ph2 apply (force simp: heq0 pathstart_def pathfinish_def)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2074
    using path_image_def pih2 continuous_on_const by fastforce+
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2075
  have contg1: "continuous_on {0..1} g1" and contg2: "continuous_on {0..1} g2"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2076
    using \<open>path g1\<close> \<open>path g2\<close> path_def by blast+
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2077
  have g1im: "g1 ` {0..1} \<subseteq> S" and g2im: "g2 ` {0..1} \<subseteq> S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2078
    using path_image_def pig1 pig2 by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2079
  have conth1: "continuous_on {0..1} h1" and conth2: "continuous_on {0..1} h2"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2080
    using \<open>path h1\<close> \<open>path h2\<close> path_def by blast+
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2081
  have h1im: "h1 ` {0..1} \<subseteq> C" and h2im: "h2 ` {0..1} \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2082
    using path_image_def pih1 pih2 by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2083
  show ?thesis
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2084
    unfolding homotopic_paths pathstart_def pathfinish_def
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2085
  proof (intro exI conjI ballI)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2086
    show keqh1: "k(0, x) = h1 x" if "x \<in> {0..1}" for x
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2087
    proof (rule covering_space_lift_unique [OF cov _ contg1 g1im])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2088
      show "k (0,0) = h1 0"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2089
        by (metis atLeastAtMost_iff h1h2 kh2 order_refl pathstart_def zero_le_one)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2090
      show "continuous_on {0..1} (\<lambda>a. k (0, a))"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2091
        by (intro continuous_intros continuous_on_compose2 [OF contk]) auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2092
      show "\<And>x. x \<in> {0..1} \<Longrightarrow> g1 x = p (k (0, x))"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2093
        by (metis atLeastAtMost_iff h0 hpk zero_le_one mem_Sigma_iff order_refl)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2094
    qed (use conth1 h1im kim that in \<open>auto simp: ph1\<close>)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2095
    show "k(1, x) = h2 x" if "x \<in> {0..1}" for x
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2096
    proof (rule covering_space_lift_unique [OF cov _ contg2 g2im])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2097
      show "k (1,0) = h2 0"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2098
        by (metis atLeastAtMost_iff kh2 order_refl zero_le_one)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2099
      show "continuous_on {0..1} (\<lambda>a. k (1, a))"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2100
        by (intro continuous_intros continuous_on_compose2 [OF contk]) auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2101
      show "\<And>x. x \<in> {0..1} \<Longrightarrow> g2 x = p (k (1, x))"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2102
        by (metis atLeastAtMost_iff h1 hpk mem_Sigma_iff order_refl zero_le_one)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2103
    qed (use conth2 h2im kim that in \<open>auto simp: ph2\<close>)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2104
    show "\<And>t. t \<in> {0..1} \<Longrightarrow> (k \<circ> Pair t) 0 = h1 0"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2105
      by (metis comp_apply h1h2 kh2 pathstart_def)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2106
    show "(k \<circ> Pair t) 1 = h1 1" if "t \<in> {0..1}" for t
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2107
    proof (rule covering_space_lift_unique
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2108
           [OF cov, of "\<lambda>a. (k \<circ> Pair a) 1" 0 "\<lambda>a. h1 1" "{0..1}"  "\<lambda>x. g1 1"])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2109
      show "(k \<circ> Pair 0) 1 = h1 1"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2110
        using keqh1 by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2111
      show "continuous_on {0..1} (\<lambda>a. (k \<circ> Pair a) 1)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2112
        apply simp
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2113
        by (intro continuous_intros continuous_on_compose2 [OF contk]) auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2114
      show "\<And>x. x \<in> {0..1} \<Longrightarrow> g1 1 = p ((k \<circ> Pair x) 1)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2115
        using heq1 hpk by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2116
    qed (use contk kim g1im h1im that in \<open>auto simp: ph1 continuous_on_const\<close>)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2117
  qed (use contk kim in auto)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2118
qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2119
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2120
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2121
corollary covering_space_monodromy:
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2122
  fixes p :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2123
  assumes cov: "covering_space C p S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2124
      and "path g1" and pig1: "path_image g1 \<subseteq> S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2125
      and "path g2" and pig2: "path_image g2 \<subseteq> S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2126
      and hom: "homotopic_paths S g1 g2"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2127
      and "path h1" and pih1: "path_image h1 \<subseteq> C" and ph1: "\<And>t. t \<in> {0..1} \<Longrightarrow> p(h1 t) = g1 t"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2128
      and "path h2" and pih2: "path_image h2 \<subseteq> C" and ph2: "\<And>t. t \<in> {0..1} \<Longrightarrow> p(h2 t) = g2 t"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2129
      and h1h2: "pathstart h1 = pathstart h2"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2130
    shows "pathfinish h1 = pathfinish h2"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2131
  using covering_space_lift_homotopic_paths [OF assms] homotopic_paths_imp_pathfinish by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2132
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2133
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2134
corollary covering_space_lift_homotopic_path:
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2135
  fixes p :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2136
  assumes cov: "covering_space C p S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2137
      and hom: "homotopic_paths S f f'"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2138
      and "path g" and pig: "path_image g \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2139
      and a: "pathstart g = a" and b: "pathfinish g = b"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2140
      and pgeq: "\<And>t. t \<in> {0..1} \<Longrightarrow> p(g t) = f t"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2141
  obtains g' where "path g'" "path_image g' \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2142
                   "pathstart g' = a" "pathfinish g' = b" "\<And>t. t \<in> {0..1} \<Longrightarrow> p(g' t) = f' t"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2143
proof (rule covering_space_lift_path_strong [OF cov, of a f'])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2144
  show "a \<in> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2145
    using a pig by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2146
  show "path f'" "path_image f' \<subseteq> S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2147
    using hom homotopic_paths_imp_path homotopic_paths_imp_subset by blast+
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2148
  show "pathstart f' = p a"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2149
    by (metis a atLeastAtMost_iff hom homotopic_paths_imp_pathstart order_refl pathstart_def pgeq zero_le_one)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2150
qed (metis (mono_tags, lifting) assms cov covering_space_monodromy hom homotopic_paths_imp_path homotopic_paths_imp_subset pgeq pig)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2151
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2152
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2153
proposition covering_space_lift_general:
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2154
  fixes p :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2155
    and f :: "'c::real_normed_vector \<Rightarrow> 'b"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2156
  assumes cov: "covering_space C p S" and "a \<in> C" "z \<in> U"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2157
      and U: "path_connected U" "locally path_connected U"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2158
      and contf: "continuous_on U f" and fim: "f ` U \<subseteq> S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2159
      and feq: "f z = p a"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2160
      and hom: "\<And>r. \<lbrakk>path r; path_image r \<subseteq> U; pathstart r = z; pathfinish r = z\<rbrakk>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2161
                     \<Longrightarrow> \<exists>q. path q \<and> path_image q \<subseteq> C \<and>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2162
                             pathstart q = a \<and> pathfinish q = a \<and>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2163
                             homotopic_paths S (f \<circ> r) (p \<circ> q)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2164
  obtains g where "continuous_on U g" "g ` U \<subseteq> C" "g z = a" "\<And>y. y \<in> U \<Longrightarrow> p(g y) = f y"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2165
proof -
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2166
  have *: "\<exists>g h. path g \<and> path_image g \<subseteq> U \<and>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2167
                 pathstart g = z \<and> pathfinish g = y \<and>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2168
                 path h \<and> path_image h \<subseteq> C \<and> pathstart h = a \<and>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2169
                 (\<forall>t \<in> {0..1}. p(h t) = f(g t))"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2170
          if "y \<in> U" for y
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2171
  proof -
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2172
    obtain g where "path g" "path_image g \<subseteq> U" and pastg: "pathstart g = z"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2173
               and pafig: "pathfinish g = y"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2174
      using U \<open>z \<in> U\<close> \<open>y \<in> U\<close> by (force simp: path_connected_def)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2175
    obtain h where "path h" "path_image h \<subseteq> C" "pathstart h = a"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2176
               and "\<And>t. t \<in> {0..1} \<Longrightarrow> p(h t) = (f \<circ> g) t"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2177
    proof (rule covering_space_lift_path_strong [OF cov \<open>a \<in> C\<close>])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2178
      show "path (f \<circ> g)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2179
        using \<open>path g\<close> \<open>path_image g \<subseteq> U\<close> contf continuous_on_subset path_continuous_image by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2180
      show "path_image (f \<circ> g) \<subseteq> S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2181
        by (metis \<open>path_image g \<subseteq> U\<close> fim image_mono path_image_compose subset_trans)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2182
      show "pathstart (f \<circ> g) = p a"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2183
        by (simp add: feq pastg pathstart_compose)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2184
    qed auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2185
    then show ?thesis
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2186
      by (metis \<open>path g\<close> \<open>path_image g \<subseteq> U\<close> comp_apply pafig pastg)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2187
  qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2188
  have "\<exists>l. \<forall>g h. path g \<and> path_image g \<subseteq> U \<and> pathstart g = z \<and> pathfinish g = y \<and>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2189
                  path h \<and> path_image h \<subseteq> C \<and> pathstart h = a \<and>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2190
                  (\<forall>t \<in> {0..1}. p(h t) = f(g t))  \<longrightarrow> pathfinish h = l" for y
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2191
  proof -
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2192
    have "pathfinish h = pathfinish h'"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2193
         if g: "path g" "path_image g \<subseteq> U" "pathstart g = z" "pathfinish g = y"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2194
            and h: "path h" "path_image h \<subseteq> C" "pathstart h = a"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2195
            and phg: "\<And>t. t \<in> {0..1} \<Longrightarrow> p(h t) = f(g t)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2196
            and g': "path g'" "path_image g' \<subseteq> U" "pathstart g' = z" "pathfinish g' = y"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2197
            and h': "path h'" "path_image h' \<subseteq> C" "pathstart h' = a"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2198
            and phg': "\<And>t. t \<in> {0..1} \<Longrightarrow> p(h' t) = f(g' t)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2199
         for g h g' h'
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2200
    proof -
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2201
      obtain q where "path q" and piq: "path_image q \<subseteq> C" and pastq: "pathstart q = a" and pafiq: "pathfinish q = a"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2202
                 and homS: "homotopic_paths S (f \<circ> g +++ reversepath g') (p \<circ> q)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2203
        using g g' hom [of "g +++ reversepath g'"] by (auto simp:  subset_path_image_join)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2204
              have papq: "path (p \<circ> q)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2205
                using homS homotopic_paths_imp_path by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2206
              have pipq: "path_image (p \<circ> q) \<subseteq> S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2207
                using homS homotopic_paths_imp_subset by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2208
      obtain q' where "path q'" "path_image q' \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2209
                and "pathstart q' = pathstart q" "pathfinish q' = pathfinish q"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2210
                and pq'_eq: "\<And>t. t \<in> {0..1} \<Longrightarrow> p (q' t) = (f \<circ> g +++ reversepath g') t"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2211
        using covering_space_lift_homotopic_path [OF cov homotopic_paths_sym [OF homS] \<open>path q\<close> piq refl refl]
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2212
        by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2213
      have "q' t = (h \<circ> op *\<^sub>R 2) t" if "0 \<le> t" "t \<le> 1/2" for t
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2214
      proof (rule covering_space_lift_unique [OF cov, of q' 0 "h \<circ> op *\<^sub>R 2" "{0..1/2}" "f \<circ> g \<circ> op *\<^sub>R 2" t])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2215
        show "q' 0 = (h \<circ> op *\<^sub>R 2) 0"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2216
          by (metis \<open>pathstart q' = pathstart q\<close> comp_def g h pastq pathstart_def pth_4(2))
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2217
        show "continuous_on {0..1/2} (f \<circ> g \<circ> op *\<^sub>R 2)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2218
          apply (intro continuous_intros continuous_on_compose continuous_on_path [OF \<open>path g\<close>] continuous_on_subset [OF contf])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2219
          using g(2) path_image_def by fastforce+
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2220
        show "(f \<circ> g \<circ> op *\<^sub>R 2) ` {0..1/2} \<subseteq> S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2221
          using g(2) path_image_def fim by fastforce
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2222
        show "(h \<circ> op *\<^sub>R 2) ` {0..1/2} \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2223
          using h path_image_def by fastforce
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2224
        show "q' ` {0..1/2} \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2225
          using \<open>path_image q' \<subseteq> C\<close> path_image_def by fastforce
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2226
        show "\<And>x. x \<in> {0..1/2} \<Longrightarrow> (f \<circ> g \<circ> op *\<^sub>R 2) x = p (q' x)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2227
          by (auto simp: joinpaths_def pq'_eq)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2228
        show "\<And>x. x \<in> {0..1/2} \<Longrightarrow> (f \<circ> g \<circ> op *\<^sub>R 2) x = p ((h \<circ> op *\<^sub>R 2) x)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2229
          by (simp add: phg)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2230
        show "continuous_on {0..1/2} q'"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2231
          by (simp add: continuous_on_path \<open>path q'\<close>)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2232
        show "continuous_on {0..1/2} (h \<circ> op *\<^sub>R 2)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2233
          apply (intro continuous_intros continuous_on_compose continuous_on_path [OF \<open>path h\<close>], force)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2234
          done
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2235
      qed (use that in auto)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2236
      moreover have "q' t = (reversepath h' \<circ> (\<lambda>t. 2 *\<^sub>R t - 1)) t" if "1/2 < t" "t \<le> 1" for t
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2237
      proof (rule covering_space_lift_unique [OF cov, of q' 1 "reversepath h' \<circ> (\<lambda>t. 2 *\<^sub>R t - 1)" "{1/2<..1}" "f \<circ> reversepath g' \<circ> (\<lambda>t. 2 *\<^sub>R t - 1)" t])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2238
        show "q' 1 = (reversepath h' \<circ> (\<lambda>t. 2 *\<^sub>R t - 1)) 1"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2239
          using h' \<open>pathfinish q' = pathfinish q\<close> pafiq
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2240
          by (simp add: pathstart_def pathfinish_def reversepath_def)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2241
        show "continuous_on {1/2<..1} (f \<circ> reversepath g' \<circ> (\<lambda>t. 2 *\<^sub>R t - 1))"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2242
          apply (intro continuous_intros continuous_on_compose continuous_on_path \<open>path g'\<close> continuous_on_subset [OF contf])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2243
          using g' apply simp_all
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2244
          by (auto simp: path_image_def reversepath_def)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2245
        show "(f \<circ> reversepath g' \<circ> (\<lambda>t. 2 *\<^sub>R t - 1)) ` {1/2<..1} \<subseteq> S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2246
          using g'(2) path_image_def fim by (auto simp: image_subset_iff path_image_def reversepath_def)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2247
        show "q' ` {1/2<..1} \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2248
          using \<open>path_image q' \<subseteq> C\<close> path_image_def by fastforce
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2249
        show "(reversepath h' \<circ> (\<lambda>t. 2 *\<^sub>R t - 1)) ` {1/2<..1} \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2250
          using h' by (simp add: path_image_def reversepath_def subset_eq)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2251
        show "\<And>x. x \<in> {1/2<..1} \<Longrightarrow> (f \<circ> reversepath g' \<circ> (\<lambda>t. 2 *\<^sub>R t - 1)) x = p (q' x)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2252
          by (auto simp: joinpaths_def pq'_eq)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2253
        show "\<And>x. x \<in> {1/2<..1} \<Longrightarrow>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2254
                  (f \<circ> reversepath g' \<circ> (\<lambda>t. 2 *\<^sub>R t - 1)) x = p ((reversepath h' \<circ> (\<lambda>t. 2 *\<^sub>R t - 1)) x)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2255
          by (simp add: phg' reversepath_def)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2256
        show "continuous_on {1/2<..1} q'"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2257
          by (auto intro: continuous_on_path [OF \<open>path q'\<close>])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2258
        show "continuous_on {1/2<..1} (reversepath h' \<circ> (\<lambda>t. 2 *\<^sub>R t - 1))"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2259
          apply (intro continuous_intros continuous_on_compose continuous_on_path \<open>path h'\<close>)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2260
          using h' apply auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2261
          done
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2262
      qed (use that in auto)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2263
      ultimately have "q' t = (h +++ reversepath h') t" if "0 \<le> t" "t \<le> 1" for t
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2264
        using that by (simp add: joinpaths_def)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2265
      then have "path(h +++ reversepath h')"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2266
        by (auto intro: path_eq [OF \<open>path q'\<close>])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2267
      then show ?thesis
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2268
        by (auto simp: \<open>path h\<close> \<open>path h'\<close>)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2269
    qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2270
    then show ?thesis by metis
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2271
  qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2272
  then obtain l :: "'c \<Rightarrow> 'a"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2273
          where l: "\<And>y g h. \<lbrakk>path g; path_image g \<subseteq> U; pathstart g = z; pathfinish g = y;
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2274
                             path h; path_image h \<subseteq> C; pathstart h = a;
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2275
                             \<And>t. t \<in> {0..1} \<Longrightarrow> p(h t) = f(g t)\<rbrakk> \<Longrightarrow> pathfinish h = l y"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2276
    by metis
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2277
  show ?thesis
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2278
  proof
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2279
    show pleq: "p (l y) = f y" if "y \<in> U" for y
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2280
      using*[OF \<open>y \<in> U\<close>]  by (metis l atLeastAtMost_iff order_refl pathfinish_def zero_le_one)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2281
    show "l z = a"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2282
      using l [of "linepath z z" z "linepath a a"] by (auto simp: assms)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2283
    show LC: "l ` U \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2284
      by (clarify dest!: *) (metis (full_types) l pathfinish_in_path_image subsetCE)
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  2285
    have "\<exists>T. openin (subtopology euclidean U) T \<and> y \<in> T \<and> T \<subseteq> U \<inter> l -` X"
64792
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2286
         if X: "openin (subtopology euclidean C) X" and "y \<in> U" "l y \<in> X" for X y
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2287
    proof -
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2288
      have "X \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2289
        using X openin_euclidean_subtopology_iff by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2290
      have "f y \<in> S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2291
        using fim \<open>y \<in> U\<close> by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2292
      then obtain W \<V>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2293
              where WV: "f y \<in> W \<and> openin (subtopology euclidean S) W \<and>
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  2294
                         (\<Union>\<V> = C \<inter> p -` W \<and>
64792
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2295
                          (\<forall>U \<in> \<V>. openin (subtopology euclidean C) U) \<and>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2296
                          pairwise disjnt \<V> \<and>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2297
                          (\<forall>U \<in> \<V>. \<exists>q. homeomorphism U W p q))"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2298
        using cov by (force simp: covering_space_def)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2299
      then have "l y \<in> \<Union>\<V>"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2300
        using \<open>X \<subseteq> C\<close> pleq that by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2301
      then obtain W' where "l y \<in> W'" and "W' \<in> \<V>"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2302
        by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2303
      with WV obtain p' where opeCW': "openin (subtopology euclidean C) W'"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2304
                          and homUW': "homeomorphism W' W p p'"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2305
        by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2306
      then have contp': "continuous_on W p'" and p'im: "p' ` W \<subseteq> W'"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2307
        using homUW' homeomorphism_image2 homeomorphism_cont2 by fastforce+
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2308
      obtain V where "y \<in> V" "y \<in> U" and fimW: "f ` V \<subseteq> W" "V \<subseteq> U"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2309
                 and "path_connected V" and opeUV: "openin (subtopology euclidean U) V"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2310
      proof -
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  2311
        have "openin (subtopology euclidean U) (U \<inter> f -` W)"
64792
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2312
          using WV contf continuous_on_open_gen fim by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2313
        then show ?thesis
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2314
          using U WV
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2315
          apply (auto simp: locally_path_connected)
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  2316
          apply (drule_tac x="U \<inter> f -` W" in spec)
64792
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2317
          apply (drule_tac x=y in spec)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2318
          apply (auto simp: \<open>y \<in> U\<close> intro: that)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2319
          done
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2320
      qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2321
      have "W' \<subseteq> C" "W \<subseteq> S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2322
        using opeCW' WV openin_imp_subset by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2323
      have p'im: "p' ` W \<subseteq> W'"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2324
        using homUW' homeomorphism_image2 by fastforce
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2325
      show ?thesis
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2326
      proof (intro exI conjI)
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  2327
        have "openin (subtopology euclidean S) (W \<inter> p' -` (W' \<inter> X))"
64792
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2328
        proof (rule openin_trans)
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  2329
          show "openin (subtopology euclidean W) (W \<inter> p' -` (W' \<inter> X))"
64792
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2330
            apply (rule continuous_openin_preimage [OF contp' p'im])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2331
            using X \<open>W' \<subseteq> C\<close> apply (auto simp: openin_open)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2332
            done
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2333
          show "openin (subtopology euclidean S) W"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2334
            using WV by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2335
        qed
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  2336
        then show "openin (subtopology euclidean U) (V \<inter> (U \<inter> (f -` (W \<inter> (p' -` (W' \<inter> X))))))"
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  2337
          by (blast intro: opeUV openin_subtopology_self continuous_openin_preimage [OF contf fim])
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  2338
         have "p' (f y) \<in> X"
64792
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2339
          using \<open>l y \<in> W'\<close> homeomorphism_apply1 [OF homUW'] pleq \<open>y \<in> U\<close> \<open>l y \<in> X\<close> by fastforce
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  2340
        then show "y \<in> V \<inter> (U \<inter> f -` (W \<inter> p' -` (W' \<inter> X)))"
64792
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2341
          using \<open>y \<in> U\<close> \<open>y \<in> V\<close> WV p'im by auto
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  2342
        show "V \<inter> (U \<inter> f -` (W \<inter> p' -` (W' \<inter> X))) \<subseteq> U \<inter> l -` X"
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  2343
        proof (intro subsetI IntI; clarify)
64792
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2344
          fix y'
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2345
          assume y': "y' \<in> V" "y' \<in> U" "f y' \<in> W" "p' (f y') \<in> W'" "p' (f y') \<in> X"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2346
          then obtain \<gamma> where "path \<gamma>" "path_image \<gamma> \<subseteq> V" "pathstart \<gamma> = y" "pathfinish \<gamma> = y'"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2347
            by (meson \<open>path_connected V\<close> \<open>y \<in> V\<close> path_connected_def)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2348
          obtain pp qq where "path pp" "path_image pp \<subseteq> U"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2349
                             "pathstart pp = z" "pathfinish pp = y"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2350
                             "path qq" "path_image qq \<subseteq> C" "pathstart qq = a"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2351
                         and pqqeq: "\<And>t. t \<in> {0..1} \<Longrightarrow> p(qq t) = f(pp t)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2352
            using*[OF \<open>y \<in> U\<close>] by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2353
          have finW: "\<And>x. \<lbrakk>0 \<le> x; x \<le> 1\<rbrakk> \<Longrightarrow> f (\<gamma> x) \<in> W"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2354
            using \<open>path_image \<gamma> \<subseteq> V\<close> by (auto simp: image_subset_iff path_image_def fimW [THEN subsetD])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2355
          have "pathfinish (qq +++ (p' \<circ> f \<circ> \<gamma>)) = l y'"
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  2356
          proof (rule l [of "pp +++ \<gamma>" y' "qq +++ (p' \<circ> f \<circ> \<gamma>)"])
64792
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2357
            show "path (pp +++ \<gamma>)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2358
              by (simp add: \<open>path \<gamma>\<close> \<open>path pp\<close> \<open>pathfinish pp = y\<close> \<open>pathstart \<gamma> = y\<close>)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2359
            show "path_image (pp +++ \<gamma>) \<subseteq> U"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2360
              using \<open>V \<subseteq> U\<close> \<open>path_image \<gamma> \<subseteq> V\<close> \<open>path_image pp \<subseteq> U\<close> not_in_path_image_join by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2361
            show "pathstart (pp +++ \<gamma>) = z"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2362
              by (simp add: \<open>pathstart pp = z\<close>)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2363
            show "pathfinish (pp +++ \<gamma>) = y'"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2364
              by (simp add: \<open>pathfinish \<gamma> = y'\<close>)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2365
            have paqq: "pathfinish qq = pathstart (p' \<circ> f \<circ> \<gamma>)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2366
              apply (simp add: \<open>pathstart \<gamma> = y\<close> pathstart_compose)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2367
              apply (metis (mono_tags, lifting) \<open>l y \<in> W'\<close> \<open>path pp\<close> \<open>path qq\<close> \<open>path_image pp \<subseteq> U\<close> \<open>path_image qq \<subseteq> C\<close>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2368
                           \<open>pathfinish pp = y\<close> \<open>pathstart pp = z\<close> \<open>pathstart qq = a\<close>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2369
                           homeomorphism_apply1 [OF homUW'] l pleq pqqeq \<open>y \<in> U\<close>)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2370
              done
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2371
            have "continuous_on (path_image \<gamma>) (p' \<circ> f)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2372
            proof (rule continuous_on_compose)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2373
              show "continuous_on (path_image \<gamma>) f"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2374
                using \<open>path_image \<gamma> \<subseteq> V\<close> \<open>V \<subseteq> U\<close> contf continuous_on_subset by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2375
              show "continuous_on (f ` path_image \<gamma>) p'"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2376
                apply (rule continuous_on_subset [OF contp'])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2377
                apply (auto simp: path_image_def pathfinish_def pathstart_def finW)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2378
                done
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2379
            qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2380
            then show "path (qq +++ (p' \<circ> f \<circ> \<gamma>))"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2381
              using \<open>path \<gamma>\<close> \<open>path qq\<close> paqq path_continuous_image path_join_imp by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2382
            show "path_image (qq +++ (p' \<circ> f \<circ> \<gamma>)) \<subseteq> C"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2383
              apply (rule subset_path_image_join)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2384
               apply (simp add: \<open>path_image qq \<subseteq> C\<close>)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2385
              by (metis \<open>W' \<subseteq> C\<close> \<open>path_image \<gamma> \<subseteq> V\<close> dual_order.trans fimW(1) image_comp image_mono p'im path_image_compose)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2386
            show "pathstart (qq +++ (p' \<circ> f \<circ> \<gamma>)) = a"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2387
              by (simp add: \<open>pathstart qq = a\<close>)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2388
            show "p ((qq +++ (p' \<circ> f \<circ> \<gamma>)) \<xi>) = f ((pp +++ \<gamma>) \<xi>)" if \<xi>: "\<xi> \<in> {0..1}" for \<xi>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2389
            proof (simp add: joinpaths_def, safe)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2390
              show "p (qq (2*\<xi>)) = f (pp (2*\<xi>))" if "\<xi>*2 \<le> 1"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2391
                using \<open>\<xi> \<in> {0..1}\<close> pqqeq that by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2392
              show "p (p' (f (\<gamma> (2*\<xi> - 1)))) = f (\<gamma> (2*\<xi> - 1))" if "\<not> \<xi>*2 \<le> 1"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2393
                apply (rule homeomorphism_apply2 [OF homUW' finW])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2394
                using that \<xi> by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2395
            qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2396
          qed
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  2397
          with \<open>pathfinish \<gamma> = y'\<close>  \<open>p' (f y') \<in> X\<close> show "y' \<in> l -` X"
64792
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2398
            unfolding pathfinish_join by (simp add: pathfinish_def)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2399
        qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2400
      qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2401
    qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2402
    then show "continuous_on U l"
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 66827
diff changeset
  2403
      by (metis IntD1 IntD2 vimage_eq openin_subopen continuous_on_open_gen [OF LC])
64792
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2404
  qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2405
qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2406
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2407
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2408
corollary covering_space_lift_stronger:
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2409
  fixes p :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2410
    and f :: "'c::real_normed_vector \<Rightarrow> 'b"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2411
  assumes cov: "covering_space C p S" "a \<in> C" "z \<in> U"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2412
      and U: "path_connected U" "locally path_connected U"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2413
      and contf: "continuous_on U f" and fim: "f ` U \<subseteq> S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2414
      and feq: "f z = p a"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2415
      and hom: "\<And>r. \<lbrakk>path r; path_image r \<subseteq> U; pathstart r = z; pathfinish r = z\<rbrakk>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2416
                     \<Longrightarrow> \<exists>b. homotopic_paths S (f \<circ> r) (linepath b b)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2417
  obtains g where "continuous_on U g" "g ` U \<subseteq> C" "g z = a" "\<And>y. y \<in> U \<Longrightarrow> p(g y) = f y"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2418
proof (rule covering_space_lift_general [OF cov U contf fim feq])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2419
  fix r
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2420
  assume "path r" "path_image r \<subseteq> U" "pathstart r = z" "pathfinish r = z"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2421
  then obtain b where b: "homotopic_paths S (f \<circ> r) (linepath b b)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2422
    using hom by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2423
  then have "f (pathstart r) = b"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2424
    by (metis homotopic_paths_imp_pathstart pathstart_compose pathstart_linepath)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2425
  then have "homotopic_paths S (f \<circ> r) (linepath (f z) (f z))"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2426
    by (simp add: b \<open>pathstart r = z\<close>)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2427
  then have "homotopic_paths S (f \<circ> r) (p \<circ> linepath a a)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2428
    by (simp add: o_def feq linepath_def)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2429
  then show "\<exists>q. path q \<and>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2430
                  path_image q \<subseteq> C \<and>
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2431
                  pathstart q = a \<and> pathfinish q = a \<and> homotopic_paths S (f \<circ> r) (p \<circ> q)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2432
    by (force simp: \<open>a \<in> C\<close>)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2433
qed auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2434
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2435
corollary covering_space_lift_strong:
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2436
  fixes p :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2437
    and f :: "'c::real_normed_vector \<Rightarrow> 'b"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2438
  assumes cov: "covering_space C p S" "a \<in> C" "z \<in> U"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2439
      and scU: "simply_connected U" and lpcU: "locally path_connected U"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2440
      and contf: "continuous_on U f" and fim: "f ` U \<subseteq> S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2441
      and feq: "f z = p a"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2442
  obtains g where "continuous_on U g" "g ` U \<subseteq> C" "g z = a" "\<And>y. y \<in> U \<Longrightarrow> p(g y) = f y"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2443
proof (rule covering_space_lift_stronger [OF cov _ lpcU contf fim feq])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2444
  show "path_connected U"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2445
    using scU simply_connected_eq_contractible_loop_some by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2446
  fix r
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2447
  assume r: "path r" "path_image r \<subseteq> U" "pathstart r = z" "pathfinish r = z"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2448
  have "linepath (f z) (f z) = f \<circ> linepath z z"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2449
    by (simp add: o_def linepath_def)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2450
  then have "homotopic_paths S (f \<circ> r) (linepath (f z) (f z))"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2451
    by (metis r contf fim homotopic_paths_continuous_image scU simply_connected_eq_contractible_path)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2452
  then show "\<exists>b. homotopic_paths S (f \<circ> r) (linepath b b)"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2453
    by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2454
qed blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2455
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2456
corollary covering_space_lift:
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2457
  fixes p :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2458
    and f :: "'c::real_normed_vector \<Rightarrow> 'b"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2459
  assumes cov: "covering_space C p S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2460
      and U: "simply_connected U"  "locally path_connected U"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2461
      and contf: "continuous_on U f" and fim: "f ` U \<subseteq> S"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2462
    obtains g where "continuous_on U g" "g ` U \<subseteq> C" "\<And>y. y \<in> U \<Longrightarrow> p(g y) = f y"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2463
proof (cases "U = {}")
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2464
  case True
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2465
  with that show ?thesis by auto
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2466
next
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2467
  case False
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2468
  then obtain z where "z \<in> U" by blast
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2469
  then obtain a where "a \<in> C" "f z = p a"
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2470
    by (metis cov covering_space_imp_surjective fim image_iff image_subset_iff)
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2471
  then show ?thesis
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2472
    by (metis that covering_space_lift_strong [OF cov _ \<open>z \<in> U\<close> U contf fim])
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2473
qed
3074080f4f12 covering space lift lemmas
paulson <lp15@cam.ac.uk>
parents: 64791
diff changeset
  2474
63130
4ae5da02d627 New theory for Homeomorphisms
paulson <lp15@cam.ac.uk>
parents:
diff changeset
  2475
end