src/HOL/Analysis/Brouwer_Fixpoint.thy
author paulson <lp15@cam.ac.uk>
Sat, 26 May 2018 22:11:55 +0100
changeset 68296 69d680e94961
parent 68022 c8a506be83bd
child 68361 20375f232f3b
permissions -rw-r--r--
tidying and reorganisation around Cauchy Integral Theorem
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
53674
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
     1
(*  Author:     John Harrison
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
     2
    Author:     Robert Himmelmann, TU Muenchen (Translation from HOL light) and LCP
53674
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
     3
*)
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
     4
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
     5
(* At the moment this is just Brouwer's fixpoint theorem. The proof is from  *)
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
     6
(* Kuhn: "some combinatorial lemmas in topology", IBM J. v4. (1960) p. 518   *)
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
     7
(* See "http://www.research.ibm.com/journal/rd/045/ibmrd0405K.pdf".          *)
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
     8
(*                                                                           *)
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
     9
(* The script below is quite messy, but at least we avoid formalizing any    *)
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
    10
(* topological machinery; we don't even use barycentric subdivision; this is *)
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
    11
(* the big advantage of Kuhn's proof over the usual Sperner's lemma one.     *)
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
    12
(*                                                                           *)
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
    13
(*              (c) Copyright, John Harrison 1998-2008                       *)
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
    14
67968
a5ad4c015d1c removed dots at the end of (sub)titles
nipkow
parents: 67682
diff changeset
    15
section \<open>Results connected with topological dimension\<close>
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
    16
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
    17
theory Brouwer_Fixpoint
63129
paulson <lp15@cam.ac.uk>
parents: 63040
diff changeset
    18
imports Path_Connected Homeomorphism
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
    19
begin
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
    20
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    21
lemma bij_betw_singleton_eq:
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    22
  assumes f: "bij_betw f A B" and g: "bij_betw g A B" and a: "a \<in> A"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    23
  assumes eq: "(\<And>x. x \<in> A \<Longrightarrow> x \<noteq> a \<Longrightarrow> f x = g x)"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    24
  shows "f a = g a"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    25
proof -
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    26
  have "f ` (A - {a}) = g ` (A - {a})"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    27
    by (intro image_cong) (simp_all add: eq)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    28
  then have "B - {f a} = B - {g a}"
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59765
diff changeset
    29
    using f g a  by (auto simp: bij_betw_def inj_on_image_set_diff set_eq_iff Diff_subset)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    30
  moreover have "f a \<in> B" "g a \<in> B"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    31
    using f g a by (auto simp: bij_betw_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    32
  ultimately show ?thesis
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    33
    by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    34
qed
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    35
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    36
lemma swap_image:
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    37
  "Fun.swap i j f ` A = (if i \<in> A then (if j \<in> A then f ` A else f ` ((A - {i}) \<union> {j}))
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    38
                                  else (if j \<in> A then f ` ((A - {j}) \<union> {i}) else f ` A))"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
    39
  by (auto simp: swap_def image_def) metis
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    40
63365
5340fb6633d0 more theorems
haftmann
parents: 63332
diff changeset
    41
lemmas swap_apply1 = swap_apply(1)
5340fb6633d0 more theorems
haftmann
parents: 63332
diff changeset
    42
lemmas swap_apply2 = swap_apply(2)
5340fb6633d0 more theorems
haftmann
parents: 63332
diff changeset
    43
lemmas lessThan_empty_iff = Iio_eq_empty_iff_nat
5340fb6633d0 more theorems
haftmann
parents: 63332
diff changeset
    44
lemmas Zero_notin_Suc = zero_notin_Suc_image
5340fb6633d0 more theorems
haftmann
parents: 63332
diff changeset
    45
lemmas atMost_Suc_eq_insert_0 = Iic_Suc_eq_insert_0
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    46
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    47
lemma pointwise_minimal_pointwise_maximal:
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    48
  fixes s :: "(nat \<Rightarrow> nat) set"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    49
  assumes "finite s"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    50
    and "s \<noteq> {}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    51
    and "\<forall>x\<in>s. \<forall>y\<in>s. x \<le> y \<or> y \<le> x"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    52
  shows "\<exists>a\<in>s. \<forall>x\<in>s. a \<le> x"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    53
    and "\<exists>a\<in>s. \<forall>x\<in>s. x \<le> a"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    54
  using assms
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    55
proof (induct s rule: finite_ne_induct)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    56
  case (insert b s)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    57
  assume *: "\<forall>x\<in>insert b s. \<forall>y\<in>insert b s. x \<le> y \<or> y \<le> x"
63540
f8652d0534fa tuned proofs -- avoid unstructured calculation;
wenzelm
parents: 63497
diff changeset
    58
  then obtain u l where "l \<in> s" "\<forall>b\<in>s. l \<le> b" "u \<in> s" "\<forall>b\<in>s. b \<le> u"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    59
    using insert by auto
63540
f8652d0534fa tuned proofs -- avoid unstructured calculation;
wenzelm
parents: 63497
diff changeset
    60
  with * show "\<exists>a\<in>insert b s. \<forall>x\<in>insert b s. a \<le> x" "\<exists>a\<in>insert b s. \<forall>x\<in>insert b s. x \<le> a"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    61
    using *[rule_format, of b u] *[rule_format, of b l] by (metis insert_iff order.trans)+
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    62
qed auto
50526
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 50514
diff changeset
    63
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
    64
lemma brouwer_compactness_lemma:
56226
29fd6bd9228e generalize some theorems
huffman
parents: 56188
diff changeset
    65
  fixes f :: "'a::metric_space \<Rightarrow> 'b::real_normed_vector"
53674
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
    66
  assumes "compact s"
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
    67
    and "continuous_on s f"
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
    68
    and "\<not> (\<exists>x\<in>s. f x = 0)"
53674
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
    69
  obtains d where "0 < d" and "\<forall>x\<in>s. d \<le> norm (f x)"
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
    70
proof (cases "s = {}")
53674
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
    71
  case True
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
    72
  show thesis
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
    73
    by (rule that [of 1]) (auto simp: True)
53674
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
    74
next
49374
b08c6312782b tuned proofs;
wenzelm
parents: 44890
diff changeset
    75
  case False
b08c6312782b tuned proofs;
wenzelm
parents: 44890
diff changeset
    76
  have "continuous_on s (norm \<circ> f)"
56371
fb9ae0727548 extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents: 56273
diff changeset
    77
    by (rule continuous_intros continuous_on_norm assms(2))+
53674
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
    78
  with False obtain x where x: "x \<in> s" "\<forall>y\<in>s. (norm \<circ> f) x \<le> (norm \<circ> f) y"
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
    79
    using continuous_attains_inf[OF assms(1), of "norm \<circ> f"]
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
    80
    unfolding o_def
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
    81
    by auto
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
    82
  have "(norm \<circ> f) x > 0"
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
    83
    using assms(3) and x(1)
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
    84
    by auto
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
    85
  then show ?thesis
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
    86
    by (rule that) (insert x(2), auto simp: o_def)
49555
fb2128470345 tuned proofs;
wenzelm
parents: 49374
diff changeset
    87
qed
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
    88
49555
fb2128470345 tuned proofs;
wenzelm
parents: 49374
diff changeset
    89
lemma kuhn_labelling_lemma:
50526
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 50514
diff changeset
    90
  fixes P Q :: "'a::euclidean_space \<Rightarrow> bool"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    91
  assumes "\<forall>x. P x \<longrightarrow> P (f x)"
50526
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 50514
diff changeset
    92
    and "\<forall>x. P x \<longrightarrow> (\<forall>i\<in>Basis. Q i \<longrightarrow> 0 \<le> x\<bullet>i \<and> x\<bullet>i \<le> 1)"
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 50514
diff changeset
    93
  shows "\<exists>l. (\<forall>x.\<forall>i\<in>Basis. l x i \<le> (1::nat)) \<and>
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 50514
diff changeset
    94
             (\<forall>x.\<forall>i\<in>Basis. P x \<and> Q i \<and> (x\<bullet>i = 0) \<longrightarrow> (l x i = 0)) \<and>
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 50514
diff changeset
    95
             (\<forall>x.\<forall>i\<in>Basis. P x \<and> Q i \<and> (x\<bullet>i = 1) \<longrightarrow> (l x i = 1)) \<and>
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    96
             (\<forall>x.\<forall>i\<in>Basis. P x \<and> Q i \<and> (l x i = 0) \<longrightarrow> x\<bullet>i \<le> f x\<bullet>i) \<and>
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    97
             (\<forall>x.\<forall>i\<in>Basis. P x \<and> Q i \<and> (l x i = 1) \<longrightarrow> f x\<bullet>i \<le> x\<bullet>i)"
49374
b08c6312782b tuned proofs;
wenzelm
parents: 44890
diff changeset
    98
proof -
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
    99
  { fix x i
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   100
    let ?R = "\<lambda>y. (P x \<and> Q i \<and> x \<bullet> i = 0 \<longrightarrow> y = (0::nat)) \<and>
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   101
        (P x \<and> Q i \<and> x \<bullet> i = 1 \<longrightarrow> y = 1) \<and>
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   102
        (P x \<and> Q i \<and> y = 0 \<longrightarrow> x \<bullet> i \<le> f x \<bullet> i) \<and>
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   103
        (P x \<and> Q i \<and> y = 1 \<longrightarrow> f x \<bullet> i \<le> x \<bullet> i)"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   104
    { assume "P x" "Q i" "i \<in> Basis" with assms have "0 \<le> f x \<bullet> i \<and> f x \<bullet> i \<le> 1" by auto }
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   105
    then have "i \<in> Basis \<Longrightarrow> ?R 0 \<or> ?R 1" by auto }
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   106
  then show ?thesis
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   107
    unfolding all_conj_distrib[symmetric] Ball_def (* FIXME: shouldn't this work by metis? *)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   108
    by (subst choice_iff[symmetric])+ blast
49374
b08c6312782b tuned proofs;
wenzelm
parents: 44890
diff changeset
   109
qed
b08c6312782b tuned proofs;
wenzelm
parents: 44890
diff changeset
   110
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
   111
67968
a5ad4c015d1c removed dots at the end of (sub)titles
nipkow
parents: 67682
diff changeset
   112
subsection \<open>The key "counting" observation, somewhat abstracted\<close>
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
   113
53252
4766fbe322b5 tuned proofs;
wenzelm
parents: 53248
diff changeset
   114
lemma kuhn_counting_lemma:
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   115
  fixes bnd compo compo' face S F
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   116
  defines "nF s == card {f\<in>F. face f s \<and> compo' f}"
67443
3abf6a722518 standardized towards new-style formal comments: isabelle update_comments;
wenzelm
parents: 67399
diff changeset
   117
  assumes [simp, intro]: "finite F" \<comment> \<open>faces\<close> and [simp, intro]: "finite S" \<comment> \<open>simplices\<close>
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   118
    and "\<And>f. f \<in> F \<Longrightarrow> bnd f \<Longrightarrow> card {s\<in>S. face f s} = 1"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   119
    and "\<And>f. f \<in> F \<Longrightarrow> \<not> bnd f \<Longrightarrow> card {s\<in>S. face f s} = 2"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   120
    and "\<And>s. s \<in> S \<Longrightarrow> compo s \<Longrightarrow> nF s = 1"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   121
    and "\<And>s. s \<in> S \<Longrightarrow> \<not> compo s \<Longrightarrow> nF s = 0 \<or> nF s = 2"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   122
    and "odd (card {f\<in>F. compo' f \<and> bnd f})"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   123
  shows "odd (card {s\<in>S. compo s})"
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
   124
proof -
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   125
  have "(\<Sum>s | s \<in> S \<and> \<not> compo s. nF s) + (\<Sum>s | s \<in> S \<and> compo s. nF s) = (\<Sum>s\<in>S. nF s)"
64267
b9a1486e79be setsum -> sum
nipkow
parents: 64122
diff changeset
   126
    by (subst sum.union_disjoint[symmetric]) (auto intro!: sum.cong)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   127
  also have "\<dots> = (\<Sum>s\<in>S. card {f \<in> {f\<in>F. compo' f \<and> bnd f}. face f s}) +
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   128
                  (\<Sum>s\<in>S. card {f \<in> {f\<in>F. compo' f \<and> \<not> bnd f}. face f s})"
64267
b9a1486e79be setsum -> sum
nipkow
parents: 64122
diff changeset
   129
    unfolding sum.distrib[symmetric]
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   130
    by (subst card_Un_disjoint[symmetric])
64267
b9a1486e79be setsum -> sum
nipkow
parents: 64122
diff changeset
   131
       (auto simp: nF_def intro!: sum.cong arg_cong[where f=card])
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   132
  also have "\<dots> = 1 * card {f\<in>F. compo' f \<and> bnd f} + 2 * card {f\<in>F. compo' f \<and> \<not> bnd f}"
67399
eab6ce8368fa ran isabelle update_op on all sources
nipkow
parents: 66939
diff changeset
   133
    using assms(4,5) by (fastforce intro!: arg_cong2[where f="(+)"] sum_multicount)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   134
  finally have "odd ((\<Sum>s | s \<in> S \<and> \<not> compo s. nF s) + card {s\<in>S. compo s})"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   135
    using assms(6,8) by simp
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   136
  moreover have "(\<Sum>s | s \<in> S \<and> \<not> compo s. nF s) =
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   137
    (\<Sum>s | s \<in> S \<and> \<not> compo s \<and> nF s = 0. nF s) + (\<Sum>s | s \<in> S \<and> \<not> compo s \<and> nF s = 2. nF s)"
64267
b9a1486e79be setsum -> sum
nipkow
parents: 64122
diff changeset
   138
    using assms(7) by (subst sum.union_disjoint[symmetric]) (fastforce intro!: sum.cong)+
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
   139
  ultimately show ?thesis
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
   140
    by auto
53186
0f4d9df1eaec tuned proofs;
wenzelm
parents: 53185
diff changeset
   141
qed
0f4d9df1eaec tuned proofs;
wenzelm
parents: 53185
diff changeset
   142
67968
a5ad4c015d1c removed dots at the end of (sub)titles
nipkow
parents: 67682
diff changeset
   143
subsection \<open>The odd/even result for faces of complete vertices, generalized\<close>
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   144
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   145
lemma kuhn_complete_lemma:
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   146
  assumes [simp]: "finite simplices"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   147
    and face: "\<And>f s. face f s \<longleftrightarrow> (\<exists>a\<in>s. f = s - {a})"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   148
    and card_s[simp]:  "\<And>s. s \<in> simplices \<Longrightarrow> card s = n + 2"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   149
    and rl_bd: "\<And>s. s \<in> simplices \<Longrightarrow> rl ` s \<subseteq> {..Suc n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   150
    and bnd: "\<And>f s. s \<in> simplices \<Longrightarrow> face f s \<Longrightarrow> bnd f \<Longrightarrow> card {s\<in>simplices. face f s} = 1"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   151
    and nbnd: "\<And>f s. s \<in> simplices \<Longrightarrow> face f s \<Longrightarrow> \<not> bnd f \<Longrightarrow> card {s\<in>simplices. face f s} = 2"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   152
    and odd_card: "odd (card {f. (\<exists>s\<in>simplices. face f s) \<and> rl ` f = {..n} \<and> bnd f})"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   153
  shows "odd (card {s\<in>simplices. (rl ` s = {..Suc n})})"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   154
proof (rule kuhn_counting_lemma)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   155
  have finite_s[simp]: "\<And>s. s \<in> simplices \<Longrightarrow> finite s"
61609
77b453bd616f Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents: 61520
diff changeset
   156
    by (metis add_is_0 zero_neq_numeral card_infinite assms(3))
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   157
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   158
  let ?F = "{f. \<exists>s\<in>simplices. face f s}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   159
  have F_eq: "?F = (\<Union>s\<in>simplices. \<Union>a\<in>s. {s - {a}})"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   160
    by (auto simp: face)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   161
  show "finite ?F"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   162
    using \<open>finite simplices\<close> unfolding F_eq by auto
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   163
60421
92d9557fb78c misc tuning;
wenzelm
parents: 60420
diff changeset
   164
  show "card {s \<in> simplices. face f s} = 1" if "f \<in> ?F" "bnd f" for f
60449
229bad93377e renamed "prems" to "that";
wenzelm
parents: 60421
diff changeset
   165
    using bnd that by auto
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   166
60421
92d9557fb78c misc tuning;
wenzelm
parents: 60420
diff changeset
   167
  show "card {s \<in> simplices. face f s} = 2" if "f \<in> ?F" "\<not> bnd f" for f
60449
229bad93377e renamed "prems" to "that";
wenzelm
parents: 60421
diff changeset
   168
    using nbnd that by auto
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   169
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   170
  show "odd (card {f \<in> {f. \<exists>s\<in>simplices. face f s}. rl ` f = {..n} \<and> bnd f})"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   171
    using odd_card by simp
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   172
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   173
  fix s assume s[simp]: "s \<in> simplices"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   174
  let ?S = "{f \<in> {f. \<exists>s\<in>simplices. face f s}. face f s \<and> rl ` f = {..n}}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   175
  have "?S = (\<lambda>a. s - {a}) ` {a\<in>s. rl ` (s - {a}) = {..n}}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   176
    using s by (fastforce simp: face)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   177
  then have card_S: "card ?S = card {a\<in>s. rl ` (s - {a}) = {..n}}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   178
    by (auto intro!: card_image inj_onI)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   179
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   180
  { assume rl: "rl ` s = {..Suc n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   181
    then have inj_rl: "inj_on rl s"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   182
      by (intro eq_card_imp_inj_on) auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   183
    moreover obtain a where "rl a = Suc n" "a \<in> s"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   184
      by (metis atMost_iff image_iff le_Suc_eq rl)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   185
    ultimately have n: "{..n} = rl ` (s - {a})"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
   186
      by (auto simp: inj_on_image_set_diff Diff_subset rl)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   187
    have "{a\<in>s. rl ` (s - {a}) = {..n}} = {a}"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
   188
      using inj_rl \<open>a \<in> s\<close> by (auto simp: n inj_on_image_eq_iff[OF inj_rl] Diff_subset)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   189
    then show "card ?S = 1"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   190
      unfolding card_S by simp }
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   191
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   192
  { assume rl: "rl ` s \<noteq> {..Suc n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   193
    show "card ?S = 0 \<or> card ?S = 2"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   194
    proof cases
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   195
      assume *: "{..n} \<subseteq> rl ` s"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   196
      with rl rl_bd[OF s] have rl_s: "rl ` s = {..n}"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
   197
        by (auto simp: atMost_Suc subset_insert_iff split: if_split_asm)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   198
      then have "\<not> inj_on rl s"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   199
        by (intro pigeonhole) simp
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   200
      then obtain a b where ab: "a \<in> s" "b \<in> s" "rl a = rl b" "a \<noteq> b"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   201
        by (auto simp: inj_on_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   202
      then have eq: "rl ` (s - {a}) = rl ` s"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   203
        by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   204
      with ab have inj: "inj_on rl (s - {a})"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
   205
        by (intro eq_card_imp_inj_on) (auto simp: rl_s card_Diff_singleton_if)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   206
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   207
      { fix x assume "x \<in> s" "x \<notin> {a, b}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   208
        then have "rl ` s - {rl x} = rl ` ((s - {a}) - {x})"
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59765
diff changeset
   209
          by (auto simp: eq Diff_subset inj_on_image_set_diff[OF inj])
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   210
        also have "\<dots> = rl ` (s - {x})"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   211
          using ab \<open>x \<notin> {a, b}\<close> by auto
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   212
        also assume "\<dots> = rl ` s"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   213
        finally have False
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   214
          using \<open>x\<in>s\<close> by auto }
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   215
      moreover
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   216
      { fix x assume "x \<in> {a, b}" with ab have "x \<in> s \<and> rl ` (s - {x}) = rl ` s"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   217
          by (simp add: set_eq_iff image_iff Bex_def) metis }
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   218
      ultimately have "{a\<in>s. rl ` (s - {a}) = {..n}} = {a, b}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   219
        unfolding rl_s[symmetric] by fastforce
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   220
      with \<open>a \<noteq> b\<close> show "card ?S = 0 \<or> card ?S = 2"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   221
        unfolding card_S by simp
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   222
    next
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   223
      assume "\<not> {..n} \<subseteq> rl ` s"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   224
      then have "\<And>x. rl ` (s - {x}) \<noteq> {..n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   225
        by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   226
      then show "card ?S = 0 \<or> card ?S = 2"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   227
        unfolding card_S by simp
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   228
    qed }
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   229
qed fact
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   230
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   231
locale kuhn_simplex =
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   232
  fixes p n and base upd and s :: "(nat \<Rightarrow> nat) set"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   233
  assumes base: "base \<in> {..< n} \<rightarrow> {..< p}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   234
  assumes base_out: "\<And>i. n \<le> i \<Longrightarrow> base i = p"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   235
  assumes upd: "bij_betw upd {..< n} {..< n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   236
  assumes s_pre: "s = (\<lambda>i j. if j \<in> upd`{..< i} then Suc (base j) else base j) ` {.. n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   237
begin
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   238
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   239
definition "enum i j = (if j \<in> upd`{..< i} then Suc (base j) else base j)"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   240
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   241
lemma s_eq: "s = enum ` {.. n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   242
  unfolding s_pre enum_def[abs_def] ..
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   243
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   244
lemma upd_space: "i < n \<Longrightarrow> upd i < n"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   245
  using upd by (auto dest!: bij_betwE)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   246
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   247
lemma s_space: "s \<subseteq> {..< n} \<rightarrow> {.. p}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   248
proof -
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   249
  { fix i assume "i \<le> n" then have "enum i \<in> {..< n} \<rightarrow> {.. p}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   250
    proof (induct i)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   251
      case 0 then show ?case
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   252
        using base by (auto simp: Pi_iff less_imp_le enum_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   253
    next
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   254
      case (Suc i) with base show ?case
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   255
        by (auto simp: Pi_iff Suc_le_eq less_imp_le enum_def intro: upd_space)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   256
    qed }
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   257
  then show ?thesis
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   258
    by (auto simp: s_eq)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   259
qed
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   260
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   261
lemma inj_upd: "inj_on upd {..< n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   262
  using upd by (simp add: bij_betw_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   263
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   264
lemma inj_enum: "inj_on enum {.. n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   265
proof -
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   266
  { fix x y :: nat assume "x \<noteq> y" "x \<le> n" "y \<le> n"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   267
    with upd have "upd ` {..< x} \<noteq> upd ` {..< y}"
61609
77b453bd616f Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents: 61520
diff changeset
   268
      by (subst inj_on_image_eq_iff[where C="{..< n}"]) (auto simp: bij_betw_def)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   269
    then have "enum x \<noteq> enum y"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
   270
      by (auto simp: enum_def fun_eq_iff) }
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   271
  then show ?thesis
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   272
    by (auto simp: inj_on_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   273
qed
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   274
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   275
lemma enum_0: "enum 0 = base"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   276
  by (simp add: enum_def[abs_def])
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   277
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   278
lemma base_in_s: "base \<in> s"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   279
  unfolding s_eq by (subst enum_0[symmetric]) auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   280
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   281
lemma enum_in: "i \<le> n \<Longrightarrow> enum i \<in> s"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   282
  unfolding s_eq by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   283
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   284
lemma one_step:
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   285
  assumes a: "a \<in> s" "j < n"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   286
  assumes *: "\<And>a'. a' \<in> s \<Longrightarrow> a' \<noteq> a \<Longrightarrow> a' j = p'"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   287
  shows "a j \<noteq> p'"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   288
proof
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   289
  assume "a j = p'"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   290
  with * a have "\<And>a'. a' \<in> s \<Longrightarrow> a' j = p'"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   291
    by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   292
  then have "\<And>i. i \<le> n \<Longrightarrow> enum i j = p'"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   293
    unfolding s_eq by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   294
  from this[of 0] this[of n] have "j \<notin> upd ` {..< n}"
62390
842917225d56 more canonical names
nipkow
parents: 62061
diff changeset
   295
    by (auto simp: enum_def fun_eq_iff split: if_split_asm)
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   296
  with upd \<open>j < n\<close> show False
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   297
    by (auto simp: bij_betw_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   298
qed
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   299
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   300
lemma upd_inj: "i < n \<Longrightarrow> j < n \<Longrightarrow> upd i = upd j \<longleftrightarrow> i = j"
61520
8f85bb443d33 Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents: 61284
diff changeset
   301
  using upd by (auto simp: bij_betw_def inj_on_eq_iff)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   302
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   303
lemma upd_surj: "upd ` {..< n} = {..< n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   304
  using upd by (auto simp: bij_betw_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   305
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   306
lemma in_upd_image: "A \<subseteq> {..< n} \<Longrightarrow> i < n \<Longrightarrow> upd i \<in> upd ` A \<longleftrightarrow> i \<in> A"
61520
8f85bb443d33 Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents: 61284
diff changeset
   307
  using inj_on_image_mem_iff[of upd "{..< n}"] upd
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   308
  by (auto simp: bij_betw_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   309
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   310
lemma enum_inj: "i \<le> n \<Longrightarrow> j \<le> n \<Longrightarrow> enum i = enum j \<longleftrightarrow> i = j"
61520
8f85bb443d33 Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents: 61284
diff changeset
   311
  using inj_enum by (auto simp: inj_on_eq_iff)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   312
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   313
lemma in_enum_image: "A \<subseteq> {.. n} \<Longrightarrow> i \<le> n \<Longrightarrow> enum i \<in> enum ` A \<longleftrightarrow> i \<in> A"
61520
8f85bb443d33 Cauchy's integral formula, required lemmas, and a bit of reorganisation
paulson <lp15@cam.ac.uk>
parents: 61284
diff changeset
   314
  using inj_on_image_mem_iff[OF inj_enum] by auto
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   315
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   316
lemma enum_mono: "i \<le> n \<Longrightarrow> j \<le> n \<Longrightarrow> enum i \<le> enum j \<longleftrightarrow> i \<le> j"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   317
  by (auto simp: enum_def le_fun_def in_upd_image Ball_def[symmetric])
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   318
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   319
lemma enum_strict_mono: "i \<le> n \<Longrightarrow> j \<le> n \<Longrightarrow> enum i < enum j \<longleftrightarrow> i < j"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
   320
  using enum_mono[of i j] enum_inj[of i j] by (auto simp: le_less)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   321
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   322
lemma chain: "a \<in> s \<Longrightarrow> b \<in> s \<Longrightarrow> a \<le> b \<or> b \<le> a"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   323
  by (auto simp: s_eq enum_mono)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   324
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   325
lemma less: "a \<in> s \<Longrightarrow> b \<in> s \<Longrightarrow> a i < b i \<Longrightarrow> a < b"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   326
  using chain[of a b] by (auto simp: less_fun_def le_fun_def not_le[symmetric])
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   327
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   328
lemma enum_0_bot: "a \<in> s \<Longrightarrow> a = enum 0 \<longleftrightarrow> (\<forall>a'\<in>s. a \<le> a')"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   329
  unfolding s_eq by (auto simp: enum_mono Ball_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   330
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   331
lemma enum_n_top: "a \<in> s \<Longrightarrow> a = enum n \<longleftrightarrow> (\<forall>a'\<in>s. a' \<le> a)"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   332
  unfolding s_eq by (auto simp: enum_mono Ball_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   333
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   334
lemma enum_Suc: "i < n \<Longrightarrow> enum (Suc i) = (enum i)(upd i := Suc (enum i (upd i)))"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   335
  by (auto simp: fun_eq_iff enum_def upd_inj)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   336
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   337
lemma enum_eq_p: "i \<le> n \<Longrightarrow> n \<le> j \<Longrightarrow> enum i j = p"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   338
  by (induct i) (auto simp: enum_Suc enum_0 base_out upd_space not_less[symmetric])
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   339
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   340
lemma out_eq_p: "a \<in> s \<Longrightarrow> n \<le> j \<Longrightarrow> a j = p"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
   341
  unfolding s_eq by (auto simp: enum_eq_p)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   342
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   343
lemma s_le_p: "a \<in> s \<Longrightarrow> a j \<le> p"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   344
  using out_eq_p[of a j] s_space by (cases "j < n") auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   345
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   346
lemma le_Suc_base: "a \<in> s \<Longrightarrow> a j \<le> Suc (base j)"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   347
  unfolding s_eq by (auto simp: enum_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   348
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   349
lemma base_le: "a \<in> s \<Longrightarrow> base j \<le> a j"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   350
  unfolding s_eq by (auto simp: enum_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   351
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   352
lemma enum_le_p: "i \<le> n \<Longrightarrow> j < n \<Longrightarrow> enum i j \<le> p"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   353
  using enum_in[of i] s_space by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   354
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   355
lemma enum_less: "a \<in> s \<Longrightarrow> i < n \<Longrightarrow> enum i < a \<longleftrightarrow> enum (Suc i) \<le> a"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   356
  unfolding s_eq by (auto simp: enum_strict_mono enum_mono)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   357
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   358
lemma ksimplex_0:
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   359
  "n = 0 \<Longrightarrow> s = {(\<lambda>x. p)}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   360
  using s_eq enum_def base_out by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   361
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   362
lemma replace_0:
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   363
  assumes "j < n" "a \<in> s" and p: "\<forall>x\<in>s - {a}. x j = 0" and "x \<in> s"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   364
  shows "x \<le> a"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   365
proof cases
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   366
  assume "x \<noteq> a"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   367
  have "a j \<noteq> 0"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   368
    using assms by (intro one_step[where a=a]) auto
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   369
  with less[OF \<open>x\<in>s\<close> \<open>a\<in>s\<close>, of j] p[rule_format, of x] \<open>x \<in> s\<close> \<open>x \<noteq> a\<close>
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   370
  show ?thesis
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   371
    by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   372
qed simp
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   373
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   374
lemma replace_1:
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   375
  assumes "j < n" "a \<in> s" and p: "\<forall>x\<in>s - {a}. x j = p" and "x \<in> s"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   376
  shows "a \<le> x"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   377
proof cases
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   378
  assume "x \<noteq> a"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   379
  have "a j \<noteq> p"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   380
    using assms by (intro one_step[where a=a]) auto
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   381
  with enum_le_p[of _ j] \<open>j < n\<close> \<open>a\<in>s\<close>
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   382
  have "a j < p"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   383
    by (auto simp: less_le s_eq)
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   384
  with less[OF \<open>a\<in>s\<close> \<open>x\<in>s\<close>, of j] p[rule_format, of x] \<open>x \<in> s\<close> \<open>x \<noteq> a\<close>
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   385
  show ?thesis
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   386
    by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   387
qed simp
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   388
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   389
end
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   390
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   391
locale kuhn_simplex_pair = s: kuhn_simplex p n b_s u_s s + t: kuhn_simplex p n b_t u_t t
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   392
  for p n b_s u_s s b_t u_t t
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   393
begin
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   394
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   395
lemma enum_eq:
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   396
  assumes l: "i \<le> l" "l \<le> j" and "j + d \<le> n"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   397
  assumes eq: "s.enum ` {i .. j} = t.enum ` {i + d .. j + d}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   398
  shows "s.enum l = t.enum (l + d)"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   399
using l proof (induct l rule: dec_induct)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   400
  case base
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   401
  then have s: "s.enum i \<in> t.enum ` {i + d .. j + d}" and t: "t.enum (i + d) \<in> s.enum ` {i .. j}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   402
    using eq by auto
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   403
  from t \<open>i \<le> j\<close> \<open>j + d \<le> n\<close> have "s.enum i \<le> t.enum (i + d)"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   404
    by (auto simp: s.enum_mono)
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   405
  moreover from s \<open>i \<le> j\<close> \<open>j + d \<le> n\<close> have "t.enum (i + d) \<le> s.enum i"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   406
    by (auto simp: t.enum_mono)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   407
  ultimately show ?case
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   408
    by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   409
next
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   410
  case (step l)
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   411
  moreover from step.prems \<open>j + d \<le> n\<close> have
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   412
      "s.enum l < s.enum (Suc l)"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   413
      "t.enum (l + d) < t.enum (Suc l + d)"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   414
    by (simp_all add: s.enum_strict_mono t.enum_strict_mono)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   415
  moreover have
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   416
      "s.enum (Suc l) \<in> t.enum ` {i + d .. j + d}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   417
      "t.enum (Suc l + d) \<in> s.enum ` {i .. j}"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   418
    using step \<open>j + d \<le> n\<close> eq by (auto simp: s.enum_inj t.enum_inj)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   419
  ultimately have "s.enum (Suc l) = t.enum (Suc (l + d))"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   420
    using \<open>j + d \<le> n\<close>
61609
77b453bd616f Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents: 61520
diff changeset
   421
    by (intro antisym s.enum_less[THEN iffD1] t.enum_less[THEN iffD1])
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   422
       (auto intro!: s.enum_in t.enum_in)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   423
  then show ?case by simp
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   424
qed
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   425
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   426
lemma ksimplex_eq_bot:
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   427
  assumes a: "a \<in> s" "\<And>a'. a' \<in> s \<Longrightarrow> a \<le> a'"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   428
  assumes b: "b \<in> t" "\<And>b'. b' \<in> t \<Longrightarrow> b \<le> b'"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   429
  assumes eq: "s - {a} = t - {b}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   430
  shows "s = t"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   431
proof cases
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   432
  assume "n = 0" with s.ksimplex_0 t.ksimplex_0 show ?thesis by simp
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   433
next
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   434
  assume "n \<noteq> 0"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   435
  have "s.enum 0 = (s.enum (Suc 0)) (u_s 0 := s.enum (Suc 0) (u_s 0) - 1)"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   436
       "t.enum 0 = (t.enum (Suc 0)) (u_t 0 := t.enum (Suc 0) (u_t 0) - 1)"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   437
    using \<open>n \<noteq> 0\<close> by (simp_all add: s.enum_Suc t.enum_Suc)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   438
  moreover have e0: "a = s.enum 0" "b = t.enum 0"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   439
    using a b by (simp_all add: s.enum_0_bot t.enum_0_bot)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   440
  moreover
61609
77b453bd616f Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents: 61520
diff changeset
   441
  { fix j assume "0 < j" "j \<le> n"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   442
    moreover have "s - {a} = s.enum ` {Suc 0 .. n}" "t - {b} = t.enum ` {Suc 0 .. n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   443
      unfolding s.s_eq t.s_eq e0 by (auto simp: s.enum_inj t.enum_inj)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   444
    ultimately have "s.enum j = t.enum j"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   445
      using enum_eq[of "1" j n 0] eq by auto }
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   446
  note enum_eq = this
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   447
  then have "s.enum (Suc 0) = t.enum (Suc 0)"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   448
    using \<open>n \<noteq> 0\<close> by auto
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   449
  moreover
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   450
  { fix j assume "Suc j < n"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   451
    with enum_eq[of "Suc j"] enum_eq[of "Suc (Suc j)"]
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   452
    have "u_s (Suc j) = u_t (Suc j)"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   453
      using s.enum_Suc[of "Suc j"] t.enum_Suc[of "Suc j"]
62390
842917225d56 more canonical names
nipkow
parents: 62061
diff changeset
   454
      by (auto simp: fun_eq_iff split: if_split_asm) }
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   455
  then have "\<And>j. 0 < j \<Longrightarrow> j < n \<Longrightarrow> u_s j = u_t j"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   456
    by (auto simp: gr0_conv_Suc)
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   457
  with \<open>n \<noteq> 0\<close> have "u_t 0 = u_s 0"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   458
    by (intro bij_betw_singleton_eq[OF t.upd s.upd, of 0]) auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   459
  ultimately have "a = b"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   460
    by simp
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   461
  with assms show "s = t"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   462
    by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   463
qed
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   464
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   465
lemma ksimplex_eq_top:
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   466
  assumes a: "a \<in> s" "\<And>a'. a' \<in> s \<Longrightarrow> a' \<le> a"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   467
  assumes b: "b \<in> t" "\<And>b'. b' \<in> t \<Longrightarrow> b' \<le> b"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   468
  assumes eq: "s - {a} = t - {b}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   469
  shows "s = t"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   470
proof (cases n)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   471
  assume "n = 0" with s.ksimplex_0 t.ksimplex_0 show ?thesis by simp
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   472
next
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   473
  case (Suc n')
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   474
  have "s.enum n = (s.enum n') (u_s n' := Suc (s.enum n' (u_s n')))"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   475
       "t.enum n = (t.enum n') (u_t n' := Suc (t.enum n' (u_t n')))"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   476
    using Suc by (simp_all add: s.enum_Suc t.enum_Suc)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   477
  moreover have en: "a = s.enum n" "b = t.enum n"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   478
    using a b by (simp_all add: s.enum_n_top t.enum_n_top)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   479
  moreover
61609
77b453bd616f Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents: 61520
diff changeset
   480
  { fix j assume "j < n"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   481
    moreover have "s - {a} = s.enum ` {0 .. n'}" "t - {b} = t.enum ` {0 .. n'}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   482
      unfolding s.s_eq t.s_eq en by (auto simp: s.enum_inj t.enum_inj Suc)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   483
    ultimately have "s.enum j = t.enum j"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   484
      using enum_eq[of "0" j n' 0] eq Suc by auto }
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   485
  note enum_eq = this
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   486
  then have "s.enum n' = t.enum n'"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   487
    using Suc by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   488
  moreover
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   489
  { fix j assume "j < n'"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   490
    with enum_eq[of j] enum_eq[of "Suc j"]
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   491
    have "u_s j = u_t j"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   492
      using s.enum_Suc[of j] t.enum_Suc[of j]
62390
842917225d56 more canonical names
nipkow
parents: 62061
diff changeset
   493
      by (auto simp: Suc fun_eq_iff split: if_split_asm) }
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   494
  then have "\<And>j. j < n' \<Longrightarrow> u_s j = u_t j"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   495
    by (auto simp: gr0_conv_Suc)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   496
  then have "u_t n' = u_s n'"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   497
    by (intro bij_betw_singleton_eq[OF t.upd s.upd, of n']) (auto simp: Suc)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   498
  ultimately have "a = b"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   499
    by simp
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   500
  with assms show "s = t"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   501
    by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   502
qed
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   503
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   504
end
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   505
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   506
inductive ksimplex for p n :: nat where
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   507
  ksimplex: "kuhn_simplex p n base upd s \<Longrightarrow> ksimplex p n s"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   508
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   509
lemma finite_ksimplexes: "finite {s. ksimplex p n s}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   510
proof (rule finite_subset)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   511
  { fix a s assume "ksimplex p n s" "a \<in> s"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   512
    then obtain b u where "kuhn_simplex p n b u s" by (auto elim: ksimplex.cases)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   513
    then interpret kuhn_simplex p n b u s .
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   514
    from s_space \<open>a \<in> s\<close> out_eq_p[OF \<open>a \<in> s\<close>]
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   515
    have "a \<in> (\<lambda>f x. if n \<le> x then p else f x) ` ({..< n} \<rightarrow>\<^sub>E {.. p})"
62390
842917225d56 more canonical names
nipkow
parents: 62061
diff changeset
   516
      by (auto simp: image_iff subset_eq Pi_iff split: if_split_asm
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   517
               intro!: bexI[of _ "restrict a {..< n}"]) }
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   518
  then show "{s. ksimplex p n s} \<subseteq> Pow ((\<lambda>f x. if n \<le> x then p else f x) ` ({..< n} \<rightarrow>\<^sub>E {.. p}))"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   519
    by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   520
qed (simp add: finite_PiE)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   521
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   522
lemma ksimplex_card:
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   523
  assumes "ksimplex p n s" shows "card s = Suc n"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   524
using assms proof cases
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   525
  case (ksimplex u b)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   526
  then interpret kuhn_simplex p n u b s .
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   527
  show ?thesis
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   528
    by (simp add: card_image s_eq inj_enum)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   529
qed
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   530
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   531
lemma simplex_top_face:
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   532
  assumes "0 < p" "\<forall>x\<in>s'. x n = p"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   533
  shows "ksimplex p n s' \<longleftrightarrow> (\<exists>s a. ksimplex p (Suc n) s \<and> a \<in> s \<and> s' = s - {a})"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   534
  using assms
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   535
proof safe
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   536
  fix s a assume "ksimplex p (Suc n) s" and a: "a \<in> s" and na: "\<forall>x\<in>s - {a}. x n = p"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   537
  then show "ksimplex p n (s - {a})"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   538
  proof cases
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   539
    case (ksimplex base upd)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   540
    then interpret kuhn_simplex p "Suc n" base upd "s" .
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   541
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   542
    have "a n < p"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   543
      using one_step[of a n p] na \<open>a\<in>s\<close> s_space by (auto simp: less_le)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   544
    then have "a = enum 0"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   545
      using \<open>a \<in> s\<close> na by (subst enum_0_bot) (auto simp: le_less intro!: less[of a _ n])
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   546
    then have s_eq: "s - {a} = enum ` Suc ` {.. n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   547
      using s_eq by (simp add: atMost_Suc_eq_insert_0 insert_ident Zero_notin_Suc in_enum_image subset_eq)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   548
    then have "enum 1 \<in> s - {a}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   549
      by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   550
    then have "upd 0 = n"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   551
      using \<open>a n < p\<close> \<open>a = enum 0\<close> na[rule_format, of "enum 1"]
62390
842917225d56 more canonical names
nipkow
parents: 62061
diff changeset
   552
      by (auto simp: fun_eq_iff enum_Suc split: if_split_asm)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   553
    then have "bij_betw upd (Suc ` {..< n}) {..< n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   554
      using upd
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   555
      by (subst notIn_Un_bij_betw3[where b=0])
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   556
         (auto simp: lessThan_Suc[symmetric] lessThan_Suc_eq_insert_0)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   557
    then have "bij_betw (upd\<circ>Suc) {..<n} {..<n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   558
      by (rule bij_betw_trans[rotated]) (auto simp: bij_betw_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   559
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   560
    have "a n = p - 1"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   561
      using enum_Suc[of 0] na[rule_format, OF \<open>enum 1 \<in> s - {a}\<close>] \<open>a = enum 0\<close> by (auto simp: \<open>upd 0 = n\<close>)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   562
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   563
    show ?thesis
61169
4de9ff3ea29a tuned proofs -- less legacy;
wenzelm
parents: 60580
diff changeset
   564
    proof (rule ksimplex.intros, standard)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   565
      show "bij_betw (upd\<circ>Suc) {..< n} {..< n}" by fact
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   566
      show "base(n := p) \<in> {..<n} \<rightarrow> {..<p}" "\<And>i. n\<le>i \<Longrightarrow> (base(n := p)) i = p"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   567
        using base base_out by (auto simp: Pi_iff)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   568
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   569
      have "\<And>i. Suc ` {..< i} = {..< Suc i} - {0}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   570
        by (auto simp: image_iff Ball_def) arith
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   571
      then have upd_Suc: "\<And>i. i \<le> n \<Longrightarrow> (upd\<circ>Suc) ` {..< i} = upd ` {..< Suc i} - {n}"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   572
        using \<open>upd 0 = n\<close> upd_inj
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
   573
        by (auto simp: image_comp[symmetric] inj_on_image_set_diff[OF inj_upd])
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   574
      have n_in_upd: "\<And>i. n \<in> upd ` {..< Suc i}"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   575
        using \<open>upd 0 = n\<close> by auto
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   576
63040
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 62948
diff changeset
   577
      define f' where "f' i j =
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 62948
diff changeset
   578
        (if j \<in> (upd\<circ>Suc)`{..< i} then Suc ((base(n := p)) j) else (base(n := p)) j)" for i j
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   579
      { fix x i assume i[arith]: "i \<le> n" then have "enum (Suc i) x = f' i x"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   580
          unfolding f'_def enum_def using \<open>a n < p\<close> \<open>a = enum 0\<close> \<open>upd 0 = n\<close> \<open>a n = p - 1\<close>
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   581
          by (simp add: upd_Suc enum_0 n_in_upd) }
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   582
      then show "s - {a} = f' ` {.. n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   583
        unfolding s_eq image_comp by (intro image_cong) auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   584
    qed
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   585
  qed
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   586
next
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   587
  assume "ksimplex p n s'" and *: "\<forall>x\<in>s'. x n = p"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   588
  then show "\<exists>s a. ksimplex p (Suc n) s \<and> a \<in> s \<and> s' = s - {a}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   589
  proof cases
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   590
    case (ksimplex base upd)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   591
    then interpret kuhn_simplex p n base upd s' .
63040
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 62948
diff changeset
   592
    define b where "b = base (n := p - 1)"
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 62948
diff changeset
   593
    define u where "u i = (case i of 0 \<Rightarrow> n | Suc i \<Rightarrow> upd i)" for i
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   594
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   595
    have "ksimplex p (Suc n) (s' \<union> {b})"
61169
4de9ff3ea29a tuned proofs -- less legacy;
wenzelm
parents: 60580
diff changeset
   596
    proof (rule ksimplex.intros, standard)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   597
      show "b \<in> {..<Suc n} \<rightarrow> {..<p}"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   598
        using base \<open>0 < p\<close> unfolding lessThan_Suc b_def by (auto simp: PiE_iff)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   599
      show "\<And>i. Suc n \<le> i \<Longrightarrow> b i = p"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   600
        using base_out by (auto simp: b_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   601
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   602
      have "bij_betw u (Suc ` {..< n} \<union> {0}) ({..<n} \<union> {u 0})"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   603
        using upd
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   604
        by (intro notIn_Un_bij_betw) (auto simp: u_def bij_betw_def image_comp comp_def inj_on_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   605
      then show "bij_betw u {..<Suc n} {..<Suc n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   606
        by (simp add: u_def lessThan_Suc[symmetric] lessThan_Suc_eq_insert_0)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   607
63040
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 62948
diff changeset
   608
      define f' where "f' i j = (if j \<in> u`{..< i} then Suc (b j) else b j)" for i j
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   609
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   610
      have u_eq: "\<And>i. i \<le> n \<Longrightarrow> u ` {..< Suc i} = upd ` {..< i} \<union> { n }"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   611
        by (auto simp: u_def image_iff upd_inj Ball_def split: nat.split) arith
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   612
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   613
      { fix x have "x \<le> n \<Longrightarrow> n \<notin> upd ` {..<x}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   614
          using upd_space by (simp add: image_iff neq_iff) }
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   615
      note n_not_upd = this
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   616
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   617
      have *: "f' ` {.. Suc n} = f' ` (Suc ` {.. n} \<union> {0})"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   618
        unfolding atMost_Suc_eq_insert_0 by simp
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   619
      also have "\<dots> = (f' \<circ> Suc) ` {.. n} \<union> {b}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   620
        by (auto simp: f'_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   621
      also have "(f' \<circ> Suc) ` {.. n} = s'"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   622
        using \<open>0 < p\<close> base_out[of n]
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   623
        unfolding s_eq enum_def[abs_def] f'_def[abs_def] upd_space
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   624
        by (intro image_cong) (simp_all add: u_eq b_def fun_eq_iff n_not_upd)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   625
      finally show "s' \<union> {b} = f' ` {.. Suc n}" ..
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   626
    qed
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   627
    moreover have "b \<notin> s'"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   628
      using * \<open>0 < p\<close> by (auto simp: b_def)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   629
    ultimately show ?thesis by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   630
  qed
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   631
qed
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   632
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   633
lemma ksimplex_replace_0:
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   634
  assumes s: "ksimplex p n s" and a: "a \<in> s"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   635
  assumes j: "j < n" and p: "\<forall>x\<in>s - {a}. x j = 0"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   636
  shows "card {s'. ksimplex p n s' \<and> (\<exists>b\<in>s'. s' - {b} = s - {a})} = 1"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   637
  using s
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   638
proof cases
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   639
  case (ksimplex b_s u_s)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   640
61609
77b453bd616f Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents: 61520
diff changeset
   641
  { fix t b assume "ksimplex p n t"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   642
    then obtain b_t u_t where "kuhn_simplex p n b_t u_t t"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   643
      by (auto elim: ksimplex.cases)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   644
    interpret kuhn_simplex_pair p n b_s u_s s b_t u_t t
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   645
      by intro_locales fact+
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   646
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   647
    assume b: "b \<in> t" "t - {b} = s - {a}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   648
    with a j p s.replace_0[of _ a] t.replace_0[of _ b] have "s = t"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   649
      by (intro ksimplex_eq_top[of a b]) auto }
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   650
  then have "{s'. ksimplex p n s' \<and> (\<exists>b\<in>s'. s' - {b} = s - {a})} = {s}"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   651
    using s \<open>a \<in> s\<close> by auto
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   652
  then show ?thesis
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   653
    by simp
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   654
qed
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   655
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   656
lemma ksimplex_replace_1:
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   657
  assumes s: "ksimplex p n s" and a: "a \<in> s"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   658
  assumes j: "j < n" and p: "\<forall>x\<in>s - {a}. x j = p"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   659
  shows "card {s'. ksimplex p n s' \<and> (\<exists>b\<in>s'. s' - {b} = s - {a})} = 1"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   660
  using s
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   661
proof cases
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   662
  case (ksimplex b_s u_s)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   663
61609
77b453bd616f Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents: 61520
diff changeset
   664
  { fix t b assume "ksimplex p n t"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   665
    then obtain b_t u_t where "kuhn_simplex p n b_t u_t t"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   666
      by (auto elim: ksimplex.cases)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   667
    interpret kuhn_simplex_pair p n b_s u_s s b_t u_t t
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   668
      by intro_locales fact+
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   669
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   670
    assume b: "b \<in> t" "t - {b} = s - {a}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   671
    with a j p s.replace_1[of _ a] t.replace_1[of _ b] have "s = t"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   672
      by (intro ksimplex_eq_bot[of a b]) auto }
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   673
  then have "{s'. ksimplex p n s' \<and> (\<exists>b\<in>s'. s' - {b} = s - {a})} = {s}"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   674
    using s \<open>a \<in> s\<close> by auto
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   675
  then show ?thesis
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   676
    by simp
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   677
qed
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   678
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   679
lemma card_2_exists: "card s = 2 \<longleftrightarrow> (\<exists>x\<in>s. \<exists>y\<in>s. x \<noteq> y \<and> (\<forall>z\<in>s. z = x \<or> z = y))"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
   680
  by (auto simp: card_Suc_eq eval_nat_numeral)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   681
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   682
lemma ksimplex_replace_2:
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   683
  assumes s: "ksimplex p n s" and "a \<in> s" and "n \<noteq> 0"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   684
    and lb: "\<forall>j<n. \<exists>x\<in>s - {a}. x j \<noteq> 0"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   685
    and ub: "\<forall>j<n. \<exists>x\<in>s - {a}. x j \<noteq> p"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   686
  shows "card {s'. ksimplex p n s' \<and> (\<exists>b\<in>s'. s' - {b} = s - {a})} = 2"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   687
  using s
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   688
proof cases
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   689
  case (ksimplex base upd)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   690
  then interpret kuhn_simplex p n base upd s .
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   691
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   692
  from \<open>a \<in> s\<close> obtain i where "i \<le> n" "a = enum i"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   693
    unfolding s_eq by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   694
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   695
  from \<open>i \<le> n\<close> have "i = 0 \<or> i = n \<or> (0 < i \<and> i < n)"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   696
    by linarith
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   697
  then have "\<exists>!s'. s' \<noteq> s \<and> ksimplex p n s' \<and> (\<exists>b\<in>s'. s - {a} = s'- {b})"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   698
  proof (elim disjE conjE)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   699
    assume "i = 0"
63040
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 62948
diff changeset
   700
    define rot where [abs_def]: "rot i = (if i + 1 = n then 0 else i + 1)" for i
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   701
    let ?upd = "upd \<circ> rot"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   702
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   703
    have rot: "bij_betw rot {..< n} {..< n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   704
      by (auto simp: bij_betw_def inj_on_def image_iff Ball_def rot_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   705
         arith+
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   706
    from rot upd have "bij_betw ?upd {..<n} {..<n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   707
      by (rule bij_betw_trans)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   708
63040
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 62948
diff changeset
   709
    define f' where [abs_def]: "f' i j =
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 62948
diff changeset
   710
      (if j \<in> ?upd`{..< i} then Suc (enum (Suc 0) j) else enum (Suc 0) j)" for i j
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   711
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   712
    interpret b: kuhn_simplex p n "enum (Suc 0)" "upd \<circ> rot" "f' ` {.. n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   713
    proof
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   714
      from \<open>a = enum i\<close> ub \<open>n \<noteq> 0\<close> \<open>i = 0\<close>
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   715
      obtain i' where "i' \<le> n" "enum i' \<noteq> enum 0" "enum i' (upd 0) \<noteq> p"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   716
        unfolding s_eq by (auto intro: upd_space simp: enum_inj)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   717
      then have "enum 1 \<le> enum i'" "enum i' (upd 0) < p"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
   718
        using enum_le_p[of i' "upd 0"] by (auto simp: enum_inj enum_mono upd_space)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   719
      then have "enum 1 (upd 0) < p"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
   720
        by (auto simp: le_fun_def intro: le_less_trans)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   721
      then show "enum (Suc 0) \<in> {..<n} \<rightarrow> {..<p}"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
   722
        using base \<open>n \<noteq> 0\<close> by (auto simp: enum_0 enum_Suc PiE_iff extensional_def upd_space)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   723
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   724
      { fix i assume "n \<le> i" then show "enum (Suc 0) i = p"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   725
        using \<open>n \<noteq> 0\<close> by (auto simp: enum_eq_p) }
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   726
      show "bij_betw ?upd {..<n} {..<n}" by fact
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   727
    qed (simp add: f'_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   728
    have ks_f': "ksimplex p n (f' ` {.. n})"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   729
      by rule unfold_locales
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   730
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   731
    have b_enum: "b.enum = f'" unfolding f'_def b.enum_def[abs_def] ..
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   732
    with b.inj_enum have inj_f': "inj_on f' {.. n}" by simp
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   733
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   734
    have [simp]: "\<And>j. j < n \<Longrightarrow> rot ` {..< j} = {0 <..< Suc j}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   735
      by (auto simp: rot_def image_iff Ball_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   736
         arith
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   737
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   738
    { fix j assume j: "j < n"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   739
      from j \<open>n \<noteq> 0\<close> have "f' j = enum (Suc j)"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
   740
        by (auto simp: f'_def enum_def upd_inj in_upd_image image_comp[symmetric] fun_eq_iff) }
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   741
    note f'_eq_enum = this
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   742
    then have "enum ` Suc ` {..< n} = f' ` {..< n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   743
      by (force simp: enum_inj)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   744
    also have "Suc ` {..< n} = {.. n} - {0}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   745
      by (auto simp: image_iff Ball_def) arith
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   746
    also have "{..< n} = {.. n} - {n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   747
      by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   748
    finally have eq: "s - {a} = f' ` {.. n} - {f' n}"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   749
      unfolding s_eq \<open>a = enum i\<close> \<open>i = 0\<close>
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59765
diff changeset
   750
      by (simp add: Diff_subset inj_on_image_set_diff[OF inj_enum] inj_on_image_set_diff[OF inj_f'])
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   751
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   752
    have "enum 0 < f' 0"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   753
      using \<open>n \<noteq> 0\<close> by (simp add: enum_strict_mono f'_eq_enum)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   754
    also have "\<dots> < f' n"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   755
      using \<open>n \<noteq> 0\<close> b.enum_strict_mono[of 0 n] unfolding b_enum by simp
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   756
    finally have "a \<noteq> f' n"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   757
      using \<open>a = enum i\<close> \<open>i = 0\<close> by auto
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   758
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   759
    { fix t c assume "ksimplex p n t" "c \<in> t" and eq_sma: "s - {a} = t - {c}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   760
      obtain b u where "kuhn_simplex p n b u t"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   761
        using \<open>ksimplex p n t\<close> by (auto elim: ksimplex.cases)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   762
      then interpret t: kuhn_simplex p n b u t .
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   763
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   764
      { fix x assume "x \<in> s" "x \<noteq> a"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   765
         then have "x (upd 0) = enum (Suc 0) (upd 0)"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   766
           by (auto simp: \<open>a = enum i\<close> \<open>i = 0\<close> s_eq enum_def enum_inj) }
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   767
      then have eq_upd0: "\<forall>x\<in>t-{c}. x (upd 0) = enum (Suc 0) (upd 0)"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   768
        unfolding eq_sma[symmetric] by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   769
      then have "c (upd 0) \<noteq> enum (Suc 0) (upd 0)"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   770
        using \<open>n \<noteq> 0\<close> by (intro t.one_step[OF \<open>c\<in>t\<close> ]) (auto simp: upd_space)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   771
      then have "c (upd 0) < enum (Suc 0) (upd 0) \<or> c (upd 0) > enum (Suc 0) (upd 0)"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   772
        by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   773
      then have "t = s \<or> t = f' ` {..n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   774
      proof (elim disjE conjE)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   775
        assume *: "c (upd 0) < enum (Suc 0) (upd 0)"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   776
        interpret st: kuhn_simplex_pair p n base upd s b u t ..
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   777
        { fix x assume "x \<in> t" with * \<open>c\<in>t\<close> eq_upd0[rule_format, of x] have "c \<le> x"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   778
            by (auto simp: le_less intro!: t.less[of _ _ "upd 0"]) }
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   779
        note top = this
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   780
        have "s = t"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   781
          using \<open>a = enum i\<close> \<open>i = 0\<close> \<open>c \<in> t\<close>
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   782
          by (intro st.ksimplex_eq_bot[OF _ _ _ _ eq_sma])
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   783
             (auto simp: s_eq enum_mono t.s_eq t.enum_mono top)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   784
        then show ?thesis by simp
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   785
      next
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   786
        assume *: "c (upd 0) > enum (Suc 0) (upd 0)"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   787
        interpret st: kuhn_simplex_pair p n "enum (Suc 0)" "upd \<circ> rot" "f' ` {.. n}" b u t ..
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   788
        have eq: "f' ` {..n} - {f' n} = t - {c}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   789
          using eq_sma eq by simp
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   790
        { fix x assume "x \<in> t" with * \<open>c\<in>t\<close> eq_upd0[rule_format, of x] have "x \<le> c"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   791
            by (auto simp: le_less intro!: t.less[of _ _ "upd 0"]) }
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   792
        note top = this
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   793
        have "f' ` {..n} = t"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   794
          using \<open>a = enum i\<close> \<open>i = 0\<close> \<open>c \<in> t\<close>
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   795
          by (intro st.ksimplex_eq_top[OF _ _ _ _ eq])
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   796
             (auto simp: b.s_eq b.enum_mono t.s_eq t.enum_mono b_enum[symmetric] top)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   797
        then show ?thesis by simp
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   798
      qed }
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   799
    with ks_f' eq \<open>a \<noteq> f' n\<close> \<open>n \<noteq> 0\<close> show ?thesis
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   800
      apply (intro ex1I[of _ "f' ` {.. n}"])
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   801
      apply auto []
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   802
      apply metis
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   803
      done
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   804
  next
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   805
    assume "i = n"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   806
    from \<open>n \<noteq> 0\<close> obtain n' where n': "n = Suc n'"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   807
      by (cases n) auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   808
63040
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 62948
diff changeset
   809
    define rot where "rot i = (case i of 0 \<Rightarrow> n' | Suc i \<Rightarrow> i)" for i
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   810
    let ?upd = "upd \<circ> rot"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   811
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   812
    have rot: "bij_betw rot {..< n} {..< n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   813
      by (auto simp: bij_betw_def inj_on_def image_iff Bex_def rot_def n' split: nat.splits)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   814
         arith
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   815
    from rot upd have "bij_betw ?upd {..<n} {..<n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   816
      by (rule bij_betw_trans)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   817
63040
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 62948
diff changeset
   818
    define b where "b = base (upd n' := base (upd n') - 1)"
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 62948
diff changeset
   819
    define f' where [abs_def]: "f' i j = (if j \<in> ?upd`{..< i} then Suc (b j) else b j)" for i j
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   820
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   821
    interpret b: kuhn_simplex p n b "upd \<circ> rot" "f' ` {.. n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   822
    proof
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   823
      { fix i assume "n \<le> i" then show "b i = p"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   824
          using base_out[of i] upd_space[of n'] by (auto simp: b_def n') }
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   825
      show "b \<in> {..<n} \<rightarrow> {..<p}"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   826
        using base \<open>n \<noteq> 0\<close> upd_space[of n']
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   827
        by (auto simp: b_def PiE_def Pi_iff Ball_def upd_space extensional_def n')
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   828
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   829
      show "bij_betw ?upd {..<n} {..<n}" by fact
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   830
    qed (simp add: f'_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   831
    have f': "b.enum = f'" unfolding f'_def b.enum_def[abs_def] ..
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   832
    have ks_f': "ksimplex p n (b.enum ` {.. n})"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   833
      unfolding f' by rule unfold_locales
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   834
61609
77b453bd616f Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents: 61520
diff changeset
   835
    have "0 < n"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   836
      using \<open>n \<noteq> 0\<close> by auto
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   837
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   838
    { from \<open>a = enum i\<close> \<open>n \<noteq> 0\<close> \<open>i = n\<close> lb upd_space[of n']
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   839
      obtain i' where "i' \<le> n" "enum i' \<noteq> enum n" "0 < enum i' (upd n')"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   840
        unfolding s_eq by (auto simp: enum_inj n')
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   841
      moreover have "enum i' (upd n') = base (upd n')"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   842
        unfolding enum_def using \<open>i' \<le> n\<close> \<open>enum i' \<noteq> enum n\<close> by (auto simp: n' upd_inj enum_inj)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   843
      ultimately have "0 < base (upd n')"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   844
        by auto }
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   845
    then have benum1: "b.enum (Suc 0) = base"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   846
      unfolding b.enum_Suc[OF \<open>0<n\<close>] b.enum_0 by (auto simp: b_def rot_def)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   847
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   848
    have [simp]: "\<And>j. Suc j < n \<Longrightarrow> rot ` {..< Suc j} = {n'} \<union> {..< j}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   849
      by (auto simp: rot_def image_iff Ball_def split: nat.splits)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   850
    have rot_simps: "\<And>j. rot (Suc j) = j" "rot 0 = n'"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   851
      by (simp_all add: rot_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   852
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   853
    { fix j assume j: "Suc j \<le> n" then have "b.enum (Suc j) = enum j"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
   854
        by (induct j) (auto simp: benum1 enum_0 b.enum_Suc enum_Suc rot_simps) }
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   855
    note b_enum_eq_enum = this
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   856
    then have "enum ` {..< n} = b.enum ` Suc ` {..< n}"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
   857
      by (auto simp: image_comp intro!: image_cong)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   858
    also have "Suc ` {..< n} = {.. n} - {0}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   859
      by (auto simp: image_iff Ball_def) arith
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   860
    also have "{..< n} = {.. n} - {n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   861
      by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   862
    finally have eq: "s - {a} = b.enum ` {.. n} - {b.enum 0}"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   863
      unfolding s_eq \<open>a = enum i\<close> \<open>i = n\<close>
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59765
diff changeset
   864
      using inj_on_image_set_diff[OF inj_enum Diff_subset, of "{n}"]
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59765
diff changeset
   865
            inj_on_image_set_diff[OF b.inj_enum Diff_subset, of "{0}"]
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
   866
      by (simp add: comp_def)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   867
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   868
    have "b.enum 0 \<le> b.enum n"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   869
      by (simp add: b.enum_mono)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   870
    also have "b.enum n < enum n"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   871
      using \<open>n \<noteq> 0\<close> by (simp add: enum_strict_mono b_enum_eq_enum n')
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   872
    finally have "a \<noteq> b.enum 0"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   873
      using \<open>a = enum i\<close> \<open>i = n\<close> by auto
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   874
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   875
    { fix t c assume "ksimplex p n t" "c \<in> t" and eq_sma: "s - {a} = t - {c}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   876
      obtain b' u where "kuhn_simplex p n b' u t"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   877
        using \<open>ksimplex p n t\<close> by (auto elim: ksimplex.cases)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   878
      then interpret t: kuhn_simplex p n b' u t .
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   879
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   880
      { fix x assume "x \<in> s" "x \<noteq> a"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   881
         then have "x (upd n') = enum n' (upd n')"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   882
           by (auto simp: \<open>a = enum i\<close> n' \<open>i = n\<close> s_eq enum_def enum_inj in_upd_image) }
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   883
      then have eq_upd0: "\<forall>x\<in>t-{c}. x (upd n') = enum n' (upd n')"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   884
        unfolding eq_sma[symmetric] by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   885
      then have "c (upd n') \<noteq> enum n' (upd n')"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   886
        using \<open>n \<noteq> 0\<close> by (intro t.one_step[OF \<open>c\<in>t\<close> ]) (auto simp: n' upd_space[unfolded n'])
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   887
      then have "c (upd n') < enum n' (upd n') \<or> c (upd n') > enum n' (upd n')"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   888
        by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   889
      then have "t = s \<or> t = b.enum ` {..n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   890
      proof (elim disjE conjE)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   891
        assume *: "c (upd n') > enum n' (upd n')"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   892
        interpret st: kuhn_simplex_pair p n base upd s b' u t ..
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   893
        { fix x assume "x \<in> t" with * \<open>c\<in>t\<close> eq_upd0[rule_format, of x] have "x \<le> c"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   894
            by (auto simp: le_less intro!: t.less[of _ _ "upd n'"]) }
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   895
        note top = this
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   896
        have "s = t"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   897
          using \<open>a = enum i\<close> \<open>i = n\<close> \<open>c \<in> t\<close>
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   898
          by (intro st.ksimplex_eq_top[OF _ _ _ _ eq_sma])
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   899
             (auto simp: s_eq enum_mono t.s_eq t.enum_mono top)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   900
        then show ?thesis by simp
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   901
      next
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   902
        assume *: "c (upd n') < enum n' (upd n')"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   903
        interpret st: kuhn_simplex_pair p n b "upd \<circ> rot" "f' ` {.. n}" b' u t ..
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   904
        have eq: "f' ` {..n} - {b.enum 0} = t - {c}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   905
          using eq_sma eq f' by simp
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   906
        { fix x assume "x \<in> t" with * \<open>c\<in>t\<close> eq_upd0[rule_format, of x] have "c \<le> x"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   907
            by (auto simp: le_less intro!: t.less[of _ _ "upd n'"]) }
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   908
        note bot = this
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   909
        have "f' ` {..n} = t"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   910
          using \<open>a = enum i\<close> \<open>i = n\<close> \<open>c \<in> t\<close>
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   911
          by (intro st.ksimplex_eq_bot[OF _ _ _ _ eq])
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   912
             (auto simp: b.s_eq b.enum_mono t.s_eq t.enum_mono bot)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   913
        with f' show ?thesis by simp
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   914
      qed }
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   915
    with ks_f' eq \<open>a \<noteq> b.enum 0\<close> \<open>n \<noteq> 0\<close> show ?thesis
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   916
      apply (intro ex1I[of _ "b.enum ` {.. n}"])
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   917
      apply auto []
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   918
      apply metis
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   919
      done
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   920
  next
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   921
    assume i: "0 < i" "i < n"
63040
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 62948
diff changeset
   922
    define i' where "i' = i - 1"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   923
    with i have "Suc i' < n"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   924
      by simp
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   925
    with i have Suc_i': "Suc i' = i"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   926
      by (simp add: i'_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   927
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   928
    let ?upd = "Fun.swap i' i upd"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   929
    from i upd have "bij_betw ?upd {..< n} {..< n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   930
      by (subst bij_betw_swap_iff) (auto simp: i'_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   931
63040
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 62948
diff changeset
   932
    define f' where [abs_def]: "f' i j = (if j \<in> ?upd`{..< i} then Suc (base j) else base j)"
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 62948
diff changeset
   933
      for i j
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   934
    interpret b: kuhn_simplex p n base ?upd "f' ` {.. n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   935
    proof
67682
00c436488398 tuned proofs -- prefer explicit names for facts from 'interpret';
wenzelm
parents: 67673
diff changeset
   936
      show "base \<in> {..<n} \<rightarrow> {..<p}" by (rule base)
00c436488398 tuned proofs -- prefer explicit names for facts from 'interpret';
wenzelm
parents: 67673
diff changeset
   937
      { fix i assume "n \<le> i" then show "base i = p" by (rule base_out) }
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   938
      show "bij_betw ?upd {..<n} {..<n}" by fact
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   939
    qed (simp add: f'_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   940
    have f': "b.enum = f'" unfolding f'_def b.enum_def[abs_def] ..
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   941
    have ks_f': "ksimplex p n (b.enum ` {.. n})"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   942
      unfolding f' by rule unfold_locales
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   943
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   944
    have "{i} \<subseteq> {..n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   945
      using i by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   946
    { fix j assume "j \<le> n"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   947
      moreover have "j < i \<or> i = j \<or> i < j" by arith
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   948
      moreover note i
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   949
      ultimately have "enum j = b.enum j \<longleftrightarrow> j \<noteq> i"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   950
        unfolding enum_def[abs_def] b.enum_def[abs_def]
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
   951
        by (auto simp: fun_eq_iff swap_image i'_def
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   952
                           in_upd_image inj_on_image_set_diff[OF inj_upd]) }
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   953
    note enum_eq_benum = this
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   954
    then have "enum ` ({.. n} - {i}) = b.enum ` ({.. n} - {i})"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   955
      by (intro image_cong) auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   956
    then have eq: "s - {a} = b.enum ` {.. n} - {b.enum i}"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   957
      unfolding s_eq \<open>a = enum i\<close>
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   958
      using inj_on_image_set_diff[OF inj_enum Diff_subset \<open>{i} \<subseteq> {..n}\<close>]
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   959
            inj_on_image_set_diff[OF b.inj_enum Diff_subset \<open>{i} \<subseteq> {..n}\<close>]
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   960
      by (simp add: comp_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   961
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   962
    have "a \<noteq> b.enum i"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   963
      using \<open>a = enum i\<close> enum_eq_benum i by auto
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   964
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   965
    { fix t c assume "ksimplex p n t" "c \<in> t" and eq_sma: "s - {a} = t - {c}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   966
      obtain b' u where "kuhn_simplex p n b' u t"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   967
        using \<open>ksimplex p n t\<close> by (auto elim: ksimplex.cases)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   968
      then interpret t: kuhn_simplex p n b' u t .
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   969
      have "enum i' \<in> s - {a}" "enum (i + 1) \<in> s - {a}"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   970
        using \<open>a = enum i\<close> i enum_in by (auto simp: enum_inj i'_def)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   971
      then obtain l k where
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   972
        l: "t.enum l = enum i'" "l \<le> n" "t.enum l \<noteq> c" and
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   973
        k: "t.enum k = enum (i + 1)" "k \<le> n" "t.enum k \<noteq> c"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   974
        unfolding eq_sma by (auto simp: t.s_eq)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   975
      with i have "t.enum l < t.enum k"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   976
        by (simp add: enum_strict_mono i'_def)
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   977
      with \<open>l \<le> n\<close> \<open>k \<le> n\<close> have "l < k"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   978
        by (simp add: t.enum_strict_mono)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   979
      { assume "Suc l = k"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   980
        have "enum (Suc (Suc i')) = t.enum (Suc l)"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   981
          using i by (simp add: k \<open>Suc l = k\<close> i'_def)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   982
        then have False
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   983
          using \<open>l < k\<close> \<open>k \<le> n\<close> \<open>Suc i' < n\<close>
62390
842917225d56 more canonical names
nipkow
parents: 62061
diff changeset
   984
          by (auto simp: t.enum_Suc enum_Suc l upd_inj fun_eq_iff split: if_split_asm)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   985
             (metis Suc_lessD n_not_Suc_n upd_inj) }
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   986
      with \<open>l < k\<close> have "Suc l < k"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   987
        by arith
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   988
      have c_eq: "c = t.enum (Suc l)"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   989
      proof (rule ccontr)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   990
        assume "c \<noteq> t.enum (Suc l)"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   991
        then have "t.enum (Suc l) \<in> s - {a}"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   992
          using \<open>l < k\<close> \<open>k \<le> n\<close> by (simp add: t.s_eq eq_sma)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   993
        then obtain j where "t.enum (Suc l) = enum j" "j \<le> n" "enum j \<noteq> enum i"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   994
          unfolding s_eq \<open>a = enum i\<close> by auto
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   995
        with i have "t.enum (Suc l) \<le> t.enum l \<or> t.enum k \<le> t.enum (Suc l)"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
   996
          by (auto simp: i'_def enum_mono enum_inj l k)
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   997
        with \<open>Suc l < k\<close> \<open>k \<le> n\<close> show False
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   998
          by (simp add: t.enum_mono)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
   999
      qed
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1000
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1001
      { have "t.enum (Suc (Suc l)) \<in> s - {a}"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1002
          unfolding eq_sma c_eq t.s_eq using \<open>Suc l < k\<close> \<open>k \<le> n\<close> by (auto simp: t.enum_inj)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1003
        then obtain j where eq: "t.enum (Suc (Suc l)) = enum j" and "j \<le> n" "j \<noteq> i"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1004
          by (auto simp: s_eq \<open>a = enum i\<close>)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1005
        moreover have "enum i' < t.enum (Suc (Suc l))"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1006
          unfolding l(1)[symmetric] using \<open>Suc l < k\<close> \<open>k \<le> n\<close> by (auto simp: t.enum_strict_mono)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1007
        ultimately have "i' < j"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1008
          using i by (simp add: enum_strict_mono i'_def)
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1009
        with \<open>j \<noteq> i\<close> \<open>j \<le> n\<close> have "t.enum k \<le> t.enum (Suc (Suc l))"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1010
          unfolding i'_def by (simp add: enum_mono k eq)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1011
        then have "k \<le> Suc (Suc l)"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1012
          using \<open>k \<le> n\<close> \<open>Suc l < k\<close> by (simp add: t.enum_mono) }
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1013
      with \<open>Suc l < k\<close> have "Suc (Suc l) = k" by simp
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1014
      then have "enum (Suc (Suc i')) = t.enum (Suc (Suc l))"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1015
        using i by (simp add: k i'_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1016
      also have "\<dots> = (enum i') (u l := Suc (enum i' (u l)), u (Suc l) := Suc (enum i' (u (Suc l))))"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1017
        using \<open>Suc l < k\<close> \<open>k \<le> n\<close> by (simp add: t.enum_Suc l t.upd_inj)
61609
77b453bd616f Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents: 61520
diff changeset
  1018
      finally have "(u l = upd i' \<and> u (Suc l) = upd (Suc i')) \<or>
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1019
        (u l = upd (Suc i') \<and> u (Suc l) = upd i')"
62390
842917225d56 more canonical names
nipkow
parents: 62061
diff changeset
  1020
        using \<open>Suc i' < n\<close> by (auto simp: enum_Suc fun_eq_iff split: if_split_asm)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1021
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1022
      then have "t = s \<or> t = b.enum ` {..n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1023
      proof (elim disjE conjE)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1024
        assume u: "u l = upd i'"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1025
        have "c = t.enum (Suc l)" unfolding c_eq ..
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1026
        also have "t.enum (Suc l) = enum (Suc i')"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1027
          using u \<open>l < k\<close> \<open>k \<le> n\<close> \<open>Suc i' < n\<close> by (simp add: enum_Suc t.enum_Suc l)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1028
        also have "\<dots> = a"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1029
          using \<open>a = enum i\<close> i by (simp add: i'_def)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1030
        finally show ?thesis
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1031
          using eq_sma \<open>a \<in> s\<close> \<open>c \<in> t\<close> by auto
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1032
      next
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1033
        assume u: "u l = upd (Suc i')"
63040
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 62948
diff changeset
  1034
        define B where "B = b.enum ` {..n}"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1035
        have "b.enum i' = enum i'"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1036
          using enum_eq_benum[of i'] i by (auto simp: i'_def gr0_conv_Suc)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1037
        have "c = t.enum (Suc l)" unfolding c_eq ..
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1038
        also have "t.enum (Suc l) = b.enum (Suc i')"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1039
          using u \<open>l < k\<close> \<open>k \<le> n\<close> \<open>Suc i' < n\<close>
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1040
          by (simp_all add: enum_Suc t.enum_Suc l b.enum_Suc \<open>b.enum i' = enum i'\<close> swap_apply1)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1041
             (simp add: Suc_i')
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1042
        also have "\<dots> = b.enum i"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1043
          using i by (simp add: i'_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1044
        finally have "c = b.enum i" .
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1045
        then have "t - {c} = B - {c}" "c \<in> B"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1046
          unfolding eq_sma[symmetric] eq B_def using i by auto
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1047
        with \<open>c \<in> t\<close> have "t = B"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1048
          by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1049
        then show ?thesis
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1050
          by (simp add: B_def)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1051
      qed }
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1052
    with ks_f' eq \<open>a \<noteq> b.enum i\<close> \<open>n \<noteq> 0\<close> \<open>i \<le> n\<close> show ?thesis
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1053
      apply (intro ex1I[of _ "b.enum ` {.. n}"])
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1054
      apply auto []
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1055
      apply metis
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1056
      done
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1057
  qed
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1058
  then show ?thesis
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1059
    using s \<open>a \<in> s\<close> by (simp add: card_2_exists Ex1_def) metis
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1060
qed
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1061
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1062
text \<open>Hence another step towards concreteness.\<close>
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1063
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1064
lemma kuhn_simplex_lemma:
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1065
  assumes "\<forall>s. ksimplex p (Suc n) s \<longrightarrow> rl ` s \<subseteq> {.. Suc n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1066
    and "odd (card {f. \<exists>s a. ksimplex p (Suc n) s \<and> a \<in> s \<and> (f = s - {a}) \<and>
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1067
      rl ` f = {..n} \<and> ((\<exists>j\<le>n. \<forall>x\<in>f. x j = 0) \<or> (\<exists>j\<le>n. \<forall>x\<in>f. x j = p))})"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1068
  shows "odd (card {s. ksimplex p (Suc n) s \<and> rl ` s = {..Suc n}})"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1069
proof (rule kuhn_complete_lemma[OF finite_ksimplexes refl, unfolded mem_Collect_eq,
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1070
    where bnd="\<lambda>f. (\<exists>j\<in>{..n}. \<forall>x\<in>f. x j = 0) \<or> (\<exists>j\<in>{..n}. \<forall>x\<in>f. x j = p)"],
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1071
    safe del: notI)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1072
53186
0f4d9df1eaec tuned proofs;
wenzelm
parents: 53185
diff changeset
  1073
  have *: "\<And>x y. x = y \<Longrightarrow> odd (card x) \<Longrightarrow> odd (card y)"
0f4d9df1eaec tuned proofs;
wenzelm
parents: 53185
diff changeset
  1074
    by auto
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1075
  show "odd (card {f. (\<exists>s\<in>{s. ksimplex p (Suc n) s}. \<exists>a\<in>s. f = s - {a}) \<and>
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1076
    rl ` f = {..n} \<and> ((\<exists>j\<in>{..n}. \<forall>x\<in>f. x j = 0) \<or> (\<exists>j\<in>{..n}. \<forall>x\<in>f. x j = p))})"
53186
0f4d9df1eaec tuned proofs;
wenzelm
parents: 53185
diff changeset
  1077
    apply (rule *[OF _ assms(2)])
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1078
    apply (auto simp: atLeast0AtMost)
53186
0f4d9df1eaec tuned proofs;
wenzelm
parents: 53185
diff changeset
  1079
    done
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1080
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1081
next
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1082
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1083
  fix s assume s: "ksimplex p (Suc n) s"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1084
  then show "card s = n + 2"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1085
    by (simp add: ksimplex_card)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1086
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1087
  fix a assume a: "a \<in> s" then show "rl a \<le> Suc n"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1088
    using assms(1) s by (auto simp: subset_eq)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1089
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1090
  let ?S = "{t. ksimplex p (Suc n) t \<and> (\<exists>b\<in>t. s - {a} = t - {b})}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1091
  { fix j assume j: "j \<le> n" "\<forall>x\<in>s - {a}. x j = 0"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1092
    with s a show "card ?S = 1"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1093
      using ksimplex_replace_0[of p "n + 1" s a j]
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1094
      by (subst eq_commute) simp }
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1095
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1096
  { fix j assume j: "j \<le> n" "\<forall>x\<in>s - {a}. x j = p"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1097
    with s a show "card ?S = 1"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1098
      using ksimplex_replace_1[of p "n + 1" s a j]
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1099
      by (subst eq_commute) simp }
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1100
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1101
  { assume "card ?S \<noteq> 2" "\<not> (\<exists>j\<in>{..n}. \<forall>x\<in>s - {a}. x j = p)"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1102
    with s a show "\<exists>j\<in>{..n}. \<forall>x\<in>s - {a}. x j = 0"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1103
      using ksimplex_replace_2[of p "n + 1" s a]
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1104
      by (subst (asm) eq_commute) auto }
53186
0f4d9df1eaec tuned proofs;
wenzelm
parents: 53185
diff changeset
  1105
qed
0f4d9df1eaec tuned proofs;
wenzelm
parents: 53185
diff changeset
  1106
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1107
subsection \<open>Reduced labelling\<close>
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1108
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1109
definition reduced :: "nat \<Rightarrow> (nat \<Rightarrow> nat) \<Rightarrow> nat" where "reduced n x = (LEAST k. k = n \<or> x k \<noteq> 0)"
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1110
53186
0f4d9df1eaec tuned proofs;
wenzelm
parents: 53185
diff changeset
  1111
lemma reduced_labelling:
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1112
  shows "reduced n x \<le> n"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1113
    and "\<forall>i<reduced n x. x i = 0"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1114
    and "reduced n x = n \<or> x (reduced n x) \<noteq> 0"
53186
0f4d9df1eaec tuned proofs;
wenzelm
parents: 53185
diff changeset
  1115
proof -
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1116
  show "reduced n x \<le> n"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1117
    unfolding reduced_def by (rule LeastI2_wellorder[where a=n]) auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1118
  show "\<forall>i<reduced n x. x i = 0"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1119
    unfolding reduced_def by (rule LeastI2_wellorder[where a=n]) fastforce+
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1120
  show "reduced n x = n \<or> x (reduced n x) \<noteq> 0"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1121
    unfolding reduced_def by (rule LeastI2_wellorder[where a=n]) fastforce+
53186
0f4d9df1eaec tuned proofs;
wenzelm
parents: 53185
diff changeset
  1122
qed
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1123
53186
0f4d9df1eaec tuned proofs;
wenzelm
parents: 53185
diff changeset
  1124
lemma reduced_labelling_unique:
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1125
  "r \<le> n \<Longrightarrow> \<forall>i<r. x i = 0 \<Longrightarrow> r = n \<or> x r \<noteq> 0 \<Longrightarrow> reduced n x = r"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1126
 unfolding reduced_def by (rule LeastI2_wellorder[where a=n]) (metis le_less not_le)+
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1127
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1128
lemma reduced_labelling_zero: "j < n \<Longrightarrow> x j = 0 \<Longrightarrow> reduced n x \<noteq> j"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1129
  using reduced_labelling[of n x] by auto
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1130
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1131
lemma reduce_labelling_zero[simp]: "reduced 0 x = 0"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1132
  by (rule reduced_labelling_unique) auto
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1133
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1134
lemma reduced_labelling_nonzero: "j < n \<Longrightarrow> x j \<noteq> 0 \<Longrightarrow> reduced n x \<le> j"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1135
  using reduced_labelling[of n x] by (elim allE[where x=j]) auto
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1136
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1137
lemma reduced_labelling_Suc: "reduced (Suc n) x \<noteq> Suc n \<Longrightarrow> reduced (Suc n) x = reduced n x"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1138
  using reduced_labelling[of "Suc n" x]
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1139
  by (intro reduced_labelling_unique[symmetric]) auto
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1140
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1141
lemma complete_face_top:
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1142
  assumes "\<forall>x\<in>f. \<forall>j\<le>n. x j = 0 \<longrightarrow> lab x j = 0"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1143
    and "\<forall>x\<in>f. \<forall>j\<le>n. x j = p \<longrightarrow> lab x j = 1"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1144
    and eq: "(reduced (Suc n) \<circ> lab) ` f = {..n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1145
  shows "((\<exists>j\<le>n. \<forall>x\<in>f. x j = 0) \<or> (\<exists>j\<le>n. \<forall>x\<in>f. x j = p)) \<longleftrightarrow> (\<forall>x\<in>f. x n = p)"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1146
proof (safe del: disjCI)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1147
  fix x j assume j: "j \<le> n" "\<forall>x\<in>f. x j = 0"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1148
  { fix x assume "x \<in> f" with assms j have "reduced (Suc n) (lab x) \<noteq> j"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1149
      by (intro reduced_labelling_zero) auto }
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1150
  moreover have "j \<in> (reduced (Suc n) \<circ> lab) ` f"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1151
    using j eq by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1152
  ultimately show "x n = p"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1153
    by force
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1154
next
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1155
  fix x j assume j: "j \<le> n" "\<forall>x\<in>f. x j = p" and x: "x \<in> f"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1156
  have "j = n"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1157
  proof (rule ccontr)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1158
    assume "\<not> ?thesis"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1159
    { fix x assume "x \<in> f"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1160
      with assms j have "reduced (Suc n) (lab x) \<le> j"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1161
        by (intro reduced_labelling_nonzero) auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1162
      then have "reduced (Suc n) (lab x) \<noteq> n"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1163
        using \<open>j \<noteq> n\<close> \<open>j \<le> n\<close> by simp }
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1164
    moreover
61609
77b453bd616f Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents: 61520
diff changeset
  1165
    have "n \<in> (reduced (Suc n) \<circ> lab) ` f"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1166
      using eq by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1167
    ultimately show False
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1168
      by force
53186
0f4d9df1eaec tuned proofs;
wenzelm
parents: 53185
diff changeset
  1169
  qed
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1170
  moreover have "j \<in> (reduced (Suc n) \<circ> lab) ` f"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1171
    using j eq by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1172
  ultimately show "x n = p"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1173
    using j x by auto
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1174
qed auto
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1175
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1176
text \<open>Hence we get just about the nice induction.\<close>
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1177
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1178
lemma kuhn_induction:
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1179
  assumes "0 < p"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1180
    and lab_0: "\<forall>x. \<forall>j\<le>n. (\<forall>j. x j \<le> p) \<and> x j = 0 \<longrightarrow> lab x j = 0"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1181
    and lab_1: "\<forall>x. \<forall>j\<le>n. (\<forall>j. x j \<le> p) \<and> x j = p \<longrightarrow> lab x j = 1"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1182
    and odd: "odd (card {s. ksimplex p n s \<and> (reduced n\<circ>lab) ` s = {..n}})"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1183
  shows "odd (card {s. ksimplex p (Suc n) s \<and> (reduced (Suc n)\<circ>lab) ` s = {..Suc n}})"
53248
7a4b4b3b9ecd tuned proofs;
wenzelm
parents: 53186
diff changeset
  1184
proof -
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1185
  let ?rl = "reduced (Suc n) \<circ> lab" and ?ext = "\<lambda>f v. \<exists>j\<le>n. \<forall>x\<in>f. x j = v"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1186
  let ?ext = "\<lambda>s. (\<exists>j\<le>n. \<forall>x\<in>s. x j = 0) \<or> (\<exists>j\<le>n. \<forall>x\<in>s. x j = p)"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1187
  have "\<forall>s. ksimplex p (Suc n) s \<longrightarrow> ?rl ` s \<subseteq> {..Suc n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1188
    by (simp add: reduced_labelling subset_eq)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1189
  moreover
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1190
  have "{s. ksimplex p n s \<and> (reduced n \<circ> lab) ` s = {..n}} =
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1191
        {f. \<exists>s a. ksimplex p (Suc n) s \<and> a \<in> s \<and> f = s - {a} \<and> ?rl ` f = {..n} \<and> ?ext f}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1192
  proof (intro set_eqI, safe del: disjCI equalityI disjE)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1193
    fix s assume s: "ksimplex p n s" and rl: "(reduced n \<circ> lab) ` s = {..n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1194
    from s obtain u b where "kuhn_simplex p n u b s" by (auto elim: ksimplex.cases)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1195
    then interpret kuhn_simplex p n u b s .
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1196
    have all_eq_p: "\<forall>x\<in>s. x n = p"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1197
      by (auto simp: out_eq_p)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1198
    moreover
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1199
    { fix x assume "x \<in> s"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1200
      with lab_1[rule_format, of n x] all_eq_p s_le_p[of x]
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1201
      have "?rl x \<le> n"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1202
        by (auto intro!: reduced_labelling_nonzero)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1203
      then have "?rl x = reduced n (lab x)"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1204
        by (auto intro!: reduced_labelling_Suc) }
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1205
    then have "?rl ` s = {..n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1206
      using rl by (simp cong: image_cong)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1207
    moreover
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1208
    obtain t a where "ksimplex p (Suc n) t" "a \<in> t" "s = t - {a}"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1209
      using s unfolding simplex_top_face[OF \<open>0 < p\<close> all_eq_p] by auto
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1210
    ultimately
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1211
    show "\<exists>t a. ksimplex p (Suc n) t \<and> a \<in> t \<and> s = t - {a} \<and> ?rl ` s = {..n} \<and> ?ext s"
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1212
      by auto
53248
7a4b4b3b9ecd tuned proofs;
wenzelm
parents: 53186
diff changeset
  1213
  next
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1214
    fix x s a assume s: "ksimplex p (Suc n) s" and rl: "?rl ` (s - {a}) = {.. n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1215
      and a: "a \<in> s" and "?ext (s - {a})"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1216
    from s obtain u b where "kuhn_simplex p (Suc n) u b s" by (auto elim: ksimplex.cases)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1217
    then interpret kuhn_simplex p "Suc n" u b s .
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1218
    have all_eq_p: "\<forall>x\<in>s. x (Suc n) = p"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1219
      by (auto simp: out_eq_p)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1220
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1221
    { fix x assume "x \<in> s - {a}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1222
      then have "?rl x \<in> ?rl ` (s - {a})"
53248
7a4b4b3b9ecd tuned proofs;
wenzelm
parents: 53186
diff changeset
  1223
        by auto
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1224
      then have "?rl x \<le> n"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1225
        unfolding rl by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1226
      then have "?rl x = reduced n (lab x)"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1227
        by (auto intro!: reduced_labelling_Suc) }
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1228
    then show rl': "(reduced n\<circ>lab) ` (s - {a}) = {..n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1229
      unfolding rl[symmetric] by (intro image_cong) auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1230
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1231
    from \<open>?ext (s - {a})\<close>
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1232
    have all_eq_p: "\<forall>x\<in>s - {a}. x n = p"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1233
    proof (elim disjE exE conjE)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1234
      fix j assume "j \<le> n" "\<forall>x\<in>s - {a}. x j = 0"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1235
      with lab_0[rule_format, of j] all_eq_p s_le_p
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1236
      have "\<And>x. x \<in> s - {a} \<Longrightarrow> reduced (Suc n) (lab x) \<noteq> j"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1237
        by (intro reduced_labelling_zero) auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1238
      moreover have "j \<in> ?rl ` (s - {a})"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1239
        using \<open>j \<le> n\<close> unfolding rl by auto
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1240
      ultimately show ?thesis
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1241
        by force
53248
7a4b4b3b9ecd tuned proofs;
wenzelm
parents: 53186
diff changeset
  1242
    next
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1243
      fix j assume "j \<le> n" and eq_p: "\<forall>x\<in>s - {a}. x j = p"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1244
      show ?thesis
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1245
      proof cases
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1246
        assume "j = n" with eq_p show ?thesis by simp
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1247
      next
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1248
        assume "j \<noteq> n"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1249
        { fix x assume x: "x \<in> s - {a}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1250
          have "reduced n (lab x) \<le> j"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1251
          proof (rule reduced_labelling_nonzero)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1252
            show "lab x j \<noteq> 0"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1253
              using lab_1[rule_format, of j x] x s_le_p[of x] eq_p \<open>j \<le> n\<close> by auto
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1254
            show "j < n"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1255
              using \<open>j \<le> n\<close> \<open>j \<noteq> n\<close> by simp
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1256
          qed
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1257
          then have "reduced n (lab x) \<noteq> n"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1258
            using \<open>j \<le> n\<close> \<open>j \<noteq> n\<close> by simp }
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1259
        moreover have "n \<in> (reduced n\<circ>lab) ` (s - {a})"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1260
          unfolding rl' by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1261
        ultimately show ?thesis
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1262
          by force
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1263
      qed
53248
7a4b4b3b9ecd tuned proofs;
wenzelm
parents: 53186
diff changeset
  1264
    qed
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1265
    show "ksimplex p n (s - {a})"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1266
      unfolding simplex_top_face[OF \<open>0 < p\<close> all_eq_p] using s a by auto
53248
7a4b4b3b9ecd tuned proofs;
wenzelm
parents: 53186
diff changeset
  1267
  qed
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1268
  ultimately show ?thesis
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1269
    using assms by (intro kuhn_simplex_lemma) auto
53248
7a4b4b3b9ecd tuned proofs;
wenzelm
parents: 53186
diff changeset
  1270
qed
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1271
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1272
text \<open>And so we get the final combinatorial result.\<close>
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1273
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1274
lemma ksimplex_0: "ksimplex p 0 s \<longleftrightarrow> s = {(\<lambda>x. p)}"
53248
7a4b4b3b9ecd tuned proofs;
wenzelm
parents: 53186
diff changeset
  1275
proof
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1276
  assume "ksimplex p 0 s" then show "s = {(\<lambda>x. p)}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1277
    by (blast dest: kuhn_simplex.ksimplex_0 elim: ksimplex.cases)
53248
7a4b4b3b9ecd tuned proofs;
wenzelm
parents: 53186
diff changeset
  1278
next
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1279
  assume s: "s = {(\<lambda>x. p)}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1280
  show "ksimplex p 0 s"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1281
  proof (intro ksimplex, unfold_locales)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1282
    show "(\<lambda>_. p) \<in> {..<0::nat} \<rightarrow> {..<p}" by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1283
    show "bij_betw id {..<0} {..<0}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1284
      by simp
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1285
  qed (auto simp: s)
53248
7a4b4b3b9ecd tuned proofs;
wenzelm
parents: 53186
diff changeset
  1286
qed
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1287
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1288
lemma kuhn_combinatorial:
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1289
  assumes "0 < p"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1290
    and "\<forall>x j. (\<forall>j. x j \<le> p) \<and> j < n \<and> x j = 0 \<longrightarrow> lab x j = 0"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1291
    and "\<forall>x j. (\<forall>j. x j \<le> p) \<and> j < n  \<and> x j = p \<longrightarrow> lab x j = 1"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1292
  shows "odd (card {s. ksimplex p n s \<and> (reduced n\<circ>lab) ` s = {..n}})"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1293
    (is "odd (card (?M n))")
53248
7a4b4b3b9ecd tuned proofs;
wenzelm
parents: 53186
diff changeset
  1294
  using assms
7a4b4b3b9ecd tuned proofs;
wenzelm
parents: 53186
diff changeset
  1295
proof (induct n)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1296
  case 0 then show ?case
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1297
    by (simp add: ksimplex_0 cong: conj_cong)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1298
next
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1299
  case (Suc n)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1300
  then have "odd (card (?M n))"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1301
    by force
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1302
  with Suc show ?case
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1303
    using kuhn_induction[of p n] by (auto simp: comp_def)
53248
7a4b4b3b9ecd tuned proofs;
wenzelm
parents: 53186
diff changeset
  1304
qed
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1305
53248
7a4b4b3b9ecd tuned proofs;
wenzelm
parents: 53186
diff changeset
  1306
lemma kuhn_lemma:
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1307
  fixes n p :: nat
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1308
  assumes "0 < p"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1309
    and "\<forall>x. (\<forall>i<n. x i \<le> p) \<longrightarrow> (\<forall>i<n. label x i = (0::nat) \<or> label x i = 1)"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1310
    and "\<forall>x. (\<forall>i<n. x i \<le> p) \<longrightarrow> (\<forall>i<n. x i = 0 \<longrightarrow> label x i = 0)"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1311
    and "\<forall>x. (\<forall>i<n. x i \<le> p) \<longrightarrow> (\<forall>i<n. x i = p \<longrightarrow> label x i = 1)"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1312
  obtains q where "\<forall>i<n. q i < p"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1313
    and "\<forall>i<n. \<exists>r s. (\<forall>j<n. q j \<le> r j \<and> r j \<le> q j + 1) \<and> (\<forall>j<n. q j \<le> s j \<and> s j \<le> q j + 1) \<and> label r i \<noteq> label s i"
53248
7a4b4b3b9ecd tuned proofs;
wenzelm
parents: 53186
diff changeset
  1314
proof -
60580
7e741e22d7fc tuned proofs;
wenzelm
parents: 60449
diff changeset
  1315
  let ?rl = "reduced n \<circ> label"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1316
  let ?A = "{s. ksimplex p n s \<and> ?rl ` s = {..n}}"
53248
7a4b4b3b9ecd tuned proofs;
wenzelm
parents: 53186
diff changeset
  1317
  have "odd (card ?A)"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1318
    using assms by (intro kuhn_combinatorial[of p n label]) auto
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1319
  then have "?A \<noteq> {}"
60580
7e741e22d7fc tuned proofs;
wenzelm
parents: 60449
diff changeset
  1320
    by fastforce
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1321
  then obtain s b u where "kuhn_simplex p n b u s" and rl: "?rl ` s = {..n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1322
    by (auto elim: ksimplex.cases)
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1323
  interpret kuhn_simplex p n b u s by fact
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1324
53248
7a4b4b3b9ecd tuned proofs;
wenzelm
parents: 53186
diff changeset
  1325
  show ?thesis
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1326
  proof (intro that[of b] allI impI)
60580
7e741e22d7fc tuned proofs;
wenzelm
parents: 60449
diff changeset
  1327
    fix i
7e741e22d7fc tuned proofs;
wenzelm
parents: 60449
diff changeset
  1328
    assume "i < n"
7e741e22d7fc tuned proofs;
wenzelm
parents: 60449
diff changeset
  1329
    then show "b i < p"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1330
      using base by auto
53248
7a4b4b3b9ecd tuned proofs;
wenzelm
parents: 53186
diff changeset
  1331
  next
60580
7e741e22d7fc tuned proofs;
wenzelm
parents: 60449
diff changeset
  1332
    fix i
7e741e22d7fc tuned proofs;
wenzelm
parents: 60449
diff changeset
  1333
    assume "i < n"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1334
    then have "i \<in> {.. n}" "Suc i \<in> {.. n}"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1335
      by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1336
    then obtain u v where u: "u \<in> s" "Suc i = ?rl u" and v: "v \<in> s" "i = ?rl v"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1337
      unfolding rl[symmetric] by blast
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1338
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1339
    have "label u i \<noteq> label v i"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1340
      using reduced_labelling [of n "label u"] reduced_labelling [of n "label v"]
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1341
        u(2)[symmetric] v(2)[symmetric] \<open>i < n\<close>
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1342
      by auto
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1343
    moreover
60580
7e741e22d7fc tuned proofs;
wenzelm
parents: 60449
diff changeset
  1344
    have "b j \<le> u j" "u j \<le> b j + 1" "b j \<le> v j" "v j \<le> b j + 1" if "j < n" for j
7e741e22d7fc tuned proofs;
wenzelm
parents: 60449
diff changeset
  1345
      using that base_le[OF \<open>u\<in>s\<close>] le_Suc_base[OF \<open>u\<in>s\<close>] base_le[OF \<open>v\<in>s\<close>] le_Suc_base[OF \<open>v\<in>s\<close>]
7e741e22d7fc tuned proofs;
wenzelm
parents: 60449
diff changeset
  1346
      by auto
7e741e22d7fc tuned proofs;
wenzelm
parents: 60449
diff changeset
  1347
    ultimately show "\<exists>r s. (\<forall>j<n. b j \<le> r j \<and> r j \<le> b j + 1) \<and>
7e741e22d7fc tuned proofs;
wenzelm
parents: 60449
diff changeset
  1348
        (\<forall>j<n. b j \<le> s j \<and> s j \<le> b j + 1) \<and> label r i \<noteq> label s i"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1349
      by blast
53248
7a4b4b3b9ecd tuned proofs;
wenzelm
parents: 53186
diff changeset
  1350
  qed
7a4b4b3b9ecd tuned proofs;
wenzelm
parents: 53186
diff changeset
  1351
qed
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1352
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1353
subsection \<open>The main result for the unit cube\<close>
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1354
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1355
lemma kuhn_labelling_lemma':
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1356
  assumes "(\<forall>x::nat\<Rightarrow>real. P x \<longrightarrow> P (f x))"
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1357
    and "\<forall>x. P x \<longrightarrow> (\<forall>i::nat. Q i \<longrightarrow> 0 \<le> x i \<and> x i \<le> 1)"
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1358
  shows "\<exists>l. (\<forall>x i. l x i \<le> (1::nat)) \<and>
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1359
             (\<forall>x i. P x \<and> Q i \<and> x i = 0 \<longrightarrow> l x i = 0) \<and>
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1360
             (\<forall>x i. P x \<and> Q i \<and> x i = 1 \<longrightarrow> l x i = 1) \<and>
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1361
             (\<forall>x i. P x \<and> Q i \<and> l x i = 0 \<longrightarrow> x i \<le> f x i) \<and>
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1362
             (\<forall>x i. P x \<and> Q i \<and> l x i = 1 \<longrightarrow> f x i \<le> x i)"
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1363
proof -
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1364
  have and_forall_thm: "\<And>P Q. (\<forall>x. P x) \<and> (\<forall>x. Q x) \<longleftrightarrow> (\<forall>x. P x \<and> Q x)"
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1365
    by auto
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1366
  have *: "\<forall>x y::real. 0 \<le> x \<and> x \<le> 1 \<and> 0 \<le> y \<and> y \<le> 1 \<longrightarrow> x \<noteq> 1 \<and> x \<le> y \<or> x \<noteq> 0 \<and> y \<le> x"
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1367
    by auto
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1368
  show ?thesis
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1369
    unfolding and_forall_thm
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1370
    apply (subst choice_iff[symmetric])+
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1371
    apply rule
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1372
    apply rule
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1373
  proof -
60580
7e741e22d7fc tuned proofs;
wenzelm
parents: 60449
diff changeset
  1374
    fix x x'
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1375
    let ?R = "\<lambda>y::nat.
60580
7e741e22d7fc tuned proofs;
wenzelm
parents: 60449
diff changeset
  1376
      (P x \<and> Q x' \<and> x x' = 0 \<longrightarrow> y = 0) \<and>
7e741e22d7fc tuned proofs;
wenzelm
parents: 60449
diff changeset
  1377
      (P x \<and> Q x' \<and> x x' = 1 \<longrightarrow> y = 1) \<and>
7e741e22d7fc tuned proofs;
wenzelm
parents: 60449
diff changeset
  1378
      (P x \<and> Q x' \<and> y = 0 \<longrightarrow> x x' \<le> (f x) x') \<and>
7e741e22d7fc tuned proofs;
wenzelm
parents: 60449
diff changeset
  1379
      (P x \<and> Q x' \<and> y = 1 \<longrightarrow> (f x) x' \<le> x x')"
7e741e22d7fc tuned proofs;
wenzelm
parents: 60449
diff changeset
  1380
    have "0 \<le> f x x' \<and> f x x' \<le> 1" if "P x" "Q x'"
7e741e22d7fc tuned proofs;
wenzelm
parents: 60449
diff changeset
  1381
      using assms(2)[rule_format,of "f x" x'] that
7e741e22d7fc tuned proofs;
wenzelm
parents: 60449
diff changeset
  1382
      apply (drule_tac assms(1)[rule_format])
7e741e22d7fc tuned proofs;
wenzelm
parents: 60449
diff changeset
  1383
      apply auto
7e741e22d7fc tuned proofs;
wenzelm
parents: 60449
diff changeset
  1384
      done
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1385
    then have "?R 0 \<or> ?R 1"
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1386
      by auto
60580
7e741e22d7fc tuned proofs;
wenzelm
parents: 60449
diff changeset
  1387
    then show "\<exists>y\<le>1. ?R y"
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1388
      by auto
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1389
  qed
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1390
qed
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1391
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1392
definition unit_cube :: "'a::euclidean_space set"
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1393
  where "unit_cube = {x. \<forall>i\<in>Basis. 0 \<le> x \<bullet> i \<and> x \<bullet> i \<le> 1}"
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1394
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1395
lemma mem_unit_cube: "x \<in> unit_cube \<longleftrightarrow> (\<forall>i\<in>Basis. 0 \<le> x \<bullet> i \<and> x \<bullet> i \<le> 1)"
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1396
  unfolding unit_cube_def by simp
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1397
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1398
lemma bounded_unit_cube: "bounded unit_cube"
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1399
  unfolding bounded_def
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1400
proof (intro exI ballI)
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1401
  fix y :: 'a assume y: "y \<in> unit_cube"
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1402
  have "dist 0 y = norm y" by (rule dist_0_norm)
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1403
  also have "\<dots> = norm (\<Sum>i\<in>Basis. (y \<bullet> i) *\<^sub>R i)" unfolding euclidean_representation ..
64267
b9a1486e79be setsum -> sum
nipkow
parents: 64122
diff changeset
  1404
  also have "\<dots> \<le> (\<Sum>i\<in>Basis. norm ((y \<bullet> i) *\<^sub>R i))" by (rule norm_sum)
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1405
  also have "\<dots> \<le> (\<Sum>i::'a\<in>Basis. 1)"
64267
b9a1486e79be setsum -> sum
nipkow
parents: 64122
diff changeset
  1406
    by (rule sum_mono, simp add: y [unfolded mem_unit_cube])
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1407
  finally show "dist 0 y \<le> (\<Sum>i::'a\<in>Basis. 1)" .
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1408
qed
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1409
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1410
lemma closed_unit_cube: "closed unit_cube"
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1411
  unfolding unit_cube_def Collect_ball_eq Collect_conj_eq
63332
f164526d8727 move open_Collect_eq/less to HOL
hoelzl
parents: 63306
diff changeset
  1412
  by (rule closed_INT, auto intro!: closed_Collect_le continuous_on_inner continuous_on_const continuous_on_id)
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1413
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1414
lemma compact_unit_cube: "compact unit_cube" (is "compact ?C")
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1415
  unfolding compact_eq_seq_compact_metric
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1416
  using bounded_unit_cube closed_unit_cube
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1417
  by (rule bounded_closed_imp_seq_compact)
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1418
50526
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 50514
diff changeset
  1419
lemma brouwer_cube:
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1420
  fixes f :: "'a::euclidean_space \<Rightarrow> 'a"
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1421
  assumes "continuous_on unit_cube f"
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1422
    and "f ` unit_cube \<subseteq> unit_cube"
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1423
  shows "\<exists>x\<in>unit_cube. f x = x"
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1424
proof (rule ccontr)
63040
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 62948
diff changeset
  1425
  define n where "n = DIM('a)"
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1426
  have n: "1 \<le> n" "0 < n" "n \<noteq> 0"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1427
    unfolding n_def by (auto simp: Suc_le_eq DIM_positive)
53674
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
  1428
  assume "\<not> ?thesis"
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1429
  then have *: "\<not> (\<exists>x\<in>unit_cube. f x - x = 0)"
53674
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
  1430
    by auto
55522
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1431
  obtain d where
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1432
      d: "d > 0" "\<And>x. x \<in> unit_cube \<Longrightarrow> d \<le> norm (f x - x)"
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1433
    apply (rule brouwer_compactness_lemma[OF compact_unit_cube _ *])
56371
fb9ae0727548 extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents: 56273
diff changeset
  1434
    apply (rule continuous_intros assms)+
55522
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1435
    apply blast
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1436
    done
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1437
  have *: "\<forall>x. x \<in> unit_cube \<longrightarrow> f x \<in> unit_cube"
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1438
    "\<forall>x. x \<in> (unit_cube::'a set) \<longrightarrow> (\<forall>i\<in>Basis. True \<longrightarrow> 0 \<le> x \<bullet> i \<and> x \<bullet> i \<le> 1)"
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1439
    using assms(2)[unfolded image_subset_iff Ball_def]
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1440
    unfolding mem_unit_cube
55522
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1441
    by auto
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1442
  obtain label :: "'a \<Rightarrow> 'a \<Rightarrow> nat" where label [rule_format]:
55522
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1443
    "\<forall>x. \<forall>i\<in>Basis. label x i \<le> 1"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1444
    "\<forall>x. \<forall>i\<in>Basis. x \<in> unit_cube \<and> x \<bullet> i = 0 \<longrightarrow> label x i = 0"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1445
    "\<forall>x. \<forall>i\<in>Basis. x \<in> unit_cube \<and> x \<bullet> i = 1 \<longrightarrow> label x i = 1"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1446
    "\<forall>x. \<forall>i\<in>Basis. x \<in> unit_cube \<and> label x i = 0 \<longrightarrow> x \<bullet> i \<le> f x \<bullet> i"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1447
    "\<forall>x. \<forall>i\<in>Basis. x \<in> unit_cube \<and> label x i = 1 \<longrightarrow> f x \<bullet> i \<le> x \<bullet> i"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1448
    using kuhn_labelling_lemma[OF *] by auto
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1449
  note label = this [rule_format]
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1450
  have lem1: "\<forall>x\<in>unit_cube. \<forall>y\<in>unit_cube. \<forall>i\<in>Basis. label x i \<noteq> label y i \<longrightarrow>
61945
1135b8de26c3 more symbols;
wenzelm
parents: 61808
diff changeset
  1451
    \<bar>f x \<bullet> i - x \<bullet> i\<bar> \<le> norm (f y - f x) + norm (y - x)"
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1452
  proof safe
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1453
    fix x y :: 'a
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1454
    assume x: "x \<in> unit_cube" and y: "y \<in> unit_cube"
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1455
    fix i
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1456
    assume i: "label x i \<noteq> label y i" "i \<in> Basis"
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1457
    have *: "\<And>x y fx fy :: real. x \<le> fx \<and> fy \<le> y \<or> fx \<le> x \<and> y \<le> fy \<Longrightarrow>
61945
1135b8de26c3 more symbols;
wenzelm
parents: 61808
diff changeset
  1458
      \<bar>fx - x\<bar> \<le> \<bar>fy - fx\<bar> + \<bar>y - x\<bar>" by auto
1135b8de26c3 more symbols;
wenzelm
parents: 61808
diff changeset
  1459
    have "\<bar>(f x - x) \<bullet> i\<bar> \<le> \<bar>(f y - f x)\<bullet>i\<bar> + \<bar>(y - x)\<bullet>i\<bar>"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1460
    proof (cases "label x i = 0")
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1461
      case True
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1462
      then have fxy: "\<not> f y \<bullet> i \<le> y \<bullet> i \<Longrightarrow> f x \<bullet> i \<le> x \<bullet> i"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1463
        by (metis True i label(1) label(5) le_antisym less_one not_le_imp_less y)
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1464
      show ?thesis
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1465
      unfolding inner_simps         
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1466
      by (rule *) (auto simp: True i label x y fxy)
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1467
    next
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1468
      case False
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1469
      then show ?thesis
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1470
        using label [OF \<open>i \<in> Basis\<close>] i(1) x y
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1471
        apply (auto simp: inner_diff_left le_Suc_eq)
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1472
        by (metis "*")
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1473
    qed
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1474
    also have "\<dots> \<le> norm (f y - f x) + norm (y - x)"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1475
      by (simp add: add_mono i(2) norm_bound_Basis_le)
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1476
    finally show "\<bar>f x \<bullet> i - x \<bullet> i\<bar> \<le> norm (f y - f x) + norm (y - x)"
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1477
      unfolding inner_simps .
50526
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 50514
diff changeset
  1478
  qed
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1479
  have "\<exists>e>0. \<forall>x\<in>unit_cube. \<forall>y\<in>unit_cube. \<forall>z\<in>unit_cube. \<forall>i\<in>Basis.
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1480
    norm (x - z) < e \<longrightarrow> norm (y - z) < e \<longrightarrow> label x i \<noteq> label y i \<longrightarrow>
61945
1135b8de26c3 more symbols;
wenzelm
parents: 61808
diff changeset
  1481
      \<bar>(f(z) - z)\<bullet>i\<bar> < d / (real n)"
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1482
  proof -
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1483
    have d': "d / real n / 8 > 0"
56541
0e3abadbef39 made divide_pos_pos a simp rule
nipkow
parents: 56371
diff changeset
  1484
      using d(1) by (simp add: n_def DIM_positive)
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1485
    have *: "uniformly_continuous_on unit_cube f"
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1486
      by (rule compact_uniformly_continuous[OF assms(1) compact_unit_cube])
55522
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1487
    obtain e where e:
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1488
        "e > 0"
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1489
        "\<And>x x'. x \<in> unit_cube \<Longrightarrow>
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1490
          x' \<in> unit_cube \<Longrightarrow>
55522
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1491
          norm (x' - x) < e \<Longrightarrow>
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1492
          norm (f x' - f x) < d / real n / 8"
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1493
      using *[unfolded uniformly_continuous_on_def,rule_format,OF d']
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1494
      unfolding dist_norm
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1495
      by blast
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1496
    show ?thesis
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1497
    proof (intro exI conjI ballI impI)
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1498
      show "0 < min (e / 2) (d / real n / 8)"
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1499
        using d' e by auto
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1500
      fix x y z i
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1501
      assume as:
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1502
        "x \<in> unit_cube" "y \<in> unit_cube" "z \<in> unit_cube"
37489
44e42d392c6e Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents: 36587
diff changeset
  1503
        "norm (x - z) < min (e / 2) (d / real n / 8)"
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1504
        "norm (y - z) < min (e / 2) (d / real n / 8)"
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1505
        "label x i \<noteq> label y i"
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1506
      assume i: "i \<in> Basis"
61945
1135b8de26c3 more symbols;
wenzelm
parents: 61808
diff changeset
  1507
      have *: "\<And>z fz x fx n1 n2 n3 n4 d4 d :: real. \<bar>fx - x\<bar> \<le> n1 + n2 \<Longrightarrow>
1135b8de26c3 more symbols;
wenzelm
parents: 61808
diff changeset
  1508
        \<bar>fx - fz\<bar> \<le> n3 \<Longrightarrow> \<bar>x - z\<bar> \<le> n4 \<Longrightarrow>
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1509
        n1 < d4 \<Longrightarrow> n2 < 2 * d4 \<Longrightarrow> n3 < d4 \<Longrightarrow> n4 < d4 \<Longrightarrow>
61945
1135b8de26c3 more symbols;
wenzelm
parents: 61808
diff changeset
  1510
        (8 * d4 = d) \<Longrightarrow> \<bar>fz - z\<bar> < d"
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1511
        by auto
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1512
      show "\<bar>(f z - z) \<bullet> i\<bar> < d / real n"
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1513
        unfolding inner_simps
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1514
      proof (rule *)
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1515
        show "\<bar>f x \<bullet> i - x \<bullet> i\<bar> \<le> norm (f y -f x) + norm (y - x)"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1516
          using as(1) as(2) as(6) i lem1 by blast
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1517
        show "norm (f x - f z) < d / real n / 8"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1518
          using d' e as by auto
50526
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 50514
diff changeset
  1519
        show "\<bar>f x \<bullet> i - f z \<bullet> i\<bar> \<le> norm (f x - f z)" "\<bar>x \<bullet> i - z \<bullet> i\<bar> \<le> norm (x - z)"
55522
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1520
          unfolding inner_diff_left[symmetric]
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1521
          by (rule Basis_le_norm[OF i])+
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1522
        have tria: "norm (y - x) \<le> norm (y - z) + norm (x - z)"
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1523
          using dist_triangle[of y x z, unfolded dist_norm]
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1524
          unfolding norm_minus_commute
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1525
          by auto
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1526
        also have "\<dots> < e / 2 + e / 2"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1527
          using as(4) as(5) by auto
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1528
        finally show "norm (f y - f x) < d / real n / 8"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1529
          using as(1) as(2) e(2) by auto
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1530
        have "norm (y - z) + norm (x - z) < d / real n / 8 + d / real n / 8"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1531
          using as(4) as(5) by auto
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1532
        with tria show "norm (y - x) < 2 * (d / real n / 8)"
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1533
          by auto
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1534
      qed (use as in auto)
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1535
    qed
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1536
  qed
55522
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1537
  then
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1538
  obtain e where e:
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1539
    "e > 0"
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1540
    "\<And>x y z i. x \<in> unit_cube \<Longrightarrow>
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1541
      y \<in> unit_cube \<Longrightarrow>
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1542
      z \<in> unit_cube \<Longrightarrow>
55522
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1543
      i \<in> Basis \<Longrightarrow>
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1544
      norm (x - z) < e \<and> norm (y - z) < e \<and> label x i \<noteq> label y i \<Longrightarrow>
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1545
      \<bar>(f z - z) \<bullet> i\<bar> < d / real n"
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1546
    by blast
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1547
  obtain p :: nat where p: "1 + real n / e \<le> real p"
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1548
    using real_arch_simple ..
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1549
  have "1 + real n / e > 0"
56541
0e3abadbef39 made divide_pos_pos a simp rule
nipkow
parents: 56371
diff changeset
  1550
    using e(1) n by (simp add: add_pos_pos)
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1551
  then have "p > 0"
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1552
    using p by auto
50526
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 50514
diff changeset
  1553
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1554
  obtain b :: "nat \<Rightarrow> 'a" where b: "bij_betw b {..< n} Basis"
50526
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 50514
diff changeset
  1555
    by atomize_elim (auto simp: n_def intro!: finite_same_card_bij)
63040
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 62948
diff changeset
  1556
  define b' where "b' = inv_into {..< n} b"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1557
  then have b': "bij_betw b' Basis {..< n}"
50526
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 50514
diff changeset
  1558
    using bij_betw_inv_into[OF b] by auto
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1559
  then have b'_Basis: "\<And>i. i \<in> Basis \<Longrightarrow> b' i \<in> {..< n}"
50526
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 50514
diff changeset
  1560
    unfolding bij_betw_def by (auto simp: set_eq_iff)
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 50514
diff changeset
  1561
  have bb'[simp]:"\<And>i. i \<in> Basis \<Longrightarrow> b (b' i) = i"
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1562
    unfolding b'_def
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1563
    using b
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1564
    by (auto simp: f_inv_into_f bij_betw_def)
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1565
  have b'b[simp]:"\<And>i. i < n \<Longrightarrow> b' (b i) = i"
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1566
    unfolding b'_def
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1567
    using b
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1568
    by (auto simp: inv_into_f_eq bij_betw_def)
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1569
  have *: "\<And>x :: nat. x = 0 \<or> x = 1 \<longleftrightarrow> x \<le> 1"
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1570
    by auto
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1571
  have b'': "\<And>j. j < n \<Longrightarrow> b j \<in> Basis"
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1572
    using b unfolding bij_betw_def by auto
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1573
  have q1: "0 < p" "\<forall>x. (\<forall>i<n. x i \<le> p) \<longrightarrow>
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1574
    (\<forall>i<n. (label (\<Sum>i\<in>Basis. (real (x (b' i)) / real p) *\<^sub>R i) \<circ> b) i = 0 \<or>
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1575
           (label (\<Sum>i\<in>Basis. (real (x (b' i)) / real p) *\<^sub>R i) \<circ> b) i = 1)"
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1576
    unfolding *
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1577
    using \<open>p > 0\<close> \<open>n > 0\<close>
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1578
    using label(1)[OF b'']
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1579
    by auto
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1580
  { fix x :: "nat \<Rightarrow> nat" and i assume "\<forall>i<n. x i \<le> p" "i < n" "x i = p \<or> x i = 0"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1581
    then have "(\<Sum>i\<in>Basis. (real (x (b' i)) / real p) *\<^sub>R i) \<in> (unit_cube::'a set)"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1582
      using b'_Basis
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1583
      by (auto simp: mem_unit_cube inner_simps bij_betw_def zero_le_divide_iff divide_le_eq_1) }
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1584
  note cube = this
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1585
  have q2: "\<forall>x. (\<forall>i<n. x i \<le> p) \<longrightarrow> (\<forall>i<n. x i = 0 \<longrightarrow>
50526
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 50514
diff changeset
  1586
      (label (\<Sum>i\<in>Basis. (real (x (b' i)) / real p) *\<^sub>R i) \<circ> b) i = 0)"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1587
    unfolding o_def using cube \<open>p > 0\<close> by (intro allI impI label(2)) (auto simp: b'')
61609
77b453bd616f Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents: 61520
diff changeset
  1588
  have q3: "\<forall>x. (\<forall>i<n. x i \<le> p) \<longrightarrow> (\<forall>i<n. x i = p \<longrightarrow>
50526
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 50514
diff changeset
  1589
      (label (\<Sum>i\<in>Basis. (real (x (b' i)) / real p) *\<^sub>R i) \<circ> b) i = 1)"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1590
    using cube \<open>p > 0\<close> unfolding o_def by (intro allI impI label(3)) (auto simp: b'')
55522
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1591
  obtain q where q:
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1592
      "\<forall>i<n. q i < p"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1593
      "\<forall>i<n.
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1594
         \<exists>r s. (\<forall>j<n. q j \<le> r j \<and> r j \<le> q j + 1) \<and>
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1595
               (\<forall>j<n. q j \<le> s j \<and> s j \<le> q j + 1) \<and>
55522
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1596
               (label (\<Sum>i\<in>Basis. (real (r (b' i)) / real p) *\<^sub>R i) \<circ> b) i \<noteq>
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1597
               (label (\<Sum>i\<in>Basis. (real (s (b' i)) / real p) *\<^sub>R i) \<circ> b) i"
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1598
    by (rule kuhn_lemma[OF q1 q2 q3])
63040
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 62948
diff changeset
  1599
  define z :: 'a where "z = (\<Sum>i\<in>Basis. (real (q (b' i)) / real p) *\<^sub>R i)"
61945
1135b8de26c3 more symbols;
wenzelm
parents: 61808
diff changeset
  1600
  have "\<exists>i\<in>Basis. d / real n \<le> \<bar>(f z - z)\<bullet>i\<bar>"
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1601
  proof (rule ccontr)
50526
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 50514
diff changeset
  1602
    have "\<forall>i\<in>Basis. q (b' i) \<in> {0..p}"
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1603
      using q(1) b'
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1604
      by (auto intro: less_imp_le simp: bij_betw_def)
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1605
    then have "z \<in> unit_cube"
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1606
      unfolding z_def mem_unit_cube
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1607
      using b'_Basis
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1608
      by (auto simp: bij_betw_def zero_le_divide_iff divide_le_eq_1)
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1609
    then have d_fz_z: "d \<le> norm (f z - z)"
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1610
      by (rule d)
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1611
    assume "\<not> ?thesis"
53674
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
  1612
    then have as: "\<forall>i\<in>Basis. \<bar>f z \<bullet> i - z \<bullet> i\<bar> < d / real n"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1613
      using \<open>n > 0\<close>
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1614
      by (auto simp: not_le inner_diff)
50526
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 50514
diff changeset
  1615
    have "norm (f z - z) \<le> (\<Sum>i\<in>Basis. \<bar>f z \<bullet> i - z \<bullet> i\<bar>)"
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1616
      unfolding inner_diff_left[symmetric]
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1617
      by (rule norm_le_l1)
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1618
    also have "\<dots> < (\<Sum>(i::'a) \<in> Basis. d / real n)"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1619
      by (meson as finite_Basis nonempty_Basis sum_strict_mono)
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1620
    also have "\<dots> = d"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1621
      using DIM_positive[where 'a='a] by (auto simp: n_def)
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1622
    finally show False
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1623
      using d_fz_z by auto
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1624
  qed
55522
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1625
  then obtain i where i: "i \<in> Basis" "d / real n \<le> \<bar>(f z - z) \<bullet> i\<bar>" ..
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1626
  have *: "b' i < n"
55522
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1627
    using i and b'[unfolded bij_betw_def]
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1628
    by auto
55522
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1629
  obtain r s where rs:
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1630
    "\<And>j. j < n \<Longrightarrow> q j \<le> r j \<and> r j \<le> q j + 1"
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1631
    "\<And>j. j < n \<Longrightarrow> q j \<le> s j \<and> s j \<le> q j + 1"
55522
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1632
    "(label (\<Sum>i\<in>Basis. (real (r (b' i)) / real p) *\<^sub>R i) \<circ> b) (b' i) \<noteq>
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1633
      (label (\<Sum>i\<in>Basis. (real (s (b' i)) / real p) *\<^sub>R i) \<circ> b) (b' i)"
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1634
    using q(2)[rule_format,OF *] by blast
56273
def3bbe6f2a5 cleanup auxiliary proofs for Brouwer fixpoint theorem (removes ~2400 lines)
hoelzl
parents: 56226
diff changeset
  1635
  have b'_im: "\<And>i. i \<in> Basis \<Longrightarrow>  b' i < n"
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1636
    using b' unfolding bij_betw_def by auto
63040
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 62948
diff changeset
  1637
  define r' ::'a where "r' = (\<Sum>i\<in>Basis. (real (r (b' i)) / real p) *\<^sub>R i)"
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1638
  have "\<And>i. i \<in> Basis \<Longrightarrow> r (b' i) \<le> p"
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1639
    apply (rule order_trans)
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1640
    apply (rule rs(1)[OF b'_im,THEN conjunct2])
53252
4766fbe322b5 tuned proofs;
wenzelm
parents: 53248
diff changeset
  1641
    using q(1)[rule_format,OF b'_im]
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1642
    apply (auto simp: Suc_le_eq)
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1643
    done
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1644
  then have "r' \<in> unit_cube"
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1645
    unfolding r'_def mem_unit_cube
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1646
    using b'_Basis
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1647
    by (auto simp: bij_betw_def zero_le_divide_iff divide_le_eq_1)
63040
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 62948
diff changeset
  1648
  define s' :: 'a where "s' = (\<Sum>i\<in>Basis. (real (s (b' i)) / real p) *\<^sub>R i)"
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1649
  have "\<And>i. i \<in> Basis \<Longrightarrow> s (b' i) \<le> p"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1650
    using b'_im q(1) rs(2) by fastforce
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1651
  then have "s' \<in> unit_cube"
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1652
    unfolding s'_def mem_unit_cube
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1653
    using b'_Basis by (auto simp: bij_betw_def zero_le_divide_iff divide_le_eq_1)
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1654
  have "z \<in> unit_cube"
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1655
    unfolding z_def mem_unit_cube
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1656
    using b'_Basis q(1)[rule_format,OF b'_im] \<open>p > 0\<close>
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1657
    by (auto simp: bij_betw_def zero_le_divide_iff divide_le_eq_1 less_imp_le)
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1658
  {
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1659
    have "(\<Sum>i\<in>Basis. \<bar>real (r (b' i)) - real (q (b' i))\<bar>) \<le> (\<Sum>(i::'a)\<in>Basis. 1)"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1660
      by (rule sum_mono) (use rs(1)[OF b'_im] in force)
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1661
    also have "\<dots> < e * real p"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1662
      using p \<open>e > 0\<close> \<open>p > 0\<close>
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1663
      by (auto simp: field_simps n_def)
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1664
    finally have "(\<Sum>i\<in>Basis. \<bar>real (r (b' i)) - real (q (b' i))\<bar>) < e * real p" .
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1665
  }
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1666
  moreover
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1667
  {
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1668
    have "(\<Sum>i\<in>Basis. \<bar>real (s (b' i)) - real (q (b' i))\<bar>) \<le> (\<Sum>(i::'a)\<in>Basis. 1)"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1669
      by (rule sum_mono) (use rs(2)[OF b'_im] in force)
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1670
    also have "\<dots> < e * real p"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1671
      using p \<open>e > 0\<close> \<open>p > 0\<close>
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1672
      by (auto simp: field_simps n_def)
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1673
    finally have "(\<Sum>i\<in>Basis. \<bar>real (s (b' i)) - real (q (b' i))\<bar>) < e * real p" .
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1674
  }
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1675
  ultimately
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1676
  have "norm (r' - z) < e" and "norm (s' - z) < e"
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1677
    unfolding r'_def s'_def z_def
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1678
    using \<open>p > 0\<close>
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1679
    apply (rule_tac[!] le_less_trans[OF norm_le_l1])
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1680
    apply (auto simp: field_simps sum_divide_distrib[symmetric] inner_diff_left)
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1681
    done
53674
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
  1682
  then have "\<bar>(f z - z) \<bullet> i\<bar> < d / real n"
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1683
    using rs(3) i
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1684
    unfolding r'_def[symmetric] s'_def[symmetric] o_def bb'
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1685
    by (intro e(2)[OF \<open>r'\<in>unit_cube\<close> \<open>s'\<in>unit_cube\<close> \<open>z\<in>unit_cube\<close>]) auto
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1686
  then show False
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1687
    using i by auto
50526
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 50514
diff changeset
  1688
qed
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1689
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1690
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1691
subsection \<open>Retractions\<close>
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1692
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1693
definition "retraction S T r \<longleftrightarrow> T \<subseteq> S \<and> continuous_on S r \<and> r ` S \<subseteq> T \<and> (\<forall>x\<in>T. r x = x)"
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1694
62843
313d3b697c9a Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents: 62393
diff changeset
  1695
definition retract_of (infixl "retract'_of" 50)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1696
  where "(T retract_of S) \<longleftrightarrow> (\<exists>r. retraction S T r)"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1697
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1698
lemma retraction_idempotent: "retraction S T r \<Longrightarrow> x \<in> S \<Longrightarrow>  r (r x) = r x"
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1699
  unfolding retraction_def by auto
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1700
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1701
subsection \<open>Preservation of fixpoints under (more general notion of) retraction\<close>
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1702
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1703
lemma invertible_fixpoint_property:
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1704
  fixes S :: "'a::euclidean_space set"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1705
    and T :: "'b::euclidean_space set"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1706
  assumes contt: "continuous_on T i"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1707
    and "i ` T \<subseteq> S"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1708
    and contr: "continuous_on S r"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1709
    and "r ` S \<subseteq> T"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1710
    and ri: "\<And>y. y \<in> T \<Longrightarrow> r (i y) = y"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1711
    and FP: "\<And>f. \<lbrakk>continuous_on S f; f ` S \<subseteq> S\<rbrakk> \<Longrightarrow> \<exists>x\<in>S. f x = x"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1712
    and contg: "continuous_on T g"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1713
    and "g ` T \<subseteq> T"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1714
  obtains y where "y \<in> T" and "g y = y"
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1715
proof -
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1716
  have "\<exists>x\<in>S. (i \<circ> g \<circ> r) x = x"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1717
  proof (rule FP)
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1718
    show "continuous_on S (i \<circ> g \<circ> r)"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1719
      by (meson contt contr assms(4) contg assms(8) continuous_on_compose continuous_on_subset)
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1720
    show "(i \<circ> g \<circ> r) ` S \<subseteq> S"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1721
      using assms(2,4,8) by force
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1722
  qed
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1723
  then obtain x where x: "x \<in> S" "(i \<circ> g \<circ> r) x = x" ..
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1724
  then have *: "g (r x) \<in> T"
53674
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
  1725
    using assms(4,8) by auto
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
  1726
  have "r ((i \<circ> g \<circ> r) x) = r x"
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
  1727
    using x by auto
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
  1728
  then show ?thesis
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1729
    using "*" ri that by auto
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1730
qed
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1731
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1732
lemma homeomorphic_fixpoint_property:
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1733
  fixes S :: "'a::euclidean_space set"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1734
    and T :: "'b::euclidean_space set"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1735
  assumes "S homeomorphic T"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1736
  shows "(\<forall>f. continuous_on S f \<and> f ` S \<subseteq> S \<longrightarrow> (\<exists>x\<in>S. f x = x)) \<longleftrightarrow>
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1737
         (\<forall>g. continuous_on T g \<and> g ` T \<subseteq> T \<longrightarrow> (\<exists>y\<in>T. g y = y))"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1738
         (is "?lhs = ?rhs")
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1739
proof -
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1740
  obtain r i where r:
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1741
      "\<forall>x\<in>S. i (r x) = x" "r ` S = T" "continuous_on S r"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1742
      "\<forall>y\<in>T. r (i y) = y" "i ` T = S" "continuous_on T i"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1743
    using assms unfolding homeomorphic_def homeomorphism_def  by blast
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1744
  show ?thesis
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1745
  proof
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1746
    assume ?lhs
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1747
    with r show ?rhs
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1748
      by (metis invertible_fixpoint_property[of T i S r] order_refl)
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1749
  next
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1750
    assume ?rhs
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1751
    with r show ?lhs
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1752
      by (metis invertible_fixpoint_property[of S r T i] order_refl)
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1753
  qed
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1754
qed
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1755
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1756
lemma retract_fixpoint_property:
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1757
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1758
    and S :: "'a set"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1759
  assumes "T retract_of S"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1760
    and FP: "\<And>f. \<lbrakk>continuous_on S f; f ` S \<subseteq> S\<rbrakk> \<Longrightarrow> \<exists>x\<in>S. f x = x"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1761
    and contg: "continuous_on T g"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1762
    and "g ` T \<subseteq> T"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1763
  obtains y where "y \<in> T" and "g y = y"
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1764
proof -
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1765
  obtain h where "retraction S T h"
55522
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1766
    using assms(1) unfolding retract_of_def ..
53674
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
  1767
  then show ?thesis
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1768
    unfolding retraction_def
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1769
    using invertible_fixpoint_property[OF continuous_on_id _ _ _ _ FP]
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1770
    by (metis assms(4) contg image_ident that)
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1771
qed
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1772
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1773
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1774
subsection \<open>The Brouwer theorem for any set with nonempty interior\<close>
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1775
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1776
lemma convex_unit_cube: "convex unit_cube"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1777
  by (rule is_interval_convex) (fastforce simp add: is_interval_def mem_unit_cube)
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1778
50526
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 50514
diff changeset
  1779
lemma brouwer_weak:
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1780
  fixes f :: "'a::euclidean_space \<Rightarrow> 'a"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1781
  assumes "compact S"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1782
    and "convex S"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1783
    and "interior S \<noteq> {}"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1784
    and "continuous_on S f"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1785
    and "f ` S \<subseteq> S"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1786
  obtains x where "x \<in> S" and "f x = x"
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1787
proof -
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1788
  let ?U = "unit_cube :: 'a set"
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1789
  have "\<Sum>Basis /\<^sub>R 2 \<in> interior ?U"
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1790
  proof (rule interiorI)
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1791
    let ?I = "(\<Inter>i\<in>Basis. {x::'a. 0 < x \<bullet> i} \<inter> {x. x \<bullet> i < 1})"
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1792
    show "open ?I"
63332
f164526d8727 move open_Collect_eq/less to HOL
hoelzl
parents: 63306
diff changeset
  1793
      by (intro open_INT finite_Basis ballI open_Int, auto intro: open_Collect_less simp: continuous_on_inner continuous_on_const continuous_on_id)
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1794
    show "\<Sum>Basis /\<^sub>R 2 \<in> ?I"
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1795
      by simp
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1796
    show "?I \<subseteq> unit_cube"
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1797
      unfolding unit_cube_def by force
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1798
  qed
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1799
  then have *: "interior ?U \<noteq> {}" by fast
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1800
  have *: "?U homeomorphic S"
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1801
    using homeomorphic_convex_compact[OF convex_unit_cube compact_unit_cube * assms(2,1,3)] .
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1802
  have "\<forall>f. continuous_on ?U f \<and> f ` ?U \<subseteq> ?U \<longrightarrow>
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1803
    (\<exists>x\<in>?U. f x = x)"
37489
44e42d392c6e Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents: 36587
diff changeset
  1804
    using brouwer_cube by auto
53674
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
  1805
  then show ?thesis
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1806
    unfolding homeomorphic_fixpoint_property[OF *]
53252
4766fbe322b5 tuned proofs;
wenzelm
parents: 53248
diff changeset
  1807
    using assms
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1808
    by (auto intro: that)
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1809
qed
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1810
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1811
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1812
text \<open>And in particular for a closed ball.\<close>
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1813
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1814
lemma brouwer_ball:
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1815
  fixes f :: "'a::euclidean_space \<Rightarrow> 'a"
53674
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
  1816
  assumes "e > 0"
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
  1817
    and "continuous_on (cball a e) f"
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1818
    and "f ` cball a e \<subseteq> cball a e"
53674
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
  1819
  obtains x where "x \<in> cball a e" and "f x = x"
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1820
  using brouwer_weak[OF compact_cball convex_cball, of a e f]
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1821
  unfolding interior_cball ball_eq_empty
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1822
  using assms by auto
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1823
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1824
text \<open>Still more general form; could derive this directly without using the
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61609
diff changeset
  1825
  rather involved \<open>HOMEOMORPHIC_CONVEX_COMPACT\<close> theorem, just using
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1826
  a scaling and translation to put the set inside the unit cube.\<close>
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1827
53248
7a4b4b3b9ecd tuned proofs;
wenzelm
parents: 53186
diff changeset
  1828
lemma brouwer:
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1829
  fixes f :: "'a::euclidean_space \<Rightarrow> 'a"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1830
  assumes S: "compact S" "convex S" "S \<noteq> {}"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1831
    and contf: "continuous_on S f"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1832
    and fim: "f ` S \<subseteq> S"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1833
  obtains x where "x \<in> S" and "f x = x"
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1834
proof -
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1835
  have "\<exists>e>0. S \<subseteq> cball 0 e"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1836
    using compact_imp_bounded[OF \<open>compact S\<close>]  unfolding bounded_pos
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1837
    by auto
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1838
  then obtain e where e: "e > 0" "S \<subseteq> cball 0 e"
55522
23d2cbac6dce tuned proofs;
wenzelm
parents: 55493
diff changeset
  1839
    by blast
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1840
  have "\<exists>x\<in> cball 0 e. (f \<circ> closest_point S) x = x"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1841
  proof (rule_tac brouwer_ball[OF e(1)])
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1842
    show "continuous_on (cball 0 e) (f \<circ> closest_point S)"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1843
      apply (rule continuous_on_compose)
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1844
      using S compact_eq_bounded_closed continuous_on_closest_point apply blast
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1845
      by (meson S contf closest_point_in_set compact_imp_closed continuous_on_subset image_subsetI)
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1846
    show "(f \<circ> closest_point S) ` cball 0 e \<subseteq> cball 0 e"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1847
      by clarsimp (metis S fim closest_point_exists(1) compact_eq_bounded_closed e(2) image_subset_iff mem_cball_0 subsetCE)
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1848
  qed (use assms in auto)
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1849
  then obtain x where x: "x \<in> cball 0 e" "(f \<circ> closest_point S) x = x" ..
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1850
  have "x \<in> S"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1851
    by (metis closest_point_in_set comp_apply compact_imp_closed fim image_eqI S(1) S(3) subset_iff x(2))
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1852
  then have *: "closest_point S x = x"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1853
    by (rule closest_point_self)
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1854
  show thesis
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1855
  proof
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1856
    show "closest_point S x \<in> S"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1857
      by (simp add: "*" \<open>x \<in> S\<close>)
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1858
    show "f (closest_point S x) = closest_point S x"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1859
      using "*" x(2) by auto
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1860
  qed
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1861
qed
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1862
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1863
text \<open>So we get the no-retraction theorem.\<close>
33741
4c414d0835ab Added derivation and Brouwer's fixpoint theorem in Multivariate Analysis (translated by Robert Himmelmann from HOL-light)
hoelzl
parents:
diff changeset
  1864
64006
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  1865
theorem no_retraction_cball:
56117
2dbf84ee3deb remove ordered_euclidean_space constraint from brouwer/derivative lemmas;
huffman
parents: 55522
diff changeset
  1866
  fixes a :: "'a::euclidean_space"
53674
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
  1867
  assumes "e > 0"
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
  1868
  shows "\<not> (frontier (cball a e) retract_of (cball a e))"
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1869
proof
60580
7e741e22d7fc tuned proofs;
wenzelm
parents: 60449
diff changeset
  1870
  assume *: "frontier (cball a e) retract_of (cball a e)"
7e741e22d7fc tuned proofs;
wenzelm
parents: 60449
diff changeset
  1871
  have **: "\<And>xa. a - (2 *\<^sub>R a - xa) = - (a - xa)"
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1872
    using scaleR_left_distrib[of 1 1 a] by auto
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1873
  obtain x where x: "x \<in> {x. norm (a - x) = e}" "2 *\<^sub>R a - x = x"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1874
  proof (rule retract_fixpoint_property[OF *, of "\<lambda>x. scaleR 2 a - x"])
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1875
    show "continuous_on (frontier (cball a e)) ((-) (2 *\<^sub>R a))"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1876
      by (intro continuous_intros)
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1877
    show "(-) (2 *\<^sub>R a) ` frontier (cball a e) \<subseteq> frontier (cball a e)"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1878
      by clarsimp (metis "**" dist_norm norm_minus_cancel)
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1879
  qed (auto simp: dist_norm intro: brouwer_ball[OF assms])
53674
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
  1880
  then have "scaleR 2 a = scaleR 1 x + scaleR 1 x"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1881
    by (auto simp: algebra_simps)
53674
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
  1882
  then have "a = x"
53688
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1883
    unfolding scaleR_left_distrib[symmetric]
63892cfef47f tuned proofs;
wenzelm
parents: 53674
diff changeset
  1884
    by auto
53674
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
  1885
  then show False
7ac7b2eaa5e6 tuned proofs;
wenzelm
parents: 53252
diff changeset
  1886
    using x assms by auto
53185
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1887
qed
752e05d09708 tuned proofs;
wenzelm
parents: 51478
diff changeset
  1888
64006
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  1889
corollary contractible_sphere:
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  1890
  fixes a :: "'a::euclidean_space"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  1891
  shows "contractible(sphere a r) \<longleftrightarrow> r \<le> 0"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  1892
proof (cases "0 < r")
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  1893
  case True
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  1894
  then show ?thesis
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  1895
    unfolding contractible_def nullhomotopic_from_sphere_extension
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  1896
    using no_retraction_cball [OF True, of a]
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  1897
    by (auto simp: retract_of_def retraction_def)
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  1898
next
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  1899
  case False
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  1900
  then show ?thesis
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  1901
    unfolding contractible_def nullhomotopic_from_sphere_extension
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1902
    using continuous_on_const less_eq_real_def by auto
64006
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  1903
qed
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  1904
64789
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1905
lemma connected_sphere_eq:
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1906
  fixes a :: "'a :: euclidean_space"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1907
  shows "connected(sphere a r) \<longleftrightarrow> 2 \<le> DIM('a) \<or> r \<le> 0"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1908
    (is "?lhs = ?rhs")
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1909
proof (cases r "0::real" rule: linorder_cases)
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1910
  case less
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1911
  then show ?thesis by auto
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1912
next
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1913
  case equal
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1914
  then show ?thesis by auto
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1915
next
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1916
  case greater
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1917
  show ?thesis
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1918
  proof
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1919
    assume L: ?lhs
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1920
    have "False" if 1: "DIM('a) = 1"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1921
    proof -
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1922
      obtain x y where xy: "sphere a r = {x,y}" "x \<noteq> y"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1923
        using sphere_1D_doubleton [OF 1 greater]
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1924
        by (metis dist_self greater insertI1 less_add_same_cancel1 mem_sphere mult_2 not_le zero_le_dist)
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1925
      then have "finite (sphere a r)"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1926
        by auto
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1927
      with L \<open>r > 0\<close> xy show "False"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1928
        using connected_finite_iff_sing by auto
64789
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1929
    qed
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1930
    with greater show ?rhs
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1931
      by (metis DIM_ge_Suc0 One_nat_def Suc_1 le_antisym not_less_eq_eq)
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1932
  next
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1933
    assume ?rhs
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1934
    then show ?lhs
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1935
      using connected_sphere greater by auto
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1936
  qed
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1937
qed
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1938
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1939
lemma path_connected_sphere_eq:
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1940
  fixes a :: "'a :: euclidean_space"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1941
  shows "path_connected(sphere a r) \<longleftrightarrow> 2 \<le> DIM('a) \<or> r \<le> 0"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1942
         (is "?lhs = ?rhs")
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1943
proof
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1944
  assume ?lhs
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1945
  then show ?rhs
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1946
    using connected_sphere_eq path_connected_imp_connected by blast
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1947
next
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1948
  assume R: ?rhs
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1949
  then show ?lhs
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1950
    by (auto simp: contractible_imp_path_connected contractible_sphere path_connected_sphere)
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1951
qed
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1952
64122
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1953
proposition frontier_subset_retraction:
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1954
  fixes S :: "'a::euclidean_space set"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1955
  assumes "bounded S" and fros: "frontier S \<subseteq> T"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1956
      and contf: "continuous_on (closure S) f"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1957
      and fim: "f ` S \<subseteq> T"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1958
      and fid: "\<And>x. x \<in> T \<Longrightarrow> f x = x"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1959
    shows "S \<subseteq> T"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1960
proof (rule ccontr)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1961
  assume "\<not> S \<subseteq> T"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1962
  then obtain a where "a \<in> S" "a \<notin> T" by blast
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1963
  define g where "g \<equiv> \<lambda>z. if z \<in> closure S then f z else z"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1964
  have "continuous_on (closure S \<union> closure(-S)) g"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1965
    unfolding g_def
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1966
    apply (rule continuous_on_cases)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1967
    using fros fid frontier_closures
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1968
        apply (auto simp: contf continuous_on_id)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1969
    done
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1970
  moreover have "closure S \<union> closure(- S) = UNIV"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1971
    using closure_Un by fastforce
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1972
  ultimately have contg: "continuous_on UNIV g" by metis
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1973
  obtain B where "0 < B" and B: "closure S \<subseteq> ball a B"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1974
    using \<open>bounded S\<close> bounded_subset_ballD by blast
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1975
  have notga: "g x \<noteq> a" for x
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1976
    unfolding g_def using fros fim \<open>a \<notin> T\<close>
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1977
    apply (auto simp: frontier_def)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1978
    using fid interior_subset apply fastforce
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1979
    by (simp add: \<open>a \<in> S\<close> closure_def)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1980
  define h where "h \<equiv> (\<lambda>y. a + (B / norm(y - a)) *\<^sub>R (y - a)) \<circ> g"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1981
  have "\<not> (frontier (cball a B) retract_of (cball a B))"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1982
    by (metis no_retraction_cball \<open>0 < B\<close>)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1983
  then have "\<And>k. \<not> retraction (cball a B) (frontier (cball a B)) k"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1984
    by (simp add: retract_of_def)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1985
  moreover have "retraction (cball a B) (frontier (cball a B)) h"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1986
    unfolding retraction_def
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1987
  proof (intro conjI ballI)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1988
    show "frontier (cball a B) \<subseteq> cball a B"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1989
      by force
64122
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1990
    show "continuous_on (cball a B) h"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1991
      unfolding h_def
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  1992
      by (intro continuous_intros) (use contg continuous_on_subset notga in auto)
64122
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1993
    show "h ` cball a B \<subseteq> frontier (cball a B)"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1994
      using \<open>0 < B\<close> by (auto simp: h_def notga dist_norm)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1995
    show "\<And>x. x \<in> frontier (cball a B) \<Longrightarrow> h x = x"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1996
      apply (auto simp: h_def algebra_simps)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1997
      apply (simp add: vector_add_divide_simps  notga)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1998
      by (metis (no_types, hide_lams) B add.commute dist_commute  dist_norm g_def mem_ball not_less_iff_gr_or_eq  subset_eq)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1999
  qed
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  2000
  ultimately show False by simp
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  2001
qed
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  2002
64789
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2003
subsection\<open>More Properties of Retractions\<close>
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2004
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2005
lemma retraction:
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2006
   "retraction S T r \<longleftrightarrow>
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2007
    T \<subseteq> S \<and> continuous_on S r \<and> r ` S = T \<and> (\<forall>x \<in> T. r x = x)"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2008
by (force simp: retraction_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2009
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2010
lemma retract_of_imp_extensible:
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2011
  assumes "S retract_of T" and "continuous_on S f" and "f ` S \<subseteq> U"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2012
  obtains g where "continuous_on T g" "g ` T \<subseteq> U" "\<And>x. x \<in> S \<Longrightarrow> g x = f x"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2013
using assms
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2014
apply (clarsimp simp add: retract_of_def retraction)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2015
apply (rule_tac g = "f \<circ> r" in that)
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2016
apply (auto simp: continuous_on_compose2)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2017
done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2018
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2019
lemma idempotent_imp_retraction:
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2020
  assumes "continuous_on S f" and "f ` S \<subseteq> S" and "\<And>x. x \<in> S \<Longrightarrow> f(f x) = f x"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2021
    shows "retraction S (f ` S) f"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2022
by (simp add: assms retraction)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2023
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2024
lemma retraction_subset:
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2025
  assumes "retraction S T r" and "T \<subseteq> s'" and "s' \<subseteq> S"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2026
  shows "retraction s' T r"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2027
  unfolding retraction_def
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2028
  by (metis assms continuous_on_subset image_mono retraction)
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2029
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2030
lemma retract_of_subset:
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2031
  assumes "T retract_of S" and "T \<subseteq> s'" and "s' \<subseteq> S"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2032
    shows "T retract_of s'"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2033
by (meson assms retract_of_def retraction_subset)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2034
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2035
lemma retraction_refl [simp]: "retraction S S (\<lambda>x. x)"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2036
by (simp add: continuous_on_id retraction)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2037
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2038
lemma retract_of_refl [iff]: "S retract_of S"
68296
69d680e94961 tidying and reorganisation around Cauchy Integral Theorem
paulson <lp15@cam.ac.uk>
parents: 68022
diff changeset
  2039
  unfolding retract_of_def retraction_def
69d680e94961 tidying and reorganisation around Cauchy Integral Theorem
paulson <lp15@cam.ac.uk>
parents: 68022
diff changeset
  2040
  using continuous_on_id by blast
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2041
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2042
lemma retract_of_imp_subset:
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2043
   "S retract_of T \<Longrightarrow> S \<subseteq> T"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2044
by (simp add: retract_of_def retraction_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2045
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2046
lemma retract_of_empty [simp]:
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2047
     "({} retract_of S) \<longleftrightarrow> S = {}"  "(S retract_of {}) \<longleftrightarrow> S = {}"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2048
by (auto simp: retract_of_def retraction_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2049
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2050
lemma retract_of_singleton [iff]: "({x} retract_of S) \<longleftrightarrow> x \<in> S"
68296
69d680e94961 tidying and reorganisation around Cauchy Integral Theorem
paulson <lp15@cam.ac.uk>
parents: 68022
diff changeset
  2051
  unfolding retract_of_def retraction_def by force
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2052
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2053
lemma retraction_comp:
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2054
   "\<lbrakk>retraction S T f; retraction T U g\<rbrakk>
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2055
        \<Longrightarrow> retraction S U (g \<circ> f)"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2056
apply (auto simp: retraction_def intro: continuous_on_compose2)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2057
by blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2058
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2059
lemma retract_of_trans [trans]:
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2060
  assumes "S retract_of T" and "T retract_of U"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2061
    shows "S retract_of U"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2062
using assms by (auto simp: retract_of_def intro: retraction_comp)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2063
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2064
lemma closedin_retract:
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2065
  fixes S :: "'a :: real_normed_vector set"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2066
  assumes "S retract_of T"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2067
    shows "closedin (subtopology euclidean T) S"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2068
proof -
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2069
  obtain r where "S \<subseteq> T" "continuous_on T r" "r ` T \<subseteq> S" "\<And>x. x \<in> S \<Longrightarrow> r x = x"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2070
    using assms by (auto simp: retract_of_def retraction_def)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2071
  then have S: "S = {x \<in> T. (norm(r x - x)) = 0}" by auto
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2072
  show ?thesis
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2073
    apply (subst S)
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2074
    apply (rule continuous_closedin_preimage_constant)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2075
    by (simp add: \<open>continuous_on T r\<close> continuous_on_diff continuous_on_id continuous_on_norm)
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2076
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2077
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2078
lemma closedin_self [simp]:
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2079
    fixes S :: "'a :: real_normed_vector set"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2080
    shows "closedin (subtopology euclidean S) S"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2081
  by (simp add: closedin_retract)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2082
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2083
lemma retract_of_contractible:
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2084
  assumes "contractible T" "S retract_of T"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2085
    shows "contractible S"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2086
using assms
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2087
apply (clarsimp simp add: retract_of_def contractible_def retraction_def homotopic_with)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2088
apply (rule_tac x="r a" in exI)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2089
apply (rule_tac x="r \<circ> h" in exI)
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2090
apply (intro conjI continuous_intros continuous_on_compose)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2091
apply (erule continuous_on_subset | force)+
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2092
done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2093
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2094
lemma retract_of_compact:
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2095
     "\<lbrakk>compact T; S retract_of T\<rbrakk> \<Longrightarrow> compact S"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2096
  by (metis compact_continuous_image retract_of_def retraction)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2097
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2098
lemma retract_of_closed:
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2099
    fixes S :: "'a :: real_normed_vector set"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2100
    shows "\<lbrakk>closed T; S retract_of T\<rbrakk> \<Longrightarrow> closed S"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2101
  by (metis closedin_retract closedin_closed_eq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2102
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2103
lemma retract_of_connected:
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2104
    "\<lbrakk>connected T; S retract_of T\<rbrakk> \<Longrightarrow> connected S"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2105
  by (metis Topological_Spaces.connected_continuous_image retract_of_def retraction)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2106
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2107
lemma retract_of_path_connected:
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2108
    "\<lbrakk>path_connected T; S retract_of T\<rbrakk> \<Longrightarrow> path_connected S"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2109
  by (metis path_connected_continuous_image retract_of_def retraction)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2110
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2111
lemma retract_of_simply_connected:
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2112
    "\<lbrakk>simply_connected T; S retract_of T\<rbrakk> \<Longrightarrow> simply_connected S"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2113
apply (simp add: retract_of_def retraction_def, clarify)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2114
apply (rule simply_connected_retraction_gen)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2115
apply (force simp: continuous_on_id elim!: continuous_on_subset)+
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2116
done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2117
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2118
lemma retract_of_homotopically_trivial:
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2119
  assumes ts: "T retract_of S"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2120
      and hom: "\<And>f g. \<lbrakk>continuous_on U f; f ` U \<subseteq> S;
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2121
                       continuous_on U g; g ` U \<subseteq> S\<rbrakk>
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2122
                       \<Longrightarrow> homotopic_with (\<lambda>x. True) U S f g"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2123
      and "continuous_on U f" "f ` U \<subseteq> T"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2124
      and "continuous_on U g" "g ` U \<subseteq> T"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2125
    shows "homotopic_with (\<lambda>x. True) U T f g"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2126
proof -
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2127
  obtain r where "r ` S \<subseteq> S" "continuous_on S r" "\<forall>x\<in>S. r (r x) = r x" "T = r ` S"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2128
    using ts by (auto simp: retract_of_def retraction)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2129
  then obtain k where "Retracts S r T k"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2130
    unfolding Retracts_def
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2131
    by (metis continuous_on_subset dual_order.trans image_iff image_mono)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2132
  then show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2133
    apply (rule Retracts.homotopically_trivial_retraction_gen)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2134
    using assms
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2135
    apply (force simp: hom)+
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2136
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2137
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2138
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2139
lemma retract_of_homotopically_trivial_null:
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2140
  assumes ts: "T retract_of S"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2141
      and hom: "\<And>f. \<lbrakk>continuous_on U f; f ` U \<subseteq> S\<rbrakk>
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2142
                     \<Longrightarrow> \<exists>c. homotopic_with (\<lambda>x. True) U S f (\<lambda>x. c)"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2143
      and "continuous_on U f" "f ` U \<subseteq> T"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2144
  obtains c where "homotopic_with (\<lambda>x. True) U T f (\<lambda>x. c)"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2145
proof -
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2146
  obtain r where "r ` S \<subseteq> S" "continuous_on S r" "\<forall>x\<in>S. r (r x) = r x" "T = r ` S"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2147
    using ts by (auto simp: retract_of_def retraction)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2148
  then obtain k where "Retracts S r T k"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2149
    unfolding Retracts_def
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2150
    by (metis continuous_on_subset dual_order.trans image_iff image_mono)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2151
  then show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2152
    apply (rule Retracts.homotopically_trivial_retraction_null_gen)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2153
    apply (rule TrueI refl assms that | assumption)+
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2154
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2155
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2156
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2157
lemma retraction_imp_quotient_map:
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2158
   "retraction S T r
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2159
    \<Longrightarrow> U \<subseteq> T
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2160
            \<Longrightarrow> (openin (subtopology euclidean S) (S \<inter> r -` U) \<longleftrightarrow>
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2161
                 openin (subtopology euclidean T) U)"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2162
apply (clarsimp simp add: retraction)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2163
apply (rule continuous_right_inverse_imp_quotient_map [where g=r])
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2164
apply (auto simp: elim: continuous_on_subset)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2165
done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2166
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2167
lemma retract_of_locally_compact:
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2168
    fixes S :: "'a :: {heine_borel,real_normed_vector} set"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2169
    shows  "\<lbrakk> locally compact S; T retract_of S\<rbrakk> \<Longrightarrow> locally compact T"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2170
  by (metis locally_compact_closedin closedin_retract)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2171
63469
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  2172
lemma retract_of_Times:
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2173
   "\<lbrakk>S retract_of s'; T retract_of t'\<rbrakk> \<Longrightarrow> (S \<times> T) retract_of (s' \<times> t')"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2174
apply (simp add: retract_of_def retraction_def Sigma_mono, clarify)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2175
apply (rename_tac f g)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2176
apply (rule_tac x="\<lambda>z. ((f \<circ> fst) z, (g \<circ> snd) z)" in exI)
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2177
apply (rule conjI continuous_intros | erule continuous_on_subset | force)+
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2178
done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2179
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2180
lemma homotopic_into_retract:
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2181
   "\<lbrakk>f ` S \<subseteq> T; g ` S \<subseteq> T; T retract_of U; homotopic_with (\<lambda>x. True) S U f g\<rbrakk>
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2182
        \<Longrightarrow> homotopic_with (\<lambda>x. True) S T f g"
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2183
apply (subst (asm) homotopic_with_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2184
apply (simp add: homotopic_with retract_of_def retraction_def, clarify)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2185
apply (rule_tac x="r \<circ> h" in exI)
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2186
apply (rule conjI continuous_intros | erule continuous_on_subset | force simp: image_subset_iff)+
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2187
done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  2188
63469
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  2189
lemma retract_of_locally_connected:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  2190
  assumes "locally connected T" "S retract_of T"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  2191
    shows "locally connected S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  2192
  using assms
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  2193
  by (auto simp: retract_of_def retraction intro!: retraction_imp_quotient_map elim!: locally_connected_quotient_image)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  2194
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  2195
lemma retract_of_locally_path_connected:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  2196
  assumes "locally path_connected T" "S retract_of T"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  2197
    shows "locally path_connected S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  2198
  using assms
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  2199
  by (auto simp: retract_of_def retraction intro!: retraction_imp_quotient_map elim!: locally_path_connected_quotient_image)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  2200
64789
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2201
subsubsection\<open>A few simple lemmas about deformation retracts\<close>
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2202
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2203
lemma deformation_retract_imp_homotopy_eqv:
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2204
  fixes S :: "'a::euclidean_space set"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2205
  assumes "homotopic_with (\<lambda>x. True) S S id r" and r: "retraction S T r"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2206
  shows "S homotopy_eqv T"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2207
proof -
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2208
  have "homotopic_with (\<lambda>x. True) S S (id \<circ> r) id"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2209
    by (simp add: assms(1) homotopic_with_symD)
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2210
  moreover have "homotopic_with (\<lambda>x. True) T T (r \<circ> id) id"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2211
    using r unfolding retraction_def
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2212
    by (metis (no_types, lifting) comp_id continuous_on_id' homotopic_with_equal homotopic_with_symD id_def image_id order_refl)
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2213
  ultimately
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2214
  show ?thesis
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2215
    unfolding homotopy_eqv_def
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2216
    by (metis continuous_on_id' id_def image_id r retraction_def)
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2217
qed
64789
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2218
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2219
lemma deformation_retract:
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2220
  fixes S :: "'a::euclidean_space set"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2221
    shows "(\<exists>r. homotopic_with (\<lambda>x. True) S S id r \<and> retraction S T r) \<longleftrightarrow>
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2222
           T retract_of S \<and> (\<exists>f. homotopic_with (\<lambda>x. True) S S id f \<and> f ` S \<subseteq> T)"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2223
    (is "?lhs = ?rhs")
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2224
proof
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2225
  assume ?lhs
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2226
  then show ?rhs
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2227
    by (auto simp: retract_of_def retraction_def)
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2228
next
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2229
  assume ?rhs
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2230
  then show ?lhs
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2231
    apply (clarsimp simp add: retract_of_def retraction_def)
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2232
    apply (rule_tac x=r in exI, simp)
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2233
     apply (rule homotopic_with_trans, assumption)
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2234
     apply (rule_tac f = "r \<circ> f" and g="r \<circ> id" in homotopic_with_eq)
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2235
        apply (rule_tac Y=S in homotopic_compose_continuous_left)
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2236
         apply (auto simp: homotopic_with_sym)
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2237
    done
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2238
qed
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2239
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2240
lemma deformation_retract_of_contractible_sing:
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2241
  fixes S :: "'a::euclidean_space set"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2242
  assumes "contractible S" "a \<in> S"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2243
  obtains r where "homotopic_with (\<lambda>x. True) S S id r" "retraction S {a} r"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2244
proof -
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2245
  have "{a} retract_of S"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2246
    by (simp add: \<open>a \<in> S\<close>)
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2247
  moreover have "homotopic_with (\<lambda>x. True) S S id (\<lambda>x. a)"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2248
      using assms
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2249
      by (auto simp: contractible_def continuous_on_const continuous_on_id homotopic_into_contractible image_subset_iff)
64789
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2250
  moreover have "(\<lambda>x. a) ` S \<subseteq> {a}"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2251
    by (simp add: image_subsetI)
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2252
  ultimately show ?thesis
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2253
    using that deformation_retract  by metis
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2254
qed
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2255
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2256
67968
a5ad4c015d1c removed dots at the end of (sub)titles
nipkow
parents: 67682
diff changeset
  2257
subsection\<open>Punctured affine hulls, etc\<close>
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2258
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2259
lemma continuous_on_compact_surface_projection_aux:
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2260
  fixes S :: "'a::t2_space set"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2261
  assumes "compact S" "S \<subseteq> T" "image q T \<subseteq> S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2262
      and contp: "continuous_on T p"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2263
      and "\<And>x. x \<in> S \<Longrightarrow> q x = x"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2264
      and [simp]: "\<And>x. x \<in> T \<Longrightarrow> q(p x) = q x"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2265
      and "\<And>x. x \<in> T \<Longrightarrow> p(q x) = p x"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2266
    shows "continuous_on T q"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2267
proof -
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2268
  have *: "image p T = image p S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2269
    using assms by auto (metis imageI subset_iff)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2270
  have contp': "continuous_on S p"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2271
    by (rule continuous_on_subset [OF contp \<open>S \<subseteq> T\<close>])
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2272
  have "continuous_on (p ` T) q"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2273
    by (simp add: "*" assms(1) assms(2) assms(5) continuous_on_inv contp' rev_subsetD)
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2274
  then have "continuous_on T (q \<circ> p)"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2275
    by (rule continuous_on_compose [OF contp])
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2276
  then show ?thesis
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2277
    by (rule continuous_on_eq [of _ "q \<circ> p"]) (simp add: o_def)
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2278
qed
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2279
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2280
lemma continuous_on_compact_surface_projection:
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2281
  fixes S :: "'a::real_normed_vector set"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2282
  assumes "compact S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2283
      and S: "S \<subseteq> V - {0}" and "cone V"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2284
      and iff: "\<And>x k. x \<in> V - {0} \<Longrightarrow> 0 < k \<and> (k *\<^sub>R x) \<in> S \<longleftrightarrow> d x = k"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2285
  shows "continuous_on (V - {0}) (\<lambda>x. d x *\<^sub>R x)"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2286
proof (rule continuous_on_compact_surface_projection_aux [OF \<open>compact S\<close> S])
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2287
  show "(\<lambda>x. d x *\<^sub>R x) ` (V - {0}) \<subseteq> S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2288
    using iff by auto
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2289
  show "continuous_on (V - {0}) (\<lambda>x. inverse(norm x) *\<^sub>R x)"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2290
    by (intro continuous_intros) force
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2291
  show "\<And>x. x \<in> S \<Longrightarrow> d x *\<^sub>R x = x"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2292
    by (metis S zero_less_one local.iff scaleR_one subset_eq)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2293
  show "d (x /\<^sub>R norm x) *\<^sub>R (x /\<^sub>R norm x) = d x *\<^sub>R x" if "x \<in> V - {0}" for x
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2294
    using iff [of "inverse(norm x) *\<^sub>R x" "norm x * d x", symmetric] iff that \<open>cone V\<close>
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2295
    by (simp add: field_simps cone_def zero_less_mult_iff)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2296
  show "d x *\<^sub>R x /\<^sub>R norm (d x *\<^sub>R x) = x /\<^sub>R norm x" if "x \<in> V - {0}" for x
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2297
  proof -
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2298
    have "0 < d x"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2299
      using local.iff that by blast
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2300
    then show ?thesis
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2301
      by simp
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2302
  qed
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2303
qed
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2304
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2305
proposition rel_frontier_deformation_retract_of_punctured_convex:
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2306
  fixes S :: "'a::euclidean_space set"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2307
  assumes "convex S" "convex T" "bounded S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2308
      and arelS: "a \<in> rel_interior S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2309
      and relS: "rel_frontier S \<subseteq> T"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2310
      and affS: "T \<subseteq> affine hull S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2311
  obtains r where "homotopic_with (\<lambda>x. True) (T - {a}) (T - {a}) id r"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2312
                  "retraction (T - {a}) (rel_frontier S) r"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2313
proof -
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2314
  have "\<exists>d. 0 < d \<and> (a + d *\<^sub>R l) \<in> rel_frontier S \<and>
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2315
            (\<forall>e. 0 \<le> e \<and> e < d \<longrightarrow> (a + e *\<^sub>R l) \<in> rel_interior S)"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2316
       if "(a + l) \<in> affine hull S" "l \<noteq> 0" for l
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2317
    apply (rule ray_to_rel_frontier [OF \<open>bounded S\<close> arelS])
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2318
    apply (rule that)+
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2319
    by metis
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2320
  then obtain dd
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2321
    where dd1: "\<And>l. \<lbrakk>(a + l) \<in> affine hull S; l \<noteq> 0\<rbrakk> \<Longrightarrow> 0 < dd l \<and> (a + dd l *\<^sub>R l) \<in> rel_frontier S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2322
      and dd2: "\<And>l e. \<lbrakk>(a + l) \<in> affine hull S; e < dd l; 0 \<le> e; l \<noteq> 0\<rbrakk>
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2323
                      \<Longrightarrow> (a + e *\<^sub>R l) \<in> rel_interior S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2324
    by metis+
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2325
  have aaffS: "a \<in> affine hull S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2326
    by (meson arelS subsetD hull_inc rel_interior_subset)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2327
  have "((\<lambda>z. z - a) ` (affine hull S - {a})) = ((\<lambda>z. z - a) ` (affine hull S)) - {0}"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2328
    by auto
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2329
  moreover have "continuous_on (((\<lambda>z. z - a) ` (affine hull S)) - {0}) (\<lambda>x. dd x *\<^sub>R x)"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2330
  proof (rule continuous_on_compact_surface_projection)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2331
    show "compact (rel_frontier ((\<lambda>z. z - a) ` S))"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2332
      by (simp add: \<open>bounded S\<close> bounded_translation_minus compact_rel_frontier_bounded)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2333
    have releq: "rel_frontier ((\<lambda>z. z - a) ` S) = (\<lambda>z. z - a) ` rel_frontier S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2334
      using rel_frontier_translation [of "-a"] add.commute by simp
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2335
    also have "\<dots> \<subseteq> (\<lambda>z. z - a) ` (affine hull S) - {0}"
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2336
      using rel_frontier_affine_hull arelS rel_frontier_def by fastforce
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2337
    finally show "rel_frontier ((\<lambda>z. z - a) ` S) \<subseteq> (\<lambda>z. z - a) ` (affine hull S) - {0}" .
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2338
    show "cone ((\<lambda>z. z - a) ` (affine hull S))"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2339
      by (rule subspace_imp_cone)
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2340
         (use aaffS in \<open>simp add: subspace_affine image_comp o_def affine_translation_aux [of a]\<close>)
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2341
    show "(0 < k \<and> k *\<^sub>R x \<in> rel_frontier ((\<lambda>z. z - a) ` S)) \<longleftrightarrow> (dd x = k)"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2342
         if x: "x \<in> (\<lambda>z. z - a) ` (affine hull S) - {0}" for k x
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2343
    proof
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2344
      show "dd x = k \<Longrightarrow> 0 < k \<and> k *\<^sub>R x \<in> rel_frontier ((\<lambda>z. z - a) ` S)"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2345
      using dd1 [of x] that image_iff by (fastforce simp add: releq)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2346
    next
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2347
      assume k: "0 < k \<and> k *\<^sub>R x \<in> rel_frontier ((\<lambda>z. z - a) ` S)"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2348
      have False if "dd x < k"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2349
      proof -
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2350
        have "k \<noteq> 0" "a + k *\<^sub>R x \<in> closure S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2351
          using k closure_translation [of "-a"]
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2352
          by (auto simp: rel_frontier_def)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2353
        then have segsub: "open_segment a (a + k *\<^sub>R x) \<subseteq> rel_interior S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2354
          by (metis rel_interior_closure_convex_segment [OF \<open>convex S\<close> arelS])
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2355
        have "x \<noteq> 0" and xaffS: "a + x \<in> affine hull S"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2356
          using x by auto
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2357
        then have "0 < dd x" and inS: "a + dd x *\<^sub>R x \<in> rel_frontier S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2358
          using dd1 by auto
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2359
        moreover have "a + dd x *\<^sub>R x \<in> open_segment a (a + k *\<^sub>R x)"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2360
          using k \<open>x \<noteq> 0\<close> \<open>0 < dd x\<close>
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2361
          apply (simp add: in_segment)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2362
          apply (rule_tac x = "dd x / k" in exI)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2363
          apply (simp add: field_simps that)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2364
          apply (simp add: vector_add_divide_simps algebra_simps)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2365
          apply (metis (no_types) \<open>k \<noteq> 0\<close> divide_inverse_commute inverse_eq_divide mult.left_commute right_inverse)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2366
          done
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2367
        ultimately show ?thesis
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2368
          using segsub by (auto simp: rel_frontier_def)
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2369
      qed
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2370
      moreover have False if "k < dd x"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2371
        using x k that rel_frontier_def
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2372
        by (fastforce simp: algebra_simps releq dest!: dd2)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2373
      ultimately show "dd x = k"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2374
        by fastforce
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2375
    qed
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2376
  qed
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2377
  ultimately have *: "continuous_on ((\<lambda>z. z - a) ` (affine hull S - {a})) (\<lambda>x. dd x *\<^sub>R x)"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2378
    by auto
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2379
  have "continuous_on (affine hull S - {a}) ((\<lambda>x. a + dd x *\<^sub>R x) \<circ> (\<lambda>z. z - a))"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2380
    by (intro * continuous_intros continuous_on_compose)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2381
  with affS have contdd: "continuous_on (T - {a}) ((\<lambda>x. a + dd x *\<^sub>R x) \<circ> (\<lambda>z. z - a))"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2382
    by (blast intro: continuous_on_subset)
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2383
  show ?thesis
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2384
  proof
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2385
    show "homotopic_with (\<lambda>x. True) (T - {a}) (T - {a}) id (\<lambda>x. a + dd (x - a) *\<^sub>R (x - a))"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2386
    proof (rule homotopic_with_linear)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2387
      show "continuous_on (T - {a}) id"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2388
        by (intro continuous_intros continuous_on_compose)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2389
      show "continuous_on (T - {a}) (\<lambda>x. a + dd (x - a) *\<^sub>R (x - a))"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2390
        using contdd by (simp add: o_def)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2391
      show "closed_segment (id x) (a + dd (x - a) *\<^sub>R (x - a)) \<subseteq> T - {a}"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2392
           if "x \<in> T - {a}" for x
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2393
      proof (clarsimp simp: in_segment, intro conjI)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2394
        fix u::real assume u: "0 \<le> u" "u \<le> 1"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2395
        have "a + dd (x - a) *\<^sub>R (x - a) \<in> T"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2396
          by (metis DiffD1 DiffD2 add.commute add.right_neutral affS dd1 diff_add_cancel relS singletonI subsetCE that)
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2397
        then show "(1 - u) *\<^sub>R x + u *\<^sub>R (a + dd (x - a) *\<^sub>R (x - a)) \<in> T"
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2398
          using convexD [OF \<open>convex T\<close>] that u by simp
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2399
        have iff: "(1 - u) *\<^sub>R x + u *\<^sub>R (a + d *\<^sub>R (x - a)) = a \<longleftrightarrow>
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2400
                  (1 - u + u * d) *\<^sub>R (x - a) = 0" for d
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2401
          by (auto simp: algebra_simps)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2402
        have "x \<in> T" "x \<noteq> a" using that by auto
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2403
        then have axa: "a + (x - a) \<in> affine hull S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2404
           by (metis (no_types) add.commute affS diff_add_cancel set_rev_mp)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2405
        then have "\<not> dd (x - a) \<le> 0 \<and> a + dd (x - a) *\<^sub>R (x - a) \<in> rel_frontier S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2406
          using \<open>x \<noteq> a\<close> dd1 by fastforce
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2407
        with \<open>x \<noteq> a\<close> show "(1 - u) *\<^sub>R x + u *\<^sub>R (a + dd (x - a) *\<^sub>R (x - a)) \<noteq> a"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2408
          apply (auto simp: iff)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2409
          using less_eq_real_def mult_le_0_iff not_less u by fastforce
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2410
      qed
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2411
    qed
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2412
    show "retraction (T - {a}) (rel_frontier S) (\<lambda>x. a + dd (x - a) *\<^sub>R (x - a))"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2413
    proof (simp add: retraction_def, intro conjI ballI)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2414
      show "rel_frontier S \<subseteq> T - {a}"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2415
        using arelS relS rel_frontier_def by fastforce
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2416
      show "continuous_on (T - {a}) (\<lambda>x. a + dd (x - a) *\<^sub>R (x - a))"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2417
        using contdd by (simp add: o_def)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2418
      show "(\<lambda>x. a + dd (x - a) *\<^sub>R (x - a)) ` (T - {a}) \<subseteq> rel_frontier S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2419
        apply (auto simp: rel_frontier_def)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2420
        apply (metis Diff_subset add.commute affS dd1 diff_add_cancel eq_iff_diff_eq_0 rel_frontier_def subset_iff)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2421
        by (metis DiffE add.commute affS dd1 diff_add_cancel eq_iff_diff_eq_0 rel_frontier_def rev_subsetD)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2422
      show "a + dd (x - a) *\<^sub>R (x - a) = x" if x: "x \<in> rel_frontier S" for x
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2423
      proof -
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2424
        have "x \<noteq> a"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2425
          using that arelS by (auto simp: rel_frontier_def)
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2426
        have False if "dd (x - a) < 1"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2427
        proof -
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2428
          have "x \<in> closure S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2429
            using x by (auto simp: rel_frontier_def)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2430
          then have segsub: "open_segment a x \<subseteq> rel_interior S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2431
            by (metis rel_interior_closure_convex_segment [OF \<open>convex S\<close> arelS])
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2432
          have  xaffS: "x \<in> affine hull S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2433
            using affS relS x by auto
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2434
          then have "0 < dd (x - a)" and inS: "a + dd (x - a) *\<^sub>R (x - a) \<in> rel_frontier S"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2435
            using dd1 by (auto simp: \<open>x \<noteq> a\<close>)
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2436
          moreover have "a + dd (x - a) *\<^sub>R (x - a) \<in> open_segment a x"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2437
            using  \<open>x \<noteq> a\<close> \<open>0 < dd (x - a)\<close>
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2438
            apply (simp add: in_segment)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2439
            apply (rule_tac x = "dd (x - a)" in exI)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2440
            apply (simp add: algebra_simps that)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2441
            done
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2442
          ultimately show ?thesis
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2443
            using segsub by (auto simp: rel_frontier_def)
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2444
        qed
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2445
        moreover have False if "1 < dd (x - a)"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2446
          using x that dd2 [of "x - a" 1] \<open>x \<noteq> a\<close> closure_affine_hull
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2447
          by (auto simp: rel_frontier_def)
67443
3abf6a722518 standardized towards new-style formal comments: isabelle update_comments;
wenzelm
parents: 67399
diff changeset
  2448
        ultimately have "dd (x - a) = 1" \<comment> \<open>similar to another proof above\<close>
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2449
          by fastforce
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2450
        with that show ?thesis
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2451
          by (simp add: rel_frontier_def)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2452
      qed
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2453
    qed
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2454
  qed
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2455
qed
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2456
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2457
corollary rel_frontier_retract_of_punctured_affine_hull:
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2458
  fixes S :: "'a::euclidean_space set"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2459
  assumes "bounded S" "convex S" "a \<in> rel_interior S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2460
    shows "rel_frontier S retract_of (affine hull S - {a})"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2461
apply (rule rel_frontier_deformation_retract_of_punctured_convex [of S "affine hull S" a])
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2462
apply (auto simp: affine_imp_convex rel_frontier_affine_hull retract_of_def assms)
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2463
done
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2464
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2465
corollary rel_boundary_retract_of_punctured_affine_hull:
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2466
  fixes S :: "'a::euclidean_space set"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2467
  assumes "compact S" "convex S" "a \<in> rel_interior S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2468
    shows "(S - rel_interior S) retract_of (affine hull S - {a})"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2469
by (metis assms closure_closed compact_eq_bounded_closed rel_frontier_def
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2470
          rel_frontier_retract_of_punctured_affine_hull)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  2471
64789
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2472
lemma homotopy_eqv_rel_frontier_punctured_convex:
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2473
  fixes S :: "'a::euclidean_space set"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2474
  assumes "convex S" "bounded S" "a \<in> rel_interior S" "convex T" "rel_frontier S \<subseteq> T" "T \<subseteq> affine hull S"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2475
  shows "(rel_frontier S) homotopy_eqv (T - {a})"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2476
  apply (rule rel_frontier_deformation_retract_of_punctured_convex [of S T])
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2477
  using assms
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2478
  apply auto
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2479
  apply (subst homotopy_eqv_sym)
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2480
  using deformation_retract_imp_homotopy_eqv by blast
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2481
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2482
lemma homotopy_eqv_rel_frontier_punctured_affine_hull:
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2483
  fixes S :: "'a::euclidean_space set"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2484
  assumes "convex S" "bounded S" "a \<in> rel_interior S"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2485
    shows "(rel_frontier S) homotopy_eqv (affine hull S - {a})"
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2486
apply (rule homotopy_eqv_rel_frontier_punctured_convex)
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2487
  using assms rel_frontier_affine_hull  by force+
6440577e34ee connectedness, circles not simply connected , punctured universe
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2488
64394
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
  2489
lemma path_connected_sphere_gen:
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
  2490
  assumes "convex S" "bounded S" "aff_dim S \<noteq> 1"
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
  2491
  shows "path_connected(rel_frontier S)"
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
  2492
proof (cases "rel_interior S = {}")
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
  2493
  case True
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
  2494
  then show ?thesis
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
  2495
    by (simp add: \<open>convex S\<close> convex_imp_path_connected rel_frontier_def)
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
  2496
next
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
  2497
  case False
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
  2498
  then show ?thesis
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
  2499
    by (metis aff_dim_affine_hull affine_affine_hull affine_imp_convex all_not_in_conv assms path_connected_punctured_convex rel_frontier_retract_of_punctured_affine_hull retract_of_path_connected)
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
  2500
qed
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
  2501
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
  2502
lemma connected_sphere_gen:
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
  2503
  assumes "convex S" "bounded S" "aff_dim S \<noteq> 1"
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
  2504
  shows "connected(rel_frontier S)"
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
  2505
  by (simp add: assms path_connected_imp_connected path_connected_sphere_gen)
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
  2506
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2507
subsection\<open>Borsuk-style characterization of separation\<close>
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2508
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2509
lemma continuous_on_Borsuk_map:
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2510
   "a \<notin> s \<Longrightarrow>  continuous_on s (\<lambda>x. inverse(norm (x - a)) *\<^sub>R (x - a))"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2511
by (rule continuous_intros | force)+
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2512
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2513
lemma Borsuk_map_into_sphere:
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2514
   "(\<lambda>x. inverse(norm (x - a)) *\<^sub>R (x - a)) ` s \<subseteq> sphere 0 1 \<longleftrightarrow> (a \<notin> s)"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2515
  by auto (metis eq_iff_diff_eq_0 left_inverse norm_eq_zero)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2516
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2517
lemma Borsuk_maps_homotopic_in_path_component:
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2518
  assumes "path_component (- s) a b"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2519
    shows "homotopic_with (\<lambda>x. True) s (sphere 0 1)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2520
                   (\<lambda>x. inverse(norm(x - a)) *\<^sub>R (x - a))
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2521
                   (\<lambda>x. inverse(norm(x - b)) *\<^sub>R (x - b))"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2522
proof -
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2523
  obtain g where "path g" "path_image g \<subseteq> -s" "pathstart g = a" "pathfinish g = b"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2524
    using assms by (auto simp: path_component_def)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2525
  then show ?thesis
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2526
    apply (simp add: path_def path_image_def pathstart_def pathfinish_def homotopic_with_def)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2527
    apply (rule_tac x = "\<lambda>z. inverse(norm(snd z - (g \<circ> fst)z)) *\<^sub>R (snd z - (g \<circ> fst)z)" in exI)
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2528
    apply (intro conjI continuous_intros)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2529
    apply (rule continuous_intros | erule continuous_on_subset | fastforce simp: divide_simps sphere_def)+
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2530
    done
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2531
qed
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2532
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2533
lemma non_extensible_Borsuk_map:
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2534
  fixes a :: "'a :: euclidean_space"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2535
  assumes "compact s" and cin: "c \<in> components(- s)" and boc: "bounded c" and "a \<in> c"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2536
    shows "~ (\<exists>g. continuous_on (s \<union> c) g \<and>
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2537
                  g ` (s \<union> c) \<subseteq> sphere 0 1 \<and>
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2538
                  (\<forall>x \<in> s. g x = inverse(norm(x - a)) *\<^sub>R (x - a)))"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2539
proof -
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2540
  have "closed s" using assms by (simp add: compact_imp_closed)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2541
  have "c \<subseteq> -s"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2542
    using assms by (simp add: in_components_subset)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2543
  with \<open>a \<in> c\<close> have "a \<notin> s" by blast
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2544
  then have ceq: "c = connected_component_set (- s) a"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2545
    by (metis \<open>a \<in> c\<close> cin components_iff connected_component_eq)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2546
  then have "bounded (s \<union> connected_component_set (- s) a)"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2547
    using \<open>compact s\<close> boc compact_imp_bounded by auto
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2548
  with bounded_subset_ballD obtain r where "0 < r" and r: "(s \<union> connected_component_set (- s) a) \<subseteq> ball a r"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2549
    by blast
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2550
  { fix g
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2551
    assume "continuous_on (s \<union> c) g"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2552
            "g ` (s \<union> c) \<subseteq> sphere 0 1"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2553
       and [simp]: "\<And>x. x \<in> s \<Longrightarrow> g x = (x - a) /\<^sub>R norm (x - a)"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2554
    then have [simp]: "\<And>x. x \<in> s \<union> c \<Longrightarrow> norm (g x) = 1"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2555
      by force
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2556
    have cb_eq: "cball a r = (s \<union> connected_component_set (- s) a) \<union>
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2557
                      (cball a r - connected_component_set (- s) a)"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2558
      using ball_subset_cball [of a r] r by auto
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2559
    have cont1: "continuous_on (s \<union> connected_component_set (- s) a)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2560
                     (\<lambda>x. a + r *\<^sub>R g x)"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2561
      apply (rule continuous_intros)+
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2562
      using \<open>continuous_on (s \<union> c) g\<close> ceq by blast
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2563
    have cont2: "continuous_on (cball a r - connected_component_set (- s) a)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2564
            (\<lambda>x. a + r *\<^sub>R ((x - a) /\<^sub>R norm (x - a)))"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2565
      by (rule continuous_intros | force simp: \<open>a \<notin> s\<close>)+
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2566
    have 1: "continuous_on (cball a r)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2567
             (\<lambda>x. if connected_component (- s) a x
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2568
                  then a + r *\<^sub>R g x
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2569
                  else a + r *\<^sub>R ((x - a) /\<^sub>R norm (x - a)))"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2570
      apply (subst cb_eq)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2571
      apply (rule continuous_on_cases [OF _ _ cont1 cont2])
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2572
        using ceq cin
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2573
      apply (auto intro: closed_Un_complement_component
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2574
                  simp: \<open>closed s\<close> open_Compl open_connected_component)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2575
      done
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2576
    have 2: "(\<lambda>x. a + r *\<^sub>R g x) ` (cball a r \<inter> connected_component_set (- s) a)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2577
             \<subseteq> sphere a r "
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2578
      using \<open>0 < r\<close> by (force simp: dist_norm ceq)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2579
    have "retraction (cball a r) (sphere a r)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2580
            (\<lambda>x. if x \<in> connected_component_set (- s) a
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2581
                 then a + r *\<^sub>R g x
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2582
                 else a + r *\<^sub>R ((x - a) /\<^sub>R norm (x - a)))"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2583
      using  \<open>0 < r\<close>
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2584
      apply (simp add: retraction_def dist_norm 1 2, safe)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2585
      apply (force simp: dist_norm abs_if mult_less_0_iff divide_simps \<open>a \<notin> s\<close>)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2586
      using r
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2587
      by (auto simp: dist_norm norm_minus_commute)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2588
    then have False
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2589
      using no_retraction_cball
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2590
             [OF \<open>0 < r\<close>, of a, unfolded retract_of_def, simplified, rule_format,
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2591
              of "\<lambda>x. if x \<in> connected_component_set (- s) a
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2592
                      then a + r *\<^sub>R g x
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2593
                      else a + r *\<^sub>R inverse(norm(x - a)) *\<^sub>R (x - a)"]
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2594
      by blast
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2595
  }
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2596
  then show ?thesis
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2597
    by blast
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2598
qed
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63129
diff changeset
  2599
67968
a5ad4c015d1c removed dots at the end of (sub)titles
nipkow
parents: 67682
diff changeset
  2600
subsection\<open>Absolute retracts, etc\<close>
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2601
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2602
text\<open>Absolute retracts (AR), absolute neighbourhood retracts (ANR) and also
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2603
 Euclidean neighbourhood retracts (ENR). We define AR and ANR by
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2604
 specializing the standard definitions for a set to embedding in
63306
00090a0cd17f Removed instances of ^ from theory markup
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  2605
spaces of higher dimension. \<close>
00090a0cd17f Removed instances of ^ from theory markup
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  2606
00090a0cd17f Removed instances of ^ from theory markup
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  2607
(*This turns out to be sufficient (since any set in
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2608
R^n can be embedded as a closed subset of a convex subset of R^{n+1}) to
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2609
derive the usual definitions, but we need to split them into two
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2610
implications because of the lack of type quantifiers. Then ENR turns out
63306
00090a0cd17f Removed instances of ^ from theory markup
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  2611
to be equivalent to ANR plus local compactness. -- JRH*)
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2612
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2613
definition AR :: "'a::topological_space set => bool"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2614
  where
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2615
   "AR S \<equiv> \<forall>U. \<forall>S'::('a * real) set. S homeomorphic S' \<and> closedin (subtopology euclidean U) S'
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2616
                \<longrightarrow> S' retract_of U"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2617
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2618
definition ANR :: "'a::topological_space set => bool"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2619
  where
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2620
   "ANR S \<equiv> \<forall>U. \<forall>S'::('a * real) set. S homeomorphic S' \<and> closedin (subtopology euclidean U) S'
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2621
                \<longrightarrow> (\<exists>T. openin (subtopology euclidean U) T \<and>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2622
                        S' retract_of T)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2623
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2624
definition ENR :: "'a::topological_space set => bool"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2625
  where "ENR S \<equiv> \<exists>U. open U \<and> S retract_of U"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2626
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2627
text\<open> First, show that we do indeed get the "usual" properties of ARs and ANRs.\<close>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2628
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2629
proposition AR_imp_absolute_extensor:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2630
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2631
  assumes "AR S" and contf: "continuous_on T f" and "f ` T \<subseteq> S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2632
      and cloUT: "closedin (subtopology euclidean U) T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2633
  obtains g where "continuous_on U g" "g ` U \<subseteq> S" "\<And>x. x \<in> T \<Longrightarrow> g x = f x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2634
proof -
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2635
  have "aff_dim S < int (DIM('b \<times> real))"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2636
    using aff_dim_le_DIM [of S] by simp
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2637
  then obtain C and S' :: "('b * real) set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2638
          where C: "convex C" "C \<noteq> {}"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2639
            and cloCS: "closedin (subtopology euclidean C) S'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2640
            and hom: "S homeomorphic S'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2641
    by (metis that homeomorphic_closedin_convex)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2642
  then have "S' retract_of C"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2643
    using \<open>AR S\<close> by (simp add: AR_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2644
  then obtain r where "S' \<subseteq> C" and contr: "continuous_on C r"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2645
                  and "r ` C \<subseteq> S'" and rid: "\<And>x. x\<in>S' \<Longrightarrow> r x = x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2646
    by (auto simp: retraction_def retract_of_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2647
  obtain g h where "homeomorphism S S' g h"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2648
    using hom by (force simp: homeomorphic_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2649
  then have "continuous_on (f ` T) g"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2650
    by (meson \<open>f ` T \<subseteq> S\<close> continuous_on_subset homeomorphism_def)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2651
  then have contgf: "continuous_on T (g \<circ> f)"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2652
    by (metis continuous_on_compose contf)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2653
  have gfTC: "(g \<circ> f) ` T \<subseteq> C"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2654
  proof -
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2655
    have "g ` S = S'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2656
      by (metis (no_types) \<open>homeomorphism S S' g h\<close> homeomorphism_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2657
    with \<open>S' \<subseteq> C\<close> \<open>f ` T \<subseteq> S\<close> show ?thesis by force
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2658
  qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2659
  obtain f' where f': "continuous_on U f'"  "f' ` U \<subseteq> C"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2660
                      "\<And>x. x \<in> T \<Longrightarrow> f' x = (g \<circ> f) x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2661
    by (metis Dugundji [OF C cloUT contgf gfTC])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2662
  show ?thesis
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2663
  proof (rule_tac g = "h \<circ> r \<circ> f'" in that)
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2664
    show "continuous_on U (h \<circ> r \<circ> f')"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2665
      apply (intro continuous_on_compose f')
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2666
       using continuous_on_subset contr f' apply blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2667
      by (meson \<open>homeomorphism S S' g h\<close> \<open>r ` C \<subseteq> S'\<close> continuous_on_subset \<open>f' ` U \<subseteq> C\<close> homeomorphism_def image_mono)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2668
    show "(h \<circ> r \<circ> f') ` U \<subseteq> S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2669
      using \<open>homeomorphism S S' g h\<close> \<open>r ` C \<subseteq> S'\<close> \<open>f' ` U \<subseteq> C\<close>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2670
      by (fastforce simp: homeomorphism_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2671
    show "\<And>x. x \<in> T \<Longrightarrow> (h \<circ> r \<circ> f') x = f x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2672
      using \<open>homeomorphism S S' g h\<close> \<open>f ` T \<subseteq> S\<close> f'
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2673
      by (auto simp: rid homeomorphism_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2674
  qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2675
qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2676
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2677
lemma AR_imp_absolute_retract:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2678
  fixes S :: "'a::euclidean_space set" and S' :: "'b::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2679
  assumes "AR S" "S homeomorphic S'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2680
      and clo: "closedin (subtopology euclidean U) S'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2681
    shows "S' retract_of U"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2682
proof -
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2683
  obtain g h where hom: "homeomorphism S S' g h"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2684
    using assms by (force simp: homeomorphic_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2685
  have h: "continuous_on S' h" " h ` S' \<subseteq> S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2686
    using hom homeomorphism_def apply blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2687
    apply (metis hom equalityE homeomorphism_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2688
    done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2689
  obtain h' where h': "continuous_on U h'" "h' ` U \<subseteq> S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2690
              and h'h: "\<And>x. x \<in> S' \<Longrightarrow> h' x = h x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2691
    by (blast intro: AR_imp_absolute_extensor [OF \<open>AR S\<close> h clo])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2692
  have [simp]: "S' \<subseteq> U" using clo closedin_limpt by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2693
  show ?thesis
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2694
  proof (simp add: retraction_def retract_of_def, intro exI conjI)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2695
    show "continuous_on U (g \<circ> h')"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2696
      apply (intro continuous_on_compose h')
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2697
      apply (meson hom continuous_on_subset h' homeomorphism_cont1)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2698
      done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2699
    show "(g \<circ> h') ` U \<subseteq> S'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2700
      using h'  by clarsimp (metis hom subsetD homeomorphism_def imageI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2701
    show "\<forall>x\<in>S'. (g \<circ> h') x = x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2702
      by clarsimp (metis h'h hom homeomorphism_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2703
  qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2704
qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2705
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2706
lemma AR_imp_absolute_retract_UNIV:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2707
  fixes S :: "'a::euclidean_space set" and S' :: "'b::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2708
  assumes "AR S" and hom: "S homeomorphic S'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2709
      and clo: "closed S'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2710
    shows "S' retract_of UNIV"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2711
apply (rule AR_imp_absolute_retract [OF \<open>AR S\<close> hom])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2712
using clo closed_closedin by auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2713
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2714
lemma absolute_extensor_imp_AR:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2715
  fixes S :: "'a::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2716
  assumes "\<And>f :: 'a * real \<Rightarrow> 'a.
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2717
           \<And>U T. \<lbrakk>continuous_on T f;  f ` T \<subseteq> S;
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2718
                  closedin (subtopology euclidean U) T\<rbrakk>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2719
                 \<Longrightarrow> \<exists>g. continuous_on U g \<and> g ` U \<subseteq> S \<and> (\<forall>x \<in> T. g x = f x)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2720
  shows "AR S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2721
proof (clarsimp simp: AR_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2722
  fix U and T :: "('a * real) set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2723
  assume "S homeomorphic T" and clo: "closedin (subtopology euclidean U) T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2724
  then obtain g h where hom: "homeomorphism S T g h"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2725
    by (force simp: homeomorphic_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2726
  have h: "continuous_on T h" " h ` T \<subseteq> S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2727
    using hom homeomorphism_def apply blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2728
    apply (metis hom equalityE homeomorphism_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2729
    done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2730
  obtain h' where h': "continuous_on U h'" "h' ` U \<subseteq> S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2731
              and h'h: "\<forall>x\<in>T. h' x = h x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2732
    using assms [OF h clo] by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2733
  have [simp]: "T \<subseteq> U"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2734
    using clo closedin_imp_subset by auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2735
  show "T retract_of U"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2736
  proof (simp add: retraction_def retract_of_def, intro exI conjI)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2737
    show "continuous_on U (g \<circ> h')"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2738
      apply (intro continuous_on_compose h')
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2739
      apply (meson hom continuous_on_subset h' homeomorphism_cont1)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2740
      done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2741
    show "(g \<circ> h') ` U \<subseteq> T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2742
      using h'  by clarsimp (metis hom subsetD homeomorphism_def imageI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2743
    show "\<forall>x\<in>T. (g \<circ> h') x = x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2744
      by clarsimp (metis h'h hom homeomorphism_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2745
  qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2746
qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2747
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2748
lemma AR_eq_absolute_extensor:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2749
  fixes S :: "'a::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2750
  shows "AR S \<longleftrightarrow>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2751
       (\<forall>f :: 'a * real \<Rightarrow> 'a.
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2752
        \<forall>U T. continuous_on T f \<longrightarrow> f ` T \<subseteq> S \<longrightarrow>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2753
               closedin (subtopology euclidean U) T \<longrightarrow>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2754
                (\<exists>g. continuous_on U g \<and> g ` U \<subseteq> S \<and> (\<forall>x \<in> T. g x = f x)))"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2755
apply (rule iffI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2756
 apply (metis AR_imp_absolute_extensor)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2757
apply (simp add: absolute_extensor_imp_AR)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2758
done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2759
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2760
lemma AR_imp_retract:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2761
  fixes S :: "'a::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2762
  assumes "AR S \<and> closedin (subtopology euclidean U) S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2763
    shows "S retract_of U"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2764
using AR_imp_absolute_retract assms homeomorphic_refl by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2765
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2766
lemma AR_homeomorphic_AR:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2767
  fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2768
  assumes "AR T" "S homeomorphic T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2769
    shows "AR S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2770
unfolding AR_def
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2771
by (metis assms AR_imp_absolute_retract homeomorphic_trans [of _ S] homeomorphic_sym)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2772
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2773
lemma homeomorphic_AR_iff_AR:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2774
  fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2775
  shows "S homeomorphic T \<Longrightarrow> AR S \<longleftrightarrow> AR T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2776
by (metis AR_homeomorphic_AR homeomorphic_sym)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2777
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2778
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2779
proposition ANR_imp_absolute_neighbourhood_extensor:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2780
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2781
  assumes "ANR S" and contf: "continuous_on T f" and "f ` T \<subseteq> S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2782
      and cloUT: "closedin (subtopology euclidean U) T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2783
  obtains V g where "T \<subseteq> V" "openin (subtopology euclidean U) V"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2784
                    "continuous_on V g"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2785
                    "g ` V \<subseteq> S" "\<And>x. x \<in> T \<Longrightarrow> g x = f x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2786
proof -
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2787
  have "aff_dim S < int (DIM('b \<times> real))"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2788
    using aff_dim_le_DIM [of S] by simp
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2789
  then obtain C and S' :: "('b * real) set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2790
          where C: "convex C" "C \<noteq> {}"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2791
            and cloCS: "closedin (subtopology euclidean C) S'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2792
            and hom: "S homeomorphic S'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2793
    by (metis that homeomorphic_closedin_convex)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2794
  then obtain D where opD: "openin (subtopology euclidean C) D" and "S' retract_of D"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2795
    using \<open>ANR S\<close> by (auto simp: ANR_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2796
  then obtain r where "S' \<subseteq> D" and contr: "continuous_on D r"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2797
                  and "r ` D \<subseteq> S'" and rid: "\<And>x. x \<in> S' \<Longrightarrow> r x = x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2798
    by (auto simp: retraction_def retract_of_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2799
  obtain g h where homgh: "homeomorphism S S' g h"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2800
    using hom by (force simp: homeomorphic_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2801
  have "continuous_on (f ` T) g"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2802
    by (meson \<open>f ` T \<subseteq> S\<close> continuous_on_subset homeomorphism_def homgh)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2803
  then have contgf: "continuous_on T (g \<circ> f)"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2804
    by (intro continuous_on_compose contf)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2805
  have gfTC: "(g \<circ> f) ` T \<subseteq> C"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2806
  proof -
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2807
    have "g ` S = S'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2808
      by (metis (no_types) homeomorphism_def homgh)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2809
    then show ?thesis
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2810
      by (metis (no_types) assms(3) cloCS closedin_def image_comp image_mono order.trans topspace_euclidean_subtopology)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2811
  qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2812
  obtain f' where contf': "continuous_on U f'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2813
              and "f' ` U \<subseteq> C"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2814
              and eq: "\<And>x. x \<in> T \<Longrightarrow> f' x = (g \<circ> f) x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2815
    by (metis Dugundji [OF C cloUT contgf gfTC])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2816
  show ?thesis
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2817
  proof (rule_tac V = "U \<inter> f' -` D" and g = "h \<circ> r \<circ> f'" in that)
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  2818
    show "T \<subseteq> U \<inter> f' -` D"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2819
      using cloUT closedin_imp_subset \<open>S' \<subseteq> D\<close> \<open>f ` T \<subseteq> S\<close> eq homeomorphism_image1 homgh
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2820
      by fastforce
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  2821
    show ope: "openin (subtopology euclidean U) (U \<inter> f' -` D)"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2822
      using  \<open>f' ` U \<subseteq> C\<close> by (auto simp: opD contf' continuous_openin_preimage)
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  2823
    have conth: "continuous_on (r ` f' ` (U \<inter> f' -` D)) h"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2824
      apply (rule continuous_on_subset [of S'])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2825
      using homeomorphism_def homgh apply blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2826
      using \<open>r ` D \<subseteq> S'\<close> by blast
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  2827
    show "continuous_on (U \<inter> f' -` D) (h \<circ> r \<circ> f')"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2828
      apply (intro continuous_on_compose conth
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2829
                   continuous_on_subset [OF contr] continuous_on_subset [OF contf'], auto)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2830
      done
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  2831
    show "(h \<circ> r \<circ> f') ` (U \<inter> f' -` D) \<subseteq> S"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2832
      using \<open>homeomorphism S S' g h\<close>  \<open>f' ` U \<subseteq> C\<close>  \<open>r ` D \<subseteq> S'\<close>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2833
      by (auto simp: homeomorphism_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2834
    show "\<And>x. x \<in> T \<Longrightarrow> (h \<circ> r \<circ> f') x = f x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2835
      using \<open>homeomorphism S S' g h\<close> \<open>f ` T \<subseteq> S\<close> eq
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2836
      by (auto simp: rid homeomorphism_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2837
  qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2838
qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2839
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2840
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2841
corollary ANR_imp_absolute_neighbourhood_retract:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2842
  fixes S :: "'a::euclidean_space set" and S' :: "'b::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2843
  assumes "ANR S" "S homeomorphic S'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2844
      and clo: "closedin (subtopology euclidean U) S'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2845
  obtains V where "openin (subtopology euclidean U) V" "S' retract_of V"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2846
proof -
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2847
  obtain g h where hom: "homeomorphism S S' g h"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2848
    using assms by (force simp: homeomorphic_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2849
  have h: "continuous_on S' h" " h ` S' \<subseteq> S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2850
    using hom homeomorphism_def apply blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2851
    apply (metis hom equalityE homeomorphism_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2852
    done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2853
    from ANR_imp_absolute_neighbourhood_extensor [OF \<open>ANR S\<close> h clo]
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2854
  obtain V h' where "S' \<subseteq> V" and opUV: "openin (subtopology euclidean U) V"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2855
                and h': "continuous_on V h'" "h' ` V \<subseteq> S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2856
                and h'h:"\<And>x. x \<in> S' \<Longrightarrow> h' x = h x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2857
    by (blast intro: ANR_imp_absolute_neighbourhood_extensor [OF \<open>ANR S\<close> h clo])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2858
  have "S' retract_of V"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2859
  proof (simp add: retraction_def retract_of_def, intro exI conjI \<open>S' \<subseteq> V\<close>)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2860
    show "continuous_on V (g \<circ> h')"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2861
      apply (intro continuous_on_compose h')
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2862
      apply (meson hom continuous_on_subset h' homeomorphism_cont1)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2863
      done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2864
    show "(g \<circ> h') ` V \<subseteq> S'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2865
      using h'  by clarsimp (metis hom subsetD homeomorphism_def imageI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2866
    show "\<forall>x\<in>S'. (g \<circ> h') x = x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2867
      by clarsimp (metis h'h hom homeomorphism_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2868
  qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2869
  then show ?thesis
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2870
    by (rule that [OF opUV])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2871
qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2872
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2873
corollary ANR_imp_absolute_neighbourhood_retract_UNIV:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2874
  fixes S :: "'a::euclidean_space set" and S' :: "'b::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2875
  assumes "ANR S" and hom: "S homeomorphic S'" and clo: "closed S'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2876
  obtains V where "open V" "S' retract_of V"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2877
  using ANR_imp_absolute_neighbourhood_retract [OF \<open>ANR S\<close> hom]
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2878
by (metis clo closed_closedin open_openin subtopology_UNIV)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2879
63928
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63627
diff changeset
  2880
corollary neighbourhood_extension_into_ANR:
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63627
diff changeset
  2881
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63627
diff changeset
  2882
  assumes contf: "continuous_on S f" and fim: "f ` S \<subseteq> T" and "ANR T" "closed S"
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63627
diff changeset
  2883
  obtains V g where "S \<subseteq> V" "open V" "continuous_on V g"
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63627
diff changeset
  2884
                    "g ` V \<subseteq> T" "\<And>x. x \<in> S \<Longrightarrow> g x = f x"
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63627
diff changeset
  2885
  using ANR_imp_absolute_neighbourhood_extensor [OF  \<open>ANR T\<close> contf fim]
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63627
diff changeset
  2886
  by (metis \<open>closed S\<close> closed_closedin open_openin subtopology_UNIV)
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63627
diff changeset
  2887
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2888
lemma absolute_neighbourhood_extensor_imp_ANR:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2889
  fixes S :: "'a::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2890
  assumes "\<And>f :: 'a * real \<Rightarrow> 'a.
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2891
           \<And>U T. \<lbrakk>continuous_on T f;  f ` T \<subseteq> S;
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2892
                  closedin (subtopology euclidean U) T\<rbrakk>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2893
                 \<Longrightarrow> \<exists>V g. T \<subseteq> V \<and> openin (subtopology euclidean U) V \<and>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2894
                       continuous_on V g \<and> g ` V \<subseteq> S \<and> (\<forall>x \<in> T. g x = f x)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2895
  shows "ANR S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2896
proof (clarsimp simp: ANR_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2897
  fix U and T :: "('a * real) set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2898
  assume "S homeomorphic T" and clo: "closedin (subtopology euclidean U) T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2899
  then obtain g h where hom: "homeomorphism S T g h"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2900
    by (force simp: homeomorphic_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2901
  have h: "continuous_on T h" " h ` T \<subseteq> S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2902
    using hom homeomorphism_def apply blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2903
    apply (metis hom equalityE homeomorphism_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2904
    done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2905
  obtain V h' where "T \<subseteq> V" and opV: "openin (subtopology euclidean U) V"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2906
                and h': "continuous_on V h'" "h' ` V \<subseteq> S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2907
              and h'h: "\<forall>x\<in>T. h' x = h x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2908
    using assms [OF h clo] by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2909
  have [simp]: "T \<subseteq> U"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2910
    using clo closedin_imp_subset by auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2911
  have "T retract_of V"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2912
  proof (simp add: retraction_def retract_of_def, intro exI conjI \<open>T \<subseteq> V\<close>)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2913
    show "continuous_on V (g \<circ> h')"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2914
      apply (intro continuous_on_compose h')
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2915
      apply (meson hom continuous_on_subset h' homeomorphism_cont1)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2916
      done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2917
    show "(g \<circ> h') ` V \<subseteq> T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2918
      using h'  by clarsimp (metis hom subsetD homeomorphism_def imageI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2919
    show "\<forall>x\<in>T. (g \<circ> h') x = x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2920
      by clarsimp (metis h'h hom homeomorphism_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2921
  qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2922
  then show "\<exists>V. openin (subtopology euclidean U) V \<and> T retract_of V"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2923
    using opV by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2924
qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2925
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2926
lemma ANR_eq_absolute_neighbourhood_extensor:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2927
  fixes S :: "'a::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2928
  shows "ANR S \<longleftrightarrow>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2929
         (\<forall>f :: 'a * real \<Rightarrow> 'a.
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2930
          \<forall>U T. continuous_on T f \<longrightarrow> f ` T \<subseteq> S \<longrightarrow>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2931
                closedin (subtopology euclidean U) T \<longrightarrow>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2932
               (\<exists>V g. T \<subseteq> V \<and> openin (subtopology euclidean U) V \<and>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2933
                       continuous_on V g \<and> g ` V \<subseteq> S \<and> (\<forall>x \<in> T. g x = f x)))"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2934
apply (rule iffI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2935
 apply (metis ANR_imp_absolute_neighbourhood_extensor)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2936
apply (simp add: absolute_neighbourhood_extensor_imp_ANR)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2937
done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2938
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2939
lemma ANR_imp_neighbourhood_retract:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2940
  fixes S :: "'a::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2941
  assumes "ANR S" "closedin (subtopology euclidean U) S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2942
  obtains V where "openin (subtopology euclidean U) V" "S retract_of V"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2943
using ANR_imp_absolute_neighbourhood_retract assms homeomorphic_refl by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2944
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2945
lemma ANR_imp_absolute_closed_neighbourhood_retract:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2946
  fixes S :: "'a::euclidean_space set" and S' :: "'b::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2947
  assumes "ANR S" "S homeomorphic S'" and US': "closedin (subtopology euclidean U) S'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2948
  obtains V W
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2949
    where "openin (subtopology euclidean U) V"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2950
          "closedin (subtopology euclidean U) W"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2951
          "S' \<subseteq> V" "V \<subseteq> W" "S' retract_of W"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2952
proof -
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2953
  obtain Z where "openin (subtopology euclidean U) Z" and S'Z: "S' retract_of Z"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2954
    by (blast intro: assms ANR_imp_absolute_neighbourhood_retract)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2955
  then have UUZ: "closedin (subtopology euclidean U) (U - Z)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2956
    by auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2957
  have "S' \<inter> (U - Z) = {}"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2958
    using \<open>S' retract_of Z\<close> closedin_retract closedin_subtopology by fastforce
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2959
  then obtain V W
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2960
      where "openin (subtopology euclidean U) V"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2961
        and "openin (subtopology euclidean U) W"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2962
        and "S' \<subseteq> V" "U - Z \<subseteq> W" "V \<inter> W = {}"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2963
      using separation_normal_local [OF US' UUZ]  by auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2964
  moreover have "S' retract_of U - W"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2965
    apply (rule retract_of_subset [OF S'Z])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2966
    using US' \<open>S' \<subseteq> V\<close> \<open>V \<inter> W = {}\<close> closedin_subset apply fastforce
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2967
    using Diff_subset_conv \<open>U - Z \<subseteq> W\<close> by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2968
  ultimately show ?thesis
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2969
    apply (rule_tac V=V and W = "U-W" in that)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  2970
    using openin_imp_subset apply force+
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2971
    done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2972
qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2973
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2974
lemma ANR_imp_closed_neighbourhood_retract:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2975
  fixes S :: "'a::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2976
  assumes "ANR S" "closedin (subtopology euclidean U) S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2977
  obtains V W where "openin (subtopology euclidean U) V"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2978
                    "closedin (subtopology euclidean U) W"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2979
                    "S \<subseteq> V" "V \<subseteq> W" "S retract_of W"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2980
by (meson ANR_imp_absolute_closed_neighbourhood_retract assms homeomorphic_refl)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2981
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2982
lemma ANR_homeomorphic_ANR:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2983
  fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2984
  assumes "ANR T" "S homeomorphic T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2985
    shows "ANR S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2986
unfolding ANR_def
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2987
by (metis assms ANR_imp_absolute_neighbourhood_retract homeomorphic_trans [of _ S] homeomorphic_sym)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2988
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2989
lemma homeomorphic_ANR_iff_ANR:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2990
  fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2991
  shows "S homeomorphic T \<Longrightarrow> ANR S \<longleftrightarrow> ANR T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2992
by (metis ANR_homeomorphic_ANR homeomorphic_sym)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2993
67968
a5ad4c015d1c removed dots at the end of (sub)titles
nipkow
parents: 67682
diff changeset
  2994
subsection\<open> Analogous properties of ENRs\<close>
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2995
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2996
proposition ENR_imp_absolute_neighbourhood_retract:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2997
  fixes S :: "'a::euclidean_space set" and S' :: "'b::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2998
  assumes "ENR S" and hom: "S homeomorphic S'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  2999
      and "S' \<subseteq> U"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3000
  obtains V where "openin (subtopology euclidean U) V" "S' retract_of V"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3001
proof -
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3002
  obtain X where "open X" "S retract_of X"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3003
    using \<open>ENR S\<close> by (auto simp: ENR_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3004
  then obtain r where "retraction X S r"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3005
    by (auto simp: retract_of_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3006
  have "locally compact S'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3007
    using retract_of_locally_compact open_imp_locally_compact
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3008
          homeomorphic_local_compactness \<open>S retract_of X\<close> \<open>open X\<close> hom by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3009
  then obtain W where UW: "openin (subtopology euclidean U) W"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3010
                  and WS': "closedin (subtopology euclidean W) S'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3011
    apply (rule locally_compact_closedin_open)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3012
    apply (rename_tac W)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3013
    apply (rule_tac W = "U \<inter> W" in that, blast)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3014
    by (simp add: \<open>S' \<subseteq> U\<close> closedin_limpt)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3015
  obtain f g where hom: "homeomorphism S S' f g"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3016
    using assms by (force simp: homeomorphic_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3017
  have contg: "continuous_on S' g"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3018
    using hom homeomorphism_def by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3019
  moreover have "g ` S' \<subseteq> S" by (metis hom equalityE homeomorphism_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3020
  ultimately obtain h where conth: "continuous_on W h" and hg: "\<And>x. x \<in> S' \<Longrightarrow> h x = g x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3021
    using Tietze_unbounded [of S' g W] WS' by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3022
  have "W \<subseteq> U" using UW openin_open by auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3023
  have "S' \<subseteq> W" using WS' closedin_closed by auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3024
  have him: "\<And>x. x \<in> S' \<Longrightarrow> h x \<in> X"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3025
    by (metis (no_types) \<open>S retract_of X\<close> hg hom homeomorphism_def image_insert insert_absorb insert_iff retract_of_imp_subset subset_eq)
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3026
  have "S' retract_of (W \<inter> h -` X)"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3027
  proof (simp add: retraction_def retract_of_def, intro exI conjI)
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3028
    show "S' \<subseteq> W" "S' \<subseteq> h -` X"
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3029
      using him WS' closedin_imp_subset by blast+
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  3030
    show "continuous_on (W \<inter> h -` X) (f \<circ> r \<circ> h)"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3031
    proof (intro continuous_on_compose)
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3032
      show "continuous_on (W \<inter> h -` X) h"
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3033
        by (meson conth continuous_on_subset inf_le1)
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3034
      show "continuous_on (h ` (W \<inter> h -` X)) r"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3035
      proof -
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3036
        have "h ` (W \<inter> h -` X) \<subseteq> X"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3037
          by blast
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3038
        then show "continuous_on (h ` (W \<inter> h -` X)) r"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3039
          by (meson \<open>retraction X S r\<close> continuous_on_subset retraction)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3040
      qed
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3041
      show "continuous_on (r ` h ` (W \<inter> h -` X)) f"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3042
        apply (rule continuous_on_subset [of S])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3043
         using hom homeomorphism_def apply blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3044
        apply clarify
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3045
        apply (meson \<open>retraction X S r\<close> subsetD imageI retraction_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3046
        done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3047
    qed
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3048
    show "(f \<circ> r \<circ> h) ` (W \<inter> h -` X) \<subseteq> S'"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3049
      using \<open>retraction X S r\<close> hom
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3050
      by (auto simp: retraction_def homeomorphism_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3051
    show "\<forall>x\<in>S'. (f \<circ> r \<circ> h) x = x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3052
      using \<open>retraction X S r\<close> hom by (auto simp: retraction_def homeomorphism_def hg)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3053
  qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3054
  then show ?thesis
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3055
    apply (rule_tac V = "W \<inter> h -` X" in that)
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3056
     apply (rule openin_trans [OF _ UW])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3057
     using \<open>continuous_on W h\<close> \<open>open X\<close> continuous_openin_preimage_eq apply blast+
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3058
     done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3059
qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3060
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3061
corollary ENR_imp_absolute_neighbourhood_retract_UNIV:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3062
  fixes S :: "'a::euclidean_space set" and S' :: "'b::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3063
  assumes "ENR S" "S homeomorphic S'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3064
  obtains T' where "open T'" "S' retract_of T'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3065
by (metis ENR_imp_absolute_neighbourhood_retract UNIV_I assms(1) assms(2) open_openin subsetI subtopology_UNIV)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3066
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3067
lemma ENR_homeomorphic_ENR:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3068
  fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3069
  assumes "ENR T" "S homeomorphic T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3070
    shows "ENR S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3071
unfolding ENR_def
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3072
by (meson ENR_imp_absolute_neighbourhood_retract_UNIV assms homeomorphic_sym)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3073
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3074
lemma homeomorphic_ENR_iff_ENR:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3075
  fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3076
  assumes "S homeomorphic T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3077
    shows "ENR S \<longleftrightarrow> ENR T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3078
by (meson ENR_homeomorphic_ENR assms homeomorphic_sym)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3079
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3080
lemma ENR_translation:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3081
  fixes S :: "'a::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3082
  shows "ENR(image (\<lambda>x. a + x) S) \<longleftrightarrow> ENR S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3083
by (meson homeomorphic_sym homeomorphic_translation homeomorphic_ENR_iff_ENR)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3084
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3085
lemma ENR_linear_image_eq:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3086
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3087
  assumes "linear f" "inj f"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3088
  shows "ENR (image f S) \<longleftrightarrow> ENR S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3089
apply (rule homeomorphic_ENR_iff_ENR)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3090
using assms homeomorphic_sym linear_homeomorphic_image by auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3091
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3092
subsection\<open>Some relations among the concepts\<close>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3093
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3094
text\<open>We also relate AR to being a retract of UNIV, which is often a more convenient proxy in the closed case.\<close>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3095
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3096
lemma AR_imp_ANR: "AR S \<Longrightarrow> ANR S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3097
  using ANR_def AR_def by fastforce
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3098
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3099
lemma ENR_imp_ANR:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3100
  fixes S :: "'a::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3101
  shows "ENR S \<Longrightarrow> ANR S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3102
apply (simp add: ANR_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3103
by (metis ENR_imp_absolute_neighbourhood_retract closedin_imp_subset)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3104
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3105
lemma ENR_ANR:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3106
  fixes S :: "'a::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3107
  shows "ENR S \<longleftrightarrow> ANR S \<and> locally compact S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3108
proof
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3109
  assume "ENR S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3110
  then have "locally compact S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3111
    using ENR_def open_imp_locally_compact retract_of_locally_compact by auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3112
  then show "ANR S \<and> locally compact S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3113
    using ENR_imp_ANR \<open>ENR S\<close> by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3114
next
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3115
  assume "ANR S \<and> locally compact S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3116
  then have "ANR S" "locally compact S" by auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3117
  then obtain T :: "('a * real) set" where "closed T" "S homeomorphic T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3118
    using locally_compact_homeomorphic_closed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3119
    by (metis DIM_prod DIM_real Suc_eq_plus1 lessI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3120
  then show "ENR S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3121
    using \<open>ANR S\<close>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3122
    apply (simp add: ANR_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3123
    apply (drule_tac x=UNIV in spec)
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3124
    apply (drule_tac x=T in spec, clarsimp)
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3125
    apply (meson ENR_def ENR_homeomorphic_ENR open_openin)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3126
    done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3127
qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3128
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3129
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3130
proposition AR_ANR:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3131
  fixes S :: "'a::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3132
  shows "AR S \<longleftrightarrow> ANR S \<and> contractible S \<and> S \<noteq> {}"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3133
        (is "?lhs = ?rhs")
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3134
proof
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3135
  assume ?lhs
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3136
  obtain C and S' :: "('a * real) set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3137
    where "convex C" "C \<noteq> {}" "closedin (subtopology euclidean C) S'" "S homeomorphic S'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3138
      apply (rule homeomorphic_closedin_convex [of S, where 'n = "'a * real"])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3139
      using aff_dim_le_DIM [of S] by auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3140
  with \<open>AR S\<close> have "contractible S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3141
    apply (simp add: AR_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3142
    apply (drule_tac x=C in spec)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3143
    apply (drule_tac x="S'" in spec, simp)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3144
    using convex_imp_contractible homeomorphic_contractible_eq retract_of_contractible by fastforce
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3145
  with \<open>AR S\<close> show ?rhs
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3146
    apply (auto simp: AR_imp_ANR)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3147
    apply (force simp: AR_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3148
    done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3149
next
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3150
  assume ?rhs
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3151
  then obtain a and h:: "real \<times> 'a \<Rightarrow> 'a"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3152
      where conth: "continuous_on ({0..1} \<times> S) h"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3153
        and hS: "h ` ({0..1} \<times> S) \<subseteq> S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3154
        and [simp]: "\<And>x. h(0, x) = x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3155
        and [simp]: "\<And>x. h(1, x) = a"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3156
        and "ANR S" "S \<noteq> {}"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3157
    by (auto simp: contractible_def homotopic_with_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3158
  then have "a \<in> S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3159
    by (metis all_not_in_conv atLeastAtMost_iff image_subset_iff mem_Sigma_iff order_refl zero_le_one)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3160
  have "\<exists>g. continuous_on W g \<and> g ` W \<subseteq> S \<and> (\<forall>x\<in>T. g x = f x)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3161
         if      f: "continuous_on T f" "f ` T \<subseteq> S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3162
            and WT: "closedin (subtopology euclidean W) T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3163
         for W T and f :: "'a \<times> real \<Rightarrow> 'a"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3164
  proof -
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3165
    obtain U g
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3166
      where "T \<subseteq> U" and WU: "openin (subtopology euclidean W) U"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3167
        and contg: "continuous_on U g"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3168
        and "g ` U \<subseteq> S" and gf: "\<And>x. x \<in> T \<Longrightarrow> g x = f x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3169
      using iffD1 [OF ANR_eq_absolute_neighbourhood_extensor \<open>ANR S\<close>, rule_format, OF f WT]
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3170
      by auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3171
    have WWU: "closedin (subtopology euclidean W) (W - U)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3172
      using WU closedin_diff by fastforce
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3173
    moreover have "(W - U) \<inter> T = {}"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3174
      using \<open>T \<subseteq> U\<close> by auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3175
    ultimately obtain V V'
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3176
      where WV': "openin (subtopology euclidean W) V'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3177
        and WV: "openin (subtopology euclidean W) V"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3178
        and "W - U \<subseteq> V'" "T \<subseteq> V" "V' \<inter> V = {}"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3179
      using separation_normal_local [of W "W-U" T] WT by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3180
    then have WVT: "T \<inter> (W - V) = {}"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3181
      by auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3182
    have WWV: "closedin (subtopology euclidean W) (W - V)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3183
      using WV closedin_diff by fastforce
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3184
    obtain j :: " 'a \<times> real \<Rightarrow> real"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3185
      where contj: "continuous_on W j"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3186
        and j:  "\<And>x. x \<in> W \<Longrightarrow> j x \<in> {0..1}"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3187
        and j0: "\<And>x. x \<in> W - V \<Longrightarrow> j x = 1"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3188
        and j1: "\<And>x. x \<in> T \<Longrightarrow> j x = 0"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3189
      by (rule Urysohn_local [OF WT WWV WVT, of 0 "1::real"]) (auto simp: in_segment)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3190
    have Weq: "W = (W - V) \<union> (W - V')"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3191
      using \<open>V' \<inter> V = {}\<close> by force
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3192
    show ?thesis
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3193
    proof (intro conjI exI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3194
      have *: "continuous_on (W - V') (\<lambda>x. h (j x, g x))"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3195
        apply (rule continuous_on_compose2 [OF conth continuous_on_Pair])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3196
          apply (rule continuous_on_subset [OF contj Diff_subset])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3197
         apply (rule continuous_on_subset [OF contg])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3198
         apply (metis Diff_subset_conv Un_commute \<open>W - U \<subseteq> V'\<close>)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3199
        using j \<open>g ` U \<subseteq> S\<close> \<open>W - U \<subseteq> V'\<close> apply fastforce
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3200
        done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3201
      show "continuous_on W (\<lambda>x. if x \<in> W - V then a else h (j x, g x))"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3202
        apply (subst Weq)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3203
        apply (rule continuous_on_cases_local)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3204
            apply (simp_all add: Weq [symmetric] WWV continuous_on_const *)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3205
          using WV' closedin_diff apply fastforce
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3206
         apply (auto simp: j0 j1)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3207
        done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3208
    next
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3209
      have "h (j (x, y), g (x, y)) \<in> S" if "(x, y) \<in> W" "(x, y) \<in> V" for x y
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3210
      proof -
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3211
        have "j(x, y) \<in> {0..1}"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3212
          using j that by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3213
        moreover have "g(x, y) \<in> S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3214
          using \<open>V' \<inter> V = {}\<close> \<open>W - U \<subseteq> V'\<close> \<open>g ` U \<subseteq> S\<close> that by fastforce
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3215
        ultimately show ?thesis
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3216
          using hS by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3217
      qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3218
      with \<open>a \<in> S\<close> \<open>g ` U \<subseteq> S\<close>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3219
      show "(\<lambda>x. if x \<in> W - V then a else h (j x, g x)) ` W \<subseteq> S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3220
        by auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3221
    next
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3222
      show "\<forall>x\<in>T. (if x \<in> W - V then a else h (j x, g x)) = f x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3223
        using \<open>T \<subseteq> V\<close> by (auto simp: j0 j1 gf)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3224
    qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3225
  qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3226
  then show ?lhs
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3227
    by (simp add: AR_eq_absolute_extensor)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3228
qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3229
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3230
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3231
lemma ANR_retract_of_ANR:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3232
  fixes S :: "'a::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3233
  assumes "ANR T" "S retract_of T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3234
  shows "ANR S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3235
using assms
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3236
apply (simp add: ANR_eq_absolute_neighbourhood_extensor retract_of_def retraction_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3237
apply (clarsimp elim!: all_forward)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3238
apply (erule impCE, metis subset_trans)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3239
apply (clarsimp elim!: ex_forward)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  3240
apply (rule_tac x="r \<circ> g" in exI)
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3241
by (metis comp_apply continuous_on_compose continuous_on_subset subsetD imageI image_comp image_mono subset_trans)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3242
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3243
lemma AR_retract_of_AR:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3244
  fixes S :: "'a::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3245
  shows "\<lbrakk>AR T; S retract_of T\<rbrakk> \<Longrightarrow> AR S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3246
using ANR_retract_of_ANR AR_ANR retract_of_contractible by fastforce
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3247
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3248
lemma ENR_retract_of_ENR:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3249
   "\<lbrakk>ENR T; S retract_of T\<rbrakk> \<Longrightarrow> ENR S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3250
by (meson ENR_def retract_of_trans)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3251
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3252
lemma retract_of_UNIV:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3253
  fixes S :: "'a::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3254
  shows "S retract_of UNIV \<longleftrightarrow> AR S \<and> closed S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3255
by (metis AR_ANR AR_imp_retract ENR_def ENR_imp_ANR closed_UNIV closed_closedin contractible_UNIV empty_not_UNIV open_UNIV retract_of_closed retract_of_contractible retract_of_empty(1) subtopology_UNIV)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3256
64122
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  3257
lemma compact_AR:
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3258
  fixes S :: "'a::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3259
  shows "compact S \<and> AR S \<longleftrightarrow> compact S \<and> S retract_of UNIV"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3260
using compact_imp_closed retract_of_UNIV by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3261
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3262
subsection\<open>More properties of ARs, ANRs and ENRs\<close>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3263
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3264
lemma not_AR_empty [simp]: "~ AR({})"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3265
  by (auto simp: AR_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3266
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3267
lemma ENR_empty [simp]: "ENR {}"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3268
  by (simp add: ENR_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3269
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3270
lemma ANR_empty [simp]: "ANR ({} :: 'a::euclidean_space set)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3271
  by (simp add: ENR_imp_ANR)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3272
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3273
lemma convex_imp_AR:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3274
  fixes S :: "'a::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3275
  shows "\<lbrakk>convex S; S \<noteq> {}\<rbrakk> \<Longrightarrow> AR S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3276
apply (rule absolute_extensor_imp_AR)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3277
apply (rule Dugundji, assumption+)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3278
by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3279
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3280
lemma convex_imp_ANR:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3281
  fixes S :: "'a::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3282
  shows "convex S \<Longrightarrow> ANR S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3283
using ANR_empty AR_imp_ANR convex_imp_AR by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3284
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3285
lemma ENR_convex_closed:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3286
  fixes S :: "'a::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3287
  shows "\<lbrakk>closed S; convex S\<rbrakk> \<Longrightarrow> ENR S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3288
using ENR_def ENR_empty convex_imp_AR retract_of_UNIV by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3289
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3290
lemma AR_UNIV [simp]: "AR (UNIV :: 'a::euclidean_space set)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3291
  using retract_of_UNIV by auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3292
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3293
lemma ANR_UNIV [simp]: "ANR (UNIV :: 'a::euclidean_space set)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3294
  by (simp add: AR_imp_ANR)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3295
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3296
lemma ENR_UNIV [simp]:"ENR UNIV"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3297
  using ENR_def by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3298
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3299
lemma AR_singleton:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3300
    fixes a :: "'a::euclidean_space"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3301
    shows "AR {a}"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3302
  using retract_of_UNIV by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3303
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3304
lemma ANR_singleton:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3305
    fixes a :: "'a::euclidean_space"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3306
    shows "ANR {a}"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3307
  by (simp add: AR_imp_ANR AR_singleton)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3308
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3309
lemma ENR_singleton: "ENR {a}"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3310
  using ENR_def by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3311
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3312
subsection\<open>ARs closed under union\<close>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3313
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3314
lemma AR_closed_Un_local_aux:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3315
  fixes U :: "'a::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3316
  assumes "closedin (subtopology euclidean U) S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3317
          "closedin (subtopology euclidean U) T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3318
          "AR S" "AR T" "AR(S \<inter> T)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3319
  shows "(S \<union> T) retract_of U"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3320
proof -
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3321
  have "S \<inter> T \<noteq> {}"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3322
    using assms AR_def by fastforce
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3323
  have "S \<subseteq> U" "T \<subseteq> U"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3324
    using assms by (auto simp: closedin_imp_subset)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3325
  define S' where "S' \<equiv> {x \<in> U. setdist {x} S \<le> setdist {x} T}"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3326
  define T' where "T' \<equiv> {x \<in> U. setdist {x} T \<le> setdist {x} S}"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3327
  define W  where "W \<equiv> {x \<in> U. setdist {x} S = setdist {x} T}"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3328
  have US': "closedin (subtopology euclidean U) S'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3329
    using continuous_closedin_preimage [of U "\<lambda>x. setdist {x} S - setdist {x} T" "{..0}"]
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3330
    by (simp add: S'_def vimage_def Collect_conj_eq continuous_on_diff continuous_on_setdist)
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3331
  have UT': "closedin (subtopology euclidean U) T'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3332
    using continuous_closedin_preimage [of U "\<lambda>x. setdist {x} T - setdist {x} S" "{..0}"]
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3333
    by (simp add: T'_def vimage_def Collect_conj_eq continuous_on_diff continuous_on_setdist)
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3334
  have "S \<subseteq> S'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3335
    using S'_def \<open>S \<subseteq> U\<close> setdist_sing_in_set by fastforce
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3336
  have "T \<subseteq> T'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3337
    using T'_def \<open>T \<subseteq> U\<close> setdist_sing_in_set by fastforce
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3338
  have "S \<inter> T \<subseteq> W" "W \<subseteq> U"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3339
    using \<open>S \<subseteq> U\<close> by (auto simp: W_def setdist_sing_in_set)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3340
  have "(S \<inter> T) retract_of W"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3341
    apply (rule AR_imp_absolute_retract [OF \<open>AR(S \<inter> T)\<close>])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3342
     apply (simp add: homeomorphic_refl)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3343
    apply (rule closedin_subset_trans [of U])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3344
    apply (simp_all add: assms closedin_Int \<open>S \<inter> T \<subseteq> W\<close> \<open>W \<subseteq> U\<close>)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3345
    done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3346
  then obtain r0
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3347
    where "S \<inter> T \<subseteq> W" and contr0: "continuous_on W r0"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3348
      and "r0 ` W \<subseteq> S \<inter> T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3349
      and r0 [simp]: "\<And>x. x \<in> S \<inter> T \<Longrightarrow> r0 x = x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3350
      by (auto simp: retract_of_def retraction_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3351
  have ST: "x \<in> W \<Longrightarrow> x \<in> S \<longleftrightarrow> x \<in> T" for x
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3352
    using setdist_eq_0_closedin \<open>S \<inter> T \<noteq> {}\<close> assms
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3353
    by (force simp: W_def setdist_sing_in_set)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3354
  have "S' \<inter> T' = W"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3355
    by (auto simp: S'_def T'_def W_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3356
  then have cloUW: "closedin (subtopology euclidean U) W"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3357
    using closedin_Int US' UT' by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3358
  define r where "r \<equiv> \<lambda>x. if x \<in> W then r0 x else x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3359
  have "r ` (W \<union> S) \<subseteq> S" "r ` (W \<union> T) \<subseteq> T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3360
    using \<open>r0 ` W \<subseteq> S \<inter> T\<close> r_def by auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3361
  have contr: "continuous_on (W \<union> (S \<union> T)) r"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3362
  unfolding r_def
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3363
  proof (rule continuous_on_cases_local [OF _ _ contr0 continuous_on_id])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3364
    show "closedin (subtopology euclidean (W \<union> (S \<union> T))) W"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3365
      using \<open>S \<subseteq> U\<close> \<open>T \<subseteq> U\<close> \<open>W \<subseteq> U\<close> \<open>closedin (subtopology euclidean U) W\<close> closedin_subset_trans by fastforce
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3366
    show "closedin (subtopology euclidean (W \<union> (S \<union> T))) (S \<union> T)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3367
      by (meson \<open>S \<subseteq> U\<close> \<open>T \<subseteq> U\<close> \<open>W \<subseteq> U\<close> assms closedin_Un closedin_subset_trans sup.bounded_iff sup.cobounded2)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3368
    show "\<And>x. x \<in> W \<and> x \<notin> W \<or> x \<in> S \<union> T \<and> x \<in> W \<Longrightarrow> r0 x = x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3369
      by (auto simp: ST)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3370
  qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3371
  have cloUWS: "closedin (subtopology euclidean U) (W \<union> S)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3372
    by (simp add: cloUW assms closedin_Un)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3373
  obtain g where contg: "continuous_on U g"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3374
             and "g ` U \<subseteq> S" and geqr: "\<And>x. x \<in> W \<union> S \<Longrightarrow> g x = r x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3375
    apply (rule AR_imp_absolute_extensor [OF \<open>AR S\<close> _ _ cloUWS])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3376
      apply (rule continuous_on_subset [OF contr])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3377
      using \<open>r ` (W \<union> S) \<subseteq> S\<close> apply auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3378
    done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3379
  have cloUWT: "closedin (subtopology euclidean U) (W \<union> T)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3380
    by (simp add: cloUW assms closedin_Un)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3381
  obtain h where conth: "continuous_on U h"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3382
             and "h ` U \<subseteq> T" and heqr: "\<And>x. x \<in> W \<union> T \<Longrightarrow> h x = r x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3383
    apply (rule AR_imp_absolute_extensor [OF \<open>AR T\<close> _ _ cloUWT])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3384
      apply (rule continuous_on_subset [OF contr])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3385
      using \<open>r ` (W \<union> T) \<subseteq> T\<close> apply auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3386
    done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3387
  have "U = S' \<union> T'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3388
    by (force simp: S'_def T'_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3389
  then have cont: "continuous_on U (\<lambda>x. if x \<in> S' then g x else h x)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3390
    apply (rule ssubst)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3391
    apply (rule continuous_on_cases_local)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3392
    using US' UT' \<open>S' \<inter> T' = W\<close> \<open>U = S' \<union> T'\<close>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3393
          contg conth continuous_on_subset geqr heqr apply auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3394
    done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3395
  have UST: "(\<lambda>x. if x \<in> S' then g x else h x) ` U \<subseteq> S \<union> T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3396
    using \<open>g ` U \<subseteq> S\<close> \<open>h ` U \<subseteq> T\<close> by auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3397
  show ?thesis
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3398
    apply (simp add: retract_of_def retraction_def \<open>S \<subseteq> U\<close> \<open>T \<subseteq> U\<close>)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3399
    apply (rule_tac x="\<lambda>x. if x \<in> S' then g x else h x" in exI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3400
    apply (intro conjI cont UST)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3401
    by (metis IntI ST Un_iff \<open>S \<subseteq> S'\<close> \<open>S' \<inter> T' = W\<close> \<open>T \<subseteq> T'\<close> subsetD geqr heqr r0 r_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3402
qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3403
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3404
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3405
proposition AR_closed_Un_local:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3406
  fixes S :: "'a::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3407
  assumes STS: "closedin (subtopology euclidean (S \<union> T)) S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3408
      and STT: "closedin (subtopology euclidean (S \<union> T)) T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3409
      and "AR S" "AR T" "AR(S \<inter> T)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3410
    shows "AR(S \<union> T)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3411
proof -
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3412
  have "C retract_of U"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3413
       if hom: "S \<union> T homeomorphic C" and UC: "closedin (subtopology euclidean U) C"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3414
       for U and C :: "('a * real) set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3415
  proof -
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3416
    obtain f g where hom: "homeomorphism (S \<union> T) C f g"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3417
      using hom by (force simp: homeomorphic_def)
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3418
    have US: "closedin (subtopology euclidean U) (C \<inter> g -` S)"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3419
      apply (rule closedin_trans [OF _ UC])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3420
      apply (rule continuous_closedin_preimage_gen [OF _ _ STS])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3421
      using hom homeomorphism_def apply blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3422
      apply (metis hom homeomorphism_def set_eq_subset)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3423
      done
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3424
    have UT: "closedin (subtopology euclidean U) (C \<inter> g -` T)"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3425
      apply (rule closedin_trans [OF _ UC])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3426
      apply (rule continuous_closedin_preimage_gen [OF _ _ STT])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3427
      using hom homeomorphism_def apply blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3428
      apply (metis hom homeomorphism_def set_eq_subset)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3429
      done
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3430
    have ARS: "AR (C \<inter> g -` S)"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3431
      apply (rule AR_homeomorphic_AR [OF \<open>AR S\<close>])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3432
      apply (simp add: homeomorphic_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3433
      apply (rule_tac x=g in exI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3434
      apply (rule_tac x=f in exI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3435
      using hom apply (auto simp: homeomorphism_def elim!: continuous_on_subset)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3436
      apply (rule_tac x="f x" in image_eqI, auto)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3437
      done
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3438
    have ART: "AR (C \<inter> g -` T)"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3439
      apply (rule AR_homeomorphic_AR [OF \<open>AR T\<close>])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3440
      apply (simp add: homeomorphic_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3441
      apply (rule_tac x=g in exI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3442
      apply (rule_tac x=f in exI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3443
      using hom apply (auto simp: homeomorphism_def elim!: continuous_on_subset)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3444
      apply (rule_tac x="f x" in image_eqI, auto)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3445
      done
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3446
    have ARI: "AR ((C \<inter> g -` S) \<inter> (C \<inter> g -` T))"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3447
      apply (rule AR_homeomorphic_AR [OF \<open>AR (S \<inter> T)\<close>])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3448
      apply (simp add: homeomorphic_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3449
      apply (rule_tac x=g in exI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3450
      apply (rule_tac x=f in exI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3451
      using hom
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3452
      apply (auto simp: homeomorphism_def elim!: continuous_on_subset)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3453
      apply (rule_tac x="f x" in image_eqI, auto)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3454
      done
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3455
    have "C = (C \<inter> g -` S) \<union> (C \<inter> g -` T)"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3456
      using hom  by (auto simp: homeomorphism_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3457
    then show ?thesis
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3458
      by (metis AR_closed_Un_local_aux [OF US UT ARS ART ARI])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3459
  qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3460
  then show ?thesis
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3461
    by (force simp: AR_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3462
qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3463
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3464
corollary AR_closed_Un:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3465
  fixes S :: "'a::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3466
  shows "\<lbrakk>closed S; closed T; AR S; AR T; AR (S \<inter> T)\<rbrakk> \<Longrightarrow> AR (S \<union> T)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3467
by (metis AR_closed_Un_local_aux closed_closedin retract_of_UNIV subtopology_UNIV)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3468
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3469
subsection\<open>ANRs closed under union\<close>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3470
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3471
lemma ANR_closed_Un_local_aux:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3472
  fixes U :: "'a::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3473
  assumes US: "closedin (subtopology euclidean U) S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3474
      and UT: "closedin (subtopology euclidean U) T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3475
      and "ANR S" "ANR T" "ANR(S \<inter> T)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3476
  obtains V where "openin (subtopology euclidean U) V" "(S \<union> T) retract_of V"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3477
proof (cases "S = {} \<or> T = {}")
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3478
  case True with assms that show ?thesis
65585
a043de9ad41e Some fixes related to compactE_image
paulson <lp15@cam.ac.uk>
parents: 64911
diff changeset
  3479
    by (metis ANR_imp_neighbourhood_retract Un_commute inf_bot_right sup_inf_absorb)
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3480
next
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3481
  case False
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3482
  then have [simp]: "S \<noteq> {}" "T \<noteq> {}" by auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3483
  have "S \<subseteq> U" "T \<subseteq> U"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3484
    using assms by (auto simp: closedin_imp_subset)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3485
  define S' where "S' \<equiv> {x \<in> U. setdist {x} S \<le> setdist {x} T}"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3486
  define T' where "T' \<equiv> {x \<in> U. setdist {x} T \<le> setdist {x} S}"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3487
  define W  where "W \<equiv> {x \<in> U. setdist {x} S = setdist {x} T}"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3488
  have cloUS': "closedin (subtopology euclidean U) S'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3489
    using continuous_closedin_preimage [of U "\<lambda>x. setdist {x} S - setdist {x} T" "{..0}"]
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3490
    by (simp add: S'_def vimage_def Collect_conj_eq continuous_on_diff continuous_on_setdist)
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3491
  have cloUT': "closedin (subtopology euclidean U) T'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3492
    using continuous_closedin_preimage [of U "\<lambda>x. setdist {x} T - setdist {x} S" "{..0}"]
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3493
    by (simp add: T'_def vimage_def Collect_conj_eq continuous_on_diff continuous_on_setdist)
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3494
  have "S \<subseteq> S'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3495
    using S'_def \<open>S \<subseteq> U\<close> setdist_sing_in_set by fastforce
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3496
  have "T \<subseteq> T'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3497
    using T'_def \<open>T \<subseteq> U\<close> setdist_sing_in_set by fastforce
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3498
  have "S' \<union> T' = U"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3499
    by (auto simp: S'_def T'_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3500
  have "W \<subseteq> S'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3501
    by (simp add: Collect_mono S'_def W_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3502
  have "W \<subseteq> T'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3503
    by (simp add: Collect_mono T'_def W_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3504
  have ST_W: "S \<inter> T \<subseteq> W" and "W \<subseteq> U"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3505
    using \<open>S \<subseteq> U\<close> by (force simp: W_def setdist_sing_in_set)+
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3506
  have "S' \<inter> T' = W"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3507
    by (auto simp: S'_def T'_def W_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3508
  then have cloUW: "closedin (subtopology euclidean U) W"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3509
    using closedin_Int cloUS' cloUT' by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3510
  obtain W' W0 where "openin (subtopology euclidean W) W'"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3511
                 and cloWW0: "closedin (subtopology euclidean W) W0"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3512
                 and "S \<inter> T \<subseteq> W'" "W' \<subseteq> W0"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3513
                 and ret: "(S \<inter> T) retract_of W0"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3514
    apply (rule ANR_imp_closed_neighbourhood_retract [OF \<open>ANR(S \<inter> T)\<close>])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3515
    apply (rule closedin_subset_trans [of U, OF _ ST_W \<open>W \<subseteq> U\<close>])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3516
    apply (blast intro: assms)+
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3517
    done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3518
  then obtain U0 where opeUU0: "openin (subtopology euclidean U) U0"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3519
                   and U0: "S \<inter> T \<subseteq> U0" "U0 \<inter> W \<subseteq> W0"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3520
    unfolding openin_open  using \<open>W \<subseteq> U\<close> by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3521
  have "W0 \<subseteq> U"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3522
    using \<open>W \<subseteq> U\<close> cloWW0 closedin_subset by fastforce
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3523
  obtain r0
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3524
    where "S \<inter> T \<subseteq> W0" and contr0: "continuous_on W0 r0" and "r0 ` W0 \<subseteq> S \<inter> T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3525
      and r0 [simp]: "\<And>x. x \<in> S \<inter> T \<Longrightarrow> r0 x = x"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  3526
    using ret  by (force simp: retract_of_def retraction_def)
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3527
  have ST: "x \<in> W \<Longrightarrow> x \<in> S \<longleftrightarrow> x \<in> T" for x
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3528
    using assms by (auto simp: W_def setdist_sing_in_set dest!: setdist_eq_0_closedin)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3529
  define r where "r \<equiv> \<lambda>x. if x \<in> W0 then r0 x else x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3530
  have "r ` (W0 \<union> S) \<subseteq> S" "r ` (W0 \<union> T) \<subseteq> T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3531
    using \<open>r0 ` W0 \<subseteq> S \<inter> T\<close> r_def by auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3532
  have contr: "continuous_on (W0 \<union> (S \<union> T)) r"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3533
  unfolding r_def
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3534
  proof (rule continuous_on_cases_local [OF _ _ contr0 continuous_on_id])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3535
    show "closedin (subtopology euclidean (W0 \<union> (S \<union> T))) W0"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3536
      apply (rule closedin_subset_trans [of U])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3537
      using cloWW0 cloUW closedin_trans \<open>W0 \<subseteq> U\<close> \<open>S \<subseteq> U\<close> \<open>T \<subseteq> U\<close> apply blast+
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3538
      done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3539
    show "closedin (subtopology euclidean (W0 \<union> (S \<union> T))) (S \<union> T)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3540
      by (meson \<open>S \<subseteq> U\<close> \<open>T \<subseteq> U\<close> \<open>W0 \<subseteq> U\<close> assms closedin_Un closedin_subset_trans sup.bounded_iff sup.cobounded2)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3541
    show "\<And>x. x \<in> W0 \<and> x \<notin> W0 \<or> x \<in> S \<union> T \<and> x \<in> W0 \<Longrightarrow> r0 x = x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3542
      using ST cloWW0 closedin_subset by fastforce
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3543
  qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3544
  have cloS'WS: "closedin (subtopology euclidean S') (W0 \<union> S)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3545
    by (meson closedin_subset_trans US cloUS' \<open>S \<subseteq> S'\<close> \<open>W \<subseteq> S'\<close> cloUW cloWW0 
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3546
              closedin_Un closedin_imp_subset closedin_trans)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3547
  obtain W1 g where "W0 \<union> S \<subseteq> W1" and contg: "continuous_on W1 g"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3548
                and opeSW1: "openin (subtopology euclidean S') W1"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3549
                and "g ` W1 \<subseteq> S" and geqr: "\<And>x. x \<in> W0 \<union> S \<Longrightarrow> g x = r x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3550
    apply (rule ANR_imp_absolute_neighbourhood_extensor [OF \<open>ANR S\<close> _ \<open>r ` (W0 \<union> S) \<subseteq> S\<close> cloS'WS])
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  3551
     apply (rule continuous_on_subset [OF contr], blast+)
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3552
    done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3553
  have cloT'WT: "closedin (subtopology euclidean T') (W0 \<union> T)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3554
    by (meson closedin_subset_trans UT cloUT' \<open>T \<subseteq> T'\<close> \<open>W \<subseteq> T'\<close> cloUW cloWW0 
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3555
              closedin_Un closedin_imp_subset closedin_trans)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3556
  obtain W2 h where "W0 \<union> T \<subseteq> W2" and conth: "continuous_on W2 h"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3557
                and opeSW2: "openin (subtopology euclidean T') W2"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3558
                and "h ` W2 \<subseteq> T" and heqr: "\<And>x. x \<in> W0 \<union> T \<Longrightarrow> h x = r x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3559
    apply (rule ANR_imp_absolute_neighbourhood_extensor [OF \<open>ANR T\<close> _ \<open>r ` (W0 \<union> T) \<subseteq> T\<close> cloT'WT])
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  3560
     apply (rule continuous_on_subset [OF contr], blast+)
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3561
    done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3562
  have "S' \<inter> T' = W"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3563
    by (force simp: S'_def T'_def W_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3564
  obtain O1 O2 where "open O1" "W1 = S' \<inter> O1" "open O2" "W2 = T' \<inter> O2"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  3565
    using opeSW1 opeSW2 by (force simp: openin_open)
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3566
  show ?thesis
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3567
  proof
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3568
    have eq: "W1 - (W - U0) \<union> (W2 - (W - U0)) =
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3569
         ((U - T') \<inter> O1 \<union> (U - S') \<inter> O2 \<union> U \<inter> O1 \<inter> O2) - (W - U0)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3570
     using \<open>U0 \<inter> W \<subseteq> W0\<close> \<open>W0 \<union> S \<subseteq> W1\<close> \<open>W0 \<union> T \<subseteq> W2\<close>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3571
      by (auto simp: \<open>S' \<union> T' = U\<close> [symmetric] \<open>S' \<inter> T' = W\<close> [symmetric] \<open>W1 = S' \<inter> O1\<close> \<open>W2 = T' \<inter> O2\<close>)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3572
    show "openin (subtopology euclidean U) (W1 - (W - U0) \<union> (W2 - (W - U0)))"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3573
      apply (subst eq)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  3574
      apply (intro openin_Un openin_Int_open openin_diff closedin_diff cloUW opeUU0 cloUS' cloUT' \<open>open O1\<close> \<open>open O2\<close>, simp_all)
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3575
      done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3576
    have cloW1: "closedin (subtopology euclidean (W1 - (W - U0) \<union> (W2 - (W - U0)))) (W1 - (W - U0))"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3577
      using cloUS' apply (simp add: closedin_closed)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3578
      apply (erule ex_forward)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3579
      using U0 \<open>W0 \<union> S \<subseteq> W1\<close>
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  3580
      apply (auto simp: \<open>W1 = S' \<inter> O1\<close> \<open>W2 = T' \<inter> O2\<close> \<open>S' \<union> T' = U\<close> [symmetric]\<open>S' \<inter> T' = W\<close> [symmetric])
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3581
      done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3582
    have cloW2: "closedin (subtopology euclidean (W1 - (W - U0) \<union> (W2 - (W - U0)))) (W2 - (W - U0))"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3583
      using cloUT' apply (simp add: closedin_closed)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3584
      apply (erule ex_forward)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3585
      using U0 \<open>W0 \<union> T \<subseteq> W2\<close>
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  3586
      apply (auto simp: \<open>W1 = S' \<inter> O1\<close> \<open>W2 = T' \<inter> O2\<close> \<open>S' \<union> T' = U\<close> [symmetric]\<open>S' \<inter> T' = W\<close> [symmetric])
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3587
      done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3588
    have *: "\<forall>x\<in>S \<union> T. (if x \<in> S' then g x else h x) = x"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3589
      using ST \<open>S' \<inter> T' = W\<close> cloT'WT closedin_subset geqr heqr 
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  3590
      apply (auto simp: r_def, fastforce)
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3591
      using \<open>S \<subseteq> S'\<close> \<open>T \<subseteq> T'\<close> \<open>W0 \<union> S \<subseteq> W1\<close> \<open>W1 = S' \<inter> O1\<close>  by auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3592
    have "\<exists>r. continuous_on (W1 - (W - U0) \<union> (W2 - (W - U0))) r \<and>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3593
              r ` (W1 - (W - U0) \<union> (W2 - (W - U0))) \<subseteq> S \<union> T \<and> 
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3594
              (\<forall>x\<in>S \<union> T. r x = x)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3595
      apply (rule_tac x = "\<lambda>x. if  x \<in> S' then g x else h x" in exI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3596
      apply (intro conjI *)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3597
      apply (rule continuous_on_cases_local 
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3598
                  [OF cloW1 cloW2 continuous_on_subset [OF contg] continuous_on_subset [OF conth]])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3599
      using \<open>W1 = S' \<inter> O1\<close> \<open>W2 = T' \<inter> O2\<close> \<open>S' \<inter> T' = W\<close>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3600
            \<open>g ` W1 \<subseteq> S\<close> \<open>h ` W2 \<subseteq> T\<close> apply auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3601
      using \<open>U0 \<inter> W \<subseteq> W0\<close> \<open>W0 \<union> S \<subseteq> W1\<close> apply (fastforce simp add: geqr heqr)+
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3602
      done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3603
    then show "S \<union> T retract_of W1 - (W - U0) \<union> (W2 - (W - U0))"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3604
      using  \<open>W0 \<union> S \<subseteq> W1\<close> \<open>W0 \<union> T \<subseteq> W2\<close> ST opeUU0 U0
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  3605
      by (auto simp: retract_of_def retraction_def)
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3606
  qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3607
qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3608
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3609
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3610
proposition ANR_closed_Un_local:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3611
  fixes S :: "'a::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3612
  assumes STS: "closedin (subtopology euclidean (S \<union> T)) S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3613
      and STT: "closedin (subtopology euclidean (S \<union> T)) T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3614
      and "ANR S" "ANR T" "ANR(S \<inter> T)" 
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3615
    shows "ANR(S \<union> T)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3616
proof -
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3617
  have "\<exists>T. openin (subtopology euclidean U) T \<and> C retract_of T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3618
       if hom: "S \<union> T homeomorphic C" and UC: "closedin (subtopology euclidean U) C"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3619
       for U and C :: "('a * real) set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3620
  proof -
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3621
    obtain f g where hom: "homeomorphism (S \<union> T) C f g"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3622
      using hom by (force simp: homeomorphic_def)
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3623
    have US: "closedin (subtopology euclidean U) (C \<inter> g -` S)"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3624
      apply (rule closedin_trans [OF _ UC])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3625
      apply (rule continuous_closedin_preimage_gen [OF _ _ STS])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3626
      using hom [unfolded homeomorphism_def] apply blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3627
      apply (metis hom homeomorphism_def set_eq_subset)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3628
      done
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3629
    have UT: "closedin (subtopology euclidean U) (C \<inter> g -` T)"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3630
      apply (rule closedin_trans [OF _ UC])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3631
      apply (rule continuous_closedin_preimage_gen [OF _ _ STT])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3632
      using hom [unfolded homeomorphism_def] apply blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3633
      apply (metis hom homeomorphism_def set_eq_subset)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3634
      done
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3635
    have ANRS: "ANR (C \<inter> g -` S)"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3636
      apply (rule ANR_homeomorphic_ANR [OF \<open>ANR S\<close>])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3637
      apply (simp add: homeomorphic_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3638
      apply (rule_tac x=g in exI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3639
      apply (rule_tac x=f in exI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3640
      using hom apply (auto simp: homeomorphism_def elim!: continuous_on_subset)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3641
      apply (rule_tac x="f x" in image_eqI, auto)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3642
      done
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3643
    have ANRT: "ANR (C \<inter> g -` T)"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3644
      apply (rule ANR_homeomorphic_ANR [OF \<open>ANR T\<close>])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3645
      apply (simp add: homeomorphic_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3646
      apply (rule_tac x=g in exI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3647
      apply (rule_tac x=f in exI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3648
      using hom apply (auto simp: homeomorphism_def elim!: continuous_on_subset)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3649
      apply (rule_tac x="f x" in image_eqI, auto)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3650
      done
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3651
    have ANRI: "ANR ((C \<inter> g -` S) \<inter> (C \<inter> g -` T))"
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3652
      apply (rule ANR_homeomorphic_ANR [OF \<open>ANR (S \<inter> T)\<close>])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3653
      apply (simp add: homeomorphic_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3654
      apply (rule_tac x=g in exI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3655
      apply (rule_tac x=f in exI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3656
      using hom
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3657
      apply (auto simp: homeomorphism_def elim!: continuous_on_subset)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3658
      apply (rule_tac x="f x" in image_eqI, auto)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3659
      done
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3660
    have "C = (C \<inter> g -` S) \<union> (C \<inter> g -` T)"
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3661
      using hom by (auto simp: homeomorphism_def)
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3662
    then show ?thesis
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3663
      by (metis ANR_closed_Un_local_aux [OF US UT ANRS ANRT ANRI])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3664
  qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3665
  then show ?thesis
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3666
    by (auto simp: ANR_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3667
qed    
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3668
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3669
corollary ANR_closed_Un:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3670
  fixes S :: "'a::euclidean_space set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3671
  shows "\<lbrakk>closed S; closed T; ANR S; ANR T; ANR (S \<inter> T)\<rbrakk> \<Longrightarrow> ANR (S \<union> T)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3672
by (simp add: ANR_closed_Un_local closedin_def diff_eq open_Compl openin_open_Int)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  3673
63469
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3674
lemma ANR_openin:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3675
  fixes S :: "'a::euclidean_space set"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3676
  assumes "ANR T" and opeTS: "openin (subtopology euclidean T) S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3677
  shows "ANR S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3678
proof (clarsimp simp only: ANR_eq_absolute_neighbourhood_extensor)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3679
  fix f :: "'a \<times> real \<Rightarrow> 'a" and U C
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3680
  assume contf: "continuous_on C f" and fim: "f ` C \<subseteq> S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3681
     and cloUC: "closedin (subtopology euclidean U) C"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3682
  have "f ` C \<subseteq> T"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3683
    using fim opeTS openin_imp_subset by blast
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3684
  obtain W g where "C \<subseteq> W"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3685
               and UW: "openin (subtopology euclidean U) W"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3686
               and contg: "continuous_on W g"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3687
               and gim: "g ` W \<subseteq> T"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3688
               and geq: "\<And>x. x \<in> C \<Longrightarrow> g x = f x"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3689
    apply (rule ANR_imp_absolute_neighbourhood_extensor [OF \<open>ANR T\<close> contf \<open>f ` C \<subseteq> T\<close> cloUC])
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3690
    using fim by auto
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3691
  show "\<exists>V g. C \<subseteq> V \<and> openin (subtopology euclidean U) V \<and> continuous_on V g \<and> g ` V \<subseteq> S \<and> (\<forall>x\<in>C. g x = f x)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3692
  proof (intro exI conjI)
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3693
    show "C \<subseteq> W \<inter> g -` S"
63469
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3694
      using \<open>C \<subseteq> W\<close> fim geq by blast
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3695
    show "openin (subtopology euclidean U) (W \<inter> g -` S)"
63469
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3696
      by (metis (mono_tags, lifting) UW contg continuous_openin_preimage gim opeTS openin_trans)
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3697
    show "continuous_on (W \<inter> g -` S) g"
63469
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3698
      by (blast intro: continuous_on_subset [OF contg])
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3699
    show "g ` (W \<inter> g -` S) \<subseteq> S"
63469
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3700
      using gim by blast
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3701
    show "\<forall>x\<in>C. g x = f x"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3702
      using geq by blast
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3703
  qed
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3704
qed
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3705
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3706
lemma ENR_openin:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3707
    fixes S :: "'a::euclidean_space set"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3708
    assumes "ENR T" and opeTS: "openin (subtopology euclidean T) S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3709
    shows "ENR S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3710
  using assms apply (simp add: ENR_ANR)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3711
  using ANR_openin locally_open_subset by blast
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3712
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3713
lemma ANR_neighborhood_retract:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3714
    fixes S :: "'a::euclidean_space set"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3715
    assumes "ANR U" "S retract_of T" "openin (subtopology euclidean U) T"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3716
    shows "ANR S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3717
  using ANR_openin ANR_retract_of_ANR assms by blast
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3718
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3719
lemma ENR_neighborhood_retract:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3720
    fixes S :: "'a::euclidean_space set"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3721
    assumes "ENR U" "S retract_of T" "openin (subtopology euclidean U) T"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3722
    shows "ENR S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3723
  using ENR_openin ENR_retract_of_ENR assms by blast
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3724
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3725
lemma ANR_rel_interior:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3726
  fixes S :: "'a::euclidean_space set"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3727
  shows "ANR S \<Longrightarrow> ANR(rel_interior S)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3728
   by (blast intro: ANR_openin openin_set_rel_interior)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3729
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3730
lemma ANR_delete:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3731
  fixes S :: "'a::euclidean_space set"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3732
  shows "ANR S \<Longrightarrow> ANR(S - {a})"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3733
   by (blast intro: ANR_openin openin_delete openin_subtopology_self)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3734
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3735
lemma ENR_rel_interior:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3736
  fixes S :: "'a::euclidean_space set"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3737
  shows "ENR S \<Longrightarrow> ENR(rel_interior S)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3738
   by (blast intro: ENR_openin openin_set_rel_interior)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3739
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3740
lemma ENR_delete:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3741
  fixes S :: "'a::euclidean_space set"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3742
  shows "ENR S \<Longrightarrow> ENR(S - {a})"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3743
   by (blast intro: ENR_openin openin_delete openin_subtopology_self)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3744
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3745
lemma open_imp_ENR: "open S \<Longrightarrow> ENR S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3746
    using ENR_def by blast
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3747
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3748
lemma open_imp_ANR:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3749
    fixes S :: "'a::euclidean_space set"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3750
    shows "open S \<Longrightarrow> ANR S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3751
  by (simp add: ENR_imp_ANR open_imp_ENR)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3752
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3753
lemma ANR_ball [iff]:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3754
    fixes a :: "'a::euclidean_space"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3755
    shows "ANR(ball a r)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3756
  by (simp add: convex_imp_ANR)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3757
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3758
lemma ENR_ball [iff]: "ENR(ball a r)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3759
  by (simp add: open_imp_ENR)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3760
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3761
lemma AR_ball [simp]:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3762
    fixes a :: "'a::euclidean_space"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3763
    shows "AR(ball a r) \<longleftrightarrow> 0 < r"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3764
  by (auto simp: AR_ANR convex_imp_contractible)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3765
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3766
lemma ANR_cball [iff]:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3767
    fixes a :: "'a::euclidean_space"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3768
    shows "ANR(cball a r)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3769
  by (simp add: convex_imp_ANR)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3770
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3771
lemma ENR_cball:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3772
    fixes a :: "'a::euclidean_space"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3773
    shows "ENR(cball a r)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3774
  using ENR_convex_closed by blast
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3775
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3776
lemma AR_cball [simp]:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3777
    fixes a :: "'a::euclidean_space"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3778
    shows "AR(cball a r) \<longleftrightarrow> 0 \<le> r"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3779
  by (auto simp: AR_ANR convex_imp_contractible)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3780
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3781
lemma ANR_box [iff]:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3782
    fixes a :: "'a::euclidean_space"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3783
    shows "ANR(cbox a b)" "ANR(box a b)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3784
  by (auto simp: convex_imp_ANR open_imp_ANR)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3785
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3786
lemma ENR_box [iff]:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3787
    fixes a :: "'a::euclidean_space"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3788
    shows "ENR(cbox a b)" "ENR(box a b)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3789
apply (simp add: ENR_convex_closed closed_cbox)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3790
by (simp add: open_box open_imp_ENR)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3791
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3792
lemma AR_box [simp]:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3793
    "AR(cbox a b) \<longleftrightarrow> cbox a b \<noteq> {}" "AR(box a b) \<longleftrightarrow> box a b \<noteq> {}"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3794
  by (auto simp: AR_ANR convex_imp_contractible)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3795
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3796
lemma ANR_interior:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3797
     fixes S :: "'a::euclidean_space set"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3798
     shows "ANR(interior S)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3799
  by (simp add: open_imp_ANR)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3800
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3801
lemma ENR_interior:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3802
     fixes S :: "'a::euclidean_space set"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3803
     shows "ENR(interior S)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3804
  by (simp add: open_imp_ENR)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3805
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3806
lemma AR_imp_contractible:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3807
    fixes S :: "'a::euclidean_space set"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3808
    shows "AR S \<Longrightarrow> contractible S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3809
  by (simp add: AR_ANR)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3810
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3811
lemma ENR_imp_locally_compact:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3812
    fixes S :: "'a::euclidean_space set"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3813
    shows "ENR S \<Longrightarrow> locally compact S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3814
  by (simp add: ENR_ANR)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3815
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3816
lemma ANR_imp_locally_path_connected:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3817
  fixes S :: "'a::euclidean_space set"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3818
  assumes "ANR S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3819
    shows "locally path_connected S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3820
proof -
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3821
  obtain U and T :: "('a \<times> real) set"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3822
     where "convex U" "U \<noteq> {}"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3823
       and UT: "closedin (subtopology euclidean U) T"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3824
       and "S homeomorphic T"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3825
    apply (rule homeomorphic_closedin_convex [of S])
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3826
    using aff_dim_le_DIM [of S] apply auto
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3827
    done
63928
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63627
diff changeset
  3828
  then have "locally path_connected T"
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63627
diff changeset
  3829
    by (meson ANR_imp_absolute_neighbourhood_retract
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63627
diff changeset
  3830
        assms convex_imp_locally_path_connected locally_open_subset retract_of_locally_path_connected)
63469
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3831
  then have S: "locally path_connected S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3832
      if "openin (subtopology euclidean U) V" "T retract_of V" "U \<noteq> {}" for V
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3833
    using \<open>S homeomorphic T\<close> homeomorphic_locally homeomorphic_path_connectedness by blast
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3834
  show ?thesis
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3835
    using assms
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3836
    apply (clarsimp simp: ANR_def)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3837
    apply (drule_tac x=U in spec)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3838
    apply (drule_tac x=T in spec)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3839
    using \<open>S homeomorphic T\<close> \<open>U \<noteq> {}\<close> UT  apply (blast intro: S)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3840
    done
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3841
qed
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3842
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3843
lemma ANR_imp_locally_connected:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3844
  fixes S :: "'a::euclidean_space set"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3845
  assumes "ANR S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3846
    shows "locally connected S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3847
using locally_path_connected_imp_locally_connected ANR_imp_locally_path_connected assms by auto
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3848
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3849
lemma AR_imp_locally_path_connected:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3850
  fixes S :: "'a::euclidean_space set"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3851
  assumes "AR S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3852
    shows "locally path_connected S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3853
by (simp add: ANR_imp_locally_path_connected AR_imp_ANR assms)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3854
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3855
lemma AR_imp_locally_connected:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3856
  fixes S :: "'a::euclidean_space set"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3857
  assumes "AR S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3858
    shows "locally connected S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3859
using ANR_imp_locally_connected AR_ANR assms by blast
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3860
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3861
lemma ENR_imp_locally_path_connected:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3862
  fixes S :: "'a::euclidean_space set"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3863
  assumes "ENR S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3864
    shows "locally path_connected S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3865
by (simp add: ANR_imp_locally_path_connected ENR_imp_ANR assms)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3866
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3867
lemma ENR_imp_locally_connected:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3868
  fixes S :: "'a::euclidean_space set"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3869
  assumes "ENR S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3870
    shows "locally connected S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3871
using ANR_imp_locally_connected ENR_ANR assms by blast
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3872
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3873
lemma ANR_Times:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3874
  fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3875
  assumes "ANR S" "ANR T" shows "ANR(S \<times> T)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3876
proof (clarsimp simp only: ANR_eq_absolute_neighbourhood_extensor)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3877
  fix f :: " ('a \<times> 'b) \<times> real \<Rightarrow> 'a \<times> 'b" and U C
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3878
  assume "continuous_on C f" and fim: "f ` C \<subseteq> S \<times> T"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3879
     and cloUC: "closedin (subtopology euclidean U) C"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3880
  have contf1: "continuous_on C (fst \<circ> f)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3881
    by (simp add: \<open>continuous_on C f\<close> continuous_on_fst)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3882
  obtain W1 g where "C \<subseteq> W1"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3883
               and UW1: "openin (subtopology euclidean U) W1"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3884
               and contg: "continuous_on W1 g"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3885
               and gim: "g ` W1 \<subseteq> S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3886
               and geq: "\<And>x. x \<in> C \<Longrightarrow> g x = (fst \<circ> f) x"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3887
    apply (rule ANR_imp_absolute_neighbourhood_extensor [OF \<open>ANR S\<close> contf1 _ cloUC])
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3888
    using fim apply auto
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3889
    done
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3890
  have contf2: "continuous_on C (snd \<circ> f)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3891
    by (simp add: \<open>continuous_on C f\<close> continuous_on_snd)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3892
  obtain W2 h where "C \<subseteq> W2"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3893
               and UW2: "openin (subtopology euclidean U) W2"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3894
               and conth: "continuous_on W2 h"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3895
               and him: "h ` W2 \<subseteq> T"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3896
               and heq: "\<And>x. x \<in> C \<Longrightarrow> h x = (snd \<circ> f) x"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3897
    apply (rule ANR_imp_absolute_neighbourhood_extensor [OF \<open>ANR T\<close> contf2 _ cloUC])
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3898
    using fim apply auto
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3899
    done
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3900
  show "\<exists>V g. C \<subseteq> V \<and>
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3901
               openin (subtopology euclidean U) V \<and>
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3902
               continuous_on V g \<and> g ` V \<subseteq> S \<times> T \<and> (\<forall>x\<in>C. g x = f x)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3903
  proof (intro exI conjI)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3904
    show "C \<subseteq> W1 \<inter> W2"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3905
      by (simp add: \<open>C \<subseteq> W1\<close> \<open>C \<subseteq> W2\<close>)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3906
    show "openin (subtopology euclidean U) (W1 \<inter> W2)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3907
      by (simp add: UW1 UW2 openin_Int)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3908
    show  "continuous_on (W1 \<inter> W2) (\<lambda>x. (g x, h x))"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3909
      by (metis (no_types) contg conth continuous_on_Pair continuous_on_subset inf_commute inf_le1)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3910
    show  "(\<lambda>x. (g x, h x)) ` (W1 \<inter> W2) \<subseteq> S \<times> T"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3911
      using gim him by blast
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3912
    show  "(\<forall>x\<in>C. (g x, h x) = f x)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3913
      using geq heq by auto
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3914
  qed
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3915
qed
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3916
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3917
lemma AR_Times:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3918
  fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3919
  assumes "AR S" "AR T" shows "AR(S \<times> T)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3920
using assms by (simp add: AR_ANR ANR_Times contractible_Times)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63365
diff changeset
  3921
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3922
lemma ENR_rel_frontier_convex:
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3923
  fixes S :: "'a::euclidean_space set"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3924
  assumes "bounded S" "convex S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3925
    shows "ENR(rel_frontier S)"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3926
proof (cases "S = {}")
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3927
  case True then show ?thesis
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3928
    by simp
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3929
next
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3930
  case False
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3931
  with assms have "rel_interior S \<noteq> {}"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3932
    by (simp add: rel_interior_eq_empty)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3933
  then obtain a where a: "a \<in> rel_interior S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3934
    by auto
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3935
  have ahS: "affine hull S - {a} \<subseteq> {x. closest_point (affine hull S) x \<noteq> a}"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3936
    by (auto simp: closest_point_self)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3937
  have "rel_frontier S retract_of affine hull S - {a}"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3938
    by (simp add: assms a rel_frontier_retract_of_punctured_affine_hull)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  3939
  also have "\<dots> retract_of {x. closest_point (affine hull S) x \<noteq> a}"
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3940
    apply (simp add: retract_of_def retraction_def ahS)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3941
    apply (rule_tac x="closest_point (affine hull S)" in exI)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  3942
    apply (auto simp: False closest_point_self affine_imp_convex closest_point_in_set continuous_on_closest_point)
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3943
    done
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3944
  finally have "rel_frontier S retract_of {x. closest_point (affine hull S) x \<noteq> a}" .
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3945
  moreover have "openin (subtopology euclidean UNIV) (UNIV \<inter> closest_point (affine hull S) -` (- {a}))"
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3946
    apply (rule continuous_openin_preimage_gen)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  3947
    apply (auto simp: False affine_imp_convex continuous_on_closest_point)
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3948
    done
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3949
  ultimately show ?thesis
66884
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3950
    unfolding ENR_def
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3951
    apply (rule_tac x = "closest_point (affine hull S) -` (- {a})" in exI)
c2128ab11f61 Switching to inverse image and constant_on, plus some new material
paulson <lp15@cam.ac.uk>
parents: 65585
diff changeset
  3952
    apply (simp add: vimage_def)
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3953
    done
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3954
qed
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3955
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3956
lemma ANR_rel_frontier_convex:
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3957
                 fixes S :: "'a::euclidean_space set"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3958
  assumes "bounded S" "convex S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3959
    shows "ANR(rel_frontier S)"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  3960
by (simp add: ENR_imp_ANR ENR_rel_frontier_convex assms)
64791
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3961
    
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3962
lemma ENR_closedin_Un_local:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3963
  fixes S :: "'a::euclidean_space set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3964
  shows "\<lbrakk>ENR S; ENR T; ENR(S \<inter> T);
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3965
          closedin (subtopology euclidean (S \<union> T)) S; closedin (subtopology euclidean (S \<union> T)) T\<rbrakk>
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3966
        \<Longrightarrow> ENR(S \<union> T)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3967
by (simp add: ENR_ANR ANR_closed_Un_local locally_compact_closedin_Un)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3968
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3969
lemma ENR_closed_Un:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3970
  fixes S :: "'a::euclidean_space set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3971
  shows "\<lbrakk>closed S; closed T; ENR S; ENR T; ENR(S \<inter> T)\<rbrakk> \<Longrightarrow> ENR(S \<union> T)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3972
by (auto simp: closed_subset ENR_closedin_Un_local)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3973
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3974
lemma absolute_retract_Un:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3975
  fixes S :: "'a::euclidean_space set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3976
  shows "\<lbrakk>S retract_of UNIV; T retract_of UNIV; (S \<inter> T) retract_of UNIV\<rbrakk>
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3977
         \<Longrightarrow> (S \<union> T) retract_of UNIV"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3978
  by (meson AR_closed_Un_local_aux closed_subset retract_of_UNIV retract_of_imp_subset)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3979
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3980
lemma retract_from_Un_Int:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3981
  fixes S :: "'a::euclidean_space set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3982
  assumes clS: "closedin (subtopology euclidean (S \<union> T)) S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3983
      and clT: "closedin (subtopology euclidean (S \<union> T)) T"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3984
      and Un: "(S \<union> T) retract_of U" and Int: "(S \<inter> T) retract_of T"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3985
    shows "S retract_of U"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3986
proof -
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3987
  obtain r where r: "continuous_on T r" "r ` T \<subseteq> S \<inter> T" "\<forall>x\<in>S \<inter> T. r x = x"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3988
    using Int by (auto simp: retraction_def retract_of_def)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3989
  have "S retract_of S \<union> T"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3990
    unfolding retraction_def retract_of_def
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3991
  proof (intro exI conjI)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3992
    show "continuous_on (S \<union> T) (\<lambda>x. if x \<in> S then x else r x)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3993
      apply (rule continuous_on_cases_local [OF clS clT])
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3994
      using r by (auto simp: continuous_on_id)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3995
  qed (use r in auto)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  3996
  also have "\<dots> retract_of U"
64791
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3997
    by (rule Un)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3998
  finally show ?thesis .
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  3999
qed
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4000
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4001
lemma AR_from_Un_Int_local:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4002
  fixes S :: "'a::euclidean_space set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4003
  assumes clS: "closedin (subtopology euclidean (S \<union> T)) S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4004
      and clT: "closedin (subtopology euclidean (S \<union> T)) T"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4005
      and Un: "AR(S \<union> T)" and Int: "AR(S \<inter> T)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4006
    shows "AR S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4007
  apply (rule AR_retract_of_AR [OF Un])
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4008
  by (meson AR_imp_retract clS clT closedin_closed_subset local.Int retract_from_Un_Int retract_of_refl sup_ge2)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4009
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4010
lemma AR_from_Un_Int_local':
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4011
  fixes S :: "'a::euclidean_space set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4012
  assumes "closedin (subtopology euclidean (S \<union> T)) S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4013
      and "closedin (subtopology euclidean (S \<union> T)) T"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4014
      and "AR(S \<union> T)" "AR(S \<inter> T)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4015
    shows "AR T"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4016
  using AR_from_Un_Int_local [of T S] assms by (simp add: Un_commute Int_commute)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4017
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4018
lemma AR_from_Un_Int:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4019
  fixes S :: "'a::euclidean_space set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4020
  assumes clo: "closed S" "closed T" and Un: "AR(S \<union> T)" and Int: "AR(S \<inter> T)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4021
  shows "AR S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4022
  by (metis AR_from_Un_Int_local [OF _ _ Un Int] Un_commute clo closed_closedin closedin_closed_subset inf_sup_absorb subtopology_UNIV top_greatest)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4023
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4024
lemma ANR_from_Un_Int_local:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4025
  fixes S :: "'a::euclidean_space set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4026
  assumes clS: "closedin (subtopology euclidean (S \<union> T)) S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4027
      and clT: "closedin (subtopology euclidean (S \<union> T)) T"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4028
      and Un: "ANR(S \<union> T)" and Int: "ANR(S \<inter> T)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4029
    shows "ANR S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4030
proof -
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4031
  obtain V where clo: "closedin (subtopology euclidean (S \<union> T)) (S \<inter> T)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4032
             and ope: "openin (subtopology euclidean (S \<union> T)) V"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4033
             and ret: "S \<inter> T retract_of V"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4034
    using ANR_imp_neighbourhood_retract [OF Int] by (metis clS clT closedin_Int)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4035
  then obtain r where r: "continuous_on V r" and rim: "r ` V \<subseteq> S \<inter> T" and req: "\<forall>x\<in>S \<inter> T. r x = x"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4036
    by (auto simp: retraction_def retract_of_def)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4037
  have Vsub: "V \<subseteq> S \<union> T"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4038
    by (meson ope openin_contains_cball)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4039
  have Vsup: "S \<inter> T \<subseteq> V"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4040
    by (simp add: retract_of_imp_subset ret)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4041
  then have eq: "S \<union> V = ((S \<union> T) - T) \<union> V"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4042
    by auto
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4043
  have eq': "S \<union> V = S \<union> (V \<inter> T)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4044
    using Vsub by blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4045
  have "continuous_on (S \<union> V \<inter> T) (\<lambda>x. if x \<in> S then x else r x)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4046
  proof (rule continuous_on_cases_local)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4047
    show "closedin (subtopology euclidean (S \<union> V \<inter> T)) S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4048
      using clS closedin_subset_trans inf.boundedE by blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4049
    show "closedin (subtopology euclidean (S \<union> V \<inter> T)) (V \<inter> T)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4050
      using clT Vsup by (auto simp: closedin_closed)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4051
    show "continuous_on (V \<inter> T) r"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4052
      by (meson Int_lower1 continuous_on_subset r)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4053
  qed (use req continuous_on_id in auto)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4054
  with rim have "S retract_of S \<union> V"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4055
    unfolding retraction_def retract_of_def
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4056
    apply (rule_tac x="\<lambda>x. if x \<in> S then x else r x" in exI)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4057
    apply (auto simp: eq')
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4058
    done
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4059
  then show ?thesis
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4060
    using ANR_neighborhood_retract [OF Un]
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4061
    using \<open>S \<union> V = S \<union> T - T \<union> V\<close> clT ope by fastforce
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4062
qed
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4063
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4064
lemma ANR_from_Un_Int:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4065
  fixes S :: "'a::euclidean_space set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4066
  assumes clo: "closed S" "closed T" and Un: "ANR(S \<union> T)" and Int: "ANR(S \<inter> T)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4067
  shows "ANR S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4068
  by (metis ANR_from_Un_Int_local [OF _ _ Un Int] Un_commute clo closed_closedin closedin_closed_subset inf_sup_absorb subtopology_UNIV top_greatest)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4069
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4070
proposition ANR_finite_Union_convex_closed:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4071
  fixes \<T> :: "'a::euclidean_space set set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4072
  assumes \<T>: "finite \<T>" and clo: "\<And>C. C \<in> \<T> \<Longrightarrow> closed C" and con: "\<And>C. C \<in> \<T> \<Longrightarrow> convex C"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4073
  shows "ANR(\<Union>\<T>)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4074
proof -
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4075
  have "ANR(\<Union>\<T>)" if "card \<T> < n" for n
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4076
  using assms that
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4077
  proof (induction n arbitrary: \<T>)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4078
    case 0 then show ?case by simp
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4079
  next
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4080
    case (Suc n)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4081
    have "ANR(\<Union>\<U>)" if "finite \<U>" "\<U> \<subseteq> \<T>" for \<U>
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4082
      using that
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4083
    proof (induction \<U>)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4084
      case empty
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4085
      then show ?case  by simp
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4086
    next
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4087
      case (insert C \<U>)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4088
      have "ANR (C \<union> \<Union>\<U>)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4089
      proof (rule ANR_closed_Un)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4090
        show "ANR (C \<inter> \<Union>\<U>)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4091
          unfolding Int_Union
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4092
        proof (rule Suc)
67399
eab6ce8368fa ran isabelle update_op on all sources
nipkow
parents: 66939
diff changeset
  4093
          show "finite ((\<inter>) C ` \<U>)"
64791
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4094
            by (simp add: insert.hyps(1))
67399
eab6ce8368fa ran isabelle update_op on all sources
nipkow
parents: 66939
diff changeset
  4095
          show "\<And>Ca. Ca \<in> (\<inter>) C ` \<U> \<Longrightarrow> closed Ca"
64791
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4096
            by (metis (no_types, hide_lams) Suc.prems(2) closed_Int subsetD imageE insert.prems insertI1 insertI2)
67399
eab6ce8368fa ran isabelle update_op on all sources
nipkow
parents: 66939
diff changeset
  4097
          show "\<And>Ca. Ca \<in> (\<inter>) C ` \<U> \<Longrightarrow> convex Ca"
64791
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4098
            by (metis (mono_tags, lifting) Suc.prems(3) convex_Int imageE insert.prems insert_subset subsetCE)
67399
eab6ce8368fa ran isabelle update_op on all sources
nipkow
parents: 66939
diff changeset
  4099
          show "card ((\<inter>) C ` \<U>) < n"
64791
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4100
          proof -
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4101
            have "card \<T> \<le> n"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4102
              by (meson Suc.prems(4) not_less not_less_eq)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4103
            then show ?thesis
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4104
              by (metis Suc.prems(1) card_image_le card_seteq insert.hyps insert.prems insert_subset le_trans not_less)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4105
          qed
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4106
        qed
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4107
        show "closed (\<Union>\<U>)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4108
          using Suc.prems(2) insert.hyps(1) insert.prems by blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4109
      qed (use Suc.prems convex_imp_ANR insert.prems insert.IH in auto)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4110
      then show ?case
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4111
        by simp
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4112
    qed
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4113
    then show ?case
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4114
      using Suc.prems(1) by blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4115
  qed
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4116
  then show ?thesis
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4117
    by blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4118
qed
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4119
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4120
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4121
lemma finite_imp_ANR:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4122
  fixes S :: "'a::euclidean_space set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4123
  assumes "finite S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4124
  shows "ANR S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4125
proof -
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4126
  have "ANR(\<Union>x \<in> S. {x})"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4127
    by (blast intro: ANR_finite_Union_convex_closed assms)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4128
  then show ?thesis
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4129
    by simp
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4130
qed
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4131
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4132
lemma ANR_insert:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4133
  fixes S :: "'a::euclidean_space set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4134
  assumes "ANR S" "closed S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4135
  shows "ANR(insert a S)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4136
  by (metis ANR_closed_Un ANR_empty ANR_singleton Diff_disjoint Diff_insert_absorb assms closed_singleton insert_absorb insert_is_Un)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4137
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4138
lemma ANR_path_component_ANR:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4139
  fixes S :: "'a::euclidean_space set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4140
  shows "ANR S \<Longrightarrow> ANR(path_component_set S x)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4141
  using ANR_imp_locally_path_connected ANR_openin openin_path_component_locally_path_connected by blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4142
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4143
lemma ANR_connected_component_ANR:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4144
  fixes S :: "'a::euclidean_space set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4145
  shows "ANR S \<Longrightarrow> ANR(connected_component_set S x)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4146
  by (metis ANR_openin openin_connected_component_locally_connected ANR_imp_locally_connected)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4147
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4148
lemma ANR_component_ANR:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4149
  fixes S :: "'a::euclidean_space set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4150
  assumes "ANR S" "c \<in> components S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4151
  shows "ANR c"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4152
  by (metis ANR_connected_component_ANR assms componentsE)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4153
67968
a5ad4c015d1c removed dots at the end of (sub)titles
nipkow
parents: 67682
diff changeset
  4154
subsection\<open>Original ANR material, now for ENRs\<close>
64791
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4155
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4156
lemma ENR_bounded:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4157
  fixes S :: "'a::euclidean_space set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4158
  assumes "bounded S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4159
  shows "ENR S \<longleftrightarrow> (\<exists>U. open U \<and> bounded U \<and> S retract_of U)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4160
         (is "?lhs = ?rhs")
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4161
proof
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4162
  obtain r where "0 < r" and r: "S \<subseteq> ball 0 r"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4163
    using bounded_subset_ballD assms by blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4164
  assume ?lhs
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4165
  then show ?rhs
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4166
    apply (clarsimp simp: ENR_def)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4167
    apply (rule_tac x="ball 0 r \<inter> U" in exI, auto)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4168
    using r retract_of_imp_subset retract_of_subset by fastforce
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4169
next
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4170
  assume ?rhs
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4171
  then show ?lhs
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4172
    using ENR_def by blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4173
qed
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4174
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4175
lemma absolute_retract_imp_AR_gen:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4176
  fixes S :: "'a::euclidean_space set" and S' :: "'b::euclidean_space set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4177
  assumes "S retract_of T" "convex T" "T \<noteq> {}" "S homeomorphic S'" "closedin (subtopology euclidean U) S'"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4178
  shows "S' retract_of U"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4179
proof -
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4180
  have "AR T"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4181
    by (simp add: assms convex_imp_AR)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4182
  then have "AR S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4183
    using AR_retract_of_AR assms by auto
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4184
  then show ?thesis
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4185
    using assms AR_imp_absolute_retract by metis
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4186
qed
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4187
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4188
lemma absolute_retract_imp_AR:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4189
  fixes S :: "'a::euclidean_space set" and S' :: "'b::euclidean_space set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4190
  assumes "S retract_of UNIV" "S homeomorphic S'" "closed S'"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4191
  shows "S' retract_of UNIV"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4192
  using AR_imp_absolute_retract_UNIV assms retract_of_UNIV by blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4193
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4194
lemma homeomorphic_compact_arness:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4195
  fixes S :: "'a::euclidean_space set" and S' :: "'b::euclidean_space set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4196
  assumes "S homeomorphic S'"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4197
  shows "compact S \<and> S retract_of UNIV \<longleftrightarrow> compact S' \<and> S' retract_of UNIV"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4198
  using assms homeomorphic_compactness
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4199
  apply auto
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4200
   apply (meson assms compact_AR homeomorphic_AR_iff_AR homeomorphic_compactness)+
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4201
  done
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4202
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4203
lemma absolute_retract_from_Un_Int:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4204
  fixes S :: "'a::euclidean_space set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4205
  assumes "(S \<union> T) retract_of UNIV" "(S \<inter> T) retract_of UNIV" "closed S" "closed T"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4206
  shows "S retract_of UNIV"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4207
  using AR_from_Un_Int assms retract_of_UNIV by auto
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4208
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4209
lemma ENR_from_Un_Int_gen:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4210
  fixes S :: "'a::euclidean_space set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4211
  assumes "closedin (subtopology euclidean (S \<union> T)) S" "closedin (subtopology euclidean (S \<union> T)) T" "ENR(S \<union> T)" "ENR(S \<inter> T)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4212
  shows "ENR S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4213
  apply (simp add: ENR_ANR)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4214
  using ANR_from_Un_Int_local ENR_ANR assms locally_compact_closedin by blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4215
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4216
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4217
lemma ENR_from_Un_Int:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4218
  fixes S :: "'a::euclidean_space set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4219
  assumes "closed S" "closed T" "ENR(S \<union> T)" "ENR(S \<inter> T)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4220
  shows "ENR S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4221
  by (meson ENR_from_Un_Int_gen assms closed_subset sup_ge1 sup_ge2)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4222
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4223
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4224
lemma ENR_finite_Union_convex_closed:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4225
  fixes \<T> :: "'a::euclidean_space set set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4226
  assumes \<T>: "finite \<T>" and clo: "\<And>C. C \<in> \<T> \<Longrightarrow> closed C" and con: "\<And>C. C \<in> \<T> \<Longrightarrow> convex C"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4227
  shows "ENR(\<Union> \<T>)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4228
  by (simp add: ENR_ANR ANR_finite_Union_convex_closed \<T> clo closed_Union closed_imp_locally_compact con)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4229
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4230
lemma finite_imp_ENR:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4231
  fixes S :: "'a::euclidean_space set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4232
  shows "finite S \<Longrightarrow> ENR S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4233
  by (simp add: ENR_ANR finite_imp_ANR finite_imp_closed closed_imp_locally_compact)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4234
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4235
lemma ENR_insert:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4236
  fixes S :: "'a::euclidean_space set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4237
  assumes "closed S" "ENR S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4238
  shows "ENR(insert a S)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4239
proof -
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4240
  have "ENR ({a} \<union> S)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4241
    by (metis ANR_insert ENR_ANR Un_commute Un_insert_right assms closed_imp_locally_compact closed_insert sup_bot_right)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4242
  then show ?thesis
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4243
    by auto
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4244
qed
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4245
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4246
lemma ENR_path_component_ENR:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4247
  fixes S :: "'a::euclidean_space set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4248
  assumes "ENR S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4249
  shows "ENR(path_component_set S x)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4250
  by (metis ANR_imp_locally_path_connected ENR_empty ENR_imp_ANR ENR_openin assms
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4251
            locally_path_connected_2 openin_subtopology_self path_component_eq_empty)
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4252
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4253
(*UNUSED
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4254
lemma ENR_Times:
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4255
  fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4256
  assumes "ENR S" "ENR T" shows "ENR(S \<times> T)"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4257
using assms apply (simp add: ENR_ANR ANR_Times)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4258
thm locally_compact_Times
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4259
oops
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4260
  SIMP_TAC[ENR_ANR; ANR_PCROSS; LOCALLY_COMPACT_PCROSS]);;
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4261
*)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4262
64791
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4263
subsection\<open>Finally, spheres are ANRs and ENRs\<close>
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4264
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4265
lemma absolute_retract_homeomorphic_convex_compact:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4266
  fixes S :: "'a::euclidean_space set" and U :: "'b::euclidean_space set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4267
  assumes "S homeomorphic U" "S \<noteq> {}" "S \<subseteq> T" "convex U" "compact U"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4268
  shows "S retract_of T"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4269
  by (metis UNIV_I assms compact_AR convex_imp_AR homeomorphic_AR_iff_AR homeomorphic_compactness homeomorphic_empty(1) retract_of_subset subsetI)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4270
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4271
lemma frontier_retract_of_punctured_universe:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4272
  fixes S :: "'a::euclidean_space set"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4273
  assumes "convex S" "bounded S" "a \<in> interior S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4274
  shows "(frontier S) retract_of (- {a})"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4275
  using rel_frontier_retract_of_punctured_affine_hull
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4276
  by (metis Compl_eq_Diff_UNIV affine_hull_nonempty_interior assms empty_iff rel_frontier_frontier rel_interior_nonempty_interior)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4277
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4278
lemma sphere_retract_of_punctured_universe_gen:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4279
  fixes a :: "'a::euclidean_space"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4280
  assumes "b \<in> ball a r"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4281
  shows  "sphere a r retract_of (- {b})"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4282
proof -
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4283
  have "frontier (cball a r) retract_of (- {b})"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4284
    apply (rule frontier_retract_of_punctured_universe)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4285
    using assms by auto
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4286
  then show ?thesis
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4287
    by simp
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4288
qed
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4289
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4290
lemma sphere_retract_of_punctured_universe:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4291
  fixes a :: "'a::euclidean_space"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4292
  assumes "0 < r"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4293
  shows "sphere a r retract_of (- {a})"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4294
  by (simp add: assms sphere_retract_of_punctured_universe_gen)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4295
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4296
proposition ENR_sphere:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4297
  fixes a :: "'a::euclidean_space"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4298
  shows "ENR(sphere a r)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4299
proof (cases "0 < r")
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4300
  case True
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4301
  then have "sphere a r retract_of -{a}"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4302
    by (simp add: sphere_retract_of_punctured_universe)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4303
  with open_delete show ?thesis
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4304
    by (auto simp: ENR_def)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4305
next
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4306
  case False
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4307
  then show ?thesis
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4308
    using finite_imp_ENR
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4309
    by (metis finite_insert infinite_imp_nonempty less_linear sphere_eq_empty sphere_trivial)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4310
qed
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4311
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4312
corollary ANR_sphere:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4313
  fixes a :: "'a::euclidean_space"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4314
  shows "ANR(sphere a r)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4315
  by (simp add: ENR_imp_ANR ENR_sphere)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4316
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4317
67968
a5ad4c015d1c removed dots at the end of (sub)titles
nipkow
parents: 67682
diff changeset
  4318
subsection\<open>Spheres are connected, etc\<close>
66939
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4319
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4320
lemma locally_path_connected_sphere_gen:
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4321
  fixes S :: "'a::euclidean_space set"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4322
  assumes "bounded S" and "convex S" 
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4323
  shows "locally path_connected (rel_frontier S)"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4324
proof (cases "rel_interior S = {}")
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4325
  case True
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4326
  with assms show ?thesis
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4327
    by (simp add: rel_interior_eq_empty)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4328
next
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4329
  case False
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4330
  then obtain a where a: "a \<in> rel_interior S"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4331
    by blast
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4332
  show ?thesis
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4333
  proof (rule retract_of_locally_path_connected)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4334
    show "locally path_connected (affine hull S - {a})"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4335
      by (meson convex_affine_hull convex_imp_locally_path_connected locally_open_subset openin_delete openin_subtopology_self)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4336
    show "rel_frontier S retract_of affine hull S - {a}"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4337
      using a assms rel_frontier_retract_of_punctured_affine_hull by blast
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4338
  qed
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4339
qed
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4340
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4341
lemma locally_connected_sphere_gen:
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4342
  fixes S :: "'a::euclidean_space set"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4343
  assumes "bounded S" and "convex S" 
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4344
  shows "locally connected (rel_frontier S)"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4345
  by (simp add: ANR_imp_locally_connected ANR_rel_frontier_convex assms)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4346
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4347
lemma locally_path_connected_sphere:
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4348
  fixes a :: "'a::euclidean_space"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4349
  shows "locally path_connected (sphere a r)"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4350
  using ENR_imp_locally_path_connected ENR_sphere by blast
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4351
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4352
lemma locally_connected_sphere:
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4353
  fixes a :: "'a::euclidean_space"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4354
  shows "locally connected(sphere a r)"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4355
  using ANR_imp_locally_connected ANR_sphere by blast
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4356
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4357
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4358
subsection\<open>Borsuk homotopy extension theorem\<close>
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4359
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4360
text\<open>It's only this late so we can use the concept of retraction,
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4361
  saying that the domain sets or range set are ENRs.\<close>
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4362
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4363
theorem Borsuk_homotopy_extension_homotopic:
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4364
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4365
  assumes cloTS: "closedin (subtopology euclidean T) S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4366
      and anr: "(ANR S \<and> ANR T) \<or> ANR U"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4367
      and contf: "continuous_on T f"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4368
      and "f ` T \<subseteq> U"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4369
      and "homotopic_with (\<lambda>x. True) S U f g"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4370
   obtains g' where "homotopic_with (\<lambda>x. True) T U f g'"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4371
                    "continuous_on T g'" "image g' T \<subseteq> U"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4372
                    "\<And>x. x \<in> S \<Longrightarrow> g' x = g x"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4373
proof -
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4374
  have "S \<subseteq> T" using assms closedin_imp_subset by blast
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4375
  obtain h where conth: "continuous_on ({0..1} \<times> S) h"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4376
             and him: "h ` ({0..1} \<times> S) \<subseteq> U"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4377
             and [simp]: "\<And>x. h(0, x) = f x" "\<And>x. h(1::real, x) = g x"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4378
       using assms by (auto simp: homotopic_with_def)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  4379
  define h' where "h' \<equiv>  \<lambda>z. if snd z \<in> S then h z else (f \<circ> snd) z"
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4380
  define B where "B \<equiv> {0::real} \<times> T \<union> {0..1} \<times> S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4381
  have clo0T: "closedin (subtopology euclidean ({0..1} \<times> T)) ({0::real} \<times> T)"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4382
    by (simp add: closedin_subtopology_refl closedin_Times)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4383
  moreover have cloT1S: "closedin (subtopology euclidean ({0..1} \<times> T)) ({0..1} \<times> S)"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4384
    by (simp add: closedin_subtopology_refl closedin_Times assms)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4385
  ultimately have clo0TB:"closedin (subtopology euclidean ({0..1} \<times> T)) B"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4386
    by (auto simp: B_def)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4387
  have cloBS: "closedin (subtopology euclidean B) ({0..1} \<times> S)"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4388
    by (metis (no_types) Un_subset_iff B_def closedin_subset_trans [OF cloT1S] clo0TB closedin_imp_subset closedin_self)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4389
  moreover have cloBT: "closedin (subtopology euclidean B) ({0} \<times> T)"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4390
    using \<open>S \<subseteq> T\<close> closedin_subset_trans [OF clo0T]
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4391
    by (metis B_def Un_upper1 clo0TB closedin_closed inf_le1)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4392
  moreover have "continuous_on ({0} \<times> T) (f \<circ> snd)"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4393
    apply (rule continuous_intros)+
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4394
    apply (simp add: contf)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4395
    done
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4396
  ultimately have conth': "continuous_on B h'"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4397
    apply (simp add: h'_def B_def Un_commute [of "{0} \<times> T"])
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4398
    apply (auto intro!: continuous_on_cases_local conth)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4399
    done
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4400
  have "image h' B \<subseteq> U"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4401
    using \<open>f ` T \<subseteq> U\<close> him by (auto simp: h'_def B_def)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4402
  obtain V k where "B \<subseteq> V" and opeTV: "openin (subtopology euclidean ({0..1} \<times> T)) V"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4403
               and contk: "continuous_on V k" and kim: "k ` V \<subseteq> U"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4404
               and keq: "\<And>x. x \<in> B \<Longrightarrow> k x = h' x"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4405
  using anr
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4406
  proof
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4407
    assume ST: "ANR S \<and> ANR T"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4408
    have eq: "({0} \<times> T \<inter> {0..1} \<times> S) = {0::real} \<times> S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4409
      using \<open>S \<subseteq> T\<close> by auto
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4410
    have "ANR B"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4411
      apply (simp add: B_def)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4412
      apply (rule ANR_closed_Un_local)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4413
          apply (metis cloBT B_def)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4414
         apply (metis Un_commute cloBS B_def)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4415
        apply (simp_all add: ANR_Times convex_imp_ANR ANR_singleton ST eq)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4416
      done
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4417
    note Vk = that
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4418
    have *: thesis if "openin (subtopology euclidean ({0..1::real} \<times> T)) V"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4419
                      "retraction V B r" for V r
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4420
      using that
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4421
      apply (clarsimp simp add: retraction_def)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  4422
      apply (rule Vk [of V "h' \<circ> r"], assumption+)
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4423
        apply (metis continuous_on_compose conth' continuous_on_subset) 
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4424
      using \<open>h' ` B \<subseteq> U\<close> apply force+
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4425
      done
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4426
    show thesis
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4427
        apply (rule ANR_imp_neighbourhood_retract [OF \<open>ANR B\<close> clo0TB])
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4428
        apply (auto simp: ANR_Times ANR_singleton ST retract_of_def *)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4429
        done
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4430
  next
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4431
    assume "ANR U"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4432
    with ANR_imp_absolute_neighbourhood_extensor \<open>h' ` B \<subseteq> U\<close> clo0TB conth' that
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4433
    show ?thesis by blast
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4434
  qed
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4435
  define S' where "S' \<equiv> {x. \<exists>u::real. u \<in> {0..1} \<and> (u, x::'a) \<in> {0..1} \<times> T - V}"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4436
  have "closedin (subtopology euclidean T) S'"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4437
    unfolding S'_def
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4438
    apply (rule closedin_compact_projection, blast)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4439
    using closedin_self opeTV by blast
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4440
  have S'_def: "S' = {x. \<exists>u::real.  (u, x::'a) \<in> {0..1} \<times> T - V}"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4441
    by (auto simp: S'_def)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4442
  have cloTS': "closedin (subtopology euclidean T) S'"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4443
    using S'_def \<open>closedin (subtopology euclidean T) S'\<close> by blast
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4444
  have "S \<inter> S' = {}"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4445
    using S'_def B_def \<open>B \<subseteq> V\<close> by force
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4446
  obtain a :: "'a \<Rightarrow> real" where conta: "continuous_on T a"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4447
      and "\<And>x. x \<in> T \<Longrightarrow> a x \<in> closed_segment 1 0"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4448
      and a1: "\<And>x. x \<in> S \<Longrightarrow> a x = 1"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4449
      and a0: "\<And>x. x \<in> S' \<Longrightarrow> a x = 0"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4450
    apply (rule Urysohn_local [OF cloTS cloTS' \<open>S \<inter> S' = {}\<close>, of 1 0], blast)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4451
    done
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4452
  then have ain: "\<And>x. x \<in> T \<Longrightarrow> a x \<in> {0..1}"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4453
    using closed_segment_eq_real_ivl by auto
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4454
  have inV: "(u * a t, t) \<in> V" if "t \<in> T" "0 \<le> u" "u \<le> 1" for t u
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4455
  proof (rule ccontr)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4456
    assume "(u * a t, t) \<notin> V"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4457
    with ain [OF \<open>t \<in> T\<close>] have "a t = 0"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4458
      apply simp
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4459
      apply (rule a0)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4460
      by (metis (no_types, lifting) Diff_iff S'_def SigmaI atLeastAtMost_iff mem_Collect_eq mult_le_one mult_nonneg_nonneg that)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4461
    show False
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4462
      using B_def \<open>(u * a t, t) \<notin> V\<close> \<open>B \<subseteq> V\<close> \<open>a t = 0\<close> that by auto
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4463
  qed
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4464
  show ?thesis
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4465
  proof
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4466
    show hom: "homotopic_with (\<lambda>x. True) T U f (\<lambda>x. k (a x, x))"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4467
    proof (simp add: homotopic_with, intro exI conjI)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4468
      show "continuous_on ({0..1} \<times> T) (k \<circ> (\<lambda>z. (fst z *\<^sub>R (a \<circ> snd) z, snd z)))"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4469
        apply (intro continuous_on_compose continuous_intros)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4470
        apply (rule continuous_on_subset [OF conta], force)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4471
        apply (rule continuous_on_subset [OF contk])
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4472
        apply (force intro: inV)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4473
        done
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4474
      show "(k \<circ> (\<lambda>z. (fst z *\<^sub>R (a \<circ> snd) z, snd z))) ` ({0..1} \<times> T) \<subseteq> U"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4475
        using inV kim by auto
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4476
      show "\<forall>x\<in>T. (k \<circ> (\<lambda>z. (fst z *\<^sub>R (a \<circ> snd) z, snd z))) (0, x) = f x"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4477
        by (simp add: B_def h'_def keq)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4478
      show "\<forall>x\<in>T. (k \<circ> (\<lambda>z. (fst z *\<^sub>R (a \<circ> snd) z, snd z))) (1, x) = k (a x, x)"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4479
        by auto
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4480
    qed
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4481
  show "continuous_on T (\<lambda>x. k (a x, x))"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4482
    using hom homotopic_with_imp_continuous by blast
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4483
  show "(\<lambda>x. k (a x, x)) ` T \<subseteq> U"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4484
  proof clarify
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4485
    fix t
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4486
    assume "t \<in> T"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4487
    show "k (a t, t) \<in> U"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4488
      by (metis \<open>t \<in> T\<close> image_subset_iff inV kim not_one_le_zero linear mult_cancel_right1)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4489
  qed
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4490
  show "\<And>x. x \<in> S \<Longrightarrow> k (a x, x) = g x"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4491
    by (simp add: B_def a1 h'_def keq)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4492
  qed
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4493
qed
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4494
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4495
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4496
corollary nullhomotopic_into_ANR_extension:
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4497
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4498
  assumes "closed S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4499
      and contf: "continuous_on S f"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4500
      and "ANR T"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4501
      and fim: "f ` S \<subseteq> T"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4502
      and "S \<noteq> {}"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4503
   shows "(\<exists>c. homotopic_with (\<lambda>x. True) S T f (\<lambda>x. c)) \<longleftrightarrow>
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4504
          (\<exists>g. continuous_on UNIV g \<and> range g \<subseteq> T \<and> (\<forall>x \<in> S. g x = f x))"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4505
       (is "?lhs = ?rhs")
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4506
proof
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4507
  assume ?lhs
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4508
  then obtain c where c: "homotopic_with (\<lambda>x. True) S T (\<lambda>x. c) f"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  4509
    by (blast intro: homotopic_with_symD)
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4510
  have "closedin (subtopology euclidean UNIV) S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4511
    using \<open>closed S\<close> closed_closedin by fastforce
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4512
  then obtain g where "continuous_on UNIV g" "range g \<subseteq> T"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4513
                      "\<And>x. x \<in> S \<Longrightarrow> g x = f x"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4514
    apply (rule Borsuk_homotopy_extension_homotopic [OF _ _ continuous_on_const _ c, where T=UNIV])
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4515
    using \<open>ANR T\<close> \<open>S \<noteq> {}\<close> c homotopic_with_imp_subset1 apply fastforce+
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4516
    done
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4517
  then show ?rhs by blast
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4518
next
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4519
  assume ?rhs
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4520
  then obtain g where "continuous_on UNIV g" "range g \<subseteq> T" "\<And>x. x\<in>S \<Longrightarrow> g x = f x"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4521
    by blast
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4522
  then obtain c where "homotopic_with (\<lambda>h. True) UNIV T g (\<lambda>x. c)"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4523
    using nullhomotopic_from_contractible [of UNIV g T] contractible_UNIV by blast
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4524
  then show ?lhs
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  4525
    apply (rule_tac x=c in exI)
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4526
    apply (rule homotopic_with_eq [of _ _ _ g "\<lambda>x. c"])
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4527
    apply (rule homotopic_with_subset_left)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  4528
    apply (auto simp: \<open>\<And>x. x \<in> S \<Longrightarrow> g x = f x\<close>)
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4529
    done
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4530
qed
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4531
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4532
corollary nullhomotopic_into_rel_frontier_extension:
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4533
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4534
  assumes "closed S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4535
      and contf: "continuous_on S f"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4536
      and "convex T" "bounded T"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4537
      and fim: "f ` S \<subseteq> rel_frontier T"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4538
      and "S \<noteq> {}"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4539
   shows "(\<exists>c. homotopic_with (\<lambda>x. True) S (rel_frontier T) f (\<lambda>x. c)) \<longleftrightarrow>
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4540
          (\<exists>g. continuous_on UNIV g \<and> range g \<subseteq> rel_frontier T \<and> (\<forall>x \<in> S. g x = f x))"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4541
by (simp add: nullhomotopic_into_ANR_extension assms ANR_rel_frontier_convex)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4542
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4543
corollary nullhomotopic_into_sphere_extension:
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4544
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b :: euclidean_space"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4545
  assumes "closed S" and contf: "continuous_on S f"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4546
      and "S \<noteq> {}" and fim: "f ` S \<subseteq> sphere a r"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4547
    shows "((\<exists>c. homotopic_with (\<lambda>x. True) S (sphere a r) f (\<lambda>x. c)) \<longleftrightarrow>
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4548
           (\<exists>g. continuous_on UNIV g \<and> range g \<subseteq> sphere a r \<and> (\<forall>x \<in> S. g x = f x)))"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4549
           (is "?lhs = ?rhs")
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4550
proof (cases "r = 0")
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4551
  case True with fim show ?thesis
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  4552
    apply auto
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4553
    using fim continuous_on_const apply fastforce
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4554
    by (metis contf contractible_sing nullhomotopic_into_contractible)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4555
next
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4556
  case False
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4557
  then have eq: "sphere a r = rel_frontier (cball a r)" by simp
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4558
  show ?thesis
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4559
    using fim unfolding eq
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4560
    apply (rule nullhomotopic_into_rel_frontier_extension [OF \<open>closed S\<close> contf convex_cball bounded_cball])
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4561
    apply (rule \<open>S \<noteq> {}\<close>)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4562
    done
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4563
qed
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4564
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4565
proposition Borsuk_map_essential_bounded_component:
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4566
  fixes a :: "'a :: euclidean_space"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4567
  assumes "compact S" and "a \<notin> S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4568
   shows "bounded (connected_component_set (- S) a) \<longleftrightarrow>
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4569
          ~(\<exists>c. homotopic_with (\<lambda>x. True) S (sphere 0 1)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4570
                               (\<lambda>x. inverse(norm(x - a)) *\<^sub>R (x - a)) (\<lambda>x. c))"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4571
   (is "?lhs = ?rhs")
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4572
proof (cases "S = {}")
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4573
  case True then show ?thesis
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4574
    by simp
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4575
next
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4576
  case False
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4577
  have "closed S" "bounded S"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4578
    using \<open>compact S\<close> compact_eq_bounded_closed by auto
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4579
  have s01: "(\<lambda>x. (x - a) /\<^sub>R norm (x - a)) ` S \<subseteq> sphere 0 1"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4580
    using \<open>a \<notin> S\<close>  by clarsimp (metis dist_eq_0_iff dist_norm mult.commute right_inverse)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4581
  have aincc: "a \<in> connected_component_set (- S) a"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4582
    by (simp add: \<open>a \<notin> S\<close>)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4583
  obtain r where "r>0" and r: "S \<subseteq> ball 0 r"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4584
    using bounded_subset_ballD \<open>bounded S\<close> by blast
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4585
  have "~ ?rhs \<longleftrightarrow> ~ ?lhs"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4586
  proof
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4587
    assume notr: "~ ?rhs"
63497
ef794d2e3754 HOL-Multivariate_Analysis: add amssymb to document generation; reintroduce \nexists (cf d51a0a772094)
hoelzl
parents: 63493
diff changeset
  4588
    have nog: "\<nexists>g. continuous_on (S \<union> connected_component_set (- S) a) g \<and>
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4589
                   g ` (S \<union> connected_component_set (- S) a) \<subseteq> sphere 0 1 \<and>
63497
ef794d2e3754 HOL-Multivariate_Analysis: add amssymb to document generation; reintroduce \nexists (cf d51a0a772094)
hoelzl
parents: 63493
diff changeset
  4590
                   (\<forall>x\<in>S. g x = (x - a) /\<^sub>R norm (x - a))"
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4591
         if "bounded (connected_component_set (- S) a)"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4592
      apply (rule non_extensible_Borsuk_map [OF \<open>compact S\<close> componentsI _ aincc])
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4593
      using  \<open>a \<notin> S\<close> that by auto
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4594
    obtain g where "range g \<subseteq> sphere 0 1" "continuous_on UNIV g"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4595
                        "\<And>x. x \<in> S \<Longrightarrow> g x = (x - a) /\<^sub>R norm (x - a)"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4596
      using notr
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  4597
      by (auto simp: nullhomotopic_into_sphere_extension
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4598
                 [OF \<open>closed S\<close> continuous_on_Borsuk_map [OF \<open>a \<notin> S\<close>] False s01])
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4599
    with \<open>a \<notin> S\<close> show  "~ ?lhs"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4600
      apply (clarsimp simp: Borsuk_map_into_sphere [of a S, symmetric] dest!: nog)
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  4601
      apply (drule_tac x=g in spec)
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4602
      using continuous_on_subset by fastforce 
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4603
  next
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4604
    assume "~ ?lhs"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4605
    then obtain b where b: "b \<in> connected_component_set (- S) a" and "r \<le> norm b"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4606
      using bounded_iff linear by blast
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4607
    then have bnot: "b \<notin> ball 0 r"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4608
      by simp
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4609
    have "homotopic_with (\<lambda>x. True) S (sphere 0 1) (\<lambda>x. (x - a) /\<^sub>R norm (x - a))
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4610
                                                   (\<lambda>x. (x - b) /\<^sub>R norm (x - b))"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4611
      apply (rule Borsuk_maps_homotopic_in_path_component)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4612
      using \<open>closed S\<close> b open_Compl open_path_connected_component apply fastforce
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4613
      done
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4614
    moreover
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4615
    obtain c where "homotopic_with (\<lambda>x. True) (ball 0 r) (sphere 0 1)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4616
                                   (\<lambda>x. inverse (norm (x - b)) *\<^sub>R (x - b)) (\<lambda>x. c)"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4617
    proof (rule nullhomotopic_from_contractible)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4618
      show "contractible (ball (0::'a) r)"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4619
        by (metis convex_imp_contractible convex_ball)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4620
      show "continuous_on (ball 0 r) (\<lambda>x. inverse(norm (x - b)) *\<^sub>R (x - b))"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4621
        by (rule continuous_on_Borsuk_map [OF bnot])
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4622
      show "(\<lambda>x. (x - b) /\<^sub>R norm (x - b)) ` ball 0 r \<subseteq> sphere 0 1"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4623
        using bnot Borsuk_map_into_sphere by blast
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4624
    qed blast
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4625
    ultimately have "homotopic_with (\<lambda>x. True) S (sphere 0 1)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4626
                         (\<lambda>x. (x - a) /\<^sub>R norm (x - a)) (\<lambda>x. c)"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4627
      by (meson homotopic_with_subset_left homotopic_with_trans r)
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4628
    then show "~ ?rhs"
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4629
      by blast
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4630
  qed
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4631
  then show ?thesis by blast
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4632
qed
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  4633
64791
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4634
lemma homotopic_Borsuk_maps_in_bounded_component:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4635
  fixes a :: "'a :: euclidean_space"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4636
  assumes "compact S" and "a \<notin> S"and "b \<notin> S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4637
      and boc: "bounded (connected_component_set (- S) a)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4638
      and hom: "homotopic_with (\<lambda>x. True) S (sphere 0 1)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4639
                               (\<lambda>x. (x - a) /\<^sub>R norm (x - a))
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4640
                               (\<lambda>x. (x - b) /\<^sub>R norm (x - b))"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4641
   shows "connected_component (- S) a b"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4642
proof (rule ccontr)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4643
  assume notcc: "\<not> connected_component (- S) a b"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4644
  let ?T = "S \<union> connected_component_set (- S) a"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4645
  have "\<nexists>g. continuous_on (S \<union> connected_component_set (- S) a) g \<and>
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4646
            g ` (S \<union> connected_component_set (- S) a) \<subseteq> sphere 0 1 \<and>
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4647
            (\<forall>x\<in>S. g x = (x - a) /\<^sub>R norm (x - a))"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4648
    by (simp add: \<open>a \<notin> S\<close> componentsI non_extensible_Borsuk_map [OF \<open>compact S\<close> _ boc])
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4649
  moreover obtain g where "continuous_on (S \<union> connected_component_set (- S) a) g"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4650
                          "g ` (S \<union> connected_component_set (- S) a) \<subseteq> sphere 0 1"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4651
                          "\<And>x. x \<in> S \<Longrightarrow> g x = (x - a) /\<^sub>R norm (x - a)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4652
  proof (rule Borsuk_homotopy_extension_homotopic)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4653
    show "closedin (subtopology euclidean ?T) S"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4654
      by (simp add: \<open>compact S\<close> closed_subset compact_imp_closed)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4655
    show "continuous_on ?T (\<lambda>x. (x - b) /\<^sub>R norm (x - b))"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4656
      by (simp add: \<open>b \<notin> S\<close> notcc continuous_on_Borsuk_map)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4657
    show "(\<lambda>x. (x - b) /\<^sub>R norm (x - b)) ` ?T \<subseteq> sphere 0 1"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4658
      by (simp add: \<open>b \<notin> S\<close> notcc Borsuk_map_into_sphere)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4659
    show "homotopic_with (\<lambda>x. True) S (sphere 0 1)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4660
             (\<lambda>x. (x - b) /\<^sub>R norm (x - b)) (\<lambda>x. (x - a) /\<^sub>R norm (x - a))"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4661
      by (simp add: hom homotopic_with_symD)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4662
    qed (auto simp: ANR_sphere intro: that)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4663
  ultimately show False by blast
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4664
qed
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4665
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4666
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4667
lemma Borsuk_maps_homotopic_in_connected_component_eq:
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4668
  fixes a :: "'a :: euclidean_space"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4669
  assumes S: "compact S" "a \<notin> S" "b \<notin> S" and 2: "2 \<le> DIM('a)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4670
    shows "(homotopic_with (\<lambda>x. True) S (sphere 0 1)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4671
                   (\<lambda>x. (x - a) /\<^sub>R norm (x - a))
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4672
                   (\<lambda>x. (x - b) /\<^sub>R norm (x - b)) \<longleftrightarrow>
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4673
           connected_component (- S) a b)"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4674
         (is "?lhs = ?rhs")
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4675
proof
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4676
  assume L: ?lhs
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4677
  show ?rhs
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4678
  proof (cases "bounded(connected_component_set (- S) a)")
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4679
    case True
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4680
    show ?thesis
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4681
      by (rule homotopic_Borsuk_maps_in_bounded_component [OF S True L])
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4682
  next
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4683
    case not_bo_a: False
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4684
    show ?thesis
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4685
    proof (cases "bounded(connected_component_set (- S) b)")
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4686
      case True
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4687
      show ?thesis
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4688
        using homotopic_Borsuk_maps_in_bounded_component [OF S]
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4689
        by (simp add: L True assms connected_component_sym homotopic_Borsuk_maps_in_bounded_component homotopic_with_sym)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4690
    next
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4691
      case False
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4692
      then show ?thesis
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4693
        using cobounded_unique_unbounded_component [of "-S" a b] \<open>compact S\<close> not_bo_a
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4694
        by (auto simp: compact_eq_bounded_closed assms connected_component_eq_eq)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4695
    qed
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4696
  qed
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4697
next
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4698
  assume R: ?rhs
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4699
  then have "path_component (- S) a b"
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4700
    using assms(1) compact_eq_bounded_closed open_Compl open_path_connected_component_set by fastforce
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4701
  then show ?lhs
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4702
    by (simp add: Borsuk_maps_homotopic_in_path_component)
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4703
qed
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4704
05a2b3b20664 facts about ANRs, ENRs, covering spaces
paulson <lp15@cam.ac.uk>
parents: 64789
diff changeset
  4705
66939
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4706
subsection\<open>More extension theorems\<close>
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4707
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4708
lemma extension_from_clopen:
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4709
  assumes ope: "openin (subtopology euclidean S) T"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4710
      and clo: "closedin (subtopology euclidean S) T"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4711
      and contf: "continuous_on T f" and fim: "f ` T \<subseteq> U" and null: "U = {} \<Longrightarrow> S = {}"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4712
 obtains g where "continuous_on S g" "g ` S \<subseteq> U" "\<And>x. x \<in> T \<Longrightarrow> g x = f x"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4713
proof (cases "U = {}")
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4714
  case True
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4715
  then show ?thesis
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4716
    by (simp add: null that)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4717
next
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4718
  case False
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4719
  then obtain a where "a \<in> U"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4720
    by auto
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4721
  let ?g = "\<lambda>x. if x \<in> T then f x else a"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4722
  have Seq: "S = T \<union> (S - T)"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4723
    using clo closedin_imp_subset by fastforce
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4724
  show ?thesis
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4725
  proof
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4726
    have "continuous_on (T \<union> (S - T)) ?g"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4727
      apply (rule continuous_on_cases_local)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4728
      using Seq clo ope by (auto simp: contf continuous_on_const intro: continuous_on_cases_local)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4729
    with Seq show "continuous_on S ?g"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4730
      by metis
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4731
    show "?g ` S \<subseteq> U"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4732
      using \<open>a \<in> U\<close> fim by auto
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4733
    show "\<And>x. x \<in> T \<Longrightarrow> ?g x = f x"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4734
      by auto
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4735
  qed
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4736
qed
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4737
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4738
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4739
lemma extension_from_component:
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4740
  fixes f :: "'a :: euclidean_space \<Rightarrow> 'b :: euclidean_space"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4741
  assumes S: "locally connected S \<or> compact S" and "ANR U"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4742
     and C: "C \<in> components S" and contf: "continuous_on C f" and fim: "f ` C \<subseteq> U"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4743
 obtains g where "continuous_on S g" "g ` S \<subseteq> U" "\<And>x. x \<in> C \<Longrightarrow> g x = f x"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4744
proof -
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4745
  obtain T g where ope: "openin (subtopology euclidean S) T"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4746
               and clo: "closedin (subtopology euclidean S) T"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4747
               and "C \<subseteq> T" and contg: "continuous_on T g" and gim: "g ` T \<subseteq> U"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4748
               and gf: "\<And>x. x \<in> C \<Longrightarrow> g x = f x"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4749
    using S
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4750
  proof
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4751
    assume "locally connected S"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4752
    show ?thesis
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4753
      by (metis C \<open>locally connected S\<close> openin_components_locally_connected closedin_component contf fim order_refl that)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4754
  next
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4755
    assume "compact S"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4756
    then obtain W g where "C \<subseteq> W" and opeW: "openin (subtopology euclidean S) W"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4757
                 and contg: "continuous_on W g"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4758
                 and gim: "g ` W \<subseteq> U" and gf: "\<And>x. x \<in> C \<Longrightarrow> g x = f x"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4759
      using ANR_imp_absolute_neighbourhood_extensor [of U C f S] C \<open>ANR U\<close> closedin_component contf fim by blast
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4760
    then obtain V where "open V" and V: "W = S \<inter> V"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4761
      by (auto simp: openin_open)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4762
    moreover have "locally compact S"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4763
      by (simp add: \<open>compact S\<close> closed_imp_locally_compact compact_imp_closed)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4764
    ultimately obtain K where opeK: "openin (subtopology euclidean S) K" and "compact K" "C \<subseteq> K" "K \<subseteq> V"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4765
      by (metis C Int_subset_iff \<open>C \<subseteq> W\<close> \<open>compact S\<close> compact_components Sura_Bura_clopen_subset)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4766
    show ?thesis
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4767
    proof
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4768
      show "closedin (subtopology euclidean S) K"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4769
        by (meson \<open>compact K\<close> \<open>compact S\<close> closedin_compact_eq opeK openin_imp_subset)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4770
      show "continuous_on K g"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4771
        by (metis Int_subset_iff V \<open>K \<subseteq> V\<close> contg continuous_on_subset opeK openin_subtopology subset_eq)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4772
      show "g ` K \<subseteq> U"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4773
        using V \<open>K \<subseteq> V\<close> gim opeK openin_imp_subset by fastforce
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4774
    qed (use opeK gf \<open>C \<subseteq> K\<close> in auto)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4775
  qed
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4776
  obtain h where "continuous_on S h" "h ` S \<subseteq> U" "\<And>x. x \<in> T \<Longrightarrow> h x = g x"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4777
    using extension_from_clopen
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4778
    by (metis C bot.extremum_uniqueI clo contg gim fim image_is_empty in_components_nonempty ope)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4779
  then show ?thesis
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4780
    by (metis \<open>C \<subseteq> T\<close> gf subset_eq that)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4781
qed
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4782
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4783
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4784
lemma tube_lemma:
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4785
  fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4786
  assumes "compact S" and S: "S \<noteq> {}" "(\<lambda>x. (x,a)) ` S \<subseteq> U" 
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4787
      and ope: "openin (subtopology euclidean (S \<times> T)) U"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4788
  obtains V where "openin (subtopology euclidean T) V" "a \<in> V" "S \<times> V \<subseteq> U"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4789
proof -
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4790
  let ?W = "{y. \<exists>x. x \<in> S \<and> (x, y) \<in> (S \<times> T - U)}"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4791
  have "U \<subseteq> S \<times> T" "closedin (subtopology euclidean (S \<times> T)) (S \<times> T - U)"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4792
    using ope by (auto simp: openin_closedin_eq)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4793
  then have "closedin (subtopology euclidean T) ?W"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4794
    using \<open>compact S\<close> closedin_compact_projection by blast
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4795
  moreover have "a \<in> T - ?W"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4796
    using \<open>U \<subseteq> S \<times> T\<close> S by auto
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4797
  moreover have "S \<times> (T - ?W) \<subseteq> U"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4798
    by auto
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4799
  ultimately show ?thesis
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4800
    by (metis (no_types, lifting) Sigma_cong closedin_def that topspace_euclidean_subtopology)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4801
qed
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4802
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4803
lemma tube_lemma_gen:
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4804
  fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4805
  assumes "compact S" "S \<noteq> {}" "T \<subseteq> T'" "S \<times> T \<subseteq> U"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4806
      and ope: "openin (subtopology euclidean (S \<times> T')) U"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4807
  obtains V where "openin (subtopology euclidean T') V" "T \<subseteq> V" "S \<times> V \<subseteq> U"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4808
proof -
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4809
  have "\<And>x. x \<in> T \<Longrightarrow> \<exists>V. openin (subtopology euclidean T') V \<and> x \<in> V \<and> S \<times> V \<subseteq> U"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4810
    using assms by (auto intro:  tube_lemma [OF \<open>compact S\<close>])
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4811
  then obtain F where F: "\<And>x. x \<in> T \<Longrightarrow> openin (subtopology euclidean T') (F x) \<and> x \<in> F x \<and> S \<times> F x \<subseteq> U"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4812
    by metis
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4813
  show ?thesis
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4814
  proof
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4815
    show "openin (subtopology euclidean T') (UNION T F)"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4816
      using F by blast
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4817
    show "T \<subseteq> UNION T F"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4818
      using F by blast
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4819
    show "S \<times> UNION T F \<subseteq> U"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4820
      using F by auto
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4821
  qed
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4822
qed
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4823
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4824
proposition homotopic_neighbourhood_extension:
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4825
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4826
  assumes contf: "continuous_on S f" and fim: "f ` S \<subseteq> U"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4827
      and contg: "continuous_on S g" and gim: "g ` S \<subseteq> U"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4828
      and clo: "closedin (subtopology euclidean S) T"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4829
      and "ANR U" and hom: "homotopic_with (\<lambda>x. True) T U f g"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4830
    obtains V where "T \<subseteq> V" "openin (subtopology euclidean S) V"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4831
                    "homotopic_with (\<lambda>x. True) V U f g"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4832
proof -
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4833
  have "T \<subseteq> S"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4834
    using clo closedin_imp_subset by blast
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4835
  obtain h where conth: "continuous_on ({0..1::real} \<times> T) h"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4836
             and him: "h ` ({0..1} \<times> T) \<subseteq> U"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4837
             and h0: "\<And>x. h(0, x) = f x" and h1: "\<And>x. h(1, x) = g x"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4838
    using hom by (auto simp: homotopic_with_def)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4839
  define h' where "h' \<equiv> \<lambda>z. if fst z \<in> {0} then f(snd z)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4840
                             else if fst z \<in> {1} then g(snd z)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4841
                             else h z"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4842
  let ?S0 = "{0::real} \<times> S" and ?S1 = "{1::real} \<times> S"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4843
  have "continuous_on(?S0 \<union> (?S1 \<union> {0..1} \<times> T)) h'"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4844
    unfolding h'_def
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4845
  proof (intro continuous_on_cases_local)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4846
    show "closedin (subtopology euclidean (?S0 \<union> (?S1 \<union> {0..1} \<times> T))) ?S0"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4847
         "closedin (subtopology euclidean (?S1 \<union> {0..1} \<times> T)) ?S1"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4848
      using \<open>T \<subseteq> S\<close> by (force intro: closedin_Times closedin_subset_trans [of "{0..1} \<times> S"])+
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4849
    show "closedin (subtopology euclidean (?S0 \<union> (?S1 \<union> {0..1} \<times> T))) (?S1 \<union> {0..1} \<times> T)"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4850
         "closedin (subtopology euclidean (?S1 \<union> {0..1} \<times> T)) ({0..1} \<times> T)"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4851
      using \<open>T \<subseteq> S\<close> by (force intro: clo closedin_Times closedin_subset_trans [of "{0..1} \<times> S"])+
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4852
    show "continuous_on (?S0) (\<lambda>x. f (snd x))"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4853
      by (intro continuous_intros continuous_on_compose2 [OF contf]) auto
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4854
    show "continuous_on (?S1) (\<lambda>x. g (snd x))"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4855
      by (intro continuous_intros continuous_on_compose2 [OF contg]) auto
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4856
  qed (use h0 h1 conth in auto)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4857
  then have "continuous_on ({0,1} \<times> S \<union> ({0..1} \<times> T)) h'"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4858
    by (metis Sigma_Un_distrib1 Un_assoc insert_is_Un) 
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4859
  moreover have "h' ` ({0,1} \<times> S \<union> {0..1} \<times> T) \<subseteq> U"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4860
    using fim gim him \<open>T \<subseteq> S\<close> unfolding h'_def by force
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4861
  moreover have "closedin (subtopology euclidean ({0..1::real} \<times> S)) ({0,1} \<times> S \<union> {0..1::real} \<times> T)"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4862
    by (intro closedin_Times closedin_Un clo) (simp_all add: closed_subset)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4863
  ultimately
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4864
  obtain W k where W: "({0,1} \<times> S) \<union> ({0..1} \<times> T) \<subseteq> W"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4865
               and opeW: "openin (subtopology euclidean ({0..1} \<times> S)) W"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4866
               and contk: "continuous_on W k"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4867
               and kim: "k ` W \<subseteq> U"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4868
               and kh': "\<And>x. x \<in> ({0,1} \<times> S) \<union> ({0..1} \<times> T) \<Longrightarrow> k x = h' x"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4869
    by (metis ANR_imp_absolute_neighbourhood_extensor [OF \<open>ANR U\<close>, of "({0,1} \<times> S) \<union> ({0..1} \<times> T)" h' "{0..1} \<times> S"])
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4870
  obtain T' where opeT': "openin (subtopology euclidean S) T'" 
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4871
              and "T \<subseteq> T'" and TW: "{0..1} \<times> T' \<subseteq> W"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4872
    using tube_lemma_gen [of "{0..1::real}" T S W] W \<open>T \<subseteq> S\<close> opeW by auto
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4873
  moreover have "homotopic_with (\<lambda>x. True) T' U f g"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4874
  proof (simp add: homotopic_with, intro exI conjI)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4875
    show "continuous_on ({0..1} \<times> T') k"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4876
      using TW continuous_on_subset contk by auto
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4877
    show "k ` ({0..1} \<times> T') \<subseteq> U"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4878
      using TW kim by fastforce
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4879
    have "T' \<subseteq> S"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4880
      by (meson opeT' subsetD openin_imp_subset)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4881
    then show "\<forall>x\<in>T'. k (0, x) = f x" "\<forall>x\<in>T'. k (1, x) = g x"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4882
      by (auto simp: kh' h'_def)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4883
  qed
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4884
  ultimately show ?thesis
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4885
    by (blast intro: that)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4886
qed
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4887
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4888
text\<open> Homotopy on a union of closed-open sets.\<close>
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4889
proposition homotopic_on_clopen_Union:
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4890
  fixes \<F> :: "'a::euclidean_space set set"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4891
  assumes "\<And>S. S \<in> \<F> \<Longrightarrow> closedin (subtopology euclidean (\<Union>\<F>)) S"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4892
      and "\<And>S. S \<in> \<F> \<Longrightarrow> openin (subtopology euclidean (\<Union>\<F>)) S"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4893
      and "\<And>S. S \<in> \<F> \<Longrightarrow> homotopic_with (\<lambda>x. True) S T f g"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4894
  shows "homotopic_with (\<lambda>x. True) (\<Union>\<F>) T f g"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4895
proof -
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4896
  obtain \<V> where "\<V> \<subseteq> \<F>" "countable \<V>" and eqU: "\<Union>\<V> = \<Union>\<F>"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4897
    using Lindelof_openin assms by blast
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4898
  show ?thesis
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4899
  proof (cases "\<V> = {}")
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4900
    case True
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4901
    then show ?thesis
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4902
      by (metis Union_empty eqU homotopic_on_empty)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4903
  next
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4904
    case False
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4905
    then obtain V :: "nat \<Rightarrow> 'a set" where V: "range V = \<V>"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4906
      using range_from_nat_into \<open>countable \<V>\<close> by metis
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4907
    with \<open>\<V> \<subseteq> \<F>\<close> have clo: "\<And>n. closedin (subtopology euclidean (\<Union>\<F>)) (V n)"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4908
                  and ope: "\<And>n. openin (subtopology euclidean (\<Union>\<F>)) (V n)"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4909
                  and hom: "\<And>n. homotopic_with (\<lambda>x. True) (V n) T f g"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4910
      using assms by auto 
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4911
    then obtain h where conth: "\<And>n. continuous_on ({0..1::real} \<times> V n) (h n)"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4912
                  and him: "\<And>n. h n ` ({0..1} \<times> V n) \<subseteq> T" 
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4913
                  and h0: "\<And>n. \<And>x. x \<in> V n \<Longrightarrow> h n (0, x) = f x" 
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4914
                  and h1: "\<And>n. \<And>x. x \<in> V n \<Longrightarrow> h n (1, x) = g x"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4915
      by (simp add: homotopic_with) metis
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4916
    have wop: "b \<in> V x \<Longrightarrow> \<exists>k. b \<in> V k \<and> (\<forall>j<k. b \<notin> V j)" for b x
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4917
        using nat_less_induct [where P = "\<lambda>i. b \<notin> V i"] by meson
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4918
    obtain \<zeta> where cont: "continuous_on ({0..1} \<times> UNION UNIV V) \<zeta>"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4919
              and eq: "\<And>x i. \<lbrakk>x \<in> {0..1} \<times> UNION UNIV V \<inter>
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4920
                                   {0..1} \<times> (V i - (\<Union>m<i. V m))\<rbrakk> \<Longrightarrow> \<zeta> x = h i x"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4921
    proof (rule pasting_lemma_exists)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4922
      show "{0..1} \<times> UNION UNIV V \<subseteq> (\<Union>i. {0..1::real} \<times> (V i - (\<Union>m<i. V m)))"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4923
        by (force simp: Ball_def dest: wop)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4924
      show "openin (subtopology euclidean ({0..1} \<times> UNION UNIV V)) 
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4925
                   ({0..1::real} \<times> (V i - (\<Union>m<i. V m)))" for i
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4926
      proof (intro openin_Times openin_subtopology_self openin_diff)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4927
        show "openin (subtopology euclidean (UNION UNIV V)) (V i)"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4928
          using ope V eqU by auto
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4929
        show "closedin (subtopology euclidean (UNION UNIV V)) (\<Union>m<i. V m)"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4930
          using V clo eqU by (force intro: closedin_Union)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4931
      qed
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4932
      show "continuous_on ({0..1} \<times> (V i - (\<Union>m<i. V m))) (h i)" for i
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4933
        by (rule continuous_on_subset [OF conth]) auto
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4934
      show "\<And>i j x. x \<in> {0..1} \<times> UNION UNIV V \<inter>
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4935
                    {0..1} \<times> (V i - (\<Union>m<i. V m)) \<inter> {0..1} \<times> (V j - (\<Union>m<j. V m))
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4936
                    \<Longrightarrow> h i x = h j x"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4937
        by clarsimp (metis lessThan_iff linorder_neqE_nat)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4938
    qed auto
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4939
    show ?thesis
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4940
    proof (simp add: homotopic_with eqU [symmetric], intro exI conjI ballI)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4941
      show "continuous_on ({0..1} \<times> \<Union>\<V>) \<zeta>"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4942
        using V eqU by (blast intro!:  continuous_on_subset [OF cont])
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4943
      show "\<zeta>` ({0..1} \<times> \<Union>\<V>) \<subseteq> T"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4944
      proof clarsimp
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4945
        fix t :: real and y :: "'a" and X :: "'a set"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4946
        assume "y \<in> X" "X \<in> \<V>" and t: "0 \<le> t" "t \<le> 1"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4947
        then obtain k where "y \<in> V k" and j: "\<forall>j<k. y \<notin> V j"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4948
          by (metis image_iff V wop)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4949
        with him t show "\<zeta>(t, y) \<in> T"
68022
c8a506be83bd Tidied a lot of messy proofs
paulson <lp15@cam.ac.uk>
parents: 68017
diff changeset
  4950
          by (subst eq) force+
66939
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4951
      qed
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4952
      fix X y
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4953
      assume "X \<in> \<V>" "y \<in> X"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4954
      then obtain k where "y \<in> V k" and j: "\<forall>j<k. y \<notin> V j"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4955
        by (metis image_iff V wop)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4956
      then show "\<zeta>(0, y) = f y" and "\<zeta>(1, y) = g y"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4957
        by (subst eq [where i=k]; force simp: h0 h1)+ 
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4958
    qed
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4959
  qed
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4960
qed
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4961
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4962
proposition homotopic_on_components_eq:
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4963
  fixes S :: "'a :: euclidean_space set" and T :: "'b :: euclidean_space set"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4964
  assumes S: "locally connected S \<or> compact S" and "ANR T"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4965
  shows "homotopic_with (\<lambda>x. True) S T f g \<longleftrightarrow>
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4966
         (continuous_on S f \<and> f ` S \<subseteq> T \<and> continuous_on S g \<and> g ` S \<subseteq> T) \<and>
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4967
         (\<forall>C \<in> components S. homotopic_with (\<lambda>x. True) C T f g)"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4968
    (is "?lhs \<longleftrightarrow> ?C \<and> ?rhs")
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4969
proof -
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4970
  have "continuous_on S f" "f ` S \<subseteq> T" "continuous_on S g" "g ` S \<subseteq> T" if ?lhs
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4971
    using homotopic_with_imp_continuous homotopic_with_imp_subset1 homotopic_with_imp_subset2 that by blast+
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4972
  moreover have "?lhs \<longleftrightarrow> ?rhs"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4973
    if contf: "continuous_on S f" and fim: "f ` S \<subseteq> T" and contg: "continuous_on S g" and gim: "g ` S \<subseteq> T"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4974
  proof
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4975
    assume ?lhs
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4976
    with that show ?rhs
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4977
      by (simp add: homotopic_with_subset_left in_components_subset)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4978
  next
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4979
    assume R: ?rhs
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4980
    have "\<exists>U. C \<subseteq> U \<and> closedin (subtopology euclidean S) U \<and>
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4981
              openin (subtopology euclidean S) U \<and>
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4982
              homotopic_with (\<lambda>x. True) U T f g" if C: "C \<in> components S" for C
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4983
    proof -
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4984
      have "C \<subseteq> S"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4985
        by (simp add: in_components_subset that)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4986
      show ?thesis
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4987
        using S
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4988
      proof
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4989
        assume "locally connected S"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4990
        show ?thesis
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4991
        proof (intro exI conjI)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4992
          show "closedin (subtopology euclidean S) C"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4993
            by (simp add: closedin_component that)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4994
          show "openin (subtopology euclidean S) C"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4995
            by (simp add: \<open>locally connected S\<close> openin_components_locally_connected that)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4996
          show "homotopic_with (\<lambda>x. True) C T f g"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4997
            by (simp add: R that)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4998
        qed auto
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  4999
      next
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5000
        assume "compact S"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5001
        have hom: "homotopic_with (\<lambda>x. True) C T f g"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5002
          using R that by blast
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5003
        obtain U where "C \<subseteq> U" and opeU: "openin (subtopology euclidean S) U"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5004
                  and hom: "homotopic_with (\<lambda>x. True) U T f g"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5005
          using homotopic_neighbourhood_extension [OF contf fim contg gim _ \<open>ANR T\<close> hom]
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5006
            \<open>C \<in> components S\<close> closedin_component by blast
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5007
        then obtain V where "open V" and V: "U = S \<inter> V"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5008
          by (auto simp: openin_open)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5009
        moreover have "locally compact S"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5010
          by (simp add: \<open>compact S\<close> closed_imp_locally_compact compact_imp_closed)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5011
        ultimately obtain K where opeK: "openin (subtopology euclidean S) K" and "compact K" "C \<subseteq> K" "K \<subseteq> V"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5012
          by (metis C Int_subset_iff Sura_Bura_clopen_subset \<open>C \<subseteq> U\<close> \<open>compact S\<close> compact_components)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5013
        show ?thesis
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5014
        proof (intro exI conjI)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5015
          show "closedin (subtopology euclidean S) K"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5016
            by (meson \<open>compact K\<close> \<open>compact S\<close> closedin_compact_eq opeK openin_imp_subset)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5017
          show "homotopic_with (\<lambda>x. True) K T f g"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5018
            using V \<open>K \<subseteq> V\<close> hom homotopic_with_subset_left opeK openin_imp_subset by fastforce
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5019
        qed (use opeK \<open>C \<subseteq> K\<close> in auto)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5020
      qed
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5021
    qed
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5022
    then obtain \<phi> where \<phi>: "\<And>C. C \<in> components S \<Longrightarrow> C \<subseteq> \<phi> C"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5023
                  and clo\<phi>: "\<And>C. C \<in> components S \<Longrightarrow> closedin (subtopology euclidean S) (\<phi> C)"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5024
                  and ope\<phi>: "\<And>C. C \<in> components S \<Longrightarrow> openin (subtopology euclidean S) (\<phi> C)"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5025
                  and hom\<phi>: "\<And>C. C \<in> components S \<Longrightarrow> homotopic_with (\<lambda>x. True) (\<phi> C) T f g"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5026
      by metis
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5027
    have Seq: "S = UNION (components S) \<phi>"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5028
    proof
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5029
      show "S \<subseteq> UNION (components S) \<phi>"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5030
        by (metis Sup_mono Union_components \<phi> imageI)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5031
      show "UNION (components S) \<phi> \<subseteq> S"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5032
        using ope\<phi> openin_imp_subset by fastforce
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5033
    qed
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5034
    show ?lhs
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5035
      apply (subst Seq)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5036
      apply (rule homotopic_on_clopen_Union)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5037
      using Seq clo\<phi> ope\<phi> hom\<phi> by auto
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5038
  qed
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5039
  ultimately show ?thesis by blast
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5040
qed
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5041
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5042
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5043
lemma cohomotopically_trivial_on_components:
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5044
  fixes S :: "'a :: euclidean_space set" and T :: "'b :: euclidean_space set"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5045
  assumes S: "locally connected S \<or> compact S" and "ANR T"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5046
  shows
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5047
   "(\<forall>f g. continuous_on S f \<longrightarrow> f ` S \<subseteq> T \<longrightarrow> continuous_on S g \<longrightarrow> g ` S \<subseteq> T \<longrightarrow>
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5048
           homotopic_with (\<lambda>x. True) S T f g)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5049
    \<longleftrightarrow>
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5050
    (\<forall>C\<in>components S.
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5051
        \<forall>f g. continuous_on C f \<longrightarrow> f ` C \<subseteq> T \<longrightarrow> continuous_on C g \<longrightarrow> g ` C \<subseteq> T \<longrightarrow>
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5052
              homotopic_with (\<lambda>x. True) C T f g)"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5053
     (is "?lhs = ?rhs")
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5054
proof
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5055
  assume L[rule_format]: ?lhs
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5056
  show ?rhs
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5057
  proof clarify
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5058
    fix C f g
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5059
    assume contf: "continuous_on C f" and fim: "f ` C \<subseteq> T"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5060
       and contg: "continuous_on C g" and gim: "g ` C \<subseteq> T" and C: "C \<in> components S"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5061
    obtain f' where contf': "continuous_on S f'" and f'im: "f' ` S \<subseteq> T" and f'f: "\<And>x. x \<in> C \<Longrightarrow> f' x = f x"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5062
      using extension_from_component [OF S \<open>ANR T\<close> C contf fim] by metis
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5063
    obtain g' where contg': "continuous_on S g'" and g'im: "g' ` S \<subseteq> T" and g'g: "\<And>x. x \<in> C \<Longrightarrow> g' x = g x"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5064
      using extension_from_component [OF S \<open>ANR T\<close> C contg gim] by metis
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5065
    have "homotopic_with (\<lambda>x. True) C T f' g'"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5066
      using L [OF contf' f'im contg' g'im] homotopic_with_subset_left C in_components_subset by fastforce
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5067
    then show "homotopic_with (\<lambda>x. True) C T f g"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5068
      using f'f g'g homotopic_with_eq by force
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5069
  qed
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5070
next
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5071
  assume R [rule_format]: ?rhs
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5072
  show ?lhs
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5073
  proof clarify
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5074
    fix f g
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5075
    assume contf: "continuous_on S f" and fim: "f ` S \<subseteq> T"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5076
      and contg: "continuous_on S g" and gim: "g ` S \<subseteq> T"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5077
    moreover have "homotopic_with (\<lambda>x. True) C T f g" if "C \<in> components S" for C
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5078
      using R [OF that]
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5079
      by (meson contf contg continuous_on_subset fim gim image_mono in_components_subset order.trans that)
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5080
    ultimately show "homotopic_with (\<lambda>x. True) S T f g"
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5081
      by (subst homotopic_on_components_eq [OF S \<open>ANR T\<close>]) auto
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5082
  qed
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5083
qed
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5084
04678058308f New results in topology, mostly from HOL Light's moretop.ml
paulson <lp15@cam.ac.uk>
parents: 66884
diff changeset
  5085
64122
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5086
subsection\<open>The complement of a set and path-connectedness\<close>
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5087
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5088
text\<open>Complement in dimension N > 1 of set homeomorphic to any interval in
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5089
 any dimension is (path-)connected. This naively generalizes the argument
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5090
 in Ryuji Maehara's paper "The Jordan curve theorem via the Brouwer fixed point theorem",
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5091
American Mathematical Monthly 1984.\<close>
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5092
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5093
lemma unbounded_components_complement_absolute_retract:
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5094
  fixes S :: "'a::euclidean_space set"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5095
  assumes C: "C \<in> components(- S)" and S: "compact S" "AR S"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5096
    shows "\<not> bounded C"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5097
proof -
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5098
  obtain y where y: "C = connected_component_set (- S) y" and "y \<notin> S"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5099
    using C by (auto simp: components_def)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5100
  have "open(- S)"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5101
    using S by (simp add: closed_open compact_eq_bounded_closed)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5102
  have "S retract_of UNIV"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5103
    using S compact_AR by blast
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5104
  then obtain r where contr: "continuous_on UNIV r" and ontor: "range r \<subseteq> S"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5105
                  and r: "\<And>x. x \<in> S \<Longrightarrow> r x = x"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5106
    by (auto simp: retract_of_def retraction_def)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5107
  show ?thesis
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5108
  proof
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5109
    assume "bounded C"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5110
    have "connected_component_set (- S) y \<subseteq> S"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5111
    proof (rule frontier_subset_retraction)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5112
      show "bounded (connected_component_set (- S) y)"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5113
        using \<open>bounded C\<close> y by blast
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5114
      show "frontier (connected_component_set (- S) y) \<subseteq> S"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5115
        using C \<open>compact S\<close> compact_eq_bounded_closed frontier_of_components_closed_complement y by blast
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5116
      show "continuous_on (closure (connected_component_set (- S) y)) r"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5117
        by (blast intro: continuous_on_subset [OF contr])
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5118
    qed (use ontor r in auto)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5119
    with \<open>y \<notin> S\<close> show False by force
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5120
  qed
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5121
qed
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5122
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5123
lemma connected_complement_absolute_retract:
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5124
  fixes S :: "'a::euclidean_space set"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5125
  assumes S: "compact S" "AR S" and 2: "2 \<le> DIM('a)"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5126
    shows "connected(- S)"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5127
proof -
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5128
  have "S retract_of UNIV"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5129
    using S compact_AR by blast
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5130
  show ?thesis
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5131
    apply (clarsimp simp: connected_iff_connected_component_eq)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5132
    apply (rule cobounded_unique_unbounded_component [OF _ 2])
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5133
      apply (simp add: \<open>compact S\<close> compact_imp_bounded)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5134
     apply (meson ComplI S componentsI unbounded_components_complement_absolute_retract)+
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5135
    done
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5136
qed
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5137
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5138
lemma path_connected_complement_absolute_retract:
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5139
  fixes S :: "'a::euclidean_space set"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5140
  assumes "compact S" "AR S" "2 \<le> DIM('a)"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5141
    shows "path_connected(- S)"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5142
  using connected_complement_absolute_retract [OF assms]
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5143
  using \<open>compact S\<close> compact_eq_bounded_closed connected_open_path_connected by blast
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5144
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5145
theorem connected_complement_homeomorphic_convex_compact:
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5146
  fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5147
  assumes hom: "S homeomorphic T" and T: "convex T" "compact T" and 2: "2 \<le> DIM('a)"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5148
    shows "connected(- S)"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5149
proof (cases "S = {}")
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5150
  case True
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5151
  then show ?thesis
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5152
    by (simp add: connected_UNIV)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5153
next
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5154
  case False
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5155
  show ?thesis
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5156
  proof (rule connected_complement_absolute_retract)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5157
    show "compact S"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5158
      using \<open>compact T\<close> hom homeomorphic_compactness by auto
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5159
    show "AR S"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5160
      by (meson AR_ANR False \<open>convex T\<close> convex_imp_ANR convex_imp_contractible hom homeomorphic_ANR_iff_ANR homeomorphic_contractible_eq)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5161
  qed (rule 2)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5162
qed
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5163
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5164
corollary path_connected_complement_homeomorphic_convex_compact:
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5165
  fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5166
  assumes hom: "S homeomorphic T" "convex T" "compact T" "2 \<le> DIM('a)"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5167
    shows "path_connected(- S)"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5168
  using connected_complement_homeomorphic_convex_compact [OF assms]
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  5169
  using \<open>compact T\<close> compact_eq_bounded_closed connected_open_path_connected hom homeomorphic_compactness by blast
63492
a662e8139804 More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents: 63469
diff changeset
  5170
68017
e99f9b3962bf three new theorems
paulson <lp15@cam.ac.uk>
parents: 67968
diff changeset
  5171
lemma path_connected_complement_homeomorphic_interval:
e99f9b3962bf three new theorems
paulson <lp15@cam.ac.uk>
parents: 67968
diff changeset
  5172
  fixes S :: "'a::euclidean_space set"
e99f9b3962bf three new theorems
paulson <lp15@cam.ac.uk>
parents: 67968
diff changeset
  5173
  assumes "S homeomorphic cbox a b" "2 \<le> DIM('a)"
e99f9b3962bf three new theorems
paulson <lp15@cam.ac.uk>
parents: 67968
diff changeset
  5174
  shows "path_connected(-S)"
e99f9b3962bf three new theorems
paulson <lp15@cam.ac.uk>
parents: 67968
diff changeset
  5175
  using assms compact_cbox convex_box(1) path_connected_complement_homeomorphic_convex_compact by blast
e99f9b3962bf three new theorems
paulson <lp15@cam.ac.uk>
parents: 67968
diff changeset
  5176
e99f9b3962bf three new theorems
paulson <lp15@cam.ac.uk>
parents: 67968
diff changeset
  5177
lemma connected_complement_homeomorphic_interval:
e99f9b3962bf three new theorems
paulson <lp15@cam.ac.uk>
parents: 67968
diff changeset
  5178
  fixes S :: "'a::euclidean_space set"
e99f9b3962bf three new theorems
paulson <lp15@cam.ac.uk>
parents: 67968
diff changeset
  5179
  assumes "S homeomorphic cbox a b" "2 \<le> DIM('a)"
e99f9b3962bf three new theorems
paulson <lp15@cam.ac.uk>
parents: 67968
diff changeset
  5180
  shows "connected(-S)"
e99f9b3962bf three new theorems
paulson <lp15@cam.ac.uk>
parents: 67968
diff changeset
  5181
  using assms path_connected_complement_homeomorphic_interval path_connected_imp_connected by blast
e99f9b3962bf three new theorems
paulson <lp15@cam.ac.uk>
parents: 67968
diff changeset
  5182
34291
4e896680897e finite annotation on cartesian product is now implicit.
hoelzl
parents: 34289
diff changeset
  5183
end