src/HOL/Analysis/Path_Connected.thy
author paulson <lp15@cam.ac.uk>
Mon, 09 Oct 2017 15:34:23 +0100
changeset 66793 deabce3ccf1f
parent 66456 621897f47fab
child 66826 0d60d2118544
permissions -rw-r--r--
new material about connectedness, etc.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
63627
6ddb43c6b711 rename HOL-Multivariate_Analysis to HOL-Analysis.
hoelzl
parents: 63594
diff changeset
     1
(*  Title:      HOL/Analysis/Path_Connected.thy
61806
d2e62ae01cd8 Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents: 61762
diff changeset
     2
    Authors:    LC Paulson and Robert Himmelmann (TU Muenchen), based on material from HOL Light
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
     3
*)
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
     4
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
     5
section \<open>Continuous paths and path-connected sets\<close>
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
     6
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
     7
theory Path_Connected
63970
3b6a3632e754 HOL-Analysis: move Continuum_Not_Denumerable from Library
hoelzl
parents: 63967
diff changeset
     8
imports Continuous_Extension Continuum_Not_Denumerable
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
     9
begin
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
    10
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
    11
subsection \<open>Paths and Arcs\<close>
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
    12
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
    13
definition path :: "(real \<Rightarrow> 'a::topological_space) \<Rightarrow> bool"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
    14
  where "path g \<longleftrightarrow> continuous_on {0..1} g"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
    15
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
    16
definition pathstart :: "(real \<Rightarrow> 'a::topological_space) \<Rightarrow> 'a"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
    17
  where "pathstart g = g 0"
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
    18
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
    19
definition pathfinish :: "(real \<Rightarrow> 'a::topological_space) \<Rightarrow> 'a"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
    20
  where "pathfinish g = g 1"
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
    21
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
    22
definition path_image :: "(real \<Rightarrow> 'a::topological_space) \<Rightarrow> 'a set"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
    23
  where "path_image g = g ` {0 .. 1}"
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
    24
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
    25
definition reversepath :: "(real \<Rightarrow> 'a::topological_space) \<Rightarrow> real \<Rightarrow> 'a"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
    26
  where "reversepath g = (\<lambda>x. g(1 - x))"
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
    27
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
    28
definition joinpaths :: "(real \<Rightarrow> 'a::topological_space) \<Rightarrow> (real \<Rightarrow> 'a) \<Rightarrow> real \<Rightarrow> 'a"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
    29
    (infixr "+++" 75)
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
    30
  where "g1 +++ g2 = (\<lambda>x. if x \<le> 1/2 then g1 (2 * x) else g2 (2 * x - 1))"
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
    31
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
    32
definition simple_path :: "(real \<Rightarrow> 'a::topological_space) \<Rightarrow> bool"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
    33
  where "simple_path g \<longleftrightarrow>
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    34
     path g \<and> (\<forall>x\<in>{0..1}. \<forall>y\<in>{0..1}. g x = g y \<longrightarrow> x = y \<or> x = 0 \<and> y = 1 \<or> x = 1 \<and> y = 0)"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
    35
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    36
definition arc :: "(real \<Rightarrow> 'a :: topological_space) \<Rightarrow> bool"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    37
  where "arc g \<longleftrightarrow> path g \<and> inj_on g {0..1}"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
    38
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
    39
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
    40
subsection\<open>Invariance theorems\<close>
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    41
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    42
lemma path_eq: "path p \<Longrightarrow> (\<And>t. t \<in> {0..1} \<Longrightarrow> p t = q t) \<Longrightarrow> path q"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    43
  using continuous_on_eq path_def by blast
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    44
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    45
lemma path_continuous_image: "path g \<Longrightarrow> continuous_on (path_image g) f \<Longrightarrow> path(f o g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    46
  unfolding path_def path_image_def
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    47
  using continuous_on_compose by blast
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    48
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    49
lemma path_translation_eq:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    50
  fixes g :: "real \<Rightarrow> 'a :: real_normed_vector"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    51
  shows "path((\<lambda>x. a + x) o g) = path g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    52
proof -
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    53
  have g: "g = (\<lambda>x. -a + x) o ((\<lambda>x. a + x) o g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    54
    by (rule ext) simp
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    55
  show ?thesis
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    56
    unfolding path_def
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    57
    apply safe
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    58
    apply (subst g)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    59
    apply (rule continuous_on_compose)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    60
    apply (auto intro: continuous_intros)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    61
    done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    62
qed
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    63
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    64
lemma path_linear_image_eq:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    65
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    66
   assumes "linear f" "inj f"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    67
     shows "path(f o g) = path g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    68
proof -
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    69
  from linear_injective_left_inverse [OF assms]
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    70
  obtain h where h: "linear h" "h \<circ> f = id"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    71
    by blast
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    72
  then have g: "g = h o (f o g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    73
    by (metis comp_assoc id_comp)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    74
  show ?thesis
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    75
    unfolding path_def
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    76
    using h assms
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    77
    by (metis g continuous_on_compose linear_continuous_on linear_conv_bounded_linear)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    78
qed
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    79
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    80
lemma pathstart_translation: "pathstart((\<lambda>x. a + x) o g) = a + pathstart g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    81
  by (simp add: pathstart_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    82
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    83
lemma pathstart_linear_image_eq: "linear f \<Longrightarrow> pathstart(f o g) = f(pathstart g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    84
  by (simp add: pathstart_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    85
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    86
lemma pathfinish_translation: "pathfinish((\<lambda>x. a + x) o g) = a + pathfinish g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    87
  by (simp add: pathfinish_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    88
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    89
lemma pathfinish_linear_image: "linear f \<Longrightarrow> pathfinish(f o g) = f(pathfinish g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    90
  by (simp add: pathfinish_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    91
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    92
lemma path_image_translation: "path_image((\<lambda>x. a + x) o g) = (\<lambda>x. a + x) ` (path_image g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    93
  by (simp add: image_comp path_image_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    94
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    95
lemma path_image_linear_image: "linear f \<Longrightarrow> path_image(f o g) = f ` (path_image g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    96
  by (simp add: image_comp path_image_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    97
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    98
lemma reversepath_translation: "reversepath((\<lambda>x. a + x) o g) = (\<lambda>x. a + x) o reversepath g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
    99
  by (rule ext) (simp add: reversepath_def)
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   100
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   101
lemma reversepath_linear_image: "linear f \<Longrightarrow> reversepath(f o g) = f o reversepath g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   102
  by (rule ext) (simp add: reversepath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   103
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   104
lemma joinpaths_translation:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   105
    "((\<lambda>x. a + x) o g1) +++ ((\<lambda>x. a + x) o g2) = (\<lambda>x. a + x) o (g1 +++ g2)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   106
  by (rule ext) (simp add: joinpaths_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   107
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   108
lemma joinpaths_linear_image: "linear f \<Longrightarrow> (f o g1) +++ (f o g2) = f o (g1 +++ g2)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   109
  by (rule ext) (simp add: joinpaths_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   110
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   111
lemma simple_path_translation_eq:
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   112
  fixes g :: "real \<Rightarrow> 'a::euclidean_space"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   113
  shows "simple_path((\<lambda>x. a + x) o g) = simple_path g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   114
  by (simp add: simple_path_def path_translation_eq)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   115
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   116
lemma simple_path_linear_image_eq:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   117
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   118
  assumes "linear f" "inj f"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   119
    shows "simple_path(f o g) = simple_path g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   120
  using assms inj_on_eq_iff [of f]
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   121
  by (auto simp: path_linear_image_eq simple_path_def path_translation_eq)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   122
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   123
lemma arc_translation_eq:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   124
  fixes g :: "real \<Rightarrow> 'a::euclidean_space"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   125
  shows "arc((\<lambda>x. a + x) o g) = arc g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   126
  by (auto simp: arc_def inj_on_def path_translation_eq)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   127
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   128
lemma arc_linear_image_eq:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   129
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   130
   assumes "linear f" "inj f"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   131
     shows  "arc(f o g) = arc g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   132
  using assms inj_on_eq_iff [of f]
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   133
  by (auto simp: arc_def inj_on_def path_linear_image_eq)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   134
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   135
subsection\<open>Basic lemmas about paths\<close>
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   136
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
   137
lemma continuous_on_path: "path f \<Longrightarrow> t \<subseteq> {0..1} \<Longrightarrow> continuous_on t f"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
   138
  using continuous_on_subset path_def by blast
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
   139
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   140
lemma arc_imp_simple_path: "arc g \<Longrightarrow> simple_path g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   141
  by (simp add: arc_def inj_on_def simple_path_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   142
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   143
lemma arc_imp_path: "arc g \<Longrightarrow> path g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   144
  using arc_def by blast
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   145
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
   146
lemma arc_imp_inj_on: "arc g \<Longrightarrow> inj_on g {0..1}"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
   147
  by (auto simp: arc_def)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
   148
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   149
lemma simple_path_imp_path: "simple_path g \<Longrightarrow> path g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   150
  using simple_path_def by blast
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   151
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   152
lemma simple_path_cases: "simple_path g \<Longrightarrow> arc g \<or> pathfinish g = pathstart g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   153
  unfolding simple_path_def arc_def inj_on_def pathfinish_def pathstart_def
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   154
  by (force)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   155
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   156
lemma simple_path_imp_arc: "simple_path g \<Longrightarrow> pathfinish g \<noteq> pathstart g \<Longrightarrow> arc g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   157
  using simple_path_cases by auto
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   158
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   159
lemma arc_distinct_ends: "arc g \<Longrightarrow> pathfinish g \<noteq> pathstart g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   160
  unfolding arc_def inj_on_def pathfinish_def pathstart_def
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   161
  by fastforce
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   162
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   163
lemma arc_simple_path: "arc g \<longleftrightarrow> simple_path g \<and> pathfinish g \<noteq> pathstart g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   164
  using arc_distinct_ends arc_imp_simple_path simple_path_cases by blast
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   165
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   166
lemma simple_path_eq_arc: "pathfinish g \<noteq> pathstart g \<Longrightarrow> (simple_path g = arc g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   167
  by (simp add: arc_simple_path)
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   168
66793
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
   169
lemma path_image_const [simp]: "path_image (\<lambda>t. a) = {a}"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
   170
  by (force simp: path_image_def)
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
   171
60974
6a6f15d8fbc4 New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents: 60809
diff changeset
   172
lemma path_image_nonempty [simp]: "path_image g \<noteq> {}"
56188
0268784f60da use cbox to relax class constraints
immler
parents: 53640
diff changeset
   173
  unfolding path_image_def image_is_empty box_eq_empty
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   174
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   175
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   176
lemma pathstart_in_path_image[intro]: "pathstart g \<in> path_image g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   177
  unfolding pathstart_def path_image_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   178
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   179
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   180
lemma pathfinish_in_path_image[intro]: "pathfinish g \<in> path_image g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   181
  unfolding pathfinish_def path_image_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   182
  by auto
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   183
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   184
lemma connected_path_image[intro]: "path g \<Longrightarrow> connected (path_image g)"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   185
  unfolding path_def path_image_def
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   186
  using connected_continuous_image connected_Icc by blast
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   187
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   188
lemma compact_path_image[intro]: "path g \<Longrightarrow> compact (path_image g)"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   189
  unfolding path_def path_image_def
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   190
  using compact_continuous_image connected_Icc by blast
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   191
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   192
lemma reversepath_reversepath[simp]: "reversepath (reversepath g) = g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   193
  unfolding reversepath_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   194
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   195
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   196
lemma pathstart_reversepath[simp]: "pathstart (reversepath g) = pathfinish g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   197
  unfolding pathstart_def reversepath_def pathfinish_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   198
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   199
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   200
lemma pathfinish_reversepath[simp]: "pathfinish (reversepath g) = pathstart g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   201
  unfolding pathstart_def reversepath_def pathfinish_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   202
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   203
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   204
lemma pathstart_join[simp]: "pathstart (g1 +++ g2) = pathstart g1"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   205
  unfolding pathstart_def joinpaths_def pathfinish_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   206
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   207
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   208
lemma pathfinish_join[simp]: "pathfinish (g1 +++ g2) = pathfinish g2"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   209
  unfolding pathstart_def joinpaths_def pathfinish_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   210
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   211
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   212
lemma path_image_reversepath[simp]: "path_image (reversepath g) = path_image g"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   213
proof -
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   214
  have *: "\<And>g. path_image (reversepath g) \<subseteq> path_image g"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   215
    unfolding path_image_def subset_eq reversepath_def Ball_def image_iff
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   216
    by force
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   217
  show ?thesis
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   218
    using *[of g] *[of "reversepath g"]
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   219
    unfolding reversepath_reversepath
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   220
    by auto
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   221
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   222
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   223
lemma path_reversepath [simp]: "path (reversepath g) \<longleftrightarrow> path g"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   224
proof -
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   225
  have *: "\<And>g. path g \<Longrightarrow> path (reversepath g)"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   226
    unfolding path_def reversepath_def
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   227
    apply (rule continuous_on_compose[unfolded o_def, of _ "\<lambda>x. 1 - x"])
56371
fb9ae0727548 extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents: 56188
diff changeset
   228
    apply (intro continuous_intros)
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   229
    apply (rule continuous_on_subset[of "{0..1}"])
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   230
    apply assumption
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   231
    apply auto
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   232
    done
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   233
  show ?thesis
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   234
    using *[of "reversepath g"] *[of g]
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   235
    unfolding reversepath_reversepath
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   236
    by (rule iffI)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   237
qed
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   238
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   239
lemma arc_reversepath:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   240
  assumes "arc g" shows "arc(reversepath g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   241
proof -
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   242
  have injg: "inj_on g {0..1}"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   243
    using assms
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   244
    by (simp add: arc_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   245
  have **: "\<And>x y::real. 1-x = 1-y \<Longrightarrow> x = y"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   246
    by simp
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   247
  show ?thesis
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   248
    apply (auto simp: arc_def inj_on_def path_reversepath)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   249
    apply (simp add: arc_imp_path assms)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   250
    apply (rule **)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   251
    apply (rule inj_onD [OF injg])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   252
    apply (auto simp: reversepath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   253
    done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   254
qed
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   255
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   256
lemma simple_path_reversepath: "simple_path g \<Longrightarrow> simple_path (reversepath g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   257
  apply (simp add: simple_path_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   258
  apply (force simp: reversepath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   259
  done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   260
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   261
lemmas reversepath_simps =
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   262
  path_reversepath path_image_reversepath pathstart_reversepath pathfinish_reversepath
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   263
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   264
lemma path_join[simp]:
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   265
  assumes "pathfinish g1 = pathstart g2"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   266
  shows "path (g1 +++ g2) \<longleftrightarrow> path g1 \<and> path g2"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   267
  unfolding path_def pathfinish_def pathstart_def
51478
270b21f3ae0a move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents: 50935
diff changeset
   268
proof safe
270b21f3ae0a move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents: 50935
diff changeset
   269
  assume cont: "continuous_on {0..1} (g1 +++ g2)"
270b21f3ae0a move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents: 50935
diff changeset
   270
  have g1: "continuous_on {0..1} g1 \<longleftrightarrow> continuous_on {0..1} ((g1 +++ g2) \<circ> (\<lambda>x. x / 2))"
270b21f3ae0a move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents: 50935
diff changeset
   271
    by (intro continuous_on_cong refl) (auto simp: joinpaths_def)
270b21f3ae0a move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents: 50935
diff changeset
   272
  have g2: "continuous_on {0..1} g2 \<longleftrightarrow> continuous_on {0..1} ((g1 +++ g2) \<circ> (\<lambda>x. x / 2 + 1/2))"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   273
    using assms
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   274
    by (intro continuous_on_cong refl) (auto simp: joinpaths_def pathfinish_def pathstart_def)
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   275
  show "continuous_on {0..1} g1" and "continuous_on {0..1} g2"
51481
ef949192e5d6 move continuous_on_inv to HOL image (simplifies isCont_inverse_function)
hoelzl
parents: 51478
diff changeset
   276
    unfolding g1 g2
56371
fb9ae0727548 extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents: 56188
diff changeset
   277
    by (auto intro!: continuous_intros continuous_on_subset[OF cont] simp del: o_apply)
51478
270b21f3ae0a move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents: 50935
diff changeset
   278
next
270b21f3ae0a move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents: 50935
diff changeset
   279
  assume g1g2: "continuous_on {0..1} g1" "continuous_on {0..1} g2"
270b21f3ae0a move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents: 50935
diff changeset
   280
  have 01: "{0 .. 1} = {0..1/2} \<union> {1/2 .. 1::real}"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   281
    by auto
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   282
  {
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   283
    fix x :: real
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   284
    assume "0 \<le> x" and "x \<le> 1"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   285
    then have "x \<in> (\<lambda>x. x * 2) ` {0..1 / 2}"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   286
      by (intro image_eqI[where x="x/2"]) auto
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   287
  }
51478
270b21f3ae0a move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents: 50935
diff changeset
   288
  note 1 = this
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   289
  {
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   290
    fix x :: real
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   291
    assume "0 \<le> x" and "x \<le> 1"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   292
    then have "x \<in> (\<lambda>x. x * 2 - 1) ` {1 / 2..1}"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   293
      by (intro image_eqI[where x="x/2 + 1/2"]) auto
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   294
  }
51478
270b21f3ae0a move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents: 50935
diff changeset
   295
  note 2 = this
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   296
  show "continuous_on {0..1} (g1 +++ g2)"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   297
    using assms
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   298
    unfolding joinpaths_def 01
56371
fb9ae0727548 extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents: 56188
diff changeset
   299
    apply (intro continuous_on_cases closed_atLeastAtMost g1g2[THEN continuous_on_compose2] continuous_intros)
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   300
    apply (auto simp: field_simps pathfinish_def pathstart_def intro!: 1 2)
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   301
    done
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   302
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   303
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   304
section \<open>Path Images\<close>
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   305
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   306
lemma bounded_path_image: "path g \<Longrightarrow> bounded(path_image g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   307
  by (simp add: compact_imp_bounded compact_path_image)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   308
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   309
lemma closed_path_image:
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   310
  fixes g :: "real \<Rightarrow> 'a::t2_space"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   311
  shows "path g \<Longrightarrow> closed(path_image g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   312
  by (metis compact_path_image compact_imp_closed)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   313
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   314
lemma connected_simple_path_image: "simple_path g \<Longrightarrow> connected(path_image g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   315
  by (metis connected_path_image simple_path_imp_path)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   316
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   317
lemma compact_simple_path_image: "simple_path g \<Longrightarrow> compact(path_image g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   318
  by (metis compact_path_image simple_path_imp_path)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   319
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   320
lemma bounded_simple_path_image: "simple_path g \<Longrightarrow> bounded(path_image g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   321
  by (metis bounded_path_image simple_path_imp_path)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   322
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   323
lemma closed_simple_path_image:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   324
  fixes g :: "real \<Rightarrow> 'a::t2_space"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   325
  shows "simple_path g \<Longrightarrow> closed(path_image g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   326
  by (metis closed_path_image simple_path_imp_path)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   327
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   328
lemma connected_arc_image: "arc g \<Longrightarrow> connected(path_image g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   329
  by (metis connected_path_image arc_imp_path)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   330
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   331
lemma compact_arc_image: "arc g \<Longrightarrow> compact(path_image g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   332
  by (metis compact_path_image arc_imp_path)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   333
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   334
lemma bounded_arc_image: "arc g \<Longrightarrow> bounded(path_image g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   335
  by (metis bounded_path_image arc_imp_path)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   336
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   337
lemma closed_arc_image:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   338
  fixes g :: "real \<Rightarrow> 'a::t2_space"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   339
  shows "arc g \<Longrightarrow> closed(path_image g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   340
  by (metis closed_path_image arc_imp_path)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   341
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   342
lemma path_image_join_subset: "path_image (g1 +++ g2) \<subseteq> path_image g1 \<union> path_image g2"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   343
  unfolding path_image_def joinpaths_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   344
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   345
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   346
lemma subset_path_image_join:
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   347
  assumes "path_image g1 \<subseteq> s"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   348
    and "path_image g2 \<subseteq> s"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   349
  shows "path_image (g1 +++ g2) \<subseteq> s"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   350
  using path_image_join_subset[of g1 g2] and assms
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   351
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   352
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   353
lemma path_image_join:
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   354
    "pathfinish g1 = pathstart g2 \<Longrightarrow> path_image(g1 +++ g2) = path_image g1 \<union> path_image g2"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   355
  apply (rule subset_antisym [OF path_image_join_subset])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   356
  apply (auto simp: pathfinish_def pathstart_def path_image_def joinpaths_def image_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   357
  apply (drule sym)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   358
  apply (rule_tac x="xa/2" in bexI, auto)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   359
  apply (rule ccontr)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   360
  apply (drule_tac x="(xa+1)/2" in bspec)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   361
  apply (auto simp: field_simps)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   362
  apply (drule_tac x="1/2" in bspec, auto)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   363
  done
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   364
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   365
lemma not_in_path_image_join:
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   366
  assumes "x \<notin> path_image g1"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   367
    and "x \<notin> path_image g2"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   368
  shows "x \<notin> path_image (g1 +++ g2)"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   369
  using assms and path_image_join_subset[of g1 g2]
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   370
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   371
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   372
lemma pathstart_compose: "pathstart(f o p) = f(pathstart p)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   373
  by (simp add: pathstart_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   374
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   375
lemma pathfinish_compose: "pathfinish(f o p) = f(pathfinish p)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   376
  by (simp add: pathfinish_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   377
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   378
lemma path_image_compose: "path_image (f o p) = f ` (path_image p)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   379
  by (simp add: image_comp path_image_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   380
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   381
lemma path_compose_join: "f o (p +++ q) = (f o p) +++ (f o q)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   382
  by (rule ext) (simp add: joinpaths_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   383
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   384
lemma path_compose_reversepath: "f o reversepath p = reversepath(f o p)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   385
  by (rule ext) (simp add: reversepath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   386
61762
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
   387
lemma joinpaths_eq:
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   388
  "(\<And>t. t \<in> {0..1} \<Longrightarrow> p t = p' t) \<Longrightarrow>
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   389
   (\<And>t. t \<in> {0..1} \<Longrightarrow> q t = q' t)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   390
   \<Longrightarrow>  t \<in> {0..1} \<Longrightarrow> (p +++ q) t = (p' +++ q') t"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   391
  by (auto simp: joinpaths_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   392
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   393
lemma simple_path_inj_on: "simple_path g \<Longrightarrow> inj_on g {0<..<1}"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   394
  by (auto simp: simple_path_def path_image_def inj_on_def less_eq_real_def Ball_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   395
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   396
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   397
subsection\<open>Simple paths with the endpoints removed\<close>
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   398
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   399
lemma simple_path_endless:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   400
    "simple_path c \<Longrightarrow> path_image c - {pathstart c,pathfinish c} = c ` {0<..<1}"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   401
  apply (auto simp: simple_path_def path_image_def pathstart_def pathfinish_def Ball_def Bex_def image_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   402
  apply (metis eq_iff le_less_linear)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   403
  apply (metis leD linear)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   404
  using less_eq_real_def zero_le_one apply blast
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   405
  using less_eq_real_def zero_le_one apply blast
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   406
  done
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   407
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   408
lemma connected_simple_path_endless:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   409
    "simple_path c \<Longrightarrow> connected(path_image c - {pathstart c,pathfinish c})"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   410
apply (simp add: simple_path_endless)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   411
apply (rule connected_continuous_image)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   412
apply (meson continuous_on_subset greaterThanLessThan_subseteq_atLeastAtMost_iff le_numeral_extra(3) le_numeral_extra(4) path_def simple_path_imp_path)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   413
by auto
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   414
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   415
lemma nonempty_simple_path_endless:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   416
    "simple_path c \<Longrightarrow> path_image c - {pathstart c,pathfinish c} \<noteq> {}"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   417
  by (simp add: simple_path_endless)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   418
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   419
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   420
subsection\<open>The operations on paths\<close>
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   421
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   422
lemma path_image_subset_reversepath: "path_image(reversepath g) \<le> path_image g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   423
  by (auto simp: path_image_def reversepath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   424
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   425
lemma path_imp_reversepath: "path g \<Longrightarrow> path(reversepath g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   426
  apply (auto simp: path_def reversepath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   427
  using continuous_on_compose [of "{0..1}" "\<lambda>x. 1 - x" g]
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   428
  apply (auto simp: continuous_on_op_minus)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   429
  done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   430
61204
3e491e34a62e new lemmas and movement of lemmas into place
paulson
parents: 60974
diff changeset
   431
lemma half_bounded_equal: "1 \<le> x * 2 \<Longrightarrow> x * 2 \<le> 1 \<longleftrightarrow> x = (1/2::real)"
3e491e34a62e new lemmas and movement of lemmas into place
paulson
parents: 60974
diff changeset
   432
  by simp
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   433
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   434
lemma continuous_on_joinpaths:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   435
  assumes "continuous_on {0..1} g1" "continuous_on {0..1} g2" "pathfinish g1 = pathstart g2"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   436
    shows "continuous_on {0..1} (g1 +++ g2)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   437
proof -
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   438
  have *: "{0..1::real} = {0..1/2} \<union> {1/2..1}"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   439
    by auto
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   440
  have gg: "g2 0 = g1 1"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   441
    by (metis assms(3) pathfinish_def pathstart_def)
61204
3e491e34a62e new lemmas and movement of lemmas into place
paulson
parents: 60974
diff changeset
   442
  have 1: "continuous_on {0..1/2} (g1 +++ g2)"
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   443
    apply (rule continuous_on_eq [of _ "g1 o (\<lambda>x. 2*x)"])
61204
3e491e34a62e new lemmas and movement of lemmas into place
paulson
parents: 60974
diff changeset
   444
    apply (rule continuous_intros | simp add: joinpaths_def assms)+
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   445
    done
61204
3e491e34a62e new lemmas and movement of lemmas into place
paulson
parents: 60974
diff changeset
   446
  have "continuous_on {1/2..1} (g2 o (\<lambda>x. 2*x-1))"
3e491e34a62e new lemmas and movement of lemmas into place
paulson
parents: 60974
diff changeset
   447
    apply (rule continuous_on_subset [of "{1/2..1}"])
3e491e34a62e new lemmas and movement of lemmas into place
paulson
parents: 60974
diff changeset
   448
    apply (rule continuous_intros | simp add: image_affinity_atLeastAtMost_diff assms)+
3e491e34a62e new lemmas and movement of lemmas into place
paulson
parents: 60974
diff changeset
   449
    done
3e491e34a62e new lemmas and movement of lemmas into place
paulson
parents: 60974
diff changeset
   450
  then have 2: "continuous_on {1/2..1} (g1 +++ g2)"
3e491e34a62e new lemmas and movement of lemmas into place
paulson
parents: 60974
diff changeset
   451
    apply (rule continuous_on_eq [of "{1/2..1}" "g2 o (\<lambda>x. 2*x-1)"])
3e491e34a62e new lemmas and movement of lemmas into place
paulson
parents: 60974
diff changeset
   452
    apply (rule assms continuous_intros | simp add: joinpaths_def mult.commute half_bounded_equal gg)+
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   453
    done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   454
  show ?thesis
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   455
    apply (subst *)
62397
5ae24f33d343 Substantial new material for multivariate analysis. Also removal of some duplicates.
paulson <lp15@cam.ac.uk>
parents: 62381
diff changeset
   456
    apply (rule continuous_on_closed_Un)
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   457
    using 1 2
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   458
    apply auto
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   459
    done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   460
qed
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   461
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   462
lemma path_join_imp: "\<lbrakk>path g1; path g2; pathfinish g1 = pathstart g2\<rbrakk> \<Longrightarrow> path(g1 +++ g2)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   463
  by (simp add: path_join)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   464
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   465
lemma simple_path_join_loop:
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   466
  assumes "arc g1" "arc g2"
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   467
          "pathfinish g1 = pathstart g2"  "pathfinish g2 = pathstart g1"
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   468
          "path_image g1 \<inter> path_image g2 \<subseteq> {pathstart g1, pathstart g2}"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   469
  shows "simple_path(g1 +++ g2)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   470
proof -
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   471
  have injg1: "inj_on g1 {0..1}"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   472
    using assms
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   473
    by (simp add: arc_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   474
  have injg2: "inj_on g2 {0..1}"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   475
    using assms
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   476
    by (simp add: arc_def)
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   477
  have g12: "g1 1 = g2 0"
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   478
   and g21: "g2 1 = g1 0"
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   479
   and sb:  "g1 ` {0..1} \<inter> g2 ` {0..1} \<subseteq> {g1 0, g2 0}"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   480
    using assms
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   481
    by (simp_all add: arc_def pathfinish_def pathstart_def path_image_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   482
  { fix x and y::real
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   483
    assume xyI: "x = 1 \<longrightarrow> y \<noteq> 0"
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   484
       and xy: "x \<le> 1" "0 \<le> y" " y * 2 \<le> 1" "\<not> x * 2 \<le> 1" "g2 (2 * x - 1) = g1 (2 * y)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   485
    have g1im: "g1 (2 * y) \<in> g1 ` {0..1} \<inter> g2 ` {0..1}"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   486
      using xy
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   487
      apply simp
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   488
      apply (rule_tac x="2 * x - 1" in image_eqI, auto)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   489
      done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   490
    have False
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   491
      using subsetD [OF sb g1im] xy
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   492
      apply auto
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   493
      apply (drule inj_onD [OF injg1])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   494
      using g21 [symmetric] xyI
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   495
      apply (auto dest: inj_onD [OF injg2])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   496
      done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   497
   } note * = this
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   498
  { fix x and y::real
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   499
    assume xy: "y \<le> 1" "0 \<le> x" "\<not> y * 2 \<le> 1" "x * 2 \<le> 1" "g1 (2 * x) = g2 (2 * y - 1)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   500
    have g1im: "g1 (2 * x) \<in> g1 ` {0..1} \<inter> g2 ` {0..1}"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   501
      using xy
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   502
      apply simp
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   503
      apply (rule_tac x="2 * x" in image_eqI, auto)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   504
      done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   505
    have "x = 0 \<and> y = 1"
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   506
      using subsetD [OF sb g1im] xy
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   507
      apply auto
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   508
      apply (force dest: inj_onD [OF injg1])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   509
      using  g21 [symmetric]
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   510
      apply (auto dest: inj_onD [OF injg2])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   511
      done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   512
   } note ** = this
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   513
  show ?thesis
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   514
    using assms
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   515
    apply (simp add: arc_def simple_path_def path_join, clarify)
62390
842917225d56 more canonical names
nipkow
parents: 62087
diff changeset
   516
    apply (simp add: joinpaths_def split: if_split_asm)
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   517
    apply (force dest: inj_onD [OF injg1])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   518
    apply (metis *)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   519
    apply (metis **)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   520
    apply (force dest: inj_onD [OF injg2])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   521
    done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   522
qed
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   523
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   524
lemma arc_join:
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   525
  assumes "arc g1" "arc g2"
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   526
          "pathfinish g1 = pathstart g2"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   527
          "path_image g1 \<inter> path_image g2 \<subseteq> {pathstart g2}"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   528
    shows "arc(g1 +++ g2)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   529
proof -
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   530
  have injg1: "inj_on g1 {0..1}"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   531
    using assms
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   532
    by (simp add: arc_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   533
  have injg2: "inj_on g2 {0..1}"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   534
    using assms
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   535
    by (simp add: arc_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   536
  have g11: "g1 1 = g2 0"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   537
   and sb:  "g1 ` {0..1} \<inter> g2 ` {0..1} \<subseteq> {g2 0}"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   538
    using assms
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   539
    by (simp_all add: arc_def pathfinish_def pathstart_def path_image_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   540
  { fix x and y::real
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   541
    assume xy: "x \<le> 1" "0 \<le> y" " y * 2 \<le> 1" "\<not> x * 2 \<le> 1" "g2 (2 * x - 1) = g1 (2 * y)"
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   542
    have g1im: "g1 (2 * y) \<in> g1 ` {0..1} \<inter> g2 ` {0..1}"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   543
      using xy
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   544
      apply simp
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   545
      apply (rule_tac x="2 * x - 1" in image_eqI, auto)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   546
      done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   547
    have False
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   548
      using subsetD [OF sb g1im] xy
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   549
      by (auto dest: inj_onD [OF injg2])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   550
   } note * = this
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   551
  show ?thesis
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   552
    apply (simp add: arc_def inj_on_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   553
    apply (clarsimp simp add: arc_imp_path assms path_join)
62390
842917225d56 more canonical names
nipkow
parents: 62087
diff changeset
   554
    apply (simp add: joinpaths_def split: if_split_asm)
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   555
    apply (force dest: inj_onD [OF injg1])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   556
    apply (metis *)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   557
    apply (metis *)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   558
    apply (force dest: inj_onD [OF injg2])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   559
    done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   560
qed
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   561
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   562
lemma reversepath_joinpaths:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   563
    "pathfinish g1 = pathstart g2 \<Longrightarrow> reversepath(g1 +++ g2) = reversepath g2 +++ reversepath g1"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   564
  unfolding reversepath_def pathfinish_def pathstart_def joinpaths_def
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   565
  by (rule ext) (auto simp: mult.commute)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   566
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   567
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   568
subsection\<open>Some reversed and "if and only if" versions of joining theorems\<close>
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   569
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   570
lemma path_join_path_ends:
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   571
  fixes g1 :: "real \<Rightarrow> 'a::metric_space"
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   572
  assumes "path(g1 +++ g2)" "path g2"
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   573
    shows "pathfinish g1 = pathstart g2"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   574
proof (rule ccontr)
63040
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 63016
diff changeset
   575
  define e where "e = dist (g1 1) (g2 0)"
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   576
  assume Neg: "pathfinish g1 \<noteq> pathstart g2"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   577
  then have "0 < dist (pathfinish g1) (pathstart g2)"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   578
    by auto
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   579
  then have "e > 0"
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   580
    by (metis e_def pathfinish_def pathstart_def)
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   581
  then obtain d1 where "d1 > 0"
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   582
       and d1: "\<And>x'. \<lbrakk>x'\<in>{0..1}; norm x' < d1\<rbrakk> \<Longrightarrow> dist (g2 x') (g2 0) < e/2"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   583
    using assms(2) unfolding path_def continuous_on_iff
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   584
    apply (drule_tac x=0 in bspec, simp)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   585
    by (metis half_gt_zero_iff norm_conv_dist)
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   586
  obtain d2 where "d2 > 0"
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   587
       and d2: "\<And>x'. \<lbrakk>x'\<in>{0..1}; dist x' (1/2) < d2\<rbrakk>
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   588
                      \<Longrightarrow> dist ((g1 +++ g2) x') (g1 1) < e/2"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   589
    using assms(1) \<open>e > 0\<close> unfolding path_def continuous_on_iff
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   590
    apply (drule_tac x="1/2" in bspec, simp)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   591
    apply (drule_tac x="e/2" in spec)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   592
    apply (force simp: joinpaths_def)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   593
    done
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   594
  have int01_1: "min (1/2) (min d1 d2) / 2 \<in> {0..1}"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   595
    using \<open>d1 > 0\<close> \<open>d2 > 0\<close> by (simp add: min_def)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   596
  have dist1: "norm (min (1 / 2) (min d1 d2) / 2) < d1"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   597
    using \<open>d1 > 0\<close> \<open>d2 > 0\<close> by (simp add: min_def dist_norm)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   598
  have int01_2: "1/2 + min (1/2) (min d1 d2) / 4 \<in> {0..1}"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   599
    using \<open>d1 > 0\<close> \<open>d2 > 0\<close> by (simp add: min_def)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   600
  have dist2: "dist (1 / 2 + min (1 / 2) (min d1 d2) / 4) (1 / 2) < d2"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   601
    using \<open>d1 > 0\<close> \<open>d2 > 0\<close> by (simp add: min_def dist_norm)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   602
  have [simp]: "~ min (1 / 2) (min d1 d2) \<le> 0"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   603
    using \<open>d1 > 0\<close> \<open>d2 > 0\<close> by (simp add: min_def)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   604
  have "dist (g2 (min (1 / 2) (min d1 d2) / 2)) (g1 1) < e/2"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   605
       "dist (g2 (min (1 / 2) (min d1 d2) / 2)) (g2 0) < e/2"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   606
    using d1 [OF int01_1 dist1] d2 [OF int01_2 dist2] by (simp_all add: joinpaths_def)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   607
  then have "dist (g1 1) (g2 0) < e/2 + e/2"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   608
    using dist_triangle_half_r e_def by blast
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   609
  then show False
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   610
    by (simp add: e_def [symmetric])
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   611
qed
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   612
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   613
lemma path_join_eq [simp]:
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   614
  fixes g1 :: "real \<Rightarrow> 'a::metric_space"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   615
  assumes "path g1" "path g2"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   616
    shows "path(g1 +++ g2) \<longleftrightarrow> pathfinish g1 = pathstart g2"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   617
  using assms by (metis path_join_path_ends path_join_imp)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   618
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   619
lemma simple_path_joinE:
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   620
  assumes "simple_path(g1 +++ g2)" and "pathfinish g1 = pathstart g2"
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   621
  obtains "arc g1" "arc g2"
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   622
          "path_image g1 \<inter> path_image g2 \<subseteq> {pathstart g1, pathstart g2}"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   623
proof -
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   624
  have *: "\<And>x y. \<lbrakk>0 \<le> x; x \<le> 1; 0 \<le> y; y \<le> 1; (g1 +++ g2) x = (g1 +++ g2) y\<rbrakk>
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   625
               \<Longrightarrow> x = y \<or> x = 0 \<and> y = 1 \<or> x = 1 \<and> y = 0"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   626
    using assms by (simp add: simple_path_def)
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   627
  have "path g1"
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   628
    using assms path_join simple_path_imp_path by blast
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   629
  moreover have "inj_on g1 {0..1}"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   630
  proof (clarsimp simp: inj_on_def)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   631
    fix x y
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   632
    assume "g1 x = g1 y" "0 \<le> x" "x \<le> 1" "0 \<le> y" "y \<le> 1"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   633
    then show "x = y"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   634
      using * [of "x/2" "y/2"] by (simp add: joinpaths_def split_ifs)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   635
  qed
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   636
  ultimately have "arc g1"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   637
    using assms  by (simp add: arc_def)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   638
  have [simp]: "g2 0 = g1 1"
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   639
    using assms by (metis pathfinish_def pathstart_def)
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   640
  have "path g2"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   641
    using assms path_join simple_path_imp_path by blast
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   642
  moreover have "inj_on g2 {0..1}"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   643
  proof (clarsimp simp: inj_on_def)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   644
    fix x y
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   645
    assume "g2 x = g2 y" "0 \<le> x" "x \<le> 1" "0 \<le> y" "y \<le> 1"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   646
    then show "x = y"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   647
      using * [of "(x + 1) / 2" "(y + 1) / 2"]
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   648
      by (force simp: joinpaths_def split_ifs divide_simps)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   649
  qed
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   650
  ultimately have "arc g2"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   651
    using assms  by (simp add: arc_def)
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   652
  have "g2 y = g1 0 \<or> g2 y = g1 1"
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   653
       if "g1 x = g2 y" "0 \<le> x" "x \<le> 1" "0 \<le> y" "y \<le> 1" for x y
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   654
      using * [of "x / 2" "(y + 1) / 2"] that
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   655
      by (auto simp: joinpaths_def split_ifs divide_simps)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   656
  then have "path_image g1 \<inter> path_image g2 \<subseteq> {pathstart g1, pathstart g2}"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   657
    by (fastforce simp: pathstart_def pathfinish_def path_image_def)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   658
  with \<open>arc g1\<close> \<open>arc g2\<close> show ?thesis using that by blast
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   659
qed
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   660
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   661
lemma simple_path_join_loop_eq:
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   662
  assumes "pathfinish g2 = pathstart g1" "pathfinish g1 = pathstart g2"
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   663
    shows "simple_path(g1 +++ g2) \<longleftrightarrow>
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   664
             arc g1 \<and> arc g2 \<and> path_image g1 \<inter> path_image g2 \<subseteq> {pathstart g1, pathstart g2}"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   665
by (metis assms simple_path_joinE simple_path_join_loop)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   666
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   667
lemma arc_join_eq:
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   668
  assumes "pathfinish g1 = pathstart g2"
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   669
    shows "arc(g1 +++ g2) \<longleftrightarrow>
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   670
           arc g1 \<and> arc g2 \<and> path_image g1 \<inter> path_image g2 \<subseteq> {pathstart g2}"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   671
           (is "?lhs = ?rhs")
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   672
proof
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   673
  assume ?lhs
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   674
  then have "simple_path(g1 +++ g2)" by (rule arc_imp_simple_path)
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   675
  then have *: "\<And>x y. \<lbrakk>0 \<le> x; x \<le> 1; 0 \<le> y; y \<le> 1; (g1 +++ g2) x = (g1 +++ g2) y\<rbrakk>
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   676
               \<Longrightarrow> x = y \<or> x = 0 \<and> y = 1 \<or> x = 1 \<and> y = 0"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   677
    using assms by (simp add: simple_path_def)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   678
  have False if "g1 0 = g2 u" "0 \<le> u" "u \<le> 1" for u
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   679
    using * [of 0 "(u + 1) / 2"] that assms arc_distinct_ends [OF \<open>?lhs\<close>]
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   680
    by (auto simp: joinpaths_def pathstart_def pathfinish_def split_ifs divide_simps)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   681
  then have n1: "~ (pathstart g1 \<in> path_image g2)"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   682
    unfolding pathstart_def path_image_def
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   683
    using atLeastAtMost_iff by blast
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   684
  show ?rhs using \<open>?lhs\<close>
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   685
    apply (rule simple_path_joinE [OF arc_imp_simple_path assms])
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   686
    using n1 by force
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   687
next
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   688
  assume ?rhs then show ?lhs
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   689
    using assms
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   690
    by (fastforce simp: pathfinish_def pathstart_def intro!: arc_join)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   691
qed
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   692
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   693
lemma arc_join_eq_alt:
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   694
        "pathfinish g1 = pathstart g2
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   695
        \<Longrightarrow> (arc(g1 +++ g2) \<longleftrightarrow>
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   696
             arc g1 \<and> arc g2 \<and>
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   697
             path_image g1 \<inter> path_image g2 = {pathstart g2})"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   698
using pathfinish_in_path_image by (fastforce simp: arc_join_eq)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   699
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   700
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   701
subsection\<open>The joining of paths is associative\<close>
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   702
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   703
lemma path_assoc:
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   704
    "\<lbrakk>pathfinish p = pathstart q; pathfinish q = pathstart r\<rbrakk>
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   705
     \<Longrightarrow> path(p +++ (q +++ r)) \<longleftrightarrow> path((p +++ q) +++ r)"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   706
by simp
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   707
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   708
lemma simple_path_assoc:
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   709
  assumes "pathfinish p = pathstart q" "pathfinish q = pathstart r"
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   710
    shows "simple_path (p +++ (q +++ r)) \<longleftrightarrow> simple_path ((p +++ q) +++ r)"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   711
proof (cases "pathstart p = pathfinish r")
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   712
  case True show ?thesis
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   713
  proof
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   714
    assume "simple_path (p +++ q +++ r)"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   715
    with assms True show "simple_path ((p +++ q) +++ r)"
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   716
      by (fastforce simp add: simple_path_join_loop_eq arc_join_eq path_image_join
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   717
                    dest: arc_distinct_ends [of r])
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   718
  next
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   719
    assume 0: "simple_path ((p +++ q) +++ r)"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   720
    with assms True have q: "pathfinish r \<notin> path_image q"
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   721
      using arc_distinct_ends
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   722
      by (fastforce simp add: simple_path_join_loop_eq arc_join_eq path_image_join)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   723
    have "pathstart r \<notin> path_image p"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   724
      using assms
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   725
      by (metis 0 IntI arc_distinct_ends arc_join_eq_alt empty_iff insert_iff
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   726
              pathfinish_in_path_image pathfinish_join simple_path_joinE)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   727
    with assms 0 q True show "simple_path (p +++ q +++ r)"
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   728
      by (auto simp: simple_path_join_loop_eq arc_join_eq path_image_join
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   729
               dest!: subsetD [OF _ IntI])
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   730
  qed
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   731
next
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   732
  case False
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   733
  { fix x :: 'a
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   734
    assume a: "path_image p \<inter> path_image q \<subseteq> {pathstart q}"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   735
              "(path_image p \<union> path_image q) \<inter> path_image r \<subseteq> {pathstart r}"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   736
              "x \<in> path_image p" "x \<in> path_image r"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   737
    have "pathstart r \<in> path_image q"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   738
      by (metis assms(2) pathfinish_in_path_image)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   739
    with a have "x = pathstart q"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   740
      by blast
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   741
  }
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   742
  with False assms show ?thesis
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   743
    by (auto simp: simple_path_eq_arc simple_path_join_loop_eq arc_join_eq path_image_join)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   744
qed
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   745
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
   746
lemma arc_assoc:
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   747
     "\<lbrakk>pathfinish p = pathstart q; pathfinish q = pathstart r\<rbrakk>
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   748
      \<Longrightarrow> arc(p +++ (q +++ r)) \<longleftrightarrow> arc((p +++ q) +++ r)"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   749
by (simp add: arc_simple_path simple_path_assoc)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   750
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
   751
subsubsection\<open>Symmetry and loops\<close>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
   752
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
   753
lemma path_sym:
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
   754
    "\<lbrakk>pathfinish p = pathstart q; pathfinish q = pathstart p\<rbrakk> \<Longrightarrow> path(p +++ q) \<longleftrightarrow> path(q +++ p)"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
   755
  by auto
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
   756
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
   757
lemma simple_path_sym:
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
   758
    "\<lbrakk>pathfinish p = pathstart q; pathfinish q = pathstart p\<rbrakk>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
   759
     \<Longrightarrow> simple_path(p +++ q) \<longleftrightarrow> simple_path(q +++ p)"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
   760
by (metis (full_types) inf_commute insert_commute simple_path_joinE simple_path_join_loop)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
   761
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
   762
lemma path_image_sym:
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
   763
    "\<lbrakk>pathfinish p = pathstart q; pathfinish q = pathstart p\<rbrakk>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
   764
     \<Longrightarrow> path_image(p +++ q) = path_image(q +++ p)"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
   765
by (simp add: path_image_join sup_commute)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
   766
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   767
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   768
section\<open>Choosing a subpath of an existing path\<close>
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   769
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   770
definition subpath :: "real \<Rightarrow> real \<Rightarrow> (real \<Rightarrow> 'a) \<Rightarrow> real \<Rightarrow> 'a::real_normed_vector"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   771
  where "subpath a b g \<equiv> \<lambda>x. g((b - a) * x + a)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   772
61762
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
   773
lemma path_image_subpath_gen:
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
   774
  fixes g :: "_ \<Rightarrow> 'a::real_normed_vector"
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   775
  shows "path_image(subpath u v g) = g ` (closed_segment u v)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   776
  apply (simp add: closed_segment_real_eq path_image_def subpath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   777
  apply (subst o_def [of g, symmetric])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   778
  apply (simp add: image_comp [symmetric])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   779
  done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   780
61762
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
   781
lemma path_image_subpath:
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   782
  fixes g :: "real \<Rightarrow> 'a::real_normed_vector"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   783
  shows "path_image(subpath u v g) = (if u \<le> v then g ` {u..v} else g ` {v..u})"
61762
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
   784
  by (simp add: path_image_subpath_gen closed_segment_eq_real_ivl)
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   785
65038
9391ea7daa17 new lemmas about segments, etc. Also recast some theorems to use Union rather than general set comprehensions
paulson <lp15@cam.ac.uk>
parents: 64911
diff changeset
   786
lemma path_image_subpath_commute:
9391ea7daa17 new lemmas about segments, etc. Also recast some theorems to use Union rather than general set comprehensions
paulson <lp15@cam.ac.uk>
parents: 64911
diff changeset
   787
  fixes g :: "real \<Rightarrow> 'a::real_normed_vector"
9391ea7daa17 new lemmas about segments, etc. Also recast some theorems to use Union rather than general set comprehensions
paulson <lp15@cam.ac.uk>
parents: 64911
diff changeset
   788
  shows "path_image(subpath u v g) = path_image(subpath v u g)"
9391ea7daa17 new lemmas about segments, etc. Also recast some theorems to use Union rather than general set comprehensions
paulson <lp15@cam.ac.uk>
parents: 64911
diff changeset
   789
  by (simp add: path_image_subpath_gen closed_segment_eq_real_ivl)
9391ea7daa17 new lemmas about segments, etc. Also recast some theorems to use Union rather than general set comprehensions
paulson <lp15@cam.ac.uk>
parents: 64911
diff changeset
   790
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   791
lemma path_subpath [simp]:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   792
  fixes g :: "real \<Rightarrow> 'a::real_normed_vector"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   793
  assumes "path g" "u \<in> {0..1}" "v \<in> {0..1}"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   794
    shows "path(subpath u v g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   795
proof -
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   796
  have "continuous_on {0..1} (g o (\<lambda>x. ((v-u) * x+ u)))"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   797
    apply (rule continuous_intros | simp)+
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   798
    apply (simp add: image_affinity_atLeastAtMost [where c=u])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   799
    using assms
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   800
    apply (auto simp: path_def continuous_on_subset)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   801
    done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   802
  then show ?thesis
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   803
    by (simp add: path_def subpath_def)
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   804
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   805
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   806
lemma pathstart_subpath [simp]: "pathstart(subpath u v g) = g(u)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   807
  by (simp add: pathstart_def subpath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   808
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   809
lemma pathfinish_subpath [simp]: "pathfinish(subpath u v g) = g(v)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   810
  by (simp add: pathfinish_def subpath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   811
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   812
lemma subpath_trivial [simp]: "subpath 0 1 g = g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   813
  by (simp add: subpath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   814
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   815
lemma subpath_reversepath: "subpath 1 0 g = reversepath g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   816
  by (simp add: reversepath_def subpath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   817
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   818
lemma reversepath_subpath: "reversepath(subpath u v g) = subpath v u g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   819
  by (simp add: reversepath_def subpath_def algebra_simps)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   820
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   821
lemma subpath_translation: "subpath u v ((\<lambda>x. a + x) o g) = (\<lambda>x. a + x) o subpath u v g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   822
  by (rule ext) (simp add: subpath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   823
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   824
lemma subpath_linear_image: "linear f \<Longrightarrow> subpath u v (f o g) = f o subpath u v g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   825
  by (rule ext) (simp add: subpath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   826
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   827
lemma affine_ineq:
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   828
  fixes x :: "'a::linordered_idom"
61762
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
   829
  assumes "x \<le> 1" "v \<le> u"
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   830
    shows "v + x * u \<le> u + x * v"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   831
proof -
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   832
  have "(1-x)*(u-v) \<ge> 0"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   833
    using assms by auto
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   834
  then show ?thesis
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   835
    by (simp add: algebra_simps)
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   836
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   837
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
   838
lemma sum_le_prod1:
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
   839
  fixes a::real shows "\<lbrakk>a \<le> 1; b \<le> 1\<rbrakk> \<Longrightarrow> a + b \<le> 1 + a * b"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
   840
by (metis add.commute affine_ineq less_eq_real_def mult.right_neutral)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
   841
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   842
lemma simple_path_subpath_eq:
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   843
  "simple_path(subpath u v g) \<longleftrightarrow>
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   844
     path(subpath u v g) \<and> u\<noteq>v \<and>
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   845
     (\<forall>x y. x \<in> closed_segment u v \<and> y \<in> closed_segment u v \<and> g x = g y
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   846
                \<longrightarrow> x = y \<or> x = u \<and> y = v \<or> x = v \<and> y = u)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   847
    (is "?lhs = ?rhs")
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   848
proof (rule iffI)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   849
  assume ?lhs
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   850
  then have p: "path (\<lambda>x. g ((v - u) * x + u))"
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   851
        and sim: "(\<And>x y. \<lbrakk>x\<in>{0..1}; y\<in>{0..1}; g ((v - u) * x + u) = g ((v - u) * y + u)\<rbrakk>
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   852
                  \<Longrightarrow> x = y \<or> x = 0 \<and> y = 1 \<or> x = 1 \<and> y = 0)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   853
    by (auto simp: simple_path_def subpath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   854
  { fix x y
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   855
    assume "x \<in> closed_segment u v" "y \<in> closed_segment u v" "g x = g y"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   856
    then have "x = y \<or> x = u \<and> y = v \<or> x = v \<and> y = u"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   857
    using sim [of "(x-u)/(v-u)" "(y-u)/(v-u)"] p
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   858
    by (auto simp: closed_segment_real_eq image_affinity_atLeastAtMost divide_simps
62390
842917225d56 more canonical names
nipkow
parents: 62087
diff changeset
   859
       split: if_split_asm)
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   860
  } moreover
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   861
  have "path(subpath u v g) \<and> u\<noteq>v"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   862
    using sim [of "1/3" "2/3"] p
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   863
    by (auto simp: subpath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   864
  ultimately show ?rhs
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   865
    by metis
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   866
next
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   867
  assume ?rhs
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   868
  then
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   869
  have d1: "\<And>x y. \<lbrakk>g x = g y; u \<le> x; x \<le> v; u \<le> y; y \<le> v\<rbrakk> \<Longrightarrow> x = y \<or> x = u \<and> y = v \<or> x = v \<and> y = u"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   870
   and d2: "\<And>x y. \<lbrakk>g x = g y; v \<le> x; x \<le> u; v \<le> y; y \<le> u\<rbrakk> \<Longrightarrow> x = y \<or> x = u \<and> y = v \<or> x = v \<and> y = u"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   871
   and ne: "u < v \<or> v < u"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   872
   and psp: "path (subpath u v g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   873
    by (auto simp: closed_segment_real_eq image_affinity_atLeastAtMost)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   874
  have [simp]: "\<And>x. u + x * v = v + x * u \<longleftrightarrow> u=v \<or> x=1"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   875
    by algebra
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   876
  show ?lhs using psp ne
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   877
    unfolding simple_path_def subpath_def
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   878
    by (fastforce simp add: algebra_simps affine_ineq mult_left_mono crossproduct_eq dest: d1 d2)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   879
qed
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   880
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   881
lemma arc_subpath_eq:
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   882
  "arc(subpath u v g) \<longleftrightarrow> path(subpath u v g) \<and> u\<noteq>v \<and> inj_on g (closed_segment u v)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   883
    (is "?lhs = ?rhs")
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   884
proof (rule iffI)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   885
  assume ?lhs
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   886
  then have p: "path (\<lambda>x. g ((v - u) * x + u))"
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   887
        and sim: "(\<And>x y. \<lbrakk>x\<in>{0..1}; y\<in>{0..1}; g ((v - u) * x + u) = g ((v - u) * y + u)\<rbrakk>
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   888
                  \<Longrightarrow> x = y)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   889
    by (auto simp: arc_def inj_on_def subpath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   890
  { fix x y
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   891
    assume "x \<in> closed_segment u v" "y \<in> closed_segment u v" "g x = g y"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   892
    then have "x = y"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   893
    using sim [of "(x-u)/(v-u)" "(y-u)/(v-u)"] p
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   894
    by (force simp add: inj_on_def closed_segment_real_eq image_affinity_atLeastAtMost divide_simps
62390
842917225d56 more canonical names
nipkow
parents: 62087
diff changeset
   895
       split: if_split_asm)
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   896
  } moreover
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   897
  have "path(subpath u v g) \<and> u\<noteq>v"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   898
    using sim [of "1/3" "2/3"] p
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   899
    by (auto simp: subpath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   900
  ultimately show ?rhs
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   901
    unfolding inj_on_def
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   902
    by metis
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   903
next
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   904
  assume ?rhs
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   905
  then
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   906
  have d1: "\<And>x y. \<lbrakk>g x = g y; u \<le> x; x \<le> v; u \<le> y; y \<le> v\<rbrakk> \<Longrightarrow> x = y"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   907
   and d2: "\<And>x y. \<lbrakk>g x = g y; v \<le> x; x \<le> u; v \<le> y; y \<le> u\<rbrakk> \<Longrightarrow> x = y"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   908
   and ne: "u < v \<or> v < u"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   909
   and psp: "path (subpath u v g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   910
    by (auto simp: inj_on_def closed_segment_real_eq image_affinity_atLeastAtMost)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   911
  show ?lhs using psp ne
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   912
    unfolding arc_def subpath_def inj_on_def
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   913
    by (auto simp: algebra_simps affine_ineq mult_left_mono crossproduct_eq dest: d1 d2)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   914
qed
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   915
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   916
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   917
lemma simple_path_subpath:
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   918
  assumes "simple_path g" "u \<in> {0..1}" "v \<in> {0..1}" "u \<noteq> v"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   919
  shows "simple_path(subpath u v g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   920
  using assms
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   921
  apply (simp add: simple_path_subpath_eq simple_path_imp_path)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   922
  apply (simp add: simple_path_def closed_segment_real_eq image_affinity_atLeastAtMost, fastforce)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   923
  done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   924
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   925
lemma arc_simple_path_subpath:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   926
    "\<lbrakk>simple_path g; u \<in> {0..1}; v \<in> {0..1}; g u \<noteq> g v\<rbrakk> \<Longrightarrow> arc(subpath u v g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   927
  by (force intro: simple_path_subpath simple_path_imp_arc)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   928
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   929
lemma arc_subpath_arc:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   930
    "\<lbrakk>arc g; u \<in> {0..1}; v \<in> {0..1}; u \<noteq> v\<rbrakk> \<Longrightarrow> arc(subpath u v g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   931
  by (meson arc_def arc_imp_simple_path arc_simple_path_subpath inj_onD)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   932
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   933
lemma arc_simple_path_subpath_interior:
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   934
    "\<lbrakk>simple_path g; u \<in> {0..1}; v \<in> {0..1}; u \<noteq> v; \<bar>u-v\<bar> < 1\<rbrakk> \<Longrightarrow> arc(subpath u v g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   935
    apply (rule arc_simple_path_subpath)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   936
    apply (force simp: simple_path_def)+
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   937
    done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   938
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   939
lemma path_image_subpath_subset:
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   940
    "\<lbrakk>path g; u \<in> {0..1}; v \<in> {0..1}\<rbrakk> \<Longrightarrow> path_image(subpath u v g) \<subseteq> path_image g"
61762
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
   941
  apply (simp add: closed_segment_real_eq image_affinity_atLeastAtMost path_image_subpath)
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   942
  apply (auto simp: path_image_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   943
  done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   944
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   945
lemma join_subpaths_middle: "subpath (0) ((1 / 2)) p +++ subpath ((1 / 2)) 1 p = p"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   946
  by (rule ext) (simp add: joinpaths_def subpath_def divide_simps)
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   947
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   948
subsection\<open>There is a subpath to the frontier\<close>
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   949
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   950
lemma subpath_to_frontier_explicit:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   951
    fixes S :: "'a::metric_space set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   952
    assumes g: "path g" and "pathfinish g \<notin> S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   953
    obtains u where "0 \<le> u" "u \<le> 1"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   954
                "\<And>x. 0 \<le> x \<and> x < u \<Longrightarrow> g x \<in> interior S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   955
                "(g u \<notin> interior S)" "(u = 0 \<or> g u \<in> closure S)"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   956
proof -
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   957
  have gcon: "continuous_on {0..1} g"     using g by (simp add: path_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   958
  then have com: "compact ({0..1} \<inter> {u. g u \<in> closure (- S)})"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   959
    apply (simp add: Int_commute [of "{0..1}"] compact_eq_bounded_closed closed_vimage_Int [unfolded vimage_def])
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   960
    using compact_eq_bounded_closed apply fastforce
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   961
    done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   962
  have "1 \<in> {u. g u \<in> closure (- S)}"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   963
    using assms by (simp add: pathfinish_def closure_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   964
  then have dis: "{0..1} \<inter> {u. g u \<in> closure (- S)} \<noteq> {}"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   965
    using atLeastAtMost_iff zero_le_one by blast
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   966
  then obtain u where "0 \<le> u" "u \<le> 1" and gu: "g u \<in> closure (- S)"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   967
                  and umin: "\<And>t. \<lbrakk>0 \<le> t; t \<le> 1; g t \<in> closure (- S)\<rbrakk> \<Longrightarrow> u \<le> t"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   968
    using compact_attains_inf [OF com dis] by fastforce
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   969
  then have umin': "\<And>t. \<lbrakk>0 \<le> t; t \<le> 1; t < u\<rbrakk> \<Longrightarrow>  g t \<in> S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   970
    using closure_def by fastforce
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   971
  { assume "u \<noteq> 0"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
   972
    then have "u > 0" using \<open>0 \<le> u\<close> by auto
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   973
    { fix e::real assume "e > 0"
62397
5ae24f33d343 Substantial new material for multivariate analysis. Also removal of some duplicates.
paulson <lp15@cam.ac.uk>
parents: 62381
diff changeset
   974
      obtain d where "d>0" and d: "\<And>x'. \<lbrakk>x' \<in> {0..1}; dist x' u \<le> d\<rbrakk> \<Longrightarrow> dist (g x') (g u) < e"
5ae24f33d343 Substantial new material for multivariate analysis. Also removal of some duplicates.
paulson <lp15@cam.ac.uk>
parents: 62381
diff changeset
   975
        using continuous_onE [OF gcon _ \<open>e > 0\<close>] \<open>0 \<le> _\<close> \<open>_ \<le> 1\<close> atLeastAtMost_iff by auto
5ae24f33d343 Substantial new material for multivariate analysis. Also removal of some duplicates.
paulson <lp15@cam.ac.uk>
parents: 62381
diff changeset
   976
      have *: "dist (max 0 (u - d / 2)) u \<le> d"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
   977
        using \<open>0 \<le> u\<close> \<open>u \<le> 1\<close> \<open>d > 0\<close> by (simp add: dist_real_def)
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   978
      have "\<exists>y\<in>S. dist y (g u) < e"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
   979
        using \<open>0 < u\<close> \<open>u \<le> 1\<close> \<open>d > 0\<close>
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   980
        by (force intro: d [OF _ *] umin')
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   981
    }
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   982
    then have "g u \<in> closure S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   983
      by (simp add: frontier_def closure_approachable)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   984
  }
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   985
  then show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   986
    apply (rule_tac u=u in that)
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
   987
    apply (auto simp: \<open>0 \<le> u\<close> \<open>u \<le> 1\<close> gu interior_closure umin)
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
   988
    using \<open>_ \<le> 1\<close> interior_closure umin apply fastforce
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   989
    done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   990
qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   991
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   992
lemma subpath_to_frontier_strong:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   993
    assumes g: "path g" and "pathfinish g \<notin> S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   994
    obtains u where "0 \<le> u" "u \<le> 1" "g u \<notin> interior S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   995
                    "u = 0 \<or> (\<forall>x. 0 \<le> x \<and> x < 1 \<longrightarrow> subpath 0 u g x \<in> interior S)  \<and>  g u \<in> closure S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   996
proof -
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   997
  obtain u where "0 \<le> u" "u \<le> 1"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   998
             and gxin: "\<And>x. 0 \<le> x \<and> x < u \<Longrightarrow> g x \<in> interior S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   999
             and gunot: "(g u \<notin> interior S)" and u0: "(u = 0 \<or> g u \<in> closure S)"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1000
    using subpath_to_frontier_explicit [OF assms] by blast
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1001
  show ?thesis
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  1002
    apply (rule that [OF \<open>0 \<le> u\<close> \<open>u \<le> 1\<close>])
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1003
    apply (simp add: gunot)
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  1004
    using \<open>0 \<le> u\<close> u0 by (force simp: subpath_def gxin)
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1005
qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1006
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1007
lemma subpath_to_frontier:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1008
    assumes g: "path g" and g0: "pathstart g \<in> closure S" and g1: "pathfinish g \<notin> S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1009
    obtains u where "0 \<le> u" "u \<le> 1" "g u \<in> frontier S" "(path_image(subpath 0 u g) - {g u}) \<subseteq> interior S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1010
proof -
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1011
  obtain u where "0 \<le> u" "u \<le> 1"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1012
             and notin: "g u \<notin> interior S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1013
             and disj: "u = 0 \<or>
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1014
                        (\<forall>x. 0 \<le> x \<and> x < 1 \<longrightarrow> subpath 0 u g x \<in> interior S) \<and> g u \<in> closure S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1015
    using subpath_to_frontier_strong [OF g g1] by blast
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1016
  show ?thesis
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  1017
    apply (rule that [OF \<open>0 \<le> u\<close> \<open>u \<le> 1\<close>])
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1018
    apply (metis DiffI disj frontier_def g0 notin pathstart_def)
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  1019
    using \<open>0 \<le> u\<close> g0 disj
61762
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  1020
    apply (simp add: path_image_subpath_gen)
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1021
    apply (auto simp: closed_segment_eq_real_ivl pathstart_def pathfinish_def subpath_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1022
    apply (rename_tac y)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1023
    apply (drule_tac x="y/u" in spec)
62390
842917225d56 more canonical names
nipkow
parents: 62087
diff changeset
  1024
    apply (auto split: if_split_asm)
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1025
    done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1026
qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1027
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1028
lemma exists_path_subpath_to_frontier:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1029
    fixes S :: "'a::real_normed_vector set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1030
    assumes "path g" "pathstart g \<in> closure S" "pathfinish g \<notin> S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1031
    obtains h where "path h" "pathstart h = pathstart g" "path_image h \<subseteq> path_image g"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1032
                    "path_image h - {pathfinish h} \<subseteq> interior S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1033
                    "pathfinish h \<in> frontier S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1034
proof -
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1035
  obtain u where u: "0 \<le> u" "u \<le> 1" "g u \<in> frontier S" "(path_image(subpath 0 u g) - {g u}) \<subseteq> interior S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1036
    using subpath_to_frontier [OF assms] by blast
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1037
  show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1038
    apply (rule that [of "subpath 0 u g"])
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1039
    using assms u
61762
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  1040
    apply (simp_all add: path_image_subpath)
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1041
    apply (simp add: pathstart_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1042
    apply (force simp: closed_segment_eq_real_ivl path_image_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1043
    done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1044
qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1045
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1046
lemma exists_path_subpath_to_frontier_closed:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1047
    fixes S :: "'a::real_normed_vector set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1048
    assumes S: "closed S" and g: "path g" and g0: "pathstart g \<in> S" and g1: "pathfinish g \<notin> S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1049
    obtains h where "path h" "pathstart h = pathstart g" "path_image h \<subseteq> path_image g \<inter> S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1050
                    "pathfinish h \<in> frontier S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1051
proof -
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1052
  obtain h where h: "path h" "pathstart h = pathstart g" "path_image h \<subseteq> path_image g"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1053
                    "path_image h - {pathfinish h} \<subseteq> interior S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1054
                    "pathfinish h \<in> frontier S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1055
    using exists_path_subpath_to_frontier [OF g _ g1] closure_closed [OF S] g0 by auto
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1056
  show ?thesis
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  1057
    apply (rule that [OF \<open>path h\<close>])
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1058
    using assms h
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1059
    apply auto
62087
44841d07ef1d revisions to limits and derivatives, plus new lemmas
paulson
parents: 61808
diff changeset
  1060
    apply (metis Diff_single_insert frontier_subset_eq insert_iff interior_subset subset_iff)
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1061
    done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1062
qed
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1063
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1064
subsection \<open>shiftpath: Reparametrizing a closed curve to start at some chosen point\<close>
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1065
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1066
definition shiftpath :: "real \<Rightarrow> (real \<Rightarrow> 'a::topological_space) \<Rightarrow> real \<Rightarrow> 'a"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1067
  where "shiftpath a f = (\<lambda>x. if (a + x) \<le> 1 then f (a + x) else f (a + x - 1))"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1068
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1069
lemma pathstart_shiftpath: "a \<le> 1 \<Longrightarrow> pathstart (shiftpath a g) = g a"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1070
  unfolding pathstart_def shiftpath_def by auto
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1071
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1072
lemma pathfinish_shiftpath:
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1073
  assumes "0 \<le> a"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1074
    and "pathfinish g = pathstart g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1075
  shows "pathfinish (shiftpath a g) = g a"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1076
  using assms
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1077
  unfolding pathstart_def pathfinish_def shiftpath_def
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1078
  by auto
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1079
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1080
lemma endpoints_shiftpath:
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1081
  assumes "pathfinish g = pathstart g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1082
    and "a \<in> {0 .. 1}"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1083
  shows "pathfinish (shiftpath a g) = g a"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1084
    and "pathstart (shiftpath a g) = g a"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1085
  using assms
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1086
  by (auto intro!: pathfinish_shiftpath pathstart_shiftpath)
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1087
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1088
lemma closed_shiftpath:
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1089
  assumes "pathfinish g = pathstart g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1090
    and "a \<in> {0..1}"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1091
  shows "pathfinish (shiftpath a g) = pathstart (shiftpath a g)"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1092
  using endpoints_shiftpath[OF assms]
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1093
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1094
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1095
lemma path_shiftpath:
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1096
  assumes "path g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1097
    and "pathfinish g = pathstart g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1098
    and "a \<in> {0..1}"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1099
  shows "path (shiftpath a g)"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1100
proof -
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1101
  have *: "{0 .. 1} = {0 .. 1-a} \<union> {1-a .. 1}"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1102
    using assms(3) by auto
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1103
  have **: "\<And>x. x + a = 1 \<Longrightarrow> g (x + a - 1) = g (x + a)"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1104
    using assms(2)[unfolded pathfinish_def pathstart_def]
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1105
    by auto
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1106
  show ?thesis
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1107
    unfolding path_def shiftpath_def *
62397
5ae24f33d343 Substantial new material for multivariate analysis. Also removal of some duplicates.
paulson <lp15@cam.ac.uk>
parents: 62381
diff changeset
  1108
    apply (rule continuous_on_closed_Un)
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1109
    apply (rule closed_real_atLeastAtMost)+
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1110
    apply (rule continuous_on_eq[of _ "g \<circ> (\<lambda>x. a + x)"])
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1111
    prefer 3
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1112
    apply (rule continuous_on_eq[of _ "g \<circ> (\<lambda>x. a - 1 + x)"])
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1113
    prefer 3
56371
fb9ae0727548 extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents: 56188
diff changeset
  1114
    apply (rule continuous_intros)+
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1115
    prefer 2
56371
fb9ae0727548 extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents: 56188
diff changeset
  1116
    apply (rule continuous_intros)+
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1117
    apply (rule_tac[1-2] continuous_on_subset[OF assms(1)[unfolded path_def]])
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1118
    using assms(3) and **
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1119
    apply auto
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1120
    apply (auto simp add: field_simps)
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1121
    done
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1122
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1123
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1124
lemma shiftpath_shiftpath:
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1125
  assumes "pathfinish g = pathstart g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1126
    and "a \<in> {0..1}"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1127
    and "x \<in> {0..1}"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1128
  shows "shiftpath (1 - a) (shiftpath a g) x = g x"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1129
  using assms
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1130
  unfolding pathfinish_def pathstart_def shiftpath_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1131
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1132
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1133
lemma path_image_shiftpath:
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1134
  assumes "a \<in> {0..1}"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1135
    and "pathfinish g = pathstart g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1136
  shows "path_image (shiftpath a g) = path_image g"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1137
proof -
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1138
  { fix x
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1139
    assume as: "g 1 = g 0" "x \<in> {0..1::real}" " \<forall>y\<in>{0..1} \<inter> {x. \<not> a + x \<le> 1}. g x \<noteq> g (a + y - 1)"
49654
366d8b41ca17 tuned proofs;
wenzelm
parents: 49653
diff changeset
  1140
    then have "\<exists>y\<in>{0..1} \<inter> {x. a + x \<le> 1}. g x = g (a + y)"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1141
    proof (cases "a \<le> x")
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1142
      case False
49654
366d8b41ca17 tuned proofs;
wenzelm
parents: 49653
diff changeset
  1143
      then show ?thesis
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1144
        apply (rule_tac x="1 + x - a" in bexI)
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1145
        using as(1,2) and as(3)[THEN bspec[where x="1 + x - a"]] and assms(1)
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1146
        apply (auto simp add: field_simps atomize_not)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1147
        done
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1148
    next
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1149
      case True
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1150
      then show ?thesis
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1151
        using as(1-2) and assms(1)
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1152
        apply (rule_tac x="x - a" in bexI)
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1153
        apply (auto simp add: field_simps)
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1154
        done
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1155
    qed
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1156
  }
49654
366d8b41ca17 tuned proofs;
wenzelm
parents: 49653
diff changeset
  1157
  then show ?thesis
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1158
    using assms
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1159
    unfolding shiftpath_def path_image_def pathfinish_def pathstart_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1160
    by (auto simp add: image_iff)
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1161
qed
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1162
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1163
lemma simple_path_shiftpath:
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1164
  assumes "simple_path g" "pathfinish g = pathstart g" and a: "0 \<le> a" "a \<le> 1"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1165
    shows "simple_path (shiftpath a g)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1166
  unfolding simple_path_def
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1167
proof (intro conjI impI ballI)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1168
  show "path (shiftpath a g)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1169
    by (simp add: assms path_shiftpath simple_path_imp_path)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1170
  have *: "\<And>x y. \<lbrakk>g x = g y; x \<in> {0..1}; y \<in> {0..1}\<rbrakk> \<Longrightarrow> x = y \<or> x = 0 \<and> y = 1 \<or> x = 1 \<and> y = 0"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1171
    using assms by (simp add:  simple_path_def)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1172
  show "x = y \<or> x = 0 \<and> y = 1 \<or> x = 1 \<and> y = 0"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1173
    if "x \<in> {0..1}" "y \<in> {0..1}" "shiftpath a g x = shiftpath a g y" for x y
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1174
    using that a unfolding shiftpath_def
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1175
    apply (simp add: split: if_split_asm)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1176
      apply (drule *; auto)+
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1177
    done
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1178
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1179
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1180
subsection \<open>Special case of straight-line paths\<close>
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1181
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1182
definition linepath :: "'a::real_normed_vector \<Rightarrow> 'a \<Rightarrow> real \<Rightarrow> 'a"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1183
  where "linepath a b = (\<lambda>x. (1 - x) *\<^sub>R a + x *\<^sub>R b)"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1184
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1185
lemma pathstart_linepath[simp]: "pathstart (linepath a b) = a"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1186
  unfolding pathstart_def linepath_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1187
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1188
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1189
lemma pathfinish_linepath[simp]: "pathfinish (linepath a b) = b"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1190
  unfolding pathfinish_def linepath_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1191
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1192
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1193
lemma continuous_linepath_at[intro]: "continuous (at x) (linepath a b)"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1194
  unfolding linepath_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1195
  by (intro continuous_intros)
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1196
61762
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  1197
lemma continuous_on_linepath [intro,continuous_intros]: "continuous_on s (linepath a b)"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1198
  using continuous_linepath_at
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1199
  by (auto intro!: continuous_at_imp_continuous_on)
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1200
62618
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1201
lemma path_linepath[iff]: "path (linepath a b)"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1202
  unfolding path_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1203
  by (rule continuous_on_linepath)
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1204
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1205
lemma path_image_linepath[simp]: "path_image (linepath a b) = closed_segment a b"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1206
  unfolding path_image_def segment linepath_def
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
  1207
  by auto
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1208
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1209
lemma reversepath_linepath[simp]: "reversepath (linepath a b) = linepath b a"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1210
  unfolding reversepath_def linepath_def
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1211
  by auto
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1212
61762
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  1213
lemma linepath_0 [simp]: "linepath 0 b x = x *\<^sub>R b"
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  1214
  by (simp add: linepath_def)
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  1215
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
  1216
lemma arc_linepath:
62618
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1217
  assumes "a \<noteq> b" shows [simp]: "arc (linepath a b)"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1218
proof -
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1219
  {
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1220
    fix x y :: "real"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1221
    assume "x *\<^sub>R b + y *\<^sub>R a = x *\<^sub>R a + y *\<^sub>R b"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1222
    then have "(x - y) *\<^sub>R a = (x - y) *\<^sub>R b"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1223
      by (simp add: algebra_simps)
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1224
    with assms have "x = y"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1225
      by simp
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1226
  }
49654
366d8b41ca17 tuned proofs;
wenzelm
parents: 49653
diff changeset
  1227
  then show ?thesis
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
  1228
    unfolding arc_def inj_on_def
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
  1229
    by (simp add:  path_linepath) (force simp: algebra_simps linepath_def)
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1230
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1231
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1232
lemma simple_path_linepath[intro]: "a \<noteq> b \<Longrightarrow> simple_path (linepath a b)"
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
  1233
  by (simp add: arc_imp_simple_path arc_linepath)
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1234
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  1235
lemma linepath_trivial [simp]: "linepath a a x = a"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  1236
  by (simp add: linepath_def real_vector.scale_left_diff_distrib)
61738
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  1237
64394
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
  1238
lemma linepath_refl: "linepath a a = (\<lambda>x. a)"
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
  1239
  by auto
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
  1240
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  1241
lemma subpath_refl: "subpath a a g = linepath (g a) (g a)"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  1242
  by (simp add: subpath_def linepath_def algebra_simps)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  1243
62618
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1244
lemma linepath_of_real: "(linepath (of_real a) (of_real b) x) = of_real ((1 - x)*a + x*b)"
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1245
  by (simp add: scaleR_conv_of_real linepath_def)
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1246
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1247
lemma of_real_linepath: "of_real (linepath a b x) = linepath (of_real a) (of_real b) x"
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1248
  by (metis linepath_of_real mult.right_neutral of_real_def real_scaleR_def)
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1249
63881
b746b19197bd lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents: 63627
diff changeset
  1250
lemma inj_on_linepath:
b746b19197bd lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents: 63627
diff changeset
  1251
  assumes "a \<noteq> b" shows "inj_on (linepath a b) {0..1}"
b746b19197bd lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents: 63627
diff changeset
  1252
proof (clarsimp simp: inj_on_def linepath_def)
b746b19197bd lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents: 63627
diff changeset
  1253
  fix x y
b746b19197bd lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents: 63627
diff changeset
  1254
  assume "(1 - x) *\<^sub>R a + x *\<^sub>R b = (1 - y) *\<^sub>R a + y *\<^sub>R b" "0 \<le> x" "x \<le> 1" "0 \<le> y" "y \<le> 1"
b746b19197bd lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents: 63627
diff changeset
  1255
  then have "x *\<^sub>R (a - b) = y *\<^sub>R (a - b)"
b746b19197bd lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents: 63627
diff changeset
  1256
    by (auto simp: algebra_simps)
b746b19197bd lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents: 63627
diff changeset
  1257
  then show "x=y"
b746b19197bd lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents: 63627
diff changeset
  1258
    using assms by auto
b746b19197bd lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents: 63627
diff changeset
  1259
qed
b746b19197bd lots of new results about topology, affine dimension etc
paulson <lp15@cam.ac.uk>
parents: 63627
diff changeset
  1260
62618
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1261
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1262
subsection\<open>Segments via convex hulls\<close>
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1263
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1264
lemma segments_subset_convex_hull:
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1265
    "closed_segment a b \<subseteq> (convex hull {a,b,c})"
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1266
    "closed_segment a c \<subseteq> (convex hull {a,b,c})"
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1267
    "closed_segment b c \<subseteq> (convex hull {a,b,c})"
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1268
    "closed_segment b a \<subseteq> (convex hull {a,b,c})"
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1269
    "closed_segment c a \<subseteq> (convex hull {a,b,c})"
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1270
    "closed_segment c b \<subseteq> (convex hull {a,b,c})"
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1271
by (auto simp: segment_convex_hull linepath_of_real  elim!: rev_subsetD [OF _ hull_mono])
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1272
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1273
lemma midpoints_in_convex_hull:
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1274
  assumes "x \<in> convex hull s" "y \<in> convex hull s"
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1275
    shows "midpoint x y \<in> convex hull s"
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1276
proof -
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1277
  have "(1 - inverse(2)) *\<^sub>R x + inverse(2) *\<^sub>R y \<in> convex hull s"
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1278
    apply (rule convexD_alt)
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1279
    using assms
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1280
    apply (auto simp: convex_convex_hull)
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1281
    done
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1282
  then show ?thesis
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1283
    by (simp add: midpoint_def algebra_simps)
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1284
qed
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1285
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1286
lemma not_in_interior_convex_hull_3:
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1287
  fixes a :: "complex"
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1288
  shows "a \<notin> interior(convex hull {a,b,c})"
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1289
        "b \<notin> interior(convex hull {a,b,c})"
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1290
        "c \<notin> interior(convex hull {a,b,c})"
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1291
  by (auto simp: card_insert_le_m1 not_in_interior_convex_hull)
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1292
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1293
lemma midpoint_in_closed_segment [simp]: "midpoint a b \<in> closed_segment a b"
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1294
  using midpoints_in_convex_hull segment_convex_hull by blast
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1295
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1296
lemma midpoint_in_open_segment [simp]: "midpoint a b \<in> open_segment a b \<longleftrightarrow> a \<noteq> b"
64122
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1297
  by (simp add: open_segment_def)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1298
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1299
lemma continuous_IVT_local_extremum:
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1300
  fixes f :: "'a::euclidean_space \<Rightarrow> real"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1301
  assumes contf: "continuous_on (closed_segment a b) f"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1302
      and "a \<noteq> b" "f a = f b"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1303
  obtains z where "z \<in> open_segment a b"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1304
                  "(\<forall>w \<in> closed_segment a b. (f w) \<le> (f z)) \<or>
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1305
                   (\<forall>w \<in> closed_segment a b. (f z) \<le> (f w))"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1306
proof -
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1307
  obtain c where "c \<in> closed_segment a b" and c: "\<And>y. y \<in> closed_segment a b \<Longrightarrow> f y \<le> f c"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1308
    using continuous_attains_sup [of "closed_segment a b" f] contf by auto
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1309
  obtain d where "d \<in> closed_segment a b" and d: "\<And>y. y \<in> closed_segment a b \<Longrightarrow> f d \<le> f y"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1310
    using continuous_attains_inf [of "closed_segment a b" f] contf by auto
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1311
  show ?thesis
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1312
  proof (cases "c \<in> open_segment a b \<or> d \<in> open_segment a b")
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1313
    case True
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1314
    then show ?thesis
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1315
      using c d that by blast
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1316
  next
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1317
    case False
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1318
    then have "(c = a \<or> c = b) \<and> (d = a \<or> d = b)"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1319
      by (simp add: \<open>c \<in> closed_segment a b\<close> \<open>d \<in> closed_segment a b\<close> open_segment_def)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1320
    with \<open>a \<noteq> b\<close> \<open>f a = f b\<close> c d show ?thesis
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1321
      by (rule_tac z = "midpoint a b" in that) (fastforce+)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1322
  qed
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1323
qed
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1324
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1325
text\<open>An injective map into R is also an open map w.r.T. the universe, and conversely. \<close>
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1326
proposition injective_eq_1d_open_map_UNIV:
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1327
  fixes f :: "real \<Rightarrow> real"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1328
  assumes contf: "continuous_on S f" and S: "is_interval S"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1329
    shows "inj_on f S \<longleftrightarrow> (\<forall>T. open T \<and> T \<subseteq> S \<longrightarrow> open(f ` T))"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1330
          (is "?lhs = ?rhs")
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1331
proof safe
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1332
  fix T
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1333
  assume injf: ?lhs and "open T" and "T \<subseteq> S"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1334
  have "\<exists>U. open U \<and> f x \<in> U \<and> U \<subseteq> f ` T" if "x \<in> T" for x
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1335
  proof -
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1336
    obtain \<delta> where "\<delta> > 0" and \<delta>: "cball x \<delta> \<subseteq> T"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1337
      using \<open>open T\<close> \<open>x \<in> T\<close> open_contains_cball_eq by blast
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1338
    show ?thesis
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1339
    proof (intro exI conjI)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1340
      have "closed_segment (x-\<delta>) (x+\<delta>) = {x-\<delta>..x+\<delta>}"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1341
        using \<open>0 < \<delta>\<close> by (auto simp: closed_segment_eq_real_ivl)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1342
      also have "... \<subseteq> S"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1343
        using \<delta> \<open>T \<subseteq> S\<close> by (auto simp: dist_norm subset_eq)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1344
      finally have "f ` (open_segment (x-\<delta>) (x+\<delta>)) = open_segment (f (x-\<delta>)) (f (x+\<delta>))"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1345
        using continuous_injective_image_open_segment_1
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1346
        by (metis continuous_on_subset [OF contf] inj_on_subset [OF injf])
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1347
      then show "open (f ` {x-\<delta><..<x+\<delta>})"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1348
        using \<open>0 < \<delta>\<close> by (simp add: open_segment_eq_real_ivl)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1349
      show "f x \<in> f ` {x - \<delta><..<x + \<delta>}"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1350
        by (auto simp: \<open>\<delta> > 0\<close>)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1351
      show "f ` {x - \<delta><..<x + \<delta>} \<subseteq> f ` T"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1352
        using \<delta> by (auto simp: dist_norm subset_iff)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1353
    qed
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1354
  qed
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1355
  with open_subopen show "open (f ` T)"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1356
    by blast
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1357
next
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1358
  assume R: ?rhs
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1359
  have False if xy: "x \<in> S" "y \<in> S" and "f x = f y" "x \<noteq> y" for x y
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1360
  proof -
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1361
    have "open (f ` open_segment x y)"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1362
      using R
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1363
      by (metis S convex_contains_open_segment is_interval_convex open_greaterThanLessThan open_segment_eq_real_ivl xy)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1364
    moreover
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1365
    have "continuous_on (closed_segment x y) f"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1366
      by (meson S closed_segment_subset contf continuous_on_subset is_interval_convex that)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1367
    then obtain \<xi> where "\<xi> \<in> open_segment x y"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1368
                    and \<xi>: "(\<forall>w \<in> closed_segment x y. (f w) \<le> (f \<xi>)) \<or>
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1369
                            (\<forall>w \<in> closed_segment x y. (f \<xi>) \<le> (f w))"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1370
      using continuous_IVT_local_extremum [of x y f] \<open>f x = f y\<close> \<open>x \<noteq> y\<close> by blast
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1371
    ultimately obtain e where "e>0" and e: "\<And>u. dist u (f \<xi>) < e \<Longrightarrow> u \<in> f ` open_segment x y"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1372
      using open_dist by (metis image_eqI)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1373
    have fin: "f \<xi> + (e/2) \<in> f ` open_segment x y" "f \<xi> - (e/2) \<in> f ` open_segment x y"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1374
      using e [of "f \<xi> + (e/2)"] e [of "f \<xi> - (e/2)"] \<open>e > 0\<close> by (auto simp: dist_norm)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1375
    show ?thesis
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1376
      using \<xi> \<open>0 < e\<close> fin open_closed_segment by fastforce
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1377
  qed
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1378
  then show ?lhs
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1379
    by (force simp: inj_on_def)
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  1380
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1381
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1382
subsection \<open>Bounding a point away from a path\<close>
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1383
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1384
lemma not_on_path_ball:
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1385
  fixes g :: "real \<Rightarrow> 'a::heine_borel"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1386
  assumes "path g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1387
    and "z \<notin> path_image g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1388
  shows "\<exists>e > 0. ball z e \<inter> path_image g = {}"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1389
proof -
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1390
  obtain a where "a \<in> path_image g" "\<forall>y \<in> path_image g. dist z a \<le> dist z y"
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  1391
    apply (rule distance_attains_inf[OF _ path_image_nonempty, of g z])
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1392
    using compact_path_image[THEN compact_imp_closed, OF assms(1)] by auto
49654
366d8b41ca17 tuned proofs;
wenzelm
parents: 49653
diff changeset
  1393
  then show ?thesis
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1394
    apply (rule_tac x="dist z a" in exI)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1395
    using assms(2)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1396
    apply (auto intro!: dist_pos_lt)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1397
    done
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1398
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1399
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1400
lemma not_on_path_cball:
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1401
  fixes g :: "real \<Rightarrow> 'a::heine_borel"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1402
  assumes "path g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1403
    and "z \<notin> path_image g"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1404
  shows "\<exists>e>0. cball z e \<inter> (path_image g) = {}"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1405
proof -
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1406
  obtain e where "ball z e \<inter> path_image g = {}" "e > 0"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1407
    using not_on_path_ball[OF assms] by auto
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1408
  moreover have "cball z (e/2) \<subseteq> ball z e"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1409
    using \<open>e > 0\<close> by auto
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1410
  ultimately show ?thesis
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1411
    apply (rule_tac x="e/2" in exI)
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1412
    apply auto
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1413
    done
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1414
qed
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1415
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1416
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1417
section \<open>Path component, considered as a "joinability" relation (from Tom Hales)\<close>
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1418
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1419
definition "path_component s x y \<longleftrightarrow>
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1420
  (\<exists>g. path g \<and> path_image g \<subseteq> s \<and> pathstart g = x \<and> pathfinish g = y)"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1421
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1422
abbreviation
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1423
   "path_component_set s x \<equiv> Collect (path_component s x)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1424
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1425
lemmas path_defs = path_def pathstart_def pathfinish_def path_image_def path_component_def
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1426
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1427
lemma path_component_mem:
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1428
  assumes "path_component s x y"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1429
  shows "x \<in> s" and "y \<in> s"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1430
  using assms
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1431
  unfolding path_defs
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1432
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1433
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1434
lemma path_component_refl:
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1435
  assumes "x \<in> s"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1436
  shows "path_component s x x"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1437
  unfolding path_defs
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1438
  apply (rule_tac x="\<lambda>u. x" in exI)
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1439
  using assms
56371
fb9ae0727548 extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents: 56188
diff changeset
  1440
  apply (auto intro!: continuous_intros)
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1441
  done
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1442
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1443
lemma path_component_refl_eq: "path_component s x x \<longleftrightarrow> x \<in> s"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1444
  by (auto intro!: path_component_mem path_component_refl)
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1445
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1446
lemma path_component_sym: "path_component s x y \<Longrightarrow> path_component s y x"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1447
  unfolding path_component_def
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1448
  apply (erule exE)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1449
  apply (rule_tac x="reversepath g" in exI)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1450
  apply auto
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1451
  done
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1452
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1453
lemma path_component_trans:
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1454
  assumes "path_component s x y" and "path_component s y z"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1455
  shows "path_component s x z"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1456
  using assms
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1457
  unfolding path_component_def
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1458
  apply (elim exE)
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1459
  apply (rule_tac x="g +++ ga" in exI)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1460
  apply (auto simp add: path_image_join)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1461
  done
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1462
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1463
lemma path_component_of_subset: "s \<subseteq> t \<Longrightarrow> path_component s x y \<Longrightarrow> path_component t x y"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1464
  unfolding path_component_def by auto
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1465
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1466
lemma path_connected_linepath:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1467
    fixes s :: "'a::real_normed_vector set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1468
    shows "closed_segment a b \<subseteq> s \<Longrightarrow> path_component s a b"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1469
  apply (simp add: path_component_def)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1470
  apply (rule_tac x="linepath a b" in exI, auto)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1471
  done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1472
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1473
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1474
subsubsection \<open>Path components as sets\<close>
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1475
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1476
lemma path_component_set:
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1477
  "path_component_set s x =
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1478
    {y. (\<exists>g. path g \<and> path_image g \<subseteq> s \<and> pathstart g = x \<and> pathfinish g = y)}"
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1479
  by (auto simp: path_component_def)
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1480
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1481
lemma path_component_subset: "path_component_set s x \<subseteq> s"
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
  1482
  by (auto simp add: path_component_mem(2))
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1483
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1484
lemma path_component_eq_empty: "path_component_set s x = {} \<longleftrightarrow> x \<notin> s"
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
  1485
  using path_component_mem path_component_refl_eq
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
  1486
    by fastforce
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1487
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1488
lemma path_component_mono:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1489
     "s \<subseteq> t \<Longrightarrow> (path_component_set s x) \<subseteq> (path_component_set t x)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1490
  by (simp add: Collect_mono path_component_of_subset)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1491
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1492
lemma path_component_eq:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1493
   "y \<in> path_component_set s x \<Longrightarrow> path_component_set s y = path_component_set s x"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1494
by (metis (no_types, lifting) Collect_cong mem_Collect_eq path_component_sym path_component_trans)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1495
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1496
subsection \<open>Path connectedness of a space\<close>
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1497
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1498
definition "path_connected s \<longleftrightarrow>
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1499
  (\<forall>x\<in>s. \<forall>y\<in>s. \<exists>g. path g \<and> path_image g \<subseteq> s \<and> pathstart g = x \<and> pathfinish g = y)"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1500
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1501
lemma path_connected_component: "path_connected s \<longleftrightarrow> (\<forall>x\<in>s. \<forall>y\<in>s. path_component s x y)"
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1502
  unfolding path_connected_def path_component_def by auto
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1503
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1504
lemma path_connected_component_set: "path_connected s \<longleftrightarrow> (\<forall>x\<in>s. path_component_set s x = s)"
61694
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  1505
  unfolding path_connected_component path_component_subset
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1506
  using path_component_mem by blast
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1507
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1508
lemma path_component_maximal:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1509
     "\<lbrakk>x \<in> t; path_connected t; t \<subseteq> s\<rbrakk> \<Longrightarrow> t \<subseteq> (path_component_set s x)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1510
  by (metis path_component_mono path_connected_component_set)
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1511
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1512
lemma convex_imp_path_connected:
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1513
  fixes s :: "'a::real_normed_vector set"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1514
  assumes "convex s"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1515
  shows "path_connected s"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1516
  unfolding path_connected_def
66793
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  1517
  using assms convex_contains_segment by fastforce
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1518
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1519
lemma path_connected_UNIV [iff]: "path_connected (UNIV :: 'a::real_normed_vector set)"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1520
  by (simp add: convex_imp_path_connected)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1521
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1522
lemma path_component_UNIV: "path_component_set UNIV x = (UNIV :: 'a::real_normed_vector set)"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1523
  using path_connected_component_set by auto
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1524
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1525
lemma path_connected_imp_connected:
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1526
  assumes "path_connected S"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1527
  shows "connected S"
66793
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  1528
proof (rule connectedI)
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1529
  fix e1 e2
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1530
  assume as: "open e1" "open e2" "S \<subseteq> e1 \<union> e2" "e1 \<inter> e2 \<inter> S = {}" "e1 \<inter> S \<noteq> {}" "e2 \<inter> S \<noteq> {}"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1531
  then obtain x1 x2 where obt:"x1 \<in> e1 \<inter> S" "x2 \<in> e2 \<inter> S"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1532
    by auto
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1533
  then obtain g where g: "path g" "path_image g \<subseteq> S" "pathstart g = x1" "pathfinish g = x2"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1534
    using assms[unfolded path_connected_def,rule_format,of x1 x2] by auto
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1535
  have *: "connected {0..1::real}"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1536
    by (auto intro!: convex_connected convex_real_interval)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1537
  have "{0..1} \<subseteq> {x \<in> {0..1}. g x \<in> e1} \<union> {x \<in> {0..1}. g x \<in> e2}"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1538
    using as(3) g(2)[unfolded path_defs] by blast
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1539
  moreover have "{x \<in> {0..1}. g x \<in> e1} \<inter> {x \<in> {0..1}. g x \<in> e2} = {}"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1540
    using as(4) g(2)[unfolded path_defs]
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1541
    unfolding subset_eq
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1542
    by auto
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1543
  moreover have "{x \<in> {0..1}. g x \<in> e1} \<noteq> {} \<and> {x \<in> {0..1}. g x \<in> e2} \<noteq> {}"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1544
    using g(3,4)[unfolded path_defs]
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1545
    using obt
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1546
    by (simp add: ex_in_conv [symmetric], metis zero_le_one order_refl)
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1547
  ultimately show False
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1548
    using *[unfolded connected_local not_ex, rule_format,
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1549
      of "{x\<in>{0..1}. g x \<in> e1}" "{x\<in>{0..1}. g x \<in> e2}"]
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  1550
    using continuous_openin_preimage_gen[OF g(1)[unfolded path_def] as(1)]
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  1551
    using continuous_openin_preimage_gen[OF g(1)[unfolded path_def] as(2)]
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1552
    by auto
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1553
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1554
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1555
lemma open_path_component:
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1556
  fixes S :: "'a::real_normed_vector set"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1557
  assumes "open S"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1558
  shows "open (path_component_set S x)"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1559
  unfolding open_contains_ball
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1560
proof
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1561
  fix y
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1562
  assume as: "y \<in> path_component_set S x"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1563
  then have "y \<in> S"
66793
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  1564
    by (simp add: path_component_mem(2))
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1565
  then obtain e where e: "e > 0" "ball y e \<subseteq> S"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1566
    using assms[unfolded open_contains_ball]
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1567
    by auto
66793
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  1568
have "\<And>u. dist y u < e \<Longrightarrow> path_component S x u"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  1569
      by (metis (full_types) as centre_in_ball convex_ball convex_imp_path_connected e mem_Collect_eq mem_ball path_component_eq path_component_of_subset path_connected_component)
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  1570
  then show "\<exists>e > 0. ball y e \<subseteq> path_component_set S x"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  1571
    using \<open>e>0\<close> by auto
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1572
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1573
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1574
lemma open_non_path_component:
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1575
  fixes S :: "'a::real_normed_vector set"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1576
  assumes "open S"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1577
  shows "open (S - path_component_set S x)"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1578
  unfolding open_contains_ball
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1579
proof
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1580
  fix y
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1581
  assume as: "y \<in> S - path_component_set S x"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1582
  then obtain e where e: "e > 0" "ball y e \<subseteq> S"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1583
    using assms [unfolded open_contains_ball]
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1584
    by auto
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1585
  show "\<exists>e>0. ball y e \<subseteq> S - path_component_set S x"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1586
    apply (rule_tac x=e in exI)
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1587
    apply rule
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1588
    apply (rule \<open>e>0\<close>)
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1589
    apply rule
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1590
    apply rule
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1591
    defer
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1592
  proof (rule ccontr)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1593
    fix z
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1594
    assume "z \<in> ball y e" "\<not> z \<notin> path_component_set S x"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1595
    then have "y \<in> path_component_set S x"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1596
      unfolding not_not mem_Collect_eq using \<open>e>0\<close>
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1597
      apply -
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1598
      apply (rule path_component_trans, assumption)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1599
      apply (rule path_component_of_subset[OF e(2)])
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1600
      apply (rule convex_imp_path_connected[OF convex_ball, unfolded path_connected_component, rule_format])
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1601
      apply auto
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1602
      done
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1603
    then show False
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1604
      using as by auto
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1605
  qed (insert e(2), auto)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1606
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1607
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1608
lemma connected_open_path_connected:
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1609
  fixes S :: "'a::real_normed_vector set"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1610
  assumes "open S"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1611
    and "connected S"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1612
  shows "path_connected S"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1613
  unfolding path_connected_component_set
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1614
proof (rule, rule, rule path_component_subset, rule)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1615
  fix x y
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1616
  assume "x \<in> S" and "y \<in> S"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1617
  show "y \<in> path_component_set S x"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1618
  proof (rule ccontr)
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1619
    assume "\<not> ?thesis"
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1620
    moreover have "path_component_set S x \<inter> S \<noteq> {}"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1621
      using \<open>x \<in> S\<close> path_component_eq_empty path_component_subset[of S x]
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1622
      by auto
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1623
    ultimately
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1624
    show False
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1625
      using \<open>y \<in> S\<close> open_non_path_component[OF assms(1)] open_path_component[OF assms(1)]
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1626
      using assms(2)[unfolded connected_def not_ex, rule_format,
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1627
        of "path_component_set S x" "S - path_component_set S x"]
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1628
      by auto
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1629
  qed
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1630
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1631
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1632
lemma path_connected_continuous_image:
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1633
  assumes "continuous_on S f"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1634
    and "path_connected S"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1635
  shows "path_connected (f ` S)"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1636
  unfolding path_connected_def
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1637
proof (rule, rule)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1638
  fix x' y'
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1639
  assume "x' \<in> f ` S" "y' \<in> f ` S"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1640
  then obtain x y where x: "x \<in> S" and y: "y \<in> S" and x': "x' = f x" and y': "y' = f y"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1641
    by auto
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1642
  from x y obtain g where "path g \<and> path_image g \<subseteq> S \<and> pathstart g = x \<and> pathfinish g = y"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1643
    using assms(2)[unfolded path_connected_def] by fast
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1644
  then show "\<exists>g. path g \<and> path_image g \<subseteq> f ` S \<and> pathstart g = x' \<and> pathfinish g = y'"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1645
    unfolding x' y'
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1646
    apply (rule_tac x="f \<circ> g" in exI)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1647
    unfolding path_defs
51481
ef949192e5d6 move continuous_on_inv to HOL image (simplifies isCont_inverse_function)
hoelzl
parents: 51478
diff changeset
  1648
    apply (intro conjI continuous_on_compose continuous_on_subset[OF assms(1)])
ef949192e5d6 move continuous_on_inv to HOL image (simplifies isCont_inverse_function)
hoelzl
parents: 51478
diff changeset
  1649
    apply auto
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1650
    done
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1651
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1652
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1653
lemma path_connected_translationI:
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1654
  fixes a :: "'a :: topological_group_add"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1655
  assumes "path_connected S" shows "path_connected ((\<lambda>x. a + x) ` S)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1656
  by (intro path_connected_continuous_image assms continuous_intros)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1657
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1658
lemma path_connected_translation:
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1659
  fixes a :: "'a :: topological_group_add"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1660
  shows "path_connected ((\<lambda>x. a + x) ` S) = path_connected S"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1661
proof -
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1662
  have "\<forall>x y. op + (x::'a) ` op + (0 - x) ` y = y"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1663
    by (simp add: image_image)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1664
  then show ?thesis
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1665
    by (metis (no_types) path_connected_translationI)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1666
qed
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1667
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1668
lemma path_connected_segment [simp]:
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1669
    fixes a :: "'a::real_normed_vector"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1670
    shows "path_connected (closed_segment a b)"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1671
  by (simp add: convex_imp_path_connected)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1672
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1673
lemma path_connected_open_segment [simp]:
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1674
    fixes a :: "'a::real_normed_vector"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1675
    shows "path_connected (open_segment a b)"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1676
  by (simp add: convex_imp_path_connected)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1677
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1678
lemma homeomorphic_path_connectedness:
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1679
  "s homeomorphic t \<Longrightarrow> path_connected s \<longleftrightarrow> path_connected t"
61738
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  1680
  unfolding homeomorphic_def homeomorphism_def by (metis path_connected_continuous_image)
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1681
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1682
lemma path_connected_empty [simp]: "path_connected {}"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1683
  unfolding path_connected_def by auto
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1684
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1685
lemma path_connected_singleton [simp]: "path_connected {a}"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1686
  unfolding path_connected_def pathstart_def pathfinish_def path_image_def
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1687
  apply clarify
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1688
  apply (rule_tac x="\<lambda>x. a" in exI)
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1689
  apply (simp add: image_constant_conv)
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1690
  apply (simp add: path_def continuous_on_const)
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1691
  done
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1692
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1693
lemma path_connected_Un:
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1694
  assumes "path_connected s"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1695
    and "path_connected t"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1696
    and "s \<inter> t \<noteq> {}"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1697
  shows "path_connected (s \<union> t)"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1698
  unfolding path_connected_component
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1699
proof (rule, rule)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1700
  fix x y
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1701
  assume as: "x \<in> s \<union> t" "y \<in> s \<union> t"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1702
  from assms(3) obtain z where "z \<in> s \<inter> t"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1703
    by auto
49654
366d8b41ca17 tuned proofs;
wenzelm
parents: 49653
diff changeset
  1704
  then show "path_component (s \<union> t) x y"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1705
    using as and assms(1-2)[unfolded path_connected_component]
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1706
    apply -
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1707
    apply (erule_tac[!] UnE)+
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1708
    apply (rule_tac[2-3] path_component_trans[of _ _ z])
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1709
    apply (auto simp add:path_component_of_subset [OF Un_upper1] path_component_of_subset[OF Un_upper2])
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1710
    done
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1711
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1712
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1713
lemma path_connected_UNION:
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1714
  assumes "\<And>i. i \<in> A \<Longrightarrow> path_connected (S i)"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1715
    and "\<And>i. i \<in> A \<Longrightarrow> z \<in> S i"
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1716
  shows "path_connected (\<Union>i\<in>A. S i)"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1717
  unfolding path_connected_component
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1718
proof clarify
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1719
  fix x i y j
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1720
  assume *: "i \<in> A" "x \<in> S i" "j \<in> A" "y \<in> S j"
49654
366d8b41ca17 tuned proofs;
wenzelm
parents: 49653
diff changeset
  1721
  then have "path_component (S i) x z" and "path_component (S j) z y"
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1722
    using assms by (simp_all add: path_connected_component)
49654
366d8b41ca17 tuned proofs;
wenzelm
parents: 49653
diff changeset
  1723
  then have "path_component (\<Union>i\<in>A. S i) x z" and "path_component (\<Union>i\<in>A. S i) z y"
48125
602dc0215954 tuned proofs -- prefer direct "rotated" instead of old-style COMP;
wenzelm
parents: 44647
diff changeset
  1724
    using *(1,3) by (auto elim!: path_component_of_subset [rotated])
49654
366d8b41ca17 tuned proofs;
wenzelm
parents: 49653
diff changeset
  1725
  then show "path_component (\<Union>i\<in>A. S i) x y"
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1726
    by (rule path_component_trans)
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1727
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1728
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1729
lemma path_component_path_image_pathstart:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1730
  assumes p: "path p" and x: "x \<in> path_image p"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1731
  shows "path_component (path_image p) (pathstart p) x"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1732
using x
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1733
proof (clarsimp simp add: path_image_def)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1734
  fix y
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1735
  assume "x = p y" and y: "0 \<le> y" "y \<le> 1"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1736
  show "path_component (p ` {0..1}) (pathstart p) (p y)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1737
  proof (cases "y=0")
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1738
    case True then show ?thesis
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1739
      by (simp add: path_component_refl_eq pathstart_def)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1740
  next
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1741
    case False have "continuous_on {0..1} (p o (op*y))"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1742
      apply (rule continuous_intros)+
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1743
      using p [unfolded path_def] y
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1744
      apply (auto simp: mult_le_one intro: continuous_on_subset [of _ p])
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1745
      done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1746
    then have "path (\<lambda>u. p (y * u))"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1747
      by (simp add: path_def)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1748
    then show ?thesis
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1749
      apply (simp add: path_component_def)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1750
      apply (rule_tac x = "\<lambda>u. p (y * u)" in exI)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1751
      apply (intro conjI)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1752
      using y False
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1753
      apply (auto simp: mult_le_one pathstart_def pathfinish_def path_image_def)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1754
      done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1755
  qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1756
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1757
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1758
lemma path_connected_path_image: "path p \<Longrightarrow> path_connected(path_image p)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1759
  unfolding path_connected_component
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1760
  by (meson path_component_path_image_pathstart path_component_sym path_component_trans)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1761
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1762
lemma path_connected_path_component [simp]:
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1763
   "path_connected (path_component_set s x)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1764
proof -
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1765
  { fix y z
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1766
    assume pa: "path_component s x y" "path_component s x z"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1767
    then have pae: "path_component_set s x = path_component_set s y"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1768
      using path_component_eq by auto
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1769
    have yz: "path_component s y z"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1770
      using pa path_component_sym path_component_trans by blast
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1771
    then have "\<exists>g. path g \<and> path_image g \<subseteq> path_component_set s x \<and> pathstart g = y \<and> pathfinish g = z"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1772
      apply (simp add: path_component_def, clarify)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1773
      apply (rule_tac x=g in exI)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1774
      by (simp add: pae path_component_maximal path_connected_path_image pathstart_in_path_image)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1775
  }
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1776
  then show ?thesis
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1777
    by (simp add: path_connected_def)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1778
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1779
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1780
lemma path_component: "path_component s x y \<longleftrightarrow> (\<exists>t. path_connected t \<and> t \<subseteq> s \<and> x \<in> t \<and> y \<in> t)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1781
  apply (intro iffI)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1782
  apply (metis path_connected_path_image path_defs(5) pathfinish_in_path_image pathstart_in_path_image)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1783
  using path_component_of_subset path_connected_component by blast
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1784
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1785
lemma path_component_path_component [simp]:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1786
   "path_component_set (path_component_set s x) x = path_component_set s x"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1787
proof (cases "x \<in> s")
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1788
  case True show ?thesis
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1789
    apply (rule subset_antisym)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1790
    apply (simp add: path_component_subset)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1791
    by (simp add: True path_component_maximal path_component_refl path_connected_path_component)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1792
next
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1793
  case False then show ?thesis
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1794
    by (metis False empty_iff path_component_eq_empty)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1795
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1796
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1797
lemma path_component_subset_connected_component:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1798
   "(path_component_set s x) \<subseteq> (connected_component_set s x)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1799
proof (cases "x \<in> s")
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1800
  case True show ?thesis
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1801
    apply (rule connected_component_maximal)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1802
    apply (auto simp: True path_component_subset path_component_refl path_connected_imp_connected path_connected_path_component)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1803
    done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1804
next
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1805
  case False then show ?thesis
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1806
    using path_component_eq_empty by auto
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1807
qed
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1808
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1809
subsection\<open>Lemmas about path-connectedness\<close>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1810
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1811
lemma path_connected_linear_image:
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1812
  fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1813
  assumes "path_connected s" "bounded_linear f"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1814
    shows "path_connected(f ` s)"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1815
by (auto simp: linear_continuous_on assms path_connected_continuous_image)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1816
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1817
lemma is_interval_path_connected: "is_interval s \<Longrightarrow> path_connected s"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1818
  by (simp add: convex_imp_path_connected is_interval_convex)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1819
62843
313d3b697c9a Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents: 62626
diff changeset
  1820
lemma linear_homeomorphism_image:
313d3b697c9a Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents: 62626
diff changeset
  1821
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1822
  assumes "linear f" "inj f"
62843
313d3b697c9a Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents: 62626
diff changeset
  1823
    obtains g where "homeomorphism (f ` S) S g f"
313d3b697c9a Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents: 62626
diff changeset
  1824
using linear_injective_left_inverse [OF assms]
313d3b697c9a Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents: 62626
diff changeset
  1825
apply clarify
313d3b697c9a Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents: 62626
diff changeset
  1826
apply (rule_tac g=g in that)
313d3b697c9a Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents: 62626
diff changeset
  1827
using assms
313d3b697c9a Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents: 62626
diff changeset
  1828
apply (auto simp: homeomorphism_def eq_id_iff [symmetric] image_comp comp_def linear_conv_bounded_linear linear_continuous_on)
313d3b697c9a Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents: 62626
diff changeset
  1829
done
313d3b697c9a Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents: 62626
diff changeset
  1830
313d3b697c9a Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents: 62626
diff changeset
  1831
lemma linear_homeomorphic_image:
313d3b697c9a Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents: 62626
diff changeset
  1832
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
313d3b697c9a Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents: 62626
diff changeset
  1833
  assumes "linear f" "inj f"
313d3b697c9a Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents: 62626
diff changeset
  1834
    shows "S homeomorphic f ` S"
313d3b697c9a Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents: 62626
diff changeset
  1835
by (meson homeomorphic_def homeomorphic_sym linear_homeomorphism_image [OF assms])
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1836
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1837
lemma path_connected_Times:
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1838
  assumes "path_connected s" "path_connected t"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1839
    shows "path_connected (s \<times> t)"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1840
proof (simp add: path_connected_def Sigma_def, clarify)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1841
  fix x1 y1 x2 y2
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1842
  assume "x1 \<in> s" "y1 \<in> t" "x2 \<in> s" "y2 \<in> t"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1843
  obtain g where "path g" and g: "path_image g \<subseteq> s" and gs: "pathstart g = x1" and gf: "pathfinish g = x2"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1844
    using \<open>x1 \<in> s\<close> \<open>x2 \<in> s\<close> assms by (force simp: path_connected_def)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1845
  obtain h where "path h" and h: "path_image h \<subseteq> t" and hs: "pathstart h = y1" and hf: "pathfinish h = y2"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1846
    using \<open>y1 \<in> t\<close> \<open>y2 \<in> t\<close> assms by (force simp: path_connected_def)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1847
  have "path (\<lambda>z. (x1, h z))"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1848
    using \<open>path h\<close>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1849
    apply (simp add: path_def)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1850
    apply (rule continuous_on_compose2 [where f = h])
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1851
    apply (rule continuous_intros | force)+
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1852
    done
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1853
  moreover have "path (\<lambda>z. (g z, y2))"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1854
    using \<open>path g\<close>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1855
    apply (simp add: path_def)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1856
    apply (rule continuous_on_compose2 [where f = g])
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1857
    apply (rule continuous_intros | force)+
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1858
    done
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1859
  ultimately have 1: "path ((\<lambda>z. (x1, h z)) +++ (\<lambda>z. (g z, y2)))"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1860
    by (metis hf gs path_join_imp pathstart_def pathfinish_def)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1861
  have "path_image ((\<lambda>z. (x1, h z)) +++ (\<lambda>z. (g z, y2))) \<subseteq> path_image (\<lambda>z. (x1, h z)) \<union> path_image (\<lambda>z. (g z, y2))"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1862
    by (rule Path_Connected.path_image_join_subset)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1863
  also have "... \<subseteq> (\<Union>x\<in>s. \<Union>x1\<in>t. {(x, x1)})"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1864
    using g h \<open>x1 \<in> s\<close> \<open>y2 \<in> t\<close> by (force simp: path_image_def)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1865
  finally have 2: "path_image ((\<lambda>z. (x1, h z)) +++ (\<lambda>z. (g z, y2))) \<subseteq> (\<Union>x\<in>s. \<Union>x1\<in>t. {(x, x1)})" .
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1866
  show "\<exists>g. path g \<and> path_image g \<subseteq> (\<Union>x\<in>s. \<Union>x1\<in>t. {(x, x1)}) \<and>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1867
            pathstart g = (x1, y1) \<and> pathfinish g = (x2, y2)"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1868
    apply (intro exI conjI)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1869
       apply (rule 1)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1870
      apply (rule 2)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1871
     apply (metis hs pathstart_def pathstart_join)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1872
    by (metis gf pathfinish_def pathfinish_join)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1873
qed
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1874
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1875
lemma is_interval_path_connected_1:
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1876
  fixes s :: "real set"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1877
  shows "is_interval s \<longleftrightarrow> path_connected s"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1878
using is_interval_connected_1 is_interval_path_connected path_connected_imp_connected by blast
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1879
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1880
66793
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  1881
subsection\<open>Path components\<close>
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  1882
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1883
lemma Union_path_component [simp]:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1884
   "Union {path_component_set S x |x. x \<in> S} = S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1885
apply (rule subset_antisym)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1886
using path_component_subset apply force
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1887
using path_component_refl by auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1888
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1889
lemma path_component_disjoint:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1890
   "disjnt (path_component_set S a) (path_component_set S b) \<longleftrightarrow>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1891
    (a \<notin> path_component_set S b)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1892
apply (auto simp: disjnt_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1893
using path_component_eq apply fastforce
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1894
using path_component_sym path_component_trans by blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1895
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1896
lemma path_component_eq_eq:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1897
   "path_component S x = path_component S y \<longleftrightarrow>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1898
        (x \<notin> S) \<and> (y \<notin> S) \<or> x \<in> S \<and> y \<in> S \<and> path_component S x y"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1899
apply (rule iffI, metis (no_types) path_component_mem(1) path_component_refl)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1900
apply (erule disjE, metis Collect_empty_eq_bot path_component_eq_empty)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1901
apply (rule ext)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1902
apply (metis path_component_trans path_component_sym)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1903
done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1904
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1905
lemma path_component_unique:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1906
  assumes "x \<in> c" "c \<subseteq> S" "path_connected c"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1907
          "\<And>c'. \<lbrakk>x \<in> c'; c' \<subseteq> S; path_connected c'\<rbrakk> \<Longrightarrow> c' \<subseteq> c"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1908
   shows "path_component_set S x = c"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1909
apply (rule subset_antisym)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1910
using assms
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1911
apply (metis mem_Collect_eq subsetCE path_component_eq_eq path_component_subset path_connected_path_component)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1912
by (simp add: assms path_component_maximal)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1913
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1914
lemma path_component_intermediate_subset:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1915
   "path_component_set u a \<subseteq> t \<and> t \<subseteq> u
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1916
        \<Longrightarrow> path_component_set t a = path_component_set u a"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1917
by (metis (no_types) path_component_mono path_component_path_component subset_antisym)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1918
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1919
lemma complement_path_component_Union:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1920
  fixes x :: "'a :: topological_space"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1921
  shows "S - path_component_set S x =
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1922
         \<Union>({path_component_set S y| y. y \<in> S} - {path_component_set S x})"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1923
proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1924
  have *: "(\<And>x. x \<in> S - {a} \<Longrightarrow> disjnt a x) \<Longrightarrow> \<Union>S - a = \<Union>(S - {a})"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1925
    for a::"'a set" and S
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1926
    by (auto simp: disjnt_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1927
  have "\<And>y. y \<in> {path_component_set S x |x. x \<in> S} - {path_component_set S x}
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1928
            \<Longrightarrow> disjnt (path_component_set S x) y"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1929
    using path_component_disjoint path_component_eq by fastforce
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1930
  then have "\<Union>{path_component_set S x |x. x \<in> S} - path_component_set S x =
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1931
             \<Union>({path_component_set S y |y. y \<in> S} - {path_component_set S x})"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1932
    by (meson *)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1933
  then show ?thesis by simp
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1934
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1935
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1936
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1937
subsection \<open>Sphere is path-connected\<close>
37489
44e42d392c6e Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents: 36583
diff changeset
  1938
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1939
lemma path_connected_punctured_universe:
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1940
  assumes "2 \<le> DIM('a::euclidean_space)"
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1941
  shows "path_connected (- {a::'a})"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1942
proof -
50526
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 49654
diff changeset
  1943
  let ?A = "{x::'a. \<exists>i\<in>Basis. x \<bullet> i < a \<bullet> i}"
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 49654
diff changeset
  1944
  let ?B = "{x::'a. \<exists>i\<in>Basis. a \<bullet> i < x \<bullet> i}"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1945
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1946
  have A: "path_connected ?A"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1947
    unfolding Collect_bex_eq
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1948
  proof (rule path_connected_UNION)
50526
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 49654
diff changeset
  1949
    fix i :: 'a
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 49654
diff changeset
  1950
    assume "i \<in> Basis"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1951
    then show "(\<Sum>i\<in>Basis. (a \<bullet> i - 1)*\<^sub>R i) \<in> {x::'a. x \<bullet> i < a \<bullet> i}"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1952
      by simp
50526
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 49654
diff changeset
  1953
    show "path_connected {x. x \<bullet> i < a \<bullet> i}"
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 49654
diff changeset
  1954
      using convex_imp_path_connected [OF convex_halfspace_lt, of i "a \<bullet> i"]
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 49654
diff changeset
  1955
      by (simp add: inner_commute)
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1956
  qed
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1957
  have B: "path_connected ?B"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1958
    unfolding Collect_bex_eq
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1959
  proof (rule path_connected_UNION)
50526
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 49654
diff changeset
  1960
    fix i :: 'a
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 49654
diff changeset
  1961
    assume "i \<in> Basis"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1962
    then show "(\<Sum>i\<in>Basis. (a \<bullet> i + 1) *\<^sub>R i) \<in> {x::'a. a \<bullet> i < x \<bullet> i}"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1963
      by simp
50526
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 49654
diff changeset
  1964
    show "path_connected {x. a \<bullet> i < x \<bullet> i}"
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 49654
diff changeset
  1965
      using convex_imp_path_connected [OF convex_halfspace_gt, of "a \<bullet> i" i]
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 49654
diff changeset
  1966
      by (simp add: inner_commute)
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1967
  qed
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1968
  obtain S :: "'a set" where "S \<subseteq> Basis" and "card S = Suc (Suc 0)"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1969
    using ex_card[OF assms]
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1970
    by auto
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1971
  then obtain b0 b1 :: 'a where "b0 \<in> Basis" and "b1 \<in> Basis" and "b0 \<noteq> b1"
50526
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 49654
diff changeset
  1972
    unfolding card_Suc_eq by auto
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1973
  then have "a + b0 - b1 \<in> ?A \<inter> ?B"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1974
    by (auto simp: inner_simps inner_Basis)
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1975
  then have "?A \<inter> ?B \<noteq> {}"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1976
    by fast
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1977
  with A B have "path_connected (?A \<union> ?B)"
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1978
    by (rule path_connected_Un)
50526
899c9c4e4a4c Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents: 49654
diff changeset
  1979
  also have "?A \<union> ?B = {x. \<exists>i\<in>Basis. x \<bullet> i \<noteq> a \<bullet> i}"
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1980
    unfolding neq_iff bex_disj_distrib Collect_disj_eq ..
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1981
  also have "\<dots> = {x. x \<noteq> a}"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1982
    unfolding euclidean_eq_iff [where 'a='a]
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1983
    by (simp add: Bex_def)
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1984
  also have "\<dots> = - {a}"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1985
    by auto
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1986
  finally show ?thesis .
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1987
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1988
64006
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  1989
corollary connected_punctured_universe:
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  1990
  "2 \<le> DIM('N::euclidean_space) \<Longrightarrow> connected(- {a::'N})"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  1991
  by (simp add: path_connected_punctured_universe path_connected_imp_connected)
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  1992
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1993
lemma path_connected_sphere:
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1994
  fixes a :: "'a :: euclidean_space"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1995
  assumes "2 \<le> DIM('a)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1996
  shows "path_connected(sphere a r)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1997
proof (cases r "0::real" rule: linorder_cases)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  1998
  case less
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1999
  then show ?thesis
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2000
    by (simp add: path_connected_empty)
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  2001
next
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2002
  case equal
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  2003
  then show ?thesis
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2004
    by (simp add: path_connected_singleton)
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  2005
next
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2006
  case greater
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2007
  then have eq: "(sphere (0::'a) r) = (\<lambda>x. (r / norm x) *\<^sub>R x) ` (- {0::'a})"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2008
    by (force simp: image_iff split: if_split_asm)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2009
  have "continuous_on (- {0::'a}) (\<lambda>x. (r / norm x) *\<^sub>R x)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2010
    by (intro continuous_intros) auto
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2011
  then have "path_connected ((\<lambda>x. (r / norm x) *\<^sub>R x) ` (- {0::'a}))"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2012
    by (intro path_connected_continuous_image path_connected_punctured_universe assms)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2013
  with eq have "path_connected (sphere (0::'a) r)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2014
    by auto
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2015
  then have "path_connected(op +a ` (sphere (0::'a) r))"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2016
    by (simp add: path_connected_translation)
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  2017
  then show ?thesis
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2018
    by (metis add.right_neutral sphere_translation)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2019
qed
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2020
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2021
lemma connected_sphere:
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2022
    fixes a :: "'a :: euclidean_space"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2023
    assumes "2 \<le> DIM('a)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2024
      shows "connected(sphere a r)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2025
  using path_connected_sphere [OF assms]
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2026
  by (simp add: path_connected_imp_connected)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2027
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  2028
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2029
corollary path_connected_complement_bounded_convex:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2030
    fixes s :: "'a :: euclidean_space set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2031
    assumes "bounded s" "convex s" and 2: "2 \<le> DIM('a)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2032
    shows "path_connected (- s)"
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2033
proof (cases "s = {}")
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2034
  case True then show ?thesis
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2035
    using convex_imp_path_connected by auto
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2036
next
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2037
  case False
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2038
  then obtain a where "a \<in> s" by auto
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2039
  { fix x y assume "x \<notin> s" "y \<notin> s"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2040
    then have "x \<noteq> a" "y \<noteq> a" using \<open>a \<in> s\<close> by auto
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2041
    then have bxy: "bounded(insert x (insert y s))"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2042
      by (simp add: \<open>bounded s\<close>)
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2043
    then obtain B::real where B: "0 < B" and Bx: "norm (a - x) < B" and By: "norm (a - y) < B"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2044
                          and "s \<subseteq> ball a B"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2045
      using bounded_subset_ballD [OF bxy, of a] by (auto simp: dist_norm)
63040
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 63016
diff changeset
  2046
    define C where "C = B / norm(x - a)"
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2047
    { fix u
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2048
      assume u: "(1 - u) *\<^sub>R x + u *\<^sub>R (a + C *\<^sub>R (x - a)) \<in> s" and "0 \<le> u" "u \<le> 1"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2049
      have CC: "1 \<le> 1 + (C - 1) * u"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2050
        using \<open>x \<noteq> a\<close> \<open>0 \<le> u\<close>
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2051
        apply (simp add: C_def divide_simps norm_minus_commute)
61762
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  2052
        using Bx by auto
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2053
      have *: "\<And>v. (1 - u) *\<^sub>R x + u *\<^sub>R (a + v *\<^sub>R (x - a)) = a + (1 + (v - 1) * u) *\<^sub>R (x - a)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2054
        by (simp add: algebra_simps)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2055
      have "a + ((1 / (1 + C * u - u)) *\<^sub>R x + ((u / (1 + C * u - u)) *\<^sub>R a + (C * u / (1 + C * u - u)) *\<^sub>R x)) =
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2056
            (1 + (u / (1 + C * u - u))) *\<^sub>R a + ((1 / (1 + C * u - u)) + (C * u / (1 + C * u - u))) *\<^sub>R x"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2057
        by (simp add: algebra_simps)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2058
      also have "... = (1 + (u / (1 + C * u - u))) *\<^sub>R a + (1 + (u / (1 + C * u - u))) *\<^sub>R x"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2059
        using CC by (simp add: field_simps)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2060
      also have "... = x + (1 + (u / (1 + C * u - u))) *\<^sub>R a + (u / (1 + C * u - u)) *\<^sub>R x"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2061
        by (simp add: algebra_simps)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2062
      also have "... = x + ((1 / (1 + C * u - u)) *\<^sub>R a +
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2063
              ((u / (1 + C * u - u)) *\<^sub>R x + (C * u / (1 + C * u - u)) *\<^sub>R a))"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2064
        using CC by (simp add: field_simps) (simp add: add_divide_distrib scaleR_add_left)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2065
      finally have xeq: "(1 - 1 / (1 + (C - 1) * u)) *\<^sub>R a + (1 / (1 + (C - 1) * u)) *\<^sub>R (a + (1 + (C - 1) * u) *\<^sub>R (x - a)) = x"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2066
        by (simp add: algebra_simps)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2067
      have False
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2068
        using \<open>convex s\<close>
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2069
        apply (simp add: convex_alt)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2070
        apply (drule_tac x=a in bspec)
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2071
         apply (rule  \<open>a \<in> s\<close>)
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2072
        apply (drule_tac x="a + (1 + (C - 1) * u) *\<^sub>R (x - a)" in bspec)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2073
         using u apply (simp add: *)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2074
        apply (drule_tac x="1 / (1 + (C - 1) * u)" in spec)
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2075
        using \<open>x \<noteq> a\<close> \<open>x \<notin> s\<close> \<open>0 \<le> u\<close> CC
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2076
        apply (auto simp: xeq)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2077
        done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2078
    }
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2079
    then have pcx: "path_component (- s) x (a + C *\<^sub>R (x - a))"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2080
      by (force simp: closed_segment_def intro!: path_connected_linepath)
63040
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 63016
diff changeset
  2081
    define D where "D = B / norm(y - a)"  \<comment>\<open>massive duplication with the proof above\<close>
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2082
    { fix u
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2083
      assume u: "(1 - u) *\<^sub>R y + u *\<^sub>R (a + D *\<^sub>R (y - a)) \<in> s" and "0 \<le> u" "u \<le> 1"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2084
      have DD: "1 \<le> 1 + (D - 1) * u"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2085
        using \<open>y \<noteq> a\<close> \<open>0 \<le> u\<close>
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2086
        apply (simp add: D_def divide_simps norm_minus_commute)
61762
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  2087
        using By by auto
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2088
      have *: "\<And>v. (1 - u) *\<^sub>R y + u *\<^sub>R (a + v *\<^sub>R (y - a)) = a + (1 + (v - 1) * u) *\<^sub>R (y - a)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2089
        by (simp add: algebra_simps)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2090
      have "a + ((1 / (1 + D * u - u)) *\<^sub>R y + ((u / (1 + D * u - u)) *\<^sub>R a + (D * u / (1 + D * u - u)) *\<^sub>R y)) =
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2091
            (1 + (u / (1 + D * u - u))) *\<^sub>R a + ((1 / (1 + D * u - u)) + (D * u / (1 + D * u - u))) *\<^sub>R y"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2092
        by (simp add: algebra_simps)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2093
      also have "... = (1 + (u / (1 + D * u - u))) *\<^sub>R a + (1 + (u / (1 + D * u - u))) *\<^sub>R y"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2094
        using DD by (simp add: field_simps)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2095
      also have "... = y + (1 + (u / (1 + D * u - u))) *\<^sub>R a + (u / (1 + D * u - u)) *\<^sub>R y"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2096
        by (simp add: algebra_simps)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2097
      also have "... = y + ((1 / (1 + D * u - u)) *\<^sub>R a +
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2098
              ((u / (1 + D * u - u)) *\<^sub>R y + (D * u / (1 + D * u - u)) *\<^sub>R a))"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2099
        using DD by (simp add: field_simps) (simp add: add_divide_distrib scaleR_add_left)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2100
      finally have xeq: "(1 - 1 / (1 + (D - 1) * u)) *\<^sub>R a + (1 / (1 + (D - 1) * u)) *\<^sub>R (a + (1 + (D - 1) * u) *\<^sub>R (y - a)) = y"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2101
        by (simp add: algebra_simps)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2102
      have False
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2103
        using \<open>convex s\<close>
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2104
        apply (simp add: convex_alt)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2105
        apply (drule_tac x=a in bspec)
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2106
         apply (rule  \<open>a \<in> s\<close>)
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2107
        apply (drule_tac x="a + (1 + (D - 1) * u) *\<^sub>R (y - a)" in bspec)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2108
         using u apply (simp add: *)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2109
        apply (drule_tac x="1 / (1 + (D - 1) * u)" in spec)
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2110
        using \<open>y \<noteq> a\<close> \<open>y \<notin> s\<close> \<open>0 \<le> u\<close> DD
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2111
        apply (auto simp: xeq)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2112
        done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2113
    }
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2114
    then have pdy: "path_component (- s) y (a + D *\<^sub>R (y - a))"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2115
      by (force simp: closed_segment_def intro!: path_connected_linepath)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2116
    have pyx: "path_component (- s) (a + D *\<^sub>R (y - a)) (a + C *\<^sub>R (x - a))"
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2117
      apply (rule path_component_of_subset [of "sphere a B"])
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2118
       using \<open>s \<subseteq> ball a B\<close>
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2119
       apply (force simp: ball_def dist_norm norm_minus_commute)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2120
      apply (rule path_connected_sphere [OF 2, of a B, simplified path_connected_component, rule_format])
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2121
       using \<open>x \<noteq> a\<close>  using \<open>y \<noteq> a\<close>  B apply (auto simp: dist_norm C_def D_def)
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2122
      done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2123
    have "path_component (- s) x y"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2124
      by (metis path_component_trans path_component_sym pcx pdy pyx)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2125
  }
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2126
  then show ?thesis
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2127
    by (auto simp: path_connected_component)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2128
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2129
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2130
lemma connected_complement_bounded_convex:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2131
    fixes s :: "'a :: euclidean_space set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2132
    assumes "bounded s" "convex s" "2 \<le> DIM('a)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2133
      shows  "connected (- s)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2134
  using path_connected_complement_bounded_convex [OF assms] path_connected_imp_connected by blast
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2135
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2136
lemma connected_diff_ball:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2137
    fixes s :: "'a :: euclidean_space set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2138
    assumes "connected s" "cball a r \<subseteq> s" "2 \<le> DIM('a)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2139
      shows "connected (s - ball a r)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2140
  apply (rule connected_diff_open_from_closed [OF ball_subset_cball])
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2141
  using assms connected_sphere
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2142
  apply (auto simp: cball_diff_eq_sphere dist_norm)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2143
  done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2144
62381
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2145
proposition connected_open_delete:
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2146
  assumes "open S" "connected S" and 2: "2 \<le> DIM('N::euclidean_space)"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2147
    shows "connected(S - {a::'N})"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2148
proof (cases "a \<in> S")
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2149
  case True
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2150
  with \<open>open S\<close> obtain \<epsilon> where "\<epsilon> > 0" and \<epsilon>: "cball a \<epsilon> \<subseteq> S"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2151
    using open_contains_cball_eq by blast
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2152
  have "dist a (a + \<epsilon> *\<^sub>R (SOME i. i \<in> Basis)) = \<epsilon>"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2153
    by (simp add: dist_norm SOME_Basis \<open>0 < \<epsilon>\<close> less_imp_le)
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2154
  with \<epsilon> have "\<Inter>{S - ball a r |r. 0 < r \<and> r < \<epsilon>} \<subseteq> {} \<Longrightarrow> False"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2155
    apply (drule_tac c="a + scaleR (\<epsilon>) ((SOME i. i \<in> Basis))" in subsetD)
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2156
    by auto
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2157
  then have nonemp: "(\<Inter>{S - ball a r |r. 0 < r \<and> r < \<epsilon>}) = {} \<Longrightarrow> False"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2158
    by auto
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2159
  have con: "\<And>r. r < \<epsilon> \<Longrightarrow> connected (S - ball a r)"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2160
    using \<epsilon> by (force intro: connected_diff_ball [OF \<open>connected S\<close> _ 2])
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2161
  have "x \<in> \<Union>{S - ball a r |r. 0 < r \<and> r < \<epsilon>}" if "x \<in> S - {a}" for x
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2162
    apply (rule UnionI [of "S - ball a (min \<epsilon> (dist a x) / 2)"])
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2163
     using that \<open>0 < \<epsilon>\<close> apply (simp_all add:)
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2164
    apply (rule_tac x="min \<epsilon> (dist a x) / 2" in exI)
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2165
    apply auto
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2166
    done
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2167
  then have "S - {a} = \<Union>{S - ball a r | r. 0 < r \<and> r < \<epsilon>}"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2168
    by auto
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2169
  then show ?thesis
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2170
    by (auto intro: connected_Union con dest!: nonemp)
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2171
next
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2172
  case False then show ?thesis
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2173
    by (simp add: \<open>connected S\<close>)
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2174
qed
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2175
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2176
corollary path_connected_open_delete:
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2177
  assumes "open S" "connected S" and 2: "2 \<le> DIM('N::euclidean_space)"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2178
    shows "path_connected(S - {a::'N})"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2179
by (simp add: assms connected_open_delete connected_open_path_connected open_delete)
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2180
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2181
corollary path_connected_punctured_ball:
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2182
   "2 \<le> DIM('N::euclidean_space) \<Longrightarrow> path_connected(ball a r - {a::'N})"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2183
by (simp add: path_connected_open_delete)
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2184
63151
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2185
corollary connected_punctured_ball:
62381
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2186
   "2 \<le> DIM('N::euclidean_space) \<Longrightarrow> connected(ball a r - {a::'N})"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2187
by (simp add: connected_open_delete)
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2188
63151
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2189
corollary connected_open_delete_finite:
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2190
  fixes S T::"'a::euclidean_space set"
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2191
  assumes S: "open S" "connected S" and 2: "2 \<le> DIM('a)" and "finite T"
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  2192
  shows "connected(S - T)"
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  2193
  using \<open>finite T\<close> S
63151
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2194
proof (induct T)
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2195
  case empty
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2196
  show ?case using \<open>connected S\<close> by simp
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2197
next
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2198
  case (insert x F)
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2199
  then have "connected (S-F)" by auto
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2200
  moreover have "open (S - F)" using finite_imp_closed[OF \<open>finite F\<close>] \<open>open S\<close> by auto
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2201
  ultimately have "connected (S - F - {x})" using connected_open_delete[OF _ _ 2] by auto
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2202
  thus ?case by (metis Diff_insert)
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2203
qed
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2204
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2205
lemma sphere_1D_doubleton_zero:
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2206
  assumes 1: "DIM('a) = 1" and "r > 0"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2207
  obtains x y::"'a::euclidean_space"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2208
    where "sphere 0 r = {x,y} \<and> dist x y = 2*r"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2209
proof -
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2210
  obtain b::'a where b: "Basis = {b}"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2211
    using 1 card_1_singletonE by blast
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2212
  show ?thesis
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2213
  proof (intro that conjI)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2214
    have "x = norm x *\<^sub>R b \<or> x = - norm x *\<^sub>R b" if "r = norm x" for x
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2215
    proof -
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2216
      have xb: "(x \<bullet> b) *\<^sub>R b = x"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2217
        using euclidean_representation [of x, unfolded b] by force
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2218
      then have "norm ((x \<bullet> b) *\<^sub>R b) = norm x"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2219
        by simp
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2220
      with b have "\<bar>x \<bullet> b\<bar> = norm x"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2221
        using norm_Basis by fastforce
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2222
      with xb show ?thesis
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2223
        apply (simp add: abs_if split: if_split_asm)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2224
        apply (metis add.inverse_inverse real_vector.scale_minus_left xb)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2225
        done
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2226
    qed
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2227
    with \<open>r > 0\<close> b show "sphere 0 r = {r *\<^sub>R b, - r *\<^sub>R b}"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2228
      by (force simp: sphere_def dist_norm)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2229
    have "dist (r *\<^sub>R b) (- r *\<^sub>R b) = norm (r *\<^sub>R b + r *\<^sub>R b)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2230
      by (simp add: dist_norm)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2231
    also have "... = norm ((2*r) *\<^sub>R b)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2232
      by (metis mult_2 scaleR_add_left)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2233
    also have "... = 2*r"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2234
      using \<open>r > 0\<close> b norm_Basis by fastforce
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2235
    finally show "dist (r *\<^sub>R b) (- r *\<^sub>R b) = 2*r" .
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2236
  qed
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2237
qed
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2238
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2239
lemma sphere_1D_doubleton:
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2240
  fixes a :: "'a :: euclidean_space"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2241
  assumes "DIM('a) = 1" and "r > 0"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2242
  obtains x y where "sphere a r = {x,y} \<and> dist x y = 2*r"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2243
proof -
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2244
  have "sphere a r = op +a ` sphere 0 r"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2245
    by (metis add.right_neutral sphere_translation)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2246
  then show ?thesis
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2247
    using sphere_1D_doubleton_zero [OF assms]
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2248
    by (metis (mono_tags, lifting) dist_add_cancel image_empty image_insert that)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2249
qed
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2250
64006
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2251
lemma psubset_sphere_Compl_connected:
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2252
  fixes S :: "'a::euclidean_space set"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2253
  assumes S: "S \<subset> sphere a r" and "0 < r" and 2: "2 \<le> DIM('a)"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2254
  shows "connected(- S)"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2255
proof -
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2256
  have "S \<subseteq> sphere a r"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2257
    using S by blast
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2258
  obtain b where "dist a b = r" and "b \<notin> S"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2259
    using S mem_sphere by blast
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2260
  have CS: "- S = {x. dist a x \<le> r \<and> (x \<notin> S)} \<union> {x. r \<le> dist a x \<and> (x \<notin> S)}"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2261
    by (auto simp: )
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2262
  have "{x. dist a x \<le> r \<and> x \<notin> S} \<inter> {x. r \<le> dist a x \<and> x \<notin> S} \<noteq> {}"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2263
    using \<open>b \<notin> S\<close> \<open>dist a b = r\<close> by blast
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2264
  moreover have "connected {x. dist a x \<le> r \<and> x \<notin> S}"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2265
    apply (rule connected_intermediate_closure [of "ball a r"])
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2266
    using assms by auto
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2267
  moreover
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2268
  have "connected {x. r \<le> dist a x \<and> x \<notin> S}"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2269
    apply (rule connected_intermediate_closure [of "- cball a r"])
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2270
    using assms apply (auto intro: connected_complement_bounded_convex)
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2271
    apply (metis ComplI interior_cball interior_closure mem_ball not_less)
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2272
    done
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2273
  ultimately show ?thesis
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2274
    by (simp add: CS connected_Un)
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2275
qed
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2276
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2277
66793
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2278
subsection\<open>Every annulus is a connected set\<close>
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2279
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2280
lemma path_connected_2DIM_I:
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2281
  fixes a :: "'N::euclidean_space"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2282
  assumes 2: "2 \<le> DIM('N)" and pc: "path_connected {r. 0 \<le> r \<and> P r}"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2283
  shows "path_connected {x. P(norm(x - a))}"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2284
proof -
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2285
  have "{x. P(norm(x - a))} = op+a ` {x. P(norm x)}"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2286
    by force
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2287
  moreover have "path_connected {x::'N. P(norm x)}"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2288
  proof -
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2289
    let ?D = "{x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2290
    have "x \<in> (\<lambda>z. fst z *\<^sub>R snd z) ` ?D"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2291
      if "P (norm x)" for x::'N
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2292
    proof (cases "x=0")
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2293
      case True
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2294
      with that show ?thesis
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2295
        apply (simp add: image_iff)
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2296
        apply (rule_tac x=0 in exI, simp)
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2297
        using vector_choose_size zero_le_one by blast
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2298
    next
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2299
      case False
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2300
      with that show ?thesis
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2301
        by (rule_tac x="(norm x, x /\<^sub>R norm x)" in image_eqI) auto
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2302
    qed
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2303
    then have *: "{x::'N. P(norm x)} =  (\<lambda>z. fst z *\<^sub>R snd z) ` ?D"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2304
      by auto
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2305
    have "continuous_on ?D (\<lambda>z:: real\<times>'N. fst z *\<^sub>R snd z)"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2306
      by (intro continuous_intros)
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2307
    moreover have "path_connected ?D"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2308
      by (metis path_connected_Times [OF pc] path_connected_sphere 2)
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2309
    ultimately show ?thesis
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2310
      apply (subst *)
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2311
      apply (rule path_connected_continuous_image, auto)
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2312
      done
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2313
  qed
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2314
  ultimately show ?thesis
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2315
    using path_connected_translation by metis
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2316
qed
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2317
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2318
lemma path_connected_annulus:
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2319
  fixes a :: "'N::euclidean_space"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2320
  assumes "2 \<le> DIM('N)"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2321
  shows "path_connected {x. r1 < norm(x - a) \<and> norm(x - a) < r2}"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2322
        "path_connected {x. r1 < norm(x - a) \<and> norm(x - a) \<le> r2}"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2323
        "path_connected {x. r1 \<le> norm(x - a) \<and> norm(x - a) < r2}"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2324
        "path_connected {x. r1 \<le> norm(x - a) \<and> norm(x - a) \<le> r2}"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2325
  by (auto simp: is_interval_def intro!: is_interval_convex convex_imp_path_connected path_connected_2DIM_I [OF assms])
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2326
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2327
lemma connected_annulus:
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2328
  fixes a :: "'N::euclidean_space"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2329
  assumes "2 \<le> DIM('N::euclidean_space)"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2330
  shows "connected {x. r1 < norm(x - a) \<and> norm(x - a) < r2}"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2331
        "connected {x. r1 < norm(x - a) \<and> norm(x - a) \<le> r2}"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2332
        "connected {x. r1 \<le> norm(x - a) \<and> norm(x - a) < r2}"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2333
        "connected {x. r1 \<le> norm(x - a) \<and> norm(x - a) \<le> r2}"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2334
  by (auto simp: path_connected_annulus [OF assms] path_connected_imp_connected)
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2335
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2336
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2337
subsection\<open>Relations between components and path components\<close>
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2338
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2339
lemma open_connected_component:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2340
  fixes s :: "'a::real_normed_vector set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2341
  shows "open s \<Longrightarrow> open (connected_component_set s x)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2342
    apply (simp add: open_contains_ball, clarify)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2343
    apply (rename_tac y)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2344
    apply (drule_tac x=y in bspec)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2345
     apply (simp add: connected_component_in, clarify)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2346
    apply (rule_tac x=e in exI)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2347
    by (metis mem_Collect_eq connected_component_eq connected_component_maximal centre_in_ball connected_ball)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2348
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2349
corollary open_components:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2350
    fixes s :: "'a::real_normed_vector set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2351
    shows "\<lbrakk>open u; s \<in> components u\<rbrakk> \<Longrightarrow> open s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2352
  by (simp add: components_iff) (metis open_connected_component)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2353
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2354
lemma in_closure_connected_component:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2355
  fixes s :: "'a::real_normed_vector set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2356
  assumes x: "x \<in> s" and s: "open s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2357
  shows "x \<in> closure (connected_component_set s y) \<longleftrightarrow>  x \<in> connected_component_set s y"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2358
proof -
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2359
  { assume "x \<in> closure (connected_component_set s y)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2360
    moreover have "x \<in> connected_component_set s x"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2361
      using x by simp
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2362
    ultimately have "x \<in> connected_component_set s y"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2363
      using s by (meson Compl_disjoint closure_iff_nhds_not_empty connected_component_disjoint disjoint_eq_subset_Compl open_connected_component)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2364
  }
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2365
  then show ?thesis
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2366
    by (auto simp: closure_def)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2367
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2368
63114
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2369
lemma connected_disjoint_Union_open_pick:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2370
  assumes "pairwise disjnt B"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2371
          "\<And>S. S \<in> A \<Longrightarrow> connected S \<and> S \<noteq> {}"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2372
          "\<And>S. S \<in> B \<Longrightarrow> open S"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2373
          "\<Union>A \<subseteq> \<Union>B"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2374
          "S \<in> A"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2375
  obtains T where "T \<in> B" "S \<subseteq> T" "S \<inter> \<Union>(B - {T}) = {}"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2376
proof -
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2377
  have "S \<subseteq> \<Union>B" "connected S" "S \<noteq> {}"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2378
    using assms \<open>S \<in> A\<close> by blast+
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2379
  then obtain T where "T \<in> B" "S \<inter> T \<noteq> {}"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2380
    by (metis Sup_inf_eq_bot_iff inf.absorb_iff2 inf_commute)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2381
  have 1: "open T" by (simp add: \<open>T \<in> B\<close> assms)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2382
  have 2: "open (\<Union>(B-{T}))" using assms by blast
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2383
  have 3: "S \<subseteq> T \<union> \<Union>(B - {T})" using \<open>S \<subseteq> \<Union>B\<close> by blast
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2384
  have "T \<inter> \<Union>(B - {T}) = {}" using \<open>T \<in> B\<close> \<open>pairwise disjnt B\<close>
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2385
    by (auto simp: pairwise_def disjnt_def)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2386
  then have 4: "T \<inter> \<Union>(B - {T}) \<inter> S = {}" by auto
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2387
  from connectedD [OF \<open>connected S\<close> 1 2 3 4]
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2388
  have "S \<inter> \<Union>(B-{T}) = {}"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2389
    by (auto simp: Int_commute \<open>S \<inter> T \<noteq> {}\<close>)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2390
  with \<open>T \<in> B\<close> have "S \<subseteq> T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2391
    using "3" by auto
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2392
  show ?thesis
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2393
    using \<open>S \<inter> \<Union>(B - {T}) = {}\<close> \<open>S \<subseteq> T\<close> \<open>T \<in> B\<close> that by auto
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2394
qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2395
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2396
lemma connected_disjoint_Union_open_subset:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2397
  assumes A: "pairwise disjnt A" and B: "pairwise disjnt B"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2398
      and SA: "\<And>S. S \<in> A \<Longrightarrow> open S \<and> connected S \<and> S \<noteq> {}"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2399
      and SB: "\<And>S. S \<in> B \<Longrightarrow> open S \<and> connected S \<and> S \<noteq> {}"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2400
      and eq [simp]: "\<Union>A = \<Union>B"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2401
    shows "A \<subseteq> B"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2402
proof
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2403
  fix S
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2404
  assume "S \<in> A"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2405
  obtain T where "T \<in> B" "S \<subseteq> T" "S \<inter> \<Union>(B - {T}) = {}"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2406
      apply (rule connected_disjoint_Union_open_pick [OF B, of A])
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2407
      using SA SB \<open>S \<in> A\<close> by auto
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2408
  moreover obtain S' where "S' \<in> A" "T \<subseteq> S'" "T \<inter> \<Union>(A - {S'}) = {}"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2409
      apply (rule connected_disjoint_Union_open_pick [OF A, of B])
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2410
      using SA SB \<open>T \<in> B\<close> by auto
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2411
  ultimately have "S' = S"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2412
    by (metis A Int_subset_iff SA \<open>S \<in> A\<close> disjnt_def inf.orderE pairwise_def)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2413
  with \<open>T \<subseteq> S'\<close> have "T \<subseteq> S" by simp
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2414
  with \<open>S \<subseteq> T\<close> have "S = T" by blast
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2415
  with \<open>T \<in> B\<close> show "S \<in> B" by simp
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2416
qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2417
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2418
lemma connected_disjoint_Union_open_unique:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2419
  assumes A: "pairwise disjnt A" and B: "pairwise disjnt B"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2420
      and SA: "\<And>S. S \<in> A \<Longrightarrow> open S \<and> connected S \<and> S \<noteq> {}"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2421
      and SB: "\<And>S. S \<in> B \<Longrightarrow> open S \<and> connected S \<and> S \<noteq> {}"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2422
      and eq [simp]: "\<Union>A = \<Union>B"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2423
    shows "A = B"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2424
by (rule subset_antisym; metis connected_disjoint_Union_open_subset assms)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2425
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2426
proposition components_open_unique:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2427
 fixes S :: "'a::real_normed_vector set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2428
  assumes "pairwise disjnt A" "\<Union>A = S"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2429
          "\<And>X. X \<in> A \<Longrightarrow> open X \<and> connected X \<and> X \<noteq> {}"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2430
    shows "components S = A"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2431
proof -
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2432
  have "open S" using assms by blast
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2433
  show ?thesis
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2434
    apply (rule connected_disjoint_Union_open_unique)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2435
    apply (simp add: components_eq disjnt_def pairwise_def)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2436
    using \<open>open S\<close>
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2437
    apply (simp_all add: assms open_components in_components_connected in_components_nonempty)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2438
    done
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2439
qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2440
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2441
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2442
subsection\<open>Existence of unbounded components\<close>
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2443
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2444
lemma cobounded_unbounded_component:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2445
    fixes s :: "'a :: euclidean_space set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2446
    assumes "bounded (-s)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2447
      shows "\<exists>x. x \<in> s \<and> ~ bounded (connected_component_set s x)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2448
proof -
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2449
  obtain i::'a where i: "i \<in> Basis"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2450
    using nonempty_Basis by blast
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2451
  obtain B where B: "B>0" "-s \<subseteq> ball 0 B"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2452
    using bounded_subset_ballD [OF assms, of 0] by auto
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2453
  then have *: "\<And>x. B \<le> norm x \<Longrightarrow> x \<in> s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2454
    by (force simp add: ball_def dist_norm)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2455
  have unbounded_inner: "~ bounded {x. inner i x \<ge> B}"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2456
    apply (auto simp: bounded_def dist_norm)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2457
    apply (rule_tac x="x + (max B e + 1 + \<bar>i \<bullet> x\<bar>) *\<^sub>R i" in exI)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2458
    apply simp
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2459
    using i
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2460
    apply (auto simp: algebra_simps)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2461
    done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2462
  have **: "{x. B \<le> i \<bullet> x} \<subseteq> connected_component_set s (B *\<^sub>R i)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2463
    apply (rule connected_component_maximal)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2464
    apply (auto simp: i intro: convex_connected convex_halfspace_ge [of B])
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2465
    apply (rule *)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2466
    apply (rule order_trans [OF _ Basis_le_norm [OF i]])
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2467
    by (simp add: inner_commute)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2468
  have "B *\<^sub>R i \<in> s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2469
    by (rule *) (simp add: norm_Basis [OF i])
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2470
  then show ?thesis
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2471
    apply (rule_tac x="B *\<^sub>R i" in exI, clarify)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2472
    apply (frule bounded_subset [of _ "{x. B \<le> i \<bullet> x}", OF _ **])
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2473
    using unbounded_inner apply blast
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2474
    done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2475
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2476
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2477
lemma cobounded_unique_unbounded_component:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2478
    fixes s :: "'a :: euclidean_space set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2479
    assumes bs: "bounded (-s)" and "2 \<le> DIM('a)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2480
        and bo: "~ bounded(connected_component_set s x)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2481
                "~ bounded(connected_component_set s y)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2482
      shows "connected_component_set s x = connected_component_set s y"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2483
proof -
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2484
  obtain i::'a where i: "i \<in> Basis"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2485
    using nonempty_Basis by blast
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2486
  obtain B where B: "B>0" "-s \<subseteq> ball 0 B"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2487
    using bounded_subset_ballD [OF bs, of 0] by auto
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2488
  then have *: "\<And>x. B \<le> norm x \<Longrightarrow> x \<in> s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2489
    by (force simp add: ball_def dist_norm)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2490
  have ccb: "connected (- ball 0 B :: 'a set)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2491
    using assms by (auto intro: connected_complement_bounded_convex)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2492
  obtain x' where x': "connected_component s x x'" "norm x' > B"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2493
    using bo [unfolded bounded_def dist_norm, simplified, rule_format]
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2494
    by (metis diff_zero norm_minus_commute not_less)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2495
  obtain y' where y': "connected_component s y y'" "norm y' > B"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2496
    using bo [unfolded bounded_def dist_norm, simplified, rule_format]
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2497
    by (metis diff_zero norm_minus_commute not_less)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2498
  have x'y': "connected_component s x' y'"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2499
    apply (simp add: connected_component_def)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2500
    apply (rule_tac x="- ball 0 B" in exI)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2501
    using x' y'
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2502
    apply (auto simp: ccb dist_norm *)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2503
    done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2504
  show ?thesis
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2505
    apply (rule connected_component_eq)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2506
    using x' y' x'y'
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2507
    by (metis (no_types, lifting) connected_component_eq_empty connected_component_eq_eq connected_component_idemp connected_component_in)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2508
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2509
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2510
lemma cobounded_unbounded_components:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2511
    fixes s :: "'a :: euclidean_space set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2512
    shows "bounded (-s) \<Longrightarrow> \<exists>c. c \<in> components s \<and> ~bounded c"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2513
  by (metis cobounded_unbounded_component components_def imageI)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2514
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2515
lemma cobounded_unique_unbounded_components:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2516
    fixes s :: "'a :: euclidean_space set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2517
    shows  "\<lbrakk>bounded (- s); c \<in> components s; \<not> bounded c; c' \<in> components s; \<not> bounded c'; 2 \<le> DIM('a)\<rbrakk> \<Longrightarrow> c' = c"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2518
  unfolding components_iff
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2519
  by (metis cobounded_unique_unbounded_component)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2520
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2521
lemma cobounded_has_bounded_component:
64122
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  2522
  fixes S :: "'a :: euclidean_space set"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  2523
  assumes "bounded (- S)" "\<not> connected S" "2 \<le> DIM('a)"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  2524
  obtains C where "C \<in> components S" "bounded C"
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  2525
  by (meson cobounded_unique_unbounded_components connected_eq_connected_components_eq assms)
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2526
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2527
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2528
section\<open>The "inside" and "outside" of a set\<close>
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2529
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2530
text\<open>The inside comprises the points in a bounded connected component of the set's complement.
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2531
  The outside comprises the points in unbounded connected component of the complement.\<close>
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2532
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2533
definition inside where
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2534
  "inside s \<equiv> {x. (x \<notin> s) \<and> bounded(connected_component_set ( - s) x)}"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2535
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2536
definition outside where
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2537
  "outside s \<equiv> -s \<inter> {x. ~ bounded(connected_component_set (- s) x)}"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2538
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2539
lemma outside: "outside s = {x. ~ bounded(connected_component_set (- s) x)}"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2540
  by (auto simp: outside_def) (metis Compl_iff bounded_empty connected_component_eq_empty)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2541
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2542
lemma inside_no_overlap [simp]: "inside s \<inter> s = {}"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2543
  by (auto simp: inside_def)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2544
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2545
lemma outside_no_overlap [simp]:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2546
   "outside s \<inter> s = {}"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2547
  by (auto simp: outside_def)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2548
63955
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  2549
lemma inside_Int_outside [simp]: "inside s \<inter> outside s = {}"
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2550
  by (auto simp: inside_def outside_def)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2551
63955
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  2552
lemma inside_Un_outside [simp]: "inside s \<union> outside s = (- s)"
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2553
  by (auto simp: inside_def outside_def)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2554
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2555
lemma inside_eq_outside:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2556
   "inside s = outside s \<longleftrightarrow> s = UNIV"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2557
  by (auto simp: inside_def outside_def)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2558
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2559
lemma inside_outside: "inside s = (- (s \<union> outside s))"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2560
  by (force simp add: inside_def outside)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2561
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2562
lemma outside_inside: "outside s = (- (s \<union> inside s))"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2563
  by (auto simp: inside_outside) (metis IntI equals0D outside_no_overlap)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2564
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2565
lemma union_with_inside: "s \<union> inside s = - outside s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2566
  by (auto simp: inside_outside) (simp add: outside_inside)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2567
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2568
lemma union_with_outside: "s \<union> outside s = - inside s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2569
  by (simp add: inside_outside)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2570
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2571
lemma outside_mono: "s \<subseteq> t \<Longrightarrow> outside t \<subseteq> outside s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2572
  by (auto simp: outside bounded_subset connected_component_mono)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2573
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2574
lemma inside_mono: "s \<subseteq> t \<Longrightarrow> inside s - t \<subseteq> inside t"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2575
  by (auto simp: inside_def bounded_subset connected_component_mono)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2576
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2577
lemma segment_bound_lemma:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2578
  fixes u::real
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2579
  assumes "x \<ge> B" "y \<ge> B" "0 \<le> u" "u \<le> 1"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2580
  shows "(1 - u) * x + u * y \<ge> B"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2581
proof -
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2582
  obtain dx dy where "dx \<ge> 0" "dy \<ge> 0" "x = B + dx" "y = B + dy"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2583
    using assms by auto (metis add.commute diff_add_cancel)
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2584
  with \<open>0 \<le> u\<close> \<open>u \<le> 1\<close> show ?thesis
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2585
    by (simp add: add_increasing2 mult_left_le field_simps)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2586
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2587
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2588
lemma cobounded_outside:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2589
  fixes s :: "'a :: real_normed_vector set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2590
  assumes "bounded s" shows "bounded (- outside s)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2591
proof -
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2592
  obtain B where B: "B>0" "s \<subseteq> ball 0 B"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2593
    using bounded_subset_ballD [OF assms, of 0] by auto
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2594
  { fix x::'a and C::real
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2595
    assume Bno: "B \<le> norm x" and C: "0 < C"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2596
    have "\<exists>y. connected_component (- s) x y \<and> norm y > C"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2597
    proof (cases "x = 0")
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2598
      case True with B Bno show ?thesis by force
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2599
    next
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2600
      case False with B C show ?thesis
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2601
        apply (rule_tac x="((B+C)/norm x) *\<^sub>R x" in exI)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2602
        apply (simp add: connected_component_def)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2603
        apply (rule_tac x="closed_segment x (((B+C)/norm x) *\<^sub>R x)" in exI)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2604
        apply simp
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2605
        apply (rule_tac y="- ball 0 B" in order_trans)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2606
         prefer 2 apply force
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2607
        apply (simp add: closed_segment_def ball_def dist_norm, clarify)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2608
        apply (simp add: real_vector_class.scaleR_add_left [symmetric] divide_simps)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2609
        using segment_bound_lemma [of B "norm x" "B+C" ] Bno
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2610
        by (meson le_add_same_cancel1 less_eq_real_def not_le)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2611
    qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2612
  }
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2613
  then show ?thesis
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2614
    apply (simp add: outside_def assms)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2615
    apply (rule bounded_subset [OF bounded_ball [of 0 B]])
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2616
    apply (force simp add: dist_norm not_less bounded_pos)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2617
    done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2618
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2619
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2620
lemma unbounded_outside:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2621
    fixes s :: "'a::{real_normed_vector, perfect_space} set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2622
    shows "bounded s \<Longrightarrow> ~ bounded(outside s)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2623
  using cobounded_imp_unbounded cobounded_outside by blast
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2624
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2625
lemma bounded_inside:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2626
    fixes s :: "'a::{real_normed_vector, perfect_space} set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2627
    shows "bounded s \<Longrightarrow> bounded(inside s)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2628
  by (simp add: bounded_Int cobounded_outside inside_outside)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2629
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2630
lemma connected_outside:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2631
    fixes s :: "'a::euclidean_space set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2632
    assumes "bounded s" "2 \<le> DIM('a)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2633
      shows "connected(outside s)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2634
  apply (simp add: connected_iff_connected_component, clarify)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2635
  apply (simp add: outside)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2636
  apply (rule_tac s="connected_component_set (- s) x" in connected_component_of_subset)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2637
  apply (metis (no_types) assms cobounded_unbounded_component cobounded_unique_unbounded_component connected_component_eq_eq connected_component_idemp double_complement mem_Collect_eq)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2638
  apply clarify
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2639
  apply (metis connected_component_eq_eq connected_component_in)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2640
  done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2641
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2642
lemma outside_connected_component_lt:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2643
    "outside s = {x. \<forall>B. \<exists>y. B < norm(y) \<and> connected_component (- s) x y}"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2644
apply (auto simp: outside bounded_def dist_norm)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2645
apply (metis diff_0 norm_minus_cancel not_less)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2646
by (metis less_diff_eq norm_minus_commute norm_triangle_ineq2 order.trans pinf(6))
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2647
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2648
lemma outside_connected_component_le:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2649
   "outside s =
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2650
            {x. \<forall>B. \<exists>y. B \<le> norm(y) \<and>
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2651
                         connected_component (- s) x y}"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2652
apply (simp add: outside_connected_component_lt)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2653
apply (simp add: Set.set_eq_iff)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2654
by (meson gt_ex leD le_less_linear less_imp_le order.trans)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2655
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2656
lemma not_outside_connected_component_lt:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2657
    fixes s :: "'a::euclidean_space set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2658
    assumes s: "bounded s" and "2 \<le> DIM('a)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2659
      shows "- (outside s) = {x. \<forall>B. \<exists>y. B < norm(y) \<and> ~ (connected_component (- s) x y)}"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2660
proof -
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2661
  obtain B::real where B: "0 < B" and Bno: "\<And>x. x \<in> s \<Longrightarrow> norm x \<le> B"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2662
    using s [simplified bounded_pos] by auto
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2663
  { fix y::'a and z::'a
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2664
    assume yz: "B < norm z" "B < norm y"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2665
    have "connected_component (- cball 0 B) y z"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2666
      apply (rule connected_componentI [OF _ subset_refl])
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2667
      apply (rule connected_complement_bounded_convex)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2668
      using assms yz
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2669
      by (auto simp: dist_norm)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2670
    then have "connected_component (- s) y z"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2671
      apply (rule connected_component_of_subset)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2672
      apply (metis Bno Compl_anti_mono mem_cball_0 subset_iff)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2673
      done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2674
  } note cyz = this
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2675
  show ?thesis
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2676
    apply (auto simp: outside)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2677
    apply (metis Compl_iff bounded_iff cobounded_imp_unbounded mem_Collect_eq not_le)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2678
    apply (simp add: bounded_pos)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2679
    by (metis B connected_component_trans cyz not_le)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2680
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2681
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2682
lemma not_outside_connected_component_le:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2683
    fixes s :: "'a::euclidean_space set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2684
    assumes s: "bounded s"  "2 \<le> DIM('a)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2685
      shows "- (outside s) = {x. \<forall>B. \<exists>y. B \<le> norm(y) \<and> ~ (connected_component (- s) x y)}"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2686
apply (auto intro: less_imp_le simp: not_outside_connected_component_lt [OF assms])
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2687
by (meson gt_ex less_le_trans)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2688
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2689
lemma inside_connected_component_lt:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2690
    fixes s :: "'a::euclidean_space set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2691
    assumes s: "bounded s"  "2 \<le> DIM('a)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2692
      shows "inside s = {x. (x \<notin> s) \<and> (\<forall>B. \<exists>y. B < norm(y) \<and> ~(connected_component (- s) x y))}"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2693
  by (auto simp: inside_outside not_outside_connected_component_lt [OF assms])
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2694
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2695
lemma inside_connected_component_le:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2696
    fixes s :: "'a::euclidean_space set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2697
    assumes s: "bounded s"  "2 \<le> DIM('a)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2698
      shows "inside s = {x. (x \<notin> s) \<and> (\<forall>B. \<exists>y. B \<le> norm(y) \<and> ~(connected_component (- s) x y))}"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2699
  by (auto simp: inside_outside not_outside_connected_component_le [OF assms])
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2700
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2701
lemma inside_subset:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2702
  assumes "connected u" and "~bounded u" and "t \<union> u = - s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2703
  shows "inside s \<subseteq> t"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2704
apply (auto simp: inside_def)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2705
by (metis bounded_subset [of "connected_component_set (- s) _"] connected_component_maximal
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2706
       Compl_iff Un_iff assms subsetI)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2707
62381
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2708
lemma frontier_not_empty:
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2709
  fixes S :: "'a :: real_normed_vector set"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2710
  shows "\<lbrakk>S \<noteq> {}; S \<noteq> UNIV\<rbrakk> \<Longrightarrow> frontier S \<noteq> {}"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2711
    using connected_Int_frontier [of UNIV S] by auto
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2712
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2713
lemma frontier_eq_empty:
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2714
  fixes S :: "'a :: real_normed_vector set"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2715
  shows "frontier S = {} \<longleftrightarrow> S = {} \<or> S = UNIV"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2716
using frontier_UNIV frontier_empty frontier_not_empty by blast
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2717
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2718
lemma frontier_of_connected_component_subset:
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2719
  fixes S :: "'a::real_normed_vector set"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2720
  shows "frontier(connected_component_set S x) \<subseteq> frontier S"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2721
proof -
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2722
  { fix y
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2723
    assume y1: "y \<in> closure (connected_component_set S x)"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2724
       and y2: "y \<notin> interior (connected_component_set S x)"
64006
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2725
    have "y \<in> closure S"
62381
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2726
      using y1 closure_mono connected_component_subset by blast
64006
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2727
    moreover have "z \<in> interior (connected_component_set S x)"
62381
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2728
          if "0 < e" "ball y e \<subseteq> interior S" "dist y z < e" for e z
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2729
    proof -
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2730
      have "ball y e \<subseteq> connected_component_set S y"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2731
        apply (rule connected_component_maximal)
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2732
        using that interior_subset mem_ball apply auto
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2733
        done
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2734
      then show ?thesis
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2735
        using y1 apply (simp add: closure_approachable open_contains_ball_eq [OF open_interior])
64006
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2736
        by (metis connected_component_eq dist_commute mem_Collect_eq mem_ball mem_interior subsetD \<open>0 < e\<close> y2)
62381
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2737
    qed
64006
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2738
    then have "y \<notin> interior S"
62381
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2739
      using y2 by (force simp: open_contains_ball_eq [OF open_interior])
64006
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2740
    ultimately have "y \<in> frontier S"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2741
      by (auto simp: frontier_def)
62381
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2742
  }
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2743
  then show ?thesis by (auto simp: frontier_def)
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2744
qed
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2745
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2746
lemma frontier_Union_subset_closure:
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2747
  fixes F :: "'a::real_normed_vector set set"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2748
  shows "frontier(\<Union>F) \<subseteq> closure(\<Union>t \<in> F. frontier t)"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2749
proof -
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2750
  have "\<exists>y\<in>F. \<exists>y\<in>frontier y. dist y x < e"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2751
       if "T \<in> F" "y \<in> T" "dist y x < e"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2752
          "x \<notin> interior (\<Union>F)" "0 < e" for x y e T
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2753
  proof (cases "x \<in> T")
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2754
    case True with that show ?thesis
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2755
      by (metis Diff_iff Sup_upper closure_subset contra_subsetD dist_self frontier_def interior_mono)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2756
  next
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2757
    case False
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2758
    have 1: "closed_segment x y \<inter> T \<noteq> {}" using \<open>y \<in> T\<close> by blast
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2759
    have 2: "closed_segment x y - T \<noteq> {}"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2760
      using False by blast
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2761
    obtain c where "c \<in> closed_segment x y" "c \<in> frontier T"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2762
       using False connected_Int_frontier [OF connected_segment 1 2] by auto
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2763
    then show ?thesis
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2764
    proof -
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2765
      have "norm (y - x) < e"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2766
        by (metis dist_norm \<open>dist y x < e\<close>)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2767
      moreover have "norm (c - x) \<le> norm (y - x)"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2768
        by (simp add: \<open>c \<in> closed_segment x y\<close> segment_bound(1))
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2769
      ultimately have "norm (c - x) < e"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2770
        by linarith
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2771
      then show ?thesis
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2772
        by (metis (no_types) \<open>c \<in> frontier T\<close> dist_norm that(1))
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2773
    qed
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2774
  qed
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2775
  then show ?thesis
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2776
    by (fastforce simp add: frontier_def closure_approachable)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2777
qed
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2778
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2779
lemma frontier_Union_subset:
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2780
  fixes F :: "'a::real_normed_vector set set"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2781
  shows "finite F \<Longrightarrow> frontier(\<Union>F) \<subseteq> (\<Union>t \<in> F. frontier t)"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2782
by (rule order_trans [OF frontier_Union_subset_closure])
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2783
   (auto simp: closure_subset_eq)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2784
64006
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2785
lemma frontier_of_components_subset:
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2786
  fixes S :: "'a::real_normed_vector set"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2787
  shows "C \<in> components S \<Longrightarrow> frontier C \<subseteq> frontier S"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2788
  by (metis Path_Connected.frontier_of_connected_component_subset components_iff)
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2789
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2790
lemma frontier_of_components_closed_complement:
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2791
  fixes S :: "'a::real_normed_vector set"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2792
  shows "\<lbrakk>closed S; C \<in> components (- S)\<rbrakk> \<Longrightarrow> frontier C \<subseteq> S"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2793
  using frontier_complement frontier_of_components_subset frontier_subset_eq by blast
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2794
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2795
lemma frontier_minimal_separating_closed:
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2796
  fixes S :: "'a::real_normed_vector set"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2797
  assumes "closed S"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2798
      and nconn: "~ connected(- S)"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2799
      and C: "C \<in> components (- S)"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2800
      and conn: "\<And>T. \<lbrakk>closed T; T \<subset> S\<rbrakk> \<Longrightarrow> connected(- T)"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2801
    shows "frontier C = S"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2802
proof (rule ccontr)
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2803
  assume "frontier C \<noteq> S"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2804
  then have "frontier C \<subset> S"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2805
    using frontier_of_components_closed_complement [OF \<open>closed S\<close> C] by blast
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2806
  then have "connected(- (frontier C))"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2807
    by (simp add: conn)
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2808
  have "\<not> connected(- (frontier C))"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2809
    unfolding connected_def not_not
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2810
  proof (intro exI conjI)
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2811
    show "open C"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2812
      using C \<open>closed S\<close> open_components by blast
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2813
    show "open (- closure C)"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2814
      by blast
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2815
    show "C \<inter> - closure C \<inter> - frontier C = {}"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2816
      using closure_subset by blast
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2817
    show "C \<inter> - frontier C \<noteq> {}"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2818
      using C \<open>open C\<close> components_eq frontier_disjoint_eq by fastforce
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2819
    show "- frontier C \<subseteq> C \<union> - closure C"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2820
      by (simp add: \<open>open C\<close> closed_Compl frontier_closures)
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2821
    then show "- closure C \<inter> - frontier C \<noteq> {}"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2822
      by (metis (no_types, lifting) C Compl_subset_Compl_iff \<open>frontier C \<subset> S\<close> compl_sup frontier_closures in_components_subset psubsetE sup.absorb_iff2 sup.boundedE sup_bot.right_neutral sup_inf_absorb)
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2823
  qed
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2824
  then show False
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2825
    using \<open>connected (- frontier C)\<close> by blast
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2826
qed
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  2827
62843
313d3b697c9a Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents: 62626
diff changeset
  2828
lemma connected_component_UNIV [simp]:
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2829
    fixes x :: "'a::real_normed_vector"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2830
    shows "connected_component_set UNIV x = UNIV"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2831
using connected_iff_eq_connected_component_set [of "UNIV::'a set"] connected_UNIV
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2832
by auto
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2833
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2834
lemma connected_component_eq_UNIV:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2835
    fixes x :: "'a::real_normed_vector"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2836
    shows "connected_component_set s x = UNIV \<longleftrightarrow> s = UNIV"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2837
  using connected_component_in connected_component_UNIV by blast
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2838
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2839
lemma components_UNIV [simp]: "components UNIV = {UNIV :: 'a::real_normed_vector set}"
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2840
  by (auto simp: components_eq_sing_iff)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2841
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2842
lemma interior_inside_frontier:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2843
    fixes s :: "'a::real_normed_vector set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2844
    assumes "bounded s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2845
      shows "interior s \<subseteq> inside (frontier s)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2846
proof -
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2847
  { fix x y
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2848
    assume x: "x \<in> interior s" and y: "y \<notin> s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2849
       and cc: "connected_component (- frontier s) x y"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2850
    have "connected_component_set (- frontier s) x \<inter> frontier s \<noteq> {}"
62381
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2851
      apply (rule connected_Int_frontier, simp)
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2852
      apply (metis IntI cc connected_component_in connected_component_refl empty_iff interiorE mem_Collect_eq set_rev_mp x)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2853
      using  y cc
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2854
      by blast
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2855
    then have "bounded (connected_component_set (- frontier s) x)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2856
      using connected_component_in by auto
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2857
  }
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2858
  then show ?thesis
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2859
    apply (auto simp: inside_def frontier_def)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2860
    apply (rule classical)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2861
    apply (rule bounded_subset [OF assms], blast)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2862
    done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2863
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2864
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2865
lemma inside_empty [simp]: "inside {} = ({} :: 'a :: {real_normed_vector, perfect_space} set)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2866
  by (simp add: inside_def connected_component_UNIV)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2867
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2868
lemma outside_empty [simp]: "outside {} = (UNIV :: 'a :: {real_normed_vector, perfect_space} set)"
63955
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  2869
using inside_empty inside_Un_outside by blast
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2870
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2871
lemma inside_same_component:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2872
   "\<lbrakk>connected_component (- s) x y; x \<in> inside s\<rbrakk> \<Longrightarrow> y \<in> inside s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2873
  using connected_component_eq connected_component_in
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2874
  by (fastforce simp add: inside_def)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2875
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2876
lemma outside_same_component:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2877
   "\<lbrakk>connected_component (- s) x y; x \<in> outside s\<rbrakk> \<Longrightarrow> y \<in> outside s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2878
  using connected_component_eq connected_component_in
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2879
  by (fastforce simp add: outside_def)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2880
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2881
lemma convex_in_outside:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2882
  fixes s :: "'a :: {real_normed_vector, perfect_space} set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2883
  assumes s: "convex s" and z: "z \<notin> s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2884
    shows "z \<in> outside s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2885
proof (cases "s={}")
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2886
  case True then show ?thesis by simp
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2887
next
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2888
  case False then obtain a where "a \<in> s" by blast
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2889
  with z have zna: "z \<noteq> a" by auto
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2890
  { assume "bounded (connected_component_set (- s) z)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2891
    with bounded_pos_less obtain B where "B>0" and B: "\<And>x. connected_component (- s) z x \<Longrightarrow> norm x < B"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2892
      by (metis mem_Collect_eq)
63040
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 63016
diff changeset
  2893
    define C where "C = (B + 1 + norm z) / norm (z-a)"
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2894
    have "C > 0"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2895
      using \<open>0 < B\<close> zna by (simp add: C_def divide_simps add_strict_increasing)
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2896
    have "\<bar>norm (z + C *\<^sub>R (z-a)) - norm (C *\<^sub>R (z-a))\<bar> \<le> norm z"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2897
      by (metis add_diff_cancel norm_triangle_ineq3)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2898
    moreover have "norm (C *\<^sub>R (z-a)) > norm z + B"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2899
      using zna \<open>B>0\<close> by (simp add: C_def le_max_iff_disj field_simps)
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2900
    ultimately have C: "norm (z + C *\<^sub>R (z-a)) > B" by linarith
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2901
    { fix u::real
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2902
      assume u: "0\<le>u" "u\<le>1" and ins: "(1 - u) *\<^sub>R z + u *\<^sub>R (z + C *\<^sub>R (z - a)) \<in> s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2903
      then have Cpos: "1 + u * C > 0"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2904
        by (meson \<open>0 < C\<close> add_pos_nonneg less_eq_real_def zero_le_mult_iff zero_less_one)
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2905
      then have *: "(1 / (1 + u * C)) *\<^sub>R z + (u * C / (1 + u * C)) *\<^sub>R z = z"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2906
        by (simp add: scaleR_add_left [symmetric] divide_simps)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2907
      then have False
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2908
        using convexD_alt [OF s \<open>a \<in> s\<close> ins, of "1/(u*C + 1)"] \<open>C>0\<close> \<open>z \<notin> s\<close> Cpos u
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2909
        by (simp add: * divide_simps algebra_simps)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2910
    } note contra = this
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2911
    have "connected_component (- s) z (z + C *\<^sub>R (z-a))"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2912
      apply (rule connected_componentI [OF connected_segment [of z "z + C *\<^sub>R (z-a)"]])
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2913
      apply (simp add: closed_segment_def)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2914
      using contra
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2915
      apply auto
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2916
      done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2917
    then have False
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2918
      using zna B [of "z + C *\<^sub>R (z-a)"] C
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2919
      by (auto simp: divide_simps max_mult_distrib_right)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2920
  }
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2921
  then show ?thesis
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2922
    by (auto simp: outside_def z)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2923
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2924
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2925
lemma outside_convex:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2926
  fixes s :: "'a :: {real_normed_vector, perfect_space} set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2927
  assumes "convex s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2928
    shows "outside s = - s"
63955
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  2929
  by (metis ComplD assms convex_in_outside equalityI inside_Un_outside subsetI sup.cobounded2)
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2930
66793
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2931
lemma outside_singleton [simp]:
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2932
  fixes x :: "'a :: {real_normed_vector, perfect_space}"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2933
  shows "outside {x} = -{x}"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2934
  by (auto simp: outside_convex)
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2935
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2936
lemma inside_convex:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2937
  fixes s :: "'a :: {real_normed_vector, perfect_space} set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2938
  shows "convex s \<Longrightarrow> inside s = {}"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2939
  by (simp add: inside_outside outside_convex)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2940
66793
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2941
lemma inside_singleton [simp]:
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2942
  fixes x :: "'a :: {real_normed_vector, perfect_space}"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2943
  shows "inside {x} = {}"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2944
  by (auto simp: inside_convex)
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  2945
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2946
lemma outside_subset_convex:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2947
  fixes s :: "'a :: {real_normed_vector, perfect_space} set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2948
  shows "\<lbrakk>convex t; s \<subseteq> t\<rbrakk> \<Longrightarrow> - t \<subseteq> outside s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2949
  using outside_convex outside_mono by blast
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2950
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2951
lemma outside_Un_outside_Un:
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2952
  fixes S :: "'a::real_normed_vector set"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2953
  assumes "S \<inter> outside(T \<union> U) = {}"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2954
  shows "outside(T \<union> U) \<subseteq> outside(T \<union> S)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2955
proof
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2956
  fix x
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2957
  assume x: "x \<in> outside (T \<union> U)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2958
  have "Y \<subseteq> - S" if "connected Y" "Y \<subseteq> - T" "Y \<subseteq> - U" "x \<in> Y" "u \<in> Y" for u Y
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2959
  proof -
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2960
    have "Y \<subseteq> connected_component_set (- (T \<union> U)) x"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2961
      by (simp add: connected_component_maximal that)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2962
    also have "... \<subseteq> outside(T \<union> U)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2963
      by (metis (mono_tags, lifting) Collect_mono mem_Collect_eq outside outside_same_component x)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2964
    finally have "Y \<subseteq> outside(T \<union> U)" .
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2965
    with assms show ?thesis by auto
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2966
  qed
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2967
  with x show "x \<in> outside (T \<union> S)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2968
    by (simp add: outside_connected_component_lt connected_component_def) meson
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2969
qed
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  2970
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2971
lemma outside_frontier_misses_closure:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2972
    fixes s :: "'a::real_normed_vector set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2973
    assumes "bounded s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2974
    shows  "outside(frontier s) \<subseteq> - closure s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2975
  unfolding outside_inside Lattices.boolean_algebra_class.compl_le_compl_iff
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2976
proof -
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2977
  { assume "interior s \<subseteq> inside (frontier s)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2978
    hence "interior s \<union> inside (frontier s) = inside (frontier s)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2979
      by (simp add: subset_Un_eq)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2980
    then have "closure s \<subseteq> frontier s \<union> inside (frontier s)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2981
      using frontier_def by auto
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2982
  }
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2983
  then show "closure s \<subseteq> frontier s \<union> inside (frontier s)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2984
    using interior_inside_frontier [OF assms] by blast
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2985
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2986
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2987
lemma outside_frontier_eq_complement_closure:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2988
  fixes s :: "'a :: {real_normed_vector, perfect_space} set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2989
    assumes "bounded s" "convex s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2990
      shows "outside(frontier s) = - closure s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2991
by (metis Diff_subset assms convex_closure frontier_def outside_frontier_misses_closure
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2992
          outside_subset_convex subset_antisym)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2993
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2994
lemma inside_frontier_eq_interior:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2995
     fixes s :: "'a :: {real_normed_vector, perfect_space} set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2996
     shows "\<lbrakk>bounded s; convex s\<rbrakk> \<Longrightarrow> inside(frontier s) = interior s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2997
  apply (simp add: inside_outside outside_frontier_eq_complement_closure)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2998
  using closure_subset interior_subset
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2999
  apply (auto simp add: frontier_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3000
  done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3001
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3002
lemma open_inside:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3003
    fixes s :: "'a::real_normed_vector set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3004
    assumes "closed s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3005
      shows "open (inside s)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3006
proof -
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3007
  { fix x assume x: "x \<in> inside s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3008
    have "open (connected_component_set (- s) x)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3009
      using assms open_connected_component by blast
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3010
    then obtain e where e: "e>0" and e: "\<And>y. dist y x < e \<longrightarrow> connected_component (- s) x y"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3011
      using dist_not_less_zero
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3012
      apply (simp add: open_dist)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3013
      by (metis (no_types, lifting) Compl_iff connected_component_refl_eq inside_def mem_Collect_eq x)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3014
    then have "\<exists>e>0. ball x e \<subseteq> inside s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3015
      by (metis e dist_commute inside_same_component mem_ball subsetI x)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3016
  }
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3017
  then show ?thesis
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3018
    by (simp add: open_contains_ball)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3019
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3020
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3021
lemma open_outside:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3022
    fixes s :: "'a::real_normed_vector set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3023
    assumes "closed s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3024
      shows "open (outside s)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3025
proof -
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3026
  { fix x assume x: "x \<in> outside s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3027
    have "open (connected_component_set (- s) x)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3028
      using assms open_connected_component by blast
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3029
    then obtain e where e: "e>0" and e: "\<And>y. dist y x < e \<longrightarrow> connected_component (- s) x y"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3030
      using dist_not_less_zero
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3031
      apply (simp add: open_dist)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3032
      by (metis Int_iff outside_def connected_component_refl_eq  x)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3033
    then have "\<exists>e>0. ball x e \<subseteq> outside s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3034
      by (metis e dist_commute outside_same_component mem_ball subsetI x)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3035
  }
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3036
  then show ?thesis
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3037
    by (simp add: open_contains_ball)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3038
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3039
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3040
lemma closure_inside_subset:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3041
    fixes s :: "'a::real_normed_vector set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3042
    assumes "closed s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3043
      shows "closure(inside s) \<subseteq> s \<union> inside s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3044
by (metis assms closure_minimal open_closed open_outside sup.cobounded2 union_with_inside)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3045
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3046
lemma frontier_inside_subset:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3047
    fixes s :: "'a::real_normed_vector set"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3048
    assumes "closed s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3049
      shows "frontier(inside s) \<subseteq> s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3050
proof -
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3051
  have "closure (inside s) \<inter> - inside s = closure (inside s) - interior (inside s)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3052
    by (metis (no_types) Diff_Compl assms closure_closed interior_closure open_closed open_inside)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3053
  moreover have "- inside s \<inter> - outside s = s"
63955
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  3054
    by (metis (no_types) compl_sup double_compl inside_Un_outside)
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3055
  moreover have "closure (inside s) \<subseteq> - outside s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3056
    by (metis (no_types) assms closure_inside_subset union_with_inside)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3057
  ultimately have "closure (inside s) - interior (inside s) \<subseteq> s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3058
    by blast
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3059
  then show ?thesis
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3060
    by (simp add: frontier_def open_inside interior_open)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3061
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  3062
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3063
lemma closure_outside_subset:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3064
    fixes s :: "'a::real_normed_vector set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3065
    assumes "closed s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3066
      shows "closure(outside s) \<subseteq> s \<union> outside s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3067
  apply (rule closure_minimal, simp)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3068
  by (metis assms closed_open inside_outside open_inside)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3069
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3070
lemma frontier_outside_subset:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3071
    fixes s :: "'a::real_normed_vector set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3072
    assumes "closed s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3073
      shows "frontier(outside s) \<subseteq> s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3074
  apply (simp add: frontier_def open_outside interior_open)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3075
  by (metis Diff_subset_conv assms closure_outside_subset interior_eq open_outside sup.commute)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3076
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3077
lemma inside_complement_unbounded_connected_empty:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3078
     "\<lbrakk>connected (- s); \<not> bounded (- s)\<rbrakk> \<Longrightarrow> inside s = {}"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3079
  apply (simp add: inside_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3080
  by (meson Compl_iff bounded_subset connected_component_maximal order_refl)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3081
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3082
lemma inside_bounded_complement_connected_empty:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3083
    fixes s :: "'a::{real_normed_vector, perfect_space} set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3084
    shows "\<lbrakk>connected (- s); bounded s\<rbrakk> \<Longrightarrow> inside s = {}"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3085
  by (metis inside_complement_unbounded_connected_empty cobounded_imp_unbounded)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3086
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3087
lemma inside_inside:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3088
    assumes "s \<subseteq> inside t"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3089
    shows "inside s - t \<subseteq> inside t"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3090
unfolding inside_def
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3091
proof clarify
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3092
  fix x
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3093
  assume x: "x \<notin> t" "x \<notin> s" and bo: "bounded (connected_component_set (- s) x)"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3094
  show "bounded (connected_component_set (- t) x)"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3095
  proof (cases "s \<inter> connected_component_set (- t) x = {}")
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3096
    case True show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3097
      apply (rule bounded_subset [OF bo])
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3098
      apply (rule connected_component_maximal)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3099
      using x True apply auto
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3100
      done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3101
  next
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3102
    case False then show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3103
      using assms [unfolded inside_def] x
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3104
      apply (simp add: disjoint_iff_not_equal, clarify)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3105
      apply (drule subsetD, assumption, auto)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3106
      by (metis (no_types, hide_lams) ComplI connected_component_eq_eq)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3107
  qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3108
qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3109
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3110
lemma inside_inside_subset: "inside(inside s) \<subseteq> s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3111
  using inside_inside union_with_outside by fastforce
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3112
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3113
lemma inside_outside_intersect_connected:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3114
      "\<lbrakk>connected t; inside s \<inter> t \<noteq> {}; outside s \<inter> t \<noteq> {}\<rbrakk> \<Longrightarrow> s \<inter> t \<noteq> {}"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3115
  apply (simp add: inside_def outside_def ex_in_conv [symmetric] disjoint_eq_subset_Compl, clarify)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3116
  by (metis (no_types, hide_lams) Compl_anti_mono connected_component_eq connected_component_maximal contra_subsetD double_compl)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3117
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3118
lemma outside_bounded_nonempty:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3119
  fixes s :: "'a :: {real_normed_vector, perfect_space} set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3120
    assumes "bounded s" shows "outside s \<noteq> {}"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3121
  by (metis (no_types, lifting) Collect_empty_eq Collect_mem_eq Compl_eq_Diff_UNIV Diff_cancel
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3122
                   Diff_disjoint UNIV_I assms ball_eq_empty bounded_diff cobounded_outside convex_ball
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3123
                   double_complement order_refl outside_convex outside_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3124
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3125
lemma outside_compact_in_open:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3126
    fixes s :: "'a :: {real_normed_vector,perfect_space} set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3127
    assumes s: "compact s" and t: "open t" and "s \<subseteq> t" "t \<noteq> {}"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3128
      shows "outside s \<inter> t \<noteq> {}"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3129
proof -
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3130
  have "outside s \<noteq> {}"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3131
    by (simp add: compact_imp_bounded outside_bounded_nonempty s)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3132
  with assms obtain a b where a: "a \<in> outside s" and b: "b \<in> t" by auto
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3133
  show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3134
  proof (cases "a \<in> t")
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3135
    case True with a show ?thesis by blast
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3136
  next
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3137
    case False
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3138
      have front: "frontier t \<subseteq> - s"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  3139
        using \<open>s \<subseteq> t\<close> frontier_disjoint_eq t by auto
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3140
      { fix \<gamma>
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3141
        assume "path \<gamma>" and pimg_sbs: "path_image \<gamma> - {pathfinish \<gamma>} \<subseteq> interior (- t)"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3142
           and pf: "pathfinish \<gamma> \<in> frontier t" and ps: "pathstart \<gamma> = a"
63040
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 63016
diff changeset
  3143
        define c where "c = pathfinish \<gamma>"
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3144
        have "c \<in> -s" unfolding c_def using front pf by blast
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3145
        moreover have "open (-s)" using s compact_imp_closed by blast
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3146
        ultimately obtain \<epsilon>::real where "\<epsilon> > 0" and \<epsilon>: "cball c \<epsilon> \<subseteq> -s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3147
          using open_contains_cball[of "-s"] s by blast
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3148
        then obtain d where "d \<in> t" and d: "dist d c < \<epsilon>"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3149
          using closure_approachable [of c t] pf unfolding c_def
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3150
          by (metis Diff_iff frontier_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3151
        then have "d \<in> -s" using \<epsilon>
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3152
          using dist_commute by (metis contra_subsetD mem_cball not_le not_less_iff_gr_or_eq)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3153
        have pimg_sbs_cos: "path_image \<gamma> \<subseteq> -s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3154
          using pimg_sbs apply (auto simp: path_image_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3155
          apply (drule subsetD)
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  3156
          using \<open>c \<in> - s\<close> \<open>s \<subseteq> t\<close> interior_subset apply (auto simp: c_def)
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3157
          done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3158
        have "closed_segment c d \<le> cball c \<epsilon>"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3159
          apply (simp add: segment_convex_hull)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3160
          apply (rule hull_minimal)
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  3161
          using  \<open>\<epsilon> > 0\<close> d apply (auto simp: dist_commute)
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3162
          done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3163
        with \<epsilon> have "closed_segment c d \<subseteq> -s" by blast
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3164
        moreover have con_gcd: "connected (path_image \<gamma> \<union> closed_segment c d)"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  3165
          by (rule connected_Un) (auto simp: c_def \<open>path \<gamma>\<close> connected_path_image)
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3166
        ultimately have "connected_component (- s) a d"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3167
          unfolding connected_component_def using pimg_sbs_cos ps by blast
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3168
        then have "outside s \<inter> t \<noteq> {}"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  3169
          using outside_same_component [OF _ a]  by (metis IntI \<open>d \<in> t\<close> empty_iff)
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3170
      } note * = this
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3171
      have pal: "pathstart (linepath a b) \<in> closure (- t)"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3172
        by (auto simp: False closure_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3173
      show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3174
        by (rule exists_path_subpath_to_frontier [OF path_linepath pal _ *]) (auto simp: b)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3175
  qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3176
qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3177
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3178
lemma inside_inside_compact_connected:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3179
    fixes s :: "'a :: euclidean_space set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3180
    assumes s: "closed s" and t: "compact t" and "connected t" "s \<subseteq> inside t"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3181
      shows "inside s \<subseteq> inside t"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3182
proof (cases "inside t = {}")
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3183
  case True with assms show ?thesis by auto
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3184
next
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3185
  case False
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3186
  consider "DIM('a) = 1" | "DIM('a) \<ge> 2"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3187
    using antisym not_less_eq_eq by fastforce
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3188
  then show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3189
  proof cases
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3190
    case 1 then show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3191
             using connected_convex_1_gen assms False inside_convex by blast
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3192
  next
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3193
    case 2
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3194
    have coms: "compact s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3195
      using assms apply (simp add: s compact_eq_bounded_closed)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3196
       by (meson bounded_inside bounded_subset compact_imp_bounded)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3197
    then have bst: "bounded (s \<union> t)"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3198
      by (simp add: compact_imp_bounded t)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3199
    then obtain r where "0 < r" and r: "s \<union> t \<subseteq> ball 0 r"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3200
      using bounded_subset_ballD by blast
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3201
    have outst: "outside s \<inter> outside t \<noteq> {}"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3202
    proof -
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3203
      have "- ball 0 r \<subseteq> outside s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3204
        apply (rule outside_subset_convex)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3205
        using r by auto
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3206
      moreover have "- ball 0 r \<subseteq> outside t"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3207
        apply (rule outside_subset_convex)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3208
        using r by auto
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3209
      ultimately show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3210
        by (metis Compl_subset_Compl_iff Int_subset_iff bounded_ball inf.orderE outside_bounded_nonempty outside_no_overlap)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3211
    qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3212
    have "s \<inter> t = {}" using assms
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3213
      by (metis disjoint_iff_not_equal inside_no_overlap subsetCE)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3214
    moreover have "outside s \<inter> inside t \<noteq> {}"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3215
      by (meson False assms(4) compact_eq_bounded_closed coms open_inside outside_compact_in_open t)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3216
    ultimately have "inside s \<inter> t = {}"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  3217
      using inside_outside_intersect_connected [OF \<open>connected t\<close>, of s]
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3218
      by (metis "2" compact_eq_bounded_closed coms connected_outside inf.commute inside_outside_intersect_connected outst)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3219
    then show ?thesis
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  3220
      using inside_inside [OF \<open>s \<subseteq> inside t\<close>] by blast
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3221
  qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3222
qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3223
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3224
lemma connected_with_inside:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3225
    fixes s :: "'a :: real_normed_vector set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3226
    assumes s: "closed s" and cons: "connected s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3227
      shows "connected(s \<union> inside s)"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3228
proof (cases "s \<union> inside s = UNIV")
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3229
  case True with assms show ?thesis by auto
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3230
next
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3231
  case False
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3232
  then obtain b where b: "b \<notin> s" "b \<notin> inside s" by blast
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3233
  have *: "\<exists>y t. y \<in> s \<and> connected t \<and> a \<in> t \<and> y \<in> t \<and> t \<subseteq> (s \<union> inside s)" if "a \<in> (s \<union> inside s)" for a
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3234
  using that proof
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3235
    assume "a \<in> s" then show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3236
      apply (rule_tac x=a in exI)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3237
      apply (rule_tac x="{a}" in exI)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3238
      apply (simp add:)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3239
      done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3240
  next
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3241
    assume a: "a \<in> inside s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3242
    show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3243
      apply (rule exists_path_subpath_to_frontier [OF path_linepath [of a b], of "inside s"])
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3244
      using a apply (simp add: closure_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3245
      apply (simp add: b)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3246
      apply (rule_tac x="pathfinish h" in exI)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3247
      apply (rule_tac x="path_image h" in exI)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3248
      apply (simp add: pathfinish_in_path_image connected_path_image, auto)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3249
      using frontier_inside_subset s apply fastforce
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3250
      by (metis (no_types, lifting) frontier_inside_subset insertE insert_Diff interior_eq open_inside pathfinish_in_path_image s subsetCE)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3251
  qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3252
  show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3253
    apply (simp add: connected_iff_connected_component)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3254
    apply (simp add: connected_component_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3255
    apply (clarify dest!: *)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3256
    apply (rename_tac u u' t t')
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3257
    apply (rule_tac x="(s \<union> t \<union> t')" in exI)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3258
    apply (auto simp: intro!: connected_Un cons)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3259
    done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3260
qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3261
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3262
text\<open>The proof is virtually the same as that above.\<close>
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3263
lemma connected_with_outside:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3264
    fixes s :: "'a :: real_normed_vector set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3265
    assumes s: "closed s" and cons: "connected s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3266
      shows "connected(s \<union> outside s)"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3267
proof (cases "s \<union> outside s = UNIV")
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3268
  case True with assms show ?thesis by auto
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3269
next
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3270
  case False
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3271
  then obtain b where b: "b \<notin> s" "b \<notin> outside s" by blast
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3272
  have *: "\<exists>y t. y \<in> s \<and> connected t \<and> a \<in> t \<and> y \<in> t \<and> t \<subseteq> (s \<union> outside s)" if "a \<in> (s \<union> outside s)" for a
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3273
  using that proof
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3274
    assume "a \<in> s" then show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3275
      apply (rule_tac x=a in exI)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3276
      apply (rule_tac x="{a}" in exI)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3277
      apply (simp add:)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3278
      done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3279
  next
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3280
    assume a: "a \<in> outside s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3281
    show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3282
      apply (rule exists_path_subpath_to_frontier [OF path_linepath [of a b], of "outside s"])
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3283
      using a apply (simp add: closure_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3284
      apply (simp add: b)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3285
      apply (rule_tac x="pathfinish h" in exI)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3286
      apply (rule_tac x="path_image h" in exI)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3287
      apply (simp add: pathfinish_in_path_image connected_path_image, auto)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3288
      using frontier_outside_subset s apply fastforce
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3289
      by (metis (no_types, lifting) frontier_outside_subset insertE insert_Diff interior_eq open_outside pathfinish_in_path_image s subsetCE)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3290
  qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3291
  show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3292
    apply (simp add: connected_iff_connected_component)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3293
    apply (simp add: connected_component_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3294
    apply (clarify dest!: *)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3295
    apply (rename_tac u u' t t')
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3296
    apply (rule_tac x="(s \<union> t \<union> t')" in exI)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3297
    apply (auto simp: intro!: connected_Un cons)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3298
    done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3299
qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3300
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3301
lemma inside_inside_eq_empty [simp]:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3302
    fixes s :: "'a :: {real_normed_vector, perfect_space} set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3303
    assumes s: "closed s" and cons: "connected s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3304
      shows "inside (inside s) = {}"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3305
  by (metis (no_types) unbounded_outside connected_with_outside [OF assms] bounded_Un
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3306
           inside_complement_unbounded_connected_empty unbounded_outside union_with_outside)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3307
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3308
lemma inside_in_components:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3309
     "inside s \<in> components (- s) \<longleftrightarrow> connected(inside s) \<and> inside s \<noteq> {}"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3310
  apply (simp add: in_components_maximal)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3311
  apply (auto intro: inside_same_component connected_componentI)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3312
  apply (metis IntI empty_iff inside_no_overlap)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3313
  done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3314
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3315
text\<open>The proof is virtually the same as that above.\<close>
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3316
lemma outside_in_components:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3317
     "outside s \<in> components (- s) \<longleftrightarrow> connected(outside s) \<and> outside s \<noteq> {}"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3318
  apply (simp add: in_components_maximal)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3319
  apply (auto intro: outside_same_component connected_componentI)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3320
  apply (metis IntI empty_iff outside_no_overlap)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3321
  done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3322
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3323
lemma bounded_unique_outside:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3324
    fixes s :: "'a :: euclidean_space set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3325
    shows "\<lbrakk>bounded s; DIM('a) \<ge> 2\<rbrakk> \<Longrightarrow> (c \<in> components (- s) \<and> ~bounded c \<longleftrightarrow> c = outside s)"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3326
  apply (rule iffI)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3327
  apply (metis cobounded_unique_unbounded_components connected_outside double_compl outside_bounded_nonempty outside_in_components unbounded_outside)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3328
  by (simp add: connected_outside outside_bounded_nonempty outside_in_components unbounded_outside)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3329
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3330
subsection\<open>Condition for an open map's image to contain a ball\<close>
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3331
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3332
lemma ball_subset_open_map_image:
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3333
  fixes f :: "'a::heine_borel \<Rightarrow> 'b :: {real_normed_vector,heine_borel}"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3334
  assumes contf: "continuous_on (closure S) f"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3335
      and oint: "open (f ` interior S)"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3336
      and le_no: "\<And>z. z \<in> frontier S \<Longrightarrow> r \<le> norm(f z - f a)"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3337
      and "bounded S" "a \<in> S" "0 < r"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3338
    shows "ball (f a) r \<subseteq> f ` S"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3339
proof (cases "f ` S = UNIV")
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3340
  case True then show ?thesis by simp
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3341
next
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3342
  case False
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3343
    obtain w where w: "w \<in> frontier (f ` S)"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3344
               and dw_le: "\<And>y. y \<in> frontier (f ` S) \<Longrightarrow> norm (f a - w) \<le> norm (f a - y)"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3345
      apply (rule distance_attains_inf [of "frontier(f ` S)" "f a"])
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3346
      using \<open>a \<in> S\<close> by (auto simp: frontier_eq_empty dist_norm False)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3347
    then obtain \<xi> where \<xi>: "\<And>n. \<xi> n \<in> f ` S" and tendsw: "\<xi> \<longlonglongrightarrow> w"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3348
      by (metis Diff_iff frontier_def closure_sequential)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3349
    then have "\<And>n. \<exists>x \<in> S. \<xi> n = f x" by force
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3350
    then obtain z where zs: "\<And>n. z n \<in> S" and fz: "\<And>n. \<xi> n = f (z n)"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3351
      by metis
66447
a1f5c5c26fa6 Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents: 65038
diff changeset
  3352
    then obtain y K where y: "y \<in> closure S" and "strict_mono (K :: nat \<Rightarrow> nat)" 
a1f5c5c26fa6 Replaced subseq with strict_mono
eberlm <eberlm@in.tum.de>
parents: 65038
diff changeset
  3353
                      and Klim: "(z \<circ> K) \<longlonglongrightarrow> y"
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3354
      using \<open>bounded S\<close>
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3355
      apply (simp add: compact_closure [symmetric] compact_def)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3356
      apply (drule_tac x=z in spec)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3357
      using closure_subset apply force
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3358
      done
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3359
    then have ftendsw: "((\<lambda>n. f (z n)) \<circ> K) \<longlonglongrightarrow> w"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3360
      by (metis LIMSEQ_subseq_LIMSEQ fun.map_cong0 fz tendsw)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3361
    have zKs: "\<And>n. (z o K) n \<in> S" by (simp add: zs)
63540
f8652d0534fa tuned proofs -- avoid unstructured calculation;
wenzelm
parents: 63469
diff changeset
  3362
    have fz: "f \<circ> z = \<xi>"  "(\<lambda>n. f (z n)) = \<xi>"
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3363
      using fz by auto
63540
f8652d0534fa tuned proofs -- avoid unstructured calculation;
wenzelm
parents: 63469
diff changeset
  3364
    then have "(\<xi> \<circ> K) \<longlonglongrightarrow> f y"
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3365
      by (metis (no_types) Klim zKs y contf comp_assoc continuous_on_closure_sequentially)
63540
f8652d0534fa tuned proofs -- avoid unstructured calculation;
wenzelm
parents: 63469
diff changeset
  3366
    with fz have wy: "w = f y" using fz LIMSEQ_unique ftendsw by auto
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3367
    have rle: "r \<le> norm (f y - f a)"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3368
      apply (rule le_no)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3369
      using w wy oint
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3370
      by (force simp: imageI image_mono interiorI interior_subset frontier_def y)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3371
    have **: "(~(b \<inter> (- S) = {}) \<and> ~(b - (- S) = {}) \<Longrightarrow> (b \<inter> f \<noteq> {}))
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3372
              \<Longrightarrow> (b \<inter> S \<noteq> {}) \<Longrightarrow> b \<inter> f = {} \<Longrightarrow>
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  3373
              b \<subseteq> S" for b f and S :: "'b set"
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3374
      by blast
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3375
    show ?thesis
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3376
      apply (rule **)   (*such a horrible mess*)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3377
      apply (rule connected_Int_frontier [where t = "f`S", OF connected_ball])
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  3378
      using \<open>a \<in> S\<close> \<open>0 < r\<close>
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3379
      apply (auto simp: disjoint_iff_not_equal  dist_norm)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3380
      by (metis dw_le norm_minus_commute not_less order_trans rle wy)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3381
qed
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3382
61694
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3383
section\<open> Homotopy of maps p,q : X=>Y with property P of all intermediate maps.\<close>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3384
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3385
text\<open> We often just want to require that it fixes some subset, but to take in
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3386
  the case of a loop homotopy, it's convenient to have a general property P.\<close>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3387
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3388
definition homotopic_with ::
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3389
  "[('a::topological_space \<Rightarrow> 'b::topological_space) \<Rightarrow> bool, 'a set, 'b set, 'a \<Rightarrow> 'b, 'a \<Rightarrow> 'b] \<Rightarrow> bool"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3390
where
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3391
 "homotopic_with P X Y p q \<equiv>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3392
   (\<exists>h:: real \<times> 'a \<Rightarrow> 'b.
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3393
       continuous_on ({0..1} \<times> X) h \<and>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3394
       h ` ({0..1} \<times> X) \<subseteq> Y \<and>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3395
       (\<forall>x. h(0, x) = p x) \<and>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3396
       (\<forall>x. h(1, x) = q x) \<and>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3397
       (\<forall>t \<in> {0..1}. P(\<lambda>x. h(t, x))))"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3398
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3399
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3400
text\<open> We often want to just localize the ending function equality or whatever.\<close>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3401
proposition homotopic_with:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3402
  fixes X :: "'a::topological_space set" and Y :: "'b::topological_space set"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3403
  assumes "\<And>h k. (\<And>x. x \<in> X \<Longrightarrow> h x = k x) \<Longrightarrow> (P h \<longleftrightarrow> P k)"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3404
  shows "homotopic_with P X Y p q \<longleftrightarrow>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3405
           (\<exists>h :: real \<times> 'a \<Rightarrow> 'b.
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3406
              continuous_on ({0..1} \<times> X) h \<and>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3407
              h ` ({0..1} \<times> X) \<subseteq> Y \<and>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3408
              (\<forall>x \<in> X. h(0,x) = p x) \<and>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3409
              (\<forall>x \<in> X. h(1,x) = q x) \<and>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3410
              (\<forall>t \<in> {0..1}. P(\<lambda>x. h(t, x))))"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3411
  unfolding homotopic_with_def
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3412
  apply (rule iffI, blast, clarify)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3413
  apply (rule_tac x="\<lambda>(u,v). if v \<in> X then h(u,v) else if u = 0 then p v else q v" in exI)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3414
  apply (auto simp:)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3415
  apply (force elim: continuous_on_eq)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3416
  apply (drule_tac x=t in bspec, force)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3417
  apply (subst assms; simp)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3418
  done
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3419
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3420
proposition homotopic_with_eq:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3421
   assumes h: "homotopic_with P X Y f g"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3422
       and f': "\<And>x. x \<in> X \<Longrightarrow> f' x = f x"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3423
       and g': "\<And>x. x \<in> X \<Longrightarrow> g' x = g x"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3424
       and P:  "(\<And>h k. (\<And>x. x \<in> X \<Longrightarrow> h x = k x) \<Longrightarrow> (P h \<longleftrightarrow> P k))"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3425
   shows "homotopic_with P X Y f' g'"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3426
  using h unfolding homotopic_with_def
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3427
  apply safe
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3428
  apply (rule_tac x="\<lambda>(u,v). if v \<in> X then h(u,v) else if u = 0 then f' v else g' v" in exI)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3429
  apply (simp add: f' g', safe)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3430
  apply (fastforce intro: continuous_on_eq)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3431
  apply fastforce
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3432
  apply (subst P; fastforce)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3433
  done
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3434
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3435
proposition homotopic_with_equal:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3436
   assumes contf: "continuous_on X f" and fXY: "f ` X \<subseteq> Y"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3437
       and gf: "\<And>x. x \<in> X \<Longrightarrow> g x = f x"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3438
       and P:  "P f" "P g"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3439
   shows "homotopic_with P X Y f g"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3440
  unfolding homotopic_with_def
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3441
  apply (rule_tac x="\<lambda>(u,v). if u = 1 then g v else f v" in exI)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3442
  using assms
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3443
  apply (intro conjI)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3444
  apply (rule continuous_on_eq [where f = "f o snd"])
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3445
  apply (rule continuous_intros | force)+
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3446
  apply clarify
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3447
  apply (case_tac "t=1"; force)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3448
  done
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3449
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3450
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3451
lemma image_Pair_const: "(\<lambda>x. (x, c)) ` A = A \<times> {c}"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3452
  by (auto simp:)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3453
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3454
lemma homotopic_constant_maps:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3455
   "homotopic_with (\<lambda>x. True) s t (\<lambda>x. a) (\<lambda>x. b) \<longleftrightarrow> s = {} \<or> path_component t a b"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3456
proof (cases "s = {} \<or> t = {}")
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3457
  case True with continuous_on_const show ?thesis
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3458
    by (auto simp: homotopic_with path_component_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3459
next
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3460
  case False
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3461
  then obtain c where "c \<in> s" by blast
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3462
  show ?thesis
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3463
  proof
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3464
    assume "homotopic_with (\<lambda>x. True) s t (\<lambda>x. a) (\<lambda>x. b)"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3465
    then obtain h :: "real \<times> 'a \<Rightarrow> 'b"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3466
        where conth: "continuous_on ({0..1} \<times> s) h"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3467
          and h: "h ` ({0..1} \<times> s) \<subseteq> t" "(\<forall>x\<in>s. h (0, x) = a)" "(\<forall>x\<in>s. h (1, x) = b)"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3468
      by (auto simp: homotopic_with)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3469
    have "continuous_on {0..1} (h \<circ> (\<lambda>t. (t, c)))"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3470
      apply (rule continuous_intros conth | simp add: image_Pair_const)+
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3471
      apply (blast intro:  \<open>c \<in> s\<close> continuous_on_subset [OF conth] )
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3472
      done
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3473
    with \<open>c \<in> s\<close> h show "s = {} \<or> path_component t a b"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3474
      apply (simp_all add: homotopic_with path_component_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3475
      apply (auto simp:)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3476
      apply (drule_tac x="h o (\<lambda>t. (t, c))" in spec)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3477
      apply (auto simp: pathstart_def pathfinish_def path_image_def path_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3478
      done
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3479
  next
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3480
    assume "s = {} \<or> path_component t a b"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3481
    with False show "homotopic_with (\<lambda>x. True) s t (\<lambda>x. a) (\<lambda>x. b)"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3482
      apply (clarsimp simp: homotopic_with path_component_def pathstart_def pathfinish_def path_image_def path_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3483
      apply (rule_tac x="g o fst" in exI)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3484
      apply (rule conjI continuous_intros | force)+
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3485
      done
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3486
  qed
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3487
qed
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3488
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3489
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3490
subsection\<open> Trivial properties.\<close>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3491
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3492
lemma homotopic_with_imp_property: "homotopic_with P X Y f g \<Longrightarrow> P f \<and> P g"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3493
  unfolding homotopic_with_def Ball_def
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3494
  apply clarify
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3495
  apply (frule_tac x=0 in spec)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3496
  apply (drule_tac x=1 in spec)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3497
  apply (auto simp:)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3498
  done
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3499
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3500
lemma continuous_on_o_Pair: "\<lbrakk>continuous_on (T \<times> X) h; t \<in> T\<rbrakk> \<Longrightarrow> continuous_on X (h o Pair t)"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3501
  by (fast intro: continuous_intros elim!: continuous_on_subset)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3502
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3503
lemma homotopic_with_imp_continuous:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3504
    assumes "homotopic_with P X Y f g"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3505
    shows "continuous_on X f \<and> continuous_on X g"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3506
proof -
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3507
  obtain h :: "real \<times> 'a \<Rightarrow> 'b"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3508
    where conth: "continuous_on ({0..1} \<times> X) h"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3509
      and h: "\<forall>x. h (0, x) = f x" "\<forall>x. h (1, x) = g x"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3510
    using assms by (auto simp: homotopic_with_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3511
  have *: "t \<in> {0..1} \<Longrightarrow> continuous_on X (h o (\<lambda>x. (t,x)))" for t
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3512
    by (rule continuous_intros continuous_on_subset [OF conth] | force)+
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3513
  show ?thesis
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3514
    using h *[of 0] *[of 1] by auto
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3515
qed
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3516
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3517
proposition homotopic_with_imp_subset1:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3518
     "homotopic_with P X Y f g \<Longrightarrow> f ` X \<subseteq> Y"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3519
  by (simp add: homotopic_with_def image_subset_iff) (metis atLeastAtMost_iff order_refl zero_le_one)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3520
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3521
proposition homotopic_with_imp_subset2:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3522
     "homotopic_with P X Y f g \<Longrightarrow> g ` X \<subseteq> Y"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3523
  by (simp add: homotopic_with_def image_subset_iff) (metis atLeastAtMost_iff order_refl zero_le_one)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3524
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3525
proposition homotopic_with_mono:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3526
    assumes hom: "homotopic_with P X Y f g"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3527
        and Q: "\<And>h. \<lbrakk>continuous_on X h; image h X \<subseteq> Y \<and> P h\<rbrakk> \<Longrightarrow> Q h"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3528
      shows "homotopic_with Q X Y f g"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3529
  using hom
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3530
  apply (simp add: homotopic_with_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3531
  apply (erule ex_forward)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3532
  apply (force simp: intro!: Q dest: continuous_on_o_Pair)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3533
  done
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3534
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3535
proposition homotopic_with_subset_left:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3536
     "\<lbrakk>homotopic_with P X Y f g; Z \<subseteq> X\<rbrakk> \<Longrightarrow> homotopic_with P Z Y f g"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3537
  apply (simp add: homotopic_with_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3538
  apply (fast elim!: continuous_on_subset ex_forward)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3539
  done
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3540
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3541
proposition homotopic_with_subset_right:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3542
     "\<lbrakk>homotopic_with P X Y f g; Y \<subseteq> Z\<rbrakk> \<Longrightarrow> homotopic_with P X Z f g"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3543
  apply (simp add: homotopic_with_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3544
  apply (fast elim!: continuous_on_subset ex_forward)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3545
  done
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3546
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3547
proposition homotopic_with_compose_continuous_right:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3548
    "\<lbrakk>homotopic_with (\<lambda>f. p (f \<circ> h)) X Y f g; continuous_on W h; h ` W \<subseteq> X\<rbrakk>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3549
     \<Longrightarrow> homotopic_with p W Y (f o h) (g o h)"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3550
  apply (clarsimp simp add: homotopic_with_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3551
  apply (rename_tac k)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3552
  apply (rule_tac x="k o (\<lambda>y. (fst y, h (snd y)))" in exI)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3553
  apply (rule conjI continuous_intros continuous_on_compose [where f=snd and g=h, unfolded o_def] | simp)+
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3554
  apply (erule continuous_on_subset)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3555
  apply (fastforce simp: o_def)+
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3556
  done
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3557
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3558
proposition homotopic_compose_continuous_right:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3559
     "\<lbrakk>homotopic_with (\<lambda>f. True) X Y f g; continuous_on W h; h ` W \<subseteq> X\<rbrakk>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3560
      \<Longrightarrow> homotopic_with (\<lambda>f. True) W Y (f o h) (g o h)"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3561
  using homotopic_with_compose_continuous_right by fastforce
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3562
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3563
proposition homotopic_with_compose_continuous_left:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3564
     "\<lbrakk>homotopic_with (\<lambda>f. p (h \<circ> f)) X Y f g; continuous_on Y h; h ` Y \<subseteq> Z\<rbrakk>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3565
      \<Longrightarrow> homotopic_with p X Z (h o f) (h o g)"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3566
  apply (clarsimp simp add: homotopic_with_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3567
  apply (rename_tac k)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3568
  apply (rule_tac x="h o k" in exI)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3569
  apply (rule conjI continuous_intros continuous_on_compose [where f=snd and g=h, unfolded o_def] | simp)+
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3570
  apply (erule continuous_on_subset)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3571
  apply (fastforce simp: o_def)+
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3572
  done
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3573
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3574
proposition homotopic_compose_continuous_left:
62626
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  3575
   "\<lbrakk>homotopic_with (\<lambda>_. True) X Y f g;
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  3576
     continuous_on Y h; h ` Y \<subseteq> Z\<rbrakk>
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  3577
    \<Longrightarrow> homotopic_with (\<lambda>f. True) X Z (h o f) (h o g)"
61694
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3578
  using homotopic_with_compose_continuous_left by fastforce
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3579
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3580
proposition homotopic_with_Pair:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3581
   assumes hom: "homotopic_with p s t f g" "homotopic_with p' s' t' f' g'"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3582
       and q: "\<And>f g. \<lbrakk>p f; p' g\<rbrakk> \<Longrightarrow> q(\<lambda>(x,y). (f x, g y))"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3583
     shows "homotopic_with q (s \<times> s') (t \<times> t')
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3584
                  (\<lambda>(x,y). (f x, f' y)) (\<lambda>(x,y). (g x, g' y))"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3585
  using hom
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3586
  apply (clarsimp simp add: homotopic_with_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3587
  apply (rename_tac k k')
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3588
  apply (rule_tac x="\<lambda>z. ((k o (\<lambda>x. (fst x, fst (snd x)))) z, (k' o (\<lambda>x. (fst x, snd (snd x)))) z)" in exI)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3589
  apply (rule conjI continuous_intros | erule continuous_on_subset | clarsimp)+
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3590
  apply (auto intro!: q [unfolded case_prod_unfold])
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3591
  done
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3592
62843
313d3b697c9a Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents: 62626
diff changeset
  3593
lemma homotopic_on_empty [simp]: "homotopic_with (\<lambda>x. True) {} t f g"
61694
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3594
  by (metis continuous_on_def empty_iff homotopic_with_equal image_subset_iff)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3595
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3596
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3597
text\<open>Homotopy with P is an equivalence relation (on continuous functions mapping X into Y that satisfy P,
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3598
     though this only affects reflexivity.\<close>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3599
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3600
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3601
proposition homotopic_with_refl:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3602
   "homotopic_with P X Y f f \<longleftrightarrow> continuous_on X f \<and> image f X \<subseteq> Y \<and> P f"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3603
  apply (rule iffI)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3604
  using homotopic_with_imp_continuous homotopic_with_imp_property homotopic_with_imp_subset2 apply blast
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3605
  apply (simp add: homotopic_with_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3606
  apply (rule_tac x="f o snd" in exI)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3607
  apply (rule conjI continuous_intros | force)+
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3608
  done
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3609
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3610
lemma homotopic_with_symD:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3611
  fixes X :: "'a::real_normed_vector set"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3612
    assumes "homotopic_with P X Y f g"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3613
      shows "homotopic_with P X Y g f"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3614
  using assms
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3615
  apply (clarsimp simp add: homotopic_with_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3616
  apply (rename_tac h)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3617
  apply (rule_tac x="h o (\<lambda>y. (1 - fst y, snd y))" in exI)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3618
  apply (rule conjI continuous_intros | erule continuous_on_subset | force simp add: image_subset_iff)+
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3619
  done
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3620
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3621
proposition homotopic_with_sym:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3622
    fixes X :: "'a::real_normed_vector set"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3623
    shows "homotopic_with P X Y f g \<longleftrightarrow> homotopic_with P X Y g f"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3624
  using homotopic_with_symD by blast
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3625
61699
a81dc5c4d6a9 New theorems mostly from Peter Gammie
paulson <lp15@cam.ac.uk>
parents: 61694
diff changeset
  3626
lemma split_01: "{0..1::real} = {0..1/2} \<union> {1/2..1}"
a81dc5c4d6a9 New theorems mostly from Peter Gammie
paulson <lp15@cam.ac.uk>
parents: 61694
diff changeset
  3627
  by force
a81dc5c4d6a9 New theorems mostly from Peter Gammie
paulson <lp15@cam.ac.uk>
parents: 61694
diff changeset
  3628
61694
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3629
lemma split_01_prod: "{0..1::real} \<times> X = ({0..1/2} \<times> X) \<union> ({1/2..1} \<times> X)"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3630
  by force
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3631
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3632
proposition homotopic_with_trans:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3633
    fixes X :: "'a::real_normed_vector set"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3634
    assumes "homotopic_with P X Y f g" and "homotopic_with P X Y g h"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3635
      shows "homotopic_with P X Y f h"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3636
proof -
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3637
  have clo1: "closedin (subtopology euclidean ({0..1/2} \<times> X \<union> {1/2..1} \<times> X)) ({0..1/2::real} \<times> X)"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3638
    apply (simp add: closedin_closed split_01_prod [symmetric])
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3639
    apply (rule_tac x="{0..1/2} \<times> UNIV" in exI)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3640
    apply (force simp add: closed_Times)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3641
    done
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3642
  have clo2: "closedin (subtopology euclidean ({0..1/2} \<times> X \<union> {1/2..1} \<times> X)) ({1/2..1::real} \<times> X)"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3643
    apply (simp add: closedin_closed split_01_prod [symmetric])
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3644
    apply (rule_tac x="{1/2..1} \<times> UNIV" in exI)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3645
    apply (force simp add: closed_Times)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3646
    done
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3647
  { fix k1 k2:: "real \<times> 'a \<Rightarrow> 'b"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3648
    assume cont: "continuous_on ({0..1} \<times> X) k1" "continuous_on ({0..1} \<times> X) k2"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3649
       and Y: "k1 ` ({0..1} \<times> X) \<subseteq> Y" "k2 ` ({0..1} \<times> X) \<subseteq> Y"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3650
       and geq: "\<forall>x. k1 (1, x) = g x" "\<forall>x. k2 (0, x) = g x"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3651
       and k12: "\<forall>x. k1 (0, x) = f x" "\<forall>x. k2 (1, x) = h x"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3652
       and P:   "\<forall>t\<in>{0..1}. P (\<lambda>x. k1 (t, x))" "\<forall>t\<in>{0..1}. P (\<lambda>x. k2 (t, x))"
63040
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 63016
diff changeset
  3653
    define k where "k y =
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 63016
diff changeset
  3654
      (if fst y \<le> 1 / 2
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 63016
diff changeset
  3655
       then (k1 o (\<lambda>x. (2 *\<^sub>R fst x, snd x))) y
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 63016
diff changeset
  3656
       else (k2 o (\<lambda>x. (2 *\<^sub>R fst x -1, snd x))) y)" for y
61694
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3657
    have keq: "k1 (2 * u, v) = k2 (2 * u - 1, v)" if "u = 1/2"  for u v
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3658
      by (simp add: geq that)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3659
    have "continuous_on ({0..1} \<times> X) k"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3660
      using cont
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3661
      apply (simp add: split_01_prod k_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3662
      apply (rule clo1 clo2 continuous_on_cases_local continuous_intros | erule continuous_on_subset | simp add: linear image_subset_iff)+
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3663
      apply (force simp add: keq)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3664
      done
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3665
    moreover have "k ` ({0..1} \<times> X) \<subseteq> Y"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3666
      using Y by (force simp add: k_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3667
    moreover have "\<forall>x. k (0, x) = f x"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3668
      by (simp add: k_def k12)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3669
    moreover have "(\<forall>x. k (1, x) = h x)"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3670
      by (simp add: k_def k12)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3671
    moreover have "\<forall>t\<in>{0..1}. P (\<lambda>x. k (t, x))"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3672
      using P
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3673
      apply (clarsimp simp add: k_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3674
      apply (case_tac "t \<le> 1/2")
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3675
      apply (auto simp:)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3676
      done
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3677
    ultimately have *: "\<exists>k :: real \<times> 'a \<Rightarrow> 'b.
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3678
                       continuous_on ({0..1} \<times> X) k \<and> k ` ({0..1} \<times> X) \<subseteq> Y \<and>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3679
                       (\<forall>x. k (0, x) = f x) \<and> (\<forall>x. k (1, x) = h x) \<and> (\<forall>t\<in>{0..1}. P (\<lambda>x. k (t, x)))"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3680
      by blast
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3681
  } note * = this
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3682
  show ?thesis
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3683
    using assms by (auto intro: * simp add: homotopic_with_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3684
qed
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3685
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3686
proposition homotopic_compose:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3687
      fixes s :: "'a::real_normed_vector set"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3688
      shows "\<lbrakk>homotopic_with (\<lambda>x. True) s t f f'; homotopic_with (\<lambda>x. True) t u g g'\<rbrakk>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3689
             \<Longrightarrow> homotopic_with (\<lambda>x. True) s u (g o f) (g' o f')"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3690
  apply (rule homotopic_with_trans [where g = "g o f'"])
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3691
  apply (metis homotopic_compose_continuous_left homotopic_with_imp_continuous homotopic_with_imp_subset1)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3692
  by (metis homotopic_compose_continuous_right homotopic_with_imp_continuous homotopic_with_imp_subset2)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3693
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3694
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3695
text\<open>Homotopic triviality implicitly incorporates path-connectedness.\<close>
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3696
lemma homotopic_triviality:
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3697
  fixes S :: "'a::real_normed_vector set"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3698
  shows  "(\<forall>f g. continuous_on S f \<and> f ` S \<subseteq> T \<and>
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3699
                 continuous_on S g \<and> g ` S \<subseteq> T
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3700
                 \<longrightarrow> homotopic_with (\<lambda>x. True) S T f g) \<longleftrightarrow>
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3701
          (S = {} \<or> path_connected T) \<and>
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3702
          (\<forall>f. continuous_on S f \<and> f ` S \<subseteq> T \<longrightarrow> (\<exists>c. homotopic_with (\<lambda>x. True) S T f (\<lambda>x. c)))"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3703
          (is "?lhs = ?rhs")
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3704
proof (cases "S = {} \<or> T = {}")
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3705
  case True then show ?thesis by auto
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3706
next
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3707
  case False show ?thesis
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3708
  proof
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3709
    assume LHS [rule_format]: ?lhs
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3710
    have pab: "path_component T a b" if "a \<in> T" "b \<in> T" for a b
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3711
    proof -
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3712
      have "homotopic_with (\<lambda>x. True) S T (\<lambda>x. a) (\<lambda>x. b)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3713
        by (simp add: LHS continuous_on_const image_subset_iff that)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3714
      then show ?thesis
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3715
        using False homotopic_constant_maps by blast
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3716
    qed
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3717
      moreover
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3718
    have "\<exists>c. homotopic_with (\<lambda>x. True) S T f (\<lambda>x. c)" if "continuous_on S f" "f ` S \<subseteq> T" for f
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3719
      by (metis (full_types) False LHS equals0I homotopic_constant_maps homotopic_with_imp_continuous homotopic_with_imp_subset2 pab that)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3720
    ultimately show ?rhs
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3721
      by (simp add: path_connected_component)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3722
  next
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3723
    assume RHS: ?rhs
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3724
    with False have T: "path_connected T"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3725
      by blast
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3726
    show ?lhs
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3727
    proof clarify
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3728
      fix f g
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3729
      assume "continuous_on S f" "f ` S \<subseteq> T" "continuous_on S g" "g ` S \<subseteq> T"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3730
      obtain c d where c: "homotopic_with (\<lambda>x. True) S T f (\<lambda>x. c)" and d: "homotopic_with (\<lambda>x. True) S T g (\<lambda>x. d)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3731
        using False \<open>continuous_on S f\<close> \<open>f ` S \<subseteq> T\<close>  RHS \<open>continuous_on S g\<close> \<open>g ` S \<subseteq> T\<close> by blast
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3732
      then have "c \<in> T" "d \<in> T"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3733
        using False homotopic_with_imp_subset2 by fastforce+
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3734
      with T have "path_component T c d"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3735
        using path_connected_component by blast
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3736
      then have "homotopic_with (\<lambda>x. True) S T (\<lambda>x. c) (\<lambda>x. d)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3737
        by (simp add: homotopic_constant_maps)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3738
      with c d show "homotopic_with (\<lambda>x. True) S T f g"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3739
        by (meson homotopic_with_symD homotopic_with_trans)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3740
    qed
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3741
  qed
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3742
qed
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3743
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  3744
61694
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3745
subsection\<open>Homotopy of paths, maintaining the same endpoints.\<close>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3746
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3747
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3748
definition homotopic_paths :: "['a set, real \<Rightarrow> 'a, real \<Rightarrow> 'a::topological_space] \<Rightarrow> bool"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3749
  where
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3750
     "homotopic_paths s p q \<equiv>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3751
       homotopic_with (\<lambda>r. pathstart r = pathstart p \<and> pathfinish r = pathfinish p) {0..1} s p q"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3752
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3753
lemma homotopic_paths:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3754
   "homotopic_paths s p q \<longleftrightarrow>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3755
      (\<exists>h. continuous_on ({0..1} \<times> {0..1}) h \<and>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3756
          h ` ({0..1} \<times> {0..1}) \<subseteq> s \<and>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3757
          (\<forall>x \<in> {0..1}. h(0,x) = p x) \<and>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3758
          (\<forall>x \<in> {0..1}. h(1,x) = q x) \<and>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3759
          (\<forall>t \<in> {0..1::real}. pathstart(h o Pair t) = pathstart p \<and>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3760
                        pathfinish(h o Pair t) = pathfinish p))"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3761
  by (auto simp: homotopic_paths_def homotopic_with pathstart_def pathfinish_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3762
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3763
proposition homotopic_paths_imp_pathstart:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3764
     "homotopic_paths s p q \<Longrightarrow> pathstart p = pathstart q"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3765
  by (metis (mono_tags, lifting) homotopic_paths_def homotopic_with_imp_property)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3766
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3767
proposition homotopic_paths_imp_pathfinish:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3768
     "homotopic_paths s p q \<Longrightarrow> pathfinish p = pathfinish q"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3769
  by (metis (mono_tags, lifting) homotopic_paths_def homotopic_with_imp_property)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3770
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3771
lemma homotopic_paths_imp_path:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3772
     "homotopic_paths s p q \<Longrightarrow> path p \<and> path q"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3773
  using homotopic_paths_def homotopic_with_imp_continuous path_def by blast
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3774
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3775
lemma homotopic_paths_imp_subset:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3776
     "homotopic_paths s p q \<Longrightarrow> path_image p \<subseteq> s \<and> path_image q \<subseteq> s"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3777
  by (simp add: homotopic_paths_def homotopic_with_imp_subset1 homotopic_with_imp_subset2 path_image_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3778
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3779
proposition homotopic_paths_refl [simp]: "homotopic_paths s p p \<longleftrightarrow> path p \<and> path_image p \<subseteq> s"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3780
by (simp add: homotopic_paths_def homotopic_with_refl path_def path_image_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3781
61738
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  3782
proposition homotopic_paths_sym: "homotopic_paths s p q \<Longrightarrow> homotopic_paths s q p"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  3783
  by (metis (mono_tags) homotopic_paths_def homotopic_paths_imp_pathfinish homotopic_paths_imp_pathstart homotopic_with_symD)
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  3784
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  3785
proposition homotopic_paths_sym_eq: "homotopic_paths s p q \<longleftrightarrow> homotopic_paths s q p"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  3786
  by (metis homotopic_paths_sym)
61694
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3787
61762
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  3788
proposition homotopic_paths_trans [trans]:
61694
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3789
     "\<lbrakk>homotopic_paths s p q; homotopic_paths s q r\<rbrakk> \<Longrightarrow> homotopic_paths s p r"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3790
  apply (simp add: homotopic_paths_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3791
  apply (rule homotopic_with_trans, assumption)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3792
  by (metis (mono_tags, lifting) homotopic_with_imp_property homotopic_with_mono)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3793
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3794
proposition homotopic_paths_eq:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3795
     "\<lbrakk>path p; path_image p \<subseteq> s; \<And>t. t \<in> {0..1} \<Longrightarrow> p t = q t\<rbrakk> \<Longrightarrow> homotopic_paths s p q"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3796
  apply (simp add: homotopic_paths_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3797
  apply (rule homotopic_with_eq)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3798
  apply (auto simp: path_def homotopic_with_refl pathstart_def pathfinish_def path_image_def elim: continuous_on_eq)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3799
  done
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3800
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3801
proposition homotopic_paths_reparametrize:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3802
  assumes "path p"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3803
      and pips: "path_image p \<subseteq> s"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3804
      and contf: "continuous_on {0..1} f"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3805
      and f01:"f ` {0..1} \<subseteq> {0..1}"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3806
      and [simp]: "f(0) = 0" "f(1) = 1"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3807
      and q: "\<And>t. t \<in> {0..1} \<Longrightarrow> q(t) = p(f t)"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3808
    shows "homotopic_paths s p q"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3809
proof -
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3810
  have contp: "continuous_on {0..1} p"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3811
    by (metis \<open>path p\<close> path_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3812
  then have "continuous_on {0..1} (p o f)"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3813
    using contf continuous_on_compose continuous_on_subset f01 by blast
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3814
  then have "path q"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3815
    by (simp add: path_def) (metis q continuous_on_cong)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3816
  have piqs: "path_image q \<subseteq> s"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3817
    by (metis (no_types, hide_lams) pips f01 image_subset_iff path_image_def q)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3818
  have fb0: "\<And>a b. \<lbrakk>0 \<le> a; a \<le> 1; 0 \<le> b; b \<le> 1\<rbrakk> \<Longrightarrow> 0 \<le> (1 - a) * f b + a * b"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3819
    using f01 by force
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3820
  have fb1: "\<lbrakk>0 \<le> a; a \<le> 1; 0 \<le> b; b \<le> 1\<rbrakk> \<Longrightarrow> (1 - a) * f b + a * b \<le> 1" for a b
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3821
    using f01 [THEN subsetD, of "f b"] by (simp add: convex_bound_le)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3822
  have "homotopic_paths s q p"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3823
  proof (rule homotopic_paths_trans)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3824
    show "homotopic_paths s q (p \<circ> f)"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3825
      using q by (force intro: homotopic_paths_eq [OF  \<open>path q\<close> piqs])
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3826
  next
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3827
    show "homotopic_paths s (p \<circ> f) p"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3828
      apply (simp add: homotopic_paths_def homotopic_with_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3829
      apply (rule_tac x="p o (\<lambda>y. (1 - (fst y)) *\<^sub>R ((f o snd) y) + (fst y) *\<^sub>R snd y)"  in exI)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3830
      apply (rule conjI contf continuous_intros continuous_on_subset [OF contp] | simp)+
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3831
      using pips [unfolded path_image_def]
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3832
      apply (auto simp: fb0 fb1 pathstart_def pathfinish_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3833
      done
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3834
  qed
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3835
  then show ?thesis
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3836
    by (simp add: homotopic_paths_sym)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3837
qed
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3838
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3839
lemma homotopic_paths_subset: "\<lbrakk>homotopic_paths s p q; s \<subseteq> t\<rbrakk> \<Longrightarrow> homotopic_paths t p q"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3840
  using homotopic_paths_def homotopic_with_subset_right by blast
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3841
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3842
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3843
text\<open> A slightly ad-hoc but useful lemma in constructing homotopies.\<close>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3844
lemma homotopic_join_lemma:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3845
  fixes q :: "[real,real] \<Rightarrow> 'a::topological_space"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3846
  assumes p: "continuous_on ({0..1} \<times> {0..1}) (\<lambda>y. p (fst y) (snd y))"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3847
      and q: "continuous_on ({0..1} \<times> {0..1}) (\<lambda>y. q (fst y) (snd y))"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3848
      and pf: "\<And>t. t \<in> {0..1} \<Longrightarrow> pathfinish(p t) = pathstart(q t)"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3849
    shows "continuous_on ({0..1} \<times> {0..1}) (\<lambda>y. (p(fst y) +++ q(fst y)) (snd y))"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3850
proof -
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3851
  have 1: "(\<lambda>y. p (fst y) (2 * snd y)) = (\<lambda>y. p (fst y) (snd y)) o (\<lambda>y. (fst y, 2 * snd y))"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3852
    by (rule ext) (simp )
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3853
  have 2: "(\<lambda>y. q (fst y) (2 * snd y - 1)) = (\<lambda>y. q (fst y) (snd y)) o (\<lambda>y. (fst y, 2 * snd y - 1))"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3854
    by (rule ext) (simp )
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3855
  show ?thesis
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3856
    apply (simp add: joinpaths_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3857
    apply (rule continuous_on_cases_le)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3858
    apply (simp_all only: 1 2)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3859
    apply (rule continuous_intros continuous_on_subset [OF p] continuous_on_subset [OF q] | force)+
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3860
    using pf
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3861
    apply (auto simp: mult.commute pathstart_def pathfinish_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3862
    done
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3863
qed
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3864
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3865
text\<open> Congruence properties of homotopy w.r.t. path-combining operations.\<close>
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3866
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3867
lemma homotopic_paths_reversepath_D:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3868
      assumes "homotopic_paths s p q"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3869
      shows   "homotopic_paths s (reversepath p) (reversepath q)"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3870
  using assms
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3871
  apply (simp add: homotopic_paths_def homotopic_with_def, clarify)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3872
  apply (rule_tac x="h o (\<lambda>x. (fst x, 1 - snd x))" in exI)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3873
  apply (rule conjI continuous_intros)+
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3874
  apply (auto simp: reversepath_def pathstart_def pathfinish_def elim!: continuous_on_subset)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3875
  done
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3876
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3877
proposition homotopic_paths_reversepath:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3878
     "homotopic_paths s (reversepath p) (reversepath q) \<longleftrightarrow> homotopic_paths s p q"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3879
  using homotopic_paths_reversepath_D by force
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3880
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3881
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3882
proposition homotopic_paths_join:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3883
    "\<lbrakk>homotopic_paths s p p'; homotopic_paths s q q'; pathfinish p = pathstart q\<rbrakk> \<Longrightarrow> homotopic_paths s (p +++ q) (p' +++ q')"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3884
  apply (simp add: homotopic_paths_def homotopic_with_def, clarify)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3885
  apply (rename_tac k1 k2)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3886
  apply (rule_tac x="(\<lambda>y. ((k1 o Pair (fst y)) +++ (k2 o Pair (fst y))) (snd y))" in exI)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3887
  apply (rule conjI continuous_intros homotopic_join_lemma)+
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3888
  apply (auto simp: joinpaths_def pathstart_def pathfinish_def path_image_def)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3889
  done
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3890
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3891
proposition homotopic_paths_continuous_image:
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3892
    "\<lbrakk>homotopic_paths s f g; continuous_on s h; h ` s \<subseteq> t\<rbrakk> \<Longrightarrow> homotopic_paths t (h o f) (h o g)"
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3893
  unfolding homotopic_paths_def
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3894
  apply (rule homotopic_with_compose_continuous_left [of _ _ _ s])
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3895
  apply (auto simp: pathstart_def pathfinish_def elim!: homotopic_with_mono)
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3896
  done
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3897
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3898
subsection\<open>Group properties for homotopy of paths\<close>
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3899
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3900
text\<open>So taking equivalence classes under homotopy would give the fundamental group\<close>
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3901
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3902
proposition homotopic_paths_rid:
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3903
    "\<lbrakk>path p; path_image p \<subseteq> s\<rbrakk> \<Longrightarrow> homotopic_paths s (p +++ linepath (pathfinish p) (pathfinish p)) p"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3904
  apply (subst homotopic_paths_sym)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3905
  apply (rule homotopic_paths_reparametrize [where f = "\<lambda>t. if  t \<le> 1 / 2 then 2 *\<^sub>R t else 1"])
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3906
  apply (simp_all del: le_divide_eq_numeral1)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3907
  apply (subst split_01)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3908
  apply (rule continuous_on_cases continuous_intros | force simp: pathfinish_def joinpaths_def)+
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3909
  done
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3910
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3911
proposition homotopic_paths_lid:
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3912
   "\<lbrakk>path p; path_image p \<subseteq> s\<rbrakk> \<Longrightarrow> homotopic_paths s (linepath (pathstart p) (pathstart p) +++ p) p"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3913
using homotopic_paths_rid [of "reversepath p" s]
61738
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  3914
  by (metis homotopic_paths_reversepath path_image_reversepath path_reversepath pathfinish_linepath
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3915
        pathfinish_reversepath reversepath_joinpaths reversepath_linepath)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3916
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3917
proposition homotopic_paths_assoc:
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3918
   "\<lbrakk>path p; path_image p \<subseteq> s; path q; path_image q \<subseteq> s; path r; path_image r \<subseteq> s; pathfinish p = pathstart q;
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3919
     pathfinish q = pathstart r\<rbrakk>
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3920
    \<Longrightarrow> homotopic_paths s (p +++ (q +++ r)) ((p +++ q) +++ r)"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3921
  apply (subst homotopic_paths_sym)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3922
  apply (rule homotopic_paths_reparametrize
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3923
           [where f = "\<lambda>t. if  t \<le> 1 / 2 then inverse 2 *\<^sub>R t
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3924
                           else if  t \<le> 3 / 4 then t - (1 / 4)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3925
                           else 2 *\<^sub>R t - 1"])
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3926
  apply (simp_all del: le_divide_eq_numeral1)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3927
  apply (simp add: subset_path_image_join)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3928
  apply (rule continuous_on_cases_1 continuous_intros)+
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3929
  apply (auto simp: joinpaths_def)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3930
  done
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3931
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3932
proposition homotopic_paths_rinv:
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3933
  assumes "path p" "path_image p \<subseteq> s"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3934
    shows "homotopic_paths s (p +++ reversepath p) (linepath (pathstart p) (pathstart p))"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3935
proof -
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3936
  have "continuous_on ({0..1} \<times> {0..1}) (\<lambda>x. (subpath 0 (fst x) p +++ reversepath (subpath 0 (fst x) p)) (snd x))"
61738
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  3937
    using assms
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3938
    apply (simp add: joinpaths_def subpath_def reversepath_def path_def del: le_divide_eq_numeral1)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3939
    apply (rule continuous_on_cases_le)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3940
    apply (rule_tac [2] continuous_on_compose [of _ _ p, unfolded o_def])
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3941
    apply (rule continuous_on_compose [of _ _ p, unfolded o_def])
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3942
    apply (auto intro!: continuous_intros simp del: eq_divide_eq_numeral1)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3943
    apply (force elim!: continuous_on_subset simp add: mult_le_one)+
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3944
    done
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3945
  then show ?thesis
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3946
    using assms
61738
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  3947
    apply (subst homotopic_paths_sym_eq)
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  3948
    unfolding homotopic_paths_def homotopic_with_def
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3949
    apply (rule_tac x="(\<lambda>y. (subpath 0 (fst y) p +++ reversepath(subpath 0 (fst y) p)) (snd y))" in exI)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3950
    apply (simp add: path_defs joinpaths_def subpath_def reversepath_def)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3951
    apply (force simp: mult_le_one)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3952
    done
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3953
qed
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3954
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3955
proposition homotopic_paths_linv:
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3956
  assumes "path p" "path_image p \<subseteq> s"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3957
    shows "homotopic_paths s (reversepath p +++ p) (linepath (pathfinish p) (pathfinish p))"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3958
using homotopic_paths_rinv [of "reversepath p" s] assms by simp
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3959
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3960
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3961
subsection\<open> Homotopy of loops without requiring preservation of endpoints.\<close>
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3962
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3963
definition homotopic_loops :: "'a::topological_space set \<Rightarrow> (real \<Rightarrow> 'a) \<Rightarrow> (real \<Rightarrow> 'a) \<Rightarrow> bool"  where
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3964
 "homotopic_loops s p q \<equiv>
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3965
     homotopic_with (\<lambda>r. pathfinish r = pathstart r) {0..1} s p q"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3966
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3967
lemma homotopic_loops:
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3968
   "homotopic_loops s p q \<longleftrightarrow>
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3969
      (\<exists>h. continuous_on ({0..1::real} \<times> {0..1}) h \<and>
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3970
          image h ({0..1} \<times> {0..1}) \<subseteq> s \<and>
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3971
          (\<forall>x \<in> {0..1}. h(0,x) = p x) \<and>
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3972
          (\<forall>x \<in> {0..1}. h(1,x) = q x) \<and>
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3973
          (\<forall>t \<in> {0..1}. pathfinish(h o Pair t) = pathstart(h o Pair t)))"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3974
  by (simp add: homotopic_loops_def pathstart_def pathfinish_def homotopic_with)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3975
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3976
proposition homotopic_loops_imp_loop:
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3977
     "homotopic_loops s p q \<Longrightarrow> pathfinish p = pathstart p \<and> pathfinish q = pathstart q"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3978
using homotopic_with_imp_property homotopic_loops_def by blast
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3979
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3980
proposition homotopic_loops_imp_path:
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3981
     "homotopic_loops s p q \<Longrightarrow> path p \<and> path q"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3982
  unfolding homotopic_loops_def path_def
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3983
  using homotopic_with_imp_continuous by blast
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3984
61738
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  3985
proposition homotopic_loops_imp_subset:
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  3986
     "homotopic_loops s p q \<Longrightarrow> path_image p \<subseteq> s \<and> path_image q \<subseteq> s"
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3987
  unfolding homotopic_loops_def path_image_def
61738
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  3988
  by (metis homotopic_with_imp_subset1 homotopic_with_imp_subset2)
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3989
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3990
proposition homotopic_loops_refl:
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3991
     "homotopic_loops s p p \<longleftrightarrow>
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3992
      path p \<and> path_image p \<subseteq> s \<and> pathfinish p = pathstart p"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3993
  by (simp add: homotopic_loops_def homotopic_with_refl path_image_def path_def)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3994
61738
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  3995
proposition homotopic_loops_sym: "homotopic_loops s p q \<Longrightarrow> homotopic_loops s q p"
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3996
  by (simp add: homotopic_loops_def homotopic_with_sym)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3997
61738
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  3998
proposition homotopic_loops_sym_eq: "homotopic_loops s p q \<longleftrightarrow> homotopic_loops s q p"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  3999
  by (metis homotopic_loops_sym)
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4000
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4001
proposition homotopic_loops_trans:
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4002
   "\<lbrakk>homotopic_loops s p q; homotopic_loops s q r\<rbrakk> \<Longrightarrow> homotopic_loops s p r"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4003
  unfolding homotopic_loops_def by (blast intro: homotopic_with_trans)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4004
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4005
proposition homotopic_loops_subset:
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4006
   "\<lbrakk>homotopic_loops s p q; s \<subseteq> t\<rbrakk> \<Longrightarrow> homotopic_loops t p q"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4007
  by (simp add: homotopic_loops_def homotopic_with_subset_right)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4008
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4009
proposition homotopic_loops_eq:
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4010
   "\<lbrakk>path p; path_image p \<subseteq> s; pathfinish p = pathstart p; \<And>t. t \<in> {0..1} \<Longrightarrow> p(t) = q(t)\<rbrakk>
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4011
          \<Longrightarrow> homotopic_loops s p q"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4012
  unfolding homotopic_loops_def
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4013
  apply (rule homotopic_with_eq)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4014
  apply (rule homotopic_with_refl [where f = p, THEN iffD2])
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4015
  apply (simp_all add: path_image_def path_def pathstart_def pathfinish_def)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4016
  done
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4017
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4018
proposition homotopic_loops_continuous_image:
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4019
   "\<lbrakk>homotopic_loops s f g; continuous_on s h; h ` s \<subseteq> t\<rbrakk> \<Longrightarrow> homotopic_loops t (h \<circ> f) (h \<circ> g)"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4020
  unfolding homotopic_loops_def
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4021
  apply (rule homotopic_with_compose_continuous_left)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4022
  apply (erule homotopic_with_mono)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4023
  by (simp add: pathfinish_def pathstart_def)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4024
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4025
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4026
subsection\<open>Relations between the two variants of homotopy\<close>
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4027
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4028
proposition homotopic_paths_imp_homotopic_loops:
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4029
    "\<lbrakk>homotopic_paths s p q; pathfinish p = pathstart p; pathfinish q = pathstart p\<rbrakk> \<Longrightarrow> homotopic_loops s p q"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4030
  by (auto simp: homotopic_paths_def homotopic_loops_def intro: homotopic_with_mono)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4031
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4032
proposition homotopic_loops_imp_homotopic_paths_null:
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4033
  assumes "homotopic_loops s p (linepath a a)"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4034
    shows "homotopic_paths s p (linepath (pathstart p) (pathstart p))"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4035
proof -
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4036
  have "path p" by (metis assms homotopic_loops_imp_path)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4037
  have ploop: "pathfinish p = pathstart p" by (metis assms homotopic_loops_imp_loop)
61738
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4038
  have pip: "path_image p \<subseteq> s" by (metis assms homotopic_loops_imp_subset)
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4039
  obtain h where conth: "continuous_on ({0..1::real} \<times> {0..1}) h"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4040
             and hs: "h ` ({0..1} \<times> {0..1}) \<subseteq> s"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4041
             and [simp]: "\<And>x. x \<in> {0..1} \<Longrightarrow> h(0,x) = p x"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4042
             and [simp]: "\<And>x. x \<in> {0..1} \<Longrightarrow> h(1,x) = a"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4043
             and ends: "\<And>t. t \<in> {0..1} \<Longrightarrow> pathfinish (h \<circ> Pair t) = pathstart (h \<circ> Pair t)"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4044
    using assms by (auto simp: homotopic_loops homotopic_with)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4045
  have conth0: "path (\<lambda>u. h (u, 0))"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4046
    unfolding path_def
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4047
    apply (rule continuous_on_compose [of _ _ h, unfolded o_def])
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4048
    apply (force intro: continuous_intros continuous_on_subset [OF conth])+
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4049
    done
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4050
  have pih0: "path_image (\<lambda>u. h (u, 0)) \<subseteq> s"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4051
    using hs by (force simp: path_image_def)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4052
  have c1: "continuous_on ({0..1} \<times> {0..1}) (\<lambda>x. h (fst x * snd x, 0))"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4053
    apply (rule continuous_on_compose [of _ _ h, unfolded o_def])
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4054
    apply (force simp: mult_le_one intro: continuous_intros continuous_on_subset [OF conth])+
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4055
    done
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4056
  have c2: "continuous_on ({0..1} \<times> {0..1}) (\<lambda>x. h (fst x - fst x * snd x, 0))"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4057
    apply (rule continuous_on_compose [of _ _ h, unfolded o_def])
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4058
    apply (force simp: mult_left_le mult_le_one intro: continuous_intros continuous_on_subset [OF conth])+
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4059
    apply (rule continuous_on_subset [OF conth])
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4060
    apply (auto simp: algebra_simps add_increasing2 mult_left_le)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4061
    done
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4062
  have [simp]: "\<And>t. \<lbrakk>0 \<le> t \<and> t \<le> 1\<rbrakk> \<Longrightarrow> h (t, 1) = h (t, 0)"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4063
    using ends by (simp add: pathfinish_def pathstart_def)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4064
  have adhoc_le: "c * 4 \<le> 1 + c * (d * 4)" if "\<not> d * 4 \<le> 3" "0 \<le> c" "c \<le> 1" for c d::real
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4065
  proof -
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4066
    have "c * 3 \<le> c * (d * 4)" using that less_eq_real_def by auto
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4067
    with \<open>c \<le> 1\<close> show ?thesis by fastforce
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4068
  qed
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4069
  have *: "\<And>p x. (path p \<and> path(reversepath p)) \<and>
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4070
                  (path_image p \<subseteq> s \<and> path_image(reversepath p) \<subseteq> s) \<and>
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4071
                  (pathfinish p = pathstart(linepath a a +++ reversepath p) \<and>
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4072
                   pathstart(reversepath p) = a) \<and> pathstart p = x
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4073
                  \<Longrightarrow> homotopic_paths s (p +++ linepath a a +++ reversepath p) (linepath x x)"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4074
    by (metis homotopic_paths_lid homotopic_paths_join
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4075
              homotopic_paths_trans homotopic_paths_sym homotopic_paths_rinv)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4076
  have 1: "homotopic_paths s p (p +++ linepath (pathfinish p) (pathfinish p))"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4077
    using \<open>path p\<close> homotopic_paths_rid homotopic_paths_sym pip by blast
61738
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4078
  moreover have "homotopic_paths s (p +++ linepath (pathfinish p) (pathfinish p))
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4079
                                   (linepath (pathstart p) (pathstart p) +++ p +++ linepath (pathfinish p) (pathfinish p))"
61738
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4080
    apply (rule homotopic_paths_sym)
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4081
    using homotopic_paths_lid [of "p +++ linepath (pathfinish p) (pathfinish p)" s]
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4082
    by (metis 1 homotopic_paths_imp_path homotopic_paths_imp_pathstart homotopic_paths_imp_subset)
61738
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4083
  moreover have "homotopic_paths s (linepath (pathstart p) (pathstart p) +++ p +++ linepath (pathfinish p) (pathfinish p))
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4084
                                   ((\<lambda>u. h (u, 0)) +++ linepath a a +++ reversepath (\<lambda>u. h (u, 0)))"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4085
    apply (simp add: homotopic_paths_def homotopic_with_def)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4086
    apply (rule_tac x="\<lambda>y. (subpath 0 (fst y) (\<lambda>u. h (u, 0)) +++ (\<lambda>u. h (Pair (fst y) u)) +++ subpath (fst y) 0 (\<lambda>u. h (u, 0))) (snd y)" in exI)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4087
    apply (simp add: subpath_reversepath)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4088
    apply (intro conjI homotopic_join_lemma)
61738
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4089
    using ploop
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4090
    apply (simp_all add: path_defs joinpaths_def o_def subpath_def conth c1 c2)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4091
    apply (force simp: algebra_simps mult_le_one mult_left_le intro: hs [THEN subsetD] adhoc_le)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4092
    done
61738
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4093
  moreover have "homotopic_paths s ((\<lambda>u. h (u, 0)) +++ linepath a a +++ reversepath (\<lambda>u. h (u, 0)))
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4094
                                   (linepath (pathstart p) (pathstart p))"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4095
    apply (rule *)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4096
    apply (simp add: pih0 pathstart_def pathfinish_def conth0)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4097
    apply (simp add: reversepath_def joinpaths_def)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4098
    done
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4099
  ultimately show ?thesis
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4100
    by (blast intro: homotopic_paths_trans)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4101
qed
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4102
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4103
proposition homotopic_loops_conjugate:
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4104
  fixes s :: "'a::real_normed_vector set"
61738
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4105
  assumes "path p" "path q" and pip: "path_image p \<subseteq> s" and piq: "path_image q \<subseteq> s"
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4106
      and papp: "pathfinish p = pathstart q" and qloop: "pathfinish q = pathstart q"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4107
    shows "homotopic_loops s (p +++ q +++ reversepath p) q"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4108
proof -
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4109
  have contp: "continuous_on {0..1} p"  using \<open>path p\<close> [unfolded path_def] by blast
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4110
  have contq: "continuous_on {0..1} q"  using \<open>path q\<close> [unfolded path_def] by blast
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4111
  have c1: "continuous_on ({0..1} \<times> {0..1}) (\<lambda>x. p ((1 - fst x) * snd x + fst x))"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4112
    apply (rule continuous_on_compose [of _ _ p, unfolded o_def])
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4113
    apply (force simp: mult_le_one intro!: continuous_intros)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4114
    apply (rule continuous_on_subset [OF contp])
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4115
    apply (auto simp: algebra_simps add_increasing2 mult_right_le_one_le sum_le_prod1)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4116
    done
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4117
  have c2: "continuous_on ({0..1} \<times> {0..1}) (\<lambda>x. p ((fst x - 1) * snd x + 1))"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4118
    apply (rule continuous_on_compose [of _ _ p, unfolded o_def])
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4119
    apply (force simp: mult_le_one intro!: continuous_intros)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4120
    apply (rule continuous_on_subset [OF contp])
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4121
    apply (auto simp: algebra_simps add_increasing2 mult_left_le_one_le)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4122
    done
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4123
  have ps1: "\<And>a b. \<lbrakk>b * 2 \<le> 1; 0 \<le> b; 0 \<le> a; a \<le> 1\<rbrakk> \<Longrightarrow> p ((1 - a) * (2 * b) + a) \<in> s"
61738
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4124
    using sum_le_prod1
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4125
    by (force simp: algebra_simps add_increasing2 mult_left_le intro: pip [unfolded path_image_def, THEN subsetD])
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4126
  have ps2: "\<And>a b. \<lbrakk>\<not> 4 * b \<le> 3; b \<le> 1; 0 \<le> a; a \<le> 1\<rbrakk> \<Longrightarrow> p ((a - 1) * (4 * b - 3) + 1) \<in> s"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4127
    apply (rule pip [unfolded path_image_def, THEN subsetD])
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4128
    apply (rule image_eqI, blast)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4129
    apply (simp add: algebra_simps)
61738
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4130
    by (metis add_mono_thms_linordered_semiring(1) affine_ineq linear mult.commute mult.left_neutral mult_right_mono not_le
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4131
              add.commute zero_le_numeral)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4132
  have qs: "\<And>a b. \<lbrakk>4 * b \<le> 3; \<not> b * 2 \<le> 1\<rbrakk> \<Longrightarrow> q (4 * b - 2) \<in> s"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4133
    using path_image_def piq by fastforce
61738
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4134
  have "homotopic_loops s (p +++ q +++ reversepath p)
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4135
                          (linepath (pathstart q) (pathstart q) +++ q +++ linepath (pathstart q) (pathstart q))"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4136
    apply (simp add: homotopic_loops_def homotopic_with_def)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4137
    apply (rule_tac x="(\<lambda>y. (subpath (fst y) 1 p +++ q +++ subpath 1 (fst y) p) (snd y))" in exI)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4138
    apply (simp add: subpath_refl subpath_reversepath)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4139
    apply (intro conjI homotopic_join_lemma)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4140
    using papp qloop
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4141
    apply (simp_all add: path_defs joinpaths_def o_def subpath_def c1 c2)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4142
    apply (force simp: contq intro: continuous_on_compose [of _ _ q, unfolded o_def] continuous_on_id continuous_on_snd)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4143
    apply (auto simp: ps1 ps2 qs)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4144
    done
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4145
  moreover have "homotopic_loops s (linepath (pathstart q) (pathstart q) +++ q +++ linepath (pathstart q) (pathstart q)) q"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4146
  proof -
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4147
    have "homotopic_paths s (linepath (pathfinish q) (pathfinish q) +++ q) q"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4148
      using \<open>path q\<close> homotopic_paths_lid qloop piq by auto
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4149
    hence 1: "\<And>f. homotopic_paths s f q \<or> \<not> homotopic_paths s f (linepath (pathfinish q) (pathfinish q) +++ q)"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4150
      using homotopic_paths_trans by blast
61738
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4151
    hence "homotopic_paths s (linepath (pathfinish q) (pathfinish q) +++ q +++ linepath (pathfinish q) (pathfinish q)) q"
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4152
    proof -
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4153
      have "homotopic_paths s (q +++ linepath (pathfinish q) (pathfinish q)) q"
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4154
        by (simp add: \<open>path q\<close> homotopic_paths_rid piq)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4155
      thus ?thesis
61738
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4156
        by (metis (no_types) 1 \<open>path q\<close> homotopic_paths_join homotopic_paths_rinv homotopic_paths_sym
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4157
                  homotopic_paths_trans qloop pathfinish_linepath piq)
61738
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4158
    qed
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4159
    thus ?thesis
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4160
      by (metis (no_types) qloop homotopic_loops_sym homotopic_paths_imp_homotopic_loops homotopic_paths_imp_pathfinish homotopic_paths_sym)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4161
  qed
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4162
  ultimately show ?thesis
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4163
    by (blast intro: homotopic_loops_trans)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4164
qed
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  4165
66793
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4166
lemma homotopic_paths_loop_parts:
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4167
  assumes loops: "homotopic_loops S (p +++ reversepath q) (linepath a a)" and "path q"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4168
  shows "homotopic_paths S p q"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4169
proof -
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4170
  have paths: "homotopic_paths S (p +++ reversepath q) (linepath (pathstart p) (pathstart p))"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4171
    using homotopic_loops_imp_homotopic_paths_null [OF loops] by simp
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4172
  then have "path p"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4173
    using \<open>path q\<close> homotopic_loops_imp_path loops path_join path_join_path_ends path_reversepath by blast
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4174
  show ?thesis
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4175
  proof (cases "pathfinish p = pathfinish q")
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4176
    case True
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4177
    have pipq: "path_image p \<subseteq> S" "path_image q \<subseteq> S"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4178
      by (metis Un_subset_iff paths \<open>path p\<close> \<open>path q\<close> homotopic_loops_imp_subset homotopic_paths_imp_path loops
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4179
           path_image_join path_image_reversepath path_imp_reversepath path_join_eq)+
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4180
    have "homotopic_paths S p (p +++ (linepath (pathfinish p) (pathfinish p)))"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4181
      using \<open>path p\<close> \<open>path_image p \<subseteq> S\<close> homotopic_paths_rid homotopic_paths_sym by blast
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4182
    moreover have "homotopic_paths S (p +++ (linepath (pathfinish p) (pathfinish p))) (p +++ (reversepath q +++ q))"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4183
      by (simp add: True \<open>path p\<close> \<open>path q\<close> pipq homotopic_paths_join homotopic_paths_linv homotopic_paths_sym)
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4184
    moreover have "homotopic_paths S (p +++ (reversepath q +++ q)) ((p +++ reversepath q) +++ q)"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4185
      by (simp add: True \<open>path p\<close> \<open>path q\<close> homotopic_paths_assoc pipq)
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4186
    moreover have "homotopic_paths S ((p +++ reversepath q) +++ q) (linepath (pathstart p) (pathstart p) +++ q)"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4187
      by (simp add: \<open>path q\<close> homotopic_paths_join paths pipq)
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4188
    moreover then have "homotopic_paths S (linepath (pathstart p) (pathstart p) +++ q) q"
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4189
      by (metis \<open>path q\<close> homotopic_paths_imp_path homotopic_paths_lid linepath_trivial path_join_path_ends pathfinish_def pipq(2))
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4190
    ultimately show ?thesis
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4191
      using homotopic_paths_trans by metis
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4192
  next
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4193
    case False
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4194
    then show ?thesis
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4195
      using \<open>path q\<close> homotopic_loops_imp_path loops path_join_path_ends by fastforce
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4196
  qed
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4197
qed
deabce3ccf1f new material about connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 66456
diff changeset
  4198
61738
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4199
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4200
subsection\<open> Homotopy of "nearby" function, paths and loops.\<close>
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4201
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4202
lemma homotopic_with_linear:
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4203
  fixes f g :: "_ \<Rightarrow> 'b::real_normed_vector"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4204
  assumes contf: "continuous_on s f"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4205
      and contg:"continuous_on s g"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4206
      and sub: "\<And>x. x \<in> s \<Longrightarrow> closed_segment (f x) (g x) \<subseteq> t"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4207
    shows "homotopic_with (\<lambda>z. True) s t f g"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4208
  apply (simp add: homotopic_with_def)
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4209
  apply (rule_tac x="\<lambda>y. ((1 - (fst y)) *\<^sub>R f(snd y) + (fst y) *\<^sub>R g(snd y))" in exI)
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4210
  apply (intro conjI)
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4211
  apply (rule subset_refl continuous_intros continuous_on_subset [OF contf] continuous_on_compose2 [where g=f]
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4212
                                            continuous_on_subset [OF contg] continuous_on_compose2 [where g=g]| simp)+
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4213
  using sub closed_segment_def apply fastforce+
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4214
  done
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4215
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4216
lemma homotopic_paths_linear:
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4217
  fixes g h :: "real \<Rightarrow> 'a::real_normed_vector"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4218
  assumes "path g" "path h" "pathstart h = pathstart g" "pathfinish h = pathfinish g"
63114
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  4219
          "\<And>t. t \<in> {0..1} \<Longrightarrow> closed_segment (g t) (h t) \<subseteq> s"
61738
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4220
    shows "homotopic_paths s g h"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4221
  using assms
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4222
  unfolding path_def
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4223
  apply (simp add: closed_segment_def pathstart_def pathfinish_def homotopic_paths_def homotopic_with_def)
63114
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  4224
  apply (rule_tac x="\<lambda>y. ((1 - (fst y)) *\<^sub>R (g o snd) y + (fst y) *\<^sub>R (h o snd) y)" in exI)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  4225
  apply (intro conjI subsetI continuous_intros; force)
61738
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4226
  done
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4227
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4228
lemma homotopic_loops_linear:
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4229
  fixes g h :: "real \<Rightarrow> 'a::real_normed_vector"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4230
  assumes "path g" "path h" "pathfinish g = pathstart g" "pathfinish h = pathstart h"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4231
          "\<And>t x. t \<in> {0..1} \<Longrightarrow> closed_segment (g t) (h t) \<subseteq> s"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4232
    shows "homotopic_loops s g h"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4233
  using assms
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4234
  unfolding path_def
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4235
  apply (simp add: pathstart_def pathfinish_def homotopic_loops_def homotopic_with_def)
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4236
  apply (rule_tac x="\<lambda>y. ((1 - (fst y)) *\<^sub>R g(snd y) + (fst y) *\<^sub>R h(snd y))" in exI)
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4237
  apply (auto intro!: continuous_intros intro: continuous_on_compose2 [where g=g] continuous_on_compose2 [where g=h])
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4238
  apply (force simp: closed_segment_def)
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4239
  done
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4240
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4241
lemma homotopic_paths_nearby_explicit:
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4242
  assumes "path g" "path h" "pathstart h = pathstart g" "pathfinish h = pathfinish g"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4243
      and no: "\<And>t x. \<lbrakk>t \<in> {0..1}; x \<notin> s\<rbrakk> \<Longrightarrow> norm(h t - g t) < norm(g t - x)"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4244
    shows "homotopic_paths s g h"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4245
  apply (rule homotopic_paths_linear [OF assms(1-4)])
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4246
  by (metis no segment_bound(1) subsetI norm_minus_commute not_le)
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4247
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4248
lemma homotopic_loops_nearby_explicit:
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4249
  assumes "path g" "path h" "pathfinish g = pathstart g" "pathfinish h = pathstart h"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4250
      and no: "\<And>t x. \<lbrakk>t \<in> {0..1}; x \<notin> s\<rbrakk> \<Longrightarrow> norm(h t - g t) < norm(g t - x)"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4251
    shows "homotopic_loops s g h"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4252
  apply (rule homotopic_loops_linear [OF assms(1-4)])
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4253
  by (metis no segment_bound(1) subsetI norm_minus_commute not_le)
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4254
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4255
lemma homotopic_nearby_paths:
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4256
  fixes g h :: "real \<Rightarrow> 'a::euclidean_space"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4257
  assumes "path g" "open s" "path_image g \<subseteq> s"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4258
    shows "\<exists>e. 0 < e \<and>
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4259
               (\<forall>h. path h \<and>
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4260
                    pathstart h = pathstart g \<and> pathfinish h = pathfinish g \<and>
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4261
                    (\<forall>t \<in> {0..1}. norm(h t - g t) < e) \<longrightarrow> homotopic_paths s g h)"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4262
proof -
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4263
  obtain e where "e > 0" and e: "\<And>x y. x \<in> path_image g \<Longrightarrow> y \<in> - s \<Longrightarrow> e \<le> dist x y"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4264
    using separate_compact_closed [of "path_image g" "-s"] assms by force
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4265
  show ?thesis
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4266
    apply (intro exI conjI)
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4267
    using e [unfolded dist_norm]
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4268
    apply (auto simp: intro!: homotopic_paths_nearby_explicit assms  \<open>e > 0\<close>)
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4269
    by (metis atLeastAtMost_iff imageI le_less_trans not_le path_image_def)
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4270
qed
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4271
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4272
lemma homotopic_nearby_loops:
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4273
  fixes g h :: "real \<Rightarrow> 'a::euclidean_space"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4274
  assumes "path g" "open s" "path_image g \<subseteq> s" "pathfinish g = pathstart g"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4275
    shows "\<exists>e. 0 < e \<and>
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4276
               (\<forall>h. path h \<and> pathfinish h = pathstart h \<and>
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4277
                    (\<forall>t \<in> {0..1}. norm(h t - g t) < e) \<longrightarrow> homotopic_loops s g h)"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4278
proof -
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4279
  obtain e where "e > 0" and e: "\<And>x y. x \<in> path_image g \<Longrightarrow> y \<in> - s \<Longrightarrow> e \<le> dist x y"
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4280
    using separate_compact_closed [of "path_image g" "-s"] assms by force
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4281
  show ?thesis
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4282
    apply (intro exI conjI)
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4283
    using e [unfolded dist_norm]
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4284
    apply (auto simp: intro!: homotopic_loops_nearby_explicit assms  \<open>e > 0\<close>)
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4285
    by (metis atLeastAtMost_iff imageI le_less_trans not_le path_image_def)
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4286
qed
c4f6031f1310 New material about paths, winding numbers, etc. Added lemmas to divide_const_simps. Misc tuning.
paulson <lp15@cam.ac.uk>
parents: 61711
diff changeset
  4287
61762
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4288
subsection\<open> Homotopy and subpaths\<close>
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4289
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4290
lemma homotopic_join_subpaths1:
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4291
  assumes "path g" and pag: "path_image g \<subseteq> s"
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4292
      and u: "u \<in> {0..1}" and v: "v \<in> {0..1}" and w: "w \<in> {0..1}" "u \<le> v" "v \<le> w"
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4293
    shows "homotopic_paths s (subpath u v g +++ subpath v w g) (subpath u w g)"
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4294
proof -
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4295
  have 1: "t * 2 \<le> 1 \<Longrightarrow> u + t * (v * 2) \<le> v + t * (u * 2)" for t
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4296
    using affine_ineq \<open>u \<le> v\<close> by fastforce
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4297
  have 2: "t * 2 > 1 \<Longrightarrow> u + (2*t - 1) * v \<le> v + (2*t - 1) * w" for t
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4298
    by (metis add_mono_thms_linordered_semiring(1) diff_gt_0_iff_gt less_eq_real_def mult.commute mult_right_mono \<open>u \<le> v\<close> \<open>v \<le> w\<close>)
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4299
  have t2: "\<And>t::real. t*2 = 1 \<Longrightarrow> t = 1/2" by auto
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4300
  show ?thesis
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4301
    apply (rule homotopic_paths_subset [OF _ pag])
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4302
    using assms
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4303
    apply (cases "w = u")
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4304
    using homotopic_paths_rinv [of "subpath u v g" "path_image g"]
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4305
    apply (force simp: closed_segment_eq_real_ivl image_mono path_image_def subpath_refl)
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4306
      apply (rule homotopic_paths_sym)
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4307
      apply (rule homotopic_paths_reparametrize
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4308
             [where f = "\<lambda>t. if  t \<le> 1 / 2
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4309
                             then inverse((w - u)) *\<^sub>R (2 * (v - u)) *\<^sub>R t
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4310
                             else inverse((w - u)) *\<^sub>R ((v - u) + (w - v) *\<^sub>R (2 *\<^sub>R t - 1))"])
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4311
      using \<open>path g\<close> path_subpath u w apply blast
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4312
      using \<open>path g\<close> path_image_subpath_subset u w(1) apply blast
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4313
      apply simp_all
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4314
      apply (subst split_01)
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4315
      apply (rule continuous_on_cases continuous_intros | force simp: pathfinish_def joinpaths_def)+
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4316
      apply (simp_all add: field_simps not_le)
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4317
      apply (force dest!: t2)
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4318
      apply (force simp: algebra_simps mult_left_mono affine_ineq dest!: 1 2)
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4319
      apply (simp add: joinpaths_def subpath_def)
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4320
      apply (force simp: algebra_simps)
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4321
      done
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4322
qed
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4323
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4324
lemma homotopic_join_subpaths2:
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4325
  assumes "homotopic_paths s (subpath u v g +++ subpath v w g) (subpath u w g)"
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4326
    shows "homotopic_paths s (subpath w v g +++ subpath v u g) (subpath w u g)"
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4327
by (metis assms homotopic_paths_reversepath_D pathfinish_subpath pathstart_subpath reversepath_joinpaths reversepath_subpath)
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4328
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4329
lemma homotopic_join_subpaths3:
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4330
  assumes hom: "homotopic_paths s (subpath u v g +++ subpath v w g) (subpath u w g)"
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4331
      and "path g" and pag: "path_image g \<subseteq> s"
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4332
      and u: "u \<in> {0..1}" and v: "v \<in> {0..1}" and w: "w \<in> {0..1}"
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4333
    shows "homotopic_paths s (subpath v w g +++ subpath w u g) (subpath v u g)"
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4334
proof -
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4335
  have "homotopic_paths s (subpath u w g +++ subpath w v g) ((subpath u v g +++ subpath v w g) +++ subpath w v g)"
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4336
    apply (rule homotopic_paths_join)
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4337
    using hom homotopic_paths_sym_eq apply blast
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4338
    apply (metis \<open>path g\<close> homotopic_paths_eq pag path_image_subpath_subset path_subpath subset_trans v w)
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4339
    apply (simp add:)
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4340
    done
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4341
  also have "homotopic_paths s ((subpath u v g +++ subpath v w g) +++ subpath w v g) (subpath u v g +++ subpath v w g +++ subpath w v g)"
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4342
    apply (rule homotopic_paths_sym [OF homotopic_paths_assoc])
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4343
    using assms by (simp_all add: path_image_subpath_subset [THEN order_trans])
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4344
  also have "homotopic_paths s (subpath u v g +++ subpath v w g +++ subpath w v g)
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4345
                               (subpath u v g +++ linepath (pathfinish (subpath u v g)) (pathfinish (subpath u v g)))"
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4346
    apply (rule homotopic_paths_join)
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4347
    apply (metis \<open>path g\<close> homotopic_paths_eq order.trans pag path_image_subpath_subset path_subpath u v)
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4348
    apply (metis (no_types, lifting) \<open>path g\<close> homotopic_paths_linv order_trans pag path_image_subpath_subset path_subpath pathfinish_subpath reversepath_subpath v w)
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4349
    apply (simp add:)
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4350
    done
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4351
  also have "homotopic_paths s (subpath u v g +++ linepath (pathfinish (subpath u v g)) (pathfinish (subpath u v g))) (subpath u v g)"
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4352
    apply (rule homotopic_paths_rid)
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4353
    using \<open>path g\<close> path_subpath u v apply blast
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4354
    apply (meson \<open>path g\<close> order.trans pag path_image_subpath_subset u v)
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4355
    done
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4356
  finally have "homotopic_paths s (subpath u w g +++ subpath w v g) (subpath u v g)" .
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4357
  then show ?thesis
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4358
    using homotopic_join_subpaths2 by blast
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4359
qed
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4360
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4361
proposition homotopic_join_subpaths:
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4362
   "\<lbrakk>path g; path_image g \<subseteq> s; u \<in> {0..1}; v \<in> {0..1}; w \<in> {0..1}\<rbrakk>
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4363
    \<Longrightarrow> homotopic_paths s (subpath u v g +++ subpath v w g) (subpath u w g)"
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4364
apply (rule le_cases3 [of u v w])
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4365
using homotopic_join_subpaths1 homotopic_join_subpaths2 homotopic_join_subpaths3 by metis+
d50b993b4fb9 Removal of redundant lemmas (diff_less_iff, diff_le_iff) and of the abbreviation Exp. Addition of some new material.
paulson <lp15@cam.ac.uk>
parents: 61738
diff changeset
  4366
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4367
text\<open>Relating homotopy of trivial loops to path-connectedness.\<close>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4368
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4369
lemma path_component_imp_homotopic_points:
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4370
    "path_component S a b \<Longrightarrow> homotopic_loops S (linepath a a) (linepath b b)"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4371
apply (simp add: path_component_def homotopic_loops_def homotopic_with_def
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4372
                 pathstart_def pathfinish_def path_image_def path_def, clarify)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4373
apply (rule_tac x="g o fst" in exI)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4374
apply (intro conjI continuous_intros continuous_on_compose)+
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4375
apply (auto elim!: continuous_on_subset)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4376
done
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4377
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4378
lemma homotopic_loops_imp_path_component_value:
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4379
   "\<lbrakk>homotopic_loops S p q; 0 \<le> t; t \<le> 1\<rbrakk>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4380
        \<Longrightarrow> path_component S (p t) (q t)"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4381
apply (simp add: path_component_def homotopic_loops_def homotopic_with_def
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4382
                 pathstart_def pathfinish_def path_image_def path_def, clarify)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4383
apply (rule_tac x="h o (\<lambda>u. (u, t))" in exI)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4384
apply (intro conjI continuous_intros continuous_on_compose)+
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4385
apply (auto elim!: continuous_on_subset)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4386
done
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4387
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4388
lemma homotopic_points_eq_path_component:
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4389
   "homotopic_loops S (linepath a a) (linepath b b) \<longleftrightarrow>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4390
        path_component S a b"
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  4391
by (auto simp: path_component_imp_homotopic_points
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4392
         dest: homotopic_loops_imp_path_component_value [where t=1])
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4393
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4394
lemma path_connected_eq_homotopic_points:
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4395
    "path_connected S \<longleftrightarrow>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4396
      (\<forall>a b. a \<in> S \<and> b \<in> S \<longrightarrow> homotopic_loops S (linepath a a) (linepath b b))"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4397
by (auto simp: path_connected_def path_component_def homotopic_points_eq_path_component)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4398
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4399
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4400
subsection\<open>Simply connected sets\<close>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4401
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4402
text\<open>defined as "all loops are homotopic (as loops)\<close>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4403
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4404
definition simply_connected where
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4405
  "simply_connected S \<equiv>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4406
        \<forall>p q. path p \<and> pathfinish p = pathstart p \<and> path_image p \<subseteq> S \<and>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4407
              path q \<and> pathfinish q = pathstart q \<and> path_image q \<subseteq> S
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4408
              \<longrightarrow> homotopic_loops S p q"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4409
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4410
lemma simply_connected_empty [iff]: "simply_connected {}"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4411
  by (simp add: simply_connected_def)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4412
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4413
lemma simply_connected_imp_path_connected:
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4414
  fixes S :: "_::real_normed_vector set"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4415
  shows "simply_connected S \<Longrightarrow> path_connected S"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4416
by (simp add: simply_connected_def path_connected_eq_homotopic_points)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4417
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4418
lemma simply_connected_imp_connected:
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4419
  fixes S :: "_::real_normed_vector set"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4420
  shows "simply_connected S \<Longrightarrow> connected S"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4421
by (simp add: path_connected_imp_connected simply_connected_imp_path_connected)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4422
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4423
lemma simply_connected_eq_contractible_loop_any:
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4424
  fixes S :: "_::real_normed_vector set"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4425
  shows "simply_connected S \<longleftrightarrow>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4426
            (\<forall>p a. path p \<and> path_image p \<subseteq> S \<and>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4427
                  pathfinish p = pathstart p \<and> a \<in> S
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4428
                  \<longrightarrow> homotopic_loops S p (linepath a a))"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4429
apply (simp add: simply_connected_def)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4430
apply (rule iffI, force, clarify)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4431
apply (rule_tac q = "linepath (pathstart p) (pathstart p)" in homotopic_loops_trans)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4432
apply (fastforce simp add:)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4433
using homotopic_loops_sym apply blast
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4434
done
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4435
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4436
lemma simply_connected_eq_contractible_loop_some:
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4437
  fixes S :: "_::real_normed_vector set"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4438
  shows "simply_connected S \<longleftrightarrow>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4439
                path_connected S \<and>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4440
                (\<forall>p. path p \<and> path_image p \<subseteq> S \<and> pathfinish p = pathstart p
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4441
                    \<longrightarrow> (\<exists>a. a \<in> S \<and> homotopic_loops S p (linepath a a)))"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4442
apply (rule iffI)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4443
 apply (fastforce simp: simply_connected_imp_path_connected simply_connected_eq_contractible_loop_any)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4444
apply (clarsimp simp add: simply_connected_eq_contractible_loop_any)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4445
apply (drule_tac x=p in spec)
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  4446
using homotopic_loops_trans path_connected_eq_homotopic_points
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4447
  apply blast
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4448
done
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4449
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  4450
lemma simply_connected_eq_contractible_loop_all:
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4451
  fixes S :: "_::real_normed_vector set"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4452
  shows "simply_connected S \<longleftrightarrow>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4453
         S = {} \<or>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4454
         (\<exists>a \<in> S. \<forall>p. path p \<and> path_image p \<subseteq> S \<and> pathfinish p = pathstart p
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4455
                \<longrightarrow> homotopic_loops S p (linepath a a))"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4456
        (is "?lhs = ?rhs")
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4457
proof (cases "S = {}")
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4458
  case True then show ?thesis by force
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4459
next
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4460
  case False
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4461
  then obtain a where "a \<in> S" by blast
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4462
  show ?thesis
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  4463
  proof
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4464
    assume "simply_connected S"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4465
    then show ?rhs
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  4466
      using \<open>a \<in> S\<close> \<open>simply_connected S\<close> simply_connected_eq_contractible_loop_any
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4467
      by blast
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  4468
  next
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4469
    assume ?rhs
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4470
    then show "simply_connected S"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4471
      apply (simp add: simply_connected_eq_contractible_loop_any False)
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  4472
      by (meson homotopic_loops_refl homotopic_loops_sym homotopic_loops_trans
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4473
             path_component_imp_homotopic_points path_component_refl)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4474
  qed
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4475
qed
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4476
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  4477
lemma simply_connected_eq_contractible_path:
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4478
  fixes S :: "_::real_normed_vector set"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4479
  shows "simply_connected S \<longleftrightarrow>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4480
           path_connected S \<and>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4481
           (\<forall>p. path p \<and> path_image p \<subseteq> S \<and> pathfinish p = pathstart p
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4482
            \<longrightarrow> homotopic_paths S p (linepath (pathstart p) (pathstart p)))"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4483
apply (rule iffI)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4484
 apply (simp add: simply_connected_imp_path_connected)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4485
 apply (metis simply_connected_eq_contractible_loop_some homotopic_loops_imp_homotopic_paths_null)
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  4486
by (meson homotopic_paths_imp_homotopic_loops pathfinish_linepath pathstart_in_path_image
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4487
         simply_connected_eq_contractible_loop_some subset_iff)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4488
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4489
lemma simply_connected_eq_homotopic_paths:
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4490
  fixes S :: "_::real_normed_vector set"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4491
  shows "simply_connected S \<longleftrightarrow>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4492
          path_connected S \<and>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4493
          (\<forall>p q. path p \<and> path_image p \<subseteq> S \<and>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4494
                path q \<and> path_image q \<subseteq> S \<and>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4495
                pathstart q = pathstart p \<and> pathfinish q = pathfinish p
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4496
                \<longrightarrow> homotopic_paths S p q)"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4497
         (is "?lhs = ?rhs")
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4498
proof
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4499
  assume ?lhs
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  4500
  then have pc: "path_connected S"
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4501
        and *:  "\<And>p. \<lbrakk>path p; path_image p \<subseteq> S;
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  4502
                       pathfinish p = pathstart p\<rbrakk>
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4503
                      \<Longrightarrow> homotopic_paths S p (linepath (pathstart p) (pathstart p))"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4504
    by (auto simp: simply_connected_eq_contractible_path)
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  4505
  have "homotopic_paths S p q"
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4506
        if "path p" "path_image p \<subseteq> S" "path q"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4507
           "path_image q \<subseteq> S" "pathstart q = pathstart p"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4508
           "pathfinish q = pathfinish p" for p q
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4509
  proof -
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  4510
    have "homotopic_paths S p (p +++ linepath (pathfinish p) (pathfinish p))"
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4511
      by (simp add: homotopic_paths_rid homotopic_paths_sym that)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4512
    also have "homotopic_paths S (p +++ linepath (pathfinish p) (pathfinish p))
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4513
                                 (p +++ reversepath q +++ q)"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4514
      using that
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4515
      by (metis homotopic_paths_join homotopic_paths_linv homotopic_paths_refl homotopic_paths_sym_eq pathstart_linepath)
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  4516
    also have "homotopic_paths S (p +++ reversepath q +++ q)
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4517
                                 ((p +++ reversepath q) +++ q)"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4518
      by (simp add: that homotopic_paths_assoc)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4519
    also have "homotopic_paths S ((p +++ reversepath q) +++ q)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4520
                                 (linepath (pathstart q) (pathstart q) +++ q)"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4521
      using * [of "p +++ reversepath q"] that
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4522
      by (simp add: homotopic_paths_join path_image_join)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4523
    also have "homotopic_paths S (linepath (pathstart q) (pathstart q) +++ q) q"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4524
      using that homotopic_paths_lid by blast
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4525
    finally show ?thesis .
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4526
  qed
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4527
  then show ?rhs
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4528
    by (blast intro: pc *)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4529
next
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  4530
  assume ?rhs
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4531
  then show ?lhs
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4532
    by (force simp: simply_connected_eq_contractible_path)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4533
qed
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4534
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4535
proposition simply_connected_Times:
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4536
  fixes S :: "'a::real_normed_vector set" and T :: "'b::real_normed_vector set"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4537
  assumes S: "simply_connected S" and T: "simply_connected T"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4538
    shows "simply_connected(S \<times> T)"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4539
proof -
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4540
  have "homotopic_loops (S \<times> T) p (linepath (a, b) (a, b))"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4541
       if "path p" "path_image p \<subseteq> S \<times> T" "p 1 = p 0" "a \<in> S" "b \<in> T"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4542
       for p a b
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4543
  proof -
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4544
    have "path (fst \<circ> p)"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4545
      apply (rule Path_Connected.path_continuous_image [OF \<open>path p\<close>])
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4546
      apply (rule continuous_intros)+
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4547
      done
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4548
    moreover have "path_image (fst \<circ> p) \<subseteq> S"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4549
      using that apply (simp add: path_image_def) by force
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4550
    ultimately have p1: "homotopic_loops S (fst o p) (linepath a a)"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4551
      using S that
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4552
      apply (simp add: simply_connected_eq_contractible_loop_any)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4553
      apply (drule_tac x="fst o p" in spec)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4554
      apply (drule_tac x=a in spec)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4555
      apply (auto simp: pathstart_def pathfinish_def)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4556
      done
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4557
    have "path (snd \<circ> p)"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4558
      apply (rule Path_Connected.path_continuous_image [OF \<open>path p\<close>])
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4559
      apply (rule continuous_intros)+
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4560
      done
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4561
    moreover have "path_image (snd \<circ> p) \<subseteq> T"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4562
      using that apply (simp add: path_image_def) by force
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4563
    ultimately have p2: "homotopic_loops T (snd o p) (linepath b b)"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4564
      using T that
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4565
      apply (simp add: simply_connected_eq_contractible_loop_any)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4566
      apply (drule_tac x="snd o p" in spec)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4567
      apply (drule_tac x=b in spec)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4568
      apply (auto simp: pathstart_def pathfinish_def)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4569
      done
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4570
    show ?thesis
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4571
      using p1 p2
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4572
      apply (simp add: homotopic_loops, clarify)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4573
      apply (rename_tac h k)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4574
      apply (rule_tac x="\<lambda>z. Pair (h z) (k z)" in exI)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4575
      apply (intro conjI continuous_intros | assumption)+
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4576
      apply (auto simp: pathstart_def pathfinish_def)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4577
      done
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4578
  qed
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4579
  with assms show ?thesis
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4580
    by (simp add: simply_connected_eq_contractible_loop_any pathfinish_def pathstart_def)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4581
qed
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4582
64394
141e1ed8d5a0 more new material
paulson <lp15@cam.ac.uk>
parents: 64267
diff changeset
  4583
62626
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4584
subsection\<open>Contractible sets\<close>
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4585
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4586
definition contractible where
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4587
 "contractible S \<equiv> \<exists>a. homotopic_with (\<lambda>x. True) S S id (\<lambda>x. a)"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4588
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4589
proposition contractible_imp_simply_connected:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4590
  fixes S :: "_::real_normed_vector set"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4591
  assumes "contractible S" shows "simply_connected S"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4592
proof (cases "S = {}")
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4593
  case True then show ?thesis by force
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4594
next
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4595
  case False
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4596
  obtain a where a: "homotopic_with (\<lambda>x. True) S S id (\<lambda>x. a)"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4597
    using assms by (force simp add: contractible_def)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4598
  then have "a \<in> S"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4599
    by (metis False homotopic_constant_maps homotopic_with_symD homotopic_with_trans path_component_mem(2))
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4600
  show ?thesis
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4601
    apply (simp add: simply_connected_eq_contractible_loop_all False)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4602
    apply (rule bexI [OF _ \<open>a \<in> S\<close>])
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4603
    using a apply (simp add: homotopic_loops_def homotopic_with_def path_def path_image_def pathfinish_def pathstart_def)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4604
    apply clarify
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4605
    apply (rule_tac x="(h o (\<lambda>y. (fst y, (p \<circ> snd) y)))" in exI)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4606
    apply (intro conjI continuous_on_compose continuous_intros)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4607
    apply (erule continuous_on_subset | force)+
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4608
    done
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4609
qed
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4610
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4611
corollary contractible_imp_connected:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4612
  fixes S :: "_::real_normed_vector set"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4613
  shows "contractible S \<Longrightarrow> connected S"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4614
by (simp add: contractible_imp_simply_connected simply_connected_imp_connected)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4615
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4616
lemma contractible_imp_path_connected:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4617
  fixes S :: "_::real_normed_vector set"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4618
  shows "contractible S \<Longrightarrow> path_connected S"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4619
by (simp add: contractible_imp_simply_connected simply_connected_imp_path_connected)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4620
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4621
lemma nullhomotopic_through_contractible:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4622
  fixes S :: "_::topological_space set"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4623
  assumes f: "continuous_on S f" "f ` S \<subseteq> T"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4624
      and g: "continuous_on T g" "g ` T \<subseteq> U"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4625
      and T: "contractible T"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4626
    obtains c where "homotopic_with (\<lambda>h. True) S U (g o f) (\<lambda>x. c)"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4627
proof -
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4628
  obtain b where b: "homotopic_with (\<lambda>x. True) T T id (\<lambda>x. b)"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4629
    using assms by (force simp add: contractible_def)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4630
  have "homotopic_with (\<lambda>f. True) T U (g \<circ> id) (g \<circ> (\<lambda>x. b))"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4631
    by (rule homotopic_compose_continuous_left [OF b g])
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4632
  then have "homotopic_with (\<lambda>f. True) S U (g \<circ> id \<circ> f) (g \<circ> (\<lambda>x. b) \<circ> f)"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4633
    by (rule homotopic_compose_continuous_right [OF _ f])
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4634
  then show ?thesis
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4635
    by (simp add: comp_def that)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4636
qed
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4637
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4638
lemma nullhomotopic_into_contractible:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4639
  assumes f: "continuous_on S f" "f ` S \<subseteq> T"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4640
      and T: "contractible T"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4641
    obtains c where "homotopic_with (\<lambda>h. True) S T f (\<lambda>x. c)"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4642
apply (rule nullhomotopic_through_contractible [OF f, of id T])
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4643
using assms
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4644
apply (auto simp: continuous_on_id)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4645
done
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4646
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4647
lemma nullhomotopic_from_contractible:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4648
  assumes f: "continuous_on S f" "f ` S \<subseteq> T"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4649
      and S: "contractible S"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4650
    obtains c where "homotopic_with (\<lambda>h. True) S T f (\<lambda>x. c)"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4651
apply (rule nullhomotopic_through_contractible [OF continuous_on_id _ f S, of S])
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4652
using assms
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4653
apply (auto simp: comp_def)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4654
done
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4655
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4656
lemma homotopic_through_contractible:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4657
  fixes S :: "_::real_normed_vector set"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4658
  assumes "continuous_on S f1" "f1 ` S \<subseteq> T"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4659
          "continuous_on T g1" "g1 ` T \<subseteq> U"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4660
          "continuous_on S f2" "f2 ` S \<subseteq> T"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4661
          "continuous_on T g2" "g2 ` T \<subseteq> U"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4662
          "contractible T" "path_connected U"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4663
   shows "homotopic_with (\<lambda>h. True) S U (g1 o f1) (g2 o f2)"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4664
proof -
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4665
  obtain c1 where c1: "homotopic_with (\<lambda>h. True) S U (g1 o f1) (\<lambda>x. c1)"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4666
    apply (rule nullhomotopic_through_contractible [of S f1 T g1 U])
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4667
    using assms apply (auto simp: )
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4668
    done
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4669
  obtain c2 where c2: "homotopic_with (\<lambda>h. True) S U (g2 o f2) (\<lambda>x. c2)"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4670
    apply (rule nullhomotopic_through_contractible [of S f2 T g2 U])
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4671
    using assms apply (auto simp: )
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4672
    done
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4673
  have *: "S = {} \<or> (\<exists>t. path_connected t \<and> t \<subseteq> U \<and> c2 \<in> t \<and> c1 \<in> t)"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4674
  proof (cases "S = {}")
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4675
    case True then show ?thesis by force
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4676
  next
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4677
    case False
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4678
    with c1 c2 have "c1 \<in> U" "c2 \<in> U"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4679
      using homotopic_with_imp_subset2 all_not_in_conv image_subset_iff by blast+
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4680
    with \<open>path_connected U\<close> show ?thesis by blast
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4681
  qed
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4682
  show ?thesis
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4683
    apply (rule homotopic_with_trans [OF c1])
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4684
    apply (rule homotopic_with_symD)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4685
    apply (rule homotopic_with_trans [OF c2])
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4686
    apply (simp add: path_component homotopic_constant_maps *)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4687
    done
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4688
qed
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4689
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4690
lemma homotopic_into_contractible:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4691
  fixes S :: "'a::real_normed_vector set" and T:: "'b::real_normed_vector set"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4692
  assumes f: "continuous_on S f" "f ` S \<subseteq> T"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4693
      and g: "continuous_on S g" "g ` S \<subseteq> T"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4694
      and T: "contractible T"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4695
    shows "homotopic_with (\<lambda>h. True) S T f g"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4696
using homotopic_through_contractible [of S f T id T g id]
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4697
by (simp add: assms contractible_imp_path_connected continuous_on_id)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4698
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4699
lemma homotopic_from_contractible:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4700
  fixes S :: "'a::real_normed_vector set" and T:: "'b::real_normed_vector set"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4701
  assumes f: "continuous_on S f" "f ` S \<subseteq> T"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4702
      and g: "continuous_on S g" "g ` S \<subseteq> T"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4703
      and "contractible S" "path_connected T"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4704
    shows "homotopic_with (\<lambda>h. True) S T f g"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4705
using homotopic_through_contractible [of S id S f T id g]
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4706
by (simp add: assms contractible_imp_path_connected continuous_on_id)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4707
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4708
lemma starlike_imp_contractible_gen:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4709
  fixes S :: "'a::real_normed_vector set"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4710
  assumes S: "starlike S"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4711
      and P: "\<And>a T. \<lbrakk>a \<in> S; 0 \<le> T; T \<le> 1\<rbrakk> \<Longrightarrow> P(\<lambda>x. (1 - T) *\<^sub>R x + T *\<^sub>R a)"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4712
    obtains a where "homotopic_with P S S (\<lambda>x. x) (\<lambda>x. a)"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4713
proof -
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4714
  obtain a where "a \<in> S" and a: "\<And>x. x \<in> S \<Longrightarrow> closed_segment a x \<subseteq> S"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4715
    using S by (auto simp add: starlike_def)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4716
  have "(\<lambda>y. (1 - fst y) *\<^sub>R snd y + fst y *\<^sub>R a) ` ({0..1} \<times> S) \<subseteq> S"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4717
    apply clarify
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4718
    apply (erule a [unfolded closed_segment_def, THEN subsetD])
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4719
    apply (simp add: )
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4720
    apply (metis add_diff_cancel_right' diff_ge_0_iff_ge le_add_diff_inverse pth_c(1))
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4721
    done
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4722
  then show ?thesis
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4723
    apply (rule_tac a="a" in that)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4724
    using \<open>a \<in> S\<close>
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4725
    apply (simp add: homotopic_with_def)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4726
    apply (rule_tac x="\<lambda>y. (1 - (fst y)) *\<^sub>R snd y + (fst y) *\<^sub>R a" in exI)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4727
    apply (intro conjI ballI continuous_on_compose continuous_intros)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4728
    apply (simp_all add: P)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4729
    done
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4730
qed
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4731
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4732
lemma starlike_imp_contractible:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4733
  fixes S :: "'a::real_normed_vector set"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4734
  shows "starlike S \<Longrightarrow> contractible S"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4735
using starlike_imp_contractible_gen contractible_def by (fastforce simp: id_def)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4736
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4737
lemma contractible_UNIV [simp]: "contractible (UNIV :: 'a::real_normed_vector set)"
62626
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4738
  by (simp add: starlike_imp_contractible)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4739
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4740
lemma starlike_imp_simply_connected:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4741
  fixes S :: "'a::real_normed_vector set"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4742
  shows "starlike S \<Longrightarrow> simply_connected S"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4743
by (simp add: contractible_imp_simply_connected starlike_imp_contractible)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4744
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4745
lemma convex_imp_simply_connected:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4746
  fixes S :: "'a::real_normed_vector set"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4747
  shows "convex S \<Longrightarrow> simply_connected S"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4748
using convex_imp_starlike starlike_imp_simply_connected by blast
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4749
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4750
lemma starlike_imp_path_connected:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4751
  fixes S :: "'a::real_normed_vector set"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4752
  shows "starlike S \<Longrightarrow> path_connected S"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4753
by (simp add: simply_connected_imp_path_connected starlike_imp_simply_connected)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4754
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4755
lemma starlike_imp_connected:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4756
  fixes S :: "'a::real_normed_vector set"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4757
  shows "starlike S \<Longrightarrow> connected S"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4758
by (simp add: path_connected_imp_connected starlike_imp_path_connected)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4759
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4760
lemma is_interval_simply_connected_1:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4761
  fixes S :: "real set"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4762
  shows "is_interval S \<longleftrightarrow> simply_connected S"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4763
using convex_imp_simply_connected is_interval_convex_1 is_interval_path_connected_1 simply_connected_imp_path_connected by auto
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4764
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4765
lemma contractible_empty [simp]: "contractible {}"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4766
  by (simp add: contractible_def homotopic_with)
62626
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4767
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4768
lemma contractible_convex_tweak_boundary_points:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4769
  fixes S :: "'a::euclidean_space set"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4770
  assumes "convex S" and TS: "rel_interior S \<subseteq> T" "T \<subseteq> closure S"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4771
  shows "contractible T"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4772
proof (cases "S = {}")
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4773
  case True
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4774
  with assms show ?thesis
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4775
    by (simp add: subsetCE)
62626
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4776
next
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4777
  case False
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4778
  show ?thesis
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4779
    apply (rule starlike_imp_contractible)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4780
    apply (rule starlike_convex_tweak_boundary_points [OF \<open>convex S\<close> False TS])
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4781
    done
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4782
qed
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4783
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4784
lemma convex_imp_contractible:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4785
  fixes S :: "'a::real_normed_vector set"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4786
  shows "convex S \<Longrightarrow> contractible S"
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4787
  using contractible_empty convex_imp_starlike starlike_imp_contractible by blast
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4789
lemma contractible_sing [simp]:
62626
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4790
  fixes a :: "'a::real_normed_vector"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4791
  shows "contractible {a}"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4792
by (rule convex_imp_contractible [OF convex_singleton])
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4793
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4794
lemma is_interval_contractible_1:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4795
  fixes S :: "real set"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4796
  shows  "is_interval S \<longleftrightarrow> contractible S"
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  4797
using contractible_imp_simply_connected convex_imp_contractible is_interval_convex_1
62626
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4798
      is_interval_simply_connected_1 by auto
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4799
63469
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  4800
lemma contractible_Times:
62626
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4801
  fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4802
  assumes S: "contractible S" and T: "contractible T"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4803
  shows "contractible (S \<times> T)"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4804
proof -
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  4805
  obtain a h where conth: "continuous_on ({0..1} \<times> S) h"
62626
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4806
             and hsub: "h ` ({0..1} \<times> S) \<subseteq> S"
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  4807
             and [simp]: "\<And>x. x \<in> S \<Longrightarrow> h (0, x) = x"
62626
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4808
             and [simp]: "\<And>x. x \<in> S \<Longrightarrow>  h (1::real, x) = a"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4809
    using S by (auto simp add: contractible_def homotopic_with)
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  4810
  obtain b k where contk: "continuous_on ({0..1} \<times> T) k"
62626
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4811
             and ksub: "k ` ({0..1} \<times> T) \<subseteq> T"
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  4812
             and [simp]: "\<And>x. x \<in> T \<Longrightarrow> k (0, x) = x"
62626
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4813
             and [simp]: "\<And>x. x \<in> T \<Longrightarrow>  k (1::real, x) = b"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4814
    using T by (auto simp add: contractible_def homotopic_with)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4815
  show ?thesis
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4816
    apply (simp add: contractible_def homotopic_with)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4817
    apply (rule exI [where x=a])
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4818
    apply (rule exI [where x=b])
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4819
    apply (rule exI [where x = "\<lambda>z. (h (fst z, fst(snd z)), k (fst z, snd(snd z)))"])
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4820
    apply (intro conjI ballI continuous_intros continuous_on_compose2 [OF conth] continuous_on_compose2 [OF contk])
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  4821
    using hsub ksub
62626
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4822
    apply (auto simp: )
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4823
    done
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4824
qed
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4825
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  4826
lemma homotopy_dominated_contractibility:
62626
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4827
  fixes S :: "'a::real_normed_vector set" and T :: "'b::real_normed_vector set"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4828
  assumes S: "contractible S"
63594
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  4829
      and f: "continuous_on S f" "image f S \<subseteq> T"
bd218a9320b5 HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents: 63540
diff changeset
  4830
      and g: "continuous_on T g" "image g T \<subseteq> S"
62626
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4831
      and hom: "homotopic_with (\<lambda>x. True) T T (f o g) id"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4832
    shows "contractible T"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4833
proof -
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4834
  obtain b where "homotopic_with (\<lambda>h. True) S T f (\<lambda>x. b)"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4835
    using nullhomotopic_from_contractible [OF f S] .
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4836
  then have homg: "homotopic_with (\<lambda>x. True) T T ((\<lambda>x. b) \<circ> g) (f \<circ> g)"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4837
    by (rule homotopic_with_compose_continuous_right [OF homotopic_with_symD g])
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4838
  show ?thesis
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4839
    apply (simp add: contractible_def)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4840
    apply (rule exI [where x = b])
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4841
    apply (rule homotopic_with_symD)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4842
    apply (rule homotopic_with_trans [OF _ hom])
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4843
    using homg apply (simp add: o_def)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4844
    done
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4845
qed
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4846
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4847
subsection\<open>Local versions of topological properties in general\<close>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4848
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4849
definition locally :: "('a::topological_space set \<Rightarrow> bool) \<Rightarrow> 'a set \<Rightarrow> bool"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4850
where
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4851
 "locally P S \<equiv>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4852
        \<forall>w x. openin (subtopology euclidean S) w \<and> x \<in> w
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4853
              \<longrightarrow> (\<exists>u v. openin (subtopology euclidean S) u \<and> P v \<and>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4854
                        x \<in> u \<and> u \<subseteq> v \<and> v \<subseteq> w)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4855
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4856
lemma locallyI:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4857
  assumes "\<And>w x. \<lbrakk>openin (subtopology euclidean S) w; x \<in> w\<rbrakk>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4858
                  \<Longrightarrow> \<exists>u v. openin (subtopology euclidean S) u \<and> P v \<and>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4859
                        x \<in> u \<and> u \<subseteq> v \<and> v \<subseteq> w"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4860
    shows "locally P S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4861
using assms by (force simp: locally_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4862
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4863
lemma locallyE:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4864
  assumes "locally P S" "openin (subtopology euclidean S) w" "x \<in> w"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4865
  obtains u v where "openin (subtopology euclidean S) u"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4866
                    "P v" "x \<in> u" "u \<subseteq> v" "v \<subseteq> w"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4867
using assms by (force simp: locally_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4868
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4869
lemma locally_mono:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4870
  assumes "locally P S" "\<And>t. P t \<Longrightarrow> Q t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4871
    shows "locally Q S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4872
by (metis assms locally_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4873
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4874
lemma locally_open_subset:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4875
  assumes "locally P S" "openin (subtopology euclidean S) t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4876
    shows "locally P t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4877
using assms
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4878
apply (simp add: locally_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4879
apply (erule all_forward)+
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4880
apply (rule impI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4881
apply (erule impCE)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4882
 using openin_trans apply blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4883
apply (erule ex_forward)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4884
by (metis (no_types, hide_lams) Int_absorb1 Int_lower1 Int_subset_iff openin_open openin_subtopology_Int_subset)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4885
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4886
lemma locally_diff_closed:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4887
    "\<lbrakk>locally P S; closedin (subtopology euclidean S) t\<rbrakk> \<Longrightarrow> locally P (S - t)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4888
  using locally_open_subset closedin_def by fastforce
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4889
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4890
lemma locally_empty [iff]: "locally P {}"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4891
  by (simp add: locally_def openin_subtopology)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4892
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4893
lemma locally_singleton [iff]:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4894
  fixes a :: "'a::metric_space"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4895
  shows "locally P {a} \<longleftrightarrow> P {a}"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4896
apply (simp add: locally_def openin_euclidean_subtopology_iff subset_singleton_iff conj_disj_distribR cong: conj_cong)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4897
using zero_less_one by blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4898
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4899
lemma locally_iff:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4900
    "locally P S \<longleftrightarrow>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4901
     (\<forall>T x. open T \<and> x \<in> S \<inter> T \<longrightarrow> (\<exists>U. open U \<and> (\<exists>v. P v \<and> x \<in> S \<inter> U \<and> S \<inter> U \<subseteq> v \<and> v \<subseteq> S \<inter> T)))"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4902
apply (simp add: le_inf_iff locally_def openin_open, safe)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4903
apply (metis IntE IntI le_inf_iff)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4904
apply (metis IntI Int_subset_iff)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4905
done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4906
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4907
lemma locally_Int:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4908
  assumes S: "locally P S" and t: "locally P t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4909
      and P: "\<And>S t. P S \<and> P t \<Longrightarrow> P(S \<inter> t)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4910
    shows "locally P (S \<inter> t)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4911
using S t unfolding locally_iff
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4912
apply clarify
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4913
apply (drule_tac x=T in spec)+
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4914
apply (drule_tac x=x in spec)+
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4915
apply clarsimp
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4916
apply (rename_tac U1 U2 V1 V2)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4917
apply (rule_tac x="U1 \<inter> U2" in exI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4918
apply (simp add: open_Int)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4919
apply (rule_tac x="V1 \<inter> V2" in exI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4920
apply (auto intro: P)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4921
done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4922
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4923
lemma locally_Times:
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4924
  fixes S :: "('a::metric_space) set" and T :: "('b::metric_space) set"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4925
  assumes PS: "locally P S" and QT: "locally Q T" and R: "\<And>S T. P S \<and> Q T \<Longrightarrow> R(S \<times> T)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4926
  shows "locally R (S \<times> T)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4927
    unfolding locally_def
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4928
proof (clarify)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4929
  fix W x y
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4930
  assume W: "openin (subtopology euclidean (S \<times> T)) W" and xy: "(x, y) \<in> W"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4931
  then obtain U V where "openin (subtopology euclidean S) U" "x \<in> U"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4932
                        "openin (subtopology euclidean T) V" "y \<in> V" "U \<times> V \<subseteq> W"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4933
    using Times_in_interior_subtopology by metis
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4934
  then obtain U1 U2 V1 V2
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4935
         where opeS: "openin (subtopology euclidean S) U1 \<and> P U2 \<and> x \<in> U1 \<and> U1 \<subseteq> U2 \<and> U2 \<subseteq> U"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4936
           and opeT: "openin (subtopology euclidean T) V1 \<and> Q V2 \<and> y \<in> V1 \<and> V1 \<subseteq> V2 \<and> V2 \<subseteq> V"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4937
    by (meson PS QT locallyE)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4938
  with \<open>U \<times> V \<subseteq> W\<close> show "\<exists>u v. openin (subtopology euclidean (S \<times> T)) u \<and> R v \<and> (x,y) \<in> u \<and> u \<subseteq> v \<and> v \<subseteq> W"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4939
    apply (rule_tac x="U1 \<times> V1" in exI)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4940
    apply (rule_tac x="U2 \<times> V2" in exI)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4941
    apply (auto simp: openin_Times R)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4942
    done
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4943
qed
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  4944
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4945
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4946
proposition homeomorphism_locally_imp:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4947
  fixes S :: "'a::metric_space set" and t :: "'b::t2_space set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4948
  assumes S: "locally P S" and hom: "homeomorphism S t f g"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4949
      and Q: "\<And>S t. \<lbrakk>P S; homeomorphism S t f g\<rbrakk> \<Longrightarrow> Q t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4950
    shows "locally Q t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4951
proof (clarsimp simp: locally_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4952
  fix w y
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4953
  assume "y \<in> w" and "openin (subtopology euclidean t) w"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4954
  then obtain T where T: "open T" "w = t \<inter> T"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4955
    by (force simp: openin_open)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4956
  then have "w \<subseteq> t" by auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4957
  have f: "\<And>x. x \<in> S \<Longrightarrow> g(f x) = x" "f ` S = t" "continuous_on S f"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4958
   and g: "\<And>y. y \<in> t \<Longrightarrow> f(g y) = y" "g ` t = S" "continuous_on t g"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4959
    using hom by (auto simp: homeomorphism_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4960
  have gw: "g ` w = S \<inter> {x. f x \<in> w}"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4961
    using \<open>w \<subseteq> t\<close>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4962
    apply auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4963
    using \<open>g ` t = S\<close> \<open>w \<subseteq> t\<close> apply blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4964
    using g \<open>w \<subseteq> t\<close> apply auto[1]
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4965
    by (simp add: f rev_image_eqI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4966
  have o: "openin (subtopology euclidean S) (g ` w)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4967
  proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4968
    have "continuous_on S f"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4969
      using f(3) by blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4970
    then show "openin (subtopology euclidean S) (g ` w)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4971
      by (simp add: gw Collect_conj_eq \<open>openin (subtopology euclidean t) w\<close> continuous_on_open f(2))
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4972
  qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4973
  then obtain u v
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4974
    where osu: "openin (subtopology euclidean S) u" and uv: "P v" "g y \<in> u" "u \<subseteq> v" "v \<subseteq> g ` w"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4975
    using S [unfolded locally_def, rule_format, of "g ` w" "g y"] \<open>y \<in> w\<close> by force
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4976
  have "v \<subseteq> S" using uv by (simp add: gw)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4977
  have fv: "f ` v = t \<inter> {x. g x \<in> v}"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4978
    using \<open>f ` S = t\<close> f \<open>v \<subseteq> S\<close> by auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4979
  have "f ` v \<subseteq> w"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4980
    using uv using Int_lower2 gw image_subsetI mem_Collect_eq subset_iff by auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4981
  have contvf: "continuous_on v f"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4982
    using \<open>v \<subseteq> S\<close> continuous_on_subset f(3) by blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4983
  have contvg: "continuous_on (f ` v) g"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4984
    using \<open>f ` v \<subseteq> w\<close> \<open>w \<subseteq> t\<close> continuous_on_subset g(3) by blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4985
  have homv: "homeomorphism v (f ` v) f g"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4986
    using \<open>v \<subseteq> S\<close> \<open>w \<subseteq> t\<close> f
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4987
    apply (simp add: homeomorphism_def contvf contvg, auto)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4988
    by (metis f(1) rev_image_eqI rev_subsetD)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4989
  have 1: "openin (subtopology euclidean t) {x \<in> t. g x \<in> u}"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4990
    apply (rule continuous_on_open [THEN iffD1, rule_format])
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4991
    apply (rule \<open>continuous_on t g\<close>)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4992
    using \<open>g ` t = S\<close> apply (simp add: osu)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4993
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4994
  have 2: "\<exists>v. Q v \<and> y \<in> {x \<in> t. g x \<in> u} \<and> {x \<in> t. g x \<in> u} \<subseteq> v \<and> v \<subseteq> w"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4995
    apply (rule_tac x="f ` v" in exI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4996
    apply (intro conjI Q [OF \<open>P v\<close> homv])
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4997
    using \<open>w \<subseteq> t\<close> \<open>y \<in> w\<close>  \<open>f ` v \<subseteq> w\<close>  uv  apply (auto simp: fv)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4998
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4999
  show "\<exists>u. openin (subtopology euclidean t) u \<and>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5000
            (\<exists>v. Q v \<and> y \<in> u \<and> u \<subseteq> v \<and> v \<subseteq> w)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5001
    by (meson 1 2)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5002
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5003
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5004
lemma homeomorphism_locally:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5005
  fixes f:: "'a::metric_space \<Rightarrow> 'b::metric_space"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5006
  assumes hom: "homeomorphism S t f g"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5007
      and eq: "\<And>S t. homeomorphism S t f g \<Longrightarrow> (P S \<longleftrightarrow> Q t)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5008
    shows "locally P S \<longleftrightarrow> locally Q t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5009
apply (rule iffI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5010
apply (erule homeomorphism_locally_imp [OF _ hom])
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5011
apply (simp add: eq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5012
apply (erule homeomorphism_locally_imp)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5013
using eq homeomorphism_sym homeomorphism_symD [OF hom] apply blast+
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5014
done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5015
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5016
lemma homeomorphic_locally:
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5017
  fixes S:: "'a::metric_space set" and T:: "'b::metric_space set"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5018
  assumes hom: "S homeomorphic T"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5019
          and iff: "\<And>X Y. X homeomorphic Y \<Longrightarrow> (P X \<longleftrightarrow> Q Y)"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5020
    shows "locally P S \<longleftrightarrow> locally Q T"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5021
proof -
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5022
  obtain f g where hom: "homeomorphism S T f g"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5023
    using assms by (force simp: homeomorphic_def)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5024
  then show ?thesis
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5025
    using homeomorphic_def local.iff
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5026
    by (blast intro!: homeomorphism_locally)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5027
qed
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5028
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5029
lemma homeomorphic_local_compactness:
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5030
  fixes S:: "'a::metric_space set" and T:: "'b::metric_space set"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5031
  shows "S homeomorphic T \<Longrightarrow> locally compact S \<longleftrightarrow> locally compact T"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5032
by (simp add: homeomorphic_compactness homeomorphic_locally)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5033
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5034
lemma locally_translation:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5035
  fixes P :: "'a :: real_normed_vector set \<Rightarrow> bool"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5036
  shows
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5037
   "(\<And>S. P (image (\<lambda>x. a + x) S) \<longleftrightarrow> P S)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5038
        \<Longrightarrow> locally P (image (\<lambda>x. a + x) S) \<longleftrightarrow> locally P S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5039
apply (rule homeomorphism_locally [OF homeomorphism_translation])
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5040
apply (simp add: homeomorphism_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5041
by metis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5042
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5043
lemma locally_injective_linear_image:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5044
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5045
  assumes f: "linear f" "inj f" and iff: "\<And>S. P (f ` S) \<longleftrightarrow> Q S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5046
    shows "locally P (f ` S) \<longleftrightarrow> locally Q S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5047
apply (rule linear_homeomorphism_image [OF f])
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5048
apply (rule_tac f=g and g = f in homeomorphism_locally, assumption)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5049
by (metis iff homeomorphism_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5050
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5051
lemma locally_open_map_image:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5052
  fixes f :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5053
  assumes P: "locally P S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5054
      and f: "continuous_on S f"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5055
      and oo: "\<And>t. openin (subtopology euclidean S) t
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5056
                   \<Longrightarrow> openin (subtopology euclidean (f ` S)) (f ` t)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5057
      and Q: "\<And>t. \<lbrakk>t \<subseteq> S; P t\<rbrakk> \<Longrightarrow> Q(f ` t)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5058
    shows "locally Q (f ` S)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5059
proof (clarsimp simp add: locally_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5060
  fix w y
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5061
  assume oiw: "openin (subtopology euclidean (f ` S)) w" and "y \<in> w"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5062
  then have "w \<subseteq> f ` S" by (simp add: openin_euclidean_subtopology_iff)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5063
  have oivf: "openin (subtopology euclidean S) {x \<in> S. f x \<in> w}"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5064
    by (rule continuous_on_open [THEN iffD1, rule_format, OF f oiw])
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5065
  then obtain x where "x \<in> S" "f x = y"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5066
    using \<open>w \<subseteq> f ` S\<close> \<open>y \<in> w\<close> by blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5067
  then obtain u v
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5068
    where "openin (subtopology euclidean S) u" "P v" "x \<in> u" "u \<subseteq> v" "v \<subseteq> {x \<in> S. f x \<in> w}"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5069
    using P [unfolded locally_def, rule_format, of "{x. x \<in> S \<and> f x \<in> w}" x] oivf \<open>y \<in> w\<close>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5070
    by auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5071
  then show "\<exists>u. openin (subtopology euclidean (f ` S)) u \<and>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5072
            (\<exists>v. Q v \<and> y \<in> u \<and> u \<subseteq> v \<and> v \<subseteq> w)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5073
    apply (rule_tac x="f ` u" in exI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5074
    apply (rule conjI, blast intro!: oo)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5075
    apply (rule_tac x="f ` v" in exI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5076
    apply (force simp: \<open>f x = y\<close> rev_image_eqI intro: Q)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5077
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5078
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5079
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5080
subsection\<open>Sort of induction principle for connected sets\<close>
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5081
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5082
lemma connected_induction:
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5083
  assumes "connected S"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5084
      and opD: "\<And>T a. \<lbrakk>openin (subtopology euclidean S) T; a \<in> T\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> T \<and> P z"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5085
      and opI: "\<And>a. a \<in> S
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5086
             \<Longrightarrow> \<exists>T. openin (subtopology euclidean S) T \<and> a \<in> T \<and>
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5087
                     (\<forall>x \<in> T. \<forall>y \<in> T. P x \<and> P y \<and> Q x \<longrightarrow> Q y)"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5088
      and etc: "a \<in> S" "b \<in> S" "P a" "P b" "Q a"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5089
    shows "Q b"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5090
proof -
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5091
  have 1: "openin (subtopology euclidean S)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5092
             {b. \<exists>T. openin (subtopology euclidean S) T \<and>
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5093
                     b \<in> T \<and> (\<forall>x\<in>T. P x \<longrightarrow> Q x)}"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5094
    apply (subst openin_subopen, clarify)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5095
    apply (rule_tac x=T in exI, auto)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5096
    done
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5097
  have 2: "openin (subtopology euclidean S)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5098
             {b. \<exists>T. openin (subtopology euclidean S) T \<and>
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5099
                     b \<in> T \<and> (\<forall>x\<in>T. P x \<longrightarrow> ~ Q x)}"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5100
    apply (subst openin_subopen, clarify)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5101
    apply (rule_tac x=T in exI, auto)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5102
    done
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5103
  show ?thesis
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5104
    using \<open>connected S\<close>
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5105
    apply (simp only: connected_openin HOL.not_ex HOL.de_Morgan_conj)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5106
    apply (elim disjE allE)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5107
         apply (blast intro: 1)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5108
        apply (blast intro: 2, simp_all)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5109
       apply clarify apply (metis opI)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5110
      using opD apply (blast intro: etc elim: dest:)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5111
     using opI etc apply meson+
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5112
    done
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5113
qed
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5114
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5115
lemma connected_equivalence_relation_gen:
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5116
  assumes "connected S"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5117
      and etc: "a \<in> S" "b \<in> S" "P a" "P b"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5118
      and trans: "\<And>x y z. \<lbrakk>R x y; R y z\<rbrakk> \<Longrightarrow> R x z"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5119
      and opD: "\<And>T a. \<lbrakk>openin (subtopology euclidean S) T; a \<in> T\<rbrakk> \<Longrightarrow> \<exists>z. z \<in> T \<and> P z"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5120
      and opI: "\<And>a. a \<in> S
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5121
             \<Longrightarrow> \<exists>T. openin (subtopology euclidean S) T \<and> a \<in> T \<and>
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5122
                     (\<forall>x \<in> T. \<forall>y \<in> T. P x \<and> P y \<longrightarrow> R x y)"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5123
    shows "R a b"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5124
proof -
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5125
  have "\<And>a b c. \<lbrakk>a \<in> S; P a; b \<in> S; c \<in> S; P b; P c; R a b\<rbrakk> \<Longrightarrow> R a c"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5126
    apply (rule connected_induction [OF \<open>connected S\<close> opD], simp_all)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5127
    by (meson trans opI)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5128
  then show ?thesis by (metis etc opI)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5129
qed
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5130
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5131
lemma connected_induction_simple:
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5132
  assumes "connected S"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5133
      and etc: "a \<in> S" "b \<in> S" "P a"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5134
      and opI: "\<And>a. a \<in> S
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5135
             \<Longrightarrow> \<exists>T. openin (subtopology euclidean S) T \<and> a \<in> T \<and>
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5136
                     (\<forall>x \<in> T. \<forall>y \<in> T. P x \<longrightarrow> P y)"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5137
    shows "P b"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5138
apply (rule connected_induction [OF \<open>connected S\<close> _, where P = "\<lambda>x. True"], blast)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5139
apply (frule opI)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5140
using etc apply simp_all
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5141
done
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5142
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5143
lemma connected_equivalence_relation:
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5144
  assumes "connected S"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5145
      and etc: "a \<in> S" "b \<in> S"
63928
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63881
diff changeset
  5146
      and sym: "\<And>x y. \<lbrakk>R x y; x \<in> S; y \<in> S\<rbrakk> \<Longrightarrow> R y x"
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63881
diff changeset
  5147
      and trans: "\<And>x y z. \<lbrakk>R x y; R y z; x \<in> S; y \<in> S; z \<in> S\<rbrakk> \<Longrightarrow> R x z"
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63881
diff changeset
  5148
      and opI: "\<And>a. a \<in> S \<Longrightarrow> \<exists>T. openin (subtopology euclidean S) T \<and> a \<in> T \<and> (\<forall>x \<in> T. R a x)"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5149
    shows "R a b"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5150
proof -
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5151
  have "\<And>a b c. \<lbrakk>a \<in> S; b \<in> S; c \<in> S; R a b\<rbrakk> \<Longrightarrow> R a c"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5152
    apply (rule connected_induction_simple [OF \<open>connected S\<close>], simp_all)
63928
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63881
diff changeset
  5153
    by (meson local.sym local.trans opI openin_imp_subset subsetCE)
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5154
  then show ?thesis by (metis etc opI)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5155
qed
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5156
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5157
lemma locally_constant_imp_constant:
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5158
  assumes "connected S"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5159
      and opI: "\<And>a. a \<in> S
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5160
             \<Longrightarrow> \<exists>T. openin (subtopology euclidean S) T \<and> a \<in> T \<and> (\<forall>x \<in> T. f x = f a)"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5161
    shows "f constant_on S"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5162
proof -
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5163
  have "\<And>x y. x \<in> S \<Longrightarrow> y \<in> S \<Longrightarrow> f x = f y"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5164
    apply (rule connected_equivalence_relation [OF \<open>connected S\<close>], simp_all)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5165
    by (metis opI)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5166
  then show ?thesis
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5167
    by (metis constant_on_def)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5168
qed
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5169
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5170
lemma locally_constant:
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5171
     "connected S \<Longrightarrow> locally (\<lambda>U. f constant_on U) S \<longleftrightarrow> f constant_on S"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5172
apply (simp add: locally_def)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5173
apply (rule iffI)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5174
 apply (rule locally_constant_imp_constant, assumption)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5175
 apply (metis (mono_tags, hide_lams) constant_on_def constant_on_subset openin_subtopology_self)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5176
by (meson constant_on_subset openin_imp_subset order_refl)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5177
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5178
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5179
subsection\<open>Basic properties of local compactness\<close>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5180
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5181
lemma locally_compact:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5182
  fixes s :: "'a :: metric_space set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5183
  shows
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5184
    "locally compact s \<longleftrightarrow>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5185
     (\<forall>x \<in> s. \<exists>u v. x \<in> u \<and> u \<subseteq> v \<and> v \<subseteq> s \<and>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5186
                    openin (subtopology euclidean s) u \<and> compact v)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5187
     (is "?lhs = ?rhs")
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5188
proof
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5189
  assume ?lhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5190
  then show ?rhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5191
    apply clarify
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5192
    apply (erule_tac w = "s \<inter> ball x 1" in locallyE)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5193
    by auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5194
next
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5195
  assume r [rule_format]: ?rhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5196
  have *: "\<exists>u v.
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5197
              openin (subtopology euclidean s) u \<and>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5198
              compact v \<and> x \<in> u \<and> u \<subseteq> v \<and> v \<subseteq> s \<inter> T"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5199
          if "open T" "x \<in> s" "x \<in> T" for x T
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5200
  proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5201
    obtain u v where uv: "x \<in> u" "u \<subseteq> v" "v \<subseteq> s" "compact v" "openin (subtopology euclidean s) u"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5202
      using r [OF \<open>x \<in> s\<close>] by auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5203
    obtain e where "e>0" and e: "cball x e \<subseteq> T"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5204
      using open_contains_cball \<open>open T\<close> \<open>x \<in> T\<close> by blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5205
    show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5206
      apply (rule_tac x="(s \<inter> ball x e) \<inter> u" in exI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5207
      apply (rule_tac x="cball x e \<inter> v" in exI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5208
      using that \<open>e > 0\<close> e uv
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5209
      apply auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5210
      done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5211
  qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5212
  show ?lhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5213
    apply (rule locallyI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5214
    apply (subst (asm) openin_open)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5215
    apply (blast intro: *)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5216
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5217
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5218
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5219
lemma locally_compactE:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5220
  fixes s :: "'a :: metric_space set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5221
  assumes "locally compact s"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5222
  obtains u v where "\<And>x. x \<in> s \<Longrightarrow> x \<in> u x \<and> u x \<subseteq> v x \<and> v x \<subseteq> s \<and>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5223
                             openin (subtopology euclidean s) (u x) \<and> compact (v x)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5224
using assms
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5225
unfolding locally_compact by metis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5226
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5227
lemma locally_compact_alt:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5228
  fixes s :: "'a :: heine_borel set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5229
  shows "locally compact s \<longleftrightarrow>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5230
         (\<forall>x \<in> s. \<exists>u. x \<in> u \<and>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5231
                    openin (subtopology euclidean s) u \<and> compact(closure u) \<and> closure u \<subseteq> s)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5232
apply (simp add: locally_compact)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5233
apply (intro ball_cong ex_cong refl iffI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5234
apply (metis bounded_subset closure_eq closure_mono compact_eq_bounded_closed dual_order.trans)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5235
by (meson closure_subset compact_closure)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5236
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5237
lemma locally_compact_Int_cball:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5238
  fixes s :: "'a :: heine_borel set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5239
  shows "locally compact s \<longleftrightarrow> (\<forall>x \<in> s. \<exists>e. 0 < e \<and> closed(cball x e \<inter> s))"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5240
        (is "?lhs = ?rhs")
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5241
proof
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5242
  assume ?lhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5243
  then show ?rhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5244
    apply (simp add: locally_compact openin_contains_cball)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5245
    apply (clarify | assumption | drule bspec)+
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5246
    by (metis (no_types, lifting)  compact_cball compact_imp_closed compact_Int inf.absorb_iff2 inf.orderE inf_sup_aci(2))
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5247
next
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5248
  assume ?rhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5249
  then show ?lhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5250
    apply (simp add: locally_compact openin_contains_cball)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5251
    apply (clarify | assumption | drule bspec)+
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5252
    apply (rule_tac x="ball x e \<inter> s" in exI, simp)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5253
    apply (rule_tac x="cball x e \<inter> s" in exI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5254
    using compact_eq_bounded_closed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5255
    apply auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5256
    apply (metis open_ball le_infI1 mem_ball open_contains_cball_eq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5257
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5258
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5259
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5260
lemma locally_compact_compact:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5261
  fixes s :: "'a :: heine_borel set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5262
  shows "locally compact s \<longleftrightarrow>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5263
         (\<forall>k. k \<subseteq> s \<and> compact k
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5264
              \<longrightarrow> (\<exists>u v. k \<subseteq> u \<and> u \<subseteq> v \<and> v \<subseteq> s \<and>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5265
                         openin (subtopology euclidean s) u \<and> compact v))"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5266
        (is "?lhs = ?rhs")
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5267
proof
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5268
  assume ?lhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5269
  then obtain u v where
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5270
    uv: "\<And>x. x \<in> s \<Longrightarrow> x \<in> u x \<and> u x \<subseteq> v x \<and> v x \<subseteq> s \<and>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5271
                             openin (subtopology euclidean s) (u x) \<and> compact (v x)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5272
    by (metis locally_compactE)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5273
  have *: "\<exists>u v. k \<subseteq> u \<and> u \<subseteq> v \<and> v \<subseteq> s \<and> openin (subtopology euclidean s) u \<and> compact v"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5274
          if "k \<subseteq> s" "compact k" for k
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5275
  proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5276
    have "\<And>C. (\<forall>c\<in>C. openin (subtopology euclidean k) c) \<and> k \<subseteq> \<Union>C \<Longrightarrow>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5277
                    \<exists>D\<subseteq>C. finite D \<and> k \<subseteq> \<Union>D"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5278
      using that by (simp add: compact_eq_openin_cover)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5279
    moreover have "\<forall>c \<in> (\<lambda>x. k \<inter> u x) ` k. openin (subtopology euclidean k) c"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5280
      using that by clarify (metis subsetD inf.absorb_iff2 openin_subset openin_subtopology_Int_subset topspace_euclidean_subtopology uv)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5281
    moreover have "k \<subseteq> \<Union>((\<lambda>x. k \<inter> u x) ` k)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5282
      using that by clarsimp (meson subsetCE uv)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5283
    ultimately obtain D where "D \<subseteq> (\<lambda>x. k \<inter> u x) ` k" "finite D" "k \<subseteq> \<Union>D"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5284
      by metis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5285
    then obtain T where T: "T \<subseteq> k" "finite T" "k \<subseteq> \<Union>((\<lambda>x. k \<inter> u x) ` T)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5286
      by (metis finite_subset_image)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5287
    have Tuv: "UNION T u \<subseteq> UNION T v"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5288
      using T that by (force simp: dest!: uv)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5289
    show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5290
      apply (rule_tac x="\<Union>(u ` T)" in exI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5291
      apply (rule_tac x="\<Union>(v ` T)" in exI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5292
      apply (simp add: Tuv)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5293
      using T that
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5294
      apply (auto simp: dest!: uv)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5295
      done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5296
  qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5297
  show ?rhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5298
    by (blast intro: *)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5299
next
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5300
  assume ?rhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5301
  then show ?lhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5302
    apply (clarsimp simp add: locally_compact)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5303
    apply (drule_tac x="{x}" in spec, simp)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5304
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5305
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5306
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5307
lemma open_imp_locally_compact:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5308
  fixes s :: "'a :: heine_borel set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5309
  assumes "open s"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5310
    shows "locally compact s"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5311
proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5312
  have *: "\<exists>u v. x \<in> u \<and> u \<subseteq> v \<and> v \<subseteq> s \<and> openin (subtopology euclidean s) u \<and> compact v"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5313
          if "x \<in> s" for x
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5314
  proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5315
    obtain e where "e>0" and e: "cball x e \<subseteq> s"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5316
      using open_contains_cball assms \<open>x \<in> s\<close> by blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5317
    have ope: "openin (subtopology euclidean s) (ball x e)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5318
      by (meson e open_ball ball_subset_cball dual_order.trans open_subset)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5319
    show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5320
      apply (rule_tac x="ball x e" in exI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5321
      apply (rule_tac x="cball x e" in exI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5322
      using \<open>e > 0\<close> e apply (auto simp: ope)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5323
      done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5324
  qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5325
  show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5326
    unfolding locally_compact
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5327
    by (blast intro: *)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5328
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5329
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5330
lemma closed_imp_locally_compact:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5331
  fixes s :: "'a :: heine_borel set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5332
  assumes "closed s"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5333
    shows "locally compact s"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5334
proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5335
  have *: "\<exists>u v. x \<in> u \<and> u \<subseteq> v \<and> v \<subseteq> s \<and>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5336
                 openin (subtopology euclidean s) u \<and> compact v"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5337
          if "x \<in> s" for x
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5338
  proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5339
    show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5340
      apply (rule_tac x = "s \<inter> ball x 1" in exI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5341
      apply (rule_tac x = "s \<inter> cball x 1" in exI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5342
      using \<open>x \<in> s\<close> assms apply auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5343
      done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5344
  qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5345
  show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5346
    unfolding locally_compact
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5347
    by (blast intro: *)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5348
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5349
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5350
lemma locally_compact_UNIV: "locally compact (UNIV :: 'a :: heine_borel set)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5351
  by (simp add: closed_imp_locally_compact)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5352
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5353
lemma locally_compact_Int:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5354
  fixes s :: "'a :: t2_space set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5355
  shows "\<lbrakk>locally compact s; locally compact t\<rbrakk> \<Longrightarrow> locally compact (s \<inter> t)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5356
by (simp add: compact_Int locally_Int)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5357
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5358
lemma locally_compact_closedin:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5359
  fixes s :: "'a :: heine_borel set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5360
  shows "\<lbrakk>closedin (subtopology euclidean s) t; locally compact s\<rbrakk>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5361
        \<Longrightarrow> locally compact t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5362
unfolding closedin_closed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5363
using closed_imp_locally_compact locally_compact_Int by blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5364
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5365
lemma locally_compact_delete:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5366
     fixes s :: "'a :: t1_space set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5367
     shows "locally compact s \<Longrightarrow> locally compact (s - {a})"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5368
  by (auto simp: openin_delete locally_open_subset)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5369
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5370
lemma locally_closed:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5371
  fixes s :: "'a :: heine_borel set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5372
  shows "locally closed s \<longleftrightarrow> locally compact s"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5373
        (is "?lhs = ?rhs")
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5374
proof
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5375
  assume ?lhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5376
  then show ?rhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5377
    apply (simp only: locally_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5378
    apply (erule all_forward imp_forward asm_rl exE)+
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5379
    apply (rule_tac x = "u \<inter> ball x 1" in exI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5380
    apply (rule_tac x = "v \<inter> cball x 1" in exI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5381
    apply (force intro: openin_trans)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5382
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5383
next
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5384
  assume ?rhs then show ?lhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5385
    using compact_eq_bounded_closed locally_mono by blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5386
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5387
64790
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5388
lemma locally_compact_openin_Un:
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5389
  fixes S :: "'a::euclidean_space set"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5390
  assumes LCS: "locally compact S" and LCT:"locally compact T"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5391
      and opS: "openin (subtopology euclidean (S \<union> T)) S"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5392
      and opT: "openin (subtopology euclidean (S \<union> T)) T"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5393
    shows "locally compact (S \<union> T)"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5394
proof -
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5395
  have "\<exists>e>0. closed (cball x e \<inter> (S \<union> T))" if "x \<in> S" for x
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5396
  proof -
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5397
    obtain e1 where "e1 > 0" and e1: "closed (cball x e1 \<inter> S)"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5398
      using LCS \<open>x \<in> S\<close> unfolding locally_compact_Int_cball by blast
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5399
    moreover obtain e2 where "e2 > 0" and e2: "cball x e2 \<inter> (S \<union> T) \<subseteq> S"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5400
      by (meson \<open>x \<in> S\<close> opS openin_contains_cball)
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5401
    then have "cball x e2 \<inter> (S \<union> T) = cball x e2 \<inter> S"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5402
      by force
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5403
    ultimately show ?thesis
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5404
      apply (rule_tac x="min e1 e2" in exI)
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5405
      apply (auto simp: cball_min_Int \<open>e2 > 0\<close> inf_assoc closed_Int)
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5406
      by (metis closed_Int closed_cball inf_left_commute)
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5407
  qed
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5408
  moreover have "\<exists>e>0. closed (cball x e \<inter> (S \<union> T))" if "x \<in> T" for x
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5409
  proof -
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5410
    obtain e1 where "e1 > 0" and e1: "closed (cball x e1 \<inter> T)"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5411
      using LCT \<open>x \<in> T\<close> unfolding locally_compact_Int_cball by blast
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5412
    moreover obtain e2 where "e2 > 0" and e2: "cball x e2 \<inter> (S \<union> T) \<subseteq> T"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5413
      by (meson \<open>x \<in> T\<close> opT openin_contains_cball)
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5414
    then have "cball x e2 \<inter> (S \<union> T) = cball x e2 \<inter> T"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5415
      by force
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5416
    ultimately show ?thesis
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5417
      apply (rule_tac x="min e1 e2" in exI)
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5418
      apply (auto simp: cball_min_Int \<open>e2 > 0\<close> inf_assoc closed_Int)
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5419
      by (metis closed_Int closed_cball inf_left_commute)
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5420
  qed
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5421
  ultimately show ?thesis
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5422
    by (force simp: locally_compact_Int_cball)
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5423
qed
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5424
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5425
lemma locally_compact_closedin_Un:
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5426
  fixes S :: "'a::euclidean_space set"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5427
  assumes LCS: "locally compact S" and LCT:"locally compact T"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5428
      and clS: "closedin (subtopology euclidean (S \<union> T)) S"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5429
      and clT: "closedin (subtopology euclidean (S \<union> T)) T"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5430
    shows "locally compact (S \<union> T)"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5431
proof -
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5432
  have "\<exists>e>0. closed (cball x e \<inter> (S \<union> T))" if "x \<in> S" "x \<in> T" for x
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5433
  proof -
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5434
    obtain e1 where "e1 > 0" and e1: "closed (cball x e1 \<inter> S)"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5435
      using LCS \<open>x \<in> S\<close> unfolding locally_compact_Int_cball by blast
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5436
    moreover
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5437
    obtain e2 where "e2 > 0" and e2: "closed (cball x e2 \<inter> T)"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5438
      using LCT \<open>x \<in> T\<close> unfolding locally_compact_Int_cball by blast
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5439
    ultimately show ?thesis
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5440
      apply (rule_tac x="min e1 e2" in exI)
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5441
      apply (auto simp: cball_min_Int \<open>e2 > 0\<close> inf_assoc closed_Int Int_Un_distrib)
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5442
      by (metis closed_Int closed_Un closed_cball inf_left_commute)
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5443
  qed
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5444
  moreover
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5445
  have "\<exists>e>0. closed (cball x e \<inter> (S \<union> T))" if x: "x \<in> S" "x \<notin> T" for x
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5446
  proof -
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5447
    obtain e1 where "e1 > 0" and e1: "closed (cball x e1 \<inter> S)"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5448
      using LCS \<open>x \<in> S\<close> unfolding locally_compact_Int_cball by blast
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5449
    moreover
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5450
    obtain e2 where "e2>0" and "cball x e2 \<inter> (S \<union> T) \<subseteq> S - T"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5451
      using clT x by (fastforce simp: openin_contains_cball closedin_def)
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5452
    then have "closed (cball x e2 \<inter> T)"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5453
    proof -
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5454
      have "{} = T - (T - cball x e2)"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5455
        using Diff_subset Int_Diff \<open>cball x e2 \<inter> (S \<union> T) \<subseteq> S - T\<close> by auto
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5456
      then show ?thesis
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5457
        by (simp add: Diff_Diff_Int inf_commute)
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5458
    qed
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5459
    ultimately show ?thesis
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5460
      apply (rule_tac x="min e1 e2" in exI)
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5461
      apply (auto simp: cball_min_Int \<open>e2 > 0\<close> inf_assoc closed_Int Int_Un_distrib)
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5462
      by (metis closed_Int closed_Un closed_cball inf_left_commute)
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5463
  qed
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5464
  moreover
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5465
  have "\<exists>e>0. closed (cball x e \<inter> (S \<union> T))" if x: "x \<notin> S" "x \<in> T" for x
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5466
  proof -
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5467
    obtain e1 where "e1 > 0" and e1: "closed (cball x e1 \<inter> T)"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5468
      using LCT \<open>x \<in> T\<close> unfolding locally_compact_Int_cball by blast
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5469
    moreover
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5470
    obtain e2 where "e2>0" and "cball x e2 \<inter> (S \<union> T) \<subseteq> S \<union> T - S"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5471
      using clS x by (fastforce simp: openin_contains_cball closedin_def)
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5472
    then have "closed (cball x e2 \<inter> S)"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5473
      by (metis Diff_disjoint Int_empty_right closed_empty inf.left_commute inf.orderE inf_sup_absorb)
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5474
    ultimately show ?thesis
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5475
      apply (rule_tac x="min e1 e2" in exI)
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5476
      apply (auto simp: cball_min_Int \<open>e2 > 0\<close> inf_assoc closed_Int Int_Un_distrib)
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5477
      by (metis closed_Int closed_Un closed_cball inf_left_commute)
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5478
  qed
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5479
  ultimately show ?thesis
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5480
    by (auto simp: locally_compact_Int_cball)
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5481
qed
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5482
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5483
lemma locally_compact_Times:
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5484
  fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5485
  shows "\<lbrakk>locally compact S; locally compact T\<rbrakk> \<Longrightarrow> locally compact (S \<times> T)"
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5486
  by (auto simp: compact_Times locally_Times)
ed38f9a834d8 New theory of arcwise connected sets and other new material
paulson <lp15@cam.ac.uk>
parents: 64788
diff changeset
  5487
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5488
subsection\<open>Important special cases of local connectedness and path connectedness\<close>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5489
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5490
lemma locally_connected_1:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5491
  assumes
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5492
    "\<And>v x. \<lbrakk>openin (subtopology euclidean S) v; x \<in> v\<rbrakk>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5493
              \<Longrightarrow> \<exists>u. openin (subtopology euclidean S) u \<and>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5494
                      connected u \<and> x \<in> u \<and> u \<subseteq> v"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5495
   shows "locally connected S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5496
apply (clarsimp simp add: locally_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5497
apply (drule assms; blast)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5498
done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5499
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5500
lemma locally_connected_2:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5501
  assumes "locally connected S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5502
          "openin (subtopology euclidean S) t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5503
          "x \<in> t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5504
   shows "openin (subtopology euclidean S) (connected_component_set t x)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5505
proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5506
  { fix y :: 'a
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5507
    let ?SS = "subtopology euclidean S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5508
    assume 1: "openin ?SS t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5509
              "\<forall>w x. openin ?SS w \<and> x \<in> w \<longrightarrow> (\<exists>u. openin ?SS u \<and> (\<exists>v. connected v \<and> x \<in> u \<and> u \<subseteq> v \<and> v \<subseteq> w))"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5510
    and "connected_component t x y"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5511
    then have "y \<in> t" and y: "y \<in> connected_component_set t x"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5512
      using connected_component_subset by blast+
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5513
    obtain F where
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5514
      "\<forall>x y. (\<exists>w. openin ?SS w \<and> (\<exists>u. connected u \<and> x \<in> w \<and> w \<subseteq> u \<and> u \<subseteq> y)) = (openin ?SS (F x y) \<and> (\<exists>u. connected u \<and> x \<in> F x y \<and> F x y \<subseteq> u \<and> u \<subseteq> y))"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5515
      by moura
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5516
    then obtain G where
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5517
       "\<forall>a A. (\<exists>U. openin ?SS U \<and> (\<exists>V. connected V \<and> a \<in> U \<and> U \<subseteq> V \<and> V \<subseteq> A)) = (openin ?SS (F a A) \<and> connected (G a A) \<and> a \<in> F a A \<and> F a A \<subseteq> G a A \<and> G a A \<subseteq> A)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5518
      by moura
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5519
    then have *: "openin ?SS (F y t) \<and> connected (G y t) \<and> y \<in> F y t \<and> F y t \<subseteq> G y t \<and> G y t \<subseteq> t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5520
      using 1 \<open>y \<in> t\<close> by presburger
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5521
    have "G y t \<subseteq> connected_component_set t y"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5522
      by (metis (no_types) * connected_component_eq_self connected_component_mono contra_subsetD)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5523
    then have "\<exists>A. openin ?SS A \<and> y \<in> A \<and> A \<subseteq> connected_component_set t x"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5524
      by (metis (no_types) * connected_component_eq dual_order.trans y)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5525
  }
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5526
  then show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5527
    using assms openin_subopen by (force simp: locally_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5528
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5529
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5530
lemma locally_connected_3:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5531
  assumes "\<And>t x. \<lbrakk>openin (subtopology euclidean S) t; x \<in> t\<rbrakk>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5532
              \<Longrightarrow> openin (subtopology euclidean S)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5533
                          (connected_component_set t x)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5534
          "openin (subtopology euclidean S) v" "x \<in> v"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5535
   shows  "\<exists>u. openin (subtopology euclidean S) u \<and> connected u \<and> x \<in> u \<and> u \<subseteq> v"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5536
using assms connected_component_subset by fastforce
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5537
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5538
lemma locally_connected:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5539
  "locally connected S \<longleftrightarrow>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5540
   (\<forall>v x. openin (subtopology euclidean S) v \<and> x \<in> v
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5541
          \<longrightarrow> (\<exists>u. openin (subtopology euclidean S) u \<and> connected u \<and> x \<in> u \<and> u \<subseteq> v))"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5542
by (metis locally_connected_1 locally_connected_2 locally_connected_3)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5543
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5544
lemma locally_connected_open_connected_component:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5545
  "locally connected S \<longleftrightarrow>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5546
   (\<forall>t x. openin (subtopology euclidean S) t \<and> x \<in> t
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5547
          \<longrightarrow> openin (subtopology euclidean S) (connected_component_set t x))"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5548
by (metis locally_connected_1 locally_connected_2 locally_connected_3)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5549
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5550
lemma locally_path_connected_1:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5551
  assumes
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5552
    "\<And>v x. \<lbrakk>openin (subtopology euclidean S) v; x \<in> v\<rbrakk>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5553
              \<Longrightarrow> \<exists>u. openin (subtopology euclidean S) u \<and> path_connected u \<and> x \<in> u \<and> u \<subseteq> v"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5554
   shows "locally path_connected S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5555
apply (clarsimp simp add: locally_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5556
apply (drule assms; blast)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5557
done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5558
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5559
lemma locally_path_connected_2:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5560
  assumes "locally path_connected S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5561
          "openin (subtopology euclidean S) t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5562
          "x \<in> t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5563
   shows "openin (subtopology euclidean S) (path_component_set t x)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5564
proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5565
  { fix y :: 'a
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5566
    let ?SS = "subtopology euclidean S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5567
    assume 1: "openin ?SS t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5568
              "\<forall>w x. openin ?SS w \<and> x \<in> w \<longrightarrow> (\<exists>u. openin ?SS u \<and> (\<exists>v. path_connected v \<and> x \<in> u \<and> u \<subseteq> v \<and> v \<subseteq> w))"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5569
    and "path_component t x y"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5570
    then have "y \<in> t" and y: "y \<in> path_component_set t x"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5571
      using path_component_mem(2) by blast+
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5572
    obtain F where
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5573
      "\<forall>x y. (\<exists>w. openin ?SS w \<and> (\<exists>u. path_connected u \<and> x \<in> w \<and> w \<subseteq> u \<and> u \<subseteq> y)) = (openin ?SS (F x y) \<and> (\<exists>u. path_connected u \<and> x \<in> F x y \<and> F x y \<subseteq> u \<and> u \<subseteq> y))"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5574
      by moura
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5575
    then obtain G where
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5576
       "\<forall>a A. (\<exists>U. openin ?SS U \<and> (\<exists>V. path_connected V \<and> a \<in> U \<and> U \<subseteq> V \<and> V \<subseteq> A)) = (openin ?SS (F a A) \<and> path_connected (G a A) \<and> a \<in> F a A \<and> F a A \<subseteq> G a A \<and> G a A \<subseteq> A)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5577
      by moura
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5578
    then have *: "openin ?SS (F y t) \<and> path_connected (G y t) \<and> y \<in> F y t \<and> F y t \<subseteq> G y t \<and> G y t \<subseteq> t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5579
      using 1 \<open>y \<in> t\<close> by presburger
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5580
    have "G y t \<subseteq> path_component_set t y"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5581
      using * path_component_maximal set_rev_mp by blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5582
    then have "\<exists>A. openin ?SS A \<and> y \<in> A \<and> A \<subseteq> path_component_set t x"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5583
      by (metis "*" \<open>G y t \<subseteq> path_component_set t y\<close> dual_order.trans path_component_eq y)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5584
  }
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5585
  then show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5586
    using assms openin_subopen by (force simp: locally_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5587
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5588
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5589
lemma locally_path_connected_3:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5590
  assumes "\<And>t x. \<lbrakk>openin (subtopology euclidean S) t; x \<in> t\<rbrakk>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5591
              \<Longrightarrow> openin (subtopology euclidean S) (path_component_set t x)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5592
          "openin (subtopology euclidean S) v" "x \<in> v"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5593
   shows  "\<exists>u. openin (subtopology euclidean S) u \<and> path_connected u \<and> x \<in> u \<and> u \<subseteq> v"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5594
proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5595
  have "path_component v x x"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5596
    by (meson assms(3) path_component_refl)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5597
  then show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5598
    by (metis assms(1) assms(2) assms(3) mem_Collect_eq path_component_subset path_connected_path_component)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5599
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5600
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5601
proposition locally_path_connected:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5602
  "locally path_connected S \<longleftrightarrow>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5603
   (\<forall>v x. openin (subtopology euclidean S) v \<and> x \<in> v
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5604
          \<longrightarrow> (\<exists>u. openin (subtopology euclidean S) u \<and> path_connected u \<and> x \<in> u \<and> u \<subseteq> v))"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5605
by (metis locally_path_connected_1 locally_path_connected_2 locally_path_connected_3)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5606
63469
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5607
proposition locally_path_connected_open_path_component:
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5608
  "locally path_connected S \<longleftrightarrow>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5609
   (\<forall>t x. openin (subtopology euclidean S) t \<and> x \<in> t
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5610
          \<longrightarrow> openin (subtopology euclidean S) (path_component_set t x))"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5611
by (metis locally_path_connected_1 locally_path_connected_2 locally_path_connected_3)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5612
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5613
lemma locally_connected_open_component:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5614
  "locally connected S \<longleftrightarrow>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5615
   (\<forall>t c. openin (subtopology euclidean S) t \<and> c \<in> components t
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5616
          \<longrightarrow> openin (subtopology euclidean S) c)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5617
by (metis components_iff locally_connected_open_connected_component)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5618
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5619
proposition locally_connected_im_kleinen:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5620
  "locally connected S \<longleftrightarrow>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5621
   (\<forall>v x. openin (subtopology euclidean S) v \<and> x \<in> v
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5622
       \<longrightarrow> (\<exists>u. openin (subtopology euclidean S) u \<and>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5623
                x \<in> u \<and> u \<subseteq> v \<and>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5624
                (\<forall>y. y \<in> u \<longrightarrow> (\<exists>c. connected c \<and> c \<subseteq> v \<and> x \<in> c \<and> y \<in> c))))"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5625
   (is "?lhs = ?rhs")
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5626
proof
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5627
  assume ?lhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5628
  then show ?rhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5629
    by (fastforce simp add: locally_connected)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5630
next
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5631
  assume ?rhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5632
  have *: "\<exists>T. openin (subtopology euclidean S) T \<and> x \<in> T \<and> T \<subseteq> c"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5633
       if "openin (subtopology euclidean S) t" and c: "c \<in> components t" and "x \<in> c" for t c x
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5634
  proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5635
    from that \<open>?rhs\<close> [rule_format, of t x]
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5636
    obtain u where u:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5637
      "openin (subtopology euclidean S) u \<and> x \<in> u \<and> u \<subseteq> t \<and>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5638
       (\<forall>y. y \<in> u \<longrightarrow> (\<exists>c. connected c \<and> c \<subseteq> t \<and> x \<in> c \<and> y \<in> c))"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5639
      by auto (meson subsetD in_components_subset)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5640
    obtain F :: "'a set \<Rightarrow> 'a set \<Rightarrow> 'a" where
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5641
      "\<forall>x y. (\<exists>z. z \<in> x \<and> y = connected_component_set x z) = (F x y \<in> x \<and> y = connected_component_set x (F x y))"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5642
      by moura
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5643
    then have F: "F t c \<in> t \<and> c = connected_component_set t (F t c)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5644
      by (meson components_iff c)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5645
    obtain G :: "'a set \<Rightarrow> 'a set \<Rightarrow> 'a" where
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5646
        G: "\<forall>x y. (\<exists>z. z \<in> y \<and> z \<notin> x) = (G x y \<in> y \<and> G x y \<notin> x)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5647
      by moura
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5648
     have "G c u \<notin> u \<or> G c u \<in> c"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5649
      using F by (metis (full_types) u connected_componentI connected_component_eq mem_Collect_eq that(3))
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5650
    then show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5651
      using G u by auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5652
  qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5653
  show ?lhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5654
    apply (clarsimp simp add: locally_connected_open_component)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5655
    apply (subst openin_subopen)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5656
    apply (blast intro: *)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5657
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5658
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5659
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5660
proposition locally_path_connected_im_kleinen:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5661
  "locally path_connected S \<longleftrightarrow>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5662
   (\<forall>v x. openin (subtopology euclidean S) v \<and> x \<in> v
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5663
       \<longrightarrow> (\<exists>u. openin (subtopology euclidean S) u \<and>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5664
                x \<in> u \<and> u \<subseteq> v \<and>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5665
                (\<forall>y. y \<in> u \<longrightarrow> (\<exists>p. path p \<and> path_image p \<subseteq> v \<and>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5666
                                pathstart p = x \<and> pathfinish p = y))))"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5667
   (is "?lhs = ?rhs")
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5668
proof
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5669
  assume ?lhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5670
  then show ?rhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5671
    apply (simp add: locally_path_connected path_connected_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5672
    apply (erule all_forward ex_forward imp_forward conjE | simp)+
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5673
    by (meson dual_order.trans)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5674
next
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5675
  assume ?rhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5676
  have *: "\<exists>T. openin (subtopology euclidean S) T \<and>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5677
               x \<in> T \<and> T \<subseteq> path_component_set u z"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5678
       if "openin (subtopology euclidean S) u" and "z \<in> u" and c: "path_component u z x" for u z x
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5679
  proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5680
    have "x \<in> u"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5681
      by (meson c path_component_mem(2))
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5682
    with that \<open>?rhs\<close> [rule_format, of u x]
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5683
    obtain U where U:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5684
      "openin (subtopology euclidean S) U \<and> x \<in> U \<and> U \<subseteq> u \<and>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5685
       (\<forall>y. y \<in> U \<longrightarrow> (\<exists>p. path p \<and> path_image p \<subseteq> u \<and> pathstart p = x \<and> pathfinish p = y))"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5686
       by blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5687
    show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5688
      apply (rule_tac x=U in exI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5689
      apply (auto simp: U)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5690
      apply (metis U c path_component_trans path_component_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5691
      done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5692
  qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5693
  show ?lhs
63469
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5694
    apply (clarsimp simp add: locally_path_connected_open_path_component)
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5695
    apply (subst openin_subopen)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5696
    apply (blast intro: *)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5697
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5698
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5699
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5700
lemma locally_path_connected_imp_locally_connected:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5701
  "locally path_connected S \<Longrightarrow> locally connected S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5702
using locally_mono path_connected_imp_connected by blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5703
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5704
lemma locally_connected_components:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5705
  "\<lbrakk>locally connected S; c \<in> components S\<rbrakk> \<Longrightarrow> locally connected c"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5706
by (meson locally_connected_open_component locally_open_subset openin_subtopology_self)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5707
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5708
lemma locally_path_connected_components:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5709
  "\<lbrakk>locally path_connected S; c \<in> components S\<rbrakk> \<Longrightarrow> locally path_connected c"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5710
by (meson locally_connected_open_component locally_open_subset locally_path_connected_imp_locally_connected openin_subtopology_self)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5711
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5712
lemma locally_path_connected_connected_component:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5713
  "locally path_connected S \<Longrightarrow> locally path_connected (connected_component_set S x)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5714
by (metis components_iff connected_component_eq_empty locally_empty locally_path_connected_components)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5715
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5716
lemma open_imp_locally_path_connected:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5717
  fixes S :: "'a :: real_normed_vector set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5718
  shows "open S \<Longrightarrow> locally path_connected S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5719
apply (rule locally_mono [of convex])
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5720
apply (simp_all add: locally_def openin_open_eq convex_imp_path_connected)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5721
apply (meson Topology_Euclidean_Space.open_ball centre_in_ball convex_ball openE order_trans)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5722
done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5723
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5724
lemma open_imp_locally_connected:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5725
  fixes S :: "'a :: real_normed_vector set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5726
  shows "open S \<Longrightarrow> locally connected S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5727
by (simp add: locally_path_connected_imp_locally_connected open_imp_locally_path_connected)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5728
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5729
lemma locally_path_connected_UNIV: "locally path_connected (UNIV::'a :: real_normed_vector set)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5730
  by (simp add: open_imp_locally_path_connected)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5731
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5732
lemma locally_connected_UNIV: "locally connected (UNIV::'a :: real_normed_vector set)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5733
  by (simp add: open_imp_locally_connected)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5734
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5735
lemma openin_connected_component_locally_connected:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5736
    "locally connected S
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5737
     \<Longrightarrow> openin (subtopology euclidean S) (connected_component_set S x)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5738
apply (simp add: locally_connected_open_connected_component)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5739
by (metis connected_component_eq_empty connected_component_subset open_empty open_subset openin_subtopology_self)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5740
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5741
lemma openin_components_locally_connected:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5742
    "\<lbrakk>locally connected S; c \<in> components S\<rbrakk> \<Longrightarrow> openin (subtopology euclidean S) c"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5743
  using locally_connected_open_component openin_subtopology_self by blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5744
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5745
lemma openin_path_component_locally_path_connected:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5746
  "locally path_connected S
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5747
        \<Longrightarrow> openin (subtopology euclidean S) (path_component_set S x)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5748
by (metis (no_types) empty_iff locally_path_connected_2 openin_subopen openin_subtopology_self path_component_eq_empty)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5749
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5750
lemma closedin_path_component_locally_path_connected:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5751
    "locally path_connected S
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5752
        \<Longrightarrow> closedin (subtopology euclidean S) (path_component_set S x)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5753
apply  (simp add: closedin_def path_component_subset complement_path_component_Union)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5754
apply (rule openin_Union)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5755
using openin_path_component_locally_path_connected by auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5756
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5757
lemma convex_imp_locally_path_connected:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5758
  fixes S :: "'a:: real_normed_vector set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5759
  shows "convex S \<Longrightarrow> locally path_connected S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5760
apply (clarsimp simp add: locally_path_connected)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5761
apply (subst (asm) openin_open)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5762
apply clarify
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5763
apply (erule (1) Topology_Euclidean_Space.openE)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5764
apply (rule_tac x = "S \<inter> ball x e" in exI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5765
apply (force simp: convex_Int convex_imp_path_connected)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5766
done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5767
63928
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63881
diff changeset
  5768
lemma convex_imp_locally_connected:
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63881
diff changeset
  5769
  fixes S :: "'a:: real_normed_vector set"
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63881
diff changeset
  5770
  shows "convex S \<Longrightarrow> locally connected S"
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63881
diff changeset
  5771
  by (simp add: locally_path_connected_imp_locally_connected convex_imp_locally_path_connected)
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63881
diff changeset
  5772
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63881
diff changeset
  5773
63469
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5774
subsection\<open>Relations between components and path components\<close>
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5775
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5776
lemma path_component_eq_connected_component:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5777
  assumes "locally path_connected S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5778
    shows "(path_component S x = connected_component S x)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5779
proof (cases "x \<in> S")
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5780
  case True
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5781
  have "openin (subtopology euclidean (connected_component_set S x)) (path_component_set S x)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5782
    apply (rule openin_subset_trans [of S])
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5783
    apply (intro conjI openin_path_component_locally_path_connected [OF assms])
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5784
    using path_component_subset_connected_component   apply (auto simp: connected_component_subset)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5785
    done
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5786
  moreover have "closedin (subtopology euclidean (connected_component_set S x)) (path_component_set S x)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5787
    apply (rule closedin_subset_trans [of S])
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5788
    apply (intro conjI closedin_path_component_locally_path_connected [OF assms])
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5789
    using path_component_subset_connected_component   apply (auto simp: connected_component_subset)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5790
    done
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5791
  ultimately have *: "path_component_set S x = connected_component_set S x"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5792
    by (metis connected_connected_component connected_clopen True path_component_eq_empty)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5793
  then show ?thesis
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5794
    by blast
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5795
next
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5796
  case False then show ?thesis
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5797
    by (metis Collect_empty_eq_bot connected_component_eq_empty path_component_eq_empty)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5798
qed
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5799
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5800
lemma path_component_eq_connected_component_set:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5801
     "locally path_connected S \<Longrightarrow> (path_component_set S x = connected_component_set S x)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5802
by (simp add: path_component_eq_connected_component)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5803
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5804
lemma locally_path_connected_path_component:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5805
     "locally path_connected S \<Longrightarrow> locally path_connected (path_component_set S x)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5806
using locally_path_connected_connected_component path_component_eq_connected_component by fastforce
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5807
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5808
lemma open_path_connected_component:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5809
  fixes S :: "'a :: real_normed_vector set"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5810
  shows "open S \<Longrightarrow> path_component S x = connected_component S x"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5811
by (simp add: path_component_eq_connected_component open_imp_locally_path_connected)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5812
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5813
lemma open_path_connected_component_set:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5814
  fixes S :: "'a :: real_normed_vector set"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5815
  shows "open S \<Longrightarrow> path_component_set S x = connected_component_set S x"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5816
by (simp add: open_path_connected_component)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5817
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5818
proposition locally_connected_quotient_image:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5819
  assumes lcS: "locally connected S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5820
      and oo: "\<And>T. T \<subseteq> f ` S
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5821
                \<Longrightarrow> openin (subtopology euclidean S) {x. x \<in> S \<and> f x \<in> T} \<longleftrightarrow>
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5822
                    openin (subtopology euclidean (f ` S)) T"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5823
    shows "locally connected (f ` S)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5824
proof (clarsimp simp: locally_connected_open_component)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5825
  fix U C
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5826
  assume opefSU: "openin (subtopology euclidean (f ` S)) U" and "C \<in> components U"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5827
  then have "C \<subseteq> U" "U \<subseteq> f ` S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5828
    by (meson in_components_subset openin_imp_subset)+
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5829
  then have "openin (subtopology euclidean (f ` S)) C \<longleftrightarrow>
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5830
             openin (subtopology euclidean S) {x \<in> S. f x \<in> C}"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5831
    by (auto simp: oo)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5832
  moreover have "openin (subtopology euclidean S) {x \<in> S. f x \<in> C}"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5833
  proof (subst openin_subopen, clarify)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5834
    fix x
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5835
    assume "x \<in> S" "f x \<in> C"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5836
    show "\<exists>T. openin (subtopology euclidean S) T \<and> x \<in> T \<and> T \<subseteq> {x \<in> S. f x \<in> C}"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5837
    proof (intro conjI exI)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5838
      show "openin (subtopology euclidean S) (connected_component_set {w \<in> S. f w \<in> U} x)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5839
      proof (rule ccontr)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5840
        assume **: "\<not> openin (subtopology euclidean S) (connected_component_set {a \<in> S. f a \<in> U} x)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5841
        then have "x \<notin> {a \<in> S. f a \<in> U}"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5842
          using \<open>U \<subseteq> f ` S\<close> opefSU lcS locally_connected_2 oo by blast
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5843
        with ** show False
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5844
          by (metis (no_types) connected_component_eq_empty empty_iff openin_subopen)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5845
      qed
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5846
    next
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5847
      show "x \<in> connected_component_set {w \<in> S. f w \<in> U} x"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5848
        using \<open>C \<subseteq> U\<close> \<open>f x \<in> C\<close> \<open>x \<in> S\<close> by auto
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5849
    next
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5850
      have contf: "continuous_on S f"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5851
        by (simp add: continuous_on_open oo openin_imp_subset)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5852
      then have "continuous_on (connected_component_set {w \<in> S. f w \<in> U} x) f"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5853
        apply (rule continuous_on_subset)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5854
        using connected_component_subset apply blast
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5855
        done
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5856
      then have "connected (f ` connected_component_set {w \<in> S. f w \<in> U} x)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5857
        by (rule connected_continuous_image [OF _ connected_connected_component])
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5858
      moreover have "f ` connected_component_set {w \<in> S. f w \<in> U} x \<subseteq> U"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5859
        using connected_component_in by blast
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5860
      moreover have "C \<inter> f ` connected_component_set {w \<in> S. f w \<in> U} x \<noteq> {}"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5861
        using \<open>C \<subseteq> U\<close> \<open>f x \<in> C\<close> \<open>x \<in> S\<close> by fastforce
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5862
      ultimately have fC: "f ` (connected_component_set {w \<in> S. f w \<in> U} x) \<subseteq> C"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5863
        by (rule components_maximal [OF \<open>C \<in> components U\<close>])
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5864
      have cUC: "connected_component_set {a \<in> S. f a \<in> U} x \<subseteq> {a \<in> S. f a \<in> C}"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5865
        using connected_component_subset fC by blast
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5866
      have "connected_component_set {w \<in> S. f w \<in> U} x \<subseteq> connected_component_set {w \<in> S. f w \<in> C} x"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5867
      proof -
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5868
        { assume "x \<in> connected_component_set {a \<in> S. f a \<in> U} x"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5869
          then have ?thesis
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5870
            by (simp add: cUC connected_component_maximal) }
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5871
        then show ?thesis
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5872
          using connected_component_eq_empty by auto
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5873
      qed
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5874
      also have "... \<subseteq> {w \<in> S. f w \<in> C}"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5875
        by (rule connected_component_subset)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5876
      finally show "connected_component_set {w \<in> S. f w \<in> U} x \<subseteq> {x \<in> S. f x \<in> C}" .
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5877
    qed
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5878
  qed
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5879
  ultimately show "openin (subtopology euclidean (f ` S)) C"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5880
    by metis
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5881
qed
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5882
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5883
text\<open>The proof resembles that above but is not identical!\<close>
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5884
proposition locally_path_connected_quotient_image:
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5885
  assumes lcS: "locally path_connected S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5886
      and oo: "\<And>T. T \<subseteq> f ` S
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5887
                \<Longrightarrow> openin (subtopology euclidean S) {x. x \<in> S \<and> f x \<in> T} \<longleftrightarrow>
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5888
                    openin (subtopology euclidean (f ` S)) T"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5889
    shows "locally path_connected (f ` S)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5890
proof (clarsimp simp: locally_path_connected_open_path_component)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5891
  fix U y
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5892
  assume opefSU: "openin (subtopology euclidean (f ` S)) U" and "y \<in> U"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5893
  then have "path_component_set U y \<subseteq> U" "U \<subseteq> f ` S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5894
    by (meson path_component_subset openin_imp_subset)+
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5895
  then have "openin (subtopology euclidean (f ` S)) (path_component_set U y) \<longleftrightarrow>
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5896
             openin (subtopology euclidean S) {x \<in> S. f x \<in> path_component_set U y}"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5897
  proof -
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5898
    have "path_component_set U y \<subseteq> f ` S"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5899
      using \<open>U \<subseteq> f ` S\<close> \<open>path_component_set U y \<subseteq> U\<close> by blast
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5900
    then show ?thesis
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5901
      using oo by blast
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5902
  qed
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5903
  moreover have "openin (subtopology euclidean S) {x \<in> S. f x \<in> path_component_set U y}"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5904
  proof (subst openin_subopen, clarify)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5905
    fix x
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5906
    assume "x \<in> S" and Uyfx: "path_component U y (f x)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5907
    then have "f x \<in> U"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5908
      using path_component_mem by blast
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5909
    show "\<exists>T. openin (subtopology euclidean S) T \<and> x \<in> T \<and> T \<subseteq> {x \<in> S. f x \<in> path_component_set U y}"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5910
    proof (intro conjI exI)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5911
      show "openin (subtopology euclidean S) (path_component_set {w \<in> S. f w \<in> U} x)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5912
      proof (rule ccontr)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5913
        assume **: "\<not> openin (subtopology euclidean S) (path_component_set {a \<in> S. f a \<in> U} x)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5914
        then have "x \<notin> {a \<in> S. f a \<in> U}"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5915
          by (metis (no_types, lifting) \<open>U \<subseteq> f ` S\<close> opefSU lcS oo locally_path_connected_open_path_component)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5916
        then show False
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5917
          using ** \<open>path_component_set U y \<subseteq> U\<close>  \<open>x \<in> S\<close> \<open>path_component U y (f x)\<close> by blast
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5918
      qed
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5919
    next
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5920
      show "x \<in> path_component_set {w \<in> S. f w \<in> U} x"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5921
        by (metis (no_types, lifting) \<open>x \<in> S\<close> IntD2 Int_Collect \<open>path_component U y (f x)\<close> path_component_mem(2) path_component_refl)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5922
    next
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5923
      have contf: "continuous_on S f"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5924
        by (simp add: continuous_on_open oo openin_imp_subset)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5925
      then have "continuous_on (path_component_set {w \<in> S. f w \<in> U} x) f"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5926
        apply (rule continuous_on_subset)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5927
        using path_component_subset apply blast
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5928
        done
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5929
      then have "path_connected (f ` path_component_set {w \<in> S. f w \<in> U} x)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5930
        by (simp add: path_connected_continuous_image path_connected_path_component)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5931
      moreover have "f ` path_component_set {w \<in> S. f w \<in> U} x \<subseteq> U"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5932
        using path_component_mem by fastforce
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5933
      moreover have "f x \<in> f ` path_component_set {w \<in> S. f w \<in> U} x"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5934
        by (force simp: \<open>x \<in> S\<close> \<open>f x \<in> U\<close> path_component_refl_eq)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5935
      ultimately have "f ` (path_component_set {w \<in> S. f w \<in> U} x) \<subseteq> path_component_set U (f x)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5936
        by (meson path_component_maximal)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5937
       also have  "... \<subseteq> path_component_set U y"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5938
        by (simp add: Uyfx path_component_maximal path_component_subset path_component_sym path_connected_path_component)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5939
      finally have fC: "f ` (path_component_set {w \<in> S. f w \<in> U} x) \<subseteq> path_component_set U y" .
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5940
      have cUC: "path_component_set {a \<in> S. f a \<in> U} x \<subseteq> {a \<in> S. f a \<in> path_component_set U y}"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5941
        using path_component_subset fC by blast
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5942
      have "path_component_set {w \<in> S. f w \<in> U} x \<subseteq> path_component_set {w \<in> S. f w \<in> path_component_set U y} x"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5943
      proof -
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5944
        have "\<And>a. path_component_set (path_component_set {a \<in> S. f a \<in> U} x) a \<subseteq> path_component_set {a \<in> S. f a \<in> path_component_set U y} a"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5945
          using cUC path_component_mono by blast
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5946
        then show ?thesis
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5947
          using path_component_path_component by blast
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5948
      qed
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5949
      also have "... \<subseteq> {w \<in> S. f w \<in> path_component_set U y}"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5950
        by (rule path_component_subset)
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5951
      finally show "path_component_set {w \<in> S. f w \<in> U} x \<subseteq> {x \<in> S. f x \<in> path_component_set U y}" .
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5952
    qed
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5953
  qed
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5954
  ultimately show "openin (subtopology euclidean (f ` S)) (path_component_set U y)"
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5955
    by metis
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5956
qed
b6900858dcb9 lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents: 63305
diff changeset
  5957
63114
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5958
subsection\<open>Components, continuity, openin, closedin\<close>
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5959
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5960
lemma continuous_on_components_gen:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5961
 fixes f :: "'a::topological_space \<Rightarrow> 'b::topological_space"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5962
  assumes "\<And>c. c \<in> components S \<Longrightarrow>
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5963
              openin (subtopology euclidean S) c \<and> continuous_on c f"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5964
    shows "continuous_on S f"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5965
proof (clarsimp simp: continuous_openin_preimage_eq)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5966
  fix t :: "'b set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5967
  assume "open t"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5968
  have "{x. x \<in> S \<and> f x \<in> t} = \<Union>{{x. x \<in> c \<and> f x \<in> t} |c. c \<in> components S}"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5969
    apply auto
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5970
    apply (metis (lifting) components_iff connected_component_refl_eq mem_Collect_eq)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5971
    using Union_components by blast
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5972
  then show "openin (subtopology euclidean S) {x \<in> S. f x \<in> t}"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5973
    using \<open>open t\<close> assms
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5974
    by (fastforce intro: openin_trans continuous_openin_preimage_gen)
63114
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5975
qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5976
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5977
lemma continuous_on_components:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5978
 fixes f :: "'a::topological_space \<Rightarrow> 'b::topological_space"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5979
  assumes "locally connected S "
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5980
          "\<And>c. c \<in> components S \<Longrightarrow> continuous_on c f"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5981
    shows "continuous_on S f"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5982
apply (rule continuous_on_components_gen)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5983
apply (auto simp: assms intro: openin_components_locally_connected)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5984
done
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5985
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5986
lemma continuous_on_components_eq:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5987
    "locally connected S
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5988
     \<Longrightarrow> (continuous_on S f \<longleftrightarrow> (\<forall>c \<in> components S. continuous_on c f))"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5989
by (meson continuous_on_components continuous_on_subset in_components_subset)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5990
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5991
lemma continuous_on_components_open:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5992
 fixes S :: "'a::real_normed_vector set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5993
  assumes "open S "
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5994
          "\<And>c. c \<in> components S \<Longrightarrow> continuous_on c f"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5995
    shows "continuous_on S f"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5996
using continuous_on_components open_imp_locally_connected assms by blast
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5997
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5998
lemma continuous_on_components_open_eq:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5999
  fixes S :: "'a::real_normed_vector set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6000
  shows "open S \<Longrightarrow> (continuous_on S f \<longleftrightarrow> (\<forall>c \<in> components S. continuous_on c f))"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6001
using continuous_on_subset in_components_subset
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6002
by (blast intro: continuous_on_components_open)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6003
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6004
lemma closedin_union_complement_components:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6005
  assumes u: "locally connected u"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6006
      and S: "closedin (subtopology euclidean u) S"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6007
      and cuS: "c \<subseteq> components(u - S)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6008
    shows "closedin (subtopology euclidean u) (S \<union> \<Union>c)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6009
proof -
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6010
  have di: "(\<And>S t. S \<in> c \<and> t \<in> c' \<Longrightarrow> disjnt S t) \<Longrightarrow> disjnt (\<Union> c) (\<Union> c')" for c'
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6011
    by (simp add: disjnt_def) blast
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6012
  have "S \<subseteq> u"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6013
    using S closedin_imp_subset by blast
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6014
  moreover have "u - S = \<Union>c \<union> \<Union>(components (u - S) - c)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6015
    by (metis Diff_partition Topology_Euclidean_Space.Union_components Union_Un_distrib assms(3))
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6016
  moreover have "disjnt (\<Union>c) (\<Union>(components (u - S) - c))"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6017
    apply (rule di)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6018
    by (metis DiffD1 DiffD2 assms(3) components_nonoverlap disjnt_def subsetCE)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6019
  ultimately have eq: "S \<union> \<Union>c = u - (\<Union>(components(u - S) - c))"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6020
    by (auto simp: disjnt_def)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6021
  have *: "openin (subtopology euclidean u) (\<Union>(components (u - S) - c))"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6022
    apply (rule openin_Union)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6023
    apply (rule openin_trans [of "u - S"])
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6024
    apply (simp add: u S locally_diff_closed openin_components_locally_connected)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6025
    apply (simp add: openin_diff S)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6026
    done
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6027
  have "openin (subtopology euclidean u) (u - (u - \<Union>(components (u - S) - c)))"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6028
    apply (rule openin_diff, simp)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6029
    apply (metis closedin_diff closedin_topspace topspace_euclidean_subtopology *)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6030
    done
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6031
  then show ?thesis
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6032
    by (force simp: eq closedin_def)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6033
qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6034
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6035
lemma closed_union_complement_components:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6036
  fixes S :: "'a::real_normed_vector set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6037
  assumes S: "closed S" and c: "c \<subseteq> components(- S)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6038
    shows "closed(S \<union> \<Union> c)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6039
proof -
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6040
  have "closedin (subtopology euclidean UNIV) (S \<union> \<Union>c)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6041
    apply (rule closedin_union_complement_components [OF locally_connected_UNIV])
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6042
    using S apply (simp add: closed_closedin)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6043
    using c apply (simp add: Compl_eq_Diff_UNIV)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6044
    done
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6045
  then show ?thesis
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6046
    by (simp add: closed_closedin)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6047
qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6048
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6049
lemma closedin_Un_complement_component:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6050
  fixes S :: "'a::real_normed_vector set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6051
  assumes u: "locally connected u"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6052
      and S: "closedin (subtopology euclidean u) S"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6053
      and c: " c \<in> components(u - S)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6054
    shows "closedin (subtopology euclidean u) (S \<union> c)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6055
proof -
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6056
  have "closedin (subtopology euclidean u) (S \<union> \<Union>{c})"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6057
    using c by (blast intro: closedin_union_complement_components [OF u S])
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6058
  then show ?thesis
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6059
    by simp
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6060
qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6061
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6062
lemma closed_Un_complement_component:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6063
  fixes S :: "'a::real_normed_vector set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6064
  assumes S: "closed S" and c: " c \<in> components(-S)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6065
    shows "closed (S \<union> c)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6066
by (metis Compl_eq_Diff_UNIV S c closed_closedin closedin_Un_complement_component locally_connected_UNIV subtopology_UNIV)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6067
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6068
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6069
subsection\<open>Existence of isometry between subspaces of same dimension\<close>
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6070
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6071
lemma isometry_subset_subspace:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6072
  fixes S :: "'a::euclidean_space set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6073
    and T :: "'b::euclidean_space set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6074
  assumes S: "subspace S"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6075
      and T: "subspace T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6076
      and d: "dim S \<le> dim T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6077
  obtains f where "linear f" "f ` S \<subseteq> T" "\<And>x. x \<in> S \<Longrightarrow> norm(f x) = norm x"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6078
proof -
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6079
  obtain B where "B \<subseteq> S" and Borth: "pairwise orthogonal B"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6080
             and B1: "\<And>x. x \<in> B \<Longrightarrow> norm x = 1"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6081
             and "independent B" "finite B" "card B = dim S" "span B = S"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6082
    by (metis orthonormal_basis_subspace [OF S] independent_finite)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6083
  obtain C where "C \<subseteq> T" and Corth: "pairwise orthogonal C"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6084
             and C1:"\<And>x. x \<in> C \<Longrightarrow> norm x = 1"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6085
             and "independent C" "finite C" "card C = dim T" "span C = T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6086
    by (metis orthonormal_basis_subspace [OF T] independent_finite)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6087
  obtain fb where "fb ` B \<subseteq> C" "inj_on fb B"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6088
    by (metis \<open>card B = dim S\<close> \<open>card C = dim T\<close> \<open>finite B\<close> \<open>finite C\<close> card_le_inj d)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6089
  then have pairwise_orth_fb: "pairwise (\<lambda>v j. orthogonal (fb v) (fb j)) B"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6090
    using Corth
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6091
    apply (auto simp: pairwise_def orthogonal_clauses)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6092
    by (meson subsetD image_eqI inj_on_def)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6093
  obtain f where "linear f" and ffb: "\<And>x. x \<in> B \<Longrightarrow> f x = fb x"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6094
    using linear_independent_extend \<open>independent B\<close> by fastforce
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6095
  have "f ` S \<subseteq> T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6096
    by (metis ffb \<open>fb ` B \<subseteq> C\<close> \<open>linear f\<close> \<open>span B = S\<close> \<open>span C = T\<close> image_cong span_linear_image span_mono)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6097
  have [simp]: "\<And>x. x \<in> B \<Longrightarrow> norm (fb x) = norm x"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6098
    using B1 C1 \<open>fb ` B \<subseteq> C\<close> by auto
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6099
  have "norm (f x) = norm x" if "x \<in> S" for x
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6100
  proof -
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6101
    obtain a where x: "x = (\<Sum>v \<in> B. a v *\<^sub>R v)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6102
      using \<open>finite B\<close> \<open>span B = S\<close> \<open>x \<in> S\<close> span_finite by fastforce
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6103
    have "f x = (\<Sum>v \<in> B. f (a v *\<^sub>R v))"
64267
b9a1486e79be setsum -> sum
nipkow
parents: 64122
diff changeset
  6104
      using linear_sum [OF \<open>linear f\<close>] x by auto
63114
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6105
    also have "... = (\<Sum>v \<in> B. a v *\<^sub>R f v)"
64267
b9a1486e79be setsum -> sum
nipkow
parents: 64122
diff changeset
  6106
      using \<open>linear f\<close> by (simp add: linear_sum linear.scaleR)
63114
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6107
    also have "... = (\<Sum>v \<in> B. a v *\<^sub>R fb v)"
64267
b9a1486e79be setsum -> sum
nipkow
parents: 64122
diff changeset
  6108
      by (simp add: ffb cong: sum.cong)
63114
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6109
    finally have "norm (f x)^2 = norm (\<Sum>v\<in>B. a v *\<^sub>R fb v)^2" by simp
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6110
    also have "... = (\<Sum>v\<in>B. norm ((a v *\<^sub>R fb v))^2)"
64267
b9a1486e79be setsum -> sum
nipkow
parents: 64122
diff changeset
  6111
      apply (rule norm_sum_Pythagorean [OF \<open>finite B\<close>])
63114
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6112
      apply (rule pairwise_ortho_scaleR [OF pairwise_orth_fb])
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6113
      done
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6114
    also have "... = norm x ^2"
64267
b9a1486e79be setsum -> sum
nipkow
parents: 64122
diff changeset
  6115
      by (simp add: x pairwise_ortho_scaleR Borth norm_sum_Pythagorean [OF \<open>finite B\<close>])
63114
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6116
    finally show ?thesis
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6117
      by (simp add: norm_eq_sqrt_inner)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6118
  qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6119
  then show ?thesis
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6120
    by (rule that [OF \<open>linear f\<close> \<open>f ` S \<subseteq> T\<close>])
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6121
qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6122
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6123
proposition isometries_subspaces:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6124
  fixes S :: "'a::euclidean_space set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6125
    and T :: "'b::euclidean_space set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6126
  assumes S: "subspace S"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6127
      and T: "subspace T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6128
      and d: "dim S = dim T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6129
  obtains f g where "linear f" "linear g" "f ` S = T" "g ` T = S"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6130
                    "\<And>x. x \<in> S \<Longrightarrow> norm(f x) = norm x"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6131
                    "\<And>x. x \<in> T \<Longrightarrow> norm(g x) = norm x"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6132
                    "\<And>x. x \<in> S \<Longrightarrow> g(f x) = x"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6133
                    "\<And>x. x \<in> T \<Longrightarrow> f(g x) = x"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6134
proof -
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6135
  obtain B where "B \<subseteq> S" and Borth: "pairwise orthogonal B"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6136
             and B1: "\<And>x. x \<in> B \<Longrightarrow> norm x = 1"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6137
             and "independent B" "finite B" "card B = dim S" "span B = S"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6138
    by (metis orthonormal_basis_subspace [OF S] independent_finite)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6139
  obtain C where "C \<subseteq> T" and Corth: "pairwise orthogonal C"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6140
             and C1:"\<And>x. x \<in> C \<Longrightarrow> norm x = 1"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6141
             and "independent C" "finite C" "card C = dim T" "span C = T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6142
    by (metis orthonormal_basis_subspace [OF T] independent_finite)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6143
  obtain fb where "bij_betw fb B C"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6144
    by (metis \<open>finite B\<close> \<open>finite C\<close> bij_betw_iff_card \<open>card B = dim S\<close> \<open>card C = dim T\<close> d)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6145
  then have pairwise_orth_fb: "pairwise (\<lambda>v j. orthogonal (fb v) (fb j)) B"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6146
    using Corth
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6147
    apply (auto simp: pairwise_def orthogonal_clauses bij_betw_def)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6148
    by (meson subsetD image_eqI inj_on_def)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6149
  obtain f where "linear f" and ffb: "\<And>x. x \<in> B \<Longrightarrow> f x = fb x"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6150
    using linear_independent_extend \<open>independent B\<close> by fastforce
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6151
  define gb where "gb \<equiv> inv_into B fb"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6152
  then have pairwise_orth_gb: "pairwise (\<lambda>v j. orthogonal (gb v) (gb j)) C"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6153
    using Borth
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6154
    apply (auto simp: pairwise_def orthogonal_clauses bij_betw_def)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6155
    by (metis \<open>bij_betw fb B C\<close> bij_betw_imp_surj_on bij_betw_inv_into_right inv_into_into)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6156
  obtain g where "linear g" and ggb: "\<And>x. x \<in> C \<Longrightarrow> g x = gb x"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6157
    using linear_independent_extend \<open>independent C\<close> by fastforce
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6158
  have "f ` S \<subseteq> T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6159
    by (metis \<open>bij_betw fb B C\<close> bij_betw_imp_surj_on eq_iff ffb  \<open>linear f\<close> \<open>span B = S\<close> \<open>span C = T\<close> image_cong span_linear_image)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6160
  have [simp]: "\<And>x. x \<in> B \<Longrightarrow> norm (fb x) = norm x"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6161
    using B1 C1 \<open>bij_betw fb B C\<close> bij_betw_imp_surj_on by fastforce
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6162
  have f [simp]: "norm (f x) = norm x" "g (f x) = x" if "x \<in> S" for x
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6163
  proof -
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6164
    obtain a where x: "x = (\<Sum>v \<in> B. a v *\<^sub>R v)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6165
      using \<open>finite B\<close> \<open>span B = S\<close> \<open>x \<in> S\<close> span_finite by fastforce
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6166
    have "f x = (\<Sum>v \<in> B. f (a v *\<^sub>R v))"
64267
b9a1486e79be setsum -> sum
nipkow
parents: 64122
diff changeset
  6167
      using linear_sum [OF \<open>linear f\<close>] x by auto
63114
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6168
    also have "... = (\<Sum>v \<in> B. a v *\<^sub>R f v)"
64267
b9a1486e79be setsum -> sum
nipkow
parents: 64122
diff changeset
  6169
      using \<open>linear f\<close> by (simp add: linear_sum linear.scaleR)
63114
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6170
    also have "... = (\<Sum>v \<in> B. a v *\<^sub>R fb v)"
64267
b9a1486e79be setsum -> sum
nipkow
parents: 64122
diff changeset
  6171
      by (simp add: ffb cong: sum.cong)
63114
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6172
    finally have *: "f x = (\<Sum>v\<in>B. a v *\<^sub>R fb v)" .
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6173
    then have "(norm (f x))\<^sup>2 = (norm (\<Sum>v\<in>B. a v *\<^sub>R fb v))\<^sup>2" by simp
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6174
    also have "... = (\<Sum>v\<in>B. norm ((a v *\<^sub>R fb v))^2)"
64267
b9a1486e79be setsum -> sum
nipkow
parents: 64122
diff changeset
  6175
      apply (rule norm_sum_Pythagorean [OF \<open>finite B\<close>])
63114
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6176
      apply (rule pairwise_ortho_scaleR [OF pairwise_orth_fb])
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6177
      done
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6178
    also have "... = (norm x)\<^sup>2"
64267
b9a1486e79be setsum -> sum
nipkow
parents: 64122
diff changeset
  6179
      by (simp add: x pairwise_ortho_scaleR Borth norm_sum_Pythagorean [OF \<open>finite B\<close>])
63114
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6180
    finally show "norm (f x) = norm x"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6181
      by (simp add: norm_eq_sqrt_inner)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6182
    have "g (f x) = g (\<Sum>v\<in>B. a v *\<^sub>R fb v)" by (simp add: *)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6183
    also have "... = (\<Sum>v\<in>B. g (a v *\<^sub>R fb v))"
64267
b9a1486e79be setsum -> sum
nipkow
parents: 64122
diff changeset
  6184
      using \<open>linear g\<close> by (simp add: linear_sum linear.scaleR)
63114
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6185
    also have "... = (\<Sum>v\<in>B. a v *\<^sub>R g (fb v))"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6186
      by (simp add: \<open>linear g\<close> linear.scaleR)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6187
    also have "... = (\<Sum>v\<in>B. a v *\<^sub>R v)"
64267
b9a1486e79be setsum -> sum
nipkow
parents: 64122
diff changeset
  6188
      apply (rule sum.cong [OF refl])
63114
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6189
      using \<open>bij_betw fb B C\<close> gb_def bij_betwE bij_betw_inv_into_left gb_def ggb by fastforce
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6190
    also have "... = x"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6191
      using x by blast
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6192
    finally show "g (f x) = x" .
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6193
  qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6194
  have [simp]: "\<And>x. x \<in> C \<Longrightarrow> norm (gb x) = norm x"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6195
    by (metis B1 C1 \<open>bij_betw fb B C\<close> bij_betw_imp_surj_on gb_def inv_into_into)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6196
  have g [simp]: "f (g x) = x" if "x \<in> T" for x
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6197
  proof -
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6198
    obtain a where x: "x = (\<Sum>v \<in> C. a v *\<^sub>R v)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6199
      using \<open>finite C\<close> \<open>span C = T\<close> \<open>x \<in> T\<close> span_finite by fastforce
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6200
    have "g x = (\<Sum>v \<in> C. g (a v *\<^sub>R v))"
64267
b9a1486e79be setsum -> sum
nipkow
parents: 64122
diff changeset
  6201
      using linear_sum [OF \<open>linear g\<close>] x by auto
63114
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6202
    also have "... = (\<Sum>v \<in> C. a v *\<^sub>R g v)"
64267
b9a1486e79be setsum -> sum
nipkow
parents: 64122
diff changeset
  6203
      using \<open>linear g\<close> by (simp add: linear_sum linear.scaleR)
63114
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6204
    also have "... = (\<Sum>v \<in> C. a v *\<^sub>R gb v)"
64267
b9a1486e79be setsum -> sum
nipkow
parents: 64122
diff changeset
  6205
      by (simp add: ggb cong: sum.cong)
63114
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6206
    finally have "f (g x) = f (\<Sum>v\<in>C. a v *\<^sub>R gb v)" by simp
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6207
    also have "... = (\<Sum>v\<in>C. f (a v *\<^sub>R gb v))"
64267
b9a1486e79be setsum -> sum
nipkow
parents: 64122
diff changeset
  6208
      using \<open>linear f\<close> by (simp add: linear_sum linear.scaleR)
63114
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6209
    also have "... = (\<Sum>v\<in>C. a v *\<^sub>R f (gb v))"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6210
      by (simp add: \<open>linear f\<close> linear.scaleR)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6211
    also have "... = (\<Sum>v\<in>C. a v *\<^sub>R v)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6212
      using \<open>bij_betw fb B C\<close>
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6213
      by (simp add: bij_betw_def gb_def bij_betw_inv_into_right ffb inv_into_into)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6214
    also have "... = x"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6215
      using x by blast
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6216
    finally show "f (g x) = x" .
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6217
  qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6218
  have gim: "g ` T = S"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6219
    by (metis (no_types, lifting) \<open>f ` S \<subseteq> T\<close> \<open>linear g\<close> \<open>span B = S\<close> \<open>span C = T\<close> d dim_eq_span dim_image_le f(2) image_subset_iff span_linear_image span_span subsetI)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6220
  have fim: "f ` S = T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6221
    using \<open>g ` T = S\<close> image_iff by fastforce
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6222
  have [simp]: "norm (g x) = norm x" if "x \<in> T" for x
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6223
    using fim that by auto
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6224
  show ?thesis
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6225
    apply (rule that [OF \<open>linear f\<close> \<open>linear g\<close>])
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6226
    apply (simp_all add: fim gim)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6227
    done
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6228
qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6229
63928
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63881
diff changeset
  6230
corollary isometry_subspaces:
63114
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6231
  fixes S :: "'a::euclidean_space set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6232
    and T :: "'b::euclidean_space set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6233
  assumes S: "subspace S"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6234
      and T: "subspace T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6235
      and d: "dim S = dim T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6236
  obtains f where "linear f" "f ` S = T" "\<And>x. x \<in> S \<Longrightarrow> norm(f x) = norm x"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6237
using isometries_subspaces [OF assms]
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6238
by metis
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6239
63928
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63881
diff changeset
  6240
corollary isomorphisms_UNIV_UNIV:
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63881
diff changeset
  6241
  assumes "DIM('M) = DIM('N)"
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63881
diff changeset
  6242
  obtains f::"'M::euclidean_space \<Rightarrow>'N::euclidean_space" and g
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63881
diff changeset
  6243
  where "linear f" "linear g"
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63881
diff changeset
  6244
                    "\<And>x. norm(f x) = norm x" "\<And>y. norm(g y) = norm y"
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63881
diff changeset
  6245
                    "\<And>x. g(f x) = x" "\<And>y. f(g y) = y"
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63881
diff changeset
  6246
  using assms by (auto simp: dim_UNIV intro: isometries_subspaces [of "UNIV::'M set" "UNIV::'N set"])
d81fb5b46a5c new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents: 63881
diff changeset
  6247
63114
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6248
lemma homeomorphic_subspaces:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6249
  fixes S :: "'a::euclidean_space set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6250
    and T :: "'b::euclidean_space set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6251
  assumes S: "subspace S"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6252
      and T: "subspace T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6253
      and d: "dim S = dim T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6254
    shows "S homeomorphic T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6255
proof -
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6256
  obtain f g where "linear f" "linear g" "f ` S = T" "g ` T = S"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6257
                   "\<And>x. x \<in> S \<Longrightarrow> g(f x) = x" "\<And>x. x \<in> T \<Longrightarrow> f(g x) = x"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6258
    by (blast intro: isometries_subspaces [OF assms])
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6259
  then show ?thesis
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6260
    apply (simp add: homeomorphic_def homeomorphism_def)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6261
    apply (rule_tac x=f in exI)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6262
    apply (rule_tac x=g in exI)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6263
    apply (auto simp: linear_continuous_on linear_conv_bounded_linear)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6264
    done
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6265
qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6266
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6267
lemma homeomorphic_affine_sets:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6268
  assumes "affine S" "affine T" "aff_dim S = aff_dim T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6269
    shows "S homeomorphic T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6270
proof (cases "S = {} \<or> T = {}")
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6271
  case True  with assms aff_dim_empty homeomorphic_empty show ?thesis
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6272
    by metis
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6273
next
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6274
  case False
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6275
  then obtain a b where ab: "a \<in> S" "b \<in> T" by auto
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6276
  then have ss: "subspace (op + (- a) ` S)" "subspace (op + (- b) ` T)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6277
    using affine_diffs_subspace assms by blast+
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6278
  have dd: "dim (op + (- a) ` S) = dim (op + (- b) ` T)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6279
    using assms ab  by (simp add: aff_dim_eq_dim  [OF hull_inc] image_def)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6280
  have "S homeomorphic (op + (- a) ` S)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6281
    by (simp add: homeomorphic_translation)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6282
  also have "... homeomorphic (op + (- b) ` T)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6283
    by (rule homeomorphic_subspaces [OF ss dd])
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6284
  also have "... homeomorphic T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6285
    using homeomorphic_sym homeomorphic_translation by auto
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6286
  finally show ?thesis .
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6287
qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  6288
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6289
subsection\<open>Retracts, in a general sense, preserve (co)homotopic triviality)\<close>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6290
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6291
locale Retracts =
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6292
  fixes s h t k
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6293
  assumes conth: "continuous_on s h"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6294
      and imh: "h ` s = t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6295
      and contk: "continuous_on t k"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6296
      and imk: "k ` t \<subseteq> s"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6297
      and idhk: "\<And>y. y \<in> t \<Longrightarrow> h(k y) = y"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6298
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6299
begin
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6300
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6301
lemma homotopically_trivial_retraction_gen:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6302
  assumes P: "\<And>f. \<lbrakk>continuous_on u f; f ` u \<subseteq> t; Q f\<rbrakk> \<Longrightarrow> P(k o f)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6303
      and Q: "\<And>f. \<lbrakk>continuous_on u f; f ` u \<subseteq> s; P f\<rbrakk> \<Longrightarrow> Q(h o f)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6304
      and Qeq: "\<And>h k. (\<And>x. x \<in> u \<Longrightarrow> h x = k x) \<Longrightarrow> Q h = Q k"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6305
      and hom: "\<And>f g. \<lbrakk>continuous_on u f; f ` u \<subseteq> s; P f;
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6306
                       continuous_on u g; g ` u \<subseteq> s; P g\<rbrakk>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6307
                       \<Longrightarrow> homotopic_with P u s f g"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6308
      and contf: "continuous_on u f" and imf: "f ` u \<subseteq> t" and Qf: "Q f"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6309
      and contg: "continuous_on u g" and img: "g ` u \<subseteq> t" and Qg: "Q g"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6310
    shows "homotopic_with Q u t f g"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6311
proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6312
  have feq: "\<And>x. x \<in> u \<Longrightarrow> (h \<circ> (k \<circ> f)) x = f x" using idhk imf by auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6313
  have geq: "\<And>x. x \<in> u \<Longrightarrow> (h \<circ> (k \<circ> g)) x = g x" using idhk img by auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6314
  have "continuous_on u (k \<circ> f)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6315
    using contf continuous_on_compose continuous_on_subset contk imf by blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6316
  moreover have "(k \<circ> f) ` u \<subseteq> s"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6317
    using imf imk by fastforce
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6318
  moreover have "P (k \<circ> f)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6319
    by (simp add: P Qf contf imf)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6320
  moreover have "continuous_on u (k \<circ> g)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6321
    using contg continuous_on_compose continuous_on_subset contk img by blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6322
  moreover have "(k \<circ> g) ` u \<subseteq> s"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6323
    using img imk by fastforce
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6324
  moreover have "P (k \<circ> g)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6325
    by (simp add: P Qg contg img)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6326
  ultimately have "homotopic_with P u s (k \<circ> f) (k \<circ> g)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6327
    by (rule hom)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6328
  then have "homotopic_with Q u t (h \<circ> (k \<circ> f)) (h \<circ> (k \<circ> g))"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6329
    apply (rule homotopic_with_compose_continuous_left [OF homotopic_with_mono])
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6330
    using Q by (auto simp: conth imh)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6331
  then show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6332
    apply (rule homotopic_with_eq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6333
    apply (metis feq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6334
    apply (metis geq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6335
    apply (metis Qeq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6336
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6337
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6338
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6339
lemma homotopically_trivial_retraction_null_gen:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6340
  assumes P: "\<And>f. \<lbrakk>continuous_on u f; f ` u \<subseteq> t; Q f\<rbrakk> \<Longrightarrow> P(k o f)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6341
      and Q: "\<And>f. \<lbrakk>continuous_on u f; f ` u \<subseteq> s; P f\<rbrakk> \<Longrightarrow> Q(h o f)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6342
      and Qeq: "\<And>h k. (\<And>x. x \<in> u \<Longrightarrow> h x = k x) \<Longrightarrow> Q h = Q k"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6343
      and hom: "\<And>f. \<lbrakk>continuous_on u f; f ` u \<subseteq> s; P f\<rbrakk>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6344
                     \<Longrightarrow> \<exists>c. homotopic_with P u s f (\<lambda>x. c)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6345
      and contf: "continuous_on u f" and imf:"f ` u \<subseteq> t" and Qf: "Q f"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6346
  obtains c where "homotopic_with Q u t f (\<lambda>x. c)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6347
proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6348
  have feq: "\<And>x. x \<in> u \<Longrightarrow> (h \<circ> (k \<circ> f)) x = f x" using idhk imf by auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6349
  have "continuous_on u (k \<circ> f)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6350
    using contf continuous_on_compose continuous_on_subset contk imf by blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6351
  moreover have "(k \<circ> f) ` u \<subseteq> s"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6352
    using imf imk by fastforce
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6353
  moreover have "P (k \<circ> f)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6354
    by (simp add: P Qf contf imf)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6355
  ultimately obtain c where "homotopic_with P u s (k \<circ> f) (\<lambda>x. c)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6356
    by (metis hom)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6357
  then have "homotopic_with Q u t (h \<circ> (k \<circ> f)) (h o (\<lambda>x. c))"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6358
    apply (rule homotopic_with_compose_continuous_left [OF homotopic_with_mono])
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6359
    using Q by (auto simp: conth imh)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6360
  then show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6361
    apply (rule_tac c = "h c" in that)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6362
    apply (erule homotopic_with_eq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6363
    apply (metis feq, simp)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6364
    apply (metis Qeq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6365
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6366
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6367
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6368
lemma cohomotopically_trivial_retraction_gen:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6369
  assumes P: "\<And>f. \<lbrakk>continuous_on t f; f ` t \<subseteq> u; Q f\<rbrakk> \<Longrightarrow> P(f o h)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6370
      and Q: "\<And>f. \<lbrakk>continuous_on s f; f ` s \<subseteq> u; P f\<rbrakk> \<Longrightarrow> Q(f o k)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6371
      and Qeq: "\<And>h k. (\<And>x. x \<in> t \<Longrightarrow> h x = k x) \<Longrightarrow> Q h = Q k"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6372
      and hom: "\<And>f g. \<lbrakk>continuous_on s f; f ` s \<subseteq> u; P f;
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6373
                       continuous_on s g; g ` s \<subseteq> u; P g\<rbrakk>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6374
                       \<Longrightarrow> homotopic_with P s u f g"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6375
      and contf: "continuous_on t f" and imf: "f ` t \<subseteq> u" and Qf: "Q f"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6376
      and contg: "continuous_on t g" and img: "g ` t \<subseteq> u" and Qg: "Q g"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6377
    shows "homotopic_with Q t u f g"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6378
proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6379
  have feq: "\<And>x. x \<in> t \<Longrightarrow> (f \<circ> h \<circ> k) x = f x" using idhk imf by auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6380
  have geq: "\<And>x. x \<in> t \<Longrightarrow> (g \<circ> h \<circ> k) x = g x" using idhk img by auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6381
  have "continuous_on s (f \<circ> h)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6382
    using contf conth continuous_on_compose imh by blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6383
  moreover have "(f \<circ> h) ` s \<subseteq> u"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6384
    using imf imh by fastforce
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6385
  moreover have "P (f \<circ> h)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6386
    by (simp add: P Qf contf imf)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6387
  moreover have "continuous_on s (g o h)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6388
    using contg continuous_on_compose continuous_on_subset conth imh by blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6389
  moreover have "(g \<circ> h) ` s \<subseteq> u"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6390
    using img imh by fastforce
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6391
  moreover have "P (g \<circ> h)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6392
    by (simp add: P Qg contg img)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6393
  ultimately have "homotopic_with P s u (f o h) (g \<circ> h)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6394
    by (rule hom)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6395
  then have "homotopic_with Q t u (f o h o k) (g \<circ> h o k)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6396
    apply (rule homotopic_with_compose_continuous_right [OF homotopic_with_mono])
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6397
    using Q by (auto simp: contk imk)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6398
  then show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6399
    apply (rule homotopic_with_eq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6400
    apply (metis feq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6401
    apply (metis geq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6402
    apply (metis Qeq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6403
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6404
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6405
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6406
lemma cohomotopically_trivial_retraction_null_gen:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6407
  assumes P: "\<And>f. \<lbrakk>continuous_on t f; f ` t \<subseteq> u; Q f\<rbrakk> \<Longrightarrow> P(f o h)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6408
      and Q: "\<And>f. \<lbrakk>continuous_on s f; f ` s \<subseteq> u; P f\<rbrakk> \<Longrightarrow> Q(f o k)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6409
      and Qeq: "\<And>h k. (\<And>x. x \<in> t \<Longrightarrow> h x = k x) \<Longrightarrow> Q h = Q k"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6410
      and hom: "\<And>f g. \<lbrakk>continuous_on s f; f ` s \<subseteq> u; P f\<rbrakk>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6411
                       \<Longrightarrow> \<exists>c. homotopic_with P s u f (\<lambda>x. c)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6412
      and contf: "continuous_on t f" and imf: "f ` t \<subseteq> u" and Qf: "Q f"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6413
  obtains c where "homotopic_with Q t u f (\<lambda>x. c)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6414
proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6415
  have feq: "\<And>x. x \<in> t \<Longrightarrow> (f \<circ> h \<circ> k) x = f x" using idhk imf by auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6416
  have "continuous_on s (f \<circ> h)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6417
    using contf conth continuous_on_compose imh by blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6418
  moreover have "(f \<circ> h) ` s \<subseteq> u"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6419
    using imf imh by fastforce
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6420
  moreover have "P (f \<circ> h)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6421
    by (simp add: P Qf contf imf)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6422
  ultimately obtain c where "homotopic_with P s u (f o h) (\<lambda>x. c)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6423
    by (metis hom)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6424
  then have "homotopic_with Q t u (f o h o k) ((\<lambda>x. c) o k)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6425
    apply (rule homotopic_with_compose_continuous_right [OF homotopic_with_mono])
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6426
    using Q by (auto simp: contk imk)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6427
  then show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6428
    apply (rule_tac c = c in that)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6429
    apply (erule homotopic_with_eq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6430
    apply (metis feq, simp)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6431
    apply (metis Qeq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6432
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6433
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6434
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  6435
end
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6436
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6437
lemma simply_connected_retraction_gen:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6438
  shows "\<lbrakk>simply_connected S; continuous_on S h; h ` S = T;
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6439
          continuous_on T k; k ` T \<subseteq> S; \<And>y. y \<in> T \<Longrightarrow> h(k y) = y\<rbrakk>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6440
        \<Longrightarrow> simply_connected T"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6441
apply (simp add: simply_connected_def path_def path_image_def homotopic_loops_def, clarify)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6442
apply (rule Retracts.homotopically_trivial_retraction_gen
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6443
        [of S h _ k _ "\<lambda>p. pathfinish p = pathstart p"  "\<lambda>p. pathfinish p = pathstart p"])
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6444
apply (simp_all add: Retracts_def pathfinish_def pathstart_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6445
done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6446
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6447
lemma homeomorphic_simply_connected:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6448
    "\<lbrakk>S homeomorphic T; simply_connected S\<rbrakk> \<Longrightarrow> simply_connected T"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6449
  by (auto simp: homeomorphic_def homeomorphism_def intro: simply_connected_retraction_gen)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6450
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6451
lemma homeomorphic_simply_connected_eq:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6452
    "S homeomorphic T \<Longrightarrow> (simply_connected S \<longleftrightarrow> simply_connected T)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6453
  by (metis homeomorphic_simply_connected homeomorphic_sym)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  6454
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6455
subsection\<open>Homotopy equivalence\<close>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6456
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6457
definition homotopy_eqv :: "'a::topological_space set \<Rightarrow> 'b::topological_space set \<Rightarrow> bool"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6458
             (infix "homotopy'_eqv" 50)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6459
  where "S homotopy_eqv T \<equiv>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6460
        \<exists>f g. continuous_on S f \<and> f ` S \<subseteq> T \<and>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6461
              continuous_on T g \<and> g ` T \<subseteq> S \<and>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6462
              homotopic_with (\<lambda>x. True) S S (g o f) id \<and>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6463
              homotopic_with (\<lambda>x. True) T T (f o g) id"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6464
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6465
lemma homeomorphic_imp_homotopy_eqv: "S homeomorphic T \<Longrightarrow> S homotopy_eqv T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6466
  unfolding homeomorphic_def homotopy_eqv_def homeomorphism_def
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6467
  by (fastforce intro!: homotopic_with_equal continuous_on_compose)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6468
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6469
lemma homotopy_eqv_refl: "S homotopy_eqv S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6470
  by (rule homeomorphic_imp_homotopy_eqv homeomorphic_refl)+
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6471
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6472
lemma homotopy_eqv_sym: "S homotopy_eqv T \<longleftrightarrow> T homotopy_eqv S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6473
  by (auto simp: homotopy_eqv_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6474
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6475
lemma homotopy_eqv_trans [trans]:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6476
    fixes S :: "'a::real_normed_vector set" and U :: "'c::real_normed_vector set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6477
  assumes ST: "S homotopy_eqv T" and TU: "T homotopy_eqv U"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6478
    shows "S homotopy_eqv U"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6479
proof -
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6480
  obtain f1 g1 where f1: "continuous_on S f1" "f1 ` S \<subseteq> T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6481
                 and g1: "continuous_on T g1" "g1 ` T \<subseteq> S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6482
                 and hom1: "homotopic_with (\<lambda>x. True) S S (g1 o f1) id"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6483
                           "homotopic_with (\<lambda>x. True) T T (f1 o g1) id"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6484
    using ST by (auto simp: homotopy_eqv_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6485
  obtain f2 g2 where f2: "continuous_on T f2" "f2 ` T \<subseteq> U"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6486
                 and g2: "continuous_on U g2" "g2 ` U \<subseteq> T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6487
                 and hom2: "homotopic_with (\<lambda>x. True) T T (g2 o f2) id"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6488
                           "homotopic_with (\<lambda>x. True) U U (f2 o g2) id"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6489
    using TU by (auto simp: homotopy_eqv_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6490
  have "homotopic_with (\<lambda>f. True) S T (g2 \<circ> f2 \<circ> f1) (id \<circ> f1)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6491
    by (rule homotopic_with_compose_continuous_right hom2 f1)+
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6492
  then have "homotopic_with (\<lambda>f. True) S T (g2 \<circ> (f2 \<circ> f1)) (id \<circ> f1)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6493
    by (simp add: o_assoc)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6494
  then have "homotopic_with (\<lambda>x. True) S S
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6495
         (g1 \<circ> (g2 \<circ> (f2 \<circ> f1))) (g1 o (id o f1))"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6496
    by (simp add: g1 homotopic_with_compose_continuous_left)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6497
  moreover have "homotopic_with (\<lambda>x. True) S S (g1 o id o f1) id"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6498
    using hom1 by simp
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6499
  ultimately have SS: "homotopic_with (\<lambda>x. True) S S (g1 \<circ> g2 \<circ> (f2 \<circ> f1)) id"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6500
    apply (simp add: o_assoc)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6501
    apply (blast intro: homotopic_with_trans)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6502
    done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6503
  have "homotopic_with (\<lambda>f. True) U T (f1 \<circ> g1 \<circ> g2) (id \<circ> g2)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6504
    by (rule homotopic_with_compose_continuous_right hom1 g2)+
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6505
  then have "homotopic_with (\<lambda>f. True) U T (f1 \<circ> (g1 \<circ> g2)) (id \<circ> g2)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6506
    by (simp add: o_assoc)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6507
  then have "homotopic_with (\<lambda>x. True) U U
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6508
         (f2 \<circ> (f1 \<circ> (g1 \<circ> g2))) (f2 o (id o g2))"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6509
    by (simp add: f2 homotopic_with_compose_continuous_left)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6510
  moreover have "homotopic_with (\<lambda>x. True) U U (f2 o id o g2) id"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6511
    using hom2 by simp
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6512
  ultimately have UU: "homotopic_with (\<lambda>x. True) U U (f2 \<circ> f1 \<circ> (g1 \<circ> g2)) id"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6513
    apply (simp add: o_assoc)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6514
    apply (blast intro: homotopic_with_trans)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6515
    done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6516
  show ?thesis
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6517
    unfolding homotopy_eqv_def
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6518
    apply (rule_tac x = "f2 \<circ> f1" in exI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6519
    apply (rule_tac x = "g1 \<circ> g2" in exI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6520
    apply (intro conjI continuous_on_compose SS UU)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6521
    using f1 f2 g1 g2  apply (force simp: elim!: continuous_on_subset)+
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6522
    done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6523
qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6524
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6525
lemma homotopy_eqv_inj_linear_image:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6526
  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
  6527
  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
  6528
    shows "(f ` S) homotopy_eqv S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6529
apply (rule homeomorphic_imp_homotopy_eqv)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6530
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
  6531
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6532
lemma homotopy_eqv_translation:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6533
    fixes S :: "'a::real_normed_vector set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6534
    shows "op + a ` S homotopy_eqv S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6535
  apply (rule homeomorphic_imp_homotopy_eqv)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6536
  using homeomorphic_translation homeomorphic_sym by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6537
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6538
lemma homotopy_eqv_homotopic_triviality_imp:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6539
  fixes S :: "'a::real_normed_vector set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6540
    and T :: "'b::real_normed_vector set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6541
    and U :: "'c::real_normed_vector set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6542
  assumes "S homotopy_eqv T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6543
      and f: "continuous_on U f" "f ` U \<subseteq> T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6544
      and g: "continuous_on U g" "g ` U \<subseteq> T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6545
      and homUS: "\<And>f g. \<lbrakk>continuous_on U f; f ` U \<subseteq> S;
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6546
                         continuous_on U g; g ` U \<subseteq> S\<rbrakk>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6547
                         \<Longrightarrow> homotopic_with (\<lambda>x. True) U S f g"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6548
    shows "homotopic_with (\<lambda>x. True) U T f g"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6549
proof -
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6550
  obtain h k where h: "continuous_on S h" "h ` S \<subseteq> T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6551
               and k: "continuous_on T k" "k ` T \<subseteq> S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6552
               and hom: "homotopic_with (\<lambda>x. True) S S (k o h) id"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6553
                        "homotopic_with (\<lambda>x. True) T T (h o k) id"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6554
    using assms by (auto simp: homotopy_eqv_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6555
  have "homotopic_with (\<lambda>f. True) U S (k \<circ> f) (k \<circ> g)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6556
    apply (rule homUS)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6557
    using f g k
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6558
    apply (safe intro!: continuous_on_compose h k f elim!: continuous_on_subset)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6559
    apply (force simp: o_def)+
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6560
    done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6561
  then have "homotopic_with (\<lambda>x. True) U T (h o (k o f)) (h o (k o g))"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6562
    apply (rule homotopic_with_compose_continuous_left)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6563
    apply (simp_all add: h)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6564
    done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6565
  moreover have "homotopic_with (\<lambda>x. True) U T (h o k o f) (id o f)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6566
    apply (rule homotopic_with_compose_continuous_right [where X=T and Y=T])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6567
    apply (auto simp: hom f)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6568
    done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6569
  moreover have "homotopic_with (\<lambda>x. True) U T (h o k o g) (id o g)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6570
    apply (rule homotopic_with_compose_continuous_right [where X=T and Y=T])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6571
    apply (auto simp: hom g)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6572
    done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6573
  ultimately show "homotopic_with (\<lambda>x. True) U T f g"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6574
    apply (simp add: o_assoc)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6575
    using homotopic_with_trans homotopic_with_sym by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6576
qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6577
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6578
lemma homotopy_eqv_homotopic_triviality:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6579
  fixes S :: "'a::real_normed_vector set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6580
    and T :: "'b::real_normed_vector set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6581
    and U :: "'c::real_normed_vector set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6582
  assumes "S homotopy_eqv T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6583
    shows "(\<forall>f g. continuous_on U f \<and> f ` U \<subseteq> S \<and>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6584
                   continuous_on U g \<and> g ` U \<subseteq> S
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6585
                   \<longrightarrow> homotopic_with (\<lambda>x. True) U S f g) \<longleftrightarrow>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6586
           (\<forall>f g. continuous_on U f \<and> f ` U \<subseteq> T \<and>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6587
                  continuous_on U g \<and> g ` U \<subseteq> T
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6588
                  \<longrightarrow> homotopic_with (\<lambda>x. True) U T f g)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6589
apply (rule iffI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6590
apply (metis assms homotopy_eqv_homotopic_triviality_imp)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6591
by (metis (no_types) assms homotopy_eqv_homotopic_triviality_imp homotopy_eqv_sym)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6592
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6593
lemma homotopy_eqv_cohomotopic_triviality_null_imp:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6594
  fixes S :: "'a::real_normed_vector set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6595
    and T :: "'b::real_normed_vector set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6596
    and U :: "'c::real_normed_vector set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6597
  assumes "S homotopy_eqv T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6598
      and f: "continuous_on T f" "f ` T \<subseteq> U"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6599
      and homSU: "\<And>f. \<lbrakk>continuous_on S f; f ` S \<subseteq> U\<rbrakk>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6600
                      \<Longrightarrow> \<exists>c. homotopic_with (\<lambda>x. True) S U f (\<lambda>x. c)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6601
  obtains c where "homotopic_with (\<lambda>x. True) T U f (\<lambda>x. c)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6602
proof -
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6603
  obtain h k where h: "continuous_on S h" "h ` S \<subseteq> T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6604
               and k: "continuous_on T k" "k ` T \<subseteq> S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6605
               and hom: "homotopic_with (\<lambda>x. True) S S (k o h) id"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6606
                        "homotopic_with (\<lambda>x. True) T T (h o k) id"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6607
    using assms by (auto simp: homotopy_eqv_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6608
  obtain c where "homotopic_with (\<lambda>x. True) S U (f \<circ> h) (\<lambda>x. c)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6609
    apply (rule exE [OF homSU [of "f \<circ> h"]])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6610
    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
  6611
    using h f  apply (force elim!: continuous_on_subset)+
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6612
    done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6613
  then have "homotopic_with (\<lambda>x. True) T U ((f o h) o k) ((\<lambda>x. c) o k)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6614
    apply (rule homotopic_with_compose_continuous_right [where X=S])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6615
    using k by auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6616
  moreover have "homotopic_with (\<lambda>x. True) T U (f \<circ> id) (f \<circ> (h \<circ> k))"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6617
    apply (rule homotopic_with_compose_continuous_left [where Y=T])
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6618
      apply (simp add: hom homotopic_with_symD)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6619
     using f apply auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6620
    done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6621
  ultimately show ?thesis
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6622
    apply (rule_tac c=c in that)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6623
    apply (simp add: o_def)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6624
    using homotopic_with_trans by blast
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6625
qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6626
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6627
lemma homotopy_eqv_cohomotopic_triviality_null:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6628
  fixes S :: "'a::real_normed_vector set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6629
    and T :: "'b::real_normed_vector set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6630
    and U :: "'c::real_normed_vector set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6631
  assumes "S homotopy_eqv T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6632
    shows "(\<forall>f. continuous_on S f \<and> f ` S \<subseteq> U
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6633
                \<longrightarrow> (\<exists>c. homotopic_with (\<lambda>x. True) S U f (\<lambda>x. c))) \<longleftrightarrow>
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6634
           (\<forall>f. continuous_on T f \<and> f ` T \<subseteq> U
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6635
                \<longrightarrow> (\<exists>c. homotopic_with (\<lambda>x. True) T U f (\<lambda>x. c)))"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6636
apply (rule iffI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6637
apply (metis assms homotopy_eqv_cohomotopic_triviality_null_imp)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6638
by (metis assms homotopy_eqv_cohomotopic_triviality_null_imp homotopy_eqv_sym)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6639
64006
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6640
lemma homotopy_eqv_homotopic_triviality_null_imp:
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6641
  fixes S :: "'a::real_normed_vector set"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6642
    and T :: "'b::real_normed_vector set"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6643
    and U :: "'c::real_normed_vector set"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6644
  assumes "S homotopy_eqv T"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6645
      and f: "continuous_on U f" "f ` U \<subseteq> T"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6646
      and homSU: "\<And>f. \<lbrakk>continuous_on U f; f ` U \<subseteq> S\<rbrakk>
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6647
                      \<Longrightarrow> \<exists>c. homotopic_with (\<lambda>x. True) U S f (\<lambda>x. c)"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6648
    shows "\<exists>c. homotopic_with (\<lambda>x. True) U T f (\<lambda>x. c)"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6649
proof -
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6650
  obtain h k where h: "continuous_on S h" "h ` S \<subseteq> T"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6651
               and k: "continuous_on T k" "k ` T \<subseteq> S"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6652
               and hom: "homotopic_with (\<lambda>x. True) S S (k \<circ> h) id"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6653
                        "homotopic_with (\<lambda>x. True) T T (h \<circ> k) id"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6654
    using assms by (auto simp: homotopy_eqv_def)
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6655
  obtain c::'a where "homotopic_with (\<lambda>x. True) U S (k \<circ> f) (\<lambda>x. c)"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6656
    apply (rule exE [OF homSU [of "k \<circ> f"]])
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6657
    apply (intro continuous_on_compose h)
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6658
    using k f  apply (force elim!: continuous_on_subset)+
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6659
    done
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6660
  then have "homotopic_with (\<lambda>x. True) U T (h \<circ> (k \<circ> f)) (h \<circ> (\<lambda>x. c))"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6661
    apply (rule homotopic_with_compose_continuous_left [where Y=S])
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6662
    using h by auto
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6663
  moreover have "homotopic_with (\<lambda>x. True) U T (id \<circ> f) ((h \<circ> k) \<circ> f)"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6664
    apply (rule homotopic_with_compose_continuous_right [where X=T])
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6665
      apply (simp add: hom homotopic_with_symD)
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6666
     using f apply auto
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6667
    done
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6668
  ultimately show ?thesis
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6669
    using homotopic_with_trans by (fastforce simp add: o_def)
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6670
qed
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6671
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6672
lemma homotopy_eqv_homotopic_triviality_null:
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6673
  fixes S :: "'a::real_normed_vector set"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6674
    and T :: "'b::real_normed_vector set"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6675
    and U :: "'c::real_normed_vector set"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6676
  assumes "S homotopy_eqv T"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6677
    shows "(\<forall>f. continuous_on U f \<and> f ` U \<subseteq> S
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6678
                  \<longrightarrow> (\<exists>c. homotopic_with (\<lambda>x. True) U S f (\<lambda>x. c))) \<longleftrightarrow>
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6679
           (\<forall>f. continuous_on U f \<and> f ` U \<subseteq> T
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6680
                  \<longrightarrow> (\<exists>c. homotopic_with (\<lambda>x. True) U T f (\<lambda>x. c)))"
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6681
apply (rule iffI)
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6682
apply (metis assms homotopy_eqv_homotopic_triviality_null_imp)
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6683
by (metis assms homotopy_eqv_homotopic_triviality_null_imp homotopy_eqv_sym)
0de4736dad8b new theorems including the theory FurtherTopology
paulson <lp15@cam.ac.uk>
parents: 63978
diff changeset
  6684
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6685
lemma homotopy_eqv_contractible_sets:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6686
  fixes S :: "'a::real_normed_vector set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6687
    and T :: "'b::real_normed_vector set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6688
  assumes "contractible S" "contractible T" "S = {} \<longleftrightarrow> T = {}"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6689
    shows "S homotopy_eqv T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6690
proof (cases "S = {}")
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6691
  case True with assms show ?thesis
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6692
    by (simp add: homeomorphic_imp_homotopy_eqv)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6693
next
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6694
  case False
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6695
  with assms obtain a b where "a \<in> S" "b \<in> T"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6696
    by auto
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6697
  then show ?thesis
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6698
    unfolding homotopy_eqv_def
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6699
    apply (rule_tac x="\<lambda>x. b" in exI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6700
    apply (rule_tac x="\<lambda>x. a" in exI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6701
    apply (intro assms conjI continuous_on_id' homotopic_into_contractible)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6702
    apply (auto simp: o_def continuous_on_const)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6703
    done
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6704
qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6705
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6706
lemma homotopy_eqv_empty1 [simp]:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6707
  fixes S :: "'a::real_normed_vector set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6708
  shows "S homotopy_eqv ({}::'b::real_normed_vector set) \<longleftrightarrow> S = {}"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6709
apply (rule iffI)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6710
using homotopy_eqv_def apply fastforce
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6711
by (simp add: homotopy_eqv_contractible_sets contractible_empty)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6712
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6713
lemma homotopy_eqv_empty2 [simp]:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6714
  fixes S :: "'a::real_normed_vector set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6715
  shows "({}::'b::real_normed_vector set) homotopy_eqv S \<longleftrightarrow> S = {}"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6716
by (metis homotopy_eqv_empty1 homotopy_eqv_sym)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6717
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6718
lemma homotopy_eqv_contractibility:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6719
  fixes S :: "'a::real_normed_vector set" and T :: "'b::real_normed_vector set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6720
  shows "S homotopy_eqv T \<Longrightarrow> (contractible S \<longleftrightarrow> contractible T)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6721
unfolding homotopy_eqv_def
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6722
by (blast intro: homotopy_dominated_contractibility)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6723
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6724
lemma homotopy_eqv_sing:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6725
  fixes S :: "'a::real_normed_vector set" and a :: "'b::real_normed_vector"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6726
  shows "S homotopy_eqv {a} \<longleftrightarrow> S \<noteq> {} \<and> contractible S"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6727
proof (cases "S = {}")
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6728
  case True then show ?thesis
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6729
    by simp
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6730
next
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6731
  case False then show ?thesis
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6732
    by (metis contractible_sing empty_not_insert homotopy_eqv_contractibility homotopy_eqv_contractible_sets)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6733
qed
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6734
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6735
lemma homeomorphic_contractible_eq:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6736
  fixes S :: "'a::real_normed_vector set" and T :: "'b::real_normed_vector set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6737
  shows "S homeomorphic T \<Longrightarrow> (contractible S \<longleftrightarrow> contractible T)"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6738
by (simp add: homeomorphic_imp_homotopy_eqv homotopy_eqv_contractibility)
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6739
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6740
lemma homeomorphic_contractible:
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6741
  fixes S :: "'a::real_normed_vector set" and T :: "'b::real_normed_vector set"
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6742
  shows "\<lbrakk>contractible S; S homeomorphic T\<rbrakk> \<Longrightarrow> contractible T"
63955
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6743
  by (metis homeomorphic_contractible_eq)
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6744
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6745
subsection\<open>Misc other results\<close>
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6746
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6747
lemma bounded_connected_Compl_real:
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6748
  fixes S :: "real set"
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6749
  assumes "bounded S" and conn: "connected(- S)"
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6750
    shows "S = {}"
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6751
proof -
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6752
  obtain a b where "S \<subseteq> box a b"
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6753
    by (meson assms bounded_subset_open_interval)
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6754
  then have "a \<notin> S" "b \<notin> S"
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6755
    by auto
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6756
  then have "\<forall>x. a \<le> x \<and> x \<le> b \<longrightarrow> x \<in> - S"
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6757
    by (meson Compl_iff conn connected_iff_interval)
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6758
  then show ?thesis
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6759
    using \<open>S \<subseteq> box a b\<close> by auto
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6760
qed
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6761
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6762
lemma bounded_connected_Compl_1:
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6763
  fixes S :: "'a::{euclidean_space} set"
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6764
  assumes "bounded S" and conn: "connected(- S)" and 1: "DIM('a) = 1"
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6765
    shows "S = {}"
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6766
proof -
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6767
  have "DIM('a) = DIM(real)"
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6768
    by (simp add: "1")
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6769
  then obtain f::"'a \<Rightarrow> real" and g
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6770
  where "linear f" "\<And>x. norm(f x) = norm x" "\<And>x. g(f x) = x" "\<And>y. f(g y) = y"
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6771
    by (rule isomorphisms_UNIV_UNIV) blast
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6772
  with \<open>bounded S\<close> have "bounded (f ` S)"
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6773
    using bounded_linear_image linear_linear by blast
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6774
  have "connected (f ` (-S))"
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6775
    using connected_linear_image assms \<open>linear f\<close> by blast
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6776
  moreover have "f ` (-S) = - (f ` S)"
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6777
    apply (rule bij_image_Compl_eq)
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6778
    apply (auto simp: bij_def)
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6779
     apply (metis \<open>\<And>x. g (f x) = x\<close> injI)
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6780
    by (metis UNIV_I \<open>\<And>y. f (g y) = y\<close> image_iff)
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6781
  finally have "connected (- (f ` S))"
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6782
    by simp
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6783
  then have "f ` S = {}"
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6784
    using \<open>bounded (f ` S)\<close> bounded_connected_Compl_real by blast
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6785
  then show ?thesis
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6786
    by blast
51a3d38d2281 more new material
paulson <lp15@cam.ac.uk>
parents: 63928
diff changeset
  6787
qed
63305
3b6975875633 Urysohn's lemma, Dugundji extension theorem and many other proofs
paulson <lp15@cam.ac.uk>
parents: 63301
diff changeset
  6788
63967
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6789
subsection\<open>Some Uncountable Sets\<close>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6790
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6791
lemma uncountable_closed_segment:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6792
  fixes a :: "'a::real_normed_vector"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6793
  assumes "a \<noteq> b" shows "uncountable (closed_segment a b)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6794
unfolding path_image_linepath [symmetric] path_image_def
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6795
  using inj_on_linepath [OF assms] uncountable_closed_interval [of 0 1]
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6796
        countable_image_inj_on by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6797
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6798
lemma uncountable_open_segment:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6799
  fixes a :: "'a::real_normed_vector"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6800
  assumes "a \<noteq> b" shows "uncountable (open_segment a b)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6801
  by (simp add: assms open_segment_def uncountable_closed_segment uncountable_minus_countable)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6802
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6803
lemma uncountable_convex:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6804
  fixes a :: "'a::real_normed_vector"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6805
  assumes "convex S" "a \<in> S" "b \<in> S" "a \<noteq> b"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6806
    shows "uncountable S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6807
proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6808
  have "uncountable (closed_segment a b)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6809
    by (simp add: uncountable_closed_segment assms)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6810
  then show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6811
    by (meson assms convex_contains_segment countable_subset)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6812
qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6813
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6814
lemma uncountable_ball:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6815
  fixes a :: "'a::euclidean_space"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6816
  assumes "r > 0"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6817
    shows "uncountable (ball a r)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6818
proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6819
  have "uncountable (open_segment a (a + r *\<^sub>R (SOME i. i \<in> Basis)))"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6820
    by (metis Basis_zero SOME_Basis add_cancel_right_right assms less_le real_vector.scale_eq_0_iff uncountable_open_segment)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6821
  moreover have "open_segment a (a + r *\<^sub>R (SOME i. i \<in> Basis)) \<subseteq> ball a r"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6822
    using assms by (auto simp: in_segment algebra_simps dist_norm SOME_Basis)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6823
  ultimately show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6824
    by (metis countable_subset)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6825
qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6826
66456
621897f47fab Various lemmas for HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents: 66447
diff changeset
  6827
lemma ball_minus_countable_nonempty:
621897f47fab Various lemmas for HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents: 66447
diff changeset
  6828
  assumes "countable (A :: 'a :: euclidean_space set)" "r > 0"
621897f47fab Various lemmas for HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents: 66447
diff changeset
  6829
  shows   "ball z r - A \<noteq> {}"
621897f47fab Various lemmas for HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents: 66447
diff changeset
  6830
proof
621897f47fab Various lemmas for HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents: 66447
diff changeset
  6831
  assume *: "ball z r - A = {}"
621897f47fab Various lemmas for HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents: 66447
diff changeset
  6832
  have "uncountable (ball z r - A)"
621897f47fab Various lemmas for HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents: 66447
diff changeset
  6833
    by (intro uncountable_minus_countable assms uncountable_ball)
621897f47fab Various lemmas for HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents: 66447
diff changeset
  6834
  thus False by (subst (asm) *) auto
621897f47fab Various lemmas for HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents: 66447
diff changeset
  6835
qed
621897f47fab Various lemmas for HOL-Analysis
Manuel Eberl <eberlm@in.tum.de>
parents: 66447
diff changeset
  6836
63967
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6837
lemma uncountable_cball:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6838
  fixes a :: "'a::euclidean_space"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6839
  assumes "r > 0"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6840
  shows "uncountable (cball a r)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6841
  using assms countable_subset uncountable_ball by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6842
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6843
lemma pairwise_disjnt_countable:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6844
  fixes \<N> :: "nat set set"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6845
  assumes "pairwise disjnt \<N>"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6846
    shows "countable \<N>"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6847
proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6848
  have "inj_on (\<lambda>X. SOME n. n \<in> X) (\<N> - {{}})"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6849
    apply (clarsimp simp add: inj_on_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6850
    by (metis assms disjnt_insert2 insert_absorb pairwise_def subsetI subset_empty tfl_some)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6851
  then show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6852
    by (metis countable_Diff_eq countable_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6853
qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6854
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6855
lemma pairwise_disjnt_countable_Union:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6856
    assumes "countable (\<Union>\<N>)" and pwd: "pairwise disjnt \<N>"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6857
    shows "countable \<N>"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6858
proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6859
  obtain f :: "_ \<Rightarrow> nat" where f: "inj_on f (\<Union>\<N>)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6860
    using assms by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6861
  then have "pairwise disjnt (\<Union> X \<in> \<N>. {f ` X})"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6862
    using assms by (force simp: pairwise_def disjnt_inj_on_iff [OF f])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6863
  then have "countable (\<Union> X \<in> \<N>. {f ` X})"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6864
    using pairwise_disjnt_countable by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6865
  then show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6866
    by (meson pwd countable_image_inj_on disjoint_image f inj_on_image pairwise_disjnt_countable)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6867
qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6868
64788
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6869
lemma connected_uncountable:
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6870
  fixes S :: "'a::metric_space set"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6871
  assumes "connected S" "a \<in> S" "b \<in> S" "a \<noteq> b" shows "uncountable S"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6872
proof -
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6873
  have "continuous_on S (dist a)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6874
    by (intro continuous_intros)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6875
  then have "connected (dist a ` S)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6876
    by (metis connected_continuous_image \<open>connected S\<close>)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6877
  then have "closed_segment 0 (dist a b) \<subseteq> (dist a ` S)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6878
    by (simp add: assms closed_segment_subset is_interval_connected_1 is_interval_convex)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6879
  then have "uncountable (dist a ` S)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6880
    by (metis \<open>a \<noteq> b\<close> countable_subset dist_eq_0_iff uncountable_closed_segment)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6881
  then show ?thesis
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6882
    by blast
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6883
qed
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6884
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6885
lemma path_connected_uncountable:
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6886
  fixes S :: "'a::metric_space set"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6887
  assumes "path_connected S" "a \<in> S" "b \<in> S" "a \<noteq> b" shows "uncountable S"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6888
  using path_connected_imp_connected assms connected_uncountable by metis
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6889
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6890
lemma connected_finite_iff_sing:
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6891
  fixes S :: "'a::metric_space set"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6892
  assumes "connected S"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6893
  shows "finite S \<longleftrightarrow> S = {} \<or> (\<exists>a. S = {a})"  (is "_ = ?rhs")
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6894
proof -
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6895
  have "uncountable S" if "\<not> ?rhs"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6896
    using connected_uncountable assms that by blast
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6897
  then show ?thesis
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6898
    using uncountable_infinite by auto
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6899
qed
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6900
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6901
lemma connected_card_eq_iff_nontrivial:
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6902
  fixes S :: "'a::metric_space set"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6903
  shows "connected S \<Longrightarrow> uncountable S \<longleftrightarrow> ~(\<exists>a. S \<subseteq> {a})"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6904
  apply (auto simp: countable_finite finite_subset)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6905
  by (metis connected_uncountable is_singletonI' is_singleton_the_elem subset_singleton_iff)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6906
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6907
lemma simple_path_image_uncountable:
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6908
  fixes g :: "real \<Rightarrow> 'a::metric_space"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6909
  assumes "simple_path g"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6910
  shows "uncountable (path_image g)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6911
proof -
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6912
  have "g 0 \<in> path_image g" "g (1/2) \<in> path_image g"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6913
    by (simp_all add: path_defs)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6914
  moreover have "g 0 \<noteq> g (1/2)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6915
    using assms by (fastforce simp add: simple_path_def)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6916
  ultimately show ?thesis
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6917
    apply (simp add: assms connected_card_eq_iff_nontrivial connected_simple_path_image)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6918
    by blast
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6919
qed
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6920
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6921
lemma arc_image_uncountable:
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6922
  fixes g :: "real \<Rightarrow> 'a::metric_space"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6923
  assumes "arc g"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6924
  shows "uncountable (path_image g)"
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6925
  by (simp add: arc_imp_simple_path assms simple_path_image_uncountable)
19f3d4af7a7d New material about path connectedness, etc.
paulson <lp15@cam.ac.uk>
parents: 64394
diff changeset
  6926
63967
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6927
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6928
subsection\<open> Some simple positive connection theorems\<close>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6929
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6930
proposition path_connected_convex_diff_countable:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6931
  fixes U :: "'a::euclidean_space set"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6932
  assumes "convex U" "~ collinear U" "countable S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6933
    shows "path_connected(U - S)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6934
proof (clarsimp simp add: path_connected_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6935
  fix a b
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6936
  assume "a \<in> U" "a \<notin> S" "b \<in> U" "b \<notin> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6937
  let ?m = "midpoint a b"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6938
  show "\<exists>g. path g \<and> path_image g \<subseteq> U - S \<and> pathstart g = a \<and> pathfinish g = b"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6939
  proof (cases "a = b")
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6940
    case True
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6941
    then show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6942
      by (metis DiffI \<open>a \<in> U\<close> \<open>a \<notin> S\<close> path_component_def path_component_refl)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6943
  next
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6944
    case False
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6945
    then have "a \<noteq> ?m" "b \<noteq> ?m"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6946
      using midpoint_eq_endpoint by fastforce+
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6947
    have "?m \<in> U"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6948
      using \<open>a \<in> U\<close> \<open>b \<in> U\<close> \<open>convex U\<close> convex_contains_segment by force
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6949
    obtain c where "c \<in> U" and nc_abc: "\<not> collinear {a,b,c}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6950
      by (metis False \<open>a \<in> U\<close> \<open>b \<in> U\<close> \<open>~ collinear U\<close> collinear_triples insert_absorb)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6951
    have ncoll_mca: "\<not> collinear {?m,c,a}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6952
      by (metis (full_types) \<open>a \<noteq> ?m\<close> collinear_3_trans collinear_midpoint insert_commute nc_abc)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6953
    have ncoll_mcb: "\<not> collinear {?m,c,b}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6954
      by (metis (full_types) \<open>b \<noteq> ?m\<close> collinear_3_trans collinear_midpoint insert_commute nc_abc)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6955
    have "c \<noteq> ?m"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6956
      by (metis collinear_midpoint insert_commute nc_abc)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6957
    then have "closed_segment ?m c \<subseteq> U"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6958
      by (simp add: \<open>c \<in> U\<close> \<open>?m \<in> U\<close> \<open>convex U\<close> closed_segment_subset)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6959
    then obtain z where z: "z \<in> closed_segment ?m c"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6960
                    and disjS: "(closed_segment a z \<union> closed_segment z b) \<inter> S = {}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6961
    proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6962
      have False if "closed_segment ?m c \<subseteq> {z. (closed_segment a z \<union> closed_segment z b) \<inter> S \<noteq> {}}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6963
      proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6964
        have closb: "closed_segment ?m c \<subseteq>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6965
                 {z \<in> closed_segment ?m c. closed_segment a z \<inter> S \<noteq> {}} \<union> {z \<in> closed_segment ?m c. closed_segment z b \<inter> S \<noteq> {}}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6966
          using that by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6967
        have *: "countable {z \<in> closed_segment ?m c. closed_segment z u \<inter> S \<noteq> {}}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6968
          if "u \<in> U" "u \<notin> S" and ncoll: "\<not> collinear {?m, c, u}" for u
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6969
        proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6970
          have **: False if x1: "x1 \<in> closed_segment ?m c" and x2: "x2 \<in> closed_segment ?m c"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6971
                            and "x1 \<noteq> x2" "x1 \<noteq> u"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6972
                            and w: "w \<in> closed_segment x1 u" "w \<in> closed_segment x2 u"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6973
                            and "w \<in> S" for x1 x2 w
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6974
          proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6975
            have "x1 \<in> affine hull {?m,c}" "x2 \<in> affine hull {?m,c}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6976
              using segment_as_ball x1 x2 by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6977
            then have coll_x1: "collinear {x1, ?m, c}" and coll_x2: "collinear {?m, c, x2}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6978
              by (simp_all add: affine_hull_3_imp_collinear) (metis affine_hull_3_imp_collinear insert_commute)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6979
            have "\<not> collinear {x1, u, x2}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6980
            proof
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6981
              assume "collinear {x1, u, x2}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6982
              then have "collinear {?m, c, u}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6983
                by (metis (full_types) \<open>c \<noteq> ?m\<close> coll_x1 coll_x2 collinear_3_trans insert_commute ncoll \<open>x1 \<noteq> x2\<close>)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6984
              with ncoll show False ..
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6985
            qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6986
            then have "closed_segment x1 u \<inter> closed_segment u x2 = {u}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6987
              by (blast intro!: Int_closed_segment)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6988
            then have "w = u"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6989
              using closed_segment_commute w by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6990
            show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6991
              using \<open>u \<notin> S\<close> \<open>w = u\<close> that(7) by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6992
          qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6993
          then have disj: "disjoint ((\<Union>z\<in>closed_segment ?m c. {closed_segment z u \<inter> S}))"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6994
            by (fastforce simp: pairwise_def disjnt_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6995
          have cou: "countable ((\<Union>z \<in> closed_segment ?m c. {closed_segment z u \<inter> S}) - {{}})"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6996
            apply (rule pairwise_disjnt_countable_Union [OF _ pairwise_subset [OF disj]])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6997
             apply (rule countable_subset [OF _ \<open>countable S\<close>], auto)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6998
            done
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  6999
          define f where "f \<equiv> \<lambda>X. (THE z. z \<in> closed_segment ?m c \<and> X = closed_segment z u \<inter> S)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7000
          show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7001
          proof (rule countable_subset [OF _ countable_image [OF cou, where f=f]], clarify)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7002
            fix x
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7003
            assume x: "x \<in> closed_segment ?m c" "closed_segment x u \<inter> S \<noteq> {}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7004
            show "x \<in> f ` ((\<Union>z\<in>closed_segment ?m c. {closed_segment z u \<inter> S}) - {{}})"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7005
            proof (rule_tac x="closed_segment x u \<inter> S" in image_eqI)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7006
              show "x = f (closed_segment x u \<inter> S)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7007
                unfolding f_def
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7008
                apply (rule the_equality [symmetric])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7009
                using x  apply (auto simp: dest: **)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7010
                done
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7011
            qed (use x in auto)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7012
          qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7013
        qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7014
        have "uncountable (closed_segment ?m c)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7015
          by (metis \<open>c \<noteq> ?m\<close> uncountable_closed_segment)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7016
        then show False
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7017
          using closb * [OF \<open>a \<in> U\<close> \<open>a \<notin> S\<close> ncoll_mca] * [OF \<open>b \<in> U\<close> \<open>b \<notin> S\<close> ncoll_mcb]
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7018
          apply (simp add: closed_segment_commute)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7019
          by (simp add: countable_subset)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7020
      qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7021
      then show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7022
        by (force intro: that)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7023
    qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7024
    show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7025
    proof (intro exI conjI)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7026
      have "path_image (linepath a z +++ linepath z b) \<subseteq> U"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7027
        by (metis \<open>a \<in> U\<close> \<open>b \<in> U\<close> \<open>closed_segment ?m c \<subseteq> U\<close> z \<open>convex U\<close> closed_segment_subset contra_subsetD path_image_linepath subset_path_image_join)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7028
      with disjS show "path_image (linepath a z +++ linepath z b) \<subseteq> U - S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7029
        by (force simp: path_image_join)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7030
    qed auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7031
  qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7032
qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7033
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7034
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7035
corollary connected_convex_diff_countable:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7036
  fixes U :: "'a::euclidean_space set"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7037
  assumes "convex U" "~ collinear U" "countable S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7038
  shows "connected(U - S)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7039
  by (simp add: assms path_connected_convex_diff_countable path_connected_imp_connected)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7040
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7041
lemma path_connected_punctured_convex:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7042
  assumes "convex S" and aff: "aff_dim S \<noteq> 1"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7043
    shows "path_connected(S - {a})"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7044
proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7045
  consider "aff_dim S = -1" | "aff_dim S = 0" | "aff_dim S \<ge> 2"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7046
    using assms aff_dim_geq [of S] by linarith
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7047
  then show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7048
  proof cases
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7049
    assume "aff_dim S = -1"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7050
    then show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7051
      by (metis aff_dim_empty empty_Diff path_connected_empty)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7052
  next
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7053
    assume "aff_dim S = 0"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7054
    then show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7055
      by (metis aff_dim_eq_0 Diff_cancel Diff_empty Diff_insert0 convex_empty convex_imp_path_connected path_connected_singleton singletonD)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7056
  next
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7057
    assume ge2: "aff_dim S \<ge> 2"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7058
    then have "\<not> collinear S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7059
    proof (clarsimp simp add: collinear_affine_hull)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7060
      fix u v
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7061
      assume "S \<subseteq> affine hull {u, v}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7062
      then have "aff_dim S \<le> aff_dim {u, v}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7063
        by (metis (no_types) aff_dim_affine_hull aff_dim_subset)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7064
      with ge2 show False
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7065
        by (metis (no_types) aff_dim_2 antisym aff not_numeral_le_zero one_le_numeral order_trans)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7066
    qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7067
    then show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7068
      apply (rule path_connected_convex_diff_countable [OF \<open>convex S\<close>])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7069
      by simp
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7070
  qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7071
qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7072
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7073
lemma connected_punctured_convex:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7074
  shows "\<lbrakk>convex S; aff_dim S \<noteq> 1\<rbrakk> \<Longrightarrow> connected(S - {a})"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7075
  using path_connected_imp_connected path_connected_punctured_convex by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7076
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7077
lemma path_connected_complement_countable:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7078
  fixes S :: "'a::euclidean_space set"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7079
  assumes "2 \<le> DIM('a)" "countable S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7080
  shows "path_connected(- S)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7081
proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7082
  have "path_connected(UNIV - S)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7083
    apply (rule path_connected_convex_diff_countable)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7084
    using assms by (auto simp: collinear_aff_dim [of "UNIV :: 'a set"])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7085
  then show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7086
    by (simp add: Compl_eq_Diff_UNIV)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7087
qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7088
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7089
proposition path_connected_openin_diff_countable:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7090
  fixes S :: "'a::euclidean_space set"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7091
  assumes "connected S" and ope: "openin (subtopology euclidean (affine hull S)) S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7092
      and "~ collinear S" "countable T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7093
    shows "path_connected(S - T)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7094
proof (clarsimp simp add: path_connected_component)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7095
  fix x y
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7096
  assume xy: "x \<in> S" "x \<notin> T" "y \<in> S" "y \<notin> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7097
  show "path_component (S - T) x y"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7098
  proof (rule connected_equivalence_relation_gen [OF \<open>connected S\<close>, where P = "\<lambda>x. x \<notin> T"])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7099
    show "\<exists>z. z \<in> U \<and> z \<notin> T" if opeU: "openin (subtopology euclidean S) U" and "x \<in> U" for U x
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7100
    proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7101
      have "openin (subtopology euclidean (affine hull S)) U"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7102
        using opeU ope openin_trans by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7103
      with \<open>x \<in> U\<close> obtain r where Usub: "U \<subseteq> affine hull S" and "r > 0"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7104
                              and subU: "ball x r \<inter> affine hull S \<subseteq> U"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7105
        by (auto simp: openin_contains_ball)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7106
      with \<open>x \<in> U\<close> have x: "x \<in> ball x r \<inter> affine hull S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7107
        by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7108
      have "~ S \<subseteq> {x}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7109
        using \<open>~ collinear S\<close>  collinear_subset by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7110
      then obtain x' where "x' \<noteq> x" "x' \<in> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7111
        by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7112
      obtain y where y: "y \<noteq> x" "y \<in> ball x r \<inter> affine hull S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7113
      proof
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7114
        show "x + (r / 2 / norm(x' - x)) *\<^sub>R (x' - x) \<noteq> x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7115
          using \<open>x' \<noteq> x\<close> \<open>r > 0\<close> by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7116
        show "x + (r / 2 / norm (x' - x)) *\<^sub>R (x' - x) \<in> ball x r \<inter> affine hull S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7117
          using \<open>x' \<noteq> x\<close> \<open>r > 0\<close> \<open>x' \<in> S\<close> x
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7118
          by (simp add: dist_norm mem_affine_3_minus hull_inc)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7119
      qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7120
      have "convex (ball x r \<inter> affine hull S)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7121
        by (simp add: affine_imp_convex convex_Int)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7122
      with x y subU have "uncountable U"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7123
        by (meson countable_subset uncountable_convex)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7124
      then have "\<not> U \<subseteq> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7125
        using \<open>countable T\<close> countable_subset by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7126
      then show ?thesis by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7127
    qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7128
    show "\<exists>U. openin (subtopology euclidean S) U \<and> x \<in> U \<and>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7129
              (\<forall>x\<in>U. \<forall>y\<in>U. x \<notin> T \<and> y \<notin> T \<longrightarrow> path_component (S - T) x y)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7130
          if "x \<in> S" for x
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7131
    proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7132
      obtain r where Ssub: "S \<subseteq> affine hull S" and "r > 0"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7133
                 and subS: "ball x r \<inter> affine hull S \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7134
        using ope \<open>x \<in> S\<close> by (auto simp: openin_contains_ball)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7135
      then have conv: "convex (ball x r \<inter> affine hull S)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7136
        by (simp add: affine_imp_convex convex_Int)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7137
      have "\<not> aff_dim (affine hull S) \<le> 1"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7138
        using \<open>\<not> collinear S\<close> collinear_aff_dim by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7139
      then have "\<not> collinear (ball x r \<inter> affine hull S)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7140
        apply (simp add: collinear_aff_dim)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7141
        by (metis (no_types, hide_lams) aff_dim_convex_Int_open IntI Topology_Euclidean_Space.open_ball \<open>0 < r\<close> aff_dim_affine_hull affine_affine_hull affine_imp_convex centre_in_ball empty_iff hull_subset inf_commute subsetCE that)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7142
      then have *: "path_connected ((ball x r \<inter> affine hull S) - T)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7143
        by (rule path_connected_convex_diff_countable [OF conv _ \<open>countable T\<close>])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7144
      have ST: "ball x r \<inter> affine hull S - T \<subseteq> S - T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7145
        using subS by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7146
      show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7147
      proof (intro exI conjI)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7148
        show "x \<in> ball x r \<inter> affine hull S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7149
          using \<open>x \<in> S\<close> \<open>r > 0\<close> by (simp add: hull_inc)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7150
        have "openin (subtopology euclidean (affine hull S)) (ball x r \<inter> affine hull S)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7151
          by (simp add: inf.commute openin_Int_open)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7152
        then show "openin (subtopology euclidean S) (ball x r \<inter> affine hull S)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7153
          by (rule openin_subset_trans [OF _ subS Ssub])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7154
      qed (use * path_component_trans in \<open>auto simp: path_connected_component path_component_of_subset [OF ST]\<close>)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7155
    qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7156
  qed (use xy path_component_trans in auto)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7157
qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7158
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7159
corollary connected_openin_diff_countable:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7160
  fixes S :: "'a::euclidean_space set"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7161
  assumes "connected S" and ope: "openin (subtopology euclidean (affine hull S)) S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7162
      and "~ collinear S" "countable T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7163
    shows "connected(S - T)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7164
  by (metis path_connected_imp_connected path_connected_openin_diff_countable [OF assms])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7165
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7166
corollary path_connected_open_diff_countable:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7167
  fixes S :: "'a::euclidean_space set"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7168
  assumes "2 \<le> DIM('a)" "open S" "connected S" "countable T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7169
  shows "path_connected(S - T)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7170
proof (cases "S = {}")
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7171
  case True
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7172
  then show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7173
    by (simp add: path_connected_empty)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7174
next
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7175
  case False
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7176
  show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7177
  proof (rule path_connected_openin_diff_countable)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7178
    show "openin (subtopology euclidean (affine hull S)) S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7179
      by (simp add: assms hull_subset open_subset)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7180
    show "\<not> collinear S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7181
      using assms False by (simp add: collinear_aff_dim aff_dim_open)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7182
  qed (simp_all add: assms)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7183
qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7184
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7185
corollary connected_open_diff_countable:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7186
  fixes S :: "'a::euclidean_space set"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7187
  assumes "2 \<le> DIM('a)" "open S" "connected S" "countable T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7188
  shows "connected(S - T)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7189
by (simp add: assms path_connected_imp_connected path_connected_open_diff_countable)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7190
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7191
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7192
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7193
subsection\<open> Self-homeomorphisms shuffling points about in various ways.\<close>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7194
64911
f0e07600de47 isabelle update_cartouches -c -t;
wenzelm
parents: 64790
diff changeset
  7195
subsubsection\<open>The theorem \<open>homeomorphism_moving_points_exists\<close>\<close>
63967
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7196
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7197
lemma homeomorphism_moving_point_1:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7198
  fixes a :: "'a::euclidean_space"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7199
  assumes "affine T" "a \<in> T" and u: "u \<in> ball a r \<inter> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7200
  obtains f g where "homeomorphism (cball a r \<inter> T) (cball a r \<inter> T) f g"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7201
                    "f a = u" "\<And>x. x \<in> sphere a r \<Longrightarrow> f x = x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7202
proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7203
  have nou: "norm (u - a) < r" and "u \<in> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7204
    using u by (auto simp: dist_norm norm_minus_commute)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7205
  then have "0 < r"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7206
    by (metis DiffD1 Diff_Diff_Int ball_eq_empty centre_in_ball not_le u)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7207
  define f where "f \<equiv> \<lambda>x. (1 - norm(x - a) / r) *\<^sub>R (u - a) + x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7208
  have *: "False" if eq: "x + (norm y / r) *\<^sub>R u = y + (norm x / r) *\<^sub>R u"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7209
                  and nou: "norm u < r" and yx: "norm y < norm x" for x y and u::'a
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7210
  proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7211
    have "x = y + (norm x / r - (norm y / r)) *\<^sub>R u"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7212
      using eq by (simp add: algebra_simps)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7213
    then have "norm x = norm (y + ((norm x - norm y) / r) *\<^sub>R u)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7214
      by (metis diff_divide_distrib)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7215
    also have "... \<le> norm y + norm(((norm x - norm y) / r) *\<^sub>R u)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7216
      using norm_triangle_ineq by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7217
    also have "... = norm y + (norm x - norm y) * (norm u / r)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7218
      using yx \<open>r > 0\<close>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7219
      by (simp add: divide_simps)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7220
    also have "... < norm y + (norm x - norm y) * 1"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7221
      apply (subst add_less_cancel_left)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7222
      apply (rule mult_strict_left_mono)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7223
      using nou \<open>0 < r\<close> yx
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7224
       apply (simp_all add: field_simps)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7225
      done
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7226
    also have "... = norm x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7227
      by simp
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7228
    finally show False by simp
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7229
  qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7230
  have "inj f"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7231
    unfolding f_def
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7232
  proof (clarsimp simp: inj_on_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7233
    fix x y
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7234
    assume "(1 - norm (x - a) / r) *\<^sub>R (u - a) + x =
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7235
            (1 - norm (y - a) / r) *\<^sub>R (u - a) + y"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7236
    then have eq: "(x - a) + (norm (y - a) / r) *\<^sub>R (u - a) = (y - a) + (norm (x - a) / r) *\<^sub>R (u - a)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7237
      by (auto simp: algebra_simps)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7238
    show "x=y"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7239
    proof (cases "norm (x - a) = norm (y - a)")
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7240
      case True
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7241
      then show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7242
        using eq by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7243
    next
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7244
      case False
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7245
      then consider "norm (x - a) < norm (y - a)" | "norm (x - a) > norm (y - a)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7246
        by linarith
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7247
      then have "False"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7248
      proof cases
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7249
        case 1 show False
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7250
          using * [OF _ nou 1] eq by simp
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7251
      next
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7252
        case 2 with * [OF eq nou] show False
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7253
          by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7254
      qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7255
      then show "x=y" ..
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7256
    qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7257
  qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7258
  then have inj_onf: "inj_on f (cball a r \<inter> T)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7259
    using inj_on_Int by fastforce
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7260
  have contf: "continuous_on (cball a r \<inter> T) f"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7261
    unfolding f_def using \<open>0 < r\<close>  by (intro continuous_intros) blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7262
  have fim: "f ` (cball a r \<inter> T) = cball a r \<inter> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7263
  proof
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7264
    have *: "norm (y + (1 - norm y / r) *\<^sub>R u) \<le> r" if "norm y \<le> r" "norm u < r" for y u::'a
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7265
    proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7266
      have "norm (y + (1 - norm y / r) *\<^sub>R u) \<le> norm y + norm((1 - norm y / r) *\<^sub>R u)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7267
        using norm_triangle_ineq by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7268
      also have "... = norm y + abs(1 - norm y / r) * norm u"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7269
        by simp
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7270
      also have "... \<le> r"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7271
      proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7272
        have "(r - norm u) * (r - norm y) \<ge> 0"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7273
          using that by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7274
        then have "r * norm u + r * norm y \<le> r * r + norm u * norm y"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7275
          by (simp add: algebra_simps)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7276
        then show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7277
        using that \<open>0 < r\<close> by (simp add: abs_if field_simps)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7278
      qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7279
      finally show ?thesis .
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7280
    qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7281
    have "f ` (cball a r) \<subseteq> cball a r"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7282
      apply (clarsimp simp add: dist_norm norm_minus_commute f_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7283
      using * by (metis diff_add_eq diff_diff_add diff_diff_eq2 norm_minus_commute nou)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7284
    moreover have "f ` T \<subseteq> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7285
      unfolding f_def using \<open>affine T\<close> \<open>a \<in> T\<close> \<open>u \<in> T\<close>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7286
      by (force simp: add.commute mem_affine_3_minus)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7287
    ultimately show "f ` (cball a r \<inter> T) \<subseteq> cball a r \<inter> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7288
      by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7289
  next
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7290
    show "cball a r \<inter> T \<subseteq> f ` (cball a r \<inter> T)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7291
    proof (clarsimp simp add: dist_norm norm_minus_commute)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7292
      fix x
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7293
      assume x: "norm (x - a) \<le> r" and "x \<in> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7294
      have "\<exists>v \<in> {0..1}. ((1 - v) * r - norm ((x - a) - v *\<^sub>R (u - a))) \<bullet> 1 = 0"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7295
        by (rule ivt_decreasing_component_on_1) (auto simp: x continuous_intros)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7296
      then obtain v where "0\<le>v" "v\<le>1" and v: "(1 - v) * r = norm ((x - a) - v *\<^sub>R (u - a))"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7297
        by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7298
      show "x \<in> f ` (cball a r \<inter> T)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7299
      proof (rule image_eqI)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7300
        show "x = f (x - v *\<^sub>R (u - a))"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7301
          using \<open>r > 0\<close> v by (simp add: f_def field_simps)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7302
        have "x - v *\<^sub>R (u - a) \<in> cball a r"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7303
          using \<open>r > 0\<close> v \<open>0 \<le> v\<close>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7304
          apply (simp add: field_simps dist_norm norm_minus_commute)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7305
          by (metis le_add_same_cancel2 order.order_iff_strict zero_le_mult_iff)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7306
        moreover have "x - v *\<^sub>R (u - a) \<in> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7307
          by (simp add: f_def \<open>affine T\<close> \<open>u \<in> T\<close> \<open>x \<in> T\<close> assms mem_affine_3_minus2)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7308
        ultimately show "x - v *\<^sub>R (u - a) \<in> cball a r \<inter> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7309
          by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7310
      qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7311
    qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7312
  qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7313
  have "\<exists>g. homeomorphism (cball a r \<inter> T) (cball a r \<inter> T) f g"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7314
    apply (rule homeomorphism_compact [OF _ contf fim inj_onf])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7315
    apply (simp add: affine_closed compact_Int_closed \<open>affine T\<close>)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7316
    done
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7317
  then show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7318
    apply (rule exE)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7319
    apply (erule_tac f=f in that)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7320
    using \<open>r > 0\<close>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7321
     apply (simp_all add: f_def dist_norm norm_minus_commute)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7322
    done
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7323
qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7324
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7325
corollary homeomorphism_moving_point_2:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7326
  fixes a :: "'a::euclidean_space"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7327
  assumes "affine T" "a \<in> T" and u: "u \<in> ball a r \<inter> T" and v: "v \<in> ball a r \<inter> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7328
  obtains f g where "homeomorphism (cball a r \<inter> T) (cball a r \<inter> T) f g"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7329
                    "f u = v" "\<And>x. \<lbrakk>x \<in> sphere a r; x \<in> T\<rbrakk> \<Longrightarrow> f x = x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7330
proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7331
  have "0 < r"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7332
    by (metis DiffD1 Diff_Diff_Int ball_eq_empty centre_in_ball not_le u)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7333
  obtain f1 g1 where hom1: "homeomorphism (cball a r \<inter> T) (cball a r \<inter> T) f1 g1"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7334
                 and "f1 a = u" and f1: "\<And>x. x \<in> sphere a r \<Longrightarrow> f1 x = x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7335
    using homeomorphism_moving_point_1 [OF \<open>affine T\<close> \<open>a \<in> T\<close> u] by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7336
  obtain f2 g2 where hom2: "homeomorphism (cball a r \<inter> T) (cball a r \<inter> T) f2 g2"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7337
                 and "f2 a = v" and f2: "\<And>x. x \<in> sphere a r \<Longrightarrow> f2 x = x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7338
    using homeomorphism_moving_point_1 [OF \<open>affine T\<close> \<open>a \<in> T\<close> v] by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7339
  show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7340
  proof
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7341
    show "homeomorphism (cball a r \<inter> T) (cball a r \<inter> T) (f2 \<circ> g1) (f1 \<circ> g2)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7342
      by (metis homeomorphism_compose homeomorphism_symD hom1 hom2)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7343
    have "g1 u = a"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7344
      using \<open>0 < r\<close> \<open>f1 a = u\<close> assms hom1 homeomorphism_apply1 by fastforce
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7345
    then show "(f2 \<circ> g1) u = v"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7346
      by (simp add: \<open>f2 a = v\<close>)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7347
    show "\<And>x. \<lbrakk>x \<in> sphere a r; x \<in> T\<rbrakk> \<Longrightarrow> (f2 \<circ> g1) x = x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7348
      using f1 f2 hom1 homeomorphism_apply1 by fastforce
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7349
  qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7350
qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7351
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7352
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7353
corollary homeomorphism_moving_point_3:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7354
  fixes a :: "'a::euclidean_space"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7355
  assumes "affine T" "a \<in> T" and ST: "ball a r \<inter> T \<subseteq> S" "S \<subseteq> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7356
      and u: "u \<in> ball a r \<inter> T" and v: "v \<in> ball a r \<inter> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7357
  obtains f g where "homeomorphism S S f g"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7358
                    "f u = v" "{x. ~ (f x = x \<and> g x = x)} \<subseteq> ball a r \<inter> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7359
proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7360
  obtain f g where hom: "homeomorphism (cball a r \<inter> T) (cball a r \<inter> T) f g"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7361
               and "f u = v" and fid: "\<And>x. \<lbrakk>x \<in> sphere a r; x \<in> T\<rbrakk> \<Longrightarrow> f x = x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7362
    using homeomorphism_moving_point_2 [OF \<open>affine T\<close> \<open>a \<in> T\<close> u v] by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7363
  have gid: "\<And>x. \<lbrakk>x \<in> sphere a r; x \<in> T\<rbrakk> \<Longrightarrow> g x = x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7364
    using fid hom homeomorphism_apply1 by fastforce
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7365
  define ff where "ff \<equiv> \<lambda>x. if x \<in> ball a r \<inter> T then f x else x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7366
  define gg where "gg \<equiv> \<lambda>x. if x \<in> ball a r \<inter> T then g x else x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7367
  show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7368
  proof
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7369
    show "homeomorphism S S ff gg"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7370
    proof (rule homeomorphismI)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7371
      have "continuous_on ((cball a r \<inter> T) \<union> (T - ball a r)) ff"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7372
        apply (simp add: ff_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7373
        apply (rule continuous_on_cases)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7374
        using homeomorphism_cont1 [OF hom]
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7375
            apply (auto simp: affine_closed \<open>affine T\<close> continuous_on_id fid)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7376
        done
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7377
      then show "continuous_on S ff"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7378
        apply (rule continuous_on_subset)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7379
        using ST by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7380
      have "continuous_on ((cball a r \<inter> T) \<union> (T - ball a r)) gg"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7381
        apply (simp add: gg_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7382
        apply (rule continuous_on_cases)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7383
        using homeomorphism_cont2 [OF hom]
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7384
            apply (auto simp: affine_closed \<open>affine T\<close> continuous_on_id gid)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7385
        done
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7386
      then show "continuous_on S gg"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7387
        apply (rule continuous_on_subset)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7388
        using ST by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7389
      show "ff ` S \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7390
      proof (clarsimp simp add: ff_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7391
        fix x
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7392
        assume "x \<in> S" and x: "dist a x < r" and "x \<in> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7393
        then have "f x \<in> cball a r \<inter> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7394
          using homeomorphism_image1 [OF hom] by force
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7395
        then show "f x \<in> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7396
          using ST(1) \<open>x \<in> T\<close> gid hom homeomorphism_def x by fastforce
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7397
      qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7398
      show "gg ` S \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7399
      proof (clarsimp simp add: gg_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7400
        fix x
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7401
        assume "x \<in> S" and x: "dist a x < r" and "x \<in> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7402
        then have "g x \<in> cball a r \<inter> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7403
          using homeomorphism_image2 [OF hom] by force
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7404
        then have "g x \<in> ball a r"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7405
          using homeomorphism_apply2 [OF hom]
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7406
            by (metis Diff_Diff_Int Diff_iff  \<open>x \<in> T\<close> cball_def fid le_less mem_Collect_eq mem_ball mem_sphere x)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7407
        then show "g x \<in> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7408
          using ST(1) \<open>g x \<in> cball a r \<inter> T\<close> by force
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7409
        qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7410
      show "\<And>x. x \<in> S \<Longrightarrow> gg (ff x) = x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7411
        apply (simp add: ff_def gg_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7412
        using homeomorphism_apply1 [OF hom] homeomorphism_image1 [OF hom]
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7413
        apply auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7414
        apply (metis Int_iff homeomorphism_apply1 [OF hom] fid image_eqI less_eq_real_def mem_cball mem_sphere)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7415
        done
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7416
      show "\<And>x. x \<in> S \<Longrightarrow> ff (gg x) = x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7417
        apply (simp add: ff_def gg_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7418
        using homeomorphism_apply2 [OF hom] homeomorphism_image2 [OF hom]
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7419
        apply auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7420
        apply (metis Int_iff fid image_eqI less_eq_real_def mem_cball mem_sphere)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7421
        done
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7422
    qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7423
    show "ff u = v"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7424
      using u by (auto simp: ff_def \<open>f u = v\<close>)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7425
    show "{x. \<not> (ff x = x \<and> gg x = x)} \<subseteq> ball a r \<inter> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7426
      by (auto simp: ff_def gg_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7427
  qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7428
qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7429
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7430
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7431
proposition homeomorphism_moving_point:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7432
  fixes a :: "'a::euclidean_space"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7433
  assumes ope: "openin (subtopology euclidean (affine hull S)) S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7434
      and "S \<subseteq> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7435
      and TS: "T \<subseteq> affine hull S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7436
      and S: "connected S" "a \<in> S" "b \<in> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7437
  obtains f g where "homeomorphism T T f g" "f a = b"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7438
                    "{x. ~ (f x = x \<and> g x = x)} \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7439
                    "bounded {x. ~ (f x = x \<and> g x = x)}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7440
proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7441
  have 1: "\<exists>h k. homeomorphism T T h k \<and> h (f d) = d \<and>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7442
              {x. ~ (h x = x \<and> k x = x)} \<subseteq> S \<and> bounded {x. ~ (h x = x \<and> k x = x)}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7443
        if "d \<in> S" "f d \<in> S" and homfg: "homeomorphism T T f g"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7444
        and S: "{x. ~ (f x = x \<and> g x = x)} \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7445
        and bo: "bounded {x. ~ (f x = x \<and> g x = x)}" for d f g
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7446
  proof (intro exI conjI)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7447
    show homgf: "homeomorphism T T g f"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7448
      by (metis homeomorphism_symD homfg)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7449
    then show "g (f d) = d"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7450
      by (meson \<open>S \<subseteq> T\<close> homeomorphism_def subsetD \<open>d \<in> S\<close>)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7451
    show "{x. \<not> (g x = x \<and> f x = x)} \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7452
      using S by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7453
    show "bounded {x. \<not> (g x = x \<and> f x = x)}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7454
      using bo by (simp add: conj_commute)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7455
  qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7456
  have 2: "\<exists>f g. homeomorphism T T f g \<and> f x = f2 (f1 x) \<and>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7457
                 {x. \<not> (f x = x \<and> g x = x)} \<subseteq> S \<and> bounded {x. \<not> (f x = x \<and> g x = x)}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7458
             if "x \<in> S" "f1 x \<in> S" "f2 (f1 x) \<in> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7459
                and hom: "homeomorphism T T f1 g1" "homeomorphism T T f2 g2"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7460
                and sub: "{x. \<not> (f1 x = x \<and> g1 x = x)} \<subseteq> S"   "{x. \<not> (f2 x = x \<and> g2 x = x)} \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7461
                and bo: "bounded {x. \<not> (f1 x = x \<and> g1 x = x)}"  "bounded {x. \<not> (f2 x = x \<and> g2 x = x)}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7462
             for x f1 f2 g1 g2
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7463
  proof (intro exI conjI)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7464
    show homgf: "homeomorphism T T (f2 \<circ> f1) (g1 \<circ> g2)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7465
      by (metis homeomorphism_compose hom)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7466
    then show "(f2 \<circ> f1) x = f2 (f1 x)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7467
      by force
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7468
    show "{x. \<not> ((f2 \<circ> f1) x = x \<and> (g1 \<circ> g2) x = x)} \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7469
      using sub by force
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7470
    have "bounded ({x. ~(f1 x = x \<and> g1 x = x)} \<union> {x. ~(f2 x = x \<and> g2 x = x)})"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7471
      using bo by simp
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7472
    then show "bounded {x. \<not> ((f2 \<circ> f1) x = x \<and> (g1 \<circ> g2) x = x)}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7473
      by (rule bounded_subset) auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7474
  qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7475
  have 3: "\<exists>U. openin (subtopology euclidean S) U \<and>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7476
              d \<in> U \<and>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7477
              (\<forall>x\<in>U.
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7478
                  \<exists>f g. homeomorphism T T f g \<and> f d = x \<and>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7479
                        {x. \<not> (f x = x \<and> g x = x)} \<subseteq> S \<and>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7480
                        bounded {x. \<not> (f x = x \<and> g x = x)})"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7481
           if "d \<in> S" for d
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7482
  proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7483
    obtain r where "r > 0" and r: "ball d r \<inter> affine hull S \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7484
      by (metis \<open>d \<in> S\<close> ope openin_contains_ball)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7485
    have *: "\<exists>f g. homeomorphism T T f g \<and> f d = e \<and>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7486
                   {x. \<not> (f x = x \<and> g x = x)} \<subseteq> S \<and>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7487
                   bounded {x. \<not> (f x = x \<and> g x = x)}" if "e \<in> S" "e \<in> ball d r" for e
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7488
      apply (rule homeomorphism_moving_point_3 [of "affine hull S" d r T d e])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7489
      using r \<open>S \<subseteq> T\<close> TS that
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7490
            apply (auto simp: \<open>d \<in> S\<close> \<open>0 < r\<close> hull_inc)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7491
      using bounded_subset by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7492
    show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7493
      apply (rule_tac x="S \<inter> ball d r" in exI)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7494
      apply (intro conjI)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7495
        apply (simp add: openin_open_Int)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7496
       apply (simp add: \<open>0 < r\<close> that)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7497
      apply (blast intro: *)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7498
      done
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7499
  qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7500
  have "\<exists>f g. homeomorphism T T f g \<and> f a = b \<and>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7501
              {x. ~ (f x = x \<and> g x = x)} \<subseteq> S \<and> bounded {x. ~ (f x = x \<and> g x = x)}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7502
    apply (rule connected_equivalence_relation [OF S], safe)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7503
      apply (blast intro: 1 2 3)+
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7504
    done
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7505
  then show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7506
    using that by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7507
qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7508
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7509
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7510
lemma homeomorphism_moving_points_exists_gen:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7511
  assumes K: "finite K" "\<And>i. i \<in> K \<Longrightarrow> x i \<in> S \<and> y i \<in> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7512
             "pairwise (\<lambda>i j. (x i \<noteq> x j) \<and> (y i \<noteq> y j)) K"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7513
      and "2 \<le> aff_dim S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7514
      and ope: "openin (subtopology euclidean (affine hull S)) S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7515
      and "S \<subseteq> T" "T \<subseteq> affine hull S" "connected S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7516
  shows "\<exists>f g. homeomorphism T T f g \<and> (\<forall>i \<in> K. f(x i) = y i) \<and>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7517
               {x. ~ (f x = x \<and> g x = x)} \<subseteq> S \<and> bounded {x. ~ (f x = x \<and> g x = x)}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7518
  using assms
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7519
proof (induction K)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7520
  case empty
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7521
  then show ?case
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7522
    by (force simp: homeomorphism_ident)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7523
next
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7524
  case (insert i K)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7525
  then have xney: "\<And>j. \<lbrakk>j \<in> K; j \<noteq> i\<rbrakk> \<Longrightarrow> x i \<noteq> x j \<and> y i \<noteq> y j"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7526
       and pw: "pairwise (\<lambda>i j. x i \<noteq> x j \<and> y i \<noteq> y j) K"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7527
       and "x i \<in> S" "y i \<in> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7528
       and xyS: "\<And>i. i \<in> K \<Longrightarrow> x i \<in> S \<and> y i \<in> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7529
    by (simp_all add: pairwise_insert)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7530
  obtain f g where homfg: "homeomorphism T T f g" and feq: "\<And>i. i \<in> K \<Longrightarrow> f(x i) = y i"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7531
               and fg_sub: "{x. ~ (f x = x \<and> g x = x)} \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7532
               and bo_fg: "bounded {x. ~ (f x = x \<and> g x = x)}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7533
    using insert.IH [OF xyS pw] insert.prems by (blast intro: that)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7534
  then have "\<exists>f g. homeomorphism T T f g \<and> (\<forall>i \<in> K. f(x i) = y i) \<and>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7535
                   {x. ~ (f x = x \<and> g x = x)} \<subseteq> S \<and> bounded {x. ~ (f x = x \<and> g x = x)}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7536
    using insert by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7537
  have aff_eq: "affine hull (S - y ` K) = affine hull S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7538
    apply (rule affine_hull_Diff)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7539
    apply (auto simp: insert)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7540
    using \<open>y i \<in> S\<close> insert.hyps(2) xney xyS by fastforce
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7541
  have f_in_S: "f x \<in> S" if "x \<in> S" for x
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7542
    using homfg fg_sub homeomorphism_apply1 \<open>S \<subseteq> T\<close>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7543
  proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7544
    have "(f (f x) \<noteq> f x \<or> g (f x) \<noteq> f x) \<or> f x \<in> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7545
      by (metis \<open>S \<subseteq> T\<close> homfg subsetD homeomorphism_apply1 that)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7546
    then show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7547
      using fg_sub by force
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7548
  qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7549
  obtain h k where homhk: "homeomorphism T T h k" and heq: "h (f (x i)) = y i"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7550
               and hk_sub: "{x. \<not> (h x = x \<and> k x = x)} \<subseteq> S - y ` K"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7551
               and bo_hk:  "bounded {x. \<not> (h x = x \<and> k x = x)}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7552
  proof (rule homeomorphism_moving_point [of "S - y`K" T "f(x i)" "y i"])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7553
    show "openin (subtopology euclidean (affine hull (S - y ` K))) (S - y ` K)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7554
      by (simp add: aff_eq openin_diff finite_imp_closedin image_subset_iff hull_inc insert xyS)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7555
    show "S - y ` K \<subseteq> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7556
      using \<open>S \<subseteq> T\<close> by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7557
    show "T \<subseteq> affine hull (S - y ` K)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7558
      using insert by (simp add: aff_eq)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7559
    show "connected (S - y ` K)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7560
    proof (rule connected_openin_diff_countable [OF \<open>connected S\<close> ope])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7561
      show "\<not> collinear S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7562
        using collinear_aff_dim \<open>2 \<le> aff_dim S\<close> by force
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7563
      show "countable (y ` K)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7564
        using countable_finite insert.hyps(1) by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7565
    qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7566
    show "f (x i) \<in> S - y ` K"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7567
      apply (auto simp: f_in_S \<open>x i \<in> S\<close>)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7568
        by (metis feq homfg \<open>x i \<in> S\<close> homeomorphism_def \<open>S \<subseteq> T\<close> \<open>i \<notin> K\<close> subsetCE xney xyS)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7569
    show "y i \<in> S - y ` K"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7570
      using insert.hyps xney by (auto simp: \<open>y i \<in> S\<close>)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7571
  qed blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7572
  show ?case
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7573
  proof (intro exI conjI)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7574
    show "homeomorphism T T (h \<circ> f) (g \<circ> k)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7575
      using homfg homhk homeomorphism_compose by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7576
    show "\<forall>i \<in> insert i K. (h \<circ> f) (x i) = y i"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7577
      using feq hk_sub by (auto simp: heq)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7578
    show "{x. \<not> ((h \<circ> f) x = x \<and> (g \<circ> k) x = x)} \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7579
      using fg_sub hk_sub by force
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7580
    have "bounded ({x. ~(f x = x \<and> g x = x)} \<union> {x. ~(h x = x \<and> k x = x)})"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7581
      using bo_fg bo_hk bounded_Un by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7582
    then show "bounded {x. \<not> ((h \<circ> f) x = x \<and> (g \<circ> k) x = x)}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7583
      by (rule bounded_subset) auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7584
  qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7585
qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7586
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7587
proposition homeomorphism_moving_points_exists:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7588
  fixes S :: "'a::euclidean_space set"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7589
  assumes 2: "2 \<le> DIM('a)" "open S" "connected S" "S \<subseteq> T" "finite K"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7590
      and KS: "\<And>i. i \<in> K \<Longrightarrow> x i \<in> S \<and> y i \<in> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7591
      and pw: "pairwise (\<lambda>i j. (x i \<noteq> x j) \<and> (y i \<noteq> y j)) K"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7592
      and S: "S \<subseteq> T" "T \<subseteq> affine hull S" "connected S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7593
  obtains f g where "homeomorphism T T f g" "\<And>i. i \<in> K \<Longrightarrow> f(x i) = y i"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7594
                    "{x. ~ (f x = x \<and> g x = x)} \<subseteq> S" "bounded {x. (~ (f x = x \<and> g x = x))}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7595
proof (cases "S = {}")
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7596
  case True
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7597
  then show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7598
    using KS homeomorphism_ident that by fastforce
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7599
next
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7600
  case False
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7601
  then have affS: "affine hull S = UNIV"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7602
    by (simp add: affine_hull_open \<open>open S\<close>)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7603
  then have ope: "openin (subtopology euclidean (affine hull S)) S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7604
    using \<open>open S\<close> open_openin by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7605
  have "2 \<le> DIM('a)" by (rule 2)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7606
  also have "... = aff_dim (UNIV :: 'a set)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7607
    by simp
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7608
  also have "... \<le> aff_dim S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7609
    by (metis aff_dim_UNIV aff_dim_affine_hull aff_dim_le_DIM affS)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7610
  finally have "2 \<le> aff_dim S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7611
    by linarith
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7612
  then show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7613
    using homeomorphism_moving_points_exists_gen [OF \<open>finite K\<close> KS pw _ ope S] that by fastforce
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7614
qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7615
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7616
64911
f0e07600de47 isabelle update_cartouches -c -t;
wenzelm
parents: 64790
diff changeset
  7617
subsubsection\<open>The theorem \<open>homeomorphism_grouping_points_exists\<close>\<close>
63967
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7618
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7619
lemma homeomorphism_grouping_point_1:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7620
  fixes a::real and c::real
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7621
  assumes "a < b" "c < d"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7622
  obtains f g where "homeomorphism (cbox a b) (cbox c d) f g" "f a = c" "f b = d"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7623
proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7624
  define f where "f \<equiv> \<lambda>x. ((d - c) / (b - a)) * x + (c - a * ((d - c) / (b - a)))"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7625
  have "\<exists>g. homeomorphism (cbox a b) (cbox c d) f g"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7626
  proof (rule homeomorphism_compact)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7627
    show "continuous_on (cbox a b) f"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7628
      apply (simp add: f_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7629
      apply (intro continuous_intros)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7630
      using assms by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7631
    have "f ` {a..b} = {c..d}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7632
      unfolding f_def image_affinity_atLeastAtMost
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7633
      using assms sum_sqs_eq by (auto simp: divide_simps algebra_simps)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7634
    then show "f ` cbox a b = cbox c d"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7635
      by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7636
    show "inj_on f (cbox a b)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7637
      unfolding f_def inj_on_def using assms by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7638
  qed auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7639
  then obtain g where "homeomorphism (cbox a b) (cbox c d) f g" ..
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7640
  then show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7641
  proof
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7642
    show "f a = c"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7643
      by (simp add: f_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7644
    show "f b = d"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7645
      using assms sum_sqs_eq [of a b] by (auto simp: f_def divide_simps algebra_simps)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7646
  qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7647
qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7648
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7649
lemma homeomorphism_grouping_point_2:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7650
  fixes a::real and w::real
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7651
  assumes hom_ab: "homeomorphism (cbox a b) (cbox u v) f1 g1"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7652
      and hom_bc: "homeomorphism (cbox b c) (cbox v w) f2 g2"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7653
      and "b \<in> cbox a c" "v \<in> cbox u w"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7654
      and eq: "f1 a = u" "f1 b = v" "f2 b = v" "f2 c = w"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7655
 obtains f g where "homeomorphism (cbox a c) (cbox u w) f g" "f a = u" "f c = w"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7656
                   "\<And>x. x \<in> cbox a b \<Longrightarrow> f x = f1 x" "\<And>x. x \<in> cbox b c \<Longrightarrow> f x = f2 x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7657
proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7658
  have le: "a \<le> b" "b \<le> c" "u \<le> v" "v \<le> w"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7659
    using assms by simp_all
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7660
  then have ac: "cbox a c = cbox a b \<union> cbox b c" and uw: "cbox u w = cbox u v \<union> cbox v w"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7661
    by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7662
  define f where "f \<equiv> \<lambda>x. if x \<le> b then f1 x else f2 x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7663
  have "\<exists>g. homeomorphism (cbox a c) (cbox u w) f g"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7664
  proof (rule homeomorphism_compact)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7665
    have cf1: "continuous_on (cbox a b) f1"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7666
      using hom_ab homeomorphism_cont1 by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7667
    have cf2: "continuous_on (cbox b c) f2"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7668
      using hom_bc homeomorphism_cont1 by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7669
    show "continuous_on (cbox a c) f"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7670
      apply (simp add: f_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7671
      apply (rule continuous_on_cases_le [OF continuous_on_subset [OF cf1] continuous_on_subset [OF cf2]])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7672
      using le eq apply (force simp: continuous_on_id)+
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7673
      done
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7674
    have "f ` cbox a b = f1 ` cbox a b" "f ` cbox b c = f2 ` cbox b c"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7675
      unfolding f_def using eq by force+
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7676
    then show "f ` cbox a c = cbox u w"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7677
      apply (simp only: ac uw image_Un)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7678
      by (metis hom_ab hom_bc homeomorphism_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7679
    have neq12: "f1 x \<noteq> f2 y" if x: "a \<le> x" "x \<le> b" and y: "b < y" "y \<le> c" for x y
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7680
    proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7681
      have "f1 x \<in> cbox u v"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7682
        by (metis hom_ab homeomorphism_def image_eqI mem_box_real(2) x)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7683
      moreover have "f2 y \<in> cbox v w"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7684
        by (metis (full_types) hom_bc homeomorphism_def image_subset_iff mem_box_real(2) not_le not_less_iff_gr_or_eq order_refl y)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7685
      moreover have "f2 y \<noteq> f2 b"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7686
        by (metis cancel_comm_monoid_add_class.diff_cancel diff_gt_0_iff_gt hom_bc homeomorphism_def le(2) less_imp_le less_numeral_extra(3) mem_box_real(2) order_refl y)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7687
      ultimately show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7688
        using le eq by simp
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7689
    qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7690
    have "inj_on f1 (cbox a b)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7691
      by (metis (full_types) hom_ab homeomorphism_def inj_onI)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7692
    moreover have "inj_on f2 (cbox b c)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7693
      by (metis (full_types) hom_bc homeomorphism_def inj_onI)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7694
    ultimately show "inj_on f (cbox a c)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7695
      apply (simp (no_asm) add: inj_on_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7696
      apply (simp add: f_def inj_on_eq_iff)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7697
      using neq12  apply force
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7698
      done
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7699
  qed auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7700
  then obtain g where "homeomorphism (cbox a c) (cbox u w) f g" ..
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7701
  then show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7702
    apply (rule that)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7703
    using eq le by (auto simp: f_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7704
qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7705
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7706
lemma homeomorphism_grouping_point_3:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7707
  fixes a::real
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7708
  assumes cbox_sub: "cbox c d \<subseteq> box a b" "cbox u v \<subseteq> box a b"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7709
      and box_ne: "box c d \<noteq> {}" "box u v \<noteq> {}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7710
  obtains f g where "homeomorphism (cbox a b) (cbox a b) f g" "f a = a" "f b = b"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7711
                    "\<And>x. x \<in> cbox c d \<Longrightarrow> f x \<in> cbox u v"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7712
proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7713
  have less: "a < c" "a < u" "d < b" "v < b" "c < d" "u < v" "cbox c d \<noteq> {}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7714
    using assms
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7715
    by (simp_all add: cbox_sub subset_eq)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7716
  obtain f1 g1 where 1: "homeomorphism (cbox a c) (cbox a u) f1 g1"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7717
                   and f1_eq: "f1 a = a" "f1 c = u"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7718
    using homeomorphism_grouping_point_1 [OF \<open>a < c\<close> \<open>a < u\<close>] .
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7719
  obtain f2 g2 where 2: "homeomorphism (cbox c d) (cbox u v) f2 g2"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7720
                   and f2_eq: "f2 c = u" "f2 d = v"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7721
    using homeomorphism_grouping_point_1 [OF \<open>c < d\<close> \<open>u < v\<close>] .
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7722
  obtain f3 g3 where 3: "homeomorphism (cbox d b) (cbox v b) f3 g3"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7723
                   and f3_eq: "f3 d = v" "f3 b = b"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7724
    using homeomorphism_grouping_point_1 [OF \<open>d < b\<close> \<open>v < b\<close>] .
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7725
  obtain f4 g4 where 4: "homeomorphism (cbox a d) (cbox a v) f4 g4" and "f4 a = a" "f4 d = v"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7726
                 and f4_eq: "\<And>x. x \<in> cbox a c \<Longrightarrow> f4 x = f1 x" "\<And>x. x \<in> cbox c d \<Longrightarrow> f4 x = f2 x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7727
    using homeomorphism_grouping_point_2 [OF 1 2] less  by (auto simp: f1_eq f2_eq)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7728
  obtain f g where fg: "homeomorphism (cbox a b) (cbox a b) f g" "f a = a" "f b = b"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7729
               and f_eq: "\<And>x. x \<in> cbox a d \<Longrightarrow> f x = f4 x" "\<And>x. x \<in> cbox d b \<Longrightarrow> f x = f3 x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7730
    using homeomorphism_grouping_point_2 [OF 4 3] less by (auto simp: f4_eq f3_eq f2_eq f1_eq)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7731
  show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7732
    apply (rule that [OF fg])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7733
    using f4_eq f_eq homeomorphism_image1 [OF 2]
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7734
    apply simp
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7735
    by (metis atLeastAtMost_iff box_real(1) box_real(2) cbox_sub(1) greaterThanLessThan_iff imageI less_eq_real_def subset_eq)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7736
qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7737
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7738
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7739
lemma homeomorphism_grouping_point_4:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7740
  fixes T :: "real set"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7741
  assumes "open U" "open S" "connected S" "U \<noteq> {}" "finite K" "K \<subseteq> S" "U \<subseteq> S" "S \<subseteq> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7742
  obtains f g where "homeomorphism T T f g"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7743
                    "\<And>x. x \<in> K \<Longrightarrow> f x \<in> U" "{x. (~ (f x = x \<and> g x = x))} \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7744
                    "bounded {x. (~ (f x = x \<and> g x = x))}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7745
proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7746
  obtain c d where "box c d \<noteq> {}" "cbox c d \<subseteq> U"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7747
  proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7748
    obtain u where "u \<in> U"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7749
      using \<open>U \<noteq> {}\<close> by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7750
    then obtain e where "e > 0" "cball u e \<subseteq> U"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7751
      using \<open>open U\<close> open_contains_cball by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7752
    then show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7753
      by (rule_tac c=u and d="u+e" in that) (auto simp: dist_norm subset_iff)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7754
  qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7755
  have "compact K"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7756
    by (simp add: \<open>finite K\<close> finite_imp_compact)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7757
  obtain a b where "box a b \<noteq> {}" "K \<subseteq> cbox a b" "cbox a b \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7758
  proof (cases "K = {}")
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7759
    case True then show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7760
      using \<open>box c d \<noteq> {}\<close> \<open>cbox c d \<subseteq> U\<close> \<open>U \<subseteq> S\<close> that by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7761
  next
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7762
    case False
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7763
    then obtain a b where "a \<in> K" "b \<in> K"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7764
            and a: "\<And>x. x \<in> K \<Longrightarrow> a \<le> x" and b: "\<And>x. x \<in> K \<Longrightarrow> x \<le> b"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7765
      using compact_attains_inf compact_attains_sup by (metis \<open>compact K\<close>)+
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7766
    obtain e where "e > 0" "cball b e \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7767
      using \<open>open S\<close> open_contains_cball
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7768
      by (metis \<open>b \<in> K\<close> \<open>K \<subseteq> S\<close> subsetD)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7769
    show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7770
    proof
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7771
      show "box a (b + e) \<noteq> {}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7772
        using \<open>0 < e\<close> \<open>b \<in> K\<close> a by force
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7773
      show "K \<subseteq> cbox a (b + e)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7774
        using \<open>0 < e\<close> a b by fastforce
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7775
      have "a \<in> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7776
        using \<open>a \<in> K\<close> assms(6) by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7777
      have "b + e \<in> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7778
        using \<open>0 < e\<close> \<open>cball b e \<subseteq> S\<close>  by (force simp: dist_norm)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7779
      show "cbox a (b + e) \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7780
        using \<open>a \<in> S\<close> \<open>b + e \<in> S\<close> \<open>connected S\<close> connected_contains_Icc by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7781
    qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7782
  qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7783
  obtain w z where "cbox w z \<subseteq> S" and sub_wz: "cbox a b \<union> cbox c d \<subseteq> box w z"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7784
  proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7785
    have "a \<in> S" "b \<in> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7786
      using \<open>box a b \<noteq> {}\<close> \<open>cbox a b \<subseteq> S\<close> by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7787
    moreover have "c \<in> S" "d \<in> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7788
      using \<open>box c d \<noteq> {}\<close> \<open>cbox c d \<subseteq> U\<close> \<open>U \<subseteq> S\<close> by force+
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7789
    ultimately have "min a c \<in> S" "max b d \<in> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7790
      by linarith+
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7791
    then obtain e1 e2 where "e1 > 0" "cball (min a c) e1 \<subseteq> S" "e2 > 0" "cball (max b d) e2 \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7792
      using \<open>open S\<close> open_contains_cball by metis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7793
    then have *: "min a c - e1 \<in> S" "max b d + e2 \<in> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7794
      by (auto simp: dist_norm)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7795
    show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7796
    proof
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7797
      show "cbox (min a c - e1) (max b d+ e2) \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7798
        using * \<open>connected S\<close> connected_contains_Icc by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7799
      show "cbox a b \<union> cbox c d \<subseteq> box (min a c - e1) (max b d + e2)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7800
        using \<open>0 < e1\<close> \<open>0 < e2\<close> by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7801
    qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7802
  qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7803
  then
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7804
  obtain f g where hom: "homeomorphism (cbox w z) (cbox w z) f g"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7805
               and "f w = w" "f z = z"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7806
               and fin: "\<And>x. x \<in> cbox a b \<Longrightarrow> f x \<in> cbox c d"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7807
    using homeomorphism_grouping_point_3 [of a b w z c d]
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7808
    using \<open>box a b \<noteq> {}\<close> \<open>box c d \<noteq> {}\<close> by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7809
  have contfg: "continuous_on (cbox w z) f" "continuous_on (cbox w z) g"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7810
    using hom homeomorphism_def by blast+
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7811
  define f' where "f' \<equiv> \<lambda>x. if x \<in> cbox w z then f x else x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7812
  define g' where "g' \<equiv> \<lambda>x. if x \<in> cbox w z then g x else x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7813
  show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7814
  proof
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7815
    have T: "cbox w z \<union> (T - box w z) = T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7816
      using \<open>cbox w z \<subseteq> S\<close> \<open>S \<subseteq> T\<close> by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7817
    show "homeomorphism T T f' g'"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7818
    proof
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7819
      have clo: "closedin (subtopology euclidean (cbox w z \<union> (T - box w z))) (T - box w z)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7820
        by (metis Diff_Diff_Int Diff_subset T closedin_def open_box openin_open_Int topspace_euclidean_subtopology)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7821
      have "continuous_on (cbox w z \<union> (T - box w z)) f'" "continuous_on (cbox w z \<union> (T - box w z)) g'"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7822
        unfolding f'_def g'_def
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7823
         apply (safe intro!: continuous_on_cases_local contfg continuous_on_id clo)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7824
         apply (simp_all add: closed_subset)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7825
        using \<open>f w = w\<close> \<open>f z = z\<close> apply force
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7826
        by (metis \<open>f w = w\<close> \<open>f z = z\<close> hom homeomorphism_def less_eq_real_def mem_box_real(2))
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7827
      then show "continuous_on T f'" "continuous_on T g'"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7828
        by (simp_all only: T)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7829
      show "f' ` T \<subseteq> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7830
        unfolding f'_def
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7831
        by clarsimp (metis \<open>cbox w z \<subseteq> S\<close> \<open>S \<subseteq> T\<close> subsetD hom homeomorphism_def imageI mem_box_real(2))
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7832
      show "g' ` T \<subseteq> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7833
        unfolding g'_def
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7834
        by clarsimp (metis \<open>cbox w z \<subseteq> S\<close> \<open>S \<subseteq> T\<close> subsetD hom homeomorphism_def imageI mem_box_real(2))
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7835
      show "\<And>x. x \<in> T \<Longrightarrow> g' (f' x) = x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7836
        unfolding f'_def g'_def
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7837
        using homeomorphism_apply1 [OF hom]  homeomorphism_image1 [OF hom] by fastforce
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7838
      show "\<And>y. y \<in> T \<Longrightarrow> f' (g' y) = y"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7839
        unfolding f'_def g'_def
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7840
        using homeomorphism_apply2 [OF hom]  homeomorphism_image2 [OF hom] by fastforce
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7841
    qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7842
    show "\<And>x. x \<in> K \<Longrightarrow> f' x \<in> U"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7843
      using fin sub_wz \<open>K \<subseteq> cbox a b\<close> \<open>cbox c d \<subseteq> U\<close> by (force simp: f'_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7844
    show "{x. \<not> (f' x = x \<and> g' x = x)} \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7845
      using \<open>cbox w z \<subseteq> S\<close> by (auto simp: f'_def g'_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7846
    show "bounded {x. \<not> (f' x = x \<and> g' x = x)}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7847
      apply (rule bounded_subset [of "cbox w z"])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7848
      using bounded_cbox apply blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7849
      apply (auto simp: f'_def g'_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7850
      done
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7851
  qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7852
qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7853
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7854
proposition homeomorphism_grouping_points_exists:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7855
  fixes S :: "'a::euclidean_space set"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7856
  assumes "open U" "open S" "connected S" "U \<noteq> {}" "finite K" "K \<subseteq> S" "U \<subseteq> S" "S \<subseteq> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7857
  obtains f g where "homeomorphism T T f g" "{x. (~ (f x = x \<and> g x = x))} \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7858
                    "bounded {x. (~ (f x = x \<and> g x = x))}" "\<And>x. x \<in> K \<Longrightarrow> f x \<in> U"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7859
proof (cases "2 \<le> DIM('a)")
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7860
  case True
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7861
  have TS: "T \<subseteq> affine hull S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7862
    using affine_hull_open assms by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7863
  have "infinite U"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7864
    using \<open>open U\<close> \<open>U \<noteq> {}\<close> finite_imp_not_open by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7865
  then obtain P where "P \<subseteq> U" "finite P" "card K = card P"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7866
    using infinite_arbitrarily_large by metis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7867
  then obtain \<gamma> where \<gamma>: "bij_betw \<gamma> K P"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7868
    using \<open>finite K\<close> finite_same_card_bij by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7869
  obtain f g where "homeomorphism T T f g" "\<And>i. i \<in> K \<Longrightarrow> f (id i) = \<gamma> i" "{x. \<not> (f x = x \<and> g x = x)} \<subseteq> S" "bounded {x. \<not> (f x = x \<and> g x = x)}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7870
  proof (rule homeomorphism_moving_points_exists [OF True \<open>open S\<close> \<open>connected S\<close> \<open>S \<subseteq> T\<close> \<open>finite K\<close>])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7871
    show "\<And>i. i \<in> K \<Longrightarrow> id i \<in> S \<and> \<gamma> i \<in> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7872
      using \<open>P \<subseteq> U\<close> \<open>bij_betw \<gamma> K P\<close> \<open>K \<subseteq> S\<close> \<open>U \<subseteq> S\<close> bij_betwE by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7873
    show "pairwise (\<lambda>i j. id i \<noteq> id j \<and> \<gamma> i \<noteq> \<gamma> j) K"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7874
      using \<gamma> by (auto simp: pairwise_def bij_betw_def inj_on_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7875
  qed (use affine_hull_open assms that in auto)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7876
  then show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7877
    using \<gamma> \<open>P \<subseteq> U\<close> bij_betwE by (fastforce simp add: intro!: that)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7878
next
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7879
  case False
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7880
  with DIM_positive have "DIM('a) = 1"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7881
    by (simp add: dual_order.antisym)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7882
  then obtain h::"'a \<Rightarrow>real" and j
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7883
  where "linear h" "linear j"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7884
    and noh: "\<And>x. norm(h x) = norm x" and noj: "\<And>y. norm(j y) = norm y"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7885
    and hj:  "\<And>x. j(h x) = x" "\<And>y. h(j y) = y"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7886
    and ranh: "surj h"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7887
    using isomorphisms_UNIV_UNIV
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7888
    by (metis (mono_tags, hide_lams) DIM_real UNIV_eq_I range_eqI)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7889
  obtain f g where hom: "homeomorphism (h ` T) (h ` T) f g"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7890
               and f: "\<And>x. x \<in> h ` K \<Longrightarrow> f x \<in> h ` U"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7891
               and sub: "{x. \<not> (f x = x \<and> g x = x)} \<subseteq> h ` S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7892
               and bou: "bounded {x. \<not> (f x = x \<and> g x = x)}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7893
    apply (rule homeomorphism_grouping_point_4 [of "h ` U" "h ` S" "h ` K" "h ` T"])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7894
    by (simp_all add: assms image_mono  \<open>linear h\<close> open_surjective_linear_image connected_linear_image ranh)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7895
  have jf: "j (f (h x)) = x \<longleftrightarrow> f (h x) = h x" for x
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7896
    by (metis hj)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7897
  have jg: "j (g (h x)) = x \<longleftrightarrow> g (h x) = h x" for x
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7898
    by (metis hj)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7899
  have cont_hj: "continuous_on X h"  "continuous_on Y j" for X Y
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7900
    by (simp_all add: \<open>linear h\<close> \<open>linear j\<close> linear_linear linear_continuous_on)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7901
  show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7902
  proof
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7903
    show "homeomorphism T T (j \<circ> f \<circ> h) (j \<circ> g \<circ> h)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7904
    proof
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7905
      show "continuous_on T (j \<circ> f \<circ> h)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7906
        apply (intro continuous_on_compose cont_hj)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7907
        using hom homeomorphism_def by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7908
      show "continuous_on T (j \<circ> g \<circ> h)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7909
        apply (intro continuous_on_compose cont_hj)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7910
        using hom homeomorphism_def by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7911
      show "(j \<circ> f \<circ> h) ` T \<subseteq> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7912
        by clarsimp (metis (mono_tags, hide_lams) hj(1) hom homeomorphism_def imageE imageI)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7913
      show "(j \<circ> g \<circ> h) ` T \<subseteq> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7914
        by clarsimp (metis (mono_tags, hide_lams) hj(1) hom homeomorphism_def imageE imageI)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7915
      show "\<And>x. x \<in> T \<Longrightarrow> (j \<circ> g \<circ> h) ((j \<circ> f \<circ> h) x) = x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7916
        using hj hom homeomorphism_apply1 by fastforce
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7917
      show "\<And>y. y \<in> T \<Longrightarrow> (j \<circ> f \<circ> h) ((j \<circ> g \<circ> h) y) = y"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7918
        using hj hom homeomorphism_apply2 by fastforce
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7919
    qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7920
    show "{x. \<not> ((j \<circ> f \<circ> h) x = x \<and> (j \<circ> g \<circ> h) x = x)} \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7921
      apply (clarsimp simp: jf jg hj)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7922
      using sub hj
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7923
      apply (drule_tac c="h x" in subsetD, force)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7924
      by (metis imageE)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7925
    have "bounded (j ` {x. (~ (f x = x \<and> g x = x))})"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7926
      apply (rule bounded_linear_image [OF bou])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7927
      using \<open>linear j\<close> linear_conv_bounded_linear by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7928
    moreover
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7929
    have *: "{x. ~((j \<circ> f \<circ> h) x = x \<and> (j \<circ> g \<circ> h) x = x)} = j ` {x. (~ (f x = x \<and> g x = x))}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7930
      using hj apply (auto simp: jf jg image_iff, metis+)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7931
      done
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7932
    ultimately show "bounded {x. \<not> ((j \<circ> f \<circ> h) x = x \<and> (j \<circ> g \<circ> h) x = x)}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7933
      by metis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7934
    show "\<And>x. x \<in> K \<Longrightarrow> (j \<circ> f \<circ> h) x \<in> U"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7935
      using f hj by fastforce
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7936
  qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7937
qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7938
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7939
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7940
proposition homeomorphism_grouping_points_exists_gen:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7941
  fixes S :: "'a::euclidean_space set"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7942
  assumes opeU: "openin (subtopology euclidean S) U"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7943
      and opeS: "openin (subtopology euclidean (affine hull S)) S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7944
      and "U \<noteq> {}" "finite K" "K \<subseteq> S" and S: "S \<subseteq> T" "T \<subseteq> affine hull S" "connected S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7945
  obtains f g where "homeomorphism T T f g" "{x. (~ (f x = x \<and> g x = x))} \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7946
                    "bounded {x. (~ (f x = x \<and> g x = x))}" "\<And>x. x \<in> K \<Longrightarrow> f x \<in> U"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7947
proof (cases "2 \<le> aff_dim S")
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7948
  case True
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7949
  have opeU': "openin (subtopology euclidean (affine hull S)) U"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7950
    using opeS opeU openin_trans by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7951
  obtain u where "u \<in> U" "u \<in> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7952
    using \<open>U \<noteq> {}\<close> opeU openin_imp_subset by fastforce+
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7953
  have "infinite U"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7954
    apply (rule infinite_openin [OF opeU \<open>u \<in> U\<close>])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7955
    apply (rule connected_imp_perfect_aff_dim [OF \<open>connected S\<close> _ \<open>u \<in> S\<close>])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7956
    using True apply simp
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7957
    done
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7958
  then obtain P where "P \<subseteq> U" "finite P" "card K = card P"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7959
    using infinite_arbitrarily_large by metis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7960
  then obtain \<gamma> where \<gamma>: "bij_betw \<gamma> K P"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7961
    using \<open>finite K\<close> finite_same_card_bij by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7962
  have "\<exists>f g. homeomorphism T T f g \<and> (\<forall>i \<in> K. f(id i) = \<gamma> i) \<and>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7963
               {x. ~ (f x = x \<and> g x = x)} \<subseteq> S \<and> bounded {x. ~ (f x = x \<and> g x = x)}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7964
  proof (rule homeomorphism_moving_points_exists_gen [OF \<open>finite K\<close> _ _ True opeS S])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7965
    show "\<And>i. i \<in> K \<Longrightarrow> id i \<in> S \<and> \<gamma> i \<in> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7966
      by (metis id_apply opeU openin_contains_cball subsetCE \<open>P \<subseteq> U\<close> \<open>bij_betw \<gamma> K P\<close> \<open>K \<subseteq> S\<close> bij_betwE)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7967
    show "pairwise (\<lambda>i j. id i \<noteq> id j \<and> \<gamma> i \<noteq> \<gamma> j) K"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7968
      using \<gamma> by (auto simp: pairwise_def bij_betw_def inj_on_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7969
  qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7970
  then show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7971
    using \<gamma> \<open>P \<subseteq> U\<close> bij_betwE by (fastforce simp add: intro!: that)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7972
next
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7973
  case False
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7974
  with aff_dim_geq [of S] consider "aff_dim S = -1" | "aff_dim S = 0" | "aff_dim S = 1" by linarith
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7975
  then show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7976
  proof cases
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7977
    assume "aff_dim S = -1"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7978
    then have "S = {}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7979
      using aff_dim_empty by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7980
    then have "False"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7981
      using \<open>U \<noteq> {}\<close> \<open>K \<subseteq> S\<close> openin_imp_subset [OF opeU] by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7982
    then show ?thesis ..
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7983
  next
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7984
    assume "aff_dim S = 0"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7985
    then obtain a where "S = {a}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7986
      using aff_dim_eq_0 by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7987
    then have "K \<subseteq> U"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7988
      using \<open>U \<noteq> {}\<close> \<open>K \<subseteq> S\<close> openin_imp_subset [OF opeU] by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7989
    show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7990
      apply (rule that [of id id])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7991
      using \<open>K \<subseteq> U\<close> by (auto simp: continuous_on_id intro: homeomorphismI)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7992
  next
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7993
    assume "aff_dim S = 1"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7994
    then have "affine hull S homeomorphic (UNIV :: real set)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7995
      by (auto simp: homeomorphic_affine_sets)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7996
    then obtain h::"'a\<Rightarrow>real" and j where homhj: "homeomorphism (affine hull S) UNIV h j"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7997
      using homeomorphic_def by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7998
    then have h: "\<And>x. x \<in> affine hull S \<Longrightarrow> j(h(x)) = x" and j: "\<And>y. j y \<in> affine hull S \<and> h(j y) = y"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  7999
      by (auto simp: homeomorphism_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8000
    have connh: "connected (h ` S)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8001
      by (meson Topological_Spaces.connected_continuous_image \<open>connected S\<close> homeomorphism_cont1 homeomorphism_of_subsets homhj hull_subset top_greatest)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8002
    have hUS: "h ` U \<subseteq> h ` S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8003
      by (meson homeomorphism_imp_open_map homeomorphism_of_subsets homhj hull_subset opeS opeU open_UNIV openin_open_eq)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8004
    have op: "openin (subtopology euclidean (affine hull S)) U \<Longrightarrow> open (h ` U)" for U
64122
74fde524799e invariance of domain
paulson <lp15@cam.ac.uk>
parents: 64006
diff changeset
  8005
      using homeomorphism_imp_open_map [OF homhj]  by simp
63967
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8006
    have "open (h ` U)" "open (h ` S)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8007
      by (auto intro: opeS opeU openin_trans op)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8008
    then obtain f g where hom: "homeomorphism (h ` T) (h ` T) f g"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8009
                 and f: "\<And>x. x \<in> h ` K \<Longrightarrow> f x \<in> h ` U"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8010
                 and sub: "{x. \<not> (f x = x \<and> g x = x)} \<subseteq> h ` S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8011
                 and bou: "bounded {x. \<not> (f x = x \<and> g x = x)}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8012
      apply (rule homeomorphism_grouping_points_exists [of "h ` U" "h ` S" "h ` K" "h ` T"])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8013
      using assms by (auto simp: connh hUS)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8014
    have jf: "\<And>x. x \<in> affine hull S \<Longrightarrow> j (f (h x)) = x \<longleftrightarrow> f (h x) = h x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8015
      by (metis h j)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8016
    have jg: "\<And>x. x \<in> affine hull S \<Longrightarrow> j (g (h x)) = x \<longleftrightarrow> g (h x) = h x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8017
      by (metis h j)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8018
    have cont_hj: "continuous_on T h"  "continuous_on Y j" for Y
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8019
      apply (rule continuous_on_subset [OF _ \<open>T \<subseteq> affine hull S\<close>])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8020
      using homeomorphism_def homhj apply blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8021
      by (meson continuous_on_subset homeomorphism_def homhj top_greatest)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8022
    define f' where "f' \<equiv> \<lambda>x. if x \<in> affine hull S then (j \<circ> f \<circ> h) x else x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8023
    define g' where "g' \<equiv> \<lambda>x. if x \<in> affine hull S then (j \<circ> g \<circ> h) x else x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8024
    show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8025
    proof
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8026
      show "homeomorphism T T f' g'"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8027
      proof
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8028
        have "continuous_on T (j \<circ> f \<circ> h)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8029
          apply (intro continuous_on_compose cont_hj)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8030
          using hom homeomorphism_def by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8031
        then show "continuous_on T f'"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8032
          apply (rule continuous_on_eq)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8033
          using \<open>T \<subseteq> affine hull S\<close> f'_def by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8034
        have "continuous_on T (j \<circ> g \<circ> h)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8035
          apply (intro continuous_on_compose cont_hj)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8036
          using hom homeomorphism_def by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8037
        then show "continuous_on T g'"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8038
          apply (rule continuous_on_eq)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8039
          using \<open>T \<subseteq> affine hull S\<close> g'_def by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8040
        show "f' ` T \<subseteq> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8041
        proof (clarsimp simp: f'_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8042
          fix x assume "x \<in> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8043
          then have "f (h x) \<in> h ` T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8044
            by (metis (no_types) hom homeomorphism_def image_subset_iff subset_refl)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8045
          then show "j (f (h x)) \<in> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8046
            using \<open>T \<subseteq> affine hull S\<close> h by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8047
        qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8048
        show "g' ` T \<subseteq> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8049
        proof (clarsimp simp: g'_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8050
          fix x assume "x \<in> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8051
          then have "g (h x) \<in> h ` T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8052
            by (metis (no_types) hom homeomorphism_def image_subset_iff subset_refl)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8053
          then show "j (g (h x)) \<in> T"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8054
            using \<open>T \<subseteq> affine hull S\<close> h by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8055
        qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8056
        show "\<And>x. x \<in> T \<Longrightarrow> g' (f' x) = x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8057
          using h j hom homeomorphism_apply1 by (fastforce simp add: f'_def g'_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8058
        show "\<And>y. y \<in> T \<Longrightarrow> f' (g' y) = y"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8059
          using h j hom homeomorphism_apply2 by (fastforce simp add: f'_def g'_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8060
      qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8061
    next
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8062
      show "{x. \<not> (f' x = x \<and> g' x = x)} \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8063
        apply (clarsimp simp: f'_def g'_def jf jg)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8064
        apply (rule imageE [OF subsetD [OF sub]], force)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8065
        by (metis h hull_inc)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8066
    next
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8067
      have "bounded (j ` {x. (~ (f x = x \<and> g x = x))})"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8068
        apply (rule bounded_closure_image)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8069
        apply (rule compact_imp_bounded)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8070
        using bou by (auto simp: compact_continuous_image cont_hj)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8071
      moreover
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8072
      have *: "{x \<in> affine hull S. j (f (h x)) \<noteq> x \<or> j (g (h x)) \<noteq> x} = j ` {x. (~ (f x = x \<and> g x = x))}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8073
        using h j by (auto simp: image_iff; metis)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8074
      ultimately have "bounded {x \<in> affine hull S. j (f (h x)) \<noteq> x \<or> j (g (h x)) \<noteq> x}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8075
        by metis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8076
      then show "bounded {x. \<not> (f' x = x \<and> g' x = x)}"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8077
        by (simp add: f'_def g'_def Collect_mono bounded_subset)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8078
    next
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8079
      show "f' x \<in> U" if "x \<in> K" for x
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8080
      proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8081
        have "U \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8082
          using opeU openin_imp_subset by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8083
        then have "j (f (h x)) \<in> U"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8084
          using f h hull_subset that by fastforce
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8085
        then show "f' x \<in> U"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8086
          using \<open>K \<subseteq> S\<close> S f'_def that by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8087
      qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8088
    qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8089
  qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8090
qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8091
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8092
subsection\<open>nullhomotopic mappings\<close>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8093
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8094
text\<open> A mapping out of a sphere is nullhomotopic iff it extends to the ball.
63978
efc958d2fe00 repair LaTeX
Lars Hupel <lars.hupel@mytum.de>
parents: 63974
diff changeset
  8095
This even works out in the degenerate cases when the radius is \<open>\<le>\<close> 0, and
63967
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8096
we also don't need to explicitly assume continuity since it's already implicit
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8097
in both sides of the equivalence.\<close>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8098
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8099
lemma nullhomotopic_from_lemma:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8100
  assumes contg: "continuous_on (cball a r - {a}) g"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8101
      and fa: "\<And>e. 0 < e
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8102
               \<Longrightarrow> \<exists>d. 0 < d \<and> (\<forall>x. x \<noteq> a \<and> norm(x - a) < d \<longrightarrow> norm(g x - f a) < e)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8103
      and r: "\<And>x. x \<in> cball a r \<and> x \<noteq> a \<Longrightarrow> f x = g x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8104
    shows "continuous_on (cball a r) f"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8105
proof (clarsimp simp: continuous_on_eq_continuous_within Ball_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8106
  fix x
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8107
  assume x: "dist a x \<le> r"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8108
  show "continuous (at x within cball a r) f"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8109
  proof (cases "x=a")
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8110
    case True
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8111
    then show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8112
      by (metis continuous_within_eps_delta fa dist_norm dist_self r)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8113
  next
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8114
    case False
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8115
    show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8116
    proof (rule continuous_transform_within [where f=g and d = "norm(x-a)"])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8117
      have "\<exists>d>0. \<forall>x'\<in>cball a r.
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8118
                      dist x' x < d \<longrightarrow> dist (g x') (g x) < e" if "e>0" for e
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8119
      proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8120
        obtain d where "d > 0"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8121
           and d: "\<And>x'. \<lbrakk>dist x' a \<le> r; x' \<noteq> a; dist x' x < d\<rbrakk> \<Longrightarrow>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8122
                                 dist (g x') (g x) < e"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8123
          using contg False x \<open>e>0\<close>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8124
          unfolding continuous_on_iff by (fastforce simp add: dist_commute intro: that)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8125
        show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8126
          using \<open>d > 0\<close> \<open>x \<noteq> a\<close>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8127
          by (rule_tac x="min d (norm(x - a))" in exI)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8128
             (auto simp: dist_commute dist_norm [symmetric]  intro!: d)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8129
      qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8130
      then show "continuous (at x within cball a r) g"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8131
        using contg False by (auto simp: continuous_within_eps_delta)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8132
      show "0 < norm (x - a)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8133
        using False by force
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8134
      show "x \<in> cball a r"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8135
        by (simp add: x)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8136
      show "\<And>x'. \<lbrakk>x' \<in> cball a r; dist x' x < norm (x - a)\<rbrakk>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8137
        \<Longrightarrow> g x' = f x'"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8138
        by (metis dist_commute dist_norm less_le r)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8139
    qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8140
  qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8141
qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8142
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8143
proposition nullhomotopic_from_sphere_extension:
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8144
  fixes f :: "'M::euclidean_space \<Rightarrow> 'a::real_normed_vector"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8145
  shows  "(\<exists>c. homotopic_with (\<lambda>x. True) (sphere a r) S f (\<lambda>x. c)) \<longleftrightarrow>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8146
          (\<exists>g. continuous_on (cball a r) g \<and> g ` (cball a r) \<subseteq> S \<and>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8147
               (\<forall>x \<in> sphere a r. g x = f x))"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8148
         (is "?lhs = ?rhs")
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8149
proof (cases r "0::real" rule: linorder_cases)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8150
  case less
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8151
  then show ?thesis by simp
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8152
next
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8153
  case equal
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8154
  with continuous_on_const show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8155
    apply (auto simp: homotopic_with)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8156
    apply (rule_tac x="\<lambda>x. h (0, a)" in exI)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8157
    apply (fastforce simp add:)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8158
    done
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8159
next
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8160
  case greater
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8161
  let ?P = "continuous_on {x. norm(x - a) = r} f \<and> f ` {x. norm(x - a) = r} \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8162
  have ?P if ?lhs using that
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8163
  proof
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8164
    fix c
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8165
    assume c: "homotopic_with (\<lambda>x. True) (sphere a r) S f (\<lambda>x. c)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8166
    then have contf: "continuous_on (sphere a r) f" and fim: "f ` sphere a r \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8167
      by (auto simp: homotopic_with_imp_subset1 homotopic_with_imp_continuous)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8168
    show ?P
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8169
      using contf fim by (auto simp: sphere_def dist_norm norm_minus_commute)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8170
  qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8171
  moreover have ?P if ?rhs using that
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8172
  proof
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8173
    fix g
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8174
    assume g: "continuous_on (cball a r) g \<and> g ` cball a r \<subseteq> S \<and> (\<forall>xa\<in>sphere a r. g xa = f xa)"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8175
    then
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8176
    show ?P
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8177
      apply (safe elim!: continuous_on_eq [OF continuous_on_subset])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8178
      apply (auto simp: dist_norm norm_minus_commute)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8179
      by (metis dist_norm image_subset_iff mem_sphere norm_minus_commute sphere_cball subsetCE)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8180
  qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8181
  moreover have ?thesis if ?P
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8182
  proof
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8183
    assume ?lhs
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8184
    then obtain c where "homotopic_with (\<lambda>x. True) (sphere a r) S (\<lambda>x. c) f"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8185
      using homotopic_with_sym by blast
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8186
    then obtain h where conth: "continuous_on ({0..1::real} \<times> sphere a r) h"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8187
                    and him: "h ` ({0..1} \<times> sphere a r) \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8188
                    and h: "\<And>x. h(0, x) = c" "\<And>x. h(1, x) = f x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8189
      by (auto simp: homotopic_with_def)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8190
    obtain b1::'M where "b1 \<in> Basis"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8191
      using SOME_Basis by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8192
    have "c \<in> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8193
      apply (rule him [THEN subsetD])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8194
      apply (rule_tac x = "(0, a + r *\<^sub>R b1)" in image_eqI)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8195
      using h greater \<open>b1 \<in> Basis\<close>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8196
       apply (auto simp: dist_norm)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8197
      done
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8198
    have uconth: "uniformly_continuous_on ({0..1::real} \<times> (sphere a r)) h"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8199
      by (force intro: compact_Times conth compact_uniformly_continuous)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8200
    let ?g = "\<lambda>x. h (norm (x - a)/r,
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8201
                     a + (if x = a then r *\<^sub>R b1 else (r / norm(x - a)) *\<^sub>R (x - a)))"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8202
    let ?g' = "\<lambda>x. h (norm (x - a)/r, a + (r / norm(x - a)) *\<^sub>R (x - a))"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8203
    show ?rhs
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8204
    proof (intro exI conjI)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8205
      have "continuous_on (cball a r - {a}) ?g'"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8206
        apply (rule continuous_on_compose2 [OF conth])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8207
         apply (intro continuous_intros)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8208
        using greater apply (auto simp: dist_norm norm_minus_commute)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8209
        done
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8210
      then show "continuous_on (cball a r) ?g"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8211
      proof (rule nullhomotopic_from_lemma)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8212
        show "\<exists>d>0. \<forall>x. x \<noteq> a \<and> norm (x - a) < d \<longrightarrow> norm (?g' x - ?g a) < e" if "0 < e" for e
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8213
        proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8214
          obtain d where "0 < d"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8215
             and d: "\<And>x x'. \<lbrakk>x \<in> {0..1} \<times> sphere a r; x' \<in> {0..1} \<times> sphere a r; dist x' x < d\<rbrakk>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8216
                        \<Longrightarrow> dist (h x') (h x) < e"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8217
            using uniformly_continuous_onE [OF uconth \<open>0 < e\<close>] by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8218
          have *: "norm (h (norm (x - a) / r,
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8219
                         a + (r / norm (x - a)) *\<^sub>R (x - a)) - h (0, a + r *\<^sub>R b1)) < e"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8220
                   if "x \<noteq> a" "norm (x - a) < r" "norm (x - a) < d * r" for x
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8221
          proof -
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8222
            have "norm (h (norm (x - a) / r, a + (r / norm (x - a)) *\<^sub>R (x - a)) - h (0, a + r *\<^sub>R b1)) =
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8223
                  norm (h (norm (x - a) / r, a + (r / norm (x - a)) *\<^sub>R (x - a)) - h (0, a + (r / norm (x - a)) *\<^sub>R (x - a)))"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8224
              by (simp add: h)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8225
            also have "... < e"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8226
              apply (rule d [unfolded dist_norm])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8227
              using greater \<open>0 < d\<close> \<open>b1 \<in> Basis\<close> that
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8228
                by (auto simp: dist_norm divide_simps)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8229
            finally show ?thesis .
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8230
          qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8231
          show ?thesis
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8232
            apply (rule_tac x = "min r (d * r)" in exI)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8233
            using greater \<open>0 < d\<close> by (auto simp: *)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8234
        qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8235
        show "\<And>x. x \<in> cball a r \<and> x \<noteq> a \<Longrightarrow> ?g x = ?g' x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8236
          by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8237
      qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8238
    next
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8239
      show "?g ` cball a r \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8240
        using greater him \<open>c \<in> S\<close>
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8241
        by (force simp: h dist_norm norm_minus_commute)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8242
    next
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8243
      show "\<forall>x\<in>sphere a r. ?g x = f x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8244
        using greater by (auto simp: h dist_norm norm_minus_commute)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8245
    qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8246
  next
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8247
    assume ?rhs
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8248
    then obtain g where contg: "continuous_on (cball a r) g"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8249
                    and gim: "g ` cball a r \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8250
                    and gf: "\<forall>x \<in> sphere a r. g x = f x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8251
      by auto
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8252
    let ?h = "\<lambda>y. g (a + (fst y) *\<^sub>R (snd y - a))"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8253
    have "continuous_on ({0..1} \<times> sphere a r) ?h"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8254
      apply (rule continuous_on_compose2 [OF contg])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8255
       apply (intro continuous_intros)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8256
      apply (auto simp: dist_norm norm_minus_commute mult_left_le_one_le)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8257
      done
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8258
    moreover
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8259
    have "?h ` ({0..1} \<times> sphere a r) \<subseteq> S"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8260
      by (auto simp: dist_norm norm_minus_commute mult_left_le_one_le gim [THEN subsetD])
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8261
    moreover
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8262
    have "\<forall>x\<in>sphere a r. ?h (0, x) = g a" "\<forall>x\<in>sphere a r. ?h (1, x) = f x"
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8263
      by (auto simp: dist_norm norm_minus_commute mult_left_le_one_le gf)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8264
    ultimately
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8265
    show ?lhs
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8266
      apply (subst homotopic_with_sym)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8267
      apply (rule_tac x="g a" in exI)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8268
      apply (auto simp: homotopic_with)
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8269
      done
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8270
  qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8271
  ultimately
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8272
  show ?thesis by meson
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8273
qed
2aa42596edc3 new material on paths, etc. Also rationalisation
paulson <lp15@cam.ac.uk>
parents: 63955
diff changeset
  8274
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  8275
end