[STATEMENT]
theorem invariance_of_domain_Euclidean_space:
  assumes U: "openin (Euclidean_space n) U"
    and cmf: "continuous_map (subtopology (Euclidean_space n) U) (Euclidean_space n) f"
    and "inj_on f U"
  shows "openin (Euclidean_space n) (f ` U)"   (is "openin ?E (f ` U)")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. openin (Euclidean_space n) (f ` U)
[PROOF STEP]
proof (cases "n = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. n = 0 \<Longrightarrow> openin (Euclidean_space n) (f ` U)
 2. n \<noteq> 0 \<Longrightarrow> openin (Euclidean_space n) (f ` U)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
n = 0

goal (2 subgoals):
 1. n = 0 \<Longrightarrow> openin (Euclidean_space n) (f ` U)
 2. n \<noteq> 0 \<Longrightarrow> openin (Euclidean_space n) (f ` U)
[PROOF STEP]
have [simp]: "Euclidean_space 0 = discrete_topology {\<lambda>i. 0}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Euclidean_space 0 = discrete_topology {\<lambda>i. 0}
[PROOF STEP]
by (auto simp: subtopology_eq_discrete_topology_sing topspace_Euclidean_space)
[PROOF STATE]
proof (state)
this:
Euclidean_space 0 = discrete_topology {\<lambda>i. 0}

goal (2 subgoals):
 1. n = 0 \<Longrightarrow> openin (Euclidean_space n) (f ` U)
 2. n \<noteq> 0 \<Longrightarrow> openin (Euclidean_space n) (f ` U)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. openin (Euclidean_space n) (f ` U)
[PROOF STEP]
using cmf True U
[PROOF STATE]
proof (prove)
using this:
continuous_map (subtopology (Euclidean_space n) U) (Euclidean_space n) f
n = 0
openin (Euclidean_space n) U

goal (1 subgoal):
 1. openin (Euclidean_space n) (f ` U)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
openin (Euclidean_space n) (f ` U)

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> openin (Euclidean_space n) (f ` U)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> openin (Euclidean_space n) (f ` U)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
n \<noteq> 0

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> openin (Euclidean_space n) (f ` U)
[PROOF STEP]
define enorm where "enorm \<equiv> \<lambda>x. sqrt(\<Sum>i<n. x i ^ 2)"
[PROOF STATE]
proof (state)
this:
enorm \<equiv> \<lambda>x. sqrt (\<Sum>i<n. (x i)\<^sup>2)

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> openin (Euclidean_space n) (f ` U)
[PROOF STEP]
have enorm_if [simp]: "enorm (\<lambda>i. if i = k then d else 0) = (if k < n then \<bar>d\<bar> else 0)" for k d
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. enorm (\<lambda>i. if i = k then d else 0) = (if k < n then \<bar>d\<bar> else 0)
[PROOF STEP]
using \<open>n \<noteq> 0\<close>
[PROOF STATE]
proof (prove)
using this:
n \<noteq> 0

goal (1 subgoal):
 1. enorm (\<lambda>i. if i = k then d else 0) = (if k < n then \<bar>d\<bar> else 0)
[PROOF STEP]
by (auto simp:  enorm_def power2_eq_square if_distrib [of "\<lambda>x. x * _"] cong: if_cong)
[PROOF STATE]
proof (state)
this:
enorm (\<lambda>i. if i = ?k then ?d else 0) = (if ?k < n then \<bar>?d\<bar> else 0)

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> openin (Euclidean_space n) (f ` U)
[PROOF STEP]
define zero::"nat\<Rightarrow>real" where "zero \<equiv> \<lambda>i. 0"
[PROOF STATE]
proof (state)
this:
zero \<equiv> \<lambda>i. 0

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> openin (Euclidean_space n) (f ` U)
[PROOF STEP]
have zero_in [simp]: "zero \<in> topspace ?E"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. zero \<in> topspace (Euclidean_space n)
[PROOF STEP]
using False
[PROOF STATE]
proof (prove)
using this:
n \<noteq> 0

goal (1 subgoal):
 1. zero \<in> topspace (Euclidean_space n)
[PROOF STEP]
by (simp add: zero_def topspace_Euclidean_space)
[PROOF STATE]
proof (state)
this:
zero \<in> topspace (Euclidean_space n)

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> openin (Euclidean_space n) (f ` U)
[PROOF STEP]
have enorm_eq_0 [simp]: "enorm x = 0 \<longleftrightarrow> x = zero"
    if "x \<in> topspace(Euclidean_space n)" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (enorm x = 0) = (x = zero)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
x \<in> topspace (Euclidean_space n)

goal (1 subgoal):
 1. (enorm x = 0) = (x = zero)
[PROOF STEP]
unfolding zero_def enorm_def
[PROOF STATE]
proof (prove)
using this:
x \<in> topspace (Euclidean_space n)

goal (1 subgoal):
 1. (sqrt (\<Sum>i<n. (x i)\<^sup>2) = 0) = (x = (\<lambda>i. 0))
[PROOF STEP]
apply (simp add: sum_nonneg_eq_0_iff fun_eq_iff topspace_Euclidean_space)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i\<ge>n. x i = 0 \<Longrightarrow> (\<forall>xa\<in>{..<n}. x xa = 0) = (\<forall>xa. x xa = 0)
[PROOF STEP]
using le_less_linear
[PROOF STATE]
proof (prove)
using this:
?x \<le> ?y \<or> ?y < ?x

goal (1 subgoal):
 1. \<forall>i\<ge>n. x i = 0 \<Longrightarrow> (\<forall>xa\<in>{..<n}. x xa = 0) = (\<forall>xa. x xa = 0)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
?x \<in> topspace (Euclidean_space n) \<Longrightarrow> (enorm ?x = 0) = (?x = zero)

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> openin (Euclidean_space n) (f ` U)
[PROOF STEP]
have [simp]: "enorm zero = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. enorm zero = 0
[PROOF STEP]
by (simp add: zero_def enorm_def)
[PROOF STATE]
proof (state)
this:
enorm zero = 0

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> openin (Euclidean_space n) (f ` U)
[PROOF STEP]
have cm_enorm: "continuous_map ?E euclideanreal enorm"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_map (Euclidean_space n) euclideanreal enorm
[PROOF STEP]
unfolding enorm_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_map (Euclidean_space n) euclideanreal (\<lambda>x. sqrt (\<Sum>i<n. (x i)\<^sup>2))
[PROOF STEP]
proof (intro continuous_intros)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. finite {..<n}
 2. \<And>i. i \<in> {..<n} \<Longrightarrow> continuous_map (Euclidean_space n) euclideanreal (\<lambda>x. x i)
[PROOF STEP]
show "continuous_map ?E euclideanreal (\<lambda>x. x i)"
      if "i \<in> {..<n}" for i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_map (Euclidean_space n) euclideanreal (\<lambda>x. x i)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
i \<in> {..<n}

goal (1 subgoal):
 1. continuous_map (Euclidean_space n) euclideanreal (\<lambda>x. x i)
[PROOF STEP]
by (auto simp: Euclidean_space_def intro: continuous_map_product_projection continuous_map_from_subtopology)
[PROOF STATE]
proof (state)
this:
?i \<in> {..<n} \<Longrightarrow> continuous_map (Euclidean_space n) euclideanreal (\<lambda>x. x ?i)

goal (1 subgoal):
 1. finite {..<n}
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
continuous_map (Euclidean_space n) euclideanreal enorm

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> openin (Euclidean_space n) (f ` U)
[PROOF STEP]
have enorm_ge0: "0 \<le> enorm x" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> enorm x
[PROOF STEP]
by (auto simp: enorm_def sum_nonneg)
[PROOF STATE]
proof (state)
this:
0 \<le> enorm ?x

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> openin (Euclidean_space n) (f ` U)
[PROOF STEP]
have le_enorm: "\<bar>x i\<bar> \<le> enorm x" if "i < n" for i x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>x i\<bar> \<le> enorm x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<bar>x i\<bar> \<le> enorm x
[PROOF STEP]
have "\<bar>x i\<bar> \<le> sqrt (\<Sum>k\<in>{i}. (x k)\<^sup>2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>x i\<bar> \<le> sqrt (\<Sum>k\<in>{i}. (x k)\<^sup>2)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<bar>x i\<bar> \<le> sqrt (\<Sum>k\<in>{i}. (x k)\<^sup>2)

goal (1 subgoal):
 1. \<bar>x i\<bar> \<le> enorm x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<bar>x i\<bar> \<le> sqrt (\<Sum>k\<in>{i}. (x k)\<^sup>2)

goal (1 subgoal):
 1. \<bar>x i\<bar> \<le> enorm x
[PROOF STEP]
have "\<dots> \<le> sqrt (\<Sum>k<n. (x k)\<^sup>2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sqrt (\<Sum>k\<in>{i}. (x k)\<^sup>2) \<le> sqrt (\<Sum>k<n. (x k)\<^sup>2)
[PROOF STEP]
by (rule real_sqrt_le_mono [OF sum_mono2]) (use that in auto)
[PROOF STATE]
proof (state)
this:
sqrt (\<Sum>k\<in>{i}. (x k)\<^sup>2) \<le> sqrt (\<Sum>k<n. (x k)\<^sup>2)

goal (1 subgoal):
 1. \<bar>x i\<bar> \<le> enorm x
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<bar>x i\<bar> \<le> sqrt (\<Sum>k<n. (x k)\<^sup>2)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<bar>x i\<bar> \<le> sqrt (\<Sum>k<n. (x k)\<^sup>2)

goal (1 subgoal):
 1. \<bar>x i\<bar> \<le> enorm x
[PROOF STEP]
by (simp add: enorm_def)
[PROOF STATE]
proof (state)
this:
\<bar>x i\<bar> \<le> enorm x

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?i < n \<Longrightarrow> \<bar>?x ?i\<bar> \<le> enorm ?x

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> openin (Euclidean_space n) (f ` U)
[PROOF STEP]
define B where "B \<equiv> \<lambda>r. {x \<in> topspace ?E. enorm x < r}"
[PROOF STATE]
proof (state)
this:
B \<equiv> \<lambda>r. {x \<in> topspace (Euclidean_space n). enorm x < r}

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> openin (Euclidean_space n) (f ` U)
[PROOF STEP]
define C where "C \<equiv> \<lambda>r. {x \<in> topspace ?E. enorm x \<le> r}"
[PROOF STATE]
proof (state)
this:
C \<equiv> \<lambda>r. {x \<in> topspace (Euclidean_space n). enorm x \<le> r}

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> openin (Euclidean_space n) (f ` U)
[PROOF STEP]
define S where "S \<equiv> \<lambda>r. {x \<in> topspace ?E. enorm x = r}"
[PROOF STATE]
proof (state)
this:
S \<equiv> \<lambda>r. {x \<in> topspace (Euclidean_space n). enorm x = r}

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> openin (Euclidean_space n) (f ` U)
[PROOF STEP]
have BC: "B r \<subseteq> C r" and SC: "S r \<subseteq> C r" and disjSB: "disjnt (S r) (B r)" and eqC: "B r \<union> S r = C r" for r
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (B r \<subseteq> C r &&& S r \<subseteq> C r) &&& disjnt (S r) (B r) &&& B r \<union> S r = C r
[PROOF STEP]
by (auto simp: B_def C_def S_def disjnt_def)
[PROOF STATE]
proof (state)
this:
B ?r \<subseteq> C ?r
S ?r \<subseteq> C ?r
disjnt (S ?r) (B ?r)
B ?r \<union> S ?r = C ?r

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> openin (Euclidean_space n) (f ` U)
[PROOF STEP]
consider "n = 1" | "n \<ge> 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>n = 1 \<Longrightarrow> thesis; 2 \<le> n \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
using False
[PROOF STATE]
proof (prove)
using this:
n \<noteq> 0

goal (1 subgoal):
 1. \<lbrakk>n = 1 \<Longrightarrow> thesis; 2 \<le> n \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
\<lbrakk>n = 1 \<Longrightarrow> ?thesis; 2 \<le> n \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> openin (Euclidean_space n) (f ` U)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>n = 1 \<Longrightarrow> ?thesis; 2 \<le> n \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis
[PROOF STEP]
have **: "openin ?E (h ` (B r))"
    if "r > 0" and cmh: "continuous_map(subtopology ?E (C r)) ?E h" and injh: "inj_on h (C r)" for r h
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>n = 1 \<Longrightarrow> ?thesis; 2 \<le> n \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. n = 1 \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
 2. 2 \<le> n \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
case 1
[PROOF STATE]
proof (state)
this:
n = 1

goal (2 subgoals):
 1. n = 1 \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
 2. 2 \<le> n \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
define e :: "[real,nat]\<Rightarrow>real" where "e \<equiv> \<lambda>x i. if i = 0 then x else 0"
[PROOF STATE]
proof (state)
this:
e \<equiv> \<lambda>x i. if i = 0 then x else 0

goal (2 subgoals):
 1. n = 1 \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
 2. 2 \<le> n \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
define e' :: "(nat\<Rightarrow>real)\<Rightarrow>real" where "e' \<equiv> \<lambda>x. x 0"
[PROOF STATE]
proof (state)
this:
e' \<equiv> \<lambda>x. x 0

goal (2 subgoals):
 1. n = 1 \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
 2. 2 \<le> n \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
have "continuous_map euclidean euclideanreal (\<lambda>f. f (0::nat))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_map euclidean euclideanreal (\<lambda>f. f 0)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
continuous_map euclidean euclideanreal (\<lambda>f. f 0)

goal (2 subgoals):
 1. n = 1 \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
 2. 2 \<le> n \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
continuous_map euclidean euclideanreal (\<lambda>f. f 0)
[PROOF STEP]
have "continuous_map (subtopology (powertop_real UNIV) {f. \<forall>n\<ge>Suc 0. f n = 0}) euclideanreal (\<lambda>f. f 0)"
[PROOF STATE]
proof (prove)
using this:
continuous_map euclidean euclideanreal (\<lambda>f. f 0)

goal (1 subgoal):
 1. continuous_map (subtopology (powertop_real UNIV) {f. \<forall>n\<ge>Suc 0. f n = 0}) euclideanreal (\<lambda>f. f 0)
[PROOF STEP]
by (metis (mono_tags) continuous_map_from_subtopology euclidean_product_topology)
[PROOF STATE]
proof (state)
this:
continuous_map (subtopology (powertop_real UNIV) {f. \<forall>n\<ge>Suc 0. f n = 0}) euclideanreal (\<lambda>f. f 0)

goal (2 subgoals):
 1. n = 1 \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
 2. 2 \<le> n \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
continuous_map (subtopology (powertop_real UNIV) {f. \<forall>n\<ge>Suc 0. f n = 0}) euclideanreal (\<lambda>f. f 0)
[PROOF STEP]
have hom_ee': "homeomorphic_maps euclideanreal (Euclidean_space 1) e e'"
[PROOF STATE]
proof (prove)
using this:
continuous_map (subtopology (powertop_real UNIV) {f. \<forall>n\<ge>Suc 0. f n = 0}) euclideanreal (\<lambda>f. f 0)

goal (1 subgoal):
 1. homeomorphic_maps euclideanreal (Euclidean_space 1) e e'
[PROOF STEP]
by (auto simp: homeomorphic_maps_def e_def e'_def continuous_map_in_subtopology Euclidean_space_def)
[PROOF STATE]
proof (state)
this:
homeomorphic_maps euclideanreal (Euclidean_space 1) e e'

goal (2 subgoals):
 1. n = 1 \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
 2. 2 \<le> n \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
have eBr: "e ` {-r<..<r} = B r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. e ` {- r<..<r} = B r
[PROOF STEP]
unfolding B_def e_def C_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x i. if i = 0 then x else 0) ` {- r<..<r} = {x \<in> topspace (Euclidean_space n). enorm x < r}
[PROOF STEP]
by(force simp: "1" topspace_Euclidean_space enorm_def power2_eq_square if_distrib [of "\<lambda>x. x * _"] cong: if_cong)
[PROOF STATE]
proof (state)
this:
e ` {- r<..<r} = B r

goal (2 subgoals):
 1. n = 1 \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
 2. 2 \<le> n \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
have in_Cr: "\<And>x. \<lbrakk>-r < x; x < r\<rbrakk> \<Longrightarrow> (\<lambda>i. if i = 0 then x else 0) \<in> C r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>- r < x; x < r\<rbrakk> \<Longrightarrow> (\<lambda>i. if i = 0 then x else 0) \<in> C r
[PROOF STEP]
using \<open>n \<noteq> 0\<close>
[PROOF STATE]
proof (prove)
using this:
n \<noteq> 0

goal (1 subgoal):
 1. \<And>x. \<lbrakk>- r < x; x < r\<rbrakk> \<Longrightarrow> (\<lambda>i. if i = 0 then x else 0) \<in> C r
[PROOF STEP]
by (auto simp: C_def topspace_Euclidean_space)
[PROOF STATE]
proof (state)
this:
\<lbrakk>- r < ?x; ?x < r\<rbrakk> \<Longrightarrow> (\<lambda>i. if i = 0 then ?x else 0) \<in> C r

goal (2 subgoals):
 1. n = 1 \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
 2. 2 \<le> n \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
have inj: "inj_on (e' \<circ> h \<circ> e) {- r<..<r}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on (e' \<circ> h \<circ> e) {- r<..<r}
[PROOF STEP]
proof (clarsimp simp: inj_on_def e_def e'_def)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>h (\<lambda>i. if i = 0 then x else 0) 0 = h (\<lambda>i. if i = 0 then y else 0) 0; - r < x; x < r; - r < y; y < r\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
show "(x::real) = y"
        if f: "h (\<lambda>i. if i = 0 then x else 0) 0 = h (\<lambda>i. if i = 0 then y else 0) 0"
          and "-r < x" "x < r" "-r < y" "y < r"
        for x y :: real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x = y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x = y
[PROOF STEP]
have x: "(\<lambda>i. if i = 0 then x else 0) \<in> C r" and y: "(\<lambda>i. if i = 0 then y else 0) \<in> C r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i. if i = 0 then x else 0) \<in> C r &&& (\<lambda>i. if i = 0 then y else 0) \<in> C r
[PROOF STEP]
by (blast intro: inj_onD [OF \<open>inj_on h (C r)\<close>] that in_Cr)+
[PROOF STATE]
proof (state)
this:
(\<lambda>i. if i = 0 then x else 0) \<in> C r
(\<lambda>i. if i = 0 then y else 0) \<in> C r

goal (1 subgoal):
 1. x = y
[PROOF STEP]
have "continuous_map (subtopology (Euclidean_space (Suc 0)) (C r)) (Euclidean_space (Suc 0)) h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_map (subtopology (Euclidean_space (Suc 0)) (C r)) (Euclidean_space (Suc 0)) h
[PROOF STEP]
using cmh
[PROOF STATE]
proof (prove)
using this:
continuous_map (subtopology (Euclidean_space n) (C r)) (Euclidean_space n) h

goal (1 subgoal):
 1. continuous_map (subtopology (Euclidean_space (Suc 0)) (C r)) (Euclidean_space (Suc 0)) h
[PROOF STEP]
by (simp add: 1)
[PROOF STATE]
proof (state)
this:
continuous_map (subtopology (Euclidean_space (Suc 0)) (C r)) (Euclidean_space (Suc 0)) h

goal (1 subgoal):
 1. x = y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
continuous_map (subtopology (Euclidean_space (Suc 0)) (C r)) (Euclidean_space (Suc 0)) h
[PROOF STEP]
have "h ` ({x. \<forall>i\<ge>Suc 0. x i = 0} \<inter> C r) \<subseteq> {x. \<forall>i\<ge>Suc 0. x i = 0}"
[PROOF STATE]
proof (prove)
using this:
continuous_map (subtopology (Euclidean_space (Suc 0)) (C r)) (Euclidean_space (Suc 0)) h

goal (1 subgoal):
 1. h ` ({x. \<forall>i\<ge>Suc 0. x i = 0} \<inter> C r) \<subseteq> {x. \<forall>i\<ge>Suc 0. x i = 0}
[PROOF STEP]
by (force simp: Euclidean_space_def subtopology_subtopology continuous_map_def)
[PROOF STATE]
proof (state)
this:
h ` ({x. \<forall>i\<ge>Suc 0. x i = 0} \<inter> C r) \<subseteq> {x. \<forall>i\<ge>Suc 0. x i = 0}

goal (1 subgoal):
 1. x = y
[PROOF STEP]
have "h (\<lambda>i. if i = 0 then x else 0) j = h (\<lambda>i. if i = 0 then y else 0) j" for j
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. h (\<lambda>i. if i = 0 then x else 0) j = h (\<lambda>i. if i = 0 then y else 0) j
[PROOF STEP]
proof (cases j)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. j = 0 \<Longrightarrow> h (\<lambda>i. if i = 0 then x else 0) j = h (\<lambda>i. if i = 0 then y else 0) j
 2. \<And>nat. j = Suc nat \<Longrightarrow> h (\<lambda>i. if i = 0 then x else 0) j = h (\<lambda>i. if i = 0 then y else 0) j
[PROOF STEP]
case (Suc j')
[PROOF STATE]
proof (state)
this:
j = Suc j'

goal (2 subgoals):
 1. j = 0 \<Longrightarrow> h (\<lambda>i. if i = 0 then x else 0) j = h (\<lambda>i. if i = 0 then y else 0) j
 2. \<And>nat. j = Suc nat \<Longrightarrow> h (\<lambda>i. if i = 0 then x else 0) j = h (\<lambda>i. if i = 0 then y else 0) j
[PROOF STEP]
have "h ` ({x. \<forall>i\<ge>Suc 0. x i = 0} \<inter> C r) \<subseteq> {x. \<forall>i\<ge>Suc 0. x i = 0}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. h ` ({x. \<forall>i\<ge>Suc 0. x i = 0} \<inter> C r) \<subseteq> {x. \<forall>i\<ge>Suc 0. x i = 0}
[PROOF STEP]
using continuous_map_image_subset_topspace [OF cmh]
[PROOF STATE]
proof (prove)
using this:
h ` topspace (subtopology (Euclidean_space n) (C r)) \<subseteq> topspace (Euclidean_space n)

goal (1 subgoal):
 1. h ` ({x. \<forall>i\<ge>Suc 0. x i = 0} \<inter> C r) \<subseteq> {x. \<forall>i\<ge>Suc 0. x i = 0}
[PROOF STEP]
by (simp add: 1 Euclidean_space_def subtopology_subtopology)
[PROOF STATE]
proof (state)
this:
h ` ({x. \<forall>i\<ge>Suc 0. x i = 0} \<inter> C r) \<subseteq> {x. \<forall>i\<ge>Suc 0. x i = 0}

goal (2 subgoals):
 1. j = 0 \<Longrightarrow> h (\<lambda>i. if i = 0 then x else 0) j = h (\<lambda>i. if i = 0 then y else 0) j
 2. \<And>nat. j = Suc nat \<Longrightarrow> h (\<lambda>i. if i = 0 then x else 0) j = h (\<lambda>i. if i = 0 then y else 0) j
[PROOF STEP]
with Suc f x y
[PROOF STATE]
proof (chain)
picking this:
j = Suc j'
h (\<lambda>i. if i = 0 then x else 0) 0 = h (\<lambda>i. if i = 0 then y else 0) 0
(\<lambda>i. if i = 0 then x else 0) \<in> C r
(\<lambda>i. if i = 0 then y else 0) \<in> C r
h ` ({x. \<forall>i\<ge>Suc 0. x i = 0} \<inter> C r) \<subseteq> {x. \<forall>i\<ge>Suc 0. x i = 0}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
j = Suc j'
h (\<lambda>i. if i = 0 then x else 0) 0 = h (\<lambda>i. if i = 0 then y else 0) 0
(\<lambda>i. if i = 0 then x else 0) \<in> C r
(\<lambda>i. if i = 0 then y else 0) \<in> C r
h ` ({x. \<forall>i\<ge>Suc 0. x i = 0} \<inter> C r) \<subseteq> {x. \<forall>i\<ge>Suc 0. x i = 0}

goal (1 subgoal):
 1. h (\<lambda>i. if i = 0 then x else 0) j = h (\<lambda>i. if i = 0 then y else 0) j
[PROOF STEP]
by (simp add: "1" image_subset_iff)
[PROOF STATE]
proof (state)
this:
h (\<lambda>i. if i = 0 then x else 0) j = h (\<lambda>i. if i = 0 then y else 0) j

goal (1 subgoal):
 1. j = 0 \<Longrightarrow> h (\<lambda>i. if i = 0 then x else 0) j = h (\<lambda>i. if i = 0 then y else 0) j
[PROOF STEP]
qed (use f in blast)
[PROOF STATE]
proof (state)
this:
h (\<lambda>i. if i = 0 then x else 0) ?j = h (\<lambda>i. if i = 0 then y else 0) ?j

goal (1 subgoal):
 1. x = y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
h (\<lambda>i. if i = 0 then x else 0) ?j = h (\<lambda>i. if i = 0 then y else 0) ?j
[PROOF STEP]
have "(\<lambda>i. if i = 0 then x else 0) = (\<lambda>i::nat. if i = 0 then y else 0)"
[PROOF STATE]
proof (prove)
using this:
h (\<lambda>i. if i = 0 then x else 0) ?j = h (\<lambda>i. if i = 0 then y else 0) ?j

goal (1 subgoal):
 1. (\<lambda>i. if i = 0 then x else 0) = (\<lambda>i. if i = 0 then y else 0)
[PROOF STEP]
by (blast intro: inj_onD [OF \<open>inj_on h (C r)\<close>] that in_Cr)
[PROOF STATE]
proof (state)
this:
(\<lambda>i. if i = 0 then x else 0) = (\<lambda>i. if i = 0 then y else 0)

goal (1 subgoal):
 1. x = y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>i. if i = 0 then x else 0) = (\<lambda>i. if i = 0 then y else 0)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>i. if i = 0 then x else 0) = (\<lambda>i. if i = 0 then y else 0)

goal (1 subgoal):
 1. x = y
[PROOF STEP]
by (simp add: fun_eq_iff) presburger
[PROOF STATE]
proof (state)
this:
x = y

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>h (\<lambda>i. if i = 0 then ?x else 0) 0 = h (\<lambda>i. if i = 0 then ?y else 0) 0; - r < ?x; ?x < r; - r < ?y; ?y < r\<rbrakk> \<Longrightarrow> ?x = ?y

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
inj_on (e' \<circ> h \<circ> e) {- r<..<r}

goal (2 subgoals):
 1. n = 1 \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
 2. 2 \<le> n \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
have hom_e': "homeomorphic_map (Euclidean_space 1) euclideanreal e'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. homeomorphic_map (Euclidean_space 1) euclideanreal e'
[PROOF STEP]
using hom_ee' homeomorphic_maps_map
[PROOF STATE]
proof (prove)
using this:
homeomorphic_maps euclideanreal (Euclidean_space 1) e e'
homeomorphic_maps ?X ?Y ?f ?g = (homeomorphic_map ?X ?Y ?f \<and> homeomorphic_map ?Y ?X ?g \<and> (\<forall>x\<in>topspace ?X. ?g (?f x) = x) \<and> (\<forall>y\<in>topspace ?Y. ?f (?g y) = y))

goal (1 subgoal):
 1. homeomorphic_map (Euclidean_space 1) euclideanreal e'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
homeomorphic_map (Euclidean_space 1) euclideanreal e'

goal (2 subgoals):
 1. n = 1 \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
 2. 2 \<le> n \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
have "openin (Euclidean_space n) (h ` e ` {- r<..<r})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. openin (Euclidean_space n) (h ` e ` {- r<..<r})
[PROOF STEP]
unfolding 1
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. openin (Euclidean_space 1) (h ` e ` {- r<..<r})
[PROOF STEP]
proof (subst homeomorphic_map_openness [OF hom_e', symmetric])
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. h ` e ` {- r<..<r} \<subseteq> topspace (Euclidean_space 1)
 2. openin euclideanreal (e' ` h ` e ` {- r<..<r})
[PROOF STEP]
show "h ` e ` {- r<..<r} \<subseteq> topspace (Euclidean_space 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. h ` e ` {- r<..<r} \<subseteq> topspace (Euclidean_space 1)
[PROOF STEP]
using "1" C_def \<open>\<And>r. B r \<subseteq> C r\<close> cmh continuous_map_image_subset_topspace eBr
[PROOF STATE]
proof (prove)
using this:
n = 1
C \<equiv> \<lambda>r. {x \<in> topspace (Euclidean_space n). enorm x \<le> r}
B ?r \<subseteq> C ?r
continuous_map (subtopology (Euclidean_space n) (C r)) (Euclidean_space n) h
continuous_map ?X ?Y ?f \<Longrightarrow> ?f ` topspace ?X \<subseteq> topspace ?Y
e ` {- r<..<r} = B r

goal (1 subgoal):
 1. h ` e ` {- r<..<r} \<subseteq> topspace (Euclidean_space 1)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
h ` e ` {- r<..<r} \<subseteq> topspace (Euclidean_space 1)

goal (1 subgoal):
 1. openin euclideanreal (e' ` h ` e ` {- r<..<r})
[PROOF STEP]
have cont: "continuous_on {- r<..<r} (e' \<circ> h \<circ> e)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on {- r<..<r} (e' \<circ> h \<circ> e)
[PROOF STEP]
proof (intro continuous_on_compose)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. continuous_on {- r<..<r} e
 2. continuous_on (e ` {- r<..<r}) h
 3. continuous_on (h ` e ` {- r<..<r}) e'
[PROOF STEP]
have "\<And>i. continuous_on {- r<..<r} (\<lambda>x. if i = 0 then x else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. continuous_on {- r<..<r} (\<lambda>x. if i = (0::'a) then x else 0)
[PROOF STEP]
by (auto simp: continuous_on_topological)
[PROOF STATE]
proof (state)
this:
continuous_on {- r<..<r} (\<lambda>x. if ?i = (0::?'a1) then x else 0)

goal (3 subgoals):
 1. continuous_on {- r<..<r} e
 2. continuous_on (e ` {- r<..<r}) h
 3. continuous_on (h ` e ` {- r<..<r}) e'
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
continuous_on {- r<..<r} (\<lambda>x. if ?i = (0::?'a1) then x else 0)
[PROOF STEP]
show "continuous_on {- r<..<r} e"
[PROOF STATE]
proof (prove)
using this:
continuous_on {- r<..<r} (\<lambda>x. if ?i = (0::?'a1) then x else 0)

goal (1 subgoal):
 1. continuous_on {- r<..<r} e
[PROOF STEP]
by (force simp: e_def intro: continuous_on_coordinatewise_then_product)
[PROOF STATE]
proof (state)
this:
continuous_on {- r<..<r} e

goal (2 subgoals):
 1. continuous_on (e ` {- r<..<r}) h
 2. continuous_on (h ` e ` {- r<..<r}) e'
[PROOF STEP]
have subCr: "e ` {- r<..<r} \<subseteq> topspace (subtopology ?E (C r))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. e ` {- r<..<r} \<subseteq> topspace (subtopology (Euclidean_space n) (C r))
[PROOF STEP]
by (auto simp: eBr \<open>\<And>r. B r \<subseteq> C r\<close>) (auto simp: B_def)
[PROOF STATE]
proof (state)
this:
e ` {- r<..<r} \<subseteq> topspace (subtopology (Euclidean_space n) (C r))

goal (2 subgoals):
 1. continuous_on (e ` {- r<..<r}) h
 2. continuous_on (h ` e ` {- r<..<r}) e'
[PROOF STEP]
with cmh
[PROOF STATE]
proof (chain)
picking this:
continuous_map (subtopology (Euclidean_space n) (C r)) (Euclidean_space n) h
e ` {- r<..<r} \<subseteq> topspace (subtopology (Euclidean_space n) (C r))
[PROOF STEP]
show "continuous_on (e ` {- r<..<r}) h"
[PROOF STATE]
proof (prove)
using this:
continuous_map (subtopology (Euclidean_space n) (C r)) (Euclidean_space n) h
e ` {- r<..<r} \<subseteq> topspace (subtopology (Euclidean_space n) (C r))

goal (1 subgoal):
 1. continuous_on (e ` {- r<..<r}) h
[PROOF STEP]
by (meson cm_Euclidean_space_iff_continuous_on continuous_on_subset)
[PROOF STATE]
proof (state)
this:
continuous_on (e ` {- r<..<r}) h

goal (1 subgoal):
 1. continuous_on (h ` e ` {- r<..<r}) e'
[PROOF STEP]
have "h ` (e ` {- r<..<r}) \<subseteq> topspace ?E"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. h ` e ` {- r<..<r} \<subseteq> topspace (Euclidean_space n)
[PROOF STEP]
using subCr cmh
[PROOF STATE]
proof (prove)
using this:
e ` {- r<..<r} \<subseteq> topspace (subtopology (Euclidean_space n) (C r))
continuous_map (subtopology (Euclidean_space n) (C r)) (Euclidean_space n) h

goal (1 subgoal):
 1. h ` e ` {- r<..<r} \<subseteq> topspace (Euclidean_space n)
[PROOF STEP]
by (simp add: continuous_map_def image_subset_iff)
[PROOF STATE]
proof (state)
this:
h ` e ` {- r<..<r} \<subseteq> topspace (Euclidean_space n)

goal (1 subgoal):
 1. continuous_on (h ` e ` {- r<..<r}) e'
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
h ` e ` {- r<..<r} \<subseteq> topspace (Euclidean_space n)

goal (1 subgoal):
 1. continuous_on (h ` e ` {- r<..<r}) e'
[PROOF STEP]
have "continuous_on (topspace ?E) e'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on (topspace (Euclidean_space n)) e'
[PROOF STEP]
by (metis "1" continuous_map_Euclidean_space_iff hom_ee' homeomorphic_maps_def)
[PROOF STATE]
proof (state)
this:
continuous_on (topspace (Euclidean_space n)) e'

goal (1 subgoal):
 1. continuous_on (h ` e ` {- r<..<r}) e'
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
h ` e ` {- r<..<r} \<subseteq> topspace (Euclidean_space n)
continuous_on (topspace (Euclidean_space n)) e'
[PROOF STEP]
show "continuous_on (h ` e ` {- r<..<r}) e'"
[PROOF STATE]
proof (prove)
using this:
h ` e ` {- r<..<r} \<subseteq> topspace (Euclidean_space n)
continuous_on (topspace (Euclidean_space n)) e'

goal (1 subgoal):
 1. continuous_on (h ` e ` {- r<..<r}) e'
[PROOF STEP]
by (simp add: e'_def continuous_on_subset)
[PROOF STATE]
proof (state)
this:
continuous_on (h ` e ` {- r<..<r}) e'

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
continuous_on {- r<..<r} (e' \<circ> h \<circ> e)

goal (1 subgoal):
 1. openin euclideanreal (e' ` h ` e ` {- r<..<r})
[PROOF STEP]
show "openin euclideanreal (e' ` h ` e ` {- r<..<r})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. openin euclideanreal (e' ` h ` e ` {- r<..<r})
[PROOF STEP]
using injective_eq_1d_open_map_UNIV [OF cont] inj
[PROOF STATE]
proof (prove)
using this:
is_interval {- r<..<r} \<Longrightarrow> inj_on (e' \<circ> h \<circ> e) {- r<..<r} = (\<forall>T. open T \<and> T \<subseteq> {- r<..<r} \<longrightarrow> open ((e' \<circ> h \<circ> e) ` T))
inj_on (e' \<circ> h \<circ> e) {- r<..<r}

goal (1 subgoal):
 1. openin euclideanreal (e' ` h ` e ` {- r<..<r})
[PROOF STEP]
by (simp add: image_image is_interval_1)
[PROOF STATE]
proof (state)
this:
openin euclideanreal (e' ` h ` e ` {- r<..<r})

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
openin (Euclidean_space n) (h ` e ` {- r<..<r})

goal (2 subgoals):
 1. n = 1 \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
 2. 2 \<le> n \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
openin (Euclidean_space n) (h ` e ` {- r<..<r})
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
openin (Euclidean_space n) (h ` e ` {- r<..<r})

goal (1 subgoal):
 1. openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
by (simp flip: eBr)
[PROOF STATE]
proof (state)
this:
openin (Euclidean_space n) (h ` B r)

goal (1 subgoal):
 1. 2 \<le> n \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 2 \<le> n \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
case 2
[PROOF STATE]
proof (state)
this:
2 \<le> n

goal (1 subgoal):
 1. 2 \<le> n \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
have cloC: "\<And>r. closedin (Euclidean_space n) (C r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>r. closedin (Euclidean_space n) (C r)
[PROOF STEP]
unfolding C_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>r. closedin (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<le> r}
[PROOF STEP]
by (rule closedin_continuous_map_preimage [OF cm_enorm, of concl:  "{.._}", simplified])
[PROOF STATE]
proof (state)
this:
closedin (Euclidean_space n) (C ?r)

goal (1 subgoal):
 1. 2 \<le> n \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
have cloS: "\<And>r. closedin (Euclidean_space n) (S r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>r. closedin (Euclidean_space n) (S r)
[PROOF STEP]
unfolding S_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>r. closedin (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x = r}
[PROOF STEP]
by (rule closedin_continuous_map_preimage [OF cm_enorm, of concl:  "{_}", simplified])
[PROOF STATE]
proof (state)
this:
closedin (Euclidean_space n) (S ?r)

goal (1 subgoal):
 1. 2 \<le> n \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
have C_subset: "C r \<subseteq> UNIV \<rightarrow>\<^sub>E {- \<bar>r\<bar>..\<bar>r\<bar>}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. C r \<subseteq> UNIV \<rightarrow>\<^sub>E {- \<bar>r\<bar>..\<bar>r\<bar>}
[PROOF STEP]
using le_enorm \<open>r > 0\<close>
[PROOF STATE]
proof (prove)
using this:
?i < n \<Longrightarrow> \<bar>?x ?i\<bar> \<le> enorm ?x
0 < r

goal (1 subgoal):
 1. C r \<subseteq> UNIV \<rightarrow>\<^sub>E {- \<bar>r\<bar>..\<bar>r\<bar>}
[PROOF STEP]
apply (auto simp: C_def topspace_Euclidean_space abs_le_iff)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x xa. \<lbrakk>\<And>i x. i < n \<Longrightarrow> x i \<le> enorm x \<and> - x i \<le> enorm x; 0 < r; \<forall>i\<ge>n. x i = 0; enorm x \<le> r\<rbrakk> \<Longrightarrow> - r \<le> x xa
 2. \<And>x xa. \<lbrakk>\<And>i x. i < n \<Longrightarrow> x i \<le> enorm x \<and> - x i \<le> enorm x; 0 < r; \<forall>i\<ge>n. x i = 0; enorm x \<le> r\<rbrakk> \<Longrightarrow> x xa \<le> r
[PROOF STEP]
apply (metis add.inverse_neutral le_cases less_minus_iff not_le order_trans)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x xa. \<lbrakk>\<And>i x. i < n \<Longrightarrow> x i \<le> enorm x \<and> - x i \<le> enorm x; 0 < r; \<forall>i\<ge>n. x i = 0; enorm x \<le> r\<rbrakk> \<Longrightarrow> x xa \<le> r
[PROOF STEP]
by (metis enorm_ge0 not_le order.trans)
[PROOF STATE]
proof (state)
this:
C r \<subseteq> UNIV \<rightarrow>\<^sub>E {- \<bar>r\<bar>..\<bar>r\<bar>}

goal (1 subgoal):
 1. 2 \<le> n \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
have compactinC: "compactin (Euclidean_space n) (C r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. compactin (Euclidean_space n) (C r)
[PROOF STEP]
unfolding Euclidean_space_def compactin_subtopology
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. compactin (powertop_real UNIV) (C r) \<and> C r \<subseteq> {x. \<forall>i\<ge>n. x i = 0}
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. compactin (powertop_real UNIV) (C r)
 2. C r \<subseteq> {x. \<forall>i\<ge>n. x i = 0}
[PROOF STEP]
show "compactin (powertop_real UNIV) (C r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. compactin (powertop_real UNIV) (C r)
[PROOF STEP]
proof (rule closed_compactin [OF _ C_subset])
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. compactin (powertop_real UNIV) (UNIV \<rightarrow>\<^sub>E {- \<bar>r\<bar>..\<bar>r\<bar>})
 2. closedin (powertop_real UNIV) (C r)
[PROOF STEP]
show "closedin (powertop_real UNIV) (C r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. closedin (powertop_real UNIV) (C r)
[PROOF STEP]
by (metis Euclidean_space_def cloC closedin_Euclidean_space closedin_closed_subtopology topspace_Euclidean_space)
[PROOF STATE]
proof (state)
this:
closedin (powertop_real UNIV) (C r)

goal (1 subgoal):
 1. compactin (powertop_real UNIV) (UNIV \<rightarrow>\<^sub>E {- \<bar>r\<bar>..\<bar>r\<bar>})
[PROOF STEP]
qed (simp add: compactin_PiE)
[PROOF STATE]
proof (state)
this:
compactin (powertop_real UNIV) (C r)

goal (1 subgoal):
 1. C r \<subseteq> {x. \<forall>i\<ge>n. x i = 0}
[PROOF STEP]
qed (auto simp: C_def topspace_Euclidean_space)
[PROOF STATE]
proof (state)
this:
compactin (Euclidean_space n) (C r)

goal (1 subgoal):
 1. 2 \<le> n \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
have compactinS: "compactin (Euclidean_space n) (S r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. compactin (Euclidean_space n) (S r)
[PROOF STEP]
unfolding Euclidean_space_def compactin_subtopology
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. compactin (powertop_real UNIV) (S r) \<and> S r \<subseteq> {x. \<forall>i\<ge>n. x i = 0}
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. compactin (powertop_real UNIV) (S r)
 2. S r \<subseteq> {x. \<forall>i\<ge>n. x i = 0}
[PROOF STEP]
show "compactin (powertop_real UNIV) (S r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. compactin (powertop_real UNIV) (S r)
[PROOF STEP]
proof (rule closed_compactin)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. compactin (powertop_real UNIV) ?K
 2. S r \<subseteq> ?K
 3. closedin (powertop_real UNIV) (S r)
[PROOF STEP]
show "S r \<subseteq> UNIV \<rightarrow>\<^sub>E {- \<bar>r\<bar>..\<bar>r\<bar>}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S r \<subseteq> UNIV \<rightarrow>\<^sub>E {- \<bar>r\<bar>..\<bar>r\<bar>}
[PROOF STEP]
using C_subset \<open>\<And>r. S r \<subseteq> C r\<close>
[PROOF STATE]
proof (prove)
using this:
C r \<subseteq> UNIV \<rightarrow>\<^sub>E {- \<bar>r\<bar>..\<bar>r\<bar>}
S ?r \<subseteq> C ?r

goal (1 subgoal):
 1. S r \<subseteq> UNIV \<rightarrow>\<^sub>E {- \<bar>r\<bar>..\<bar>r\<bar>}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
S r \<subseteq> UNIV \<rightarrow>\<^sub>E {- \<bar>r\<bar>..\<bar>r\<bar>}

goal (2 subgoals):
 1. compactin (powertop_real UNIV) (UNIV \<rightarrow>\<^sub>E {- \<bar>r\<bar>..\<bar>r\<bar>})
 2. closedin (powertop_real UNIV) (S r)
[PROOF STEP]
show "closedin (powertop_real UNIV) (S r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. closedin (powertop_real UNIV) (S r)
[PROOF STEP]
by (metis Euclidean_space_def cloS closedin_Euclidean_space closedin_closed_subtopology topspace_Euclidean_space)
[PROOF STATE]
proof (state)
this:
closedin (powertop_real UNIV) (S r)

goal (1 subgoal):
 1. compactin (powertop_real UNIV) (UNIV \<rightarrow>\<^sub>E {- \<bar>r\<bar>..\<bar>r\<bar>})
[PROOF STEP]
qed (simp add: compactin_PiE)
[PROOF STATE]
proof (state)
this:
compactin (powertop_real UNIV) (S r)

goal (1 subgoal):
 1. S r \<subseteq> {x. \<forall>i\<ge>n. x i = 0}
[PROOF STEP]
qed (auto simp: S_def topspace_Euclidean_space)
[PROOF STATE]
proof (state)
this:
compactin (Euclidean_space n) (S r)

goal (1 subgoal):
 1. 2 \<le> n \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
have h_if_B: "\<And>y. y \<in> B r \<Longrightarrow> h y \<in> topspace ?E"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>y. y \<in> B r \<Longrightarrow> h y \<in> topspace (Euclidean_space n)
[PROOF STEP]
using B_def \<open>\<And>r. B r \<union> S r = C r\<close> cmh continuous_map_image_subset_topspace
[PROOF STATE]
proof (prove)
using this:
B \<equiv> \<lambda>r. {x \<in> topspace (Euclidean_space n). enorm x < r}
B ?r \<union> S ?r = C ?r
continuous_map (subtopology (Euclidean_space n) (C r)) (Euclidean_space n) h
continuous_map ?X ?Y ?f \<Longrightarrow> ?f ` topspace ?X \<subseteq> topspace ?Y

goal (1 subgoal):
 1. \<And>y. y \<in> B r \<Longrightarrow> h y \<in> topspace (Euclidean_space n)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
?y \<in> B r \<Longrightarrow> h ?y \<in> topspace (Euclidean_space n)

goal (1 subgoal):
 1. 2 \<le> n \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
have com_hSr: "compactin (Euclidean_space n) (h ` S r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. compactin (Euclidean_space n) (h ` S r)
[PROOF STEP]
by (meson \<open>\<And>r. S r \<subseteq> C r\<close> cmh compactinS compactin_subtopology image_compactin)
[PROOF STATE]
proof (state)
this:
compactin (Euclidean_space n) (h ` S r)

goal (1 subgoal):
 1. 2 \<le> n \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
have ope_comp_hSr: "openin (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. openin (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)
[PROOF STEP]
proof (rule openin_diff)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. openin (Euclidean_space n) (topspace (Euclidean_space n))
 2. closedin (Euclidean_space n) (h ` S r)
[PROOF STEP]
show "closedin (Euclidean_space n) (h ` S r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. closedin (Euclidean_space n) (h ` S r)
[PROOF STEP]
using Hausdorff_Euclidean_space com_hSr compactin_imp_closedin
[PROOF STATE]
proof (prove)
using this:
Hausdorff_space (Euclidean_space ?n)
compactin (Euclidean_space n) (h ` S r)
\<lbrakk>Hausdorff_space ?X; compactin ?X ?S\<rbrakk> \<Longrightarrow> closedin ?X ?S

goal (1 subgoal):
 1. closedin (Euclidean_space n) (h ` S r)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
closedin (Euclidean_space n) (h ` S r)

goal (1 subgoal):
 1. openin (Euclidean_space n) (topspace (Euclidean_space n))
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
openin (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)

goal (1 subgoal):
 1. 2 \<le> n \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
have h_pcs: "h ` (B r) \<in> path_components_of (subtopology ?E (topspace ?E - h ` (S r)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. h ` B r \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r))
[PROOF STEP]
proof (rule lemmaIOD)
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> h ` B r \<subseteq> T
 2. \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> ?d \<subseteq> T
 3. \<Union> (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r))) = h ` B r \<union> ?d
 4. \<And>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<Longrightarrow> T \<noteq> {}
 5. disjoint (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)))
 6. \<nexists>T. path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<subseteq> {T}
[PROOF STEP]
have pc_interval: "path_connectedin (Euclidean_space n) {x \<in> topspace(Euclidean_space n). enorm x \<in> T}"
        if T: "is_interval T" for T
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}
[PROOF STEP]
define mul :: "[real, nat \<Rightarrow> real, nat] \<Rightarrow> real" where "mul \<equiv> \<lambda>a x i. a * x i"
[PROOF STATE]
proof (state)
this:
mul \<equiv> \<lambda>a x i. a * x i

goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}
[PROOF STEP]
let ?neg = "mul (-1)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}
[PROOF STEP]
have neg_neg [simp]: "?neg (?neg x) = x" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mul (- 1) (mul (- 1) x) = x
[PROOF STEP]
by (simp add: mul_def)
[PROOF STATE]
proof (state)
this:
mul (- 1) (mul (- 1) ?x) = ?x

goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}
[PROOF STEP]
have enorm_mul [simp]: "enorm(mul a x) = abs a * enorm x" for a x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. enorm (mul a x) = \<bar>a\<bar> * enorm x
[PROOF STEP]
by (simp add: enorm_def mul_def power_mult_distrib) (metis real_sqrt_abs real_sqrt_mult sum_distrib_left)
[PROOF STATE]
proof (state)
this:
enorm (mul ?a ?x) = \<bar>?a\<bar> * enorm ?x

goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}
[PROOF STEP]
have mul_in_top: "mul a x \<in> topspace ?E"
            if "x \<in> topspace ?E" for a x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mul a x \<in> topspace (Euclidean_space n)
[PROOF STEP]
using mul_def that topspace_Euclidean_space
[PROOF STATE]
proof (prove)
using this:
mul \<equiv> \<lambda>a x i. a * x i
x \<in> topspace (Euclidean_space n)
topspace (Euclidean_space ?n) = {x. \<forall>i\<ge>?n. x i = 0}

goal (1 subgoal):
 1. mul a x \<in> topspace (Euclidean_space n)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
?x \<in> topspace (Euclidean_space n) \<Longrightarrow> mul ?a ?x \<in> topspace (Euclidean_space n)

goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}
[PROOF STEP]
have neg_in_S: "?neg x \<in> S r"
            if "x \<in> S r" for x r
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mul (- 1) x \<in> S r
[PROOF STEP]
using that topspace_Euclidean_space S_def
[PROOF STATE]
proof (prove)
using this:
x \<in> S r
topspace (Euclidean_space ?n) = {x. \<forall>i\<ge>?n. x i = 0}
S \<equiv> \<lambda>r. {x \<in> topspace (Euclidean_space n). enorm x = r}

goal (1 subgoal):
 1. mul (- 1) x \<in> S r
[PROOF STEP]
by simp (simp add: mul_def)
[PROOF STATE]
proof (state)
this:
?x \<in> S ?r \<Longrightarrow> mul (- 1) ?x \<in> S ?r

goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}
[PROOF STEP]
have *: "path_connectedin ?E (S d)"
          if "d \<ge> 0" for d
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) (S d)
[PROOF STEP]
proof (cases "d = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. d = 0 \<Longrightarrow> path_connectedin (Euclidean_space n) (S d)
 2. d \<noteq> 0 \<Longrightarrow> path_connectedin (Euclidean_space n) (S d)
[PROOF STEP]
let ?ES = "subtopology ?E (S d)"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. d = 0 \<Longrightarrow> path_connectedin (Euclidean_space n) (S d)
 2. d \<noteq> 0 \<Longrightarrow> path_connectedin (Euclidean_space n) (S d)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
d \<noteq> 0

goal (2 subgoals):
 1. d = 0 \<Longrightarrow> path_connectedin (Euclidean_space n) (S d)
 2. d \<noteq> 0 \<Longrightarrow> path_connectedin (Euclidean_space n) (S d)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
d \<noteq> 0
[PROOF STEP]
have "d > 0"
[PROOF STATE]
proof (prove)
using this:
d \<noteq> 0

goal (1 subgoal):
 1. 0 < d
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
d \<noteq> 0
0 \<le> d

goal (1 subgoal):
 1. 0 < d
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
0 < d

goal (2 subgoals):
 1. d = 0 \<Longrightarrow> path_connectedin (Euclidean_space n) (S d)
 2. d \<noteq> 0 \<Longrightarrow> path_connectedin (Euclidean_space n) (S d)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
0 < d

goal (2 subgoals):
 1. d = 0 \<Longrightarrow> path_connectedin (Euclidean_space n) (S d)
 2. d \<noteq> 0 \<Longrightarrow> path_connectedin (Euclidean_space n) (S d)
[PROOF STEP]
have "path_connected_space ?ES"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_connected_space (subtopology (Euclidean_space n) (S d))
[PROOF STEP]
unfolding path_connected_space_iff_path_component
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<in>topspace (subtopology (Euclidean_space n) (S d)). Ball (topspace (subtopology (Euclidean_space n) (S d))) (path_component_of (subtopology (Euclidean_space n) (S d)) x)
[PROOF STEP]
proof clarify
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x xa. \<lbrakk>x \<in> topspace (subtopology (Euclidean_space n) (S d)); xa \<in> topspace (subtopology (Euclidean_space n) (S d))\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) (S d)) x xa
[PROOF STEP]
have **: "path_component_of ?ES x y"
              if x: "x \<in> topspace ?ES" and y: "y \<in> topspace ?ES" "x \<noteq> ?neg y" for x y
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) (S d)) x y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) (S d)) x y
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) (S d)) x y
[PROOF STEP]
unfolding path_component_of_def pathin_def S_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>g. continuous_map (top_of_set {0..1}) (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x = d}) g \<and> g 0 = x \<and> g 1 = y
[PROOF STEP]
proof (intro exI conjI)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. continuous_map (top_of_set {0..1}) (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x = d}) ?g
 2. ?g 0 = x
 3. ?g 1 = y
[PROOF STEP]
let ?g = "(\<lambda>x. mul (d / enorm x) x) \<circ> (\<lambda>t i. (1 - t) * x i + t * y i)"
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. continuous_map (top_of_set {0..1}) (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x = d}) ?g
 2. ?g 0 = x
 3. ?g 1 = y
[PROOF STEP]
show "continuous_map (top_of_set {0::real..1}) (subtopology ?E {x \<in> topspace ?E. enorm x = d}) ?g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_map (top_of_set {0..1}) (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x = d}) ((\<lambda>x. mul (d / enorm x) x) \<circ> (\<lambda>t i. (1 - t) * x i + t * y i))
[PROOF STEP]
proof (rule continuous_map_compose)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. continuous_map (top_of_set {0..1}) ?X' (\<lambda>t i. (1 - t) * x i + t * y i)
 2. continuous_map ?X' (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x = d}) (\<lambda>x. mul (d / enorm x) x)
[PROOF STEP]
let ?Y = "subtopology ?E (- {zero})"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. continuous_map (top_of_set {0..1}) ?X' (\<lambda>t i. (1 - t) * x i + t * y i)
 2. continuous_map ?X' (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x = d}) (\<lambda>x. mul (d / enorm x) x)
[PROOF STEP]
have **: False
                    if eq0: "\<And>j. (1 - r) * x j + r * y j = 0"
                      and ne: "x i \<noteq> - y i"
                      and d: "enorm x = d" "enorm y = d"
                      and r: "0 \<le> r" "r \<le> 1"
                    for i r
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. False
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. False
[PROOF STEP]
have "mul (1-r) x = ?neg (mul r y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mul (1 - r) x = mul (- 1) (mul r y)
[PROOF STEP]
using eq0
[PROOF STATE]
proof (prove)
using this:
(1 - r) * x ?j + r * y ?j = 0

goal (1 subgoal):
 1. mul (1 - r) x = mul (- 1) (mul r y)
[PROOF STEP]
by (simp add: mul_def fun_eq_iff algebra_simps)
[PROOF STATE]
proof (state)
this:
mul (1 - r) x = mul (- 1) (mul r y)

goal (1 subgoal):
 1. False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
mul (1 - r) x = mul (- 1) (mul r y)
[PROOF STEP]
have "enorm (mul (1-r) x) = enorm (?neg (mul r y))"
[PROOF STATE]
proof (prove)
using this:
mul (1 - r) x = mul (- 1) (mul r y)

goal (1 subgoal):
 1. enorm (mul (1 - r) x) = enorm (mul (- 1) (mul r y))
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
enorm (mul (1 - r) x) = enorm (mul (- 1) (mul r y))

goal (1 subgoal):
 1. False
[PROOF STEP]
with r
[PROOF STATE]
proof (chain)
picking this:
0 \<le> r
r \<le> 1
enorm (mul (1 - r) x) = enorm (mul (- 1) (mul r y))
[PROOF STEP]
have "(1-r) * enorm x = r * enorm y"
[PROOF STATE]
proof (prove)
using this:
0 \<le> r
r \<le> 1
enorm (mul (1 - r) x) = enorm (mul (- 1) (mul r y))

goal (1 subgoal):
 1. (1 - r) * enorm x = r * enorm y
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(1 - r) * enorm x = r * enorm y

goal (1 subgoal):
 1. False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(1 - r) * enorm x = r * enorm y
[PROOF STEP]
have r12: "r = 1/2"
[PROOF STATE]
proof (prove)
using this:
(1 - r) * enorm x = r * enorm y

goal (1 subgoal):
 1. r = 1 / 2
[PROOF STEP]
using \<open>d \<noteq> 0\<close> d
[PROOF STATE]
proof (prove)
using this:
(1 - r) * enorm x = r * enorm y
d \<noteq> 0
enorm x = d
enorm y = d

goal (1 subgoal):
 1. r = 1 / 2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
r = 1 / 2

goal (1 subgoal):
 1. False
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. False
[PROOF STEP]
using ne eq0 [of i]
[PROOF STATE]
proof (prove)
using this:
x i \<noteq> - y i
(1 - r) * x i + r * y i = 0

goal (1 subgoal):
 1. False
[PROOF STEP]
unfolding r12
[PROOF STATE]
proof (prove)
using this:
x i \<noteq> - y i
(1 - 1 / 2) * x i + 1 / 2 * y i = 0

goal (1 subgoal):
 1. False
[PROOF STEP]
by (simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>\<And>j. (1 - ?r) * x j + ?r * y j = 0; x ?i \<noteq> - y ?i; enorm x = d; enorm y = d; 0 \<le> ?r; ?r \<le> 1\<rbrakk> \<Longrightarrow> False

goal (2 subgoals):
 1. continuous_map (top_of_set {0..1}) ?X' (\<lambda>t i. (1 - t) * x i + t * y i)
 2. continuous_map ?X' (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x = d}) (\<lambda>x. mul (d / enorm x) x)
[PROOF STEP]
show "continuous_map (top_of_set {0..1}) ?Y (\<lambda>t i. (1 - t) * x i + t * y i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_map (top_of_set {0..1}) (subtopology (Euclidean_space n) (- {zero})) (\<lambda>t i. (1 - t) * x i + t * y i)
[PROOF STEP]
using x y
[PROOF STATE]
proof (prove)
using this:
x \<in> topspace (subtopology (Euclidean_space n) (S d))
y \<in> topspace (subtopology (Euclidean_space n) (S d))
x \<noteq> mul (- 1) y

goal (1 subgoal):
 1. continuous_map (top_of_set {0..1}) (subtopology (Euclidean_space n) (- {zero})) (\<lambda>t i. (1 - t) * x i + t * y i)
[PROOF STEP]
unfolding continuous_map_componentwise_UNIV Euclidean_space_def continuous_map_in_subtopology
[PROOF STATE]
proof (prove)
using this:
x \<in> topspace (subtopology (subtopology (powertop_real UNIV) {x. \<forall>i\<ge>n. x i = 0}) (S d))
y \<in> topspace (subtopology (subtopology (powertop_real UNIV) {x. \<forall>i\<ge>n. x i = 0}) (S d))
x \<noteq> mul (- 1) y

goal (1 subgoal):
 1. ((\<forall>k. continuous_map (top_of_set {0..1}) euclideanreal (\<lambda>xa. (1 - xa) * x k + xa * y k)) \<and> (\<lambda>t i. (1 - t) * x i + t * y i) ` topspace (top_of_set {0..1}) \<subseteq> {x. \<forall>i\<ge>n. x i = 0}) \<and> (\<lambda>t i. (1 - t) * x i + t * y i) ` topspace (top_of_set {0..1}) \<subseteq> - {zero}
[PROOF STEP]
apply (intro conjI allI continuous_intros)
[PROOF STATE]
proof (prove)
goal (7 subgoals):
 1. \<And>k. \<lbrakk>x \<in> topspace (subtopology (subtopology (powertop_real UNIV) {x. \<forall>i\<ge>n. x i = 0}) (S d)); y \<in> topspace (subtopology (subtopology (powertop_real UNIV) {x. \<forall>i\<ge>n. x i = 0}) (S d)); x \<noteq> mul (- 1) y\<rbrakk> \<Longrightarrow> topspace (top_of_set {0..1}) = {} \<or> 1 \<in> topspace euclideanreal
 2. \<And>k. \<lbrakk>x \<in> topspace (subtopology (subtopology (powertop_real UNIV) {x. \<forall>i\<ge>n. x i = 0}) (S d)); y \<in> topspace (subtopology (subtopology (powertop_real UNIV) {x. \<forall>i\<ge>n. x i = 0}) (S d)); x \<noteq> mul (- 1) y\<rbrakk> \<Longrightarrow> continuous_map (top_of_set {0..1}) euclideanreal (\<lambda>x. x)
 3. \<And>k. \<lbrakk>x \<in> topspace (subtopology (subtopology (powertop_real UNIV) {x. \<forall>i\<ge>n. x i = 0}) (S d)); y \<in> topspace (subtopology (subtopology (powertop_real UNIV) {x. \<forall>i\<ge>n. x i = 0}) (S d)); x \<noteq> mul (- 1) y\<rbrakk> \<Longrightarrow> topspace (top_of_set {0..1}) = {} \<or> x k \<in> topspace euclideanreal
 4. \<And>k. \<lbrakk>x \<in> topspace (subtopology (subtopology (powertop_real UNIV) {x. \<forall>i\<ge>n. x i = 0}) (S d)); y \<in> topspace (subtopology (subtopology (powertop_real UNIV) {x. \<forall>i\<ge>n. x i = 0}) (S d)); x \<noteq> mul (- 1) y\<rbrakk> \<Longrightarrow> continuous_map (top_of_set {0..1}) euclideanreal (\<lambda>x. x)
 5. \<And>k. \<lbrakk>x \<in> topspace (subtopology (subtopology (powertop_real UNIV) {x. \<forall>i\<ge>n. x i = 0}) (S d)); y \<in> topspace (subtopology (subtopology (powertop_real UNIV) {x. \<forall>i\<ge>n. x i = 0}) (S d)); x \<noteq> mul (- 1) y\<rbrakk> \<Longrightarrow> topspace (top_of_set {0..1}) = {} \<or> y k \<in> topspace euclideanreal
 6. \<lbrakk>x \<in> topspace (subtopology (subtopology (powertop_real UNIV) {x. \<forall>i\<ge>n. x i = 0}) (S d)); y \<in> topspace (subtopology (subtopology (powertop_real UNIV) {x. \<forall>i\<ge>n. x i = 0}) (S d)); x \<noteq> mul (- 1) y\<rbrakk> \<Longrightarrow> (\<lambda>t i. (1 - t) * x i + t * y i) ` topspace (top_of_set {0..1}) \<subseteq> {x. \<forall>i\<ge>n. x i = 0}
 7. \<lbrakk>x \<in> topspace (subtopology (subtopology (powertop_real UNIV) {x. \<forall>i\<ge>n. x i = 0}) (S d)); y \<in> topspace (subtopology (subtopology (powertop_real UNIV) {x. \<forall>i\<ge>n. x i = 0}) (S d)); x \<noteq> mul (- 1) y\<rbrakk> \<Longrightarrow> (\<lambda>t i. (1 - t) * x i + t * y i) ` topspace (top_of_set {0..1}) \<subseteq> - {zero}
[PROOF STEP]
apply (auto simp: zero_def mul_def S_def Euclidean_space_def fun_eq_iff)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>xa xaa. \<lbrakk>x xa \<noteq> - y xa; \<forall>i\<ge>n. x i = 0; d = enorm x; \<forall>i\<ge>n. y i = 0; enorm y = enorm x; \<forall>xa. (1 - xaa) * x xa + xaa * y xa = 0; 0 \<le> xaa; xaa \<le> 1\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
using **
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>j. (1 - ?r) * x j + ?r * y j = 0; x ?i \<noteq> - y ?i; enorm x = d; enorm y = d; 0 \<le> ?r; ?r \<le> 1\<rbrakk> \<Longrightarrow> False

goal (1 subgoal):
 1. \<And>xa xaa. \<lbrakk>x xa \<noteq> - y xa; \<forall>i\<ge>n. x i = 0; d = enorm x; \<forall>i\<ge>n. y i = 0; enorm y = enorm x; \<forall>xa. (1 - xaa) * x xa + xaa * y xa = 0; 0 \<le> xaa; xaa \<le> 1\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
continuous_map (top_of_set {0..1}) (subtopology (Euclidean_space n) (- {zero})) (\<lambda>t i. (1 - t) * x i + t * y i)

goal (1 subgoal):
 1. continuous_map (subtopology (Euclidean_space n) (- {zero})) (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x = d}) (\<lambda>x. mul (d / enorm x) x)
[PROOF STEP]
have cm_enorm': "continuous_map (subtopology (powertop_real UNIV) A) euclideanreal enorm" for A
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_map (subtopology (powertop_real UNIV) A) euclideanreal enorm
[PROOF STEP]
unfolding enorm_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_map (subtopology (powertop_real UNIV) A) euclideanreal (\<lambda>x. sqrt (\<Sum>i<n. (x i)\<^sup>2))
[PROOF STEP]
by (intro continuous_intros) auto
[PROOF STATE]
proof (state)
this:
continuous_map (subtopology (powertop_real UNIV) ?A) euclideanreal enorm

goal (1 subgoal):
 1. continuous_map (subtopology (Euclidean_space n) (- {zero})) (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x = d}) (\<lambda>x. mul (d / enorm x) x)
[PROOF STEP]
have "continuous_map ?Y (subtopology ?E {x. enorm x = d}) (\<lambda>x. mul (d / enorm x) x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_map (subtopology (Euclidean_space n) (- {zero})) (subtopology (Euclidean_space n) {x. enorm x = d}) (\<lambda>x. mul (d / enorm x) x)
[PROOF STEP]
unfolding continuous_map_in_subtopology
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_map (subtopology (Euclidean_space n) (- {zero})) (Euclidean_space n) (\<lambda>x. mul (d / enorm x) x) \<and> (\<lambda>x. mul (d / enorm x) x) ` topspace (subtopology (Euclidean_space n) (- {zero})) \<subseteq> {x. enorm x = d}
[PROOF STEP]
proof (intro conjI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. continuous_map (subtopology (Euclidean_space n) (- {zero})) (Euclidean_space n) (\<lambda>x. mul (d / enorm x) x)
 2. (\<lambda>x. mul (d / enorm x) x) ` topspace (subtopology (Euclidean_space n) (- {zero})) \<subseteq> {x. enorm x = d}
[PROOF STEP]
show "continuous_map ?Y (Euclidean_space n) (\<lambda>x. mul (d / enorm x) x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_map (subtopology (Euclidean_space n) (- {zero})) (Euclidean_space n) (\<lambda>x. mul (d / enorm x) x)
[PROOF STEP]
unfolding continuous_map_in_subtopology Euclidean_space_def mul_def zero_def subtopology_subtopology continuous_map_componentwise_UNIV
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>k. continuous_map (subtopology (powertop_real UNIV) ({x. \<forall>i\<ge>n. x i = 0} \<inter> - {\<lambda>i. 0})) euclideanreal (\<lambda>x. d / enorm x * x k)) \<and> (\<lambda>x i. d / enorm x * x i) ` topspace (subtopology (powertop_real UNIV) ({x. \<forall>i\<ge>n. x i = 0} \<inter> - {\<lambda>i. 0})) \<subseteq> {x. \<forall>i\<ge>n. x i = 0}
[PROOF STEP]
proof (intro conjI allI cm_enorm' continuous_intros)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>k. topspace (subtopology (powertop_real UNIV) ({x. \<forall>i\<ge>n. x i = 0} \<inter> - {\<lambda>i. 0})) = {} \<or> d \<in> topspace euclideanreal
 2. \<And>k x. x \<in> topspace (subtopology (powertop_real UNIV) ({x. \<forall>i\<ge>n. x i = 0} \<inter> - {\<lambda>i. 0})) \<Longrightarrow> enorm x \<noteq> 0
 3. \<And>k. k \<in> UNIV
 4. (\<lambda>x i. d / enorm x * x i) ` topspace (subtopology (powertop_real UNIV) ({x. \<forall>i\<ge>n. x i = 0} \<inter> - {\<lambda>i. 0})) \<subseteq> {x. \<forall>i\<ge>n. x i = 0}
[PROOF STEP]
show "enorm x \<noteq> 0"
                        if "x \<in> topspace (subtopology (powertop_real UNIV) ({x. \<forall>i\<ge>n. x i = 0} \<inter> - {\<lambda>i. 0}))" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. enorm x \<noteq> 0
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
x \<in> topspace (subtopology (powertop_real UNIV) ({x. \<forall>i\<ge>n. x i = 0} \<inter> - {\<lambda>i. 0}))

goal (1 subgoal):
 1. enorm x \<noteq> 0
[PROOF STEP]
by simp (metis abs_le_zero_iff le_enorm not_less)
[PROOF STATE]
proof (state)
this:
?x \<in> topspace (subtopology (powertop_real UNIV) ({x. \<forall>i\<ge>n. x i = 0} \<inter> - {\<lambda>i. 0})) \<Longrightarrow> enorm ?x \<noteq> 0

goal (3 subgoals):
 1. \<And>k. topspace (subtopology (powertop_real UNIV) ({x. \<forall>i\<ge>n. x i = 0} \<inter> - {\<lambda>i. 0})) = {} \<or> d \<in> topspace euclideanreal
 2. \<And>k. k \<in> UNIV
 3. (\<lambda>x i. d / enorm x * x i) ` topspace (subtopology (powertop_real UNIV) ({x. \<forall>i\<ge>n. x i = 0} \<inter> - {\<lambda>i. 0})) \<subseteq> {x. \<forall>i\<ge>n. x i = 0}
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
continuous_map (subtopology (Euclidean_space n) (- {zero})) (Euclidean_space n) (\<lambda>x. mul (d / enorm x) x)

goal (1 subgoal):
 1. (\<lambda>x. mul (d / enorm x) x) ` topspace (subtopology (Euclidean_space n) (- {zero})) \<subseteq> {x. enorm x = d}
[PROOF STEP]
qed (use \<open>d > 0\<close> enorm_ge0 in auto)
[PROOF STATE]
proof (state)
this:
continuous_map (subtopology (Euclidean_space n) (- {zero})) (subtopology (Euclidean_space n) {x. enorm x = d}) (\<lambda>x. mul (d / enorm x) x)

goal (1 subgoal):
 1. continuous_map (subtopology (Euclidean_space n) (- {zero})) (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x = d}) (\<lambda>x. mul (d / enorm x) x)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
continuous_map (subtopology (Euclidean_space n) (- {zero})) (subtopology (Euclidean_space n) {x. enorm x = d}) (\<lambda>x. mul (d / enorm x) x)

goal (1 subgoal):
 1. continuous_map (subtopology (Euclidean_space n) (- {zero})) (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x = d}) (\<lambda>x. mul (d / enorm x) x)
[PROOF STEP]
have "subtopology ?E {x \<in> topspace ?E. enorm x = d} = subtopology ?E {x. enorm x = d}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x = d} = subtopology (Euclidean_space n) {x. enorm x = d}
[PROOF STEP]
by (simp add: subtopology_restrict Collect_conj_eq)
[PROOF STATE]
proof (state)
this:
subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x = d} = subtopology (Euclidean_space n) {x. enorm x = d}

goal (1 subgoal):
 1. continuous_map (subtopology (Euclidean_space n) (- {zero})) (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x = d}) (\<lambda>x. mul (d / enorm x) x)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
continuous_map (subtopology (Euclidean_space n) (- {zero})) (subtopology (Euclidean_space n) {x. enorm x = d}) (\<lambda>x. mul (d / enorm x) x)
subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x = d} = subtopology (Euclidean_space n) {x. enorm x = d}
[PROOF STEP]
show "continuous_map ?Y (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x = d}) (\<lambda>x. mul (d / enorm x) x)"
[PROOF STATE]
proof (prove)
using this:
continuous_map (subtopology (Euclidean_space n) (- {zero})) (subtopology (Euclidean_space n) {x. enorm x = d}) (\<lambda>x. mul (d / enorm x) x)
subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x = d} = subtopology (Euclidean_space n) {x. enorm x = d}

goal (1 subgoal):
 1. continuous_map (subtopology (Euclidean_space n) (- {zero})) (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x = d}) (\<lambda>x. mul (d / enorm x) x)
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
continuous_map (subtopology (Euclidean_space n) (- {zero})) (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x = d}) (\<lambda>x. mul (d / enorm x) x)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
continuous_map (top_of_set {0..1}) (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x = d}) ((\<lambda>x. mul (d / enorm x) x) \<circ> (\<lambda>t i. (1 - t) * x i + t * y i))

goal (2 subgoals):
 1. ((\<lambda>x. mul (d / enorm x) x) \<circ> (\<lambda>t i. (1 - t) * x i + t * y i)) 0 = x
 2. ((\<lambda>x. mul (d / enorm x) x) \<circ> (\<lambda>t i. (1 - t) * x i + t * y i)) 1 = y
[PROOF STEP]
show "?g (0::real) = x" "?g (1::real) = y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. mul (d / enorm x) x) \<circ> (\<lambda>t i. (1 - t) * x i + t * y i)) 0 = x &&& ((\<lambda>x. mul (d / enorm x) x) \<circ> (\<lambda>t i. (1 - t) * x i + t * y i)) 1 = y
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
x \<in> topspace (subtopology (Euclidean_space n) (S d))
y \<in> topspace (subtopology (Euclidean_space n) (S d))
x \<noteq> mul (- 1) y

goal (1 subgoal):
 1. ((\<lambda>x. mul (d / enorm x) x) \<circ> (\<lambda>t i. (1 - t) * x i + t * y i)) 0 = x &&& ((\<lambda>x. mul (d / enorm x) x) \<circ> (\<lambda>t i. (1 - t) * x i + t * y i)) 1 = y
[PROOF STEP]
by (auto simp: S_def zero_def mul_def fun_eq_iff)
[PROOF STATE]
proof (state)
this:
((\<lambda>x. mul (d / enorm x) x) \<circ> (\<lambda>t i. (1 - t) * x i + t * y i)) 0 = x
((\<lambda>x. mul (d / enorm x) x) \<circ> (\<lambda>t i. (1 - t) * x i + t * y i)) 1 = y

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
path_component_of (subtopology (Euclidean_space n) (S d)) x y

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>?x \<in> topspace (subtopology (Euclidean_space n) (S d)); ?y \<in> topspace (subtopology (Euclidean_space n) (S d)); ?x \<noteq> mul (- 1) ?y\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) (S d)) ?x ?y

goal (1 subgoal):
 1. \<And>x xa. \<lbrakk>x \<in> topspace (subtopology (Euclidean_space n) (S d)); xa \<in> topspace (subtopology (Euclidean_space n) (S d))\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) (S d)) x xa
[PROOF STEP]
obtain a b where a: "a \<in> topspace ?ES" and b: "b \<in> topspace ?ES"
              and "a \<noteq> b" and negab: "?neg a \<noteq> b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>a b. \<lbrakk>a \<in> topspace (subtopology (Euclidean_space n) (S d)); b \<in> topspace (subtopology (Euclidean_space n) (S d)); a \<noteq> b; mul (- 1) a \<noteq> b\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. (\<And>a b. \<lbrakk>a \<in> topspace (subtopology (Euclidean_space n) (S d)); b \<in> topspace (subtopology (Euclidean_space n) (S d)); a \<noteq> b; mul (- 1) a \<noteq> b\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> ?a2 \<in> topspace (subtopology (Euclidean_space n) (S d))
 2. (\<And>a b. \<lbrakk>a \<in> topspace (subtopology (Euclidean_space n) (S d)); b \<in> topspace (subtopology (Euclidean_space n) (S d)); a \<noteq> b; mul (- 1) a \<noteq> b\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> ?b2 \<in> topspace (subtopology (Euclidean_space n) (S d))
 3. (\<And>a b. \<lbrakk>a \<in> topspace (subtopology (Euclidean_space n) (S d)); b \<in> topspace (subtopology (Euclidean_space n) (S d)); a \<noteq> b; mul (- 1) a \<noteq> b\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> ?a2 \<noteq> ?b2
 4. (\<And>a b. \<lbrakk>a \<in> topspace (subtopology (Euclidean_space n) (S d)); b \<in> topspace (subtopology (Euclidean_space n) (S d)); a \<noteq> b; mul (- 1) a \<noteq> b\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> mul (- 1) ?a2 \<noteq> ?b2
[PROOF STEP]
let ?v = "\<lambda>j i::nat. if i = j then d else 0"
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. (\<And>a b. \<lbrakk>a \<in> topspace (subtopology (Euclidean_space n) (S d)); b \<in> topspace (subtopology (Euclidean_space n) (S d)); a \<noteq> b; mul (- 1) a \<noteq> b\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> ?a2 \<in> topspace (subtopology (Euclidean_space n) (S d))
 2. (\<And>a b. \<lbrakk>a \<in> topspace (subtopology (Euclidean_space n) (S d)); b \<in> topspace (subtopology (Euclidean_space n) (S d)); a \<noteq> b; mul (- 1) a \<noteq> b\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> ?b2 \<in> topspace (subtopology (Euclidean_space n) (S d))
 3. (\<And>a b. \<lbrakk>a \<in> topspace (subtopology (Euclidean_space n) (S d)); b \<in> topspace (subtopology (Euclidean_space n) (S d)); a \<noteq> b; mul (- 1) a \<noteq> b\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> ?a2 \<noteq> ?b2
 4. (\<And>a b. \<lbrakk>a \<in> topspace (subtopology (Euclidean_space n) (S d)); b \<in> topspace (subtopology (Euclidean_space n) (S d)); a \<noteq> b; mul (- 1) a \<noteq> b\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> mul (- 1) ?a2 \<noteq> ?b2
[PROOF STEP]
show "?v 0 \<in> topspace (subtopology ?E (S d))" "?v 1 \<in> topspace (subtopology ?E (S d))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i. if i = 0 then d else 0) \<in> topspace (subtopology (Euclidean_space n) (S d)) &&& (\<lambda>i. if i = 1 then d else 0) \<in> topspace (subtopology (Euclidean_space n) (S d))
[PROOF STEP]
using \<open>n \<ge> 2\<close> \<open>d \<ge> 0\<close>
[PROOF STATE]
proof (prove)
using this:
2 \<le> n
0 \<le> d

goal (1 subgoal):
 1. (\<lambda>i. if i = 0 then d else 0) \<in> topspace (subtopology (Euclidean_space n) (S d)) &&& (\<lambda>i. if i = 1 then d else 0) \<in> topspace (subtopology (Euclidean_space n) (S d))
[PROOF STEP]
by (auto simp: S_def topspace_Euclidean_space)
[PROOF STATE]
proof (state)
this:
(\<lambda>i. if i = 0 then d else 0) \<in> topspace (subtopology (Euclidean_space n) (S d))
(\<lambda>i. if i = 1 then d else 0) \<in> topspace (subtopology (Euclidean_space n) (S d))

goal (2 subgoals):
 1. (\<And>a b. \<lbrakk>a \<in> topspace (subtopology (Euclidean_space n) (S d)); b \<in> topspace (subtopology (Euclidean_space n) (S d)); a \<noteq> b; mul (- 1) a \<noteq> b\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> (\<lambda>i. if i = 0 then d else 0) \<noteq> (\<lambda>i. if i = 1 then d else 0)
 2. (\<And>a b. \<lbrakk>a \<in> topspace (subtopology (Euclidean_space n) (S d)); b \<in> topspace (subtopology (Euclidean_space n) (S d)); a \<noteq> b; mul (- 1) a \<noteq> b\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> mul (- 1) (\<lambda>i. if i = 0 then d else 0) \<noteq> (\<lambda>i. if i = 1 then d else 0)
[PROOF STEP]
show "?v 0 \<noteq> ?v 1" "?neg (?v 0) \<noteq> (?v 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i. if i = 0 then d else 0) \<noteq> (\<lambda>i. if i = 1 then d else 0) &&& mul (- 1) (\<lambda>i. if i = 0 then d else 0) \<noteq> (\<lambda>i. if i = 1 then d else 0)
[PROOF STEP]
using \<open>d > 0\<close>
[PROOF STATE]
proof (prove)
using this:
0 < d

goal (1 subgoal):
 1. (\<lambda>i. if i = 0 then d else 0) \<noteq> (\<lambda>i. if i = 1 then d else 0) &&& mul (- 1) (\<lambda>i. if i = 0 then d else 0) \<noteq> (\<lambda>i. if i = 1 then d else 0)
[PROOF STEP]
by (auto simp: mul_def fun_eq_iff)
[PROOF STATE]
proof (state)
this:
(\<lambda>i. if i = 0 then d else 0) \<noteq> (\<lambda>i. if i = 1 then d else 0)
mul (- 1) (\<lambda>i. if i = 0 then d else 0) \<noteq> (\<lambda>i. if i = 1 then d else 0)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
a \<in> topspace (subtopology (Euclidean_space n) (S d))
b \<in> topspace (subtopology (Euclidean_space n) (S d))
a \<noteq> b
mul (- 1) a \<noteq> b

goal (1 subgoal):
 1. \<And>x xa. \<lbrakk>x \<in> topspace (subtopology (Euclidean_space n) (S d)); xa \<in> topspace (subtopology (Euclidean_space n) (S d))\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) (S d)) x xa
[PROOF STEP]
show "path_component_of ?ES x y"
              if x: "x \<in> topspace ?ES" and y: "y \<in> topspace ?ES"
              for x y
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) (S d)) x y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) (S d)) x y
[PROOF STEP]
have "path_component_of ?ES x (?neg x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) (S d)) x (mul (- 1) x)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) (S d)) x (mul (- 1) x)
[PROOF STEP]
have "path_component_of ?ES x a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) (S d)) x a
[PROOF STEP]
by (metis (no_types, opaque_lifting) ** a b \<open>a \<noteq> b\<close> negab path_component_of_trans path_component_of_sym x)
[PROOF STATE]
proof (state)
this:
path_component_of (subtopology (Euclidean_space n) (S d)) x a

goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) (S d)) x (mul (- 1) x)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
path_component_of (subtopology (Euclidean_space n) (S d)) x a

goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) (S d)) x (mul (- 1) x)
[PROOF STEP]
have pa_ab: "path_component_of ?ES a b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) (S d)) a b
[PROOF STEP]
using "**" a b negab neg_neg
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?x \<in> topspace (subtopology (Euclidean_space n) (S d)); ?y \<in> topspace (subtopology (Euclidean_space n) (S d)); ?x \<noteq> mul (- 1) ?y\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) (S d)) ?x ?y
a \<in> topspace (subtopology (Euclidean_space n) (S d))
b \<in> topspace (subtopology (Euclidean_space n) (S d))
mul (- 1) a \<noteq> b
mul (- 1) (mul (- 1) ?x) = ?x

goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) (S d)) a b
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
path_component_of (subtopology (Euclidean_space n) (S d)) a b

goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) (S d)) x (mul (- 1) x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
path_component_of (subtopology (Euclidean_space n) (S d)) a b
[PROOF STEP]
have "path_component_of ?ES a (?neg x)"
[PROOF STATE]
proof (prove)
using this:
path_component_of (subtopology (Euclidean_space n) (S d)) a b

goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) (S d)) a (mul (- 1) x)
[PROOF STEP]
by (metis "**" \<open>a \<noteq> b\<close> cloS closedin_def neg_in_S path_component_of_equiv topspace_subtopology_subset x)
[PROOF STATE]
proof (state)
this:
path_component_of (subtopology (Euclidean_space n) (S d)) a (mul (- 1) x)

goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) (S d)) x (mul (- 1) x)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
path_component_of (subtopology (Euclidean_space n) (S d)) x a
path_component_of (subtopology (Euclidean_space n) (S d)) a (mul (- 1) x)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
path_component_of (subtopology (Euclidean_space n) (S d)) x a
path_component_of (subtopology (Euclidean_space n) (S d)) a (mul (- 1) x)

goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) (S d)) x (mul (- 1) x)
[PROOF STEP]
by (meson path_component_of_trans)
[PROOF STATE]
proof (state)
this:
path_component_of (subtopology (Euclidean_space n) (S d)) x (mul (- 1) x)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
path_component_of (subtopology (Euclidean_space n) (S d)) x (mul (- 1) x)

goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) (S d)) x y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
path_component_of (subtopology (Euclidean_space n) (S d)) x (mul (- 1) x)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
path_component_of (subtopology (Euclidean_space n) (S d)) x (mul (- 1) x)

goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) (S d)) x y
[PROOF STEP]
using "**" x y
[PROOF STATE]
proof (prove)
using this:
path_component_of (subtopology (Euclidean_space n) (S d)) x (mul (- 1) x)
\<lbrakk>?x \<in> topspace (subtopology (Euclidean_space n) (S d)); ?y \<in> topspace (subtopology (Euclidean_space n) (S d)); ?x \<noteq> mul (- 1) ?y\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) (S d)) ?x ?y
x \<in> topspace (subtopology (Euclidean_space n) (S d))
y \<in> topspace (subtopology (Euclidean_space n) (S d))

goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) (S d)) x y
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
path_component_of (subtopology (Euclidean_space n) (S d)) x y

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>?x \<in> topspace (subtopology (Euclidean_space n) (S d)); ?y \<in> topspace (subtopology (Euclidean_space n) (S d))\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) (S d)) ?x ?y

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
path_connected_space (subtopology (Euclidean_space n) (S d))

goal (2 subgoals):
 1. d = 0 \<Longrightarrow> path_connectedin (Euclidean_space n) (S d)
 2. d \<noteq> 0 \<Longrightarrow> path_connectedin (Euclidean_space n) (S d)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
0 < d
path_connected_space (subtopology (Euclidean_space n) (S d))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
0 < d
path_connected_space (subtopology (Euclidean_space n) (S d))

goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) (S d)
[PROOF STEP]
by (simp add: cloS closedin_subset path_connectedin_def)
[PROOF STATE]
proof (state)
this:
path_connectedin (Euclidean_space n) (S d)

goal (1 subgoal):
 1. d = 0 \<Longrightarrow> path_connectedin (Euclidean_space n) (S d)
[PROOF STEP]
qed (simp add: S_def cong: conj_cong)
[PROOF STATE]
proof (state)
this:
0 \<le> ?d \<Longrightarrow> path_connectedin (Euclidean_space n) (S ?d)

goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}
[PROOF STEP]
have "path_component_of (subtopology ?E {x \<in> topspace ?E. enorm x \<in> T}) x y"
          if "enorm x = a" "x \<in> topspace ?E" "enorm x \<in> T" "enorm y = b" "y \<in> topspace ?E" "enorm y \<in> T"
          for x y a b
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
enorm x = a
x \<in> topspace (Euclidean_space n)
enorm x \<in> T
enorm y = b
y \<in> topspace (Euclidean_space n)
enorm y \<in> T

goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
[PROOF STEP]
proof (induction a b arbitrary: x y rule: linorder_less_wlog)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>a b x y. \<lbrakk>a < b; enorm x = a; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = b; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
 2. \<And>a x y. \<lbrakk>enorm x = a; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = a; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
 3. \<And>a b x y. \<lbrakk>\<And>x y. \<lbrakk>enorm x = b; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = a; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y; enorm x = a; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = b; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
[PROOF STEP]
case (less a b)
[PROOF STATE]
proof (state)
this:
a < b
enorm x = a
x \<in> topspace (Euclidean_space n)
enorm x \<in> T
enorm y = b
y \<in> topspace (Euclidean_space n)
enorm y \<in> T

goal (3 subgoals):
 1. \<And>a b x y. \<lbrakk>a < b; enorm x = a; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = b; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
 2. \<And>a x y. \<lbrakk>enorm x = a; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = a; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
 3. \<And>a b x y. \<lbrakk>\<And>x y. \<lbrakk>enorm x = b; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = a; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y; enorm x = a; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = b; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a < b
enorm x = a
x \<in> topspace (Euclidean_space n)
enorm x \<in> T
enorm y = b
y \<in> topspace (Euclidean_space n)
enorm y \<in> T
[PROOF STEP]
have "a \<ge> 0"
[PROOF STATE]
proof (prove)
using this:
a < b
enorm x = a
x \<in> topspace (Euclidean_space n)
enorm x \<in> T
enorm y = b
y \<in> topspace (Euclidean_space n)
enorm y \<in> T

goal (1 subgoal):
 1. 0 \<le> a
[PROOF STEP]
using enorm_ge0
[PROOF STATE]
proof (prove)
using this:
a < b
enorm x = a
x \<in> topspace (Euclidean_space n)
enorm x \<in> T
enorm y = b
y \<in> topspace (Euclidean_space n)
enorm y \<in> T
0 \<le> enorm ?x

goal (1 subgoal):
 1. 0 \<le> a
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
0 \<le> a

goal (3 subgoals):
 1. \<And>a b x y. \<lbrakk>a < b; enorm x = a; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = b; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
 2. \<And>a x y. \<lbrakk>enorm x = a; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = a; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
 3. \<And>a b x y. \<lbrakk>\<And>x y. \<lbrakk>enorm x = b; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = a; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y; enorm x = a; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = b; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
[PROOF STEP]
with less.hyps
[PROOF STATE]
proof (chain)
picking this:
a < b
0 \<le> a
[PROOF STEP]
have "b > 0"
[PROOF STATE]
proof (prove)
using this:
a < b
0 \<le> a

goal (1 subgoal):
 1. 0 < b
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
0 < b

goal (3 subgoals):
 1. \<And>a b x y. \<lbrakk>a < b; enorm x = a; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = b; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
 2. \<And>a x y. \<lbrakk>enorm x = a; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = a; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
 3. \<And>a b x y. \<lbrakk>\<And>x y. \<lbrakk>enorm x = b; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = a; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y; enorm x = a; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = b; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) x y
[PROOF STEP]
proof (rule path_component_of_trans)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) x ?y
 2. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) ?y y
[PROOF STEP]
have y'_ts: "mul (a / b) y \<in> topspace ?E"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mul (a / b) y \<in> topspace (Euclidean_space n)
[PROOF STEP]
using \<open>y \<in> topspace ?E\<close> mul_in_top
[PROOF STATE]
proof (prove)
using this:
y \<in> topspace (Euclidean_space n)
?x \<in> topspace (Euclidean_space n) \<Longrightarrow> mul ?a ?x \<in> topspace (Euclidean_space n)

goal (1 subgoal):
 1. mul (a / b) y \<in> topspace (Euclidean_space n)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
mul (a / b) y \<in> topspace (Euclidean_space n)

goal (2 subgoals):
 1. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) x ?y
 2. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) ?y y
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
mul (a / b) y \<in> topspace (Euclidean_space n)

goal (2 subgoals):
 1. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) x ?y
 2. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) ?y y
[PROOF STEP]
have "enorm (mul (a / b) y) = a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. enorm (mul (a / b) y) = a
[PROOF STEP]
unfolding enorm_mul
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>a / b\<bar> * enorm y = a
[PROOF STEP]
using \<open>0 < b\<close> \<open>0 \<le> a\<close> less.prems
[PROOF STATE]
proof (prove)
using this:
0 < b
0 \<le> a
enorm x = a
x \<in> topspace (Euclidean_space n)
enorm x \<in> T
enorm y = b
y \<in> topspace (Euclidean_space n)
enorm y \<in> T

goal (1 subgoal):
 1. \<bar>a / b\<bar> * enorm y = a
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
enorm (mul (a / b) y) = a

goal (2 subgoals):
 1. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) x ?y
 2. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) ?y y
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
mul (a / b) y \<in> topspace (Euclidean_space n)
enorm (mul (a / b) y) = a
[PROOF STEP]
have y'_S: "mul (a / b) y \<in> S a"
[PROOF STATE]
proof (prove)
using this:
mul (a / b) y \<in> topspace (Euclidean_space n)
enorm (mul (a / b) y) = a

goal (1 subgoal):
 1. mul (a / b) y \<in> S a
[PROOF STEP]
using S_def
[PROOF STATE]
proof (prove)
using this:
mul (a / b) y \<in> topspace (Euclidean_space n)
enorm (mul (a / b) y) = a
S \<equiv> \<lambda>r. {x \<in> topspace (Euclidean_space n). enorm x = r}

goal (1 subgoal):
 1. mul (a / b) y \<in> S a
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
mul (a / b) y \<in> S a

goal (2 subgoals):
 1. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) x ?y
 2. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) ?y y
[PROOF STEP]
have "x \<in> S a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> S a
[PROOF STEP]
using S_def less.prems
[PROOF STATE]
proof (prove)
using this:
S \<equiv> \<lambda>r. {x \<in> topspace (Euclidean_space n). enorm x = r}
enorm x = a
x \<in> topspace (Euclidean_space n)
enorm x \<in> T
enorm y = b
y \<in> topspace (Euclidean_space n)
enorm y \<in> T

goal (1 subgoal):
 1. x \<in> S a
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<in> S a

goal (2 subgoals):
 1. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) x ?y
 2. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) ?y y
[PROOF STEP]
with \<open>x \<in> topspace ?E\<close> y'_ts y'_S
[PROOF STATE]
proof (chain)
picking this:
x \<in> topspace (Euclidean_space n)
mul (a / b) y \<in> topspace (Euclidean_space n)
mul (a / b) y \<in> S a
x \<in> S a
[PROOF STEP]
have "path_component_of (subtopology ?E (S a)) x (mul (a / b) y)"
[PROOF STATE]
proof (prove)
using this:
x \<in> topspace (Euclidean_space n)
mul (a / b) y \<in> topspace (Euclidean_space n)
mul (a / b) y \<in> S a
x \<in> S a

goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) (S a)) x (mul (a / b) y)
[PROOF STEP]
by (metis * [OF \<open>a \<ge> 0\<close>] path_connected_space_iff_path_component path_connectedin_def topspace_subtopology_subset)
[PROOF STATE]
proof (state)
this:
path_component_of (subtopology (Euclidean_space n) (S a)) x (mul (a / b) y)

goal (2 subgoals):
 1. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) x ?y
 2. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) ?y y
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
path_component_of (subtopology (Euclidean_space n) (S a)) x (mul (a / b) y)

goal (2 subgoals):
 1. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) x ?y
 2. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) ?y y
[PROOF STEP]
have "{f \<in> topspace ?E. enorm f = a} \<subseteq> {f \<in> topspace ?E. enorm f \<in> T}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {f \<in> topspace (Euclidean_space n). enorm f = a} \<subseteq> {f \<in> topspace (Euclidean_space n). enorm f \<in> T}
[PROOF STEP]
using \<open>enorm x = a\<close> \<open>enorm x \<in> T\<close>
[PROOF STATE]
proof (prove)
using this:
enorm x = a
enorm x \<in> T

goal (1 subgoal):
 1. {f \<in> topspace (Euclidean_space n). enorm f = a} \<subseteq> {f \<in> topspace (Euclidean_space n). enorm f \<in> T}
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
{f \<in> topspace (Euclidean_space n). enorm f = a} \<subseteq> {f \<in> topspace (Euclidean_space n). enorm f \<in> T}

goal (2 subgoals):
 1. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) x ?y
 2. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) ?y y
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
path_component_of (subtopology (Euclidean_space n) (S a)) x (mul (a / b) y)
{f \<in> topspace (Euclidean_space n). enorm f = a} \<subseteq> {f \<in> topspace (Euclidean_space n). enorm f \<in> T}
[PROOF STEP]
show "path_component_of (subtopology ?E {x. x \<in> topspace ?E \<and> enorm x \<in> T}) x (mul (a / b) y)"
[PROOF STATE]
proof (prove)
using this:
path_component_of (subtopology (Euclidean_space n) (S a)) x (mul (a / b) y)
{f \<in> topspace (Euclidean_space n). enorm f = a} \<subseteq> {f \<in> topspace (Euclidean_space n). enorm f \<in> T}

goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x (mul (a / b) y)
[PROOF STEP]
by (simp add: S_def path_component_of_mono)
[PROOF STATE]
proof (state)
this:
path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x (mul (a / b) y)

goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) (mul (a / b) y) y
[PROOF STEP]
have "pathin ?E (\<lambda>t. mul (((1 - t) * b + t * a) / b) y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pathin (Euclidean_space n) (\<lambda>t. mul (((1 - t) * b + t * a) / b) y)
[PROOF STEP]
using \<open>b > 0\<close> \<open>y \<in> topspace ?E\<close>
[PROOF STATE]
proof (prove)
using this:
0 < b
y \<in> topspace (Euclidean_space n)

goal (1 subgoal):
 1. pathin (Euclidean_space n) (\<lambda>t. mul (((1 - t) * b + t * a) / b) y)
[PROOF STEP]
unfolding pathin_def Euclidean_space_def mul_def continuous_map_in_subtopology continuous_map_componentwise_UNIV
[PROOF STATE]
proof (prove)
using this:
0 < b
y \<in> topspace (subtopology (powertop_real UNIV) {x. \<forall>i\<ge>n. x i = 0})

goal (1 subgoal):
 1. (\<forall>k. continuous_map (top_of_set {0..1}) euclideanreal (\<lambda>x. ((1 - x) * b + x * a) / b * y k)) \<and> (\<lambda>t i. ((1 - t) * b + t * a) / b * y i) ` topspace (top_of_set {0..1}) \<subseteq> {x. \<forall>i\<ge>n. x i = 0}
[PROOF STEP]
by (intro allI conjI continuous_intros) auto
[PROOF STATE]
proof (state)
this:
pathin (Euclidean_space n) (\<lambda>t. mul (((1 - t) * b + t * a) / b) y)

goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) (mul (a / b) y) y
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
pathin (Euclidean_space n) (\<lambda>t. mul (((1 - t) * b + t * a) / b) y)

goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) (mul (a / b) y) y
[PROOF STEP]
have "mul (((1 - t) * b + t * a) / b) y \<in> topspace ?E"
                if "t \<in> {0..1}" for t
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mul (((1 - t) * b + t * a) / b) y \<in> topspace (Euclidean_space n)
[PROOF STEP]
using \<open>y \<in> topspace ?E\<close> mul_in_top
[PROOF STATE]
proof (prove)
using this:
y \<in> topspace (Euclidean_space n)
?x \<in> topspace (Euclidean_space n) \<Longrightarrow> mul ?a ?x \<in> topspace (Euclidean_space n)

goal (1 subgoal):
 1. mul (((1 - t) * b + t * a) / b) y \<in> topspace (Euclidean_space n)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
?t \<in> {0..1} \<Longrightarrow> mul (((1 - ?t) * b + ?t * a) / b) y \<in> topspace (Euclidean_space n)

goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) (mul (a / b) y) y
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
?t \<in> {0..1} \<Longrightarrow> mul (((1 - ?t) * b + ?t * a) / b) y \<in> topspace (Euclidean_space n)

goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) (mul (a / b) y) y
[PROOF STEP]
have "enorm (mul (((1 - t) * b + t * a) / b) y) \<in> T"
                  if "t \<in> {0..1}" for t
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. enorm (mul (((1 - t) * b + t * a) / b) y) \<in> T
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. enorm (mul (((1 - t) * b + t * a) / b) y) \<in> T
[PROOF STEP]
have "a \<in> T" "b \<in> T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<in> T &&& b \<in> T
[PROOF STEP]
using less.prems
[PROOF STATE]
proof (prove)
using this:
enorm x = a
x \<in> topspace (Euclidean_space n)
enorm x \<in> T
enorm y = b
y \<in> topspace (Euclidean_space n)
enorm y \<in> T

goal (1 subgoal):
 1. a \<in> T &&& b \<in> T
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a \<in> T
b \<in> T

goal (1 subgoal):
 1. enorm (mul (((1 - t) * b + t * a) / b) y) \<in> T
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<in> T
b \<in> T
[PROOF STEP]
have "\<bar>(1 - t) * b + t * a\<bar> \<in> T"
[PROOF STATE]
proof (prove)
using this:
a \<in> T
b \<in> T

goal (1 subgoal):
 1. \<bar>(1 - t) * b + t * a\<bar> \<in> T
[PROOF STEP]
proof (rule mem_is_interval_1_I [OF T])
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. a \<le> \<bar>(1 - t) * b + t * a\<bar>
 2. \<bar>(1 - t) * b + t * a\<bar> \<le> b
[PROOF STEP]
show "a \<le> \<bar>(1 - t) * b + t * a\<bar>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<le> \<bar>(1 - t) * b + t * a\<bar>
[PROOF STEP]
using that \<open>a \<ge> 0\<close> less.hyps segment_bound_lemma
[PROOF STATE]
proof (prove)
using this:
t \<in> {0..1}
0 \<le> a
a < b
\<lbrakk>?B \<le> ?x; ?B \<le> ?y; 0 \<le> ?u; ?u \<le> 1\<rbrakk> \<Longrightarrow> ?B \<le> (1 - ?u) * ?x + ?u * ?y

goal (1 subgoal):
 1. a \<le> \<bar>(1 - t) * b + t * a\<bar>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a \<le> \<bar>(1 - t) * b + t * a\<bar>

goal (1 subgoal):
 1. \<bar>(1 - t) * b + t * a\<bar> \<le> b
[PROOF STEP]
show "\<bar>(1 - t) * b + t * a\<bar> \<le> b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>(1 - t) * b + t * a\<bar> \<le> b
[PROOF STEP]
using that \<open>a \<ge> 0\<close> less.hyps
[PROOF STATE]
proof (prove)
using this:
t \<in> {0..1}
0 \<le> a
a < b

goal (1 subgoal):
 1. \<bar>(1 - t) * b + t * a\<bar> \<le> b
[PROOF STEP]
by (auto intro: convex_bound_le)
[PROOF STATE]
proof (state)
this:
\<bar>(1 - t) * b + t * a\<bar> \<le> b

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<bar>(1 - t) * b + t * a\<bar> \<in> T

goal (1 subgoal):
 1. enorm (mul (((1 - t) * b + t * a) / b) y) \<in> T
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<bar>(1 - t) * b + t * a\<bar> \<in> T
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<bar>(1 - t) * b + t * a\<bar> \<in> T

goal (1 subgoal):
 1. enorm (mul (((1 - t) * b + t * a) / b) y) \<in> T
[PROOF STEP]
unfolding enorm_mul \<open>enorm y = b\<close>
[PROOF STATE]
proof (prove)
using this:
\<bar>(1 - t) * b + t * a\<bar> \<in> T

goal (1 subgoal):
 1. \<bar>((1 - t) * b + t * a) / b\<bar> * b \<in> T
[PROOF STEP]
using that \<open>b > 0\<close>
[PROOF STATE]
proof (prove)
using this:
\<bar>(1 - t) * b + t * a\<bar> \<in> T
t \<in> {0..1}
0 < b

goal (1 subgoal):
 1. \<bar>((1 - t) * b + t * a) / b\<bar> * b \<in> T
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
enorm (mul (((1 - t) * b + t * a) / b) y) \<in> T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?t \<in> {0..1} \<Longrightarrow> enorm (mul (((1 - ?t) * b + ?t * a) / b) y) \<in> T

goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) (mul (a / b) y) y
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
pathin (Euclidean_space n) (\<lambda>t. mul (((1 - t) * b + t * a) / b) y)
?t \<in> {0..1} \<Longrightarrow> mul (((1 - ?t) * b + ?t * a) / b) y \<in> topspace (Euclidean_space n)
?t \<in> {0..1} \<Longrightarrow> enorm (mul (((1 - ?t) * b + ?t * a) / b) y) \<in> T
[PROOF STEP]
have pa: "pathin (subtopology ?E {x \<in> topspace ?E. enorm x \<in> T})
                                          (\<lambda>t. mul (((1 - t) * b + t * a) / b) y)"
[PROOF STATE]
proof (prove)
using this:
pathin (Euclidean_space n) (\<lambda>t. mul (((1 - t) * b + t * a) / b) y)
?t \<in> {0..1} \<Longrightarrow> mul (((1 - ?t) * b + ?t * a) / b) y \<in> topspace (Euclidean_space n)
?t \<in> {0..1} \<Longrightarrow> enorm (mul (((1 - ?t) * b + ?t * a) / b) y) \<in> T

goal (1 subgoal):
 1. pathin (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) (\<lambda>t. mul (((1 - t) * b + t * a) / b) y)
[PROOF STEP]
by (auto simp: pathin_subtopology)
[PROOF STATE]
proof (state)
this:
pathin (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) (\<lambda>t. mul (((1 - t) * b + t * a) / b) y)

goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) (mul (a / b) y) y
[PROOF STEP]
have ex_pathin: "\<exists>g. pathin (subtopology ?E {x \<in> topspace ?E. enorm x \<in> T}) g \<and>
                                   g 0 = y \<and> g 1 = mul (a / b) y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>g. pathin (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) g \<and> g 0 = y \<and> g 1 = mul (a / b) y
[PROOF STEP]
apply (rule_tac x="\<lambda>t. mul (((1 - t) * b + t * a) / b) y" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pathin (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) (\<lambda>t. mul (((1 - t) * b + t * a) / b) y) \<and> mul (((1 - 0) * b + 0 * a) / b) y = y \<and> mul (((1 - 1) * b + 1 * a) / b) y = mul (a / b) y
[PROOF STEP]
using \<open>b > 0\<close> pa
[PROOF STATE]
proof (prove)
using this:
0 < b
pathin (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) (\<lambda>t. mul (((1 - t) * b + t * a) / b) y)

goal (1 subgoal):
 1. pathin (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) (\<lambda>t. mul (((1 - t) * b + t * a) / b) y) \<and> mul (((1 - 0) * b + 0 * a) / b) y = y \<and> mul (((1 - 1) * b + 1 * a) / b) y = mul (a / b) y
[PROOF STEP]
by (auto simp: mul_def)
[PROOF STATE]
proof (state)
this:
\<exists>g. pathin (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) g \<and> g 0 = y \<and> g 1 = mul (a / b) y

goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) (mul (a / b) y) y
[PROOF STEP]
show "path_component_of (subtopology ?E {x. x \<in> topspace ?E \<and> enorm x \<in> T}) (mul (a / b) y) y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) (mul (a / b) y) y
[PROOF STEP]
by (rule path_component_of_sym) (simp add: path_component_of_def ex_pathin)
[PROOF STATE]
proof (state)
this:
path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) (mul (a / b) y) y

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) x y

goal (2 subgoals):
 1. \<And>a x y. \<lbrakk>enorm x = a; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = a; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
 2. \<And>a b x y. \<lbrakk>\<And>x y. \<lbrakk>enorm x = b; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = a; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y; enorm x = a; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = b; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>a x y. \<lbrakk>enorm x = a; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = a; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
 2. \<And>a b x y. \<lbrakk>\<And>x y. \<lbrakk>enorm x = b; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = a; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y; enorm x = a; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = b; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
[PROOF STEP]
case (refl a)
[PROOF STATE]
proof (state)
this:
enorm x = a
x \<in> topspace (Euclidean_space n)
enorm x \<in> T
enorm y = a
y \<in> topspace (Euclidean_space n)
enorm y \<in> T

goal (2 subgoals):
 1. \<And>a x y. \<lbrakk>enorm x = a; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = a; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
 2. \<And>a b x y. \<lbrakk>\<And>x y. \<lbrakk>enorm x = b; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = a; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y; enorm x = a; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = b; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
enorm x = a
x \<in> topspace (Euclidean_space n)
enorm x \<in> T
enorm y = a
y \<in> topspace (Euclidean_space n)
enorm y \<in> T
[PROOF STEP]
have pc: "path_component_of (subtopology ?E (S (enorm u))) u v"
              if "u \<in> topspace ?E \<inter> S (enorm x)" "v \<in> topspace ?E \<inter> S (enorm u)" for u v
[PROOF STATE]
proof (prove)
using this:
enorm x = a
x \<in> topspace (Euclidean_space n)
enorm x \<in> T
enorm y = a
y \<in> topspace (Euclidean_space n)
enorm y \<in> T

goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) (S (enorm u))) u v
[PROOF STEP]
using * [of a] enorm_ge0 that
[PROOF STATE]
proof (prove)
using this:
enorm x = a
x \<in> topspace (Euclidean_space n)
enorm x \<in> T
enorm y = a
y \<in> topspace (Euclidean_space n)
enorm y \<in> T
0 \<le> a \<Longrightarrow> path_connectedin (Euclidean_space n) (S a)
0 \<le> enorm ?x
u \<in> topspace (Euclidean_space n) \<inter> S (enorm x)
v \<in> topspace (Euclidean_space n) \<inter> S (enorm u)

goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) (S (enorm u))) u v
[PROOF STEP]
by (auto simp: path_connectedin_def path_connected_space_iff_path_component S_def)
[PROOF STATE]
proof (state)
this:
\<lbrakk>?u \<in> topspace (Euclidean_space n) \<inter> S (enorm x); ?v \<in> topspace (Euclidean_space n) \<inter> S (enorm ?u)\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) (S (enorm ?u))) ?u ?v

goal (2 subgoals):
 1. \<And>a x y. \<lbrakk>enorm x = a; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = a; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
 2. \<And>a b x y. \<lbrakk>\<And>x y. \<lbrakk>enorm x = b; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = a; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y; enorm x = a; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = b; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
[PROOF STEP]
have sub: "{u \<in> topspace ?E. enorm u = enorm x} \<subseteq> {u \<in> topspace ?E. enorm u \<in> T}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {u \<in> topspace (Euclidean_space n). enorm u = enorm x} \<subseteq> {u \<in> topspace (Euclidean_space n). enorm u \<in> T}
[PROOF STEP]
using \<open>enorm x \<in> T\<close>
[PROOF STATE]
proof (prove)
using this:
enorm x \<in> T

goal (1 subgoal):
 1. {u \<in> topspace (Euclidean_space n). enorm u = enorm x} \<subseteq> {u \<in> topspace (Euclidean_space n). enorm u \<in> T}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{u \<in> topspace (Euclidean_space n). enorm u = enorm x} \<subseteq> {u \<in> topspace (Euclidean_space n). enorm u \<in> T}

goal (2 subgoals):
 1. \<And>a x y. \<lbrakk>enorm x = a; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = a; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
 2. \<And>a b x y. \<lbrakk>\<And>x y. \<lbrakk>enorm x = b; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = a; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y; enorm x = a; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = b; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) x y
[PROOF STEP]
using pc [of x y] refl
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>x \<in> topspace (Euclidean_space n) \<inter> S (enorm x); y \<in> topspace (Euclidean_space n) \<inter> S (enorm x)\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) (S (enorm x))) x y
enorm x = a
x \<in> topspace (Euclidean_space n)
enorm x \<in> T
enorm y = a
y \<in> topspace (Euclidean_space n)
enorm y \<in> T

goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) x y
[PROOF STEP]
by (auto simp: S_def path_component_of_mono [OF _ sub])
[PROOF STATE]
proof (state)
this:
path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) x y

goal (1 subgoal):
 1. \<And>a b x y. \<lbrakk>\<And>x y. \<lbrakk>enorm x = b; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = a; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y; enorm x = a; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = b; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a b x y. \<lbrakk>\<And>x y. \<lbrakk>enorm x = b; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = a; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y; enorm x = a; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = b; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
[PROOF STEP]
case (sym a b)
[PROOF STATE]
proof (state)
this:
\<lbrakk>enorm ?x = b; ?x \<in> topspace (Euclidean_space n); enorm ?x \<in> T; enorm ?y = a; ?y \<in> topspace (Euclidean_space n); enorm ?y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) ?x ?y
enorm x = a
x \<in> topspace (Euclidean_space n)
enorm x \<in> T
enorm y = b
y \<in> topspace (Euclidean_space n)
enorm y \<in> T

goal (1 subgoal):
 1. \<And>a b x y. \<lbrakk>\<And>x y. \<lbrakk>enorm x = b; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = a; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y; enorm x = a; x \<in> topspace (Euclidean_space n); enorm x \<in> T; enorm y = b; y \<in> topspace (Euclidean_space n); enorm y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) x y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>enorm ?x = b; ?x \<in> topspace (Euclidean_space n); enorm ?x \<in> T; enorm ?y = a; ?y \<in> topspace (Euclidean_space n); enorm ?y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) ?x ?y
enorm x = a
x \<in> topspace (Euclidean_space n)
enorm x \<in> T
enorm y = b
y \<in> topspace (Euclidean_space n)
enorm y \<in> T
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>enorm ?x = b; ?x \<in> topspace (Euclidean_space n); enorm ?x \<in> T; enorm ?y = a; ?y \<in> topspace (Euclidean_space n); enorm ?y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) ?x ?y
enorm x = a
x \<in> topspace (Euclidean_space n)
enorm x \<in> T
enorm y = b
y \<in> topspace (Euclidean_space n)
enorm y \<in> T

goal (1 subgoal):
 1. path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) x y
[PROOF STEP]
by (blast intro: path_component_of_sym)
[PROOF STATE]
proof (state)
this:
path_component_of (subtopology (Euclidean_space n) {x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<in> T}) x y

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>enorm ?x = ?a; ?x \<in> topspace (Euclidean_space n); enorm ?x \<in> T; enorm ?y = ?b; ?y \<in> topspace (Euclidean_space n); enorm ?y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) ?x ?y

goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>enorm ?x = ?a; ?x \<in> topspace (Euclidean_space n); enorm ?x \<in> T; enorm ?y = ?b; ?y \<in> topspace (Euclidean_space n); enorm ?y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) ?x ?y
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>enorm ?x = ?a; ?x \<in> topspace (Euclidean_space n); enorm ?x \<in> T; enorm ?y = ?b; ?y \<in> topspace (Euclidean_space n); enorm ?y \<in> T\<rbrakk> \<Longrightarrow> path_component_of (subtopology (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}) ?x ?y

goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}
[PROOF STEP]
by (simp add: path_connectedin_def path_connected_space_iff_path_component)
[PROOF STATE]
proof (state)
this:
path_connectedin (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> T}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
is_interval ?T \<Longrightarrow> path_connectedin (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> ?T}

goal (6 subgoals):
 1. \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> h ` B r \<subseteq> T
 2. \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> ?d \<subseteq> T
 3. \<Union> (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r))) = h ` B r \<union> ?d
 4. \<And>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<Longrightarrow> T \<noteq> {}
 5. disjoint (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)))
 6. \<nexists>T. path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<subseteq> {T}
[PROOF STEP]
have "h ` S r \<subseteq> topspace ?E"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. h ` S r \<subseteq> topspace (Euclidean_space n)
[PROOF STEP]
by (meson SC cmh compact_imp_compactin_subtopology compactinS compactin_subset_topspace image_compactin)
[PROOF STATE]
proof (state)
this:
h ` S r \<subseteq> topspace (Euclidean_space n)

goal (6 subgoals):
 1. \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> h ` B r \<subseteq> T
 2. \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> ?d \<subseteq> T
 3. \<Union> (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r))) = h ` B r \<union> ?d
 4. \<And>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<Longrightarrow> T \<noteq> {}
 5. disjoint (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)))
 6. \<nexists>T. path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<subseteq> {T}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
h ` S r \<subseteq> topspace (Euclidean_space n)

goal (6 subgoals):
 1. \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> h ` B r \<subseteq> T
 2. \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> ?d \<subseteq> T
 3. \<Union> (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r))) = h ` B r \<union> ?d
 4. \<And>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<Longrightarrow> T \<noteq> {}
 5. disjoint (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)))
 6. \<nexists>T. path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<subseteq> {T}
[PROOF STEP]
have "\<not> compact_space ?E "
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> compact_space (Euclidean_space n)
[PROOF STEP]
by (metis compact_Euclidean_space \<open>n \<noteq> 0\<close>)
[PROOF STATE]
proof (state)
this:
\<not> compact_space (Euclidean_space n)

goal (6 subgoals):
 1. \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> h ` B r \<subseteq> T
 2. \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> ?d \<subseteq> T
 3. \<Union> (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r))) = h ` B r \<union> ?d
 4. \<And>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<Longrightarrow> T \<noteq> {}
 5. disjoint (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)))
 6. \<nexists>T. path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<subseteq> {T}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> compact_space (Euclidean_space n)
[PROOF STEP]
have "\<not> compactin ?E (topspace ?E)"
[PROOF STATE]
proof (prove)
using this:
\<not> compact_space (Euclidean_space n)

goal (1 subgoal):
 1. \<not> compactin (Euclidean_space n) (topspace (Euclidean_space n))
[PROOF STEP]
by (simp add: compact_space_def topspace_Euclidean_space)
[PROOF STATE]
proof (state)
this:
\<not> compactin (Euclidean_space n) (topspace (Euclidean_space n))

goal (6 subgoals):
 1. \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> h ` B r \<subseteq> T
 2. \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> ?d \<subseteq> T
 3. \<Union> (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r))) = h ` B r \<union> ?d
 4. \<And>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<Longrightarrow> T \<noteq> {}
 5. disjoint (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)))
 6. \<nexists>T. path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<subseteq> {T}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> compactin (Euclidean_space n) (topspace (Euclidean_space n))
[PROOF STEP]
have "h ` S r \<noteq> topspace ?E"
[PROOF STATE]
proof (prove)
using this:
\<not> compactin (Euclidean_space n) (topspace (Euclidean_space n))

goal (1 subgoal):
 1. h ` S r \<noteq> topspace (Euclidean_space n)
[PROOF STEP]
using com_hSr
[PROOF STATE]
proof (prove)
using this:
\<not> compactin (Euclidean_space n) (topspace (Euclidean_space n))
compactin (Euclidean_space n) (h ` S r)

goal (1 subgoal):
 1. h ` S r \<noteq> topspace (Euclidean_space n)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
h ` S r \<noteq> topspace (Euclidean_space n)

goal (6 subgoals):
 1. \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> h ` B r \<subseteq> T
 2. \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> ?d \<subseteq> T
 3. \<Union> (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r))) = h ` B r \<union> ?d
 4. \<And>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<Longrightarrow> T \<noteq> {}
 5. disjoint (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)))
 6. \<nexists>T. path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<subseteq> {T}
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
h ` S r \<subseteq> topspace (Euclidean_space n)
h ` S r \<noteq> topspace (Euclidean_space n)
[PROOF STEP]
have top_hSr_ne: "topspace (subtopology ?E (topspace ?E - h ` S r)) \<noteq> {}"
[PROOF STATE]
proof (prove)
using this:
h ` S r \<subseteq> topspace (Euclidean_space n)
h ` S r \<noteq> topspace (Euclidean_space n)

goal (1 subgoal):
 1. topspace (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<noteq> {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
topspace (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<noteq> {}

goal (6 subgoals):
 1. \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> h ` B r \<subseteq> T
 2. \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> ?d \<subseteq> T
 3. \<Union> (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r))) = h ` B r \<union> ?d
 4. \<And>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<Longrightarrow> T \<noteq> {}
 5. disjoint (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)))
 6. \<nexists>T. path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<subseteq> {T}
[PROOF STEP]
show pc1: "\<exists>T. T \<in> path_components_of (subtopology ?E (topspace ?E - h ` S r)) \<and> h ` B r \<subseteq> T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> h ` B r \<subseteq> T
[PROOF STEP]
proof (rule exists_path_component_of_superset [OF _ top_hSr_ne])
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. path_connectedin (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) ?S
 2. \<And>C. \<lbrakk>C \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)); ?S \<subseteq> C\<rbrakk> \<Longrightarrow> \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> h ` B r \<subseteq> T
[PROOF STEP]
have "path_connectedin ?E (h ` B r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) (h ` B r)
[PROOF STEP]
proof (rule path_connectedin_continuous_map_image)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. continuous_map ?X (Euclidean_space n) h
 2. path_connectedin ?X (B r)
[PROOF STEP]
show "continuous_map (subtopology ?E (C r)) ?E h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_map (subtopology (Euclidean_space n) (C r)) (Euclidean_space n) h
[PROOF STEP]
by (simp add: cmh)
[PROOF STATE]
proof (state)
this:
continuous_map (subtopology (Euclidean_space n) (C r)) (Euclidean_space n) h

goal (1 subgoal):
 1. path_connectedin (subtopology (Euclidean_space n) (C r)) (B r)
[PROOF STEP]
have "path_connectedin ?E (B r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) (B r)
[PROOF STEP]
using pc_interval[of "{..<r}"] is_interval_convex_1
[PROOF STATE]
proof (prove)
using this:
is_interval {..<r} \<Longrightarrow> path_connectedin (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> {..<r}}
is_interval ?S = convex ?S

goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) (B r)
[PROOF STEP]
unfolding B_def
[PROOF STATE]
proof (prove)
using this:
is_interval {..<r} \<Longrightarrow> path_connectedin (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> {..<r}}
is_interval ?S = convex ?S

goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x < r}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
path_connectedin (Euclidean_space n) (B r)

goal (1 subgoal):
 1. path_connectedin (subtopology (Euclidean_space n) (C r)) (B r)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
path_connectedin (Euclidean_space n) (B r)
[PROOF STEP]
show "path_connectedin (subtopology ?E (C r)) (B r)"
[PROOF STATE]
proof (prove)
using this:
path_connectedin (Euclidean_space n) (B r)

goal (1 subgoal):
 1. path_connectedin (subtopology (Euclidean_space n) (C r)) (B r)
[PROOF STEP]
by (simp add: path_connectedin_subtopology BC)
[PROOF STATE]
proof (state)
this:
path_connectedin (subtopology (Euclidean_space n) (C r)) (B r)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
path_connectedin (Euclidean_space n) (h ` B r)

goal (2 subgoals):
 1. path_connectedin (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) ?S
 2. \<And>C. \<lbrakk>C \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)); ?S \<subseteq> C\<rbrakk> \<Longrightarrow> \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> h ` B r \<subseteq> T
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
path_connectedin (Euclidean_space n) (h ` B r)

goal (2 subgoals):
 1. path_connectedin (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) ?S
 2. \<And>C. \<lbrakk>C \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)); ?S \<subseteq> C\<rbrakk> \<Longrightarrow> \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> h ` B r \<subseteq> T
[PROOF STEP]
have "h ` B r \<subseteq> topspace ?E - h ` S r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. h ` B r \<subseteq> topspace (Euclidean_space n) - h ` S r
[PROOF STEP]
apply (auto simp: h_if_B)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>xa xb. \<lbrakk>xa \<in> B r; h xa = h xb; xb \<in> S r\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
by (metis BC SC disjSB disjnt_iff inj_onD [OF injh] subsetD)
[PROOF STATE]
proof (state)
this:
h ` B r \<subseteq> topspace (Euclidean_space n) - h ` S r

goal (2 subgoals):
 1. path_connectedin (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) ?S
 2. \<And>C. \<lbrakk>C \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)); ?S \<subseteq> C\<rbrakk> \<Longrightarrow> \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> h ` B r \<subseteq> T
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
path_connectedin (Euclidean_space n) (h ` B r)
h ` B r \<subseteq> topspace (Euclidean_space n) - h ` S r
[PROOF STEP]
show "path_connectedin (subtopology ?E (topspace ?E - h ` S r)) (h ` B r)"
[PROOF STATE]
proof (prove)
using this:
path_connectedin (Euclidean_space n) (h ` B r)
h ` B r \<subseteq> topspace (Euclidean_space n) - h ` S r

goal (1 subgoal):
 1. path_connectedin (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) (h ` B r)
[PROOF STEP]
by (simp add: path_connectedin_subtopology)
[PROOF STATE]
proof (state)
this:
path_connectedin (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) (h ` B r)

goal (1 subgoal):
 1. \<And>C. \<lbrakk>C \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)); h ` B r \<subseteq> C\<rbrakk> \<Longrightarrow> \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> h ` B r \<subseteq> T
[PROOF STEP]
qed metis
[PROOF STATE]
proof (state)
this:
\<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> h ` B r \<subseteq> T

goal (5 subgoals):
 1. \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> ?d \<subseteq> T
 2. \<Union> (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r))) = h ` B r \<union> ?d
 3. \<And>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<Longrightarrow> T \<noteq> {}
 4. disjoint (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)))
 5. \<nexists>T. path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<subseteq> {T}
[PROOF STEP]
show "\<exists>T. T \<in> path_components_of (subtopology ?E (topspace ?E - h ` S r)) \<and> topspace ?E - h ` (C r) \<subseteq> T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> topspace (Euclidean_space n) - h ` C r \<subseteq> T
[PROOF STEP]
proof (rule exists_path_component_of_superset [OF _ top_hSr_ne])
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. path_connectedin (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) ?S
 2. \<And>Ca. \<lbrakk>Ca \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)); ?S \<subseteq> Ca\<rbrakk> \<Longrightarrow> \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> topspace (Euclidean_space n) - h ` C r \<subseteq> T
[PROOF STEP]
have eq: "topspace ?E - {x \<in> topspace ?E. enorm x \<le> r} = {x \<in> topspace ?E. r < enorm x}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. topspace (Euclidean_space n) - {x \<in> topspace (Euclidean_space n). enorm x \<le> r} = {x \<in> topspace (Euclidean_space n). r < enorm x}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
topspace (Euclidean_space n) - {x \<in> topspace (Euclidean_space n). enorm x \<le> r} = {x \<in> topspace (Euclidean_space n). r < enorm x}

goal (2 subgoals):
 1. path_connectedin (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) ?S
 2. \<And>Ca. \<lbrakk>Ca \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)); ?S \<subseteq> Ca\<rbrakk> \<Longrightarrow> \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> topspace (Euclidean_space n) - h ` C r \<subseteq> T
[PROOF STEP]
have "path_connectedin ?E (topspace ?E - C r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) (topspace (Euclidean_space n) - C r)
[PROOF STEP]
using pc_interval[of "{r<..}"] is_interval_convex_1
[PROOF STATE]
proof (prove)
using this:
is_interval {r<..} \<Longrightarrow> path_connectedin (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> {r<..}}
is_interval ?S = convex ?S

goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) (topspace (Euclidean_space n) - C r)
[PROOF STEP]
unfolding C_def eq
[PROOF STATE]
proof (prove)
using this:
is_interval {r<..} \<Longrightarrow> path_connectedin (Euclidean_space n) {x \<in> topspace (Euclidean_space n). enorm x \<in> {r<..}}
is_interval ?S = convex ?S

goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) {x \<in> topspace (Euclidean_space n). r < enorm x}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
path_connectedin (Euclidean_space n) (topspace (Euclidean_space n) - C r)

goal (2 subgoals):
 1. path_connectedin (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) ?S
 2. \<And>Ca. \<lbrakk>Ca \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)); ?S \<subseteq> Ca\<rbrakk> \<Longrightarrow> \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> topspace (Euclidean_space n) - h ` C r \<subseteq> T
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
path_connectedin (Euclidean_space n) (topspace (Euclidean_space n) - C r)
[PROOF STEP]
have "path_connectedin ?E (topspace ?E - h ` C r)"
[PROOF STATE]
proof (prove)
using this:
path_connectedin (Euclidean_space n) (topspace (Euclidean_space n) - C r)

goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) (topspace (Euclidean_space n) - h ` C r)
[PROOF STEP]
by (metis biglemma [OF \<open>n \<noteq> 0\<close> compactinC cmh injh])
[PROOF STATE]
proof (state)
this:
path_connectedin (Euclidean_space n) (topspace (Euclidean_space n) - h ` C r)

goal (2 subgoals):
 1. path_connectedin (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) ?S
 2. \<And>Ca. \<lbrakk>Ca \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)); ?S \<subseteq> Ca\<rbrakk> \<Longrightarrow> \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> topspace (Euclidean_space n) - h ` C r \<subseteq> T
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
path_connectedin (Euclidean_space n) (topspace (Euclidean_space n) - h ` C r)
[PROOF STEP]
show "path_connectedin (subtopology ?E (topspace ?E - h ` S r)) (topspace ?E - h ` C r)"
[PROOF STATE]
proof (prove)
using this:
path_connectedin (Euclidean_space n) (topspace (Euclidean_space n) - h ` C r)

goal (1 subgoal):
 1. path_connectedin (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) (topspace (Euclidean_space n) - h ` C r)
[PROOF STEP]
by (simp add: Diff_mono SC image_mono path_connectedin_subtopology)
[PROOF STATE]
proof (state)
this:
path_connectedin (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) (topspace (Euclidean_space n) - h ` C r)

goal (1 subgoal):
 1. \<And>Ca. \<lbrakk>Ca \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)); topspace (Euclidean_space n) - h ` C r \<subseteq> Ca\<rbrakk> \<Longrightarrow> \<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> topspace (Euclidean_space n) - h ` C r \<subseteq> T
[PROOF STEP]
qed metis
[PROOF STATE]
proof (state)
this:
\<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> topspace (Euclidean_space n) - h ` C r \<subseteq> T

goal (4 subgoals):
 1. \<Union> (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r))) = h ` B r \<union> (topspace (Euclidean_space n) - h ` C r)
 2. \<And>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<Longrightarrow> T \<noteq> {}
 3. disjoint (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)))
 4. \<nexists>T. path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<subseteq> {T}
[PROOF STEP]
have "topspace ?E \<inter> (topspace ?E - h ` S r) = h ` B r \<union> (topspace ?E - h ` C r)"         (is "?lhs = ?rhs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. topspace (Euclidean_space n) \<inter> (topspace (Euclidean_space n) - h ` S r) = h ` B r \<union> (topspace (Euclidean_space n) - h ` C r)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. topspace (Euclidean_space n) \<inter> (topspace (Euclidean_space n) - h ` S r) \<subseteq> h ` B r \<union> (topspace (Euclidean_space n) - h ` C r)
 2. h ` B r \<union> (topspace (Euclidean_space n) - h ` C r) \<subseteq> topspace (Euclidean_space n) \<inter> (topspace (Euclidean_space n) - h ` S r)
[PROOF STEP]
show "?lhs \<subseteq> ?rhs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. topspace (Euclidean_space n) \<inter> (topspace (Euclidean_space n) - h ` S r) \<subseteq> h ` B r \<union> (topspace (Euclidean_space n) - h ` C r)
[PROOF STEP]
using \<open>\<And>r. B r \<union> S r = C r\<close>
[PROOF STATE]
proof (prove)
using this:
B ?r \<union> S ?r = C ?r

goal (1 subgoal):
 1. topspace (Euclidean_space n) \<inter> (topspace (Euclidean_space n) - h ` S r) \<subseteq> h ` B r \<union> (topspace (Euclidean_space n) - h ` C r)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
topspace (Euclidean_space n) \<inter> (topspace (Euclidean_space n) - h ` S r) \<subseteq> h ` B r \<union> (topspace (Euclidean_space n) - h ` C r)

goal (1 subgoal):
 1. h ` B r \<union> (topspace (Euclidean_space n) - h ` C r) \<subseteq> topspace (Euclidean_space n) \<inter> (topspace (Euclidean_space n) - h ` S r)
[PROOF STEP]
have "h ` B r \<inter> h ` S r = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. h ` B r \<inter> h ` S r = {}
[PROOF STEP]
by (metis Diff_triv \<open>\<And>r. B r \<union> S r = C r\<close> \<open>\<And>r. disjnt (S r) (B r)\<close> disjnt_def inf_commute inj_on_Un injh)
[PROOF STATE]
proof (state)
this:
h ` B r \<inter> h ` S r = {}

goal (1 subgoal):
 1. h ` B r \<union> (topspace (Euclidean_space n) - h ` C r) \<subseteq> topspace (Euclidean_space n) \<inter> (topspace (Euclidean_space n) - h ` S r)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
h ` B r \<inter> h ` S r = {}
[PROOF STEP]
show "?rhs \<subseteq> ?lhs"
[PROOF STATE]
proof (prove)
using this:
h ` B r \<inter> h ` S r = {}

goal (1 subgoal):
 1. h ` B r \<union> (topspace (Euclidean_space n) - h ` C r) \<subseteq> topspace (Euclidean_space n) \<inter> (topspace (Euclidean_space n) - h ` S r)
[PROOF STEP]
using path_components_of_subset pc1 \<open>\<And>r. B r \<union> S r = C r\<close>
[PROOF STATE]
proof (prove)
using this:
h ` B r \<inter> h ` S r = {}
?C \<in> path_components_of ?X \<Longrightarrow> ?C \<subseteq> topspace ?X
\<exists>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<and> h ` B r \<subseteq> T
B ?r \<union> S ?r = C ?r

goal (1 subgoal):
 1. h ` B r \<union> (topspace (Euclidean_space n) - h ` C r) \<subseteq> topspace (Euclidean_space n) \<inter> (topspace (Euclidean_space n) - h ` S r)
[PROOF STEP]
by (fastforce simp add: h_if_B)
[PROOF STATE]
proof (state)
this:
h ` B r \<union> (topspace (Euclidean_space n) - h ` C r) \<subseteq> topspace (Euclidean_space n) \<inter> (topspace (Euclidean_space n) - h ` S r)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
topspace (Euclidean_space n) \<inter> (topspace (Euclidean_space n) - h ` S r) = h ` B r \<union> (topspace (Euclidean_space n) - h ` C r)

goal (4 subgoals):
 1. \<Union> (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r))) = h ` B r \<union> (topspace (Euclidean_space n) - h ` C r)
 2. \<And>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<Longrightarrow> T \<noteq> {}
 3. disjoint (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)))
 4. \<nexists>T. path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<subseteq> {T}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
topspace (Euclidean_space n) \<inter> (topspace (Euclidean_space n) - h ` S r) = h ` B r \<union> (topspace (Euclidean_space n) - h ` C r)
[PROOF STEP]
show "\<Union> (path_components_of (subtopology ?E (topspace ?E - h ` S r))) = h ` B r \<union> (topspace ?E - h ` (C r))"
[PROOF STATE]
proof (prove)
using this:
topspace (Euclidean_space n) \<inter> (topspace (Euclidean_space n) - h ` S r) = h ` B r \<union> (topspace (Euclidean_space n) - h ` C r)

goal (1 subgoal):
 1. \<Union> (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r))) = h ` B r \<union> (topspace (Euclidean_space n) - h ` C r)
[PROOF STEP]
by (simp add: Union_path_components_of)
[PROOF STATE]
proof (state)
this:
\<Union> (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r))) = h ` B r \<union> (topspace (Euclidean_space n) - h ` C r)

goal (3 subgoals):
 1. \<And>T. T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<Longrightarrow> T \<noteq> {}
 2. disjoint (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)))
 3. \<nexists>T. path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<subseteq> {T}
[PROOF STEP]
show "T \<noteq> {}"
        if "T \<in> path_components_of (subtopology ?E (topspace ?E - h ` S r))" for T
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. T \<noteq> {}
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r))

goal (1 subgoal):
 1. T \<noteq> {}
[PROOF STEP]
by (simp add: nonempty_path_components_of)
[PROOF STATE]
proof (state)
this:
?T \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<Longrightarrow> ?T \<noteq> {}

goal (2 subgoals):
 1. disjoint (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)))
 2. \<nexists>T. path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<subseteq> {T}
[PROOF STEP]
show "disjoint (path_components_of (subtopology ?E (topspace ?E - h ` S r)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. disjoint (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)))
[PROOF STEP]
by (simp add: pairwise_disjoint_path_components_of)
[PROOF STATE]
proof (state)
this:
disjoint (path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)))

goal (1 subgoal):
 1. \<nexists>T. path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<subseteq> {T}
[PROOF STEP]
have "\<not> path_connectedin ?E (topspace ?E - h ` S r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> path_connectedin (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)
[PROOF STEP]
proof (subst biglemma [OF \<open>n \<noteq> 0\<close> compactinS])
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. continuous_map (subtopology (Euclidean_space n) (S r)) (Euclidean_space n) h
 2. inj_on h (S r)
 3. \<not> path_connectedin (Euclidean_space n) (topspace (Euclidean_space n) - S r)
[PROOF STEP]
show "continuous_map (subtopology ?E (S r)) ?E h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_map (subtopology (Euclidean_space n) (S r)) (Euclidean_space n) h
[PROOF STEP]
by (metis Un_commute Un_upper1 cmh continuous_map_from_subtopology_mono eqC)
[PROOF STATE]
proof (state)
this:
continuous_map (subtopology (Euclidean_space n) (S r)) (Euclidean_space n) h

goal (2 subgoals):
 1. inj_on h (S r)
 2. \<not> path_connectedin (Euclidean_space n) (topspace (Euclidean_space n) - S r)
[PROOF STEP]
show "inj_on h (S r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on h (S r)
[PROOF STEP]
using SC inj_on_subset injh
[PROOF STATE]
proof (prove)
using this:
S ?r \<subseteq> C ?r
\<lbrakk>inj_on ?f ?A; ?B \<subseteq> ?A\<rbrakk> \<Longrightarrow> inj_on ?f ?B
inj_on h (C r)

goal (1 subgoal):
 1. inj_on h (S r)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
inj_on h (S r)

goal (1 subgoal):
 1. \<not> path_connectedin (Euclidean_space n) (topspace (Euclidean_space n) - S r)
[PROOF STEP]
show "\<not> path_connectedin ?E (topspace ?E - S r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> path_connectedin (Euclidean_space n) (topspace (Euclidean_space n) - S r)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) (topspace (Euclidean_space n) - S r) \<Longrightarrow> False
[PROOF STEP]
have "topspace ?E - S r = {x \<in> topspace ?E. enorm x \<noteq> r}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. topspace (Euclidean_space n) - S r = {x \<in> topspace (Euclidean_space n). enorm x \<noteq> r}
[PROOF STEP]
by (auto simp: S_def)
[PROOF STATE]
proof (state)
this:
topspace (Euclidean_space n) - S r = {x \<in> topspace (Euclidean_space n). enorm x \<noteq> r}

goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) (topspace (Euclidean_space n) - S r) \<Longrightarrow> False
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
topspace (Euclidean_space n) - S r = {x \<in> topspace (Euclidean_space n). enorm x \<noteq> r}

goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) (topspace (Euclidean_space n) - S r) \<Longrightarrow> False
[PROOF STEP]
have "enorm ` {x \<in> topspace ?E. enorm x \<noteq> r} = {0..} - {r}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. enorm ` {x \<in> topspace (Euclidean_space n). enorm x \<noteq> r} = {0..} - {r}
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. enorm ` {x \<in> topspace (Euclidean_space n). enorm x \<noteq> r} \<subseteq> {0..} - {r}
 2. {0..} - {r} \<subseteq> enorm ` {x \<in> topspace (Euclidean_space n). enorm x \<noteq> r}
[PROOF STEP]
have "\<exists>x. x \<in> topspace ?E \<and> enorm x \<noteq> r \<and> d = enorm x"
              if "d \<noteq> r" "d \<ge> 0" for d
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<noteq> r \<and> d = enorm x
[PROOF STEP]
proof (intro exI conjI)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. ?x \<in> topspace (Euclidean_space n)
 2. enorm ?x \<noteq> r
 3. d = enorm ?x
[PROOF STEP]
show "(\<lambda>i. if i = 0 then d else 0) \<in> topspace ?E"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i. if i = 0 then d else 0) \<in> topspace (Euclidean_space n)
[PROOF STEP]
using \<open>n \<noteq> 0\<close>
[PROOF STATE]
proof (prove)
using this:
n \<noteq> 0

goal (1 subgoal):
 1. (\<lambda>i. if i = 0 then d else 0) \<in> topspace (Euclidean_space n)
[PROOF STEP]
by (auto simp: Euclidean_space_def)
[PROOF STATE]
proof (state)
this:
(\<lambda>i. if i = 0 then d else 0) \<in> topspace (Euclidean_space n)

goal (2 subgoals):
 1. enorm (\<lambda>i. if i = 0 then d else 0) \<noteq> r
 2. d = enorm (\<lambda>i. if i = 0 then d else 0)
[PROOF STEP]
show "enorm (\<lambda>i. if i = 0 then d else 0) \<noteq> r"  "d = enorm (\<lambda>i. if i = 0 then d else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. enorm (\<lambda>i. if i = 0 then d else 0) \<noteq> r &&& d = enorm (\<lambda>i. if i = 0 then d else 0)
[PROOF STEP]
using \<open>n \<noteq> 0\<close> that
[PROOF STATE]
proof (prove)
using this:
n \<noteq> 0
d \<noteq> r
0 \<le> d

goal (1 subgoal):
 1. enorm (\<lambda>i. if i = 0 then d else 0) \<noteq> r &&& d = enorm (\<lambda>i. if i = 0 then d else 0)
[PROOF STEP]
by simp_all
[PROOF STATE]
proof (state)
this:
enorm (\<lambda>i. if i = 0 then d else 0) \<noteq> r
d = enorm (\<lambda>i. if i = 0 then d else 0)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>?d \<noteq> r; 0 \<le> ?d\<rbrakk> \<Longrightarrow> \<exists>x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<noteq> r \<and> ?d = enorm x

goal (2 subgoals):
 1. enorm ` {x \<in> topspace (Euclidean_space n). enorm x \<noteq> r} \<subseteq> {0..} - {r}
 2. {0..} - {r} \<subseteq> enorm ` {x \<in> topspace (Euclidean_space n). enorm x \<noteq> r}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?d \<noteq> r; 0 \<le> ?d\<rbrakk> \<Longrightarrow> \<exists>x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<noteq> r \<and> ?d = enorm x
[PROOF STEP]
show "{0..} - {r} \<subseteq> enorm ` {x \<in> topspace ?E. enorm x \<noteq> r}"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?d \<noteq> r; 0 \<le> ?d\<rbrakk> \<Longrightarrow> \<exists>x. x \<in> topspace (Euclidean_space n) \<and> enorm x \<noteq> r \<and> ?d = enorm x

goal (1 subgoal):
 1. {0..} - {r} \<subseteq> enorm ` {x \<in> topspace (Euclidean_space n). enorm x \<noteq> r}
[PROOF STEP]
by (auto simp: image_def)
[PROOF STATE]
proof (state)
this:
{0..} - {r} \<subseteq> enorm ` {x \<in> topspace (Euclidean_space n). enorm x \<noteq> r}

goal (1 subgoal):
 1. enorm ` {x \<in> topspace (Euclidean_space n). enorm x \<noteq> r} \<subseteq> {0..} - {r}
[PROOF STEP]
qed (auto simp: enorm_ge0)
[PROOF STATE]
proof (state)
this:
enorm ` {x \<in> topspace (Euclidean_space n). enorm x \<noteq> r} = {0..} - {r}

goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) (topspace (Euclidean_space n) - S r) \<Longrightarrow> False
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
topspace (Euclidean_space n) - S r = {x \<in> topspace (Euclidean_space n). enorm x \<noteq> r}
enorm ` {x \<in> topspace (Euclidean_space n). enorm x \<noteq> r} = {0..} - {r}
[PROOF STEP]
have non_r: "enorm ` (topspace ?E - S r) = {0..} - {r}"
[PROOF STATE]
proof (prove)
using this:
topspace (Euclidean_space n) - S r = {x \<in> topspace (Euclidean_space n). enorm x \<noteq> r}
enorm ` {x \<in> topspace (Euclidean_space n). enorm x \<noteq> r} = {0..} - {r}

goal (1 subgoal):
 1. enorm ` (topspace (Euclidean_space n) - S r) = {0..} - {r}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
enorm ` (topspace (Euclidean_space n) - S r) = {0..} - {r}

goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) (topspace (Euclidean_space n) - S r) \<Longrightarrow> False
[PROOF STEP]
have "\<exists>x\<ge>0. x \<noteq> r \<and> r \<le> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x\<ge>0. x \<noteq> r \<and> r \<le> x
[PROOF STEP]
by (metis gt_ex le_cases not_le order_trans)
[PROOF STATE]
proof (state)
this:
\<exists>x\<ge>0. x \<noteq> r \<and> r \<le> x

goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) (topspace (Euclidean_space n) - S r) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>x\<ge>0. x \<noteq> r \<and> r \<le> x
[PROOF STEP]
have "\<not> is_interval ({0..} - {r})"
[PROOF STATE]
proof (prove)
using this:
\<exists>x\<ge>0. x \<noteq> r \<and> r \<le> x

goal (1 subgoal):
 1. \<not> is_interval ({0..} - {r})
[PROOF STEP]
unfolding is_interval_1
[PROOF STATE]
proof (prove)
using this:
\<exists>x\<ge>0. x \<noteq> r \<and> r \<le> x

goal (1 subgoal):
 1. \<not> (\<forall>a\<in>{0..} - {r}. \<forall>b\<in>{0..} - {r}. \<forall>x. a \<le> x \<and> x \<le> b \<longrightarrow> x \<in> {0..} - {r})
[PROOF STEP]
using  \<open>r > 0\<close>
[PROOF STATE]
proof (prove)
using this:
\<exists>x\<ge>0. x \<noteq> r \<and> r \<le> x
0 < r

goal (1 subgoal):
 1. \<not> (\<forall>a\<in>{0..} - {r}. \<forall>b\<in>{0..} - {r}. \<forall>x. a \<le> x \<and> x \<le> b \<longrightarrow> x \<in> {0..} - {r})
[PROOF STEP]
by (auto simp: Bex_def)
[PROOF STATE]
proof (state)
this:
\<not> is_interval ({0..} - {r})

goal (1 subgoal):
 1. path_connectedin (Euclidean_space n) (topspace (Euclidean_space n) - S r) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> is_interval ({0..} - {r})
[PROOF STEP]
show False
            if "path_connectedin ?E (topspace ?E - S r)"
[PROOF STATE]
proof (prove)
using this:
\<not> is_interval ({0..} - {r})

goal (1 subgoal):
 1. False
[PROOF STEP]
using path_connectedin_continuous_map_image [OF cm_enorm that]
[PROOF STATE]
proof (prove)
using this:
\<not> is_interval ({0..} - {r})
path_connectedin euclideanreal (enorm ` (topspace (Euclidean_space n) - S r))

goal (1 subgoal):
 1. False
[PROOF STEP]
by (simp add: is_interval_path_connected_1 non_r)
[PROOF STATE]
proof (state)
this:
path_connectedin (Euclidean_space n) (topspace (Euclidean_space n) - S r) \<Longrightarrow> False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<not> path_connectedin (Euclidean_space n) (topspace (Euclidean_space n) - S r)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<not> path_connectedin (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)

goal (1 subgoal):
 1. \<nexists>T. path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<subseteq> {T}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> path_connectedin (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)
[PROOF STEP]
have "\<not> path_connected_space (subtopology ?E (topspace ?E - h ` S r))"
[PROOF STATE]
proof (prove)
using this:
\<not> path_connectedin (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)

goal (1 subgoal):
 1. \<not> path_connected_space (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r))
[PROOF STEP]
by (simp add: path_connectedin_def)
[PROOF STATE]
proof (state)
this:
\<not> path_connected_space (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r))

goal (1 subgoal):
 1. \<nexists>T. path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<subseteq> {T}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> path_connected_space (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r))
[PROOF STEP]
show "\<nexists>T. path_components_of (subtopology ?E (topspace ?E - h ` S r)) \<subseteq> {T}"
[PROOF STATE]
proof (prove)
using this:
\<not> path_connected_space (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r))

goal (1 subgoal):
 1. \<nexists>T. path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<subseteq> {T}
[PROOF STEP]
by (simp add: path_components_of_subset_singleton)
[PROOF STATE]
proof (state)
this:
\<nexists>T. path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<subseteq> {T}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
h ` B r \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r))

goal (1 subgoal):
 1. 2 \<le> n \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
h ` B r \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r))

goal (1 subgoal):
 1. 2 \<le> n \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
have "openin ?E A"
      if "A \<in> path_components_of (subtopology ?E (topspace ?E - h ` (S r)))" for A
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. openin (Euclidean_space n) A
[PROOF STEP]
using locally_path_connected_Euclidean_space [of n] that ope_comp_hSr
[PROOF STATE]
proof (prove)
using this:
locally_path_connected_space (Euclidean_space n)
A \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r))
openin (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)

goal (1 subgoal):
 1. openin (Euclidean_space n) A
[PROOF STEP]
by (simp add: locally_path_connected_space_open_path_components)
[PROOF STATE]
proof (state)
this:
?A \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<Longrightarrow> openin (Euclidean_space n) ?A

goal (1 subgoal):
 1. 2 \<le> n \<Longrightarrow> openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
h ` B r \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r))
?A \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<Longrightarrow> openin (Euclidean_space n) ?A
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
h ` B r \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r))
?A \<in> path_components_of (subtopology (Euclidean_space n) (topspace (Euclidean_space n) - h ` S r)) \<Longrightarrow> openin (Euclidean_space n) ?A

goal (1 subgoal):
 1. openin (Euclidean_space n) (h ` B r)
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
openin (Euclidean_space n) (h ` B r)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>0 < ?r; continuous_map (subtopology (Euclidean_space n) (C ?r)) (Euclidean_space n) ?h; inj_on ?h (C ?r)\<rbrakk> \<Longrightarrow> openin (Euclidean_space n) (?h ` B ?r)

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> openin (Euclidean_space n) (f ` U)
[PROOF STEP]
have "\<exists>T. openin ?E T \<and> f x \<in> T \<and> T \<subseteq> f ` U"
    if "x \<in> U" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>T. openin (Euclidean_space n) T \<and> f x \<in> T \<and> T \<subseteq> f ` U
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>T. openin (Euclidean_space n) T \<and> f x \<in> T \<and> T \<subseteq> f ` U
[PROOF STEP]
have x: "x \<in> topspace ?E"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> topspace (Euclidean_space n)
[PROOF STEP]
by (meson U in_mono openin_subset that)
[PROOF STATE]
proof (state)
this:
x \<in> topspace (Euclidean_space n)

goal (1 subgoal):
 1. \<exists>T. openin (Euclidean_space n) T \<and> f x \<in> T \<and> T \<subseteq> f ` U
[PROOF STEP]
obtain V where V: "openin (powertop_real UNIV) V" and Ueq: "U = V \<inter> {x. \<forall>i\<ge>n. x i = 0}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>V. \<lbrakk>openin (powertop_real UNIV) V; U = V \<inter> {x. \<forall>i\<ge>n. x i = 0}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using U
[PROOF STATE]
proof (prove)
using this:
openin (Euclidean_space n) U

goal (1 subgoal):
 1. (\<And>V. \<lbrakk>openin (powertop_real UNIV) V; U = V \<inter> {x. \<forall>i\<ge>n. x i = 0}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: openin_subtopology Euclidean_space_def)
[PROOF STATE]
proof (state)
this:
openin (powertop_real UNIV) V
U = V \<inter> {x. \<forall>i\<ge>n. x i = 0}

goal (1 subgoal):
 1. \<exists>T. openin (Euclidean_space n) T \<and> f x \<in> T \<and> T \<subseteq> f ` U
[PROOF STEP]
with \<open>x \<in> U\<close>
[PROOF STATE]
proof (chain)
picking this:
x \<in> U
openin (powertop_real UNIV) V
U = V \<inter> {x. \<forall>i\<ge>n. x i = 0}
[PROOF STEP]
have "x \<in> V"
[PROOF STATE]
proof (prove)
using this:
x \<in> U
openin (powertop_real UNIV) V
U = V \<inter> {x. \<forall>i\<ge>n. x i = 0}

goal (1 subgoal):
 1. x \<in> V
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<in> V

goal (1 subgoal):
 1. \<exists>T. openin (Euclidean_space n) T \<and> f x \<in> T \<and> T \<subseteq> f ` U
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> V
[PROOF STEP]
obtain T where Tfin: "finite {i. T i \<noteq> UNIV}" and Topen: "\<And>i. open (T i)"
      and Tx: "x \<in> Pi\<^sub>E UNIV T" and TV: "Pi\<^sub>E UNIV T \<subseteq> V"
[PROOF STATE]
proof (prove)
using this:
x \<in> V

goal (1 subgoal):
 1. (\<And>T. \<lbrakk>finite {i. T i \<noteq> UNIV}; \<And>i. open (T i); x \<in> Pi\<^sub>E UNIV T; Pi\<^sub>E UNIV T \<subseteq> V\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using V
[PROOF STATE]
proof (prove)
using this:
x \<in> V
openin (powertop_real UNIV) V

goal (1 subgoal):
 1. (\<And>T. \<lbrakk>finite {i. T i \<noteq> UNIV}; \<And>i. open (T i); x \<in> Pi\<^sub>E UNIV T; Pi\<^sub>E UNIV T \<subseteq> V\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (force simp: openin_product_topology_alt)
[PROOF STATE]
proof (state)
this:
finite {i. T i \<noteq> UNIV}
open (T ?i)
x \<in> Pi\<^sub>E UNIV T
Pi\<^sub>E UNIV T \<subseteq> V

goal (1 subgoal):
 1. \<exists>T. openin (Euclidean_space n) T \<and> f x \<in> T \<and> T \<subseteq> f ` U
[PROOF STEP]
have "\<exists>e>0. \<forall>x'. \<bar>x' - x i\<bar> < e \<longrightarrow> x' \<in> T i" for i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>e>0. \<forall>x'. \<bar>x' - x i\<bar> < e \<longrightarrow> x' \<in> T i
[PROOF STEP]
using Topen [of i] Tx
[PROOF STATE]
proof (prove)
using this:
open (T i)
x \<in> Pi\<^sub>E UNIV T

goal (1 subgoal):
 1. \<exists>e>0. \<forall>x'. \<bar>x' - x i\<bar> < e \<longrightarrow> x' \<in> T i
[PROOF STEP]
by (auto simp: open_real)
[PROOF STATE]
proof (state)
this:
\<exists>e>0. \<forall>x'. \<bar>x' - x ?i\<bar> < e \<longrightarrow> x' \<in> T ?i

goal (1 subgoal):
 1. \<exists>T. openin (Euclidean_space n) T \<and> f x \<in> T \<and> T \<subseteq> f ` U
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>e>0. \<forall>x'. \<bar>x' - x ?i\<bar> < e \<longrightarrow> x' \<in> T ?i
[PROOF STEP]
obtain \<beta> where B0: "\<And>i. \<beta> i > 0" and BT: "\<And>i x'. \<bar>x' - x i\<bar> < \<beta> i \<Longrightarrow> x' \<in> T i"
[PROOF STATE]
proof (prove)
using this:
\<exists>e>0. \<forall>x'. \<bar>x' - x ?i\<bar> < e \<longrightarrow> x' \<in> T ?i

goal (1 subgoal):
 1. (\<And>\<beta>. \<lbrakk>\<And>i. 0 < \<beta> i; \<And>i x'. \<bar>x' - x i\<bar> < \<beta> i \<Longrightarrow> x' \<in> T i\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
0 < \<beta> ?i
\<bar>?x' - x ?i\<bar> < \<beta> ?i \<Longrightarrow> ?x' \<in> T ?i

goal (1 subgoal):
 1. \<exists>T. openin (Euclidean_space n) T \<and> f x \<in> T \<and> T \<subseteq> f ` U
[PROOF STEP]
define r where "r \<equiv> Min (insert 1 (\<beta> ` {i. T i \<noteq> UNIV}))"
[PROOF STATE]
proof (state)
this:
r \<equiv> Min (insert 1 (\<beta> ` {i. T i \<noteq> UNIV}))

goal (1 subgoal):
 1. \<exists>T. openin (Euclidean_space n) T \<and> f x \<in> T \<and> T \<subseteq> f ` U
[PROOF STEP]
have "r > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < r
[PROOF STEP]
by (simp add: B0 Tfin r_def)
[PROOF STATE]
proof (state)
this:
0 < r

goal (1 subgoal):
 1. \<exists>T. openin (Euclidean_space n) T \<and> f x \<in> T \<and> T \<subseteq> f ` U
[PROOF STEP]
have inU: "y \<in> U"
      if y: "y \<in> topspace ?E" and yxr: "\<And>i. i<n \<Longrightarrow> \<bar>y i - x i\<bar> < r" for y
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y \<in> U
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. y \<in> U
[PROOF STEP]
have "y i \<in> T i" for i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y i \<in> T i
[PROOF STEP]
proof (cases "T i = UNIV")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. T i = UNIV \<Longrightarrow> y i \<in> T i
 2. T i \<noteq> UNIV \<Longrightarrow> y i \<in> T i
[PROOF STEP]
show "y i \<in> T i" if "T i \<noteq> UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y i \<in> T i
[PROOF STEP]
proof (cases "i < n")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. i < n \<Longrightarrow> y i \<in> T i
 2. \<not> i < n \<Longrightarrow> y i \<in> T i
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
i < n

goal (2 subgoals):
 1. i < n \<Longrightarrow> y i \<in> T i
 2. \<not> i < n \<Longrightarrow> y i \<in> T i
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
i < n
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
i < n

goal (1 subgoal):
 1. y i \<in> T i
[PROOF STEP]
using yxr [OF True] that
[PROOF STATE]
proof (prove)
using this:
i < n
\<bar>y i - x i\<bar> < r
T i \<noteq> UNIV

goal (1 subgoal):
 1. y i \<in> T i
[PROOF STEP]
by (simp add: r_def BT Tfin)
[PROOF STATE]
proof (state)
this:
y i \<in> T i

goal (1 subgoal):
 1. \<not> i < n \<Longrightarrow> y i \<in> T i
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> i < n \<Longrightarrow> y i \<in> T i
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> i < n

goal (1 subgoal):
 1. \<not> i < n \<Longrightarrow> y i \<in> T i
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> i < n
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<not> i < n

goal (1 subgoal):
 1. y i \<in> T i
[PROOF STEP]
using B0 Ueq \<open>x \<in> U\<close> topspace_Euclidean_space y
[PROOF STATE]
proof (prove)
using this:
\<not> i < n
0 < \<beta> ?i
U = V \<inter> {x. \<forall>i\<ge>n. x i = 0}
x \<in> U
topspace (Euclidean_space ?n) = {x. \<forall>i\<ge>?n. x i = 0}
y \<in> topspace (Euclidean_space n)

goal (1 subgoal):
 1. y i \<in> T i
[PROOF STEP]
by (force intro: BT)
[PROOF STATE]
proof (state)
this:
y i \<in> T i

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
T i \<noteq> UNIV \<Longrightarrow> y i \<in> T i

goal (1 subgoal):
 1. T i = UNIV \<Longrightarrow> y i \<in> T i
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
y ?i \<in> T ?i

goal (1 subgoal):
 1. y \<in> U
[PROOF STEP]
with TV
[PROOF STATE]
proof (chain)
picking this:
Pi\<^sub>E UNIV T \<subseteq> V
y ?i \<in> T ?i
[PROOF STEP]
have "y \<in> V"
[PROOF STATE]
proof (prove)
using this:
Pi\<^sub>E UNIV T \<subseteq> V
y ?i \<in> T ?i

goal (1 subgoal):
 1. y \<in> V
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
y \<in> V

goal (1 subgoal):
 1. y \<in> U
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
y \<in> V
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
y \<in> V

goal (1 subgoal):
 1. y \<in> U
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
y \<in> V
y \<in> topspace (Euclidean_space n)
?i < n \<Longrightarrow> \<bar>y ?i - x ?i\<bar> < r

goal (1 subgoal):
 1. y \<in> U
[PROOF STEP]
by (auto simp: Ueq topspace_Euclidean_space)
[PROOF STATE]
proof (state)
this:
y \<in> U

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>?y \<in> topspace (Euclidean_space n); \<And>i. i < n \<Longrightarrow> \<bar>?y i - x i\<bar> < r\<rbrakk> \<Longrightarrow> ?y \<in> U

goal (1 subgoal):
 1. \<exists>T. openin (Euclidean_space n) T \<and> f x \<in> T \<and> T \<subseteq> f ` U
[PROOF STEP]
have xinU: "(\<lambda>i. x i + y i) \<in> U" if "y \<in> C(r/2)" for y
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i. x i + y i) \<in> U
[PROOF STEP]
proof (rule inU)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<lambda>i. x i + y i) \<in> topspace (Euclidean_space n)
 2. \<And>i. i < n \<Longrightarrow> \<bar>x i + y i - x i\<bar> < r
[PROOF STEP]
have y: "y \<in> topspace ?E"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y \<in> topspace (Euclidean_space n)
[PROOF STEP]
using C_def that
[PROOF STATE]
proof (prove)
using this:
C \<equiv> \<lambda>r. {x \<in> topspace (Euclidean_space n). enorm x \<le> r}
y \<in> C (r / 2)

goal (1 subgoal):
 1. y \<in> topspace (Euclidean_space n)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
y \<in> topspace (Euclidean_space n)

goal (2 subgoals):
 1. (\<lambda>i. x i + y i) \<in> topspace (Euclidean_space n)
 2. \<And>i. i < n \<Longrightarrow> \<bar>x i + y i - x i\<bar> < r
[PROOF STEP]
show "(\<lambda>i. x i + y i) \<in> topspace ?E"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i. x i + y i) \<in> topspace (Euclidean_space n)
[PROOF STEP]
using x y
[PROOF STATE]
proof (prove)
using this:
x \<in> topspace (Euclidean_space n)
y \<in> topspace (Euclidean_space n)

goal (1 subgoal):
 1. (\<lambda>i. x i + y i) \<in> topspace (Euclidean_space n)
[PROOF STEP]
by (simp add: topspace_Euclidean_space)
[PROOF STATE]
proof (state)
this:
(\<lambda>i. x i + y i) \<in> topspace (Euclidean_space n)

goal (1 subgoal):
 1. \<And>i. i < n \<Longrightarrow> \<bar>x i + y i - x i\<bar> < r
[PROOF STEP]
have "enorm y \<le> r/2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. enorm y \<le> r / 2
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
y \<in> C (r / 2)

goal (1 subgoal):
 1. enorm y \<le> r / 2
[PROOF STEP]
by (simp add: C_def)
[PROOF STATE]
proof (state)
this:
enorm y \<le> r / 2

goal (1 subgoal):
 1. \<And>i. i < n \<Longrightarrow> \<bar>x i + y i - x i\<bar> < r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
enorm y \<le> r / 2
[PROOF STEP]
show "\<bar>x i + y i - x i\<bar> < r" if "i < n" for i
[PROOF STATE]
proof (prove)
using this:
enorm y \<le> r / 2

goal (1 subgoal):
 1. \<bar>x i + y i - x i\<bar> < r
[PROOF STEP]
using le_enorm enorm_ge0 that \<open>0 < r\<close> leI order_trans
[PROOF STATE]
proof (prove)
using this:
enorm y \<le> r / 2
?i < n \<Longrightarrow> \<bar>?x ?i\<bar> \<le> enorm ?x
0 \<le> enorm ?x
i < n
0 < r
\<not> ?x < ?y \<Longrightarrow> ?y \<le> ?x
\<lbrakk>?x \<le> ?y; ?y \<le> ?z\<rbrakk> \<Longrightarrow> ?x \<le> ?z

goal (1 subgoal):
 1. \<bar>x i + y i - x i\<bar> < r
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
?i < n \<Longrightarrow> \<bar>x ?i + y ?i - x ?i\<bar> < r

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?y \<in> C (r / 2) \<Longrightarrow> (\<lambda>i. x i + ?y i) \<in> U

goal (1 subgoal):
 1. \<exists>T. openin (Euclidean_space n) T \<and> f x \<in> T \<and> T \<subseteq> f ` U
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>T. openin (Euclidean_space n) T \<and> f x \<in> T \<and> T \<subseteq> f ` U
[PROOF STEP]
proof (intro exI conjI)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. openin (Euclidean_space n) ?T
 2. f x \<in> ?T
 3. ?T \<subseteq> f ` U
[PROOF STEP]
show "openin ?E ((f \<circ> (\<lambda>y i. x i + y i)) ` B (r/2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. openin (Euclidean_space n) ((f \<circ> (\<lambda>y i. x i + y i)) ` B (r / 2))
[PROOF STEP]
proof (rule **)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. 0 < r / 2
 2. continuous_map (subtopology (Euclidean_space n) (C (r / 2))) (Euclidean_space n) (f \<circ> (\<lambda>y i. x i + y i))
 3. inj_on (f \<circ> (\<lambda>y i. x i + y i)) (C (r / 2))
[PROOF STEP]
have "continuous_map (subtopology ?E (C(r/2))) (subtopology ?E U) (\<lambda>y i. x i + y i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_map (subtopology (Euclidean_space n) (C (r / 2))) (subtopology (Euclidean_space n) U) (\<lambda>y i. x i + y i)
[PROOF STEP]
by (auto simp: xinU continuous_map_in_subtopology
              intro!: continuous_intros continuous_map_Euclidean_space_add x)
[PROOF STATE]
proof (state)
this:
continuous_map (subtopology (Euclidean_space n) (C (r / 2))) (subtopology (Euclidean_space n) U) (\<lambda>y i. x i + y i)

goal (3 subgoals):
 1. 0 < r / 2
 2. continuous_map (subtopology (Euclidean_space n) (C (r / 2))) (Euclidean_space n) (f \<circ> (\<lambda>y i. x i + y i))
 3. inj_on (f \<circ> (\<lambda>y i. x i + y i)) (C (r / 2))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
continuous_map (subtopology (Euclidean_space n) (C (r / 2))) (subtopology (Euclidean_space n) U) (\<lambda>y i. x i + y i)
[PROOF STEP]
show "continuous_map (subtopology ?E (C(r/2))) ?E (f \<circ> (\<lambda>y i. x i + y i))"
[PROOF STATE]
proof (prove)
using this:
continuous_map (subtopology (Euclidean_space n) (C (r / 2))) (subtopology (Euclidean_space n) U) (\<lambda>y i. x i + y i)

goal (1 subgoal):
 1. continuous_map (subtopology (Euclidean_space n) (C (r / 2))) (Euclidean_space n) (f \<circ> (\<lambda>y i. x i + y i))
[PROOF STEP]
by (rule continuous_map_compose) (simp add: cmf)
[PROOF STATE]
proof (state)
this:
continuous_map (subtopology (Euclidean_space n) (C (r / 2))) (Euclidean_space n) (f \<circ> (\<lambda>y i. x i + y i))

goal (2 subgoals):
 1. 0 < r / 2
 2. inj_on (f \<circ> (\<lambda>y i. x i + y i)) (C (r / 2))
[PROOF STEP]
show "inj_on (f \<circ> (\<lambda>y i. x i + y i)) (C(r/2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on (f \<circ> (\<lambda>y i. x i + y i)) (C (r / 2))
[PROOF STEP]
proof (clarsimp simp add: inj_on_def C_def topspace_Euclidean_space simp del: divide_const_simps)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>xa y. \<lbrakk>\<forall>i\<ge>n. xa i = 0; enorm xa \<le> r / 2; \<forall>i\<ge>n. y i = 0; enorm y \<le> r / 2; f (\<lambda>i. x i + xa i) = f (\<lambda>i. x i + y i)\<rbrakk> \<Longrightarrow> xa = y
[PROOF STEP]
show "y' = y"
            if ey: "enorm y \<le> r / 2" and ey': "enorm y' \<le> r / 2"
              and y0: "\<forall>i\<ge>n. y i = 0" and y'0: "\<forall>i\<ge>n. y' i = 0"
              and feq: "f (\<lambda>i. x i + y' i) = f (\<lambda>i. x i + y i)"
            for y' y :: "nat \<Rightarrow> real"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y' = y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. y' = y
[PROOF STEP]
have "(\<lambda>i. x i + y i) \<in> U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i. x i + y i) \<in> U
[PROOF STEP]
proof (rule inU)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<lambda>i. x i + y i) \<in> topspace (Euclidean_space n)
 2. \<And>i. i < n \<Longrightarrow> \<bar>x i + y i - x i\<bar> < r
[PROOF STEP]
show "(\<lambda>i. x i + y i) \<in> topspace ?E"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i. x i + y i) \<in> topspace (Euclidean_space n)
[PROOF STEP]
using topspace_Euclidean_space x y0
[PROOF STATE]
proof (prove)
using this:
topspace (Euclidean_space ?n) = {x. \<forall>i\<ge>?n. x i = 0}
x \<in> topspace (Euclidean_space n)
\<forall>i\<ge>n. y i = 0

goal (1 subgoal):
 1. (\<lambda>i. x i + y i) \<in> topspace (Euclidean_space n)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<lambda>i. x i + y i) \<in> topspace (Euclidean_space n)

goal (1 subgoal):
 1. \<And>i. i < n \<Longrightarrow> \<bar>x i + y i - x i\<bar> < r
[PROOF STEP]
show "\<bar>x i + y i - x i\<bar> < r" if "i < n" for i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>x i + y i - x i\<bar> < r
[PROOF STEP]
using ey le_enorm [of _ y] \<open>r > 0\<close> that
[PROOF STATE]
proof (prove)
using this:
enorm y \<le> r / 2
?i < n \<Longrightarrow> \<bar>y ?i\<bar> \<le> enorm y
0 < r
i < n

goal (1 subgoal):
 1. \<bar>x i + y i - x i\<bar> < r
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
?i < n \<Longrightarrow> \<bar>x ?i + y ?i - x ?i\<bar> < r

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>i. x i + y i) \<in> U

goal (1 subgoal):
 1. y' = y
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(\<lambda>i. x i + y i) \<in> U

goal (1 subgoal):
 1. y' = y
[PROOF STEP]
have "(\<lambda>i. x i + y' i) \<in> U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i. x i + y' i) \<in> U
[PROOF STEP]
proof (rule inU)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<lambda>i. x i + y' i) \<in> topspace (Euclidean_space n)
 2. \<And>i. i < n \<Longrightarrow> \<bar>x i + y' i - x i\<bar> < r
[PROOF STEP]
show "(\<lambda>i. x i + y' i) \<in> topspace ?E"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i. x i + y' i) \<in> topspace (Euclidean_space n)
[PROOF STEP]
using topspace_Euclidean_space x y'0
[PROOF STATE]
proof (prove)
using this:
topspace (Euclidean_space ?n) = {x. \<forall>i\<ge>?n. x i = 0}
x \<in> topspace (Euclidean_space n)
\<forall>i\<ge>n. y' i = 0

goal (1 subgoal):
 1. (\<lambda>i. x i + y' i) \<in> topspace (Euclidean_space n)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<lambda>i. x i + y' i) \<in> topspace (Euclidean_space n)

goal (1 subgoal):
 1. \<And>i. i < n \<Longrightarrow> \<bar>x i + y' i - x i\<bar> < r
[PROOF STEP]
show "\<bar>x i + y' i - x i\<bar> < r" if "i < n" for i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>x i + y' i - x i\<bar> < r
[PROOF STEP]
using ey' le_enorm [of _ y'] \<open>r > 0\<close> that
[PROOF STATE]
proof (prove)
using this:
enorm y' \<le> r / 2
?i < n \<Longrightarrow> \<bar>y' ?i\<bar> \<le> enorm y'
0 < r
i < n

goal (1 subgoal):
 1. \<bar>x i + y' i - x i\<bar> < r
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
?i < n \<Longrightarrow> \<bar>x ?i + y' ?i - x ?i\<bar> < r

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>i. x i + y' i) \<in> U

goal (1 subgoal):
 1. y' = y
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>i. x i + y i) \<in> U
(\<lambda>i. x i + y' i) \<in> U
[PROOF STEP]
have "(\<lambda>i. x i + y' i) = (\<lambda>i. x i + y i)"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>i. x i + y i) \<in> U
(\<lambda>i. x i + y' i) \<in> U

goal (1 subgoal):
 1. (\<lambda>i. x i + y' i) = (\<lambda>i. x i + y i)
[PROOF STEP]
using feq
[PROOF STATE]
proof (prove)
using this:
(\<lambda>i. x i + y i) \<in> U
(\<lambda>i. x i + y' i) \<in> U
f (\<lambda>i. x i + y' i) = f (\<lambda>i. x i + y i)

goal (1 subgoal):
 1. (\<lambda>i. x i + y' i) = (\<lambda>i. x i + y i)
[PROOF STEP]
by (meson \<open>inj_on f U\<close> inj_on_def)
[PROOF STATE]
proof (state)
this:
(\<lambda>i. x i + y' i) = (\<lambda>i. x i + y i)

goal (1 subgoal):
 1. y' = y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>i. x i + y' i) = (\<lambda>i. x i + y i)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>i. x i + y' i) = (\<lambda>i. x i + y i)

goal (1 subgoal):
 1. y' = y
[PROOF STEP]
by (auto simp: fun_eq_iff)
[PROOF STATE]
proof (state)
this:
y' = y

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>enorm ?y \<le> r / 2; enorm ?y' \<le> r / 2; \<forall>i\<ge>n. ?y i = 0; \<forall>i\<ge>n. ?y' i = 0; f (\<lambda>i. x i + ?y' i) = f (\<lambda>i. x i + ?y i)\<rbrakk> \<Longrightarrow> ?y' = ?y

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
inj_on (f \<circ> (\<lambda>y i. x i + y i)) (C (r / 2))

goal (1 subgoal):
 1. 0 < r / 2
[PROOF STEP]
qed (simp add: \<open>0 < r\<close>)
[PROOF STATE]
proof (state)
this:
openin (Euclidean_space n) ((f \<circ> (\<lambda>y i. x i + y i)) ` B (r / 2))

goal (2 subgoals):
 1. f x \<in> (f \<circ> (\<lambda>y i. x i + y i)) ` B (r / 2)
 2. (f \<circ> (\<lambda>y i. x i + y i)) ` B (r / 2) \<subseteq> f ` U
[PROOF STEP]
have "x \<in> (\<lambda>y i. x i + y i) ` B (r / 2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> (\<lambda>y i. x i + y i) ` B (r / 2)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x = (\<lambda>i. x i + ?x i)
 2. ?x \<in> B (r / 2)
[PROOF STEP]
show "x = (\<lambda>i. x i + zero i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x = (\<lambda>i. x i + zero i)
[PROOF STEP]
by (simp add: zero_def)
[PROOF STATE]
proof (state)
this:
x = (\<lambda>i. x i + zero i)

goal (1 subgoal):
 1. zero \<in> B (r / 2)
[PROOF STEP]
qed (auto simp: B_def \<open>r > 0\<close>)
[PROOF STATE]
proof (state)
this:
x \<in> (\<lambda>y i. x i + y i) ` B (r / 2)

goal (2 subgoals):
 1. f x \<in> (f \<circ> (\<lambda>y i. x i + y i)) ` B (r / 2)
 2. (f \<circ> (\<lambda>y i. x i + y i)) ` B (r / 2) \<subseteq> f ` U
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> (\<lambda>y i. x i + y i) ` B (r / 2)
[PROOF STEP]
show "f x \<in> (f \<circ> (\<lambda>y i. x i + y i)) ` B (r/2)"
[PROOF STATE]
proof (prove)
using this:
x \<in> (\<lambda>y i. x i + y i) ` B (r / 2)

goal (1 subgoal):
 1. f x \<in> (f \<circ> (\<lambda>y i. x i + y i)) ` B (r / 2)
[PROOF STEP]
by (metis image_comp image_eqI)
[PROOF STATE]
proof (state)
this:
f x \<in> (f \<circ> (\<lambda>y i. x i + y i)) ` B (r / 2)

goal (1 subgoal):
 1. (f \<circ> (\<lambda>y i. x i + y i)) ` B (r / 2) \<subseteq> f ` U
[PROOF STEP]
show "(f \<circ> (\<lambda>y i. x i + y i)) ` B (r/2) \<subseteq> f ` U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<circ> (\<lambda>y i. x i + y i)) ` B (r / 2) \<subseteq> f ` U
[PROOF STEP]
using \<open>\<And>r. B r \<subseteq> C r\<close> xinU
[PROOF STATE]
proof (prove)
using this:
B ?r \<subseteq> C ?r
?y \<in> C (r / 2) \<Longrightarrow> (\<lambda>i. x i + ?y i) \<in> U

goal (1 subgoal):
 1. (f \<circ> (\<lambda>y i. x i + y i)) ` B (r / 2) \<subseteq> f ` U
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
(f \<circ> (\<lambda>y i. x i + y i)) ` B (r / 2) \<subseteq> f ` U

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>T. openin (Euclidean_space n) T \<and> f x \<in> T \<and> T \<subseteq> f ` U

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?x \<in> U \<Longrightarrow> \<exists>T. openin (Euclidean_space n) T \<and> f ?x \<in> T \<and> T \<subseteq> f ` U

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> openin (Euclidean_space n) (f ` U)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?x \<in> U \<Longrightarrow> \<exists>T. openin (Euclidean_space n) T \<and> f ?x \<in> T \<and> T \<subseteq> f ` U
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
?x \<in> U \<Longrightarrow> \<exists>T. openin (Euclidean_space n) T \<and> f ?x \<in> T \<and> T \<subseteq> f ` U

goal (1 subgoal):
 1. openin (Euclidean_space n) (f ` U)
[PROOF STEP]
using openin_subopen
[PROOF STATE]
proof (prove)
using this:
?x \<in> U \<Longrightarrow> \<exists>T. openin (Euclidean_space n) T \<and> f ?x \<in> T \<and> T \<subseteq> f ` U
openin ?U ?S = (\<forall>x\<in>?S. \<exists>T. openin ?U T \<and> x \<in> T \<and> T \<subseteq> ?S)

goal (1 subgoal):
 1. openin (Euclidean_space n) (f ` U)
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
openin (Euclidean_space n) (f ` U)

goal:
No subgoals!
[PROOF STEP]
qed