src/HOL/Multivariate_Analysis/Path_Connected.thy
author paulson <lp15@cam.ac.uk>
Tue, 14 Jun 2016 15:34:21 +0100
changeset 63301 d3c87eb0bad2
parent 63151 82df5181d699
child 63305 3b6975875633
permissions -rw-r--r--
new results about topology
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
41959
b460124855b8 tuned headers;
wenzelm
parents: 39302
diff changeset
     1
(*  Title:      HOL/Multivariate_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
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
     8
imports Convex_Euclidean_Space
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
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   137
lemma arc_imp_simple_path: "arc g \<Longrightarrow> simple_path g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   138
  by (simp add: arc_def inj_on_def simple_path_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   139
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   140
lemma arc_imp_path: "arc g \<Longrightarrow> path g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   141
  using arc_def by blast
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 simple_path_imp_path: "simple_path g \<Longrightarrow> path g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   144
  using simple_path_def by blast
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   145
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   146
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
   147
  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
   148
  by (force)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   149
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   150
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
   151
  using simple_path_cases by auto
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   152
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   153
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
   154
  unfolding arc_def inj_on_def pathfinish_def pathstart_def
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   155
  by fastforce
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   156
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   157
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
   158
  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
   159
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   160
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
   161
  by (simp add: arc_simple_path)
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   162
60974
6a6f15d8fbc4 New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents: 60809
diff changeset
   163
lemma path_image_nonempty [simp]: "path_image g \<noteq> {}"
56188
0268784f60da use cbox to relax class constraints
immler
parents: 53640
diff changeset
   164
  unfolding path_image_def image_is_empty box_eq_empty
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   165
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   166
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   167
lemma pathstart_in_path_image[intro]: "pathstart g \<in> path_image g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   168
  unfolding pathstart_def path_image_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   169
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   170
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   171
lemma pathfinish_in_path_image[intro]: "pathfinish g \<in> path_image g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   172
  unfolding pathfinish_def path_image_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   173
  by auto
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   174
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   175
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
   176
  unfolding path_def path_image_def
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   177
  using connected_continuous_image connected_Icc by blast
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   178
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   179
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
   180
  unfolding path_def path_image_def
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   181
  using compact_continuous_image connected_Icc by blast
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   182
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   183
lemma reversepath_reversepath[simp]: "reversepath (reversepath g) = g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   184
  unfolding reversepath_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   185
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   186
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   187
lemma pathstart_reversepath[simp]: "pathstart (reversepath g) = pathfinish g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   188
  unfolding pathstart_def reversepath_def pathfinish_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   189
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   190
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   191
lemma pathfinish_reversepath[simp]: "pathfinish (reversepath g) = pathstart g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   192
  unfolding pathstart_def reversepath_def pathfinish_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   193
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   194
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   195
lemma pathstart_join[simp]: "pathstart (g1 +++ g2) = pathstart g1"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   196
  unfolding pathstart_def joinpaths_def pathfinish_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   197
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   198
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   199
lemma pathfinish_join[simp]: "pathfinish (g1 +++ g2) = pathfinish g2"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   200
  unfolding pathstart_def joinpaths_def pathfinish_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   201
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   202
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   203
lemma path_image_reversepath[simp]: "path_image (reversepath g) = path_image g"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   204
proof -
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   205
  have *: "\<And>g. path_image (reversepath g) \<subseteq> path_image g"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   206
    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
   207
    by force
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   208
  show ?thesis
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   209
    using *[of g] *[of "reversepath g"]
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   210
    unfolding reversepath_reversepath
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   211
    by auto
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   212
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   213
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   214
lemma path_reversepath [simp]: "path (reversepath g) \<longleftrightarrow> path g"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   215
proof -
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   216
  have *: "\<And>g. path g \<Longrightarrow> path (reversepath g)"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   217
    unfolding path_def reversepath_def
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   218
    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
   219
    apply (intro continuous_intros)
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   220
    apply (rule continuous_on_subset[of "{0..1}"])
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   221
    apply assumption
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   222
    apply auto
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   223
    done
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   224
  show ?thesis
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   225
    using *[of "reversepath g"] *[of g]
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   226
    unfolding reversepath_reversepath
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   227
    by (rule iffI)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   228
qed
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   229
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   230
lemma arc_reversepath:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   231
  assumes "arc g" shows "arc(reversepath g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   232
proof -
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   233
  have injg: "inj_on g {0..1}"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   234
    using assms
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   235
    by (simp add: arc_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   236
  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
   237
    by simp
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   238
  show ?thesis
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   239
    apply (auto simp: arc_def inj_on_def path_reversepath)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   240
    apply (simp add: arc_imp_path assms)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   241
    apply (rule **)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   242
    apply (rule inj_onD [OF injg])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   243
    apply (auto simp: reversepath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   244
    done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   245
qed
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   246
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   247
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
   248
  apply (simp add: simple_path_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   249
  apply (force simp: reversepath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   250
  done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   251
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   252
lemmas reversepath_simps =
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   253
  path_reversepath path_image_reversepath pathstart_reversepath pathfinish_reversepath
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   254
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   255
lemma path_join[simp]:
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   256
  assumes "pathfinish g1 = pathstart g2"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   257
  shows "path (g1 +++ g2) \<longleftrightarrow> path g1 \<and> path g2"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   258
  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
   259
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
   260
  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
   261
  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
   262
    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
   263
  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
   264
    using assms
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   265
    by (intro continuous_on_cong refl) (auto simp: joinpaths_def pathfinish_def pathstart_def)
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   266
  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
   267
    unfolding g1 g2
56371
fb9ae0727548 extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents: 56188
diff changeset
   268
    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
   269
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
   270
  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
   271
  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
   272
    by auto
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   273
  {
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   274
    fix x :: real
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   275
    assume "0 \<le> x" and "x \<le> 1"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   276
    then have "x \<in> (\<lambda>x. x * 2) ` {0..1 / 2}"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   277
      by (intro image_eqI[where x="x/2"]) auto
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   278
  }
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
   279
  note 1 = this
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   280
  {
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   281
    fix x :: real
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   282
    assume "0 \<le> x" and "x \<le> 1"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   283
    then have "x \<in> (\<lambda>x. x * 2 - 1) ` {1 / 2..1}"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   284
      by (intro image_eqI[where x="x/2 + 1/2"]) auto
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   285
  }
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
   286
  note 2 = this
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   287
  show "continuous_on {0..1} (g1 +++ g2)"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   288
    using assms
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   289
    unfolding joinpaths_def 01
56371
fb9ae0727548 extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents: 56188
diff changeset
   290
    apply (intro continuous_on_cases closed_atLeastAtMost g1g2[THEN continuous_on_compose2] continuous_intros)
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   291
    apply (auto simp: field_simps pathfinish_def pathstart_def intro!: 1 2)
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   292
    done
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   293
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   294
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   295
section \<open>Path Images\<close>
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   296
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   297
lemma bounded_path_image: "path g \<Longrightarrow> bounded(path_image g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   298
  by (simp add: compact_imp_bounded compact_path_image)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   299
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   300
lemma closed_path_image:
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   301
  fixes g :: "real \<Rightarrow> 'a::t2_space"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   302
  shows "path g \<Longrightarrow> closed(path_image g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   303
  by (metis compact_path_image compact_imp_closed)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   304
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   305
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
   306
  by (metis connected_path_image simple_path_imp_path)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   307
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   308
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
   309
  by (metis compact_path_image simple_path_imp_path)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   310
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   311
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
   312
  by (metis bounded_path_image simple_path_imp_path)
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 closed_simple_path_image:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   315
  fixes g :: "real \<Rightarrow> 'a::t2_space"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   316
  shows "simple_path g \<Longrightarrow> closed(path_image g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   317
  by (metis closed_path_image simple_path_imp_path)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   318
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   319
lemma connected_arc_image: "arc g \<Longrightarrow> connected(path_image g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   320
  by (metis connected_path_image arc_imp_path)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   321
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   322
lemma compact_arc_image: "arc g \<Longrightarrow> compact(path_image g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   323
  by (metis compact_path_image arc_imp_path)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   324
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   325
lemma bounded_arc_image: "arc g \<Longrightarrow> bounded(path_image g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   326
  by (metis bounded_path_image arc_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 closed_arc_image:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   329
  fixes g :: "real \<Rightarrow> 'a::t2_space"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   330
  shows "arc g \<Longrightarrow> closed(path_image g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   331
  by (metis closed_path_image arc_imp_path)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   332
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   333
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
   334
  unfolding path_image_def joinpaths_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   335
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   336
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   337
lemma subset_path_image_join:
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   338
  assumes "path_image g1 \<subseteq> s"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   339
    and "path_image g2 \<subseteq> s"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   340
  shows "path_image (g1 +++ g2) \<subseteq> s"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   341
  using path_image_join_subset[of g1 g2] and assms
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   342
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   343
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   344
lemma path_image_join:
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   345
    "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
   346
  apply (rule subset_antisym [OF path_image_join_subset])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   347
  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
   348
  apply (drule sym)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   349
  apply (rule_tac x="xa/2" in bexI, auto)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   350
  apply (rule ccontr)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   351
  apply (drule_tac x="(xa+1)/2" in bspec)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   352
  apply (auto simp: field_simps)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   353
  apply (drule_tac x="1/2" in bspec, auto)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   354
  done
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   355
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   356
lemma not_in_path_image_join:
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   357
  assumes "x \<notin> path_image g1"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   358
    and "x \<notin> path_image g2"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   359
  shows "x \<notin> path_image (g1 +++ g2)"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   360
  using assms and path_image_join_subset[of g1 g2]
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   361
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   362
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   363
lemma pathstart_compose: "pathstart(f o p) = f(pathstart p)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   364
  by (simp add: pathstart_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   365
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   366
lemma pathfinish_compose: "pathfinish(f o p) = f(pathfinish p)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   367
  by (simp add: pathfinish_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   368
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   369
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
   370
  by (simp add: image_comp path_image_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   371
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   372
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
   373
  by (rule ext) (simp add: joinpaths_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 path_compose_reversepath: "f o reversepath p = reversepath(f o p)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   376
  by (rule ext) (simp add: reversepath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   377
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
   378
lemma joinpaths_eq:
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   379
  "(\<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
   380
   (\<And>t. t \<in> {0..1} \<Longrightarrow> q t = q' t)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   381
   \<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
   382
  by (auto simp: 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 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
   385
  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
   386
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   387
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   388
subsection\<open>Simple paths with the endpoints removed\<close>
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   389
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   390
lemma simple_path_endless:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   391
    "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
   392
  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
   393
  apply (metis eq_iff le_less_linear)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   394
  apply (metis leD linear)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   395
  using less_eq_real_def zero_le_one apply blast
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   396
  using less_eq_real_def zero_le_one apply blast
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   397
  done
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   398
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   399
lemma connected_simple_path_endless:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   400
    "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
   401
apply (simp add: simple_path_endless)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   402
apply (rule connected_continuous_image)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   403
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
   404
by auto
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   405
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   406
lemma nonempty_simple_path_endless:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   407
    "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
   408
  by (simp add: simple_path_endless)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   409
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   410
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
   411
subsection\<open>The operations on paths\<close>
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   412
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   413
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
   414
  by (auto simp: path_image_def reversepath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   415
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   416
lemma path_imp_reversepath: "path g \<Longrightarrow> path(reversepath g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   417
  apply (auto simp: path_def reversepath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   418
  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
   419
  apply (auto simp: continuous_on_op_minus)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   420
  done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   421
61204
3e491e34a62e new lemmas and movement of lemmas into place
paulson
parents: 60974
diff changeset
   422
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
   423
  by simp
60303
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 continuous_on_joinpaths:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   426
  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
   427
    shows "continuous_on {0..1} (g1 +++ g2)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   428
proof -
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   429
  have *: "{0..1::real} = {0..1/2} \<union> {1/2..1}"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   430
    by auto
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   431
  have gg: "g2 0 = g1 1"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   432
    by (metis assms(3) pathfinish_def pathstart_def)
61204
3e491e34a62e new lemmas and movement of lemmas into place
paulson
parents: 60974
diff changeset
   433
  have 1: "continuous_on {0..1/2} (g1 +++ g2)"
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   434
    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
   435
    apply (rule continuous_intros | simp add: joinpaths_def assms)+
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   436
    done
61204
3e491e34a62e new lemmas and movement of lemmas into place
paulson
parents: 60974
diff changeset
   437
  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
   438
    apply (rule continuous_on_subset [of "{1/2..1}"])
3e491e34a62e new lemmas and movement of lemmas into place
paulson
parents: 60974
diff changeset
   439
    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
   440
    done
3e491e34a62e new lemmas and movement of lemmas into place
paulson
parents: 60974
diff changeset
   441
  then have 2: "continuous_on {1/2..1} (g1 +++ g2)"
3e491e34a62e new lemmas and movement of lemmas into place
paulson
parents: 60974
diff changeset
   442
    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
   443
    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
   444
    done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   445
  show ?thesis
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   446
    apply (subst *)
62397
5ae24f33d343 Substantial new material for multivariate analysis. Also removal of some duplicates.
paulson <lp15@cam.ac.uk>
parents: 62381
diff changeset
   447
    apply (rule continuous_on_closed_Un)
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   448
    using 1 2
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   449
    apply auto
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   450
    done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   451
qed
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   452
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   453
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
   454
  by (simp add: path_join)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   455
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   456
lemma simple_path_join_loop:
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   457
  assumes "arc g1" "arc g2"
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   458
          "pathfinish g1 = pathstart g2"  "pathfinish g2 = pathstart g1"
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   459
          "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
   460
  shows "simple_path(g1 +++ g2)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   461
proof -
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   462
  have injg1: "inj_on g1 {0..1}"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   463
    using assms
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   464
    by (simp add: arc_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   465
  have injg2: "inj_on g2 {0..1}"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   466
    using assms
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   467
    by (simp add: arc_def)
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   468
  have g12: "g1 1 = g2 0"
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   469
   and g21: "g2 1 = g1 0"
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   470
   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
   471
    using assms
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   472
    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
   473
  { fix x and y::real
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   474
    assume xyI: "x = 1 \<longrightarrow> y \<noteq> 0"
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   475
       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
   476
    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
   477
      using xy
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   478
      apply simp
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   479
      apply (rule_tac x="2 * x - 1" in image_eqI, auto)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   480
      done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   481
    have False
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   482
      using subsetD [OF sb g1im] xy
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   483
      apply auto
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   484
      apply (drule inj_onD [OF injg1])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   485
      using g21 [symmetric] xyI
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   486
      apply (auto dest: inj_onD [OF injg2])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   487
      done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   488
   } note * = this
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   489
  { fix x and y::real
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   490
    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
   491
    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
   492
      using xy
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   493
      apply simp
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   494
      apply (rule_tac x="2 * x" in image_eqI, auto)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   495
      done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   496
    have "x = 0 \<and> y = 1"
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   497
      using subsetD [OF sb g1im] xy
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   498
      apply auto
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   499
      apply (force dest: inj_onD [OF injg1])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   500
      using  g21 [symmetric]
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   501
      apply (auto dest: inj_onD [OF injg2])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   502
      done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   503
   } note ** = this
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   504
  show ?thesis
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   505
    using assms
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   506
    apply (simp add: arc_def simple_path_def path_join, clarify)
62390
842917225d56 more canonical names
nipkow
parents: 62087
diff changeset
   507
    apply (simp add: joinpaths_def split: if_split_asm)
60303
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
    apply (metis *)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   510
    apply (metis **)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   511
    apply (force dest: inj_onD [OF injg2])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   512
    done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   513
qed
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   514
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   515
lemma arc_join:
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   516
  assumes "arc g1" "arc g2"
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   517
          "pathfinish g1 = pathstart g2"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   518
          "path_image g1 \<inter> path_image g2 \<subseteq> {pathstart g2}"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   519
    shows "arc(g1 +++ g2)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   520
proof -
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   521
  have injg1: "inj_on g1 {0..1}"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   522
    using assms
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   523
    by (simp add: arc_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   524
  have injg2: "inj_on g2 {0..1}"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   525
    using assms
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   526
    by (simp add: arc_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   527
  have g11: "g1 1 = g2 0"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   528
   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
   529
    using assms
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   530
    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
   531
  { fix x and y::real
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   532
    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
   533
    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
   534
      using xy
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   535
      apply simp
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   536
      apply (rule_tac x="2 * x - 1" in image_eqI, auto)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   537
      done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   538
    have False
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   539
      using subsetD [OF sb g1im] xy
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   540
      by (auto dest: inj_onD [OF injg2])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   541
   } note * = this
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   542
  show ?thesis
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   543
    apply (simp add: arc_def inj_on_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   544
    apply (clarsimp simp add: arc_imp_path assms path_join)
62390
842917225d56 more canonical names
nipkow
parents: 62087
diff changeset
   545
    apply (simp add: joinpaths_def split: if_split_asm)
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   546
    apply (force dest: inj_onD [OF injg1])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   547
    apply (metis *)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   548
    apply (metis *)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   549
    apply (force dest: inj_onD [OF injg2])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   550
    done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   551
qed
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   552
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   553
lemma reversepath_joinpaths:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   554
    "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
   555
  unfolding reversepath_def pathfinish_def pathstart_def joinpaths_def
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   556
  by (rule ext) (auto simp: mult.commute)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   557
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   558
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   559
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
   560
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   561
lemma path_join_path_ends: 
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   562
  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
   563
  assumes "path(g1 +++ g2)" "path g2" 
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   564
    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
   565
proof (rule ccontr)
63040
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 63016
diff changeset
   566
  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
   567
  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
   568
  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
   569
    by auto
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   570
  then have "e > 0"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   571
    by (metis e_def pathfinish_def pathstart_def) 
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   572
  then obtain d1 where "d1 > 0" 
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   573
       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
   574
    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
   575
    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
   576
    by (metis half_gt_zero_iff norm_conv_dist)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   577
  obtain d2 where "d2 > 0" 
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   578
       and d2: "\<And>x'. \<lbrakk>x'\<in>{0..1}; dist x' (1/2) < d2\<rbrakk> 
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   579
                      \<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
   580
    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
   581
    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
   582
    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
   583
    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
   584
    done
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   585
  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
   586
    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
   587
  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
   588
    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
   589
  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
   590
    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
   591
  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
   592
    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
   593
  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
   594
    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
   595
  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
   596
       "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
   597
    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
   598
  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
   599
    using dist_triangle_half_r e_def by blast
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   600
  then show False 
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   601
    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
   602
qed
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   603
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   604
lemma path_join_eq [simp]:  
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   605
  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
   606
  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
   607
    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
   608
  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
   609
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   610
lemma simple_path_joinE: 
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   611
  assumes "simple_path(g1 +++ g2)" and "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
   612
  obtains "arc g1" "arc g2" 
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   613
          "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
   614
proof -
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   615
  have *: "\<And>x y. \<lbrakk>0 \<le> x; x \<le> 1; 0 \<le> y; y \<le> 1; (g1 +++ g2) x = (g1 +++ g2) y\<rbrakk> 
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   616
               \<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
   617
    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
   618
  have "path g1" 
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   619
    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
   620
  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
   621
  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
   622
    fix x y
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   623
    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
   624
    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
   625
      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
   626
  qed
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   627
  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
   628
    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
   629
  have [simp]: "g2 0 = g1 1"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   630
    using assms by (metis pathfinish_def pathstart_def) 
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   631
  have "path g2"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   632
    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
   633
  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
   634
  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
   635
    fix x y
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   636
    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
   637
    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
   638
      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
   639
      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
   640
  qed
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   641
  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
   642
    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
   643
  have "g2 y = g1 0 \<or> g2 y = g1 1" 
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   644
       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
   645
      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
   646
      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
   647
  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
   648
    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
   649
  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
   650
qed
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   651
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   652
lemma simple_path_join_loop_eq:
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   653
  assumes "pathfinish g2 = pathstart g1" "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
   654
    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
   655
             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
   656
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
   657
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   658
lemma arc_join_eq:
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   659
  assumes "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
   660
    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
   661
           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
   662
           (is "?lhs = ?rhs")
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   663
proof 
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   664
  assume ?lhs
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   665
  then have "simple_path(g1 +++ g2)" by (rule arc_imp_simple_path)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   666
  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> 
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   667
               \<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
   668
    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
   669
  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
   670
    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
   671
    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
   672
  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
   673
    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
   674
    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
   675
  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
   676
    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
   677
    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
   678
next
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   679
  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
   680
    using assms
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   681
    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
   682
qed
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   683
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   684
lemma arc_join_eq_alt: 
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   685
        "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
   686
        \<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
   687
             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
   688
             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
   689
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
   690
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   691
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   692
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
   693
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   694
lemma path_assoc:
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   695
    "\<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
   696
     \<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
   697
by simp
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   698
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   699
lemma simple_path_assoc: 
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   700
  assumes "pathfinish p = pathstart q" "pathfinish q = pathstart r" 
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   701
    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
   702
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
   703
  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
   704
  proof
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   705
    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
   706
    with assms True show "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
   707
      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
   708
                    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
   709
  next
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   710
    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
   711
    with assms True have q: "pathfinish r \<notin> path_image q"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   712
      using arc_distinct_ends  
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   713
      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
   714
    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
   715
      using assms
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   716
      by (metis 0 IntI arc_distinct_ends arc_join_eq_alt empty_iff insert_iff 
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   717
              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
   718
    with assms 0 q True show "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
   719
      by (auto simp: 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
   720
               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
   721
  qed
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   722
next
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   723
  case False
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   724
  { fix x :: 'a
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   725
    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
   726
              "(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
   727
              "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
   728
    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
   729
      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
   730
    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
   731
      by blast
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   732
  }
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   733
  with False assms show ?thesis 
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   734
    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
   735
qed
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   736
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   737
lemma arc_assoc: 
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   738
     "\<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
   739
      \<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
   740
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
   741
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
   742
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
   743
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
   744
lemma path_sym:
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
   745
    "\<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
   746
  by auto
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
   747
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
   748
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
   749
    "\<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
   750
     \<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
   751
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
   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_image_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>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
   755
     \<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
   756
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
   757
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
   758
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   759
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
   760
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   761
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
   762
  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
   763
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
   764
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
   765
  fixes g :: "_ \<Rightarrow> 'a::real_normed_vector"
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   766
  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
   767
  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
   768
  apply (subst o_def [of g, symmetric])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   769
  apply (simp add: image_comp [symmetric])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   770
  done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   771
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
   772
lemma path_image_subpath:
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   773
  fixes g :: "real \<Rightarrow> 'a::real_normed_vector"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   774
  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
   775
  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
   776
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   777
lemma path_subpath [simp]:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   778
  fixes g :: "real \<Rightarrow> 'a::real_normed_vector"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   779
  assumes "path g" "u \<in> {0..1}" "v \<in> {0..1}"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   780
    shows "path(subpath u v g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   781
proof -
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   782
  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
   783
    apply (rule continuous_intros | simp)+
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   784
    apply (simp add: image_affinity_atLeastAtMost [where c=u])
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   785
    using assms
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   786
    apply (auto simp: path_def continuous_on_subset)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   787
    done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   788
  then show ?thesis
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   789
    by (simp add: path_def subpath_def)
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   790
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   791
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   792
lemma pathstart_subpath [simp]: "pathstart(subpath u v g) = g(u)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   793
  by (simp add: pathstart_def subpath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   794
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   795
lemma pathfinish_subpath [simp]: "pathfinish(subpath u v g) = g(v)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   796
  by (simp add: pathfinish_def subpath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   797
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   798
lemma subpath_trivial [simp]: "subpath 0 1 g = g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   799
  by (simp add: subpath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   800
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   801
lemma subpath_reversepath: "subpath 1 0 g = reversepath g"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   802
  by (simp add: reversepath_def subpath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   803
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   804
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
   805
  by (simp add: reversepath_def subpath_def algebra_simps)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   806
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   807
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
   808
  by (rule ext) (simp add: subpath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   809
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   810
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
   811
  by (rule ext) (simp add: subpath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   812
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   813
lemma affine_ineq:
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   814
  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
   815
  assumes "x \<le> 1" "v \<le> u"
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   816
    shows "v + x * u \<le> u + x * v"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   817
proof -
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   818
  have "(1-x)*(u-v) \<ge> 0"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   819
    using assms by auto
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   820
  then show ?thesis
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   821
    by (simp add: algebra_simps)
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
   822
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
   823
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
   824
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
   825
  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
   826
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
   827
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   828
lemma simple_path_subpath_eq:
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   829
  "simple_path(subpath u v g) \<longleftrightarrow>
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   830
     path(subpath u v g) \<and> u\<noteq>v \<and>
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   831
     (\<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
   832
                \<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
   833
    (is "?lhs = ?rhs")
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   834
proof (rule iffI)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   835
  assume ?lhs
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   836
  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
   837
        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
   838
                  \<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
   839
    by (auto simp: simple_path_def subpath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   840
  { fix x y
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   841
    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
   842
    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
   843
    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
   844
    by (auto simp: closed_segment_real_eq image_affinity_atLeastAtMost divide_simps
62390
842917225d56 more canonical names
nipkow
parents: 62087
diff changeset
   845
       split: if_split_asm)
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   846
  } moreover
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   847
  have "path(subpath u v g) \<and> u\<noteq>v"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   848
    using sim [of "1/3" "2/3"] p
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   849
    by (auto simp: subpath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   850
  ultimately show ?rhs
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   851
    by metis
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   852
next
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   853
  assume ?rhs
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   854
  then
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   855
  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
   856
   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
   857
   and ne: "u < v \<or> v < u"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   858
   and psp: "path (subpath u v g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   859
    by (auto simp: closed_segment_real_eq image_affinity_atLeastAtMost)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   860
  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
   861
    by algebra
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   862
  show ?lhs using psp ne
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   863
    unfolding simple_path_def subpath_def
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   864
    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
   865
qed
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   866
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   867
lemma arc_subpath_eq:
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   868
  "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
   869
    (is "?lhs = ?rhs")
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   870
proof (rule iffI)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   871
  assume ?lhs
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   872
  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
   873
        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
   874
                  \<Longrightarrow> x = y)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   875
    by (auto simp: arc_def inj_on_def subpath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   876
  { fix x y
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   877
    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
   878
    then have "x = y"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   879
    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
   880
    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
   881
       split: if_split_asm)
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   882
  } moreover
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   883
  have "path(subpath u v g) \<and> u\<noteq>v"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   884
    using sim [of "1/3" "2/3"] p
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   885
    by (auto simp: subpath_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   886
  ultimately show ?rhs
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   887
    unfolding inj_on_def
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   888
    by metis
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   889
next
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   890
  assume ?rhs
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   891
  then
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   892
  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
   893
   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
   894
   and ne: "u < v \<or> v < u"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   895
   and psp: "path (subpath u v g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   896
    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
   897
  show ?lhs using psp ne
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   898
    unfolding arc_def subpath_def inj_on_def
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   899
    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
   900
qed
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   901
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   902
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   903
lemma simple_path_subpath:
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   904
  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
   905
  shows "simple_path(subpath u v g)"
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   906
  using assms
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   907
  apply (simp add: simple_path_subpath_eq simple_path_imp_path)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   908
  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
   909
  done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   910
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   911
lemma arc_simple_path_subpath:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   912
    "\<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
   913
  by (force intro: simple_path_subpath simple_path_imp_arc)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   914
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   915
lemma arc_subpath_arc:
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   916
    "\<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
   917
  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
   918
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   919
lemma arc_simple_path_subpath_interior:
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   920
    "\<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
   921
    apply (rule arc_simple_path_subpath)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   922
    apply (force simp: simple_path_def)+
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
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
   925
lemma path_image_subpath_subset:
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   926
    "\<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
   927
  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
   928
  apply (auto simp: path_image_def)
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   929
  done
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   930
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
   931
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
   932
  by (rule ext) (simp add: joinpaths_def subpath_def divide_simps)
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
   933
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   934
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
   935
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   936
lemma subpath_to_frontier_explicit:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   937
    fixes S :: "'a::metric_space set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   938
    assumes g: "path g" and "pathfinish g \<notin> S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   939
    obtains u where "0 \<le> u" "u \<le> 1"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   940
                "\<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
   941
                "(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
   942
proof -
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   943
  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
   944
  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
   945
    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
   946
    using compact_eq_bounded_closed apply fastforce
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   947
    done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   948
  have "1 \<in> {u. g u \<in> closure (- S)}"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   949
    using assms by (simp add: pathfinish_def closure_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   950
  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
   951
    using atLeastAtMost_iff zero_le_one by blast
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   952
  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
   953
                  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
   954
    using compact_attains_inf [OF com dis] by fastforce
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   955
  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
   956
    using closure_def by fastforce
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   957
  { assume "u \<noteq> 0"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
   958
    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
   959
    { 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
   960
      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
   961
        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
   962
      have *: "dist (max 0 (u - d / 2)) u \<le> d"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
   963
        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
   964
      have "\<exists>y\<in>S. dist y (g u) < e"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
   965
        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
   966
        by (force intro: d [OF _ *] umin')
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   967
    }
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   968
    then have "g u \<in> closure S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   969
      by (simp add: frontier_def closure_approachable)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   970
  }
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   971
  then show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   972
    apply (rule_tac u=u in that)
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
   973
    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
   974
    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
   975
    done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   976
qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   977
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   978
lemma subpath_to_frontier_strong:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   979
    assumes g: "path g" and "pathfinish g \<notin> S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   980
    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
   981
                    "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
   982
proof -
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   983
  obtain u where "0 \<le> u" "u \<le> 1"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   984
             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
   985
             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
   986
    using subpath_to_frontier_explicit [OF assms] by blast
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   987
  show ?thesis
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
   988
    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
   989
    apply (simp add: gunot)
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
   990
    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
   991
qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   992
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   993
lemma subpath_to_frontier:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   994
    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
   995
    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
   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 notin: "g u \<notin> interior S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
   999
             and disj: "u = 0 \<or>
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1000
                        (\<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
  1001
    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
  1002
  show ?thesis
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  1003
    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
  1004
    apply (metis DiffI disj frontier_def g0 notin pathstart_def)
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  1005
    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
  1006
    apply (simp add: path_image_subpath_gen)
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1007
    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
  1008
    apply (rename_tac y)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1009
    apply (drule_tac x="y/u" in spec)
62390
842917225d56 more canonical names
nipkow
parents: 62087
diff changeset
  1010
    apply (auto split: if_split_asm)
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1011
    done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1012
qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1013
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1014
lemma exists_path_subpath_to_frontier:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1015
    fixes S :: "'a::real_normed_vector set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1016
    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
  1017
    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
  1018
                    "path_image h - {pathfinish h} \<subseteq> interior S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1019
                    "pathfinish h \<in> frontier S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1020
proof -
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1021
  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
  1022
    using subpath_to_frontier [OF assms] by blast
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1023
  show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1024
    apply (rule that [of "subpath 0 u g"])
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1025
    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
  1026
    apply (simp_all add: path_image_subpath)
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1027
    apply (simp add: pathstart_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1028
    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
  1029
    done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1030
qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1031
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1032
lemma exists_path_subpath_to_frontier_closed:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1033
    fixes S :: "'a::real_normed_vector set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1034
    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
  1035
    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
  1036
                    "pathfinish h \<in> frontier S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1037
proof -
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1038
  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
  1039
                    "path_image h - {pathfinish h} \<subseteq> interior S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1040
                    "pathfinish h \<in> frontier S"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1041
    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
  1042
  show ?thesis
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  1043
    apply (rule that [OF \<open>path h\<close>])
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1044
    using assms h
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1045
    apply auto
62087
44841d07ef1d revisions to limits and derivatives, plus new lemmas
paulson
parents: 61808
diff changeset
  1046
    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
  1047
    done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1048
qed
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1049
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1050
subsection \<open>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
  1051
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1052
definition shiftpath :: "real \<Rightarrow> (real \<Rightarrow> 'a::topological_space) \<Rightarrow> real \<Rightarrow> 'a"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1053
  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
  1054
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1055
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
  1056
  unfolding pathstart_def shiftpath_def by auto
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1057
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1058
lemma pathfinish_shiftpath:
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1059
  assumes "0 \<le> a"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1060
    and "pathfinish g = pathstart g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1061
  shows "pathfinish (shiftpath a g) = g a"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1062
  using assms
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1063
  unfolding pathstart_def pathfinish_def shiftpath_def
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1064
  by auto
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1065
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1066
lemma endpoints_shiftpath:
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1067
  assumes "pathfinish g = pathstart g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1068
    and "a \<in> {0 .. 1}"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1069
  shows "pathfinish (shiftpath a g) = g a"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1070
    and "pathstart (shiftpath a g) = g a"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1071
  using assms
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1072
  by (auto intro!: pathfinish_shiftpath pathstart_shiftpath)
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1073
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1074
lemma closed_shiftpath:
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1075
  assumes "pathfinish g = pathstart g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1076
    and "a \<in> {0..1}"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1077
  shows "pathfinish (shiftpath a g) = pathstart (shiftpath a g)"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1078
  using endpoints_shiftpath[OF assms]
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1079
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1080
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1081
lemma path_shiftpath:
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1082
  assumes "path g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1083
    and "pathfinish g = pathstart g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1084
    and "a \<in> {0..1}"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1085
  shows "path (shiftpath a g)"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1086
proof -
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1087
  have *: "{0 .. 1} = {0 .. 1-a} \<union> {1-a .. 1}"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1088
    using assms(3) by auto
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1089
  have **: "\<And>x. x + a = 1 \<Longrightarrow> g (x + a - 1) = g (x + a)"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1090
    using assms(2)[unfolded pathfinish_def pathstart_def]
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1091
    by auto
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1092
  show ?thesis
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1093
    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
  1094
    apply (rule continuous_on_closed_Un)
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1095
    apply (rule closed_real_atLeastAtMost)+
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1096
    apply (rule continuous_on_eq[of _ "g \<circ> (\<lambda>x. a + x)"])
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1097
    prefer 3
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1098
    apply (rule continuous_on_eq[of _ "g \<circ> (\<lambda>x. a - 1 + x)"])
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1099
    prefer 3
56371
fb9ae0727548 extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents: 56188
diff changeset
  1100
    apply (rule continuous_intros)+
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1101
    prefer 2
56371
fb9ae0727548 extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents: 56188
diff changeset
  1102
    apply (rule continuous_intros)+
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1103
    apply (rule_tac[1-2] continuous_on_subset[OF assms(1)[unfolded path_def]])
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1104
    using assms(3) and **
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1105
    apply auto
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1106
    apply (auto simp add: field_simps)
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1107
    done
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1108
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1109
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1110
lemma shiftpath_shiftpath:
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1111
  assumes "pathfinish g = pathstart g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1112
    and "a \<in> {0..1}"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1113
    and "x \<in> {0..1}"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1114
  shows "shiftpath (1 - a) (shiftpath a g) x = g x"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1115
  using assms
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1116
  unfolding pathfinish_def pathstart_def shiftpath_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1117
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1118
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1119
lemma path_image_shiftpath:
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1120
  assumes "a \<in> {0..1}"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1121
    and "pathfinish g = pathstart g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1122
  shows "path_image (shiftpath a g) = path_image g"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1123
proof -
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1124
  { fix x
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1125
    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
  1126
    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
  1127
    proof (cases "a \<le> x")
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1128
      case False
49654
366d8b41ca17 tuned proofs;
wenzelm
parents: 49653
diff changeset
  1129
      then show ?thesis
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1130
        apply (rule_tac x="1 + x - a" in bexI)
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1131
        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
  1132
        apply (auto simp add: field_simps atomize_not)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1133
        done
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1134
    next
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1135
      case True
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1136
      then show ?thesis
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1137
        using as(1-2) and assms(1)
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1138
        apply (rule_tac x="x - a" in bexI)
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1139
        apply (auto simp add: field_simps)
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1140
        done
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1141
    qed
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1142
  }
49654
366d8b41ca17 tuned proofs;
wenzelm
parents: 49653
diff changeset
  1143
  then show ?thesis
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1144
    using assms
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1145
    unfolding shiftpath_def path_image_def pathfinish_def pathstart_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1146
    by (auto simp add: image_iff)
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1147
qed
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1148
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1149
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1150
subsection \<open>Special case of straight-line paths\<close>
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1151
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1152
definition linepath :: "'a::real_normed_vector \<Rightarrow> 'a \<Rightarrow> real \<Rightarrow> 'a"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1153
  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
  1154
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1155
lemma pathstart_linepath[simp]: "pathstart (linepath a b) = a"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1156
  unfolding pathstart_def linepath_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1157
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1158
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1159
lemma pathfinish_linepath[simp]: "pathfinish (linepath a b) = b"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1160
  unfolding pathfinish_def linepath_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1161
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1162
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1163
lemma continuous_linepath_at[intro]: "continuous (at x) (linepath a b)"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1164
  unfolding linepath_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1165
  by (intro continuous_intros)
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1166
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
  1167
lemma continuous_on_linepath [intro,continuous_intros]: "continuous_on s (linepath a b)"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1168
  using continuous_linepath_at
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1169
  by (auto intro!: continuous_at_imp_continuous_on)
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1170
62618
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1171
lemma path_linepath[iff]: "path (linepath a b)"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1172
  unfolding path_def
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1173
  by (rule continuous_on_linepath)
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1174
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1175
lemma path_image_linepath[simp]: "path_image (linepath a b) = closed_segment a b"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1176
  unfolding path_image_def segment linepath_def
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
  1177
  by auto
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1178
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1179
lemma reversepath_linepath[simp]: "reversepath (linepath a b) = linepath b a"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1180
  unfolding reversepath_def linepath_def
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1181
  by auto
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1182
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
  1183
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
  1184
  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
  1185
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
  1186
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
  1187
  assumes "a \<noteq> b" shows [simp]: "arc (linepath a b)"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1188
proof -
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1189
  {
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1190
    fix x y :: "real"
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1191
    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
  1192
    then have "(x - y) *\<^sub>R a = (x - y) *\<^sub>R b"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1193
      by (simp add: algebra_simps)
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1194
    with assms have "x = y"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1195
      by simp
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1196
  }
49654
366d8b41ca17 tuned proofs;
wenzelm
parents: 49653
diff changeset
  1197
  then show ?thesis
60809
457abb82fb9e the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents: 60420
diff changeset
  1198
    unfolding arc_def inj_on_def
60303
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
  1199
    by (simp add:  path_linepath) (force simp: algebra_simps linepath_def)
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1200
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1201
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1202
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
  1203
  by (simp add: arc_imp_simple_path arc_linepath)
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1204
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  1205
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
  1206
  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
  1207
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  1208
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
  1209
  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
  1210
62618
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1211
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
  1212
  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
  1213
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1214
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
  1215
  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
  1216
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1217
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1218
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
  1219
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1220
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
  1221
    "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
  1222
    "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
  1223
    "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
  1224
    "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
  1225
    "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
  1226
    "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
  1227
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
  1228
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1229
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
  1230
  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
  1231
    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
  1232
proof -
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1233
  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
  1234
    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
  1235
    using assms
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1236
    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
  1237
    done
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1238
  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
  1239
    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
  1240
qed
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1241
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1242
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
  1243
  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
  1244
  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
  1245
        "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
  1246
        "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
  1247
  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
  1248
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1249
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
  1250
  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
  1251
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1252
lemma midpoint_in_open_segment [simp]: "midpoint a b \<in> open_segment a b \<longleftrightarrow> a \<noteq> b"
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1253
  by (simp add: midpoint_eq_endpoint(1) midpoint_eq_endpoint(2) open_segment_def)
f7f2467ab854 Refactoring (moving theorems into better locations), plus a bit of new material
paulson <lp15@cam.ac.uk>
parents: 62533
diff changeset
  1254
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1255
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1256
subsection \<open>Bounding a point away from a path\<close>
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1257
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1258
lemma not_on_path_ball:
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1259
  fixes g :: "real \<Rightarrow> 'a::heine_borel"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1260
  assumes "path g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1261
    and "z \<notin> path_image g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1262
  shows "\<exists>e > 0. ball z e \<inter> path_image g = {}"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1263
proof -
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1264
  obtain a where "a \<in> path_image g" "\<forall>y \<in> path_image g. dist z a \<le> dist z y"
62381
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  1265
    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
  1266
    using compact_path_image[THEN compact_imp_closed, OF assms(1)] by auto
49654
366d8b41ca17 tuned proofs;
wenzelm
parents: 49653
diff changeset
  1267
  then show ?thesis
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1268
    apply (rule_tac x="dist z a" in exI)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1269
    using assms(2)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1270
    apply (auto intro!: dist_pos_lt)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1271
    done
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1272
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1273
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1274
lemma not_on_path_cball:
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1275
  fixes g :: "real \<Rightarrow> 'a::heine_borel"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1276
  assumes "path g"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1277
    and "z \<notin> path_image g"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1278
  shows "\<exists>e>0. cball z e \<inter> (path_image g) = {}"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1279
proof -
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1280
  obtain e where "ball z e \<inter> path_image g = {}" "e > 0"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1281
    using not_on_path_ball[OF assms] by auto
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1282
  moreover have "cball z (e/2) \<subseteq> ball z e"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1283
    using \<open>e > 0\<close> by auto
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1284
  ultimately show ?thesis
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1285
    apply (rule_tac x="e/2" in exI)
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1286
    apply auto
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1287
    done
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1288
qed
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1289
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1290
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1291
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
  1292
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1293
definition "path_component s x y \<longleftrightarrow>
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1294
  (\<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
  1295
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1296
abbreviation
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1297
   "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
  1298
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1299
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
  1300
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1301
lemma path_component_mem:
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1302
  assumes "path_component s x y"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1303
  shows "x \<in> s" and "y \<in> s"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1304
  using assms
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1305
  unfolding path_defs
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1306
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1307
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1308
lemma path_component_refl:
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1309
  assumes "x \<in> s"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1310
  shows "path_component s x x"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1311
  unfolding path_defs
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1312
  apply (rule_tac x="\<lambda>u. x" in exI)
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1313
  using assms
56371
fb9ae0727548 extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents: 56188
diff changeset
  1314
  apply (auto intro!: continuous_intros)
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1315
  done
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1316
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1317
lemma path_component_refl_eq: "path_component s x x \<longleftrightarrow> x \<in> s"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1318
  by (auto intro!: path_component_mem path_component_refl)
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1319
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1320
lemma path_component_sym: "path_component s x y \<Longrightarrow> path_component s y x"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1321
  unfolding path_component_def
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1322
  apply (erule exE)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1323
  apply (rule_tac x="reversepath g" in exI)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1324
  apply auto
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1325
  done
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1326
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1327
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
  1328
  assumes "path_component s x y" and "path_component s y z"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1329
  shows "path_component s x z"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1330
  using assms
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1331
  unfolding path_component_def
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1332
  apply (elim exE)
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1333
  apply (rule_tac x="g +++ ga" in exI)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1334
  apply (auto simp add: path_image_join)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1335
  done
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1336
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1337
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
  1338
  unfolding path_component_def by auto
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1339
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1340
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
  1341
    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
  1342
    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
  1343
  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
  1344
  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
  1345
  done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1346
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1347
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1348
subsubsection \<open>Path components as sets\<close>
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1349
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1350
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
  1351
  "path_component_set s x =
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1352
    {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
  1353
  by (auto simp: path_component_def)
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1354
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1355
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
  1356
  by (auto simp add: path_component_mem(2))
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1357
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1358
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
  1359
  using path_component_mem path_component_refl_eq
00c06f1315d0 New material about paths, and some lemmas
paulson
parents: 59557
diff changeset
  1360
    by fastforce
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1361
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1362
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
  1363
     "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
  1364
  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
  1365
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1366
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
  1367
   "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
  1368
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
  1369
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1370
subsection \<open>Path connectedness of a space\<close>
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1371
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1372
definition "path_connected s \<longleftrightarrow>
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1373
  (\<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
  1374
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1375
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
  1376
  unfolding path_connected_def path_component_def by auto
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1377
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1378
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
  1379
  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
  1380
  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
  1381
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1382
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
  1383
     "\<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
  1384
  by (metis path_component_mono path_connected_component_set)
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1385
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1386
lemma convex_imp_path_connected:
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1387
  fixes s :: "'a::real_normed_vector set"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1388
  assumes "convex s"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1389
  shows "path_connected s"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1390
  unfolding path_connected_def
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1391
  apply rule
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1392
  apply rule
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1393
  apply (rule_tac x = "linepath x y" in exI)
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1394
  unfolding path_image_linepath
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1395
  using assms [unfolded convex_contains_segment]
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1396
  apply auto
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1397
  done
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1398
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1399
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
  1400
  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
  1401
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1402
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
  1403
  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
  1404
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1405
lemma path_connected_imp_connected:
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1406
  assumes "path_connected s"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1407
  shows "connected s"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1408
  unfolding connected_def not_ex
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1409
  apply rule
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1410
  apply rule
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1411
  apply (rule ccontr)
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1412
  unfolding not_not
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1413
  apply (elim conjE)
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1414
proof -
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1415
  fix e1 e2
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1416
  assume as: "open e1" "open e2" "s \<subseteq> e1 \<union> e2" "e1 \<inter> e2 \<inter> s = {}" "e1 \<inter> s \<noteq> {}" "e2 \<inter> s \<noteq> {}"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1417
  then obtain x1 x2 where obt:"x1 \<in> e1 \<inter> s" "x2 \<in> e2 \<inter> s"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1418
    by auto
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1419
  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
  1420
    using assms[unfolded path_connected_def,rule_format,of x1 x2] by auto
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1421
  have *: "connected {0..1::real}"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1422
    by (auto intro!: convex_connected convex_real_interval)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1423
  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
  1424
    using as(3) g(2)[unfolded path_defs] by blast
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1425
  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
  1426
    using as(4) g(2)[unfolded path_defs]
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1427
    unfolding subset_eq
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1428
    by auto
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1429
  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
  1430
    using g(3,4)[unfolded path_defs]
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1431
    using obt
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1432
    by (simp add: ex_in_conv [symmetric], metis zero_le_one order_refl)
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1433
  ultimately show False
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1434
    using *[unfolded connected_local not_ex, rule_format,
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1435
      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
  1436
    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
  1437
    using continuous_openin_preimage_gen[OF g(1)[unfolded path_def] as(2)]
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1438
    by auto
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1439
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1440
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1441
lemma open_path_component:
53593
a7bcbb5a17d8 removed outdated comments
huffman
parents: 51481
diff changeset
  1442
  fixes s :: "'a::real_normed_vector set"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1443
  assumes "open 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
  1444
  shows "open (path_component_set s x)"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1445
  unfolding open_contains_ball
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1446
proof
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1447
  fix 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
  1448
  assume as: "y \<in> path_component_set s x"
49654
366d8b41ca17 tuned proofs;
wenzelm
parents: 49653
diff changeset
  1449
  then have "y \<in> s"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1450
    apply -
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1451
    apply (rule path_component_mem(2))
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1452
    unfolding mem_Collect_eq
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1453
    apply auto
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1454
    done
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1455
  then obtain e where e: "e > 0" "ball y e \<subseteq> s"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1456
    using assms[unfolded open_contains_ball]
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1457
    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
  1458
  show "\<exists>e > 0. ball y e \<subseteq> path_component_set s x"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1459
    apply (rule_tac x=e in exI)
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1460
    apply (rule,rule \<open>e>0\<close>)
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1461
    apply rule
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1462
    unfolding mem_ball mem_Collect_eq
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1463
  proof -
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1464
    fix z
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1465
    assume "dist y z < e"
49654
366d8b41ca17 tuned proofs;
wenzelm
parents: 49653
diff changeset
  1466
    then show "path_component s x z"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1467
      apply (rule_tac path_component_trans[of _ _ y])
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1468
      defer
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1469
      apply (rule path_component_of_subset[OF e(2)])
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1470
      apply (rule convex_imp_path_connected[OF convex_ball, unfolded path_connected_component, rule_format])
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1471
      using \<open>e > 0\<close> as
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1472
      apply auto
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1473
      done
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1474
  qed
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1475
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1476
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1477
lemma open_non_path_component:
53593
a7bcbb5a17d8 removed outdated comments
huffman
parents: 51481
diff changeset
  1478
  fixes s :: "'a::real_normed_vector set"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1479
  assumes "open 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
  1480
  shows "open (s - path_component_set s x)"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1481
  unfolding open_contains_ball
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1482
proof
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1483
  fix 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
  1484
  assume as: "y \<in> s - path_component_set s x"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1485
  then obtain e where e: "e > 0" "ball y e \<subseteq> s"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1486
    using assms [unfolded open_contains_ball]
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1487
    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
  1488
  show "\<exists>e>0. ball y e \<subseteq> s - path_component_set s x"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1489
    apply (rule_tac x=e in exI)
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1490
    apply rule
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1491
    apply (rule \<open>e>0\<close>)
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1492
    apply rule
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1493
    apply rule
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1494
    defer
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1495
  proof (rule ccontr)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1496
    fix z
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1497
    assume "z \<in> ball y e" "\<not> z \<notin> 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
  1498
    then have "y \<in> path_component_set s x"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1499
      unfolding not_not mem_Collect_eq using \<open>e>0\<close>
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1500
      apply -
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1501
      apply (rule path_component_trans, assumption)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1502
      apply (rule path_component_of_subset[OF e(2)])
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1503
      apply (rule convex_imp_path_connected[OF convex_ball, unfolded path_connected_component, rule_format])
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1504
      apply auto
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1505
      done
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1506
    then show False
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1507
      using as by auto
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1508
  qed (insert e(2), auto)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1509
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1510
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1511
lemma connected_open_path_connected:
53593
a7bcbb5a17d8 removed outdated comments
huffman
parents: 51481
diff changeset
  1512
  fixes s :: "'a::real_normed_vector set"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1513
  assumes "open s"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1514
    and "connected s"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1515
  shows "path_connected s"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1516
  unfolding path_connected_component_set
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1517
proof (rule, rule, rule path_component_subset, rule)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1518
  fix x y
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1519
  assume "x \<in> s" and "y \<in> 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
  1520
  show "y \<in> path_component_set s x"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1521
  proof (rule ccontr)
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1522
    assume "\<not> ?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
  1523
    moreover have "path_component_set s x \<inter> s \<noteq> {}"
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1524
      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
  1525
      by auto
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1526
    ultimately
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1527
    show False
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1528
      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
  1529
      using assms(2)[unfolded connected_def not_ex, rule_format,
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1530
        of "path_component_set s x" "s - path_component_set s x"]
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1531
      by auto
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1532
  qed
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1533
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1534
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1535
lemma path_connected_continuous_image:
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1536
  assumes "continuous_on s f"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1537
    and "path_connected s"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1538
  shows "path_connected (f ` s)"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1539
  unfolding path_connected_def
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1540
proof (rule, rule)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1541
  fix x' y'
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1542
  assume "x' \<in> f ` s" "y' \<in> f ` s"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1543
  then obtain x y where x: "x \<in> s" and y: "y \<in> s" and x': "x' = f x" and y': "y' = f y"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1544
    by auto
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1545
  from x y obtain g where "path g \<and> path_image g \<subseteq> s \<and> pathstart g = x \<and> pathfinish g = y"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1546
    using assms(2)[unfolded path_connected_def] by fast
49654
366d8b41ca17 tuned proofs;
wenzelm
parents: 49653
diff changeset
  1547
  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
  1548
    unfolding x' y'
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1549
    apply (rule_tac x="f \<circ> g" in exI)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1550
    unfolding path_defs
51481
ef949192e5d6 move continuous_on_inv to HOL image (simplifies isCont_inverse_function)
hoelzl
parents: 51478
diff changeset
  1551
    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
  1552
    apply auto
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1553
    done
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1554
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1555
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1556
lemma path_connected_segment:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1557
    fixes a :: "'a::real_normed_vector"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1558
    shows "path_connected (closed_segment a b)"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1559
  by (simp add: convex_imp_path_connected)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1560
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1561
lemma path_connected_open_segment:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1562
    fixes a :: "'a::real_normed_vector"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1563
    shows "path_connected (open_segment a b)"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1564
  by (simp add: convex_imp_path_connected)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  1565
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1566
lemma homeomorphic_path_connectedness:
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1567
  "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
  1568
  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
  1569
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1570
lemma path_connected_empty: "path_connected {}"
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1571
  unfolding path_connected_def by auto
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1572
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1573
lemma path_connected_singleton: "path_connected {a}"
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1574
  unfolding path_connected_def pathstart_def pathfinish_def path_image_def
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1575
  apply clarify
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1576
  apply (rule_tac x="\<lambda>x. a" in exI)
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1577
  apply (simp add: image_constant_conv)
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1578
  apply (simp add: path_def continuous_on_const)
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1579
  done
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1580
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1581
lemma path_connected_Un:
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1582
  assumes "path_connected s"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1583
    and "path_connected t"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1584
    and "s \<inter> t \<noteq> {}"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1585
  shows "path_connected (s \<union> t)"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1586
  unfolding path_connected_component
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1587
proof (rule, rule)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1588
  fix x y
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1589
  assume as: "x \<in> s \<union> t" "y \<in> s \<union> t"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1590
  from assms(3) obtain z where "z \<in> s \<inter> t"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1591
    by auto
49654
366d8b41ca17 tuned proofs;
wenzelm
parents: 49653
diff changeset
  1592
  then show "path_component (s \<union> t) x y"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1593
    using as and assms(1-2)[unfolded path_connected_component]
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1594
    apply -
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1595
    apply (erule_tac[!] UnE)+
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1596
    apply (rule_tac[2-3] path_component_trans[of _ _ z])
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1597
    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
  1598
    done
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1599
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1600
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1601
lemma path_connected_UNION:
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1602
  assumes "\<And>i. i \<in> A \<Longrightarrow> path_connected (S i)"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1603
    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
  1604
  shows "path_connected (\<Union>i\<in>A. S i)"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1605
  unfolding path_connected_component
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1606
proof clarify
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1607
  fix x i y j
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1608
  assume *: "i \<in> A" "x \<in> S i" "j \<in> A" "y \<in> S j"
49654
366d8b41ca17 tuned proofs;
wenzelm
parents: 49653
diff changeset
  1609
  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
  1610
    using assms by (simp_all add: path_connected_component)
49654
366d8b41ca17 tuned proofs;
wenzelm
parents: 49653
diff changeset
  1611
  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
  1612
    using *(1,3) by (auto elim!: path_component_of_subset [rotated])
49654
366d8b41ca17 tuned proofs;
wenzelm
parents: 49653
diff changeset
  1613
  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
  1614
    by (rule path_component_trans)
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1615
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1616
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1617
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
  1618
  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
  1619
  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
  1620
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
  1621
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
  1622
  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
  1623
  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
  1624
  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
  1625
  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
  1626
    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
  1627
      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
  1628
  next
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1629
    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
  1630
      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
  1631
      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
  1632
      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
  1633
      done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1634
    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
  1635
      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
  1636
    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
  1637
      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
  1638
      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
  1639
      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
  1640
      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
  1641
      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
  1642
      done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1643
  qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1644
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1645
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1646
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
  1647
  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
  1648
  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
  1649
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1650
lemma 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
  1651
   "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
  1652
proof -
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1653
  { 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
  1654
    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
  1655
    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
  1656
      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
  1657
    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
  1658
      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
  1659
    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
  1660
      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
  1661
      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
  1662
      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
  1663
  }
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1664
  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
  1665
    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
  1666
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1667
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1668
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
  1669
  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
  1670
  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
  1671
  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
  1672
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1673
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
  1674
   "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
  1675
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
  1676
  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
  1677
    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
  1678
    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
  1679
    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
  1680
next
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1681
  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
  1682
    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
  1683
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1684
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1685
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
  1686
   "(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
  1687
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
  1688
  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
  1689
    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
  1690
    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
  1691
    done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1692
next
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1693
  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
  1694
    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
  1695
qed
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1696
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1697
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
  1698
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1699
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
  1700
  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
  1701
  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
  1702
    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
  1703
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
  1704
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1705
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
  1706
  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
  1707
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
  1708
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
  1709
  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
  1710
  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
  1711
    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
  1712
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
  1713
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
  1714
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
  1715
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
  1716
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
  1717
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
  1718
313d3b697c9a Mostly renaming (from HOL Light to Isabelle conventions), with a couple of new results
paulson <lp15@cam.ac.uk>
parents: 62626
diff changeset
  1719
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
  1720
  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
  1721
  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
  1722
    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
  1723
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
  1724
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1725
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
  1726
  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
  1727
    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
  1728
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
  1729
  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
  1730
  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
  1731
  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
  1732
    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
  1733
  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
  1734
    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
  1735
  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
  1736
    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
  1737
    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
  1738
    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
  1739
    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
  1740
    done
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1741
  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
  1742
    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
  1743
    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
  1744
    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
  1745
    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
  1746
    done
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1747
  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
  1748
    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
  1749
  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
  1750
    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
  1751
  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
  1752
    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
  1753
  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
  1754
  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
  1755
            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
  1756
    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
  1757
       apply (rule 1)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1758
      apply (rule 2)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1759
     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
  1760
    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
  1761
qed
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1762
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1763
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
  1764
  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
  1765
  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
  1766
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
  1767
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  1768
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1769
lemma Union_path_component [simp]:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1770
   "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
  1771
apply (rule subset_antisym)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1772
using path_component_subset apply force
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1773
using path_component_refl by auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1774
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1775
lemma path_component_disjoint:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1776
   "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
  1777
    (a \<notin> path_component_set S b)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1778
apply (auto simp: disjnt_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1779
using path_component_eq apply fastforce
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1780
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
  1781
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1782
lemma path_component_eq_eq:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1783
   "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
  1784
        (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
  1785
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
  1786
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
  1787
apply (rule ext)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1788
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
  1789
done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1790
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1791
lemma path_component_unique:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1792
  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
  1793
          "\<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
  1794
   shows "path_component_set S x = c"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1795
apply (rule subset_antisym)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1796
using assms
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1797
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
  1798
by (simp add: assms path_component_maximal)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1799
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1800
lemma path_component_intermediate_subset:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1801
   "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
  1802
        \<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
  1803
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
  1804
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1805
lemma complement_path_component_Union:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1806
  fixes x :: "'a :: topological_space"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1807
  shows "S - path_component_set S x =
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1808
         \<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
  1809
proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1810
  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
  1811
    for a::"'a set" and S
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1812
    by (auto simp: disjnt_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1813
  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
  1814
            \<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
  1815
    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
  1816
  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
  1817
             \<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
  1818
    by (meson *)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1819
  then show ?thesis by simp
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1820
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1821
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  1822
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 60303
diff changeset
  1823
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
  1824
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1825
lemma path_connected_punctured_universe:
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1826
  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
  1827
  shows "path_connected (- {a::'a})"
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1828
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
  1829
  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
  1830
  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
  1831
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1832
  have A: "path_connected ?A"
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1833
    unfolding Collect_bex_eq
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1834
  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
  1835
    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
  1836
    assume "i \<in> Basis"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1837
    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
  1838
      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
  1839
    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
  1840
      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
  1841
      by (simp add: inner_commute)
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1842
  qed
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1843
  have B: "path_connected ?B"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1844
    unfolding Collect_bex_eq
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1845
  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
  1846
    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
  1847
    assume "i \<in> Basis"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1848
    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
  1849
      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
  1850
    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
  1851
      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
  1852
      by (simp add: inner_commute)
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1853
  qed
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1854
  obtain S :: "'a set" where "S \<subseteq> Basis" and "card S = Suc (Suc 0)"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1855
    using ex_card[OF assms]
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1856
    by auto
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1857
  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
  1858
    unfolding card_Suc_eq by auto
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1859
  then have "a + b0 - b1 \<in> ?A \<inter> ?B"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1860
    by (auto simp: inner_simps inner_Basis)
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1861
  then have "?A \<inter> ?B \<noteq> {}"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1862
    by fast
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1863
  with A B have "path_connected (?A \<union> ?B)"
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1864
    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
  1865
  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
  1866
    unfolding neq_iff bex_disj_distrib Collect_disj_eq ..
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1867
  also have "\<dots> = {x. x \<noteq> a}"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1868
    unfolding euclidean_eq_iff [where 'a='a]
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1869
    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
  1870
  also have "\<dots> = - {a}"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1871
    by auto
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1872
  finally show ?thesis .
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1873
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1874
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1875
lemma path_connected_sphere:
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1876
  assumes "2 \<le> DIM('a::euclidean_space)"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1877
  shows "path_connected {x::'a. norm (x - a) = r}"
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1878
proof (rule linorder_cases [of r 0])
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1879
  assume "r < 0"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1880
  then have "{x::'a. norm(x - a) = r} = {}"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1881
    by auto
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1882
  then show ?thesis
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1883
    using path_connected_empty by simp
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1884
next
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1885
  assume "r = 0"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1886
  then show ?thesis
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1887
    using path_connected_singleton by simp
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1888
next
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1889
  assume r: "0 < r"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1890
  have *: "{x::'a. norm(x - a) = r} = (\<lambda>x. a + r *\<^sub>R x) ` {x. norm x = 1}"
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1891
    apply (rule set_eqI)
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1892
    apply rule
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1893
    unfolding image_iff
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1894
    apply (rule_tac x="(1/r) *\<^sub>R (x - a)" in bexI)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1895
    unfolding mem_Collect_eq norm_scaleR
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1896
    using r
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1897
    apply (auto simp add: scaleR_right_diff_distrib)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1898
    done
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1899
  have **: "{x::'a. norm x = 1} = (\<lambda>x. (1/norm x) *\<^sub>R x) ` (- {0})"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1900
    apply (rule set_eqI)
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1901
    apply rule
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1902
    unfolding image_iff
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1903
    apply (rule_tac x=x in bexI)
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1904
    unfolding mem_Collect_eq
62390
842917225d56 more canonical names
nipkow
parents: 62087
diff changeset
  1905
    apply (auto split: if_split_asm)
49653
03bc7afe8814 tuned proofs;
wenzelm
parents: 48125
diff changeset
  1906
    done
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1907
  have "continuous_on (- {0}) (\<lambda>x::'a. 1 / norm x)"
59557
ebd8ecacfba6 establish unique preferred fact names
haftmann
parents: 58877
diff changeset
  1908
    by (auto intro!: continuous_intros)
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1909
  then show ?thesis
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1910
    unfolding * **
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1911
    using path_connected_punctured_universe[OF assms]
56371
fb9ae0727548 extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents: 56188
diff changeset
  1912
    by (auto intro!: path_connected_continuous_image continuous_intros)
37674
f86de9c00c47 convert theorem path_connected_sphere to euclidean_space class
huffman
parents: 37489
diff changeset
  1913
qed
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1914
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1915
corollary connected_sphere: "2 \<le> DIM('a::euclidean_space) \<Longrightarrow> connected {x::'a. norm (x - a) = r}"
53640
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1916
  using path_connected_sphere path_connected_imp_connected
3170b5eb9f5a tuned proofs;
wenzelm
parents: 53593
diff changeset
  1917
  by auto
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  1918
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1919
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
  1920
    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
  1921
    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
  1922
    shows "path_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
  1923
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
  1924
  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
  1925
    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
  1926
next
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1927
  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
  1928
  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
  1929
  { fix x y assume "x \<notin> s" "y \<notin> s"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  1930
    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
  1931
    then have bxy: "bounded(insert x (insert y s))"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  1932
      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
  1933
    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
  1934
                          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
  1935
      using bounded_subset_ballD [OF bxy, of a] by (auto simp: dist_norm)
63040
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 63016
diff changeset
  1936
    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
  1937
    { 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
  1938
      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
  1939
      have CC: "1 \<le> 1 + (C - 1) * u"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  1940
        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
  1941
        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
  1942
        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
  1943
      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
  1944
        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
  1945
      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
  1946
            (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
  1947
        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
  1948
      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
  1949
        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
  1950
      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
  1951
        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
  1952
      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
  1953
              ((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
  1954
        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
  1955
      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
  1956
        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
  1957
      have False
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  1958
        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
  1959
        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
  1960
        apply (drule_tac x=a in bspec)
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  1961
         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
  1962
        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
  1963
         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
  1964
        apply (drule_tac x="1 / (1 + (C - 1) * u)" in spec)
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  1965
        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
  1966
        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
  1967
        done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1968
    }
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  1969
    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
  1970
      by (force simp: closed_segment_def intro!: path_connected_linepath)
63040
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 63016
diff changeset
  1971
    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
  1972
    { 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
  1973
      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
  1974
      have DD: "1 \<le> 1 + (D - 1) * u"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  1975
        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
  1976
        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
  1977
        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
  1978
      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
  1979
        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
  1980
      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
  1981
            (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
  1982
        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
  1983
      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
  1984
        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
  1985
      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
  1986
        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
  1987
      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
  1988
              ((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
  1989
        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
  1990
      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
  1991
        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
  1992
      have False
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  1993
        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
  1994
        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
  1995
        apply (drule_tac x=a in bspec)
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  1996
         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
  1997
        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
  1998
         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
  1999
        apply (drule_tac x="1 / (1 + (D - 1) * u)" in spec)
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2000
        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
  2001
        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
  2002
        done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2003
    }
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2004
    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
  2005
      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
  2006
    have pyx: "path_component (- s) (a + D *\<^sub>R (y - a)) (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
  2007
      apply (rule path_component_of_subset [of "{x. norm(x - a) = B}"])
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2008
       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
  2009
       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
  2010
      apply (rule path_connected_sphere [OF 2, of a B, simplified path_connected_component, rule_format])
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2011
      using \<open>x \<noteq> a\<close>  using \<open>y \<noteq> a\<close>  B apply (auto simp: 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
  2012
      done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2013
    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
  2014
      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
  2015
  }
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2016
  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
  2017
    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
  2018
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2019
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2020
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2021
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
  2022
    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
  2023
    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
  2024
      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
  2025
  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
  2026
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2027
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
  2028
    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
  2029
    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
  2030
      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
  2031
  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
  2032
  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
  2033
  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
  2034
  done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2035
62381
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2036
proposition connected_open_delete:
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2037
  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
  2038
    shows "connected(S - {a::'N})"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2039
proof (cases "a \<in> S")
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2040
  case True
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2041
  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
  2042
    using open_contains_cball_eq by blast
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2043
  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
  2044
    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
  2045
  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
  2046
    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
  2047
    by auto
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2048
  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
  2049
    by auto
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2050
  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
  2051
    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
  2052
  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
  2053
    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
  2054
     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
  2055
    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
  2056
    apply auto
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2057
    done
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2058
  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
  2059
    by auto
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2060
  then show ?thesis
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2061
    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
  2062
next
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2063
  case False then show ?thesis
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2064
    by (simp add: \<open>connected S\<close>)
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2065
qed
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2066
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2067
corollary path_connected_open_delete:
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2068
  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
  2069
    shows "path_connected(S - {a::'N})"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2070
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
  2071
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2072
corollary path_connected_punctured_ball:
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2073
   "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
  2074
by (simp add: path_connected_open_delete)
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2075
63151
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2076
corollary connected_punctured_ball:
62381
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2077
   "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
  2078
by (simp add: connected_open_delete)
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2079
63151
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2080
corollary connected_open_delete_finite:
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2081
  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
  2082
  assumes S: "open S" "connected S" and 2: "2 \<le> DIM('a)" and "finite T"
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2083
  shows "connected(S - T)" 
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2084
  using \<open>finite T\<close> S 
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2085
proof (induct T)
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2086
  case empty
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2087
  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
  2088
next
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2089
  case (insert x F)
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2090
  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
  2091
  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
  2092
  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
  2093
  thus ?case by (metis Diff_insert)
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2094
qed
82df5181d699 updated proof of Residue Theorem (form Wenda Li)
paulson <lp15@cam.ac.uk>
parents: 63126
diff changeset
  2095
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2096
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
  2097
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2098
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
  2099
  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
  2100
  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
  2101
    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
  2102
    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
  2103
    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
  2104
     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
  2105
    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
  2106
    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
  2107
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2108
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
  2109
    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
  2110
    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
  2111
  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
  2112
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2113
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
  2114
  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
  2115
  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
  2116
  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
  2117
proof -
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2118
  { 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
  2119
    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
  2120
      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
  2121
    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
  2122
      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
  2123
  }
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2124
  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
  2125
    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
  2126
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2127
63114
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2128
lemma connected_disjoint_Union_open_pick:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2129
  assumes "pairwise disjnt B"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2130
          "\<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
  2131
          "\<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
  2132
          "\<Union>A \<subseteq> \<Union>B"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2133
          "S \<in> A"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2134
  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
  2135
proof -
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2136
  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
  2137
    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
  2138
  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
  2139
    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
  2140
  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
  2141
  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
  2142
  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
  2143
  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
  2144
    by (auto simp: pairwise_def disjnt_def)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2145
  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
  2146
  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
  2147
  have "S \<inter> \<Union>(B-{T}) = {}"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2148
    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
  2149
  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
  2150
    using "3" by auto
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2151
  show ?thesis
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2152
    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
  2153
qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2154
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2155
lemma connected_disjoint_Union_open_subset:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2156
  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
  2157
      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
  2158
      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
  2159
      and eq [simp]: "\<Union>A = \<Union>B"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2160
    shows "A \<subseteq> B"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2161
proof
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2162
  fix S
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2163
  assume "S \<in> A"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2164
  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
  2165
      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
  2166
      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
  2167
  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
  2168
      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
  2169
      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
  2170
  ultimately have "S' = S"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2171
    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
  2172
  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
  2173
  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
  2174
  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
  2175
qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2176
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2177
lemma connected_disjoint_Union_open_unique:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2178
  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
  2179
      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
  2180
      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
  2181
      and eq [simp]: "\<Union>A = \<Union>B"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2182
    shows "A = B"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2183
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
  2184
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2185
proposition components_open_unique:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2186
 fixes S :: "'a::real_normed_vector set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2187
  assumes "pairwise disjnt A" "\<Union>A = S"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2188
          "\<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
  2189
    shows "components S = A"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2190
proof -
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2191
  have "open S" using assms by blast
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2192
  show ?thesis
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2193
    apply (rule connected_disjoint_Union_open_unique)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2194
    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
  2195
    using \<open>open S\<close>
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2196
    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
  2197
    done
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2198
qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2199
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  2200
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2201
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
  2202
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2203
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
  2204
    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
  2205
    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
  2206
      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
  2207
proof -
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2208
  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
  2209
    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
  2210
  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
  2211
    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
  2212
  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
  2213
    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
  2214
  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
  2215
    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
  2216
    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
  2217
    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
  2218
    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
  2219
    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
  2220
    done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2221
  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
  2222
    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
  2223
    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
  2224
    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
  2225
    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
  2226
    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
  2227
  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
  2228
    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
  2229
  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
  2230
    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
  2231
    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
  2232
    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
  2233
    done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2234
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2235
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2236
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
  2237
    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
  2238
    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
  2239
        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
  2240
                "~ 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
  2241
      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
  2242
proof -
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2243
  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
  2244
    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
  2245
  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
  2246
    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
  2247
  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
  2248
    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
  2249
  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
  2250
    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
  2251
  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
  2252
    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
  2253
    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
  2254
  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
  2255
    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
  2256
    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
  2257
  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
  2258
    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
  2259
    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
  2260
    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
  2261
    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
  2262
    done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2263
  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
  2264
    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
  2265
    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
  2266
    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
  2267
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2268
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2269
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
  2270
    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
  2271
    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
  2272
  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
  2273
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2274
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
  2275
    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
  2276
    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
  2277
  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
  2278
  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
  2279
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2280
lemma cobounded_has_bounded_component:
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2281
    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
  2282
    shows "\<lbrakk>bounded (- s); ~connected s; 2 \<le> DIM('a)\<rbrakk> \<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
  2283
  by (meson cobounded_unique_unbounded_components connected_eq_connected_components_eq)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2284
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2285
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2286
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
  2287
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2288
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
  2289
  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
  2290
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2291
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
  2292
  "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
  2293
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2294
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
  2295
  "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
  2296
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2297
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
  2298
  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
  2299
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2300
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
  2301
  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
  2302
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2303
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
  2304
   "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
  2305
  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
  2306
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2307
lemma inside_inter_outside [simp]: "inside s \<inter> 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
  2308
  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
  2309
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2310
lemma inside_union_outside [simp]: "inside s \<union> outside s = (- s)"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2311
  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
  2312
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2313
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
  2314
   "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
  2315
  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
  2316
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2317
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
  2318
  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
  2319
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2320
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
  2321
  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
  2322
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2323
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
  2324
  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
  2325
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2326
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
  2327
  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
  2328
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2329
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
  2330
  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
  2331
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2332
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
  2333
  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
  2334
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2335
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
  2336
  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
  2337
  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
  2338
  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
  2339
proof -
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2340
  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
  2341
    using assms by auto (metis add.commute diff_add_cancel)
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2342
  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
  2343
    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
  2344
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2345
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2346
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
  2347
  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
  2348
  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
  2349
proof -
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2350
  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
  2351
    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
  2352
  { 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
  2353
    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
  2354
    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
  2355
    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
  2356
      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
  2357
    next
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2358
      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
  2359
        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
  2360
        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
  2361
        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
  2362
        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
  2363
        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
  2364
         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
  2365
        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
  2366
        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
  2367
        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
  2368
        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
  2369
    qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2370
  }
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2371
  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
  2372
    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
  2373
    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
  2374
    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
  2375
    done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2376
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2377
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2378
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
  2379
    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
  2380
    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
  2381
  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
  2382
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2383
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
  2384
    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
  2385
    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
  2386
  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
  2387
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2388
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
  2389
    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
  2390
    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
  2391
      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
  2392
  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
  2393
  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
  2394
  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
  2395
  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
  2396
  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
  2397
  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
  2398
  done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2399
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2400
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
  2401
    "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
  2402
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
  2403
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
  2404
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
  2405
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2406
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
  2407
   "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
  2408
            {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
  2409
                         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
  2410
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
  2411
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
  2412
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
  2413
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2414
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
  2415
    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
  2416
    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
  2417
      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
  2418
proof -
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2419
  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
  2420
    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
  2421
  { 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
  2422
    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
  2423
    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
  2424
      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
  2425
      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
  2426
      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
  2427
      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
  2428
    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
  2429
      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
  2430
      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
  2431
      done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2432
  } 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
  2433
  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
  2434
    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
  2435
    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
  2436
    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
  2437
    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
  2438
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2439
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2440
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
  2441
    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
  2442
    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
  2443
      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
  2444
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
  2445
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
  2446
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2447
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
  2448
    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
  2449
    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
  2450
      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
  2451
  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
  2452
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2453
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
  2454
    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
  2455
    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
  2456
      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
  2457
  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
  2458
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2459
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
  2460
  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
  2461
  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
  2462
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
  2463
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
  2464
       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
  2465
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2466
lemma frontier_interiors: "frontier s = - interior(s) - interior(-s)"
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: Int_commute frontier_def interior_closure)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2468
62381
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2469
lemma frontier_interior_subset: "frontier(interior S) \<subseteq> frontier S"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2470
  by (simp add: Diff_mono frontier_interiors interior_mono interior_subset)
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2471
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2472
lemma connected_Int_frontier:
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2473
     "\<lbrakk>connected s; s \<inter> t \<noteq> {}; s - t \<noteq> {}\<rbrakk> \<Longrightarrow> (s \<inter> frontier t \<noteq> {})"
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
  2474
  apply (simp add: frontier_interiors connected_openin, safe)
61426
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2475
  apply (drule_tac x="s \<inter> interior t" in spec, safe)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2476
   apply (drule_tac [2] x="s \<inter> interior (-t)" in spec)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2477
   apply (auto simp: disjoint_eq_subset_Compl dest: interior_subset [THEN subsetD])
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2478
  done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2479
62381
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2480
lemma frontier_not_empty:
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2481
  fixes S :: "'a :: real_normed_vector set"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2482
  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
  2483
    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
  2484
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2485
lemma frontier_eq_empty:
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2486
  fixes S :: "'a :: real_normed_vector set"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2487
  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
  2488
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
  2489
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2490
lemma frontier_of_connected_component_subset:
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2491
  fixes S :: "'a::real_normed_vector set"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2492
  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
  2493
proof -
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2494
  { fix y
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2495
    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
  2496
       and y2: "y \<notin> interior (connected_component_set S x)"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2497
    have 1: "y \<in> closure S"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2498
      using y1 closure_mono connected_component_subset by blast
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2499
    have "z \<in> interior (connected_component_set S x)"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2500
          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
  2501
    proof -
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2502
      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
  2503
        apply (rule connected_component_maximal)
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2504
        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
  2505
        done
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2506
      then show ?thesis
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2507
        using y1 apply (simp add: closure_approachable open_contains_ball_eq [OF open_interior])
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2508
        by (metis (no_types, hide_lams) connected_component_eq_eq connected_component_in subsetD
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2509
                       dist_commute mem_Collect_eq mem_ball mem_interior \<open>0 < e\<close> y2)
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2510
    qed
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2511
    then have 2: "y \<notin> interior S"
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2512
      using y2 by (force simp: open_contains_ball_eq [OF open_interior])
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2513
    note 1 2
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2514
  }
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2515
  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
  2516
qed
a6479cb85944 New and revised material for (multivariate) analysis
paulson <lp15@cam.ac.uk>
parents: 62087
diff changeset
  2517
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2518
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
  2519
  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
  2520
  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
  2521
proof -
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2522
  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
  2523
       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
  2524
          "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
  2525
  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
  2526
    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
  2527
      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
  2528
  next
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2529
    case False
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2530
    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
  2531
    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
  2532
      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
  2533
    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
  2534
       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
  2535
    then show ?thesis
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2536
    proof -
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2537
      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
  2538
        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
  2539
      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
  2540
        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
  2541
      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
  2542
        by linarith
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2543
      then show ?thesis
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2544
        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
  2545
    qed
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2546
  qed
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2547
  then show ?thesis
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2548
    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
  2549
qed
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2550
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  2551
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
  2552
  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
  2553
  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
  2554
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
  2555
   (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
  2556
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
  2557
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
  2558
    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
  2559
    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
  2560
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
  2561
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
  2562
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2563
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
  2564
    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
  2565
    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
  2566
  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
  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 components_univ [simp]: "components UNIV = {UNIV :: '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
  2569
  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
  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 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
  2572
    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
  2573
    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
  2574
      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
  2575
proof -
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2576
  { 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
  2577
    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
  2578
       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
  2579
    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
  2580
      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
  2581
      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
  2582
      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
  2583
      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
  2584
    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
  2585
      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
  2586
  }
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2587
  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
  2588
    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
  2589
    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
  2590
    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
  2591
    done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2592
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2593
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2594
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
  2595
  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
  2596
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2597
lemma outside_empty [simp]: "outside {} = (UNIV :: '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
  2598
using inside_empty inside_union_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
  2599
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2600
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
  2601
   "\<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
  2602
  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
  2603
  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
  2604
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2605
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
  2606
   "\<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
  2607
  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
  2608
  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
  2609
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2610
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
  2611
  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
  2612
  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
  2613
    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
  2614
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
  2615
  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
  2616
next
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2617
  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
  2618
  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
  2619
  { 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
  2620
    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
  2621
      by (metis mem_Collect_eq)
63040
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 63016
diff changeset
  2622
    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
  2623
    have "C > 0"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2624
      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
  2625
    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
  2626
      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
  2627
    moreover have "norm (C *\<^sub>R (z-a)) > norm z + B"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2628
      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
  2629
    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
  2630
    { 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
  2631
      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
  2632
      then have Cpos: "1 + u * C > 0"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2633
        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
  2634
      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
  2635
        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
  2636
      then have False
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2637
        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
  2638
        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
  2639
    } 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
  2640
    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
  2641
      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
  2642
      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
  2643
      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
  2644
      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
  2645
      done
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2646
    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
  2647
      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
  2648
      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
  2649
  }
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2650
  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
  2651
    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
  2652
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2653
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2654
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
  2655
  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
  2656
  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
  2657
    shows "outside s = - s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2658
  by (metis ComplD assms convex_in_outside equalityI inside_union_outside subsetI sup.cobounded2)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2659
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2660
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
  2661
  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
  2662
  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
  2663
  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
  2664
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2665
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
  2666
  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
  2667
  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
  2668
  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
  2669
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2670
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
  2671
    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
  2672
    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
  2673
    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
  2674
  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
  2675
proof -
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2676
  { 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
  2677
    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
  2678
      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
  2679
    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
  2680
      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
  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
  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
  2683
    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
  2684
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2685
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2686
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
  2687
  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
  2688
    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
  2689
      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
  2690
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
  2691
          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
  2692
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2693
lemma inside_frontier_eq_interior:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2694
     fixes s :: "'a :: {real_normed_vector, perfect_space} set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2695
     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
  2696
  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
  2697
  using closure_subset interior_subset
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2698
  apply (auto simp add: frontier_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2699
  done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2700
61426
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 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
  2702
    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
  2703
    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
  2704
      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
  2705
proof -
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2706
  { 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
  2707
    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
  2708
      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
  2709
    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
  2710
      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
  2711
      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
  2712
      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
  2713
    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
  2714
      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
  2715
  }
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2716
  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
  2717
    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
  2718
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2719
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2720
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
  2721
    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
  2722
    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
  2723
      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
  2724
proof -
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2725
  { 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
  2726
    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
  2727
      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
  2728
    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
  2729
      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
  2730
      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
  2731
      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
  2732
    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
  2733
      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
  2734
  }
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2735
  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
  2736
    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
  2737
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2738
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2739
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
  2740
    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
  2741
    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
  2742
      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
  2743
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
  2744
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2745
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
  2746
    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
  2747
    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
  2748
      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
  2749
proof -
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2750
  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
  2751
    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
  2752
  moreover have "- inside s \<inter> - outside s = s"
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2753
    by (metis (no_types) compl_sup double_compl inside_union_outside)
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2754
  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
  2755
    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
  2756
  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
  2757
    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
  2758
  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
  2759
    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
  2760
qed
d53db136e8fd new material on path_component_sets, inside, outside, etc. And more default simprules
paulson <lp15@cam.ac.uk>
parents: 61204
diff changeset
  2761
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2762
lemma closure_outside_subset:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2763
    fixes s :: "'a::real_normed_vector set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2764
    assumes "closed s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2765
      shows "closure(outside s) \<subseteq> s \<union> outside s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2766
  apply (rule closure_minimal, simp)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2767
  by (metis assms closed_open inside_outside open_inside)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2768
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2769
lemma frontier_outside_subset:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2770
    fixes s :: "'a::real_normed_vector set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2771
    assumes "closed s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2772
      shows "frontier(outside s) \<subseteq> s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2773
  apply (simp add: frontier_def open_outside interior_open)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2774
  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
  2775
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2776
lemma inside_complement_unbounded_connected_empty:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2777
     "\<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
  2778
  apply (simp add: inside_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2779
  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
  2780
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2781
lemma inside_bounded_complement_connected_empty:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2782
    fixes s :: "'a::{real_normed_vector, perfect_space} set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2783
    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
  2784
  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
  2785
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2786
lemma inside_inside:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2787
    assumes "s \<subseteq> inside t"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2788
    shows "inside s - t \<subseteq> inside t"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2789
unfolding inside_def
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2790
proof clarify
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2791
  fix x
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2792
  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
  2793
  show "bounded (connected_component_set (- t) x)"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2794
  proof (cases "s \<inter> connected_component_set (- t) x = {}")
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2795
    case True show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2796
      apply (rule bounded_subset [OF bo])
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2797
      apply (rule connected_component_maximal)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2798
      using x True apply auto
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2799
      done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2800
  next
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2801
    case False then show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2802
      using assms [unfolded inside_def] x
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2803
      apply (simp add: disjoint_iff_not_equal, clarify)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2804
      apply (drule subsetD, assumption, auto)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2805
      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
  2806
  qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2807
qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2808
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2809
lemma inside_inside_subset: "inside(inside s) \<subseteq> s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2810
  using inside_inside union_with_outside by fastforce
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2811
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2812
lemma inside_outside_intersect_connected:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2813
      "\<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
  2814
  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
  2815
  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
  2816
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2817
lemma outside_bounded_nonempty:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2818
  fixes s :: "'a :: {real_normed_vector, perfect_space} set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2819
    assumes "bounded s" shows "outside s \<noteq> {}"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2820
  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
  2821
                   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
  2822
                   double_complement order_refl outside_convex outside_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2823
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2824
lemma outside_compact_in_open:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2825
    fixes s :: "'a :: {real_normed_vector,perfect_space} set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2826
    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
  2827
      shows "outside s \<inter> t \<noteq> {}"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2828
proof -
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2829
  have "outside s \<noteq> {}"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2830
    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
  2831
  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
  2832
  show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2833
  proof (cases "a \<in> t")
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2834
    case True with a show ?thesis by blast
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2835
  next
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2836
    case False
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2837
      have front: "frontier t \<subseteq> - s"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2838
        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
  2839
      { fix \<gamma>
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2840
        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
  2841
           and pf: "pathfinish \<gamma> \<in> frontier t" and ps: "pathstart \<gamma> = a"
63040
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 63016
diff changeset
  2842
        define c where "c = pathfinish \<gamma>"
61518
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2843
        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
  2844
        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
  2845
        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
  2846
          using open_contains_cball[of "-s"] s by blast
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2847
        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
  2848
          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
  2849
          by (metis Diff_iff frontier_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2850
        then have "d \<in> -s" using \<epsilon>
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2851
          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
  2852
        have pimg_sbs_cos: "path_image \<gamma> \<subseteq> -s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2853
          using pimg_sbs apply (auto simp: path_image_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2854
          apply (drule subsetD)
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2855
          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
  2856
          done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2857
        have "closed_segment c d \<le> cball c \<epsilon>"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2858
          apply (simp add: segment_convex_hull)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2859
          apply (rule hull_minimal)
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2860
          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
  2861
          done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2862
        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
  2863
        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
  2864
          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
  2865
        ultimately have "connected_component (- s) a d"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2866
          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
  2867
        then have "outside s \<inter> t \<noteq> {}"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2868
          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
  2869
      } note * = this
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2870
      have pal: "pathstart (linepath a b) \<in> closure (- t)"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2871
        by (auto simp: False closure_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2872
      show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2873
        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
  2874
  qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2875
qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2876
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2877
lemma inside_inside_compact_connected:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2878
    fixes s :: "'a :: euclidean_space set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2879
    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
  2880
      shows "inside s \<subseteq> inside t"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2881
proof (cases "inside t = {}")
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2882
  case True with assms show ?thesis by auto
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2883
next
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2884
  case False
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2885
  consider "DIM('a) = 1" | "DIM('a) \<ge> 2"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2886
    using antisym not_less_eq_eq by fastforce
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2887
  then show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2888
  proof cases
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2889
    case 1 then show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2890
             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
  2891
  next
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2892
    case 2
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2893
    have coms: "compact s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2894
      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
  2895
       by (meson bounded_inside bounded_subset compact_imp_bounded)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2896
    then have bst: "bounded (s \<union> t)"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2897
      by (simp add: compact_imp_bounded t)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2898
    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
  2899
      using bounded_subset_ballD by blast
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2900
    have outst: "outside s \<inter> outside t \<noteq> {}"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2901
    proof -
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2902
      have "- ball 0 r \<subseteq> outside s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2903
        apply (rule outside_subset_convex)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2904
        using r by auto
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2905
      moreover have "- ball 0 r \<subseteq> outside t"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2906
        apply (rule outside_subset_convex)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2907
        using r by auto
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2908
      ultimately show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2909
        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
  2910
    qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2911
    have "s \<inter> t = {}" using assms
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2912
      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
  2913
    moreover have "outside s \<inter> inside t \<noteq> {}"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2914
      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
  2915
    ultimately have "inside s \<inter> t = {}"
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2916
      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
  2917
      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
  2918
    then show ?thesis
61808
fc1556774cfe isabelle update_cartouches -c -t;
wenzelm
parents: 61806
diff changeset
  2919
      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
  2920
  qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2921
qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2922
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2923
lemma connected_with_inside:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2924
    fixes s :: "'a :: real_normed_vector set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2925
    assumes s: "closed s" and cons: "connected s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2926
      shows "connected(s \<union> inside s)"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2927
proof (cases "s \<union> inside s = UNIV")
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2928
  case True with assms show ?thesis by auto
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2929
next
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2930
  case False
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2931
  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
  2932
  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
  2933
  using that proof
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2934
    assume "a \<in> s" then show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2935
      apply (rule_tac x=a in exI)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2936
      apply (rule_tac x="{a}" in exI)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2937
      apply (simp add:)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2938
      done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2939
  next
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2940
    assume a: "a \<in> inside s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2941
    show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2942
      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
  2943
      using a apply (simp add: closure_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2944
      apply (simp add: b)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2945
      apply (rule_tac x="pathfinish h" in exI)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2946
      apply (rule_tac x="path_image h" in exI)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2947
      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
  2948
      using frontier_inside_subset s apply fastforce
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2949
      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
  2950
  qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2951
  show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2952
    apply (simp add: connected_iff_connected_component)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2953
    apply (simp add: connected_component_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2954
    apply (clarify dest!: *)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2955
    apply (rename_tac u u' t t')
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2956
    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
  2957
    apply (auto simp: intro!: connected_Un cons)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2958
    done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2959
qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2960
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2961
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
  2962
lemma connected_with_outside:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2963
    fixes s :: "'a :: real_normed_vector set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2964
    assumes s: "closed s" and cons: "connected s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2965
      shows "connected(s \<union> outside s)"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2966
proof (cases "s \<union> outside s = UNIV")
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2967
  case True with assms show ?thesis by auto
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2968
next
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2969
  case False
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2970
  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
  2971
  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
  2972
  using that proof
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2973
    assume "a \<in> s" then show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2974
      apply (rule_tac x=a in exI)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2975
      apply (rule_tac x="{a}" in exI)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2976
      apply (simp add:)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2977
      done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2978
  next
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2979
    assume a: "a \<in> outside s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2980
    show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2981
      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
  2982
      using a apply (simp add: closure_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2983
      apply (simp add: b)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2984
      apply (rule_tac x="pathfinish h" in exI)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2985
      apply (rule_tac x="path_image h" in exI)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2986
      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
  2987
      using frontier_outside_subset s apply fastforce
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2988
      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
  2989
  qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2990
  show ?thesis
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2991
    apply (simp add: connected_iff_connected_component)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2992
    apply (simp add: connected_component_def)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2993
    apply (clarify dest!: *)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2994
    apply (rename_tac u u' t t')
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2995
    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
  2996
    apply (auto simp: intro!: connected_Un cons)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2997
    done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2998
qed
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  2999
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3000
lemma inside_inside_eq_empty [simp]:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3001
    fixes s :: "'a :: {real_normed_vector, perfect_space} set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3002
    assumes s: "closed s" and cons: "connected s"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3003
      shows "inside (inside s) = {}"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3004
  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
  3005
           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
  3006
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3007
lemma inside_in_components:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3008
     "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
  3009
  apply (simp add: in_components_maximal)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3010
  apply (auto intro: inside_same_component connected_componentI)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3011
  apply (metis IntI empty_iff inside_no_overlap)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3012
  done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3013
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3014
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
  3015
lemma outside_in_components:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3016
     "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
  3017
  apply (simp add: in_components_maximal)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3018
  apply (auto intro: outside_same_component connected_componentI)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3019
  apply (metis IntI empty_iff outside_no_overlap)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3020
  done
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3021
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3022
lemma bounded_unique_outside:
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3023
    fixes s :: "'a :: euclidean_space set"
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3024
    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
  3025
  apply (rule iffI)
ff12606337e9 new lemmas about topology, etc., for Cauchy integral formula
paulson
parents: 61426
diff changeset
  3026
  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
  3027
  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
  3028
62533
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3029
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
  3030
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3031
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
  3032
  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
  3033
  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
  3034
      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
  3035
      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
  3036
      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
  3037
    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
  3038
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
  3039
  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
  3040
next
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3041
  case False
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3042
    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
  3043
               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
  3044
      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
  3045
      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
  3046
    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
  3047
      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
  3048
    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
  3049
    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
  3050
      by metis
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3051
    then obtain y K where y: "y \<in> closure S" and "subseq K" and Klim: "(z \<circ> K) \<longlonglongrightarrow> y"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3052
      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
  3053
      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
  3054
      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
  3055
      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
  3056
      done
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3057
    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
  3058
      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
  3059
    have zKs: "\<And>n. (z o K) n \<in> S" by (simp add: zs)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3060
    have "f \<circ> z = \<xi>"  "(\<lambda>n. f (z n)) = \<xi>"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3061
      using fz by auto
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3062
    moreover then have "(\<xi> \<circ> K) \<longlonglongrightarrow> f y"
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3063
      by (metis (no_types) Klim zKs y contf comp_assoc continuous_on_closure_sequentially)
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3064
    ultimately have wy: "w = f y" using fz LIMSEQ_unique ftendsw by auto
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3065
    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
  3066
      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
  3067
      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
  3068
      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
  3069
    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
  3070
              \<Longrightarrow> (b \<inter> S \<noteq> {}) \<Longrightarrow> b \<inter> f = {} \<Longrightarrow>
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3071
              b \<subseteq> S" for b f and S :: "'b set" 
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3072
      by blast
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3073
    show ?thesis
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3074
      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
  3075
      apply (rule connected_Int_frontier [where t = "f`S", OF connected_ball])
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3076
      using \<open>a \<in> S\<close> \<open>0 < r\<close> 
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3077
      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
  3078
      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
  3079
qed
bc25f3916a99 new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents: 62398
diff changeset
  3080
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
  3081
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
  3082
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3083
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
  3084
  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
  3085
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3086
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
  3087
  "[('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
  3088
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
  3089
 "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
  3090
   (\<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
  3091
       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
  3092
       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
  3093
       (\<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
  3094
       (\<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
  3095
       (\<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
  3096
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3097
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3098
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
  3099
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
  3100
  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
  3101
  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
  3102
  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
  3103
           (\<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
  3104
              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
  3105
              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
  3106
              (\<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
  3107
              (\<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
  3108
              (\<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
  3109
  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
  3110
  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
  3111
  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
  3112
  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
  3113
  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
  3114
  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
  3115
  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
  3116
  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
  3117
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3118
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
  3119
   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
  3120
       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
  3121
       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
  3122
       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
  3123
   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
  3124
  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
  3125
  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
  3126
  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
  3127
  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
  3128
  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
  3129
  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
  3130
  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
  3131
  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
  3132
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3133
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
  3134
   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
  3135
       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
  3136
       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
  3137
   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
  3138
  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
  3139
  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
  3140
  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
  3141
  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
  3142
  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
  3143
  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
  3144
  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
  3145
  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
  3146
  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
  3147
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3148
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3149
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
  3150
  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
  3151
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3152
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
  3153
   "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
  3154
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
  3155
  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
  3156
    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
  3157
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
  3158
  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
  3159
  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
  3160
  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
  3161
  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
  3162
    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
  3163
    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
  3164
        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
  3165
          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
  3166
      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
  3167
    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
  3168
      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
  3169
      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
  3170
      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
  3171
    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
  3172
      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
  3173
      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
  3174
      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
  3175
      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
  3176
      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
  3177
  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
  3178
    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
  3179
    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
  3180
      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
  3181
      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
  3182
      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
  3183
      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
  3184
  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
  3185
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
  3186
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3187
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3188
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
  3189
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3190
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
  3191
  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
  3192
  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
  3193
  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
  3194
  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
  3195
  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
  3196
  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
  3197
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3198
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
  3199
  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
  3200
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3201
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
  3202
    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
  3203
    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
  3204
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
  3205
  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
  3206
    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
  3207
      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
  3208
    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
  3209
  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
  3210
    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
  3211
  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
  3212
    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
  3213
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
  3214
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3215
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
  3216
     "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
  3217
  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
  3218
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3219
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
  3220
     "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
  3221
  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
  3222
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3223
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
  3224
    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
  3225
        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
  3226
      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
  3227
  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
  3228
  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
  3229
  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
  3230
  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
  3231
  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
  3232
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3233
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
  3234
     "\<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
  3235
  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
  3236
  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
  3237
  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
  3238
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3239
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
  3240
     "\<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
  3241
  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
  3242
  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
  3243
  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
  3244
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3245
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
  3246
    "\<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
  3247
     \<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
  3248
  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
  3249
  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
  3250
  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
  3251
  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
  3252
  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
  3253
  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
  3254
  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
  3255
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3256
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
  3257
     "\<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
  3258
      \<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
  3259
  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
  3260
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3261
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
  3262
     "\<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
  3263
      \<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
  3264
  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
  3265
  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
  3266
  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
  3267
  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
  3268
  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
  3269
  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
  3270
  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
  3271
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3272
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
  3273
   "\<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
  3274
     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
  3275
    \<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
  3276
  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
  3277
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3278
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
  3279
   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
  3280
       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
  3281
     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
  3282
                  (\<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
  3283
  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
  3284
  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
  3285
  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
  3286
  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
  3287
  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
  3288
  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
  3289
  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
  3290
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
  3291
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
  3292
  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
  3293
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3294
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3295
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
  3296
     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
  3297
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3298
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3299
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
  3300
   "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
  3301
  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
  3302
  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
  3303
  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
  3304
  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
  3305
  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
  3306
  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
  3307
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3308
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
  3309
  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
  3310
    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
  3311
      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
  3312
  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
  3313
  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
  3314
  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
  3315
  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
  3316
  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
  3317
  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
  3318
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3319
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
  3320
    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
  3321
    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
  3322
  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
  3323
61699
a81dc5c4d6a9 New theorems mostly from Peter Gammie
paulson <lp15@cam.ac.uk>
parents: 61694
diff changeset
  3324
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
  3325
  by force
a81dc5c4d6a9 New theorems mostly from Peter Gammie
paulson <lp15@cam.ac.uk>
parents: 61694
diff changeset
  3326
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
  3327
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
  3328
  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
  3329
6571c78c9667 Removed some legacy theorems; minor adjustments to simplification rules; new material on homotopic paths
paulson <lp15@cam.ac.uk>
parents: 61518
diff changeset
  3330
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
  3331
    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
  3332
    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
  3333
      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
  3334
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
  3335
  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
  3336
    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
  3337
    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
  3338
    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
  3339
    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
  3340
  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
  3341
    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
  3342
    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
  3343
    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
  3344
    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
  3345
  { 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
  3346
    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
  3347
       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
  3348
       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
  3349
       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
  3350
       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
  3351
    define k where "k y =
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 63016
diff changeset
  3352
      (if fst y \<le> 1 / 2
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 63016
diff changeset
  3353
       then (k1 o (\<lambda>x. (2 *\<^sub>R fst x, snd x))) y
eb4ddd18d635 eliminated old 'def';
wenzelm
parents: 63016
diff changeset
  3354
       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
  3355
    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
  3356
      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
  3357
    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
  3358
      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
  3359
      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
  3360
      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
  3361
      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
  3362
      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
  3363
    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
  3364
      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
  3365
    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
  3366
      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
  3367
    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
  3368
      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
  3369
    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
  3370
      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
  3371
      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
  3372
      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
  3373
      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
  3374
      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
  3375
    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
  3376
                       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
  3377
                       (\<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
  3378
      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
  3379
  } 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
  3380
  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
  3381
    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
  3382
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
  3383
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
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
  3385
      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
  3386
      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
  3387
             \<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
  3388
  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
  3389
  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
  3390
  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
  3391
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
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
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
  3394
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
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
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
  3397
  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
  3398
     "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
  3399
       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
  3400
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
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
  3402
   "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
  3403
      (\<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
  3404
          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
  3405
          (\<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
  3406
          (\<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
  3407
          (\<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
  3408
                        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
  3409
  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
  3410
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
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
  3412
     "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
  3413
  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
  3414
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
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
  3416
     "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
  3417
  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
  3418
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
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
  3420
     "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
  3421
  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
  3422
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
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
  3424
     "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
  3425
  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
  3426
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
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
  3428
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
  3429
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
  3430
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
  3431
  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
  3432
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
  3433
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
  3434
  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
  3435
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
  3436
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
  3437
     "\<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
  3438
  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
  3439
  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
  3440
  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
  3441
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
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
  3443
     "\<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
  3444
  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
  3445
  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
  3446
  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
  3447
  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
  3448
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
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
  3450
  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
  3451
      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
  3452
      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
  3453
      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
  3454
      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
  3455
      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
  3456
    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
  3457
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
  3458
  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
  3459
    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
  3460
  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
  3461
    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
  3462
  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
  3463
    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
  3464
  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
  3465
    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
  3466
  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
  3467
    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
  3468
  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
  3469
    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
  3470
  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
  3471
  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
  3472
    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
  3473
      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
  3474
  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
  3475
    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
  3476
      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
  3477
      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
  3478
      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
  3479
      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
  3480
      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
  3481
      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
  3482
  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
  3483
  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
  3484
    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
  3485
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
  3486
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
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
  3488
  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
  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
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
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
  3492
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
  3493
  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
  3494
  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
  3495
      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
  3496
      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
  3497
    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
  3498
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
  3499
  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
  3500
    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
  3501
  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
  3502
    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
  3503
  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
  3504
    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
  3505
    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
  3506
    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
  3507
    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
  3508
    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
  3509
    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
  3510
    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
  3511
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
  3512
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
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
  3514
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
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
  3516
      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
  3517
      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
  3518
  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
  3519
  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
  3520
  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
  3521
  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
  3522
  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
  3523
  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
  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_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
  3526
     "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
  3527
  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
  3528
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
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
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
  3531
    "\<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
  3532
  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
  3533
  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
  3534
  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
  3535
  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
  3536
  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
  3537
  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
  3538
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
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
  3540
    "\<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
  3541
  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
  3542
  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
  3543
  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
  3544
  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
  3545
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3546
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
  3547
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3548
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
  3549
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3550
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
  3551
    "\<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
  3552
  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
  3553
  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
  3554
  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
  3555
  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
  3556
  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
  3557
  done
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3558
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3559
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
  3560
   "\<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
  3561
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
  3562
  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
  3563
        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
  3564
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3565
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
  3566
   "\<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
  3567
     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
  3568
    \<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
  3569
  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
  3570
  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
  3571
           [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
  3572
                           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
  3573
                           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
  3574
  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
  3575
  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
  3576
  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
  3577
  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
  3578
  done
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3579
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3580
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
  3581
  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
  3582
    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
  3583
proof -
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3584
  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
  3585
    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
  3586
    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
  3587
    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
  3588
    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
  3589
    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
  3590
    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
  3591
    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
  3592
    done
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3593
  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
  3594
    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
  3595
    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
  3596
    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
  3597
    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
  3598
    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
  3599
    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
  3600
    done
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3601
qed
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3602
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3603
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
  3604
  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
  3605
    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
  3606
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
  3607
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3608
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3609
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
  3610
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3611
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
  3612
 "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
  3613
     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
  3614
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3615
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
  3616
   "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
  3617
      (\<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
  3618
          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
  3619
          (\<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
  3620
          (\<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
  3621
          (\<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
  3622
  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
  3623
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3624
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
  3625
     "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
  3626
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
  3627
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3628
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
  3629
     "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
  3630
  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
  3631
  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
  3632
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
  3633
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
  3634
     "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
  3635
  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
  3636
  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
  3637
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3638
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
  3639
     "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
  3640
      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
  3641
  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
  3642
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
  3643
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
  3644
  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
  3645
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
  3646
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
  3647
  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
  3648
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3649
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
  3650
   "\<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
  3651
  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
  3652
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3653
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
  3654
   "\<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
  3655
  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
  3656
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3657
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
  3658
   "\<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
  3659
          \<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
  3660
  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
  3661
  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
  3662
  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
  3663
  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
  3664
  done
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3665
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3666
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
  3667
   "\<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
  3668
  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
  3669
  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
  3670
  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
  3671
  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
  3672
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3673
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3674
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
  3675
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3676
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
  3677
    "\<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
  3678
  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
  3679
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3680
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
  3681
  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
  3682
    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
  3683
proof -
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3684
  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
  3685
  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
  3686
  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
  3687
  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
  3688
             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
  3689
             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
  3690
             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
  3691
             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
  3692
    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
  3693
  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
  3694
    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
  3695
    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
  3696
    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
  3697
    done
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3698
  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
  3699
    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
  3700
  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
  3701
    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
  3702
    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
  3703
    done
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3704
  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
  3705
    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
  3706
    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
  3707
    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
  3708
    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
  3709
    done
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3710
  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
  3711
    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
  3712
  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
  3713
  proof -
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3714
    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
  3715
    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
  3716
  qed
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3717
  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
  3718
                  (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
  3719
                  (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
  3720
                   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
  3721
                  \<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
  3722
    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
  3723
              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
  3724
  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
  3725
    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
  3726
  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
  3727
                                   (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
  3728
    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
  3729
    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
  3730
    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
  3731
  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
  3732
                                   ((\<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
  3733
    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
  3734
    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
  3735
    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
  3736
    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
  3737
    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
  3738
    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
  3739
    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
  3740
    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
  3741
  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
  3742
                                   (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
  3743
    apply (rule *)
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3744
    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
  3745
    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
  3746
    done
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3747
  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
  3748
    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
  3749
qed
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3750
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3751
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
  3752
  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
  3753
  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
  3754
      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
  3755
    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
  3756
proof -
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3757
  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
  3758
  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
  3759
  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
  3760
    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
  3761
    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
  3762
    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
  3763
    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
  3764
    done
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3765
  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
  3766
    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
  3767
    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
  3768
    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
  3769
    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
  3770
    done
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3771
  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
  3772
    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
  3773
    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
  3774
  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
  3775
    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
  3776
    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
  3777
    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
  3778
    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
  3779
              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
  3780
  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
  3781
    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
  3782
  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
  3783
                          (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
  3784
    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
  3785
    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
  3786
    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
  3787
    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
  3788
    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
  3789
    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
  3790
    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
  3791
    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
  3792
    done
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3793
  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
  3794
  proof -
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3795
    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
  3796
      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
  3797
    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
  3798
      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
  3799
    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
  3800
    proof -
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3801
      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
  3802
        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
  3803
      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
  3804
        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
  3805
                  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
  3806
    qed
61711
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3807
    thus ?thesis
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3808
      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
  3809
  qed
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3810
  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
  3811
    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
  3812
qed
21d7910d6816 Theory of homotopic paths (from HOL Light), plus comments and minor refinements
paulson <lp15@cam.ac.uk>
parents: 61699
diff changeset
  3813
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
  3814
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
  3815
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
  3816
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
  3817
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
  3818
  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
  3819
  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
  3820
      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
  3821
      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
  3822
    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
  3823
  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
  3824
  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
  3825
  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
  3826
  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
  3827
                                            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
  3828
  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
  3829
  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
  3830
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
  3831
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
  3832
  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
  3833
  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
  3834
          "\<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
  3835
    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
  3836
  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
  3837
  unfolding path_def
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  3838
  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
  3839
  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
  3840
  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
  3841
  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
  3842
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
  3843
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
  3844
  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
  3845
  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
  3846
          "\<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
  3847
    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
  3848
  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
  3849
  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
  3850
  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
  3851
  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
  3852
  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
  3853
  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
  3854
  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
  3855
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
  3856
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
  3857
  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
  3858
      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
  3859
    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
  3860
  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
  3861
  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
  3862
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
  3863
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
  3864
  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
  3865
      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
  3866
    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
  3867
  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
  3868
  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
  3869
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
  3870
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
  3871
  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
  3872
  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
  3873
    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
  3874
               (\<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
  3875
                    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
  3876
                    (\<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
  3877
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
  3878
  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
  3879
    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
  3880
  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
  3881
    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
  3882
    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
  3883
    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
  3884
    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
  3885
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
  3886
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
  3887
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
  3888
  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
  3889
  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
  3890
    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
  3891
               (\<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
  3892
                    (\<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
  3893
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
  3894
  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
  3895
    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
  3896
  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
  3897
    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
  3898
    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
  3899
    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
  3900
    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
  3901
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
  3902
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
  3903
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
  3904
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
  3905
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
  3906
  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
  3907
      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
  3908
    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
  3909
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
  3910
  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
  3911
    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
  3912
  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
  3913
    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
  3914
  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
  3915
  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
  3916
    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
  3917
    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
  3918
    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
  3919
    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
  3920
    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
  3921
      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
  3922
      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
  3923
             [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
  3924
                             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
  3925
                             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
  3926
      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
  3927
      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
  3928
      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
  3929
      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
  3930
      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
  3931
      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
  3932
      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
  3933
      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
  3934
      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
  3935
      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
  3936
      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
  3937
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
  3938
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
  3939
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
  3940
  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
  3941
    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
  3942
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
  3943
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
  3944
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
  3945
  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
  3946
      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
  3947
      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
  3948
    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
  3949
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
  3950
  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
  3951
    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
  3952
    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
  3953
    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
  3954
    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
  3955
    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
  3956
  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
  3957
    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
  3958
    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
  3959
  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
  3960
                               (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
  3961
    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
  3962
    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
  3963
    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
  3964
    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
  3965
    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
  3966
  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
  3967
    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
  3968
    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
  3969
    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
  3970
    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
  3971
  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
  3972
  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
  3973
    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
  3974
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
  3975
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
  3976
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
  3977
   "\<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
  3978
    \<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
  3979
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
  3980
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
  3981
62620
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  3982
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
  3983
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  3984
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
  3985
    "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
  3986
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
  3987
                 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
  3988
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
  3989
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
  3990
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
  3991
done
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  3992
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  3993
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
  3994
   "\<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
  3995
        \<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
  3996
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
  3997
                 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
  3998
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
  3999
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
  4000
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
  4001
done
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4002
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4003
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
  4004
   "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
  4005
        path_component S a b"
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4006
by (auto simp: 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
  4007
         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
  4008
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4009
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
  4010
    "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
  4011
      (\<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
  4012
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
  4013
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4014
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4015
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
  4016
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4017
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
  4018
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4019
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
  4020
  "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
  4021
        \<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
  4022
              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
  4023
              \<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
  4024
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4025
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
  4026
  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
  4027
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4028
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
  4029
  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
  4030
  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
  4031
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
  4032
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4033
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
  4034
  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
  4035
  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
  4036
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
  4037
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4038
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
  4039
  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
  4040
  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
  4041
            (\<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
  4042
                  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
  4043
                  \<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
  4044
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
  4045
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
  4046
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
  4047
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
  4048
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
  4049
done
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4050
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4051
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
  4052
  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
  4053
  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
  4054
                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
  4055
                (\<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
  4056
                    \<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
  4057
apply (rule iffI)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4058
 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
  4059
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
  4060
apply (drule_tac x=p in spec)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4061
using homotopic_loops_trans 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
  4062
  apply blast
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4063
done
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4064
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4065
lemma simply_connected_eq_contractible_loop_all: 
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4066
  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
  4067
  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
  4068
         S = {} \<or>
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4069
         (\<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
  4070
                \<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
  4071
        (is "?lhs = ?rhs")
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4072
proof (cases "S = {}")
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4073
  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
  4074
next
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4075
  case False
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4076
  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
  4077
  show ?thesis
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4078
  proof  
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4079
    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
  4080
    then show ?rhs
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4081
      using \<open>a \<in> S\<close> \<open>simply_connected S\<close> 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
  4082
      by blast
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4083
  next     
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4084
    assume ?rhs
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4085
    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
  4086
      apply (simp add: simply_connected_eq_contractible_loop_any False)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4087
      by (meson homotopic_loops_refl homotopic_loops_sym homotopic_loops_trans 
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4088
             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
  4089
  qed
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4090
qed
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4091
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4092
lemma 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
  4093
  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
  4094
  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
  4095
           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
  4096
           (\<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
  4097
            \<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
  4098
apply (rule iffI)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4099
 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
  4100
 apply (metis simply_connected_eq_contractible_loop_some homotopic_loops_imp_homotopic_paths_null)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4101
by (meson homotopic_paths_imp_homotopic_loops pathfinish_linepath pathstart_in_path_image 
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4102
         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
  4103
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4104
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
  4105
  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
  4106
  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
  4107
          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
  4108
          (\<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
  4109
                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
  4110
                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
  4111
                \<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
  4112
         (is "?lhs = ?rhs")
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4113
proof
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4114
  assume ?lhs
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4115
  then have pc: "path_connected S" 
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4116
        and *:  "\<And>p. \<lbrakk>path p; path_image p \<subseteq> S;
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4117
                       pathfinish p = pathstart p\<rbrakk> 
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4118
                      \<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
  4119
    by (auto 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
  4120
  have "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
  4121
        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
  4122
           "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
  4123
           "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
  4124
  proof -
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4125
    have "homotopic_paths S p (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
  4126
      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
  4127
    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
  4128
                                 (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
  4129
      using that
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4130
      by (metis homotopic_paths_join homotopic_paths_linv homotopic_paths_refl homotopic_paths_sym_eq pathstart_linepath)
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4131
    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
  4132
                                 ((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
  4133
      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
  4134
    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
  4135
                                 (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
  4136
      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
  4137
      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
  4138
    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
  4139
      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
  4140
    finally show ?thesis .
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4141
  qed
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4142
  then show ?rhs
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4143
    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
  4144
next
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4145
  assume ?rhs 
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4146
  then show ?lhs
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4147
    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
  4148
qed
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4149
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4150
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
  4151
  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
  4152
  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
  4153
    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
  4154
proof -
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4155
  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
  4156
       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
  4157
       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
  4158
  proof -
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4159
    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
  4160
      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
  4161
      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
  4162
      done
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4163
    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
  4164
      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
  4165
    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
  4166
      using S that
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4167
      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
  4168
      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
  4169
      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
  4170
      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
  4171
      done
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4172
    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
  4173
      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
  4174
      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
  4175
      done
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4176
    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
  4177
      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
  4178
    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
  4179
      using T that
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4180
      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
  4181
      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
  4182
      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
  4183
      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
  4184
      done
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4185
    show ?thesis
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4186
      using p1 p2
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4187
      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
  4188
      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
  4189
      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
  4190
      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
  4191
      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
  4192
      done
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4193
  qed
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4194
  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
  4195
    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
  4196
qed
d21dab28b3f9 New results about paths, segments, etc. The notion of simply_connected.
paulson <lp15@cam.ac.uk>
parents: 62618
diff changeset
  4197
62626
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4198
subsection\<open>Contractible sets\<close>
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4199
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4200
definition contractible where
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4201
 "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
  4202
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4203
proposition contractible_imp_simply_connected:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4204
  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
  4205
  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
  4206
proof (cases "S = {}")
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4207
  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
  4208
next
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4209
  case False
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4210
  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
  4211
    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
  4212
  then have "a \<in> S"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4213
    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
  4214
  show ?thesis
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4215
    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
  4216
    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
  4217
    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
  4218
    apply clarify
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4219
    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
  4220
    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
  4221
    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
  4222
    done
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4223
qed
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4224
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4225
corollary contractible_imp_connected:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4226
  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
  4227
  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
  4228
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
  4229
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4230
lemma contractible_imp_path_connected:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4231
  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
  4232
  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
  4233
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
  4234
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4235
lemma nullhomotopic_through_contractible:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4236
  fixes S :: "_::topological_space set"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4237
  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
  4238
      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
  4239
      and T: "contractible T"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4240
    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
  4241
proof -
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4242
  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
  4243
    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
  4244
  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
  4245
    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
  4246
  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
  4247
    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
  4248
  then show ?thesis
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4249
    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
  4250
qed
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4251
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4252
lemma nullhomotopic_into_contractible:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4253
  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
  4254
      and T: "contractible T"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4255
    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
  4256
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
  4257
using assms
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4258
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
  4259
done
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4260
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4261
lemma nullhomotopic_from_contractible:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4262
  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
  4263
      and S: "contractible S"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4264
    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
  4265
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
  4266
using assms
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4267
apply (auto simp: comp_def)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4268
done
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4269
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4270
lemma homotopic_through_contractible:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4271
  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
  4272
  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
  4273
          "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
  4274
          "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
  4275
          "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
  4276
          "contractible T" "path_connected U"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4277
   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
  4278
proof -
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4279
  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
  4280
    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
  4281
    using assms apply (auto simp: )
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4282
    done
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4283
  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
  4284
    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
  4285
    using assms apply (auto simp: )
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4286
    done
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4287
  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
  4288
  proof (cases "S = {}")
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4289
    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
  4290
  next
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4291
    case False
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4292
    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
  4293
      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
  4294
    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
  4295
  qed
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4296
  show ?thesis
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4297
    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
  4298
    apply (rule homotopic_with_symD)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4299
    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
  4300
    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
  4301
    done
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4302
qed
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4303
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4304
lemma homotopic_into_contractible:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4305
  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
  4306
  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
  4307
      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
  4308
      and T: "contractible T"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4309
    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
  4310
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
  4311
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
  4312
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4313
lemma homotopic_from_contractible:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4314
  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
  4315
  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
  4316
      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
  4317
      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
  4318
    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
  4319
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
  4320
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
  4321
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4322
lemma starlike_imp_contractible_gen:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4323
  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
  4324
  assumes S: "starlike S"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4325
      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
  4326
    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
  4327
proof -
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4328
  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
  4329
    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
  4330
  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
  4331
    apply clarify
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4332
    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
  4333
    apply (simp add: )
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4334
    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
  4335
    done
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4336
  then show ?thesis
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4337
    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
  4338
    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
  4339
    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
  4340
    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
  4341
    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
  4342
    apply (simp_all add: P)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4343
    done
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4344
qed
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4345
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4346
lemma starlike_imp_contractible:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4347
  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
  4348
  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
  4349
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
  4350
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4351
lemma contractible_UNIV: "contractible (UNIV :: 'a::real_normed_vector set)"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4352
  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
  4353
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4354
lemma starlike_imp_simply_connected:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4355
  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
  4356
  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
  4357
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
  4358
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4359
lemma convex_imp_simply_connected:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4360
  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
  4361
  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
  4362
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
  4363
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4364
lemma starlike_imp_path_connected:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4365
  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
  4366
  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
  4367
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
  4368
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4369
lemma starlike_imp_connected:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4370
  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
  4371
  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
  4372
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
  4373
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4374
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
  4375
  fixes S :: "real set"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4376
  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
  4377
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
  4378
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4379
lemma contractible_empty: "contractible {}"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4380
  by (simp add: continuous_on_empty contractible_def homotopic_with)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4381
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4382
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
  4383
  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
  4384
  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
  4385
  shows "contractible T"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4386
proof (cases "S = {}")
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4387
  case True
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4388
  with assms show ?thesis
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4389
    by (simp add: contractible_empty subsetCE)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4390
next
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4391
  case False
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4392
  show ?thesis
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4393
    apply (rule starlike_imp_contractible)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4394
    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
  4395
    done
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4396
qed
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4397
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4398
lemma convex_imp_contractible:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4399
  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
  4400
  shows "convex S \<Longrightarrow> contractible S"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4401
using contractible_empty convex_imp_starlike starlike_imp_contractible by auto
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4402
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4403
lemma contractible_sing:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4404
  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
  4405
  shows "contractible {a}"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4406
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
  4407
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4408
lemma is_interval_contractible_1:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4409
  fixes S :: "real set"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4410
  shows  "is_interval S \<longleftrightarrow> contractible S"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4411
using contractible_imp_simply_connected convex_imp_contractible is_interval_convex_1 
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4412
      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
  4413
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4414
lemma contractible_times:
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4415
  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
  4416
  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
  4417
  shows "contractible (S \<times> T)"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4418
proof -
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4419
  obtain a h where conth: "continuous_on ({0..1} \<times> S) h" 
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4420
             and hsub: "h ` ({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
  4421
             and [simp]: "\<And>x. x \<in> S \<Longrightarrow> h (0, x) = x" 
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4422
             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
  4423
    using S 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
  4424
  obtain b k where contk: "continuous_on ({0..1} \<times> T) k" 
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4425
             and ksub: "k ` ({0..1} \<times> T) \<subseteq> T"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4426
             and [simp]: "\<And>x. x \<in> T \<Longrightarrow> k (0, x) = x" 
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4427
             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
  4428
    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
  4429
  show ?thesis
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4430
    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
  4431
    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
  4432
    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
  4433
    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
  4434
    apply (intro conjI ballI continuous_intros continuous_on_compose2 [OF conth] continuous_on_compose2 [OF contk])
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4435
    using hsub ksub 
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4436
    apply (auto simp: )
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4437
    done
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4438
qed
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4439
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4440
lemma homotopy_dominated_contractibility: 
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4441
  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
  4442
  assumes S: "contractible S"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4443
      and f: "continuous_on S f" "image f S \<subseteq> T" 
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4444
      and g: "continuous_on T g" "image g T \<subseteq> S" 
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4445
      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
  4446
    shows "contractible T"
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4447
proof -
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4448
  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
  4449
    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
  4450
  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
  4451
    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
  4452
  show ?thesis
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4453
    apply (simp add: contractible_def)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4454
    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
  4455
    apply (rule homotopic_with_symD)
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4456
    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
  4457
    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
  4458
    done
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4459
qed
de25474ce728 Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents: 62620
diff changeset
  4460
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4461
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
  4462
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4463
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
  4464
where
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4465
 "locally P S \<equiv>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4466
        \<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
  4467
              \<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
  4468
                        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
  4469
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4470
lemma locallyI:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4471
  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
  4472
                  \<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
  4473
                        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
  4474
    shows "locally P S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4475
using assms by (force simp: locally_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4476
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4477
lemma locallyE:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4478
  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
  4479
  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
  4480
                    "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
  4481
using assms by (force simp: locally_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4482
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4483
lemma locally_mono:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4484
  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
  4485
    shows "locally Q S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4486
by (metis assms locally_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4487
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4488
lemma locally_open_subset:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4489
  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
  4490
    shows "locally P t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4491
using assms
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4492
apply (simp add: locally_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4493
apply (erule all_forward)+
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4494
apply (rule impI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4495
apply (erule impCE)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4496
 using openin_trans apply blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4497
apply (erule ex_forward)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4498
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
  4499
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4500
lemma locally_diff_closed:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4501
    "\<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
  4502
  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
  4503
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4504
lemma locally_empty [iff]: "locally P {}"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4505
  by (simp add: locally_def openin_subtopology)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4506
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4507
lemma locally_singleton [iff]:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4508
  fixes a :: "'a::metric_space"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4509
  shows "locally P {a} \<longleftrightarrow> P {a}"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4510
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
  4511
using zero_less_one by blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4512
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4513
lemma locally_iff:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4514
    "locally P S \<longleftrightarrow>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4515
     (\<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
  4516
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
  4517
apply (metis IntE IntI le_inf_iff)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4518
apply (metis IntI Int_subset_iff)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4519
done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4520
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4521
lemma locally_Int:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4522
  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
  4523
      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
  4524
    shows "locally P (S \<inter> t)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4525
using S t unfolding locally_iff
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4526
apply clarify
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4527
apply (drule_tac x=T in spec)+
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4528
apply (drule_tac x=x in spec)+
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4529
apply clarsimp
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4530
apply (rename_tac U1 U2 V1 V2)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4531
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
  4532
apply (simp add: open_Int)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4533
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
  4534
apply (auto intro: P)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4535
done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4536
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4537
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4538
proposition homeomorphism_locally_imp:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4539
  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
  4540
  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
  4541
      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
  4542
    shows "locally Q t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4543
proof (clarsimp simp: locally_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4544
  fix w y
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4545
  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
  4546
  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
  4547
    by (force simp: openin_open)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4548
  then have "w \<subseteq> t" by auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4549
  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
  4550
   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
  4551
    using hom by (auto simp: homeomorphism_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4552
  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
  4553
    using \<open>w \<subseteq> t\<close>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4554
    apply auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4555
    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
  4556
    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
  4557
    by (simp add: f rev_image_eqI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4558
  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
  4559
  proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4560
    have "continuous_on S f"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4561
      using f(3) by blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4562
    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
  4563
      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
  4564
  qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4565
  then obtain u v
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4566
    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
  4567
    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
  4568
  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
  4569
  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
  4570
    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
  4571
  have "f ` v \<subseteq> w"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4572
    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
  4573
  have contvf: "continuous_on v f"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4574
    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
  4575
  have contvg: "continuous_on (f ` v) g"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4576
    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
  4577
  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
  4578
    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
  4579
    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
  4580
    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
  4581
  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
  4582
    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
  4583
    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
  4584
    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
  4585
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4586
  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
  4587
    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
  4588
    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
  4589
    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
  4590
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4591
  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
  4592
            (\<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
  4593
    by (meson 1 2)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4594
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4595
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4596
lemma homeomorphism_locally:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4597
  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
  4598
  assumes hom: "homeomorphism S t f g"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4599
      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
  4600
    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
  4601
apply (rule iffI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4602
apply (erule homeomorphism_locally_imp [OF _ hom])
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4603
apply (simp add: eq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4604
apply (erule homeomorphism_locally_imp)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4605
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
  4606
done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4607
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4608
lemma homeomorphic_locally:
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4609
  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
  4610
  assumes hom: "S homeomorphic T"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4611
          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
  4612
    shows "locally P S \<longleftrightarrow> locally Q T"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4613
proof -
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4614
  obtain f g where hom: "homeomorphism S T f g"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4615
    using assms by (force simp: homeomorphic_def)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4616
  then show ?thesis
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4617
    using homeomorphic_def local.iff
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4618
    by (blast intro!: homeomorphism_locally)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4619
qed
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4620
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4621
lemma homeomorphic_local_compactness:
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4622
  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
  4623
  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
  4624
by (simp add: homeomorphic_compactness homeomorphic_locally)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4625
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4626
lemma locally_translation:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4627
  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
  4628
  shows
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4629
   "(\<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
  4630
        \<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
  4631
apply (rule homeomorphism_locally [OF homeomorphism_translation])
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4632
apply (simp add: homeomorphism_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4633
by metis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4634
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4635
lemma locally_injective_linear_image:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4636
  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
  4637
  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
  4638
    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
  4639
apply (rule linear_homeomorphism_image [OF f])
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4640
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
  4641
by (metis iff homeomorphism_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4642
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4643
lemma locally_open_map_image:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4644
  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
  4645
  assumes P: "locally P S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4646
      and f: "continuous_on S f"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4647
      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
  4648
                   \<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
  4649
      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
  4650
    shows "locally Q (f ` S)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4651
proof (clarsimp simp add: locally_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4652
  fix w y
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4653
  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
  4654
  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
  4655
  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
  4656
    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
  4657
  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
  4658
    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
  4659
  then obtain u v
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4660
    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
  4661
    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
  4662
    by auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4663
  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
  4664
            (\<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
  4665
    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
  4666
    apply (rule conjI, blast intro!: oo)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4667
    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
  4668
    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
  4669
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4670
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4671
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4672
subsection\<open>Sort of induction principle for connected sets\<close>
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4673
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4674
lemma connected_induction:
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4675
  assumes "connected S"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4676
      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
  4677
      and opI: "\<And>a. a \<in> S
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4678
             \<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
  4679
                     (\<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
  4680
      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
  4681
    shows "Q b"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4682
proof -
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4683
  have 1: "openin (subtopology euclidean S)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4684
             {b. \<exists>T. openin (subtopology euclidean S) T \<and>
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4685
                     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
  4686
    apply (subst openin_subopen, clarify)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4687
    apply (rule_tac x=T in exI, auto)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4688
    done
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4689
  have 2: "openin (subtopology euclidean S)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4690
             {b. \<exists>T. openin (subtopology euclidean S) T \<and>
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4691
                     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
  4692
    apply (subst openin_subopen, clarify)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4693
    apply (rule_tac x=T in exI, auto)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4694
    done
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4695
  show ?thesis
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4696
    using \<open>connected S\<close>
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4697
    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
  4698
    apply (elim disjE allE)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4699
         apply (blast intro: 1)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4700
        apply (blast intro: 2, simp_all)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4701
       apply clarify apply (metis opI)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4702
      using opD apply (blast intro: etc elim: dest:)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4703
     using opI etc apply meson+
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4704
    done
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4705
qed
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4706
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4707
lemma connected_equivalence_relation_gen:
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4708
  assumes "connected S"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4709
      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
  4710
      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
  4711
      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
  4712
      and opI: "\<And>a. a \<in> S
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4713
             \<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
  4714
                     (\<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
  4715
    shows "R a b"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4716
proof -
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4717
  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
  4718
    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
  4719
    by (meson trans opI)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4720
  then show ?thesis by (metis etc opI)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4721
qed
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4722
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4723
lemma connected_induction_simple:
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4724
  assumes "connected S"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4725
      and etc: "a \<in> S" "b \<in> S" "P a"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4726
      and opI: "\<And>a. a \<in> S
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4727
             \<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
  4728
                     (\<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
  4729
    shows "P b"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4730
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
  4731
apply (frule opI)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4732
using etc apply simp_all
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4733
done
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4734
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4735
lemma connected_equivalence_relation:
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4736
  assumes "connected S"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4737
      and etc: "a \<in> S" "b \<in> S"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4738
      and sym: "\<And>x y z. R x y \<Longrightarrow> R y x"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4739
      and trans: "\<And>x y z. R x y \<and> R y z \<Longrightarrow> R x z"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4740
      and opI: "\<And>a. a \<in> S
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4741
             \<Longrightarrow> \<exists>T. openin (subtopology euclidean S) T \<and> a \<in> T \<and> (\<forall>x \<in> T. R a x)"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4742
    shows "R a b"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4743
proof -
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4744
  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
  4745
    apply (rule connected_induction_simple [OF \<open>connected S\<close>], simp_all)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4746
    by (meson local.sym local.trans opI)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4747
  then show ?thesis by (metis etc opI)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4748
qed
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4749
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4750
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4751
lemma locally_constant_imp_constant:
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4752
  assumes "connected S"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4753
      and opI: "\<And>a. a \<in> S
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4754
             \<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
  4755
    shows "f constant_on S"
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4756
proof -
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4757
  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
  4758
    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
  4759
    by (metis opI)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4760
  then show ?thesis
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4761
    by (metis constant_on_def)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4762
qed
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4763
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4764
lemma locally_constant:
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4765
     "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
  4766
apply (simp add: locally_def)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4767
apply (rule iffI)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4768
 apply (rule locally_constant_imp_constant, assumption)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4769
 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
  4770
by (meson constant_on_subset openin_imp_subset order_refl)
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4771
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  4772
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4773
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
  4774
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4775
lemma locally_compact:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4776
  fixes s :: "'a :: metric_space set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4777
  shows
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4778
    "locally compact s \<longleftrightarrow>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4779
     (\<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
  4780
                    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
  4781
     (is "?lhs = ?rhs")
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4782
proof
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4783
  assume ?lhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4784
  then show ?rhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4785
    apply clarify
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4786
    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
  4787
    by auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4788
next
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4789
  assume r [rule_format]: ?rhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4790
  have *: "\<exists>u v.
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4791
              openin (subtopology euclidean s) u \<and>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4792
              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
  4793
          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
  4794
  proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4795
    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
  4796
      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
  4797
    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
  4798
      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
  4799
    show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4800
      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
  4801
      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
  4802
      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
  4803
      apply auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4804
      done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4805
  qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4806
  show ?lhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4807
    apply (rule locallyI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4808
    apply (subst (asm) openin_open)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4809
    apply (blast intro: *)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4810
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4811
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4812
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4813
lemma locally_compactE:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4814
  fixes s :: "'a :: metric_space set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4815
  assumes "locally compact s"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4816
  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
  4817
                             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
  4818
using assms
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4819
unfolding locally_compact by metis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4820
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4821
lemma locally_compact_alt:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4822
  fixes s :: "'a :: heine_borel set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4823
  shows "locally compact s \<longleftrightarrow>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4824
         (\<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
  4825
                    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
  4826
apply (simp add: locally_compact)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4827
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
  4828
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
  4829
by (meson closure_subset compact_closure)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4830
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4831
lemma locally_compact_Int_cball:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4832
  fixes s :: "'a :: heine_borel set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4833
  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
  4834
        (is "?lhs = ?rhs")
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4835
proof
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4836
  assume ?lhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4837
  then show ?rhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4838
    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
  4839
    apply (clarify | assumption | drule bspec)+
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4840
    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
  4841
next
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4842
  assume ?rhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4843
  then show ?lhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4844
    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
  4845
    apply (clarify | assumption | drule bspec)+
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4846
    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
  4847
    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
  4848
    using compact_eq_bounded_closed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4849
    apply auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4850
    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
  4851
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4852
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4853
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4854
lemma locally_compact_compact:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4855
  fixes s :: "'a :: heine_borel set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4856
  shows "locally compact s \<longleftrightarrow>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4857
         (\<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
  4858
              \<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
  4859
                         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
  4860
        (is "?lhs = ?rhs")
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4861
proof
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4862
  assume ?lhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4863
  then obtain u v where
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4864
    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
  4865
                             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
  4866
    by (metis locally_compactE)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4867
  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
  4868
          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
  4869
  proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4870
    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
  4871
                    \<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
  4872
      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
  4873
    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
  4874
      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
  4875
    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
  4876
      using that by clarsimp (meson subsetCE uv)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4877
    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
  4878
      by metis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4879
    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
  4880
      by (metis finite_subset_image)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4881
    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
  4882
      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
  4883
    show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4884
      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
  4885
      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
  4886
      apply (simp add: Tuv)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4887
      using T that
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4888
      apply (auto simp: dest!: uv)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4889
      done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4890
  qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4891
  show ?rhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4892
    by (blast intro: *)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4893
next
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4894
  assume ?rhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4895
  then show ?lhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4896
    apply (clarsimp simp add: locally_compact)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4897
    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
  4898
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4899
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4900
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4901
lemma open_imp_locally_compact:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4902
  fixes s :: "'a :: heine_borel set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4903
  assumes "open s"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4904
    shows "locally compact s"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4905
proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4906
  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
  4907
          if "x \<in> s" for x
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4908
  proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4909
    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
  4910
      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
  4911
    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
  4912
      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
  4913
    show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4914
      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
  4915
      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
  4916
      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
  4917
      done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4918
  qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4919
  show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4920
    unfolding locally_compact
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4921
    by (blast intro: *)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4922
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4923
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4924
lemma closed_imp_locally_compact:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4925
  fixes s :: "'a :: heine_borel set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4926
  assumes "closed s"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4927
    shows "locally compact s"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4928
proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4929
  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
  4930
                 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
  4931
          if "x \<in> s" for x
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4932
  proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4933
    show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4934
      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
  4935
      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
  4936
      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
  4937
      done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4938
  qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4939
  show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4940
    unfolding locally_compact
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4941
    by (blast intro: *)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4942
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4943
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4944
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
  4945
  by (simp add: closed_imp_locally_compact)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4946
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4947
lemma locally_compact_Int:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4948
  fixes s :: "'a :: t2_space set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4949
  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
  4950
by (simp add: compact_Int locally_Int)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4951
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4952
lemma locally_compact_closedin:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4953
  fixes s :: "'a :: heine_borel set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4954
  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
  4955
        \<Longrightarrow> locally compact t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4956
unfolding closedin_closed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4957
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
  4958
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4959
lemma locally_compact_delete:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4960
     fixes s :: "'a :: t1_space set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4961
     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
  4962
  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
  4963
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4964
lemma locally_closed:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4965
  fixes s :: "'a :: heine_borel set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4966
  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
  4967
        (is "?lhs = ?rhs")
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4968
proof
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4969
  assume ?lhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4970
  then show ?rhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4971
    apply (simp only: locally_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4972
    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
  4973
    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
  4974
    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
  4975
    apply (force intro: openin_trans)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4976
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4977
next
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4978
  assume ?rhs then show ?lhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4979
    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
  4980
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4981
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4982
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
  4983
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4984
lemma locally_connected_1:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4985
  assumes
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4986
    "\<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
  4987
              \<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
  4988
                      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
  4989
   shows "locally connected S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4990
apply (clarsimp simp add: locally_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4991
apply (drule assms; blast)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4992
done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4993
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4994
lemma locally_connected_2:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4995
  assumes "locally connected S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4996
          "openin (subtopology euclidean S) t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4997
          "x \<in> t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  4998
   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
  4999
proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5000
  { fix y :: 'a
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5001
    let ?SS = "subtopology euclidean S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5002
    assume 1: "openin ?SS t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5003
              "\<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
  5004
    and "connected_component t x y"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5005
    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
  5006
      using connected_component_subset by blast+
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5007
    obtain F where
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5008
      "\<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
  5009
      by moura
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5010
    then obtain G where
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5011
       "\<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
  5012
      by moura
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5013
    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
  5014
      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
  5015
    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
  5016
      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
  5017
    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
  5018
      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
  5019
  }
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5020
  then show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5021
    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
  5022
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5023
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5024
lemma locally_connected_3:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5025
  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
  5026
              \<Longrightarrow> openin (subtopology euclidean S)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5027
                          (connected_component_set t x)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5028
          "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
  5029
   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
  5030
using assms connected_component_subset by fastforce
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5031
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5032
lemma locally_connected:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5033
  "locally connected S \<longleftrightarrow>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5034
   (\<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
  5035
          \<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
  5036
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
  5037
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5038
lemma locally_connected_open_connected_component:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5039
  "locally connected S \<longleftrightarrow>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5040
   (\<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
  5041
          \<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
  5042
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
  5043
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5044
lemma locally_path_connected_1:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5045
  assumes
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5046
    "\<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
  5047
              \<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
  5048
   shows "locally path_connected S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5049
apply (clarsimp simp add: locally_def)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5050
apply (drule assms; blast)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5051
done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5052
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5053
lemma locally_path_connected_2:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5054
  assumes "locally path_connected S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5055
          "openin (subtopology euclidean S) t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5056
          "x \<in> t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5057
   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
  5058
proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5059
  { fix y :: 'a
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5060
    let ?SS = "subtopology euclidean S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5061
    assume 1: "openin ?SS t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5062
              "\<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
  5063
    and "path_component t x y"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5064
    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
  5065
      using path_component_mem(2) by blast+
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5066
    obtain F where
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5067
      "\<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
  5068
      by moura
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5069
    then obtain G where
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5070
       "\<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
  5071
      by moura
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5072
    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
  5073
      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
  5074
    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
  5075
      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
  5076
    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
  5077
      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
  5078
  }
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5079
  then show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5080
    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
  5081
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5082
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5083
lemma locally_path_connected_3:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5084
  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
  5085
              \<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
  5086
          "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
  5087
   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
  5088
proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5089
  have "path_component v x x"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5090
    by (meson assms(3) path_component_refl)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5091
  then show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5092
    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
  5093
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5094
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5095
proposition locally_path_connected:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5096
  "locally path_connected S \<longleftrightarrow>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5097
   (\<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
  5098
          \<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
  5099
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
  5100
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5101
proposition locally_path_connected_open_path_connected_component:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5102
  "locally path_connected S \<longleftrightarrow>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5103
   (\<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
  5104
          \<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
  5105
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
  5106
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5107
lemma locally_connected_open_component:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5108
  "locally connected S \<longleftrightarrow>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5109
   (\<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
  5110
          \<longrightarrow> openin (subtopology euclidean S) c)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5111
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
  5112
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5113
proposition locally_connected_im_kleinen:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5114
  "locally connected S \<longleftrightarrow>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5115
   (\<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
  5116
       \<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
  5117
                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
  5118
                (\<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
  5119
   (is "?lhs = ?rhs")
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5120
proof
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5121
  assume ?lhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5122
  then show ?rhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5123
    by (fastforce simp add: locally_connected)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5124
next
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5125
  assume ?rhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5126
  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
  5127
       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
  5128
  proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5129
    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
  5130
    obtain u where u:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5131
      "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
  5132
       (\<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
  5133
      by auto (meson subsetD in_components_subset)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5134
    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
  5135
      "\<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
  5136
      by moura
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5137
    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
  5138
      by (meson components_iff c)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5139
    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
  5140
        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
  5141
      by moura
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5142
     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
  5143
      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
  5144
    then show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5145
      using G u by auto
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5146
  qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5147
  show ?lhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5148
    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
  5149
    apply (subst openin_subopen)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5150
    apply (blast intro: *)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5151
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5152
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5153
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5154
proposition locally_path_connected_im_kleinen:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5155
  "locally path_connected S \<longleftrightarrow>
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5156
   (\<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
  5157
       \<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
  5158
                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
  5159
                (\<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
  5160
                                pathstart p = x \<and> pathfinish p = y))))"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5161
   (is "?lhs = ?rhs")
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5162
proof
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5163
  assume ?lhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5164
  then show ?rhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5165
    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
  5166
    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
  5167
    by (meson dual_order.trans)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5168
next
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5169
  assume ?rhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5170
  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
  5171
               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
  5172
       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
  5173
  proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5174
    have "x \<in> u"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5175
      by (meson c path_component_mem(2))
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5176
    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
  5177
    obtain U where U:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5178
      "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
  5179
       (\<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
  5180
       by blast
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5181
    show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5182
      apply (rule_tac x=U in exI)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5183
      apply (auto simp: U)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5184
      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
  5185
      done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5186
  qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5187
  show ?lhs
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5188
    apply (clarsimp simp add: locally_path_connected_open_path_connected_component)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5189
    apply (subst openin_subopen)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5190
    apply (blast intro: *)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5191
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5192
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5193
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5194
lemma locally_path_connected_imp_locally_connected:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5195
  "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
  5196
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
  5197
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5198
lemma locally_connected_components:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5199
  "\<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
  5200
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
  5201
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5202
lemma locally_path_connected_components:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5203
  "\<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
  5204
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
  5205
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5206
lemma locally_path_connected_connected_component:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5207
  "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
  5208
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
  5209
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5210
lemma open_imp_locally_path_connected:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5211
  fixes S :: "'a :: real_normed_vector set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5212
  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
  5213
apply (rule locally_mono [of convex])
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5214
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
  5215
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
  5216
done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5217
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5218
lemma open_imp_locally_connected:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5219
  fixes S :: "'a :: real_normed_vector set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5220
  shows "open S \<Longrightarrow> locally connected S"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5221
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
  5222
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5223
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
  5224
  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
  5225
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5226
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
  5227
  by (simp add: open_imp_locally_connected)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5228
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5229
lemma openin_connected_component_locally_connected:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5230
    "locally connected S
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5231
     \<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
  5232
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
  5233
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
  5234
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5235
lemma openin_components_locally_connected:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5236
    "\<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
  5237
  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
  5238
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5239
lemma openin_path_component_locally_path_connected:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5240
  "locally path_connected S
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5241
        \<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
  5242
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
  5243
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5244
lemma closedin_path_component_locally_path_connected:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5245
    "locally path_connected S
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5246
        \<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
  5247
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
  5248
apply (rule openin_Union)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5249
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
  5250
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5251
lemma convex_imp_locally_path_connected:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5252
  fixes S :: "'a:: real_normed_vector set"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5253
  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
  5254
apply (clarsimp simp add: locally_path_connected)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5255
apply (subst (asm) openin_open)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5256
apply clarify
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5257
apply (erule (1) Topology_Euclidean_Space.openE)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5258
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
  5259
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
  5260
done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5261
63114
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5262
subsection\<open>Components, continuity, openin, closedin\<close>
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5263
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5264
lemma continuous_openin_preimage_eq:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5265
   "continuous_on S f \<longleftrightarrow>
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5266
    (\<forall>t. open t \<longrightarrow> openin (subtopology euclidean S) {x. x \<in> S \<and> f x \<in> t})"
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5267
apply (auto simp: continuous_openin_preimage_gen)
63114
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5268
apply (fastforce simp add: continuous_on_open openin_open)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5269
done
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5270
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5271
lemma continuous_closedin_preimage_eq:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5272
   "continuous_on S f \<longleftrightarrow>
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5273
    (\<forall>t. closed t \<longrightarrow> closedin (subtopology euclidean S) {x. x \<in> S \<and> f x \<in> t})"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5274
apply safe
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5275
apply (simp add: continuous_closedin_preimage)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5276
apply (fastforce simp add: continuous_on_closed closedin_closed)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5277
done
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5278
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5279
lemma continuous_on_components_gen:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5280
 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
  5281
  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
  5282
              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
  5283
    shows "continuous_on S f"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5284
proof (clarsimp simp: continuous_openin_preimage_eq)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5285
  fix t :: "'b set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5286
  assume "open t"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5287
  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
  5288
    apply auto
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5289
    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
  5290
    using Union_components by blast
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5291
  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
  5292
    using \<open>open t\<close> assms
63301
d3c87eb0bad2 new results about topology
paulson <lp15@cam.ac.uk>
parents: 63151
diff changeset
  5293
    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
  5294
qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5295
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5296
lemma continuous_on_components:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5297
 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
  5298
  assumes "locally connected S "
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5299
          "\<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
  5300
    shows "continuous_on S f"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5301
apply (rule continuous_on_components_gen)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5302
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
  5303
done
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5304
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5305
lemma continuous_on_components_eq:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5306
    "locally connected S
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5307
     \<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
  5308
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
  5309
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5310
lemma continuous_on_components_open:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5311
 fixes S :: "'a::real_normed_vector set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5312
  assumes "open S "
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5313
          "\<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
  5314
    shows "continuous_on S f"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5315
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
  5316
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5317
lemma continuous_on_components_open_eq:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5318
  fixes S :: "'a::real_normed_vector set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5319
  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
  5320
using continuous_on_subset in_components_subset
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5321
by (blast intro: continuous_on_components_open)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5322
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5323
lemma closedin_union_complement_components:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5324
  assumes u: "locally connected u"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5325
      and S: "closedin (subtopology euclidean u) S"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5326
      and cuS: "c \<subseteq> components(u - S)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5327
    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
  5328
proof -
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5329
  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
  5330
    by (simp add: disjnt_def) blast
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5331
  have "S \<subseteq> u"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5332
    using S closedin_imp_subset by blast
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5333
  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
  5334
    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
  5335
  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
  5336
    apply (rule di)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5337
    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
  5338
  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
  5339
    by (auto simp: disjnt_def)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5340
  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
  5341
    apply (rule openin_Union)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5342
    apply (rule openin_trans [of "u - S"])
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5343
    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
  5344
    apply (simp add: openin_diff S)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5345
    done
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5346
  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
  5347
    apply (rule openin_diff, simp)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5348
    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
  5349
    done
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5350
  then show ?thesis
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5351
    by (force simp: eq closedin_def)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5352
qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5353
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5354
lemma closed_union_complement_components:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5355
  fixes S :: "'a::real_normed_vector set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5356
  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
  5357
    shows "closed(S \<union> \<Union> c)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5358
proof -
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5359
  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
  5360
    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
  5361
    using S apply (simp add: closed_closedin)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5362
    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
  5363
    done
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5364
  then show ?thesis
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5365
    by (simp add: closed_closedin)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5366
qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5367
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5368
lemma closedin_Un_complement_component:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5369
  fixes S :: "'a::real_normed_vector set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5370
  assumes u: "locally connected u"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5371
      and S: "closedin (subtopology euclidean u) S"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5372
      and c: " c \<in> components(u - S)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5373
    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
  5374
proof -
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5375
  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
  5376
    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
  5377
  then show ?thesis
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5378
    by simp
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5379
qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5380
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5381
lemma closed_Un_complement_component:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5382
  fixes S :: "'a::real_normed_vector set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5383
  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
  5384
    shows "closed (S \<union> c)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5385
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
  5386
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5387
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5388
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
  5389
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5390
lemma isometry_subset_subspace:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5391
  fixes S :: "'a::euclidean_space set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5392
    and T :: "'b::euclidean_space set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5393
  assumes S: "subspace S"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5394
      and T: "subspace T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5395
      and d: "dim S \<le> dim T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5396
  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
  5397
proof -
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5398
  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
  5399
             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
  5400
             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
  5401
    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
  5402
  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
  5403
             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
  5404
             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
  5405
    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
  5406
  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
  5407
    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
  5408
  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
  5409
    using Corth
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5410
    apply (auto simp: pairwise_def orthogonal_clauses)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5411
    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
  5412
  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
  5413
    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
  5414
  have "f ` S \<subseteq> T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5415
    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
  5416
  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
  5417
    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
  5418
  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
  5419
  proof -
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5420
    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
  5421
      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
  5422
    have "f x = (\<Sum>v \<in> B. f (a v *\<^sub>R v))"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5423
      using linear_setsum [OF \<open>linear f\<close>] x by auto
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5424
    also have "... = (\<Sum>v \<in> B. a v *\<^sub>R f v)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5425
      using \<open>linear f\<close> by (simp add: linear_setsum linear.scaleR)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5426
    also have "... = (\<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
  5427
      by (simp add: ffb cong: setsum.cong)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5428
    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
  5429
    also have "... = (\<Sum>v\<in>B. norm ((a v *\<^sub>R fb v))^2)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5430
      apply (rule norm_setsum_Pythagorean [OF \<open>finite B\<close>])
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5431
      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
  5432
      done
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5433
    also have "... = norm x ^2"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5434
      by (simp add: x pairwise_ortho_scaleR Borth norm_setsum_Pythagorean [OF \<open>finite B\<close>])
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5435
    finally show ?thesis
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5436
      by (simp add: norm_eq_sqrt_inner)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5437
  qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5438
  then show ?thesis
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5439
    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
  5440
qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5441
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5442
proposition isometries_subspaces:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5443
  fixes S :: "'a::euclidean_space set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5444
    and T :: "'b::euclidean_space set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5445
  assumes S: "subspace S"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5446
      and T: "subspace T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5447
      and d: "dim S = dim T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5448
  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
  5449
                    "\<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
  5450
                    "\<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
  5451
                    "\<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
  5452
                    "\<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
  5453
proof -
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5454
  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
  5455
             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
  5456
             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
  5457
    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
  5458
  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
  5459
             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
  5460
             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
  5461
    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
  5462
  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
  5463
    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
  5464
  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
  5465
    using Corth
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5466
    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
  5467
    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
  5468
  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
  5469
    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
  5470
  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
  5471
  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
  5472
    using Borth
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5473
    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
  5474
    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
  5475
  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
  5476
    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
  5477
  have "f ` S \<subseteq> T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5478
    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
  5479
  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
  5480
    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
  5481
  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
  5482
  proof -
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5483
    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
  5484
      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
  5485
    have "f x = (\<Sum>v \<in> B. f (a v *\<^sub>R v))"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5486
      using linear_setsum [OF \<open>linear f\<close>] x by auto
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5487
    also have "... = (\<Sum>v \<in> B. a v *\<^sub>R f v)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5488
      using \<open>linear f\<close> by (simp add: linear_setsum linear.scaleR)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5489
    also have "... = (\<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
  5490
      by (simp add: ffb cong: setsum.cong)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5491
    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
  5492
    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
  5493
    also have "... = (\<Sum>v\<in>B. norm ((a v *\<^sub>R fb v))^2)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5494
      apply (rule norm_setsum_Pythagorean [OF \<open>finite B\<close>])
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5495
      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
  5496
      done
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5497
    also have "... = (norm x)\<^sup>2"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5498
      by (simp add: x pairwise_ortho_scaleR Borth norm_setsum_Pythagorean [OF \<open>finite B\<close>])
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5499
    finally show "norm (f x) = norm x"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5500
      by (simp add: norm_eq_sqrt_inner)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5501
    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
  5502
    also have "... = (\<Sum>v\<in>B. g (a v *\<^sub>R fb v))"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5503
      using \<open>linear g\<close> by (simp add: linear_setsum linear.scaleR)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5504
    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
  5505
      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
  5506
    also have "... = (\<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
  5507
      apply (rule setsum.cong [OF refl])
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5508
      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
  5509
    also have "... = x"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5510
      using x by blast
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5511
    finally show "g (f x) = x" .
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5512
  qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5513
  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
  5514
    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
  5515
  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
  5516
  proof -
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5517
    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
  5518
      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
  5519
    have "g x = (\<Sum>v \<in> C. g (a v *\<^sub>R v))"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5520
      using linear_setsum [OF \<open>linear g\<close>] x by auto
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5521
    also have "... = (\<Sum>v \<in> C. a v *\<^sub>R g v)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5522
      using \<open>linear g\<close> by (simp add: linear_setsum linear.scaleR)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5523
    also have "... = (\<Sum>v \<in> C. a v *\<^sub>R gb v)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5524
      by (simp add: ggb cong: setsum.cong)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5525
    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
  5526
    also have "... = (\<Sum>v\<in>C. f (a v *\<^sub>R gb v))"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5527
      using \<open>linear f\<close> by (simp add: linear_setsum linear.scaleR)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5528
    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
  5529
      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
  5530
    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
  5531
      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
  5532
      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
  5533
    also have "... = x"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5534
      using x by blast
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5535
    finally show "f (g x) = x" .
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5536
  qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5537
  have gim: "g ` T = S"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5538
    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
  5539
  have fim: "f ` S = T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5540
    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
  5541
  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
  5542
    using fim that by auto
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5543
  show ?thesis
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5544
    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
  5545
    apply (simp_all add: fim gim)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5546
    done
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5547
qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5548
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5549
lemma isometry_subspaces:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5550
  fixes S :: "'a::euclidean_space set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5551
    and T :: "'b::euclidean_space set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5552
  assumes S: "subspace S"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5553
      and T: "subspace T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5554
      and d: "dim S = dim T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5555
  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
  5556
using isometries_subspaces [OF assms]
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5557
by metis
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5558
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5559
lemma homeomorphic_subspaces:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5560
  fixes S :: "'a::euclidean_space set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5561
    and T :: "'b::euclidean_space set"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5562
  assumes S: "subspace S"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5563
      and T: "subspace T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5564
      and d: "dim S = dim T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5565
    shows "S homeomorphic T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5566
proof -
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5567
  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
  5568
                   "\<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
  5569
    by (blast intro: isometries_subspaces [OF assms])
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5570
  then show ?thesis
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5571
    apply (simp add: homeomorphic_def homeomorphism_def)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5572
    apply (rule_tac x=f in exI)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5573
    apply (rule_tac x=g in exI)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5574
    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
  5575
    done
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5576
qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5577
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5578
lemma homeomorphic_affine_sets:
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5579
  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
  5580
    shows "S homeomorphic T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5581
proof (cases "S = {} \<or> T = {}")
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5582
  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
  5583
    by metis
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5584
next
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5585
  case False
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5586
  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
  5587
  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
  5588
    using affine_diffs_subspace assms by blast+
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5589
  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
  5590
    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
  5591
  have "S homeomorphic (op + (- a) ` S)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5592
    by (simp add: homeomorphic_translation)
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5593
  also have "... homeomorphic (op + (- b) ` T)"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5594
    by (rule homeomorphic_subspaces [OF ss dd])
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5595
  also have "... homeomorphic T"
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5596
    using homeomorphic_sym homeomorphic_translation by auto
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5597
  finally show ?thesis .
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5598
qed
27afe7af7379 Lots of new material for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 63092
diff changeset
  5599
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5600
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
  5601
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5602
locale Retracts =
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5603
  fixes s h t k
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5604
  assumes conth: "continuous_on s h"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5605
      and imh: "h ` s = t"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5606
      and contk: "continuous_on t k"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5607
      and imk: "k ` t \<subseteq> s"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5608
      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
  5609
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5610
begin
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5611
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5612
lemma homotopically_trivial_retraction_gen:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5613
  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
  5614
      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
  5615
      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
  5616
      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
  5617
                       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
  5618
                       \<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
  5619
      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
  5620
      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
  5621
    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
  5622
proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5623
  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
  5624
  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
  5625
  have "continuous_on u (k \<circ> f)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5626
    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
  5627
  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
  5628
    using imf imk by fastforce
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5629
  moreover have "P (k \<circ> f)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5630
    by (simp add: P Qf contf imf)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5631
  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
  5632
    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
  5633
  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
  5634
    using img imk by fastforce
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5635
  moreover have "P (k \<circ> g)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5636
    by (simp add: P Qg contg img)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5637
  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
  5638
    by (rule hom)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5639
  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
  5640
    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
  5641
    using Q by (auto simp: conth imh)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5642
  then show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5643
    apply (rule homotopic_with_eq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5644
    apply (metis feq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5645
    apply (metis geq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5646
    apply (metis Qeq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5647
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5648
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5649
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5650
lemma homotopically_trivial_retraction_null_gen:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5651
  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
  5652
      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
  5653
      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
  5654
      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
  5655
                     \<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
  5656
      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
  5657
  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
  5658
proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5659
  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
  5660
  have "continuous_on u (k \<circ> f)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5661
    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
  5662
  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
  5663
    using imf imk by fastforce
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5664
  moreover have "P (k \<circ> f)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5665
    by (simp add: P Qf contf imf)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5666
  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
  5667
    by (metis hom)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5668
  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
  5669
    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
  5670
    using Q by (auto simp: conth imh)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5671
  then show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5672
    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
  5673
    apply (erule homotopic_with_eq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5674
    apply (metis feq, simp)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5675
    apply (metis Qeq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5676
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5677
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5678
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5679
lemma cohomotopically_trivial_retraction_gen:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5680
  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
  5681
      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
  5682
      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
  5683
      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
  5684
                       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
  5685
                       \<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
  5686
      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
  5687
      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
  5688
    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
  5689
proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5690
  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
  5691
  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
  5692
  have "continuous_on s (f \<circ> h)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5693
    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
  5694
  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
  5695
    using imf imh by fastforce
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5696
  moreover have "P (f \<circ> h)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5697
    by (simp add: P Qf contf imf)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5698
  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
  5699
    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
  5700
  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
  5701
    using img imh by fastforce
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5702
  moreover have "P (g \<circ> h)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5703
    by (simp add: P Qg contg img)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5704
  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
  5705
    by (rule hom)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5706
  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
  5707
    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
  5708
    using Q by (auto simp: contk imk)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5709
  then show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5710
    apply (rule homotopic_with_eq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5711
    apply (metis feq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5712
    apply (metis geq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5713
    apply (metis Qeq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5714
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5715
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5716
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5717
lemma cohomotopically_trivial_retraction_null_gen:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5718
  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
  5719
      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
  5720
      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
  5721
      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
  5722
                       \<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
  5723
      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
  5724
  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
  5725
proof -
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5726
  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
  5727
  have "continuous_on s (f \<circ> h)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5728
    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
  5729
  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
  5730
    using imf imh by fastforce
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5731
  moreover have "P (f \<circ> h)"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5732
    by (simp add: P Qf contf imf)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5733
  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
  5734
    by (metis hom)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5735
  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
  5736
    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
  5737
    using Q by (auto simp: contk imk)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5738
  then show ?thesis
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5739
    apply (rule_tac c = c in that)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5740
    apply (erule homotopic_with_eq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5741
    apply (metis feq, simp)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5742
    apply (metis Qeq)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5743
    done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5744
qed
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5745
36583
68ce5760c585 move path-related stuff into new theory file
huffman
parents:
diff changeset
  5746
end
62948
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5747
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5748
lemma simply_connected_retraction_gen:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5749
  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
  5750
          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
  5751
        \<Longrightarrow> simply_connected T"
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5752
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
  5753
apply (rule Retracts.homotopically_trivial_retraction_gen
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5754
        [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
  5755
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
  5756
done
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5757
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5758
lemma homeomorphic_simply_connected:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5759
    "\<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
  5760
  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
  5761
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5762
lemma homeomorphic_simply_connected_eq:
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5763
    "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
  5764
  by (metis homeomorphic_simply_connected homeomorphic_sym)
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5765
7700f467892b lots of new theorems for multivariate analysis
paulson <lp15@cam.ac.uk>
parents: 62843
diff changeset
  5766
end