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