[STATEMENT]
lemma homotopic_paths_part_circlepath:
  assumes "a \<le> b" "b \<le> c"
  assumes "path_image (part_circlepath C r a c) \<subseteq> A" "r \<ge> 0"
  shows   "homotopic_paths A (part_circlepath C r a c)
             (part_circlepath C r a b +++ part_circlepath C r b c)"
  (is "homotopic_paths _ ?g (?h1 +++ ?h2)")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. homotopic_paths A (part_circlepath C r a c) (part_circlepath C r a b +++ part_circlepath C r b c)
[PROOF STEP]
proof (cases "a = c")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. a = c \<Longrightarrow> homotopic_paths A (part_circlepath C r a c) (part_circlepath C r a b +++ part_circlepath C r b c)
 2. a \<noteq> c \<Longrightarrow> homotopic_paths A (part_circlepath C r a c) (part_circlepath C r a b +++ part_circlepath C r b c)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
a \<noteq> c

goal (2 subgoals):
 1. a = c \<Longrightarrow> homotopic_paths A (part_circlepath C r a c) (part_circlepath C r a b +++ part_circlepath C r b c)
 2. a \<noteq> c \<Longrightarrow> homotopic_paths A (part_circlepath C r a c) (part_circlepath C r a b +++ part_circlepath C r b c)
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
a \<le> b
b \<le> c
path_image (part_circlepath C r a c) \<subseteq> A
0 \<le> r
a \<noteq> c
[PROOF STEP]
have "a < c"
[PROOF STATE]
proof (prove)
using this:
a \<le> b
b \<le> c
path_image (part_circlepath C r a c) \<subseteq> A
0 \<le> r
a \<noteq> c

goal (1 subgoal):
 1. a < c
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
a < c

goal (2 subgoals):
 1. a = c \<Longrightarrow> homotopic_paths A (part_circlepath C r a c) (part_circlepath C r a b +++ part_circlepath C r b c)
 2. a \<noteq> c \<Longrightarrow> homotopic_paths A (part_circlepath C r a c) (part_circlepath C r a b +++ part_circlepath C r b c)
[PROOF STEP]
define slope where "slope = (b - a) / (c - a)"
[PROOF STATE]
proof (state)
this:
slope = (b - a) / (c - a)

goal (2 subgoals):
 1. a = c \<Longrightarrow> homotopic_paths A (part_circlepath C r a c) (part_circlepath C r a b +++ part_circlepath C r b c)
 2. a \<noteq> c \<Longrightarrow> homotopic_paths A (part_circlepath C r a c) (part_circlepath C r a b +++ part_circlepath C r b c)
[PROOF STEP]
from assms and \<open>a < c\<close>
[PROOF STATE]
proof (chain)
picking this:
a \<le> b
b \<le> c
path_image (part_circlepath C r a c) \<subseteq> A
0 \<le> r
a < c
[PROOF STEP]
have slope: "slope \<in> {0..1}"
[PROOF STATE]
proof (prove)
using this:
a \<le> b
b \<le> c
path_image (part_circlepath C r a c) \<subseteq> A
0 \<le> r
a < c

goal (1 subgoal):
 1. slope \<in> {0..1}
[PROOF STEP]
by (auto simp: field_simps slope_def)
[PROOF STATE]
proof (state)
this:
slope \<in> {0..1}

goal (2 subgoals):
 1. a = c \<Longrightarrow> homotopic_paths A (part_circlepath C r a c) (part_circlepath C r a b +++ part_circlepath C r b c)
 2. a \<noteq> c \<Longrightarrow> homotopic_paths A (part_circlepath C r a c) (part_circlepath C r a b +++ part_circlepath C r b c)
[PROOF STEP]
define f :: "real \<Rightarrow> real" where
    "f = linepath 0 slope +++ linepath slope 1"
[PROOF STATE]
proof (state)
this:
f = linepath 0 slope +++ linepath slope 1

goal (2 subgoals):
 1. a = c \<Longrightarrow> homotopic_paths A (part_circlepath C r a c) (part_circlepath C r a b +++ part_circlepath C r b c)
 2. a \<noteq> c \<Longrightarrow> homotopic_paths A (part_circlepath C r a c) (part_circlepath C r a b +++ part_circlepath C r b c)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. homotopic_paths A (part_circlepath C r a c) (part_circlepath C r a b +++ part_circlepath C r b c)
[PROOF STEP]
proof (rule homotopic_paths_reparametrize)
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. path (part_circlepath C r a c)
 2. path_image (part_circlepath C r a c) \<subseteq> A
 3. continuous_on {0..1} ?f
 4. ?f ` {0..1} \<subseteq> {0..1}
 5. ?f 0 = 0
 6. ?f 1 = 1
 7. \<And>t. t \<in> {0..1} \<Longrightarrow> (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (?f t)
[PROOF STEP]
fix t :: real
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. path (part_circlepath C r a c)
 2. path_image (part_circlepath C r a c) \<subseteq> A
 3. continuous_on {0..1} ?f
 4. ?f ` {0..1} \<subseteq> {0..1}
 5. ?f 0 = 0
 6. ?f 1 = 1
 7. \<And>t. t \<in> {0..1} \<Longrightarrow> (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (?f t)
[PROOF STEP]
assume t: "t \<in> {0..1}"
[PROOF STATE]
proof (state)
this:
t \<in> {0..1}

goal (7 subgoals):
 1. path (part_circlepath C r a c)
 2. path_image (part_circlepath C r a c) \<subseteq> A
 3. continuous_on {0..1} ?f
 4. ?f ` {0..1} \<subseteq> {0..1}
 5. ?f 0 = 0
 6. ?f 1 = 1
 7. \<And>t. t \<in> {0..1} \<Longrightarrow> (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (?f t)
[PROOF STEP]
show "(?h1 +++ ?h2) t = ?g (f t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)
[PROOF STEP]
proof (cases "t \<le> 1 / 2")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. t \<le> 1 / 2 \<Longrightarrow> (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)
 2. \<not> t \<le> 1 / 2 \<Longrightarrow> (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
t \<le> 1 / 2

goal (2 subgoals):
 1. t \<le> 1 / 2 \<Longrightarrow> (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)
 2. \<not> t \<le> 1 / 2 \<Longrightarrow> (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)
[PROOF STEP]
hence "?g (f t) = C + r * cis ((1 - f t) * a + f t * c)"
[PROOF STATE]
proof (prove)
using this:
t \<le> 1 / 2

goal (1 subgoal):
 1. part_circlepath C r a c (f t) = C + complex_of_real r * cis ((1 - f t) * a + f t * c)
[PROOF STEP]
by (simp add: joinpaths_def part_circlepath_def exp_eq_polar linepath_def)
[PROOF STATE]
proof (state)
this:
part_circlepath C r a c (f t) = C + complex_of_real r * cis ((1 - f t) * a + f t * c)

goal (2 subgoals):
 1. t \<le> 1 / 2 \<Longrightarrow> (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)
 2. \<not> t \<le> 1 / 2 \<Longrightarrow> (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
part_circlepath C r a c (f t) = C + complex_of_real r * cis ((1 - f t) * a + f t * c)

goal (2 subgoals):
 1. t \<le> 1 / 2 \<Longrightarrow> (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)
 2. \<not> t \<le> 1 / 2 \<Longrightarrow> (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)
[PROOF STEP]
from True \<open>a < c\<close>
[PROOF STATE]
proof (chain)
picking this:
t \<le> 1 / 2
a < c
[PROOF STEP]
have "(1 - f t) * a + f t * c = (1 - 2 * t) * a + 2 * t * b"
[PROOF STATE]
proof (prove)
using this:
t \<le> 1 / 2
a < c

goal (1 subgoal):
 1. (1 - f t) * a + f t * c = (1 - 2 * t) * a + 2 * t * b
[PROOF STEP]
unfolding f_def slope_def linepath_def joinpaths_def
[PROOF STATE]
proof (prove)
using this:
t \<le> 1 / 2
a < c

goal (1 subgoal):
 1. (1 - (if t \<le> 1 / 2 then (1 - 2 * t) *\<^sub>R 0 + (2 * t) *\<^sub>R ((b - a) / (c - a)) else (1 - (2 * t - 1)) *\<^sub>R ((b - a) / (c - a)) + (2 * t - 1) *\<^sub>R 1)) * a + (if t \<le> 1 / 2 then (1 - 2 * t) *\<^sub>R 0 + (2 * t) *\<^sub>R ((b - a) / (c - a)) else (1 - (2 * t - 1)) *\<^sub>R ((b - a) / (c - a)) + (2 * t - 1) *\<^sub>R 1) * c = (1 - 2 * t) * a + 2 * t * b
[PROOF STEP]
by (simp add: divide_simps del: div_mult_self3 div_mult_self4 div_mult_self2 div_mult_self1)
           (simp add: algebra_simps)?
[PROOF STATE]
proof (state)
this:
(1 - f t) * a + f t * c = (1 - 2 * t) * a + 2 * t * b

goal (2 subgoals):
 1. t \<le> 1 / 2 \<Longrightarrow> (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)
 2. \<not> t \<le> 1 / 2 \<Longrightarrow> (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(1 - f t) * a + f t * c = (1 - 2 * t) * a + 2 * t * b

goal (2 subgoals):
 1. t \<le> 1 / 2 \<Longrightarrow> (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)
 2. \<not> t \<le> 1 / 2 \<Longrightarrow> (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)
[PROOF STEP]
from True
[PROOF STATE]
proof (chain)
picking this:
t \<le> 1 / 2
[PROOF STEP]
have "C + r * cis \<dots> = (?h1 +++ ?h2) t"
[PROOF STATE]
proof (prove)
using this:
t \<le> 1 / 2

goal (1 subgoal):
 1. C + complex_of_real r * cis ((1 - 2 * t) * a + 2 * t * b) = (part_circlepath C r a b +++ part_circlepath C r b c) t
[PROOF STEP]
by (simp add: joinpaths_def part_circlepath_def exp_eq_polar linepath_def)
[PROOF STATE]
proof (state)
this:
C + complex_of_real r * cis ((1 - 2 * t) * a + 2 * t * b) = (part_circlepath C r a b +++ part_circlepath C r b c) t

goal (2 subgoals):
 1. t \<le> 1 / 2 \<Longrightarrow> (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)
 2. \<not> t \<le> 1 / 2 \<Longrightarrow> (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
part_circlepath C r a c (f t) = (part_circlepath C r a b +++ part_circlepath C r b c) t
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
part_circlepath C r a c (f t) = (part_circlepath C r a b +++ part_circlepath C r b c) t

goal (1 subgoal):
 1. (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
(part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)

goal (1 subgoal):
 1. \<not> t \<le> 1 / 2 \<Longrightarrow> (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> t \<le> 1 / 2 \<Longrightarrow> (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> t \<le> 1 / 2

goal (1 subgoal):
 1. \<not> t \<le> 1 / 2 \<Longrightarrow> (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)
[PROOF STEP]
hence "?g (f t) = C + r * cis ((1 - f t) * a + f t * c)"
[PROOF STATE]
proof (prove)
using this:
\<not> t \<le> 1 / 2

goal (1 subgoal):
 1. part_circlepath C r a c (f t) = C + complex_of_real r * cis ((1 - f t) * a + f t * c)
[PROOF STEP]
by (simp add: joinpaths_def part_circlepath_def exp_eq_polar linepath_def)
[PROOF STATE]
proof (state)
this:
part_circlepath C r a c (f t) = C + complex_of_real r * cis ((1 - f t) * a + f t * c)

goal (1 subgoal):
 1. \<not> t \<le> 1 / 2 \<Longrightarrow> (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
part_circlepath C r a c (f t) = C + complex_of_real r * cis ((1 - f t) * a + f t * c)

goal (1 subgoal):
 1. \<not> t \<le> 1 / 2 \<Longrightarrow> (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)
[PROOF STEP]
from False \<open>a < c\<close>
[PROOF STATE]
proof (chain)
picking this:
\<not> t \<le> 1 / 2
a < c
[PROOF STEP]
have "(1 - f t) * a + f t * c = (2 - 2 * t) * b + (2 * t - 1) * c"
[PROOF STATE]
proof (prove)
using this:
\<not> t \<le> 1 / 2
a < c

goal (1 subgoal):
 1. (1 - f t) * a + f t * c = (2 - 2 * t) * b + (2 * t - 1) * c
[PROOF STEP]
unfolding f_def slope_def linepath_def joinpaths_def
[PROOF STATE]
proof (prove)
using this:
\<not> t \<le> 1 / 2
a < c

goal (1 subgoal):
 1. (1 - (if t \<le> 1 / 2 then (1 - 2 * t) *\<^sub>R 0 + (2 * t) *\<^sub>R ((b - a) / (c - a)) else (1 - (2 * t - 1)) *\<^sub>R ((b - a) / (c - a)) + (2 * t - 1) *\<^sub>R 1)) * a + (if t \<le> 1 / 2 then (1 - 2 * t) *\<^sub>R 0 + (2 * t) *\<^sub>R ((b - a) / (c - a)) else (1 - (2 * t - 1)) *\<^sub>R ((b - a) / (c - a)) + (2 * t - 1) *\<^sub>R 1) * c = (2 - 2 * t) * b + (2 * t - 1) * c
[PROOF STEP]
by (simp add: divide_simps del: div_mult_self3 div_mult_self4 div_mult_self2 div_mult_self1)
           (simp add: algebra_simps)?
[PROOF STATE]
proof (state)
this:
(1 - f t) * a + f t * c = (2 - 2 * t) * b + (2 * t - 1) * c

goal (1 subgoal):
 1. \<not> t \<le> 1 / 2 \<Longrightarrow> (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(1 - f t) * a + f t * c = (2 - 2 * t) * b + (2 * t - 1) * c

goal (1 subgoal):
 1. \<not> t \<le> 1 / 2 \<Longrightarrow> (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)
[PROOF STEP]
from False
[PROOF STATE]
proof (chain)
picking this:
\<not> t \<le> 1 / 2
[PROOF STEP]
have "C + r * cis \<dots> = (?h1 +++ ?h2) t"
[PROOF STATE]
proof (prove)
using this:
\<not> t \<le> 1 / 2

goal (1 subgoal):
 1. C + complex_of_real r * cis ((2 - 2 * t) * b + (2 * t - 1) * c) = (part_circlepath C r a b +++ part_circlepath C r b c) t
[PROOF STEP]
by (simp add: joinpaths_def part_circlepath_def exp_eq_polar linepath_def)
[PROOF STATE]
proof (state)
this:
C + complex_of_real r * cis ((2 - 2 * t) * b + (2 * t - 1) * c) = (part_circlepath C r a b +++ part_circlepath C r b c) t

goal (1 subgoal):
 1. \<not> t \<le> 1 / 2 \<Longrightarrow> (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
part_circlepath C r a c (f t) = (part_circlepath C r a b +++ part_circlepath C r b c) t
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
part_circlepath C r a c (f t) = (part_circlepath C r a b +++ part_circlepath C r b c) t

goal (1 subgoal):
 1. (part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
(part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(part_circlepath C r a b +++ part_circlepath C r b c) t = part_circlepath C r a c (f t)

goal (6 subgoals):
 1. path (part_circlepath C r a c)
 2. path_image (part_circlepath C r a c) \<subseteq> A
 3. continuous_on {0..1} f
 4. f ` {0..1} \<subseteq> {0..1}
 5. f 0 = 0
 6. f 1 = 1
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. path (part_circlepath C r a c)
 2. path_image (part_circlepath C r a c) \<subseteq> A
 3. continuous_on {0..1} f
 4. f ` {0..1} \<subseteq> {0..1}
 5. f 0 = 0
 6. f 1 = 1
[PROOF STEP]
from slope
[PROOF STATE]
proof (chain)
picking this:
slope \<in> {0..1}
[PROOF STEP]
have "path_image f \<subseteq> {0..1}"
[PROOF STATE]
proof (prove)
using this:
slope \<in> {0..1}

goal (1 subgoal):
 1. path_image f \<subseteq> {0..1}
[PROOF STEP]
by (auto simp: f_def path_image_join closed_segment_eq_real_ivl)
[PROOF STATE]
proof (state)
this:
path_image f \<subseteq> {0..1}

goal (6 subgoals):
 1. path (part_circlepath C r a c)
 2. path_image (part_circlepath C r a c) \<subseteq> A
 3. continuous_on {0..1} f
 4. f ` {0..1} \<subseteq> {0..1}
 5. f 0 = 0
 6. f 1 = 1
[PROOF STEP]
thus "f ` {0..1} \<subseteq> {0..1}"
[PROOF STATE]
proof (prove)
using this:
path_image f \<subseteq> {0..1}

goal (1 subgoal):
 1. f ` {0..1} \<subseteq> {0..1}
[PROOF STEP]
by (simp add: path_image_def)
[PROOF STATE]
proof (state)
this:
f ` {0..1} \<subseteq> {0..1}

goal (5 subgoals):
 1. path (part_circlepath C r a c)
 2. path_image (part_circlepath C r a c) \<subseteq> A
 3. continuous_on {0..1} f
 4. f 0 = 0
 5. f 1 = 1
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. path (part_circlepath C r a c)
 2. path_image (part_circlepath C r a c) \<subseteq> A
 3. continuous_on {0..1} f
 4. f 0 = 0
 5. f 1 = 1
[PROOF STEP]
have "path f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path f
[PROOF STEP]
unfolding f_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path (linepath 0 slope +++ linepath slope 1)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
path f

goal (5 subgoals):
 1. path (part_circlepath C r a c)
 2. path_image (part_circlepath C r a c) \<subseteq> A
 3. continuous_on {0..1} f
 4. f 0 = 0
 5. f 1 = 1
[PROOF STEP]
thus "continuous_on {0..1} f"
[PROOF STATE]
proof (prove)
using this:
path f

goal (1 subgoal):
 1. continuous_on {0..1} f
[PROOF STEP]
by (simp add: path_def)
[PROOF STATE]
proof (state)
this:
continuous_on {0..1} f

goal (4 subgoals):
 1. path (part_circlepath C r a c)
 2. path_image (part_circlepath C r a c) \<subseteq> A
 3. f 0 = 0
 4. f 1 = 1
[PROOF STEP]
qed (insert assms, auto simp: f_def joinpaths_def linepath_def)
[PROOF STATE]
proof (state)
this:
homotopic_paths A (part_circlepath C r a c) (part_circlepath C r a b +++ part_circlepath C r b c)

goal (1 subgoal):
 1. a = c \<Longrightarrow> homotopic_paths A (part_circlepath C r a c) (part_circlepath C r a b +++ part_circlepath C r b c)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. a = c \<Longrightarrow> homotopic_paths A (part_circlepath C r a c) (part_circlepath C r a b +++ part_circlepath C r b c)
[PROOF STEP]
case [simp]: True
[PROOF STATE]
proof (state)
this:
a = c

goal (1 subgoal):
 1. a = c \<Longrightarrow> homotopic_paths A (part_circlepath C r a c) (part_circlepath C r a b +++ part_circlepath C r b c)
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
a \<le> b
b \<le> c
path_image (part_circlepath C r a c) \<subseteq> A
0 \<le> r
a = c
[PROOF STEP]
have [simp]: "b = c"
[PROOF STATE]
proof (prove)
using this:
a \<le> b
b \<le> c
path_image (part_circlepath C r a c) \<subseteq> A
0 \<le> r
a = c

goal (1 subgoal):
 1. b = c
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
b = c

goal (1 subgoal):
 1. a = c \<Longrightarrow> homotopic_paths A (part_circlepath C r a c) (part_circlepath C r a b +++ part_circlepath C r b c)
[PROOF STEP]
have "part_circlepath C r c c +++ part_circlepath C r c c = part_circlepath C r c c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. part_circlepath C r c c +++ part_circlepath C r c c = part_circlepath C r c c
[PROOF STEP]
by (simp add: fun_eq_iff joinpaths_def part_circlepath_def)
[PROOF STATE]
proof (state)
this:
part_circlepath C r c c +++ part_circlepath C r c c = part_circlepath C r c c

goal (1 subgoal):
 1. a = c \<Longrightarrow> homotopic_paths A (part_circlepath C r a c) (part_circlepath C r a b +++ part_circlepath C r b c)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
part_circlepath C r c c +++ part_circlepath C r c c = part_circlepath C r c c

goal (1 subgoal):
 1. homotopic_paths A (part_circlepath C r a c) (part_circlepath C r a b +++ part_circlepath C r b c)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
part_circlepath C r c c +++ part_circlepath C r c c = part_circlepath C r c c
a \<le> b
b \<le> c
path_image (part_circlepath C r a c) \<subseteq> A
0 \<le> r

goal (1 subgoal):
 1. homotopic_paths A (part_circlepath C r a c) (part_circlepath C r a b +++ part_circlepath C r b c)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
homotopic_paths A (part_circlepath C r a c) (part_circlepath C r a b +++ part_circlepath C r b c)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lm027:
  "inj_on Union (finestpart ` UNIV)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on \<Union> (range finestpart)
[PROOF STEP]
using lm026
[PROOF STATE]
proof (prove)
using this:
\<Union> \<circ> finestpart = id

goal (1 subgoal):
 1. inj_on \<Union> (range finestpart)
[PROOF STEP]
by (metis inj_on_id inj_on_imageI)


[STATEMENT]
lemma isCont_cong:
  assumes "eventually (\<lambda>x. f x = g x) (nhds x)"
  shows "isCont f x \<longleftrightarrow> isCont g x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. isCont f x = isCont g x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. isCont f x = isCont g x
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F x in nhds x. f x = g x
[PROOF STEP]
have [simp]: "f x = g x"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in nhds x. f x = g x

goal (1 subgoal):
 1. f x = g x
[PROOF STEP]
by (rule eventually_nhds_x_imp_x)
[PROOF STATE]
proof (state)
this:
f x = g x

goal (1 subgoal):
 1. isCont f x = isCont g x
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F x in nhds x. f x = g x
[PROOF STEP]
have "eventually (\<lambda>x. f x = g x) (at x)"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in nhds x. f x = g x

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at x. f x = g x
[PROOF STEP]
by (auto simp: eventually_at_filter elim!: eventually_mono)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at x. f x = g x

goal (1 subgoal):
 1. isCont f x = isCont g x
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F x in nhds x. f x = g x
\<forall>\<^sub>F x in at x. f x = g x
[PROOF STEP]
have "isCont f x \<longleftrightarrow> isCont g x"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in nhds x. f x = g x
\<forall>\<^sub>F x in at x. f x = g x

goal (1 subgoal):
 1. isCont f x = isCont g x
[PROOF STEP]
unfolding isCont_def
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in nhds x. f x = g x
\<forall>\<^sub>F x in at x. f x = g x

goal (1 subgoal):
 1. f \<midarrow>x\<rightarrow> f x = g \<midarrow>x\<rightarrow> g x
[PROOF STEP]
by (intro filterlim_cong) (auto elim!: eventually_mono)
[PROOF STATE]
proof (state)
this:
isCont f x = isCont g x

goal (1 subgoal):
 1. isCont f x = isCont g x
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F x in nhds x. f x = g x
isCont f x = isCont g x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in nhds x. f x = g x
isCont f x = isCont g x

goal (1 subgoal):
 1. isCont f x = isCont g x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
isCont f x = isCont g x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma conjugate_char_2_pp_additive:
  assumes "conjugate f g"
      and "additive f"
      and "additive g"
    shows "f x \<sqinter> y \<le> f(x \<sqinter> --(g y)) \<and> g y \<sqinter> x \<le> g(y \<sqinter> --(f x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f x \<sqinter> y \<le> f (x \<sqinter> - - g y) \<and> g y \<sqinter> x \<le> g (y \<sqinter> - - f x)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. f x \<sqinter> y \<le> f (x \<sqinter> - - g y) \<and> g y \<sqinter> x \<le> g (y \<sqinter> - - f x)
[PROOF STEP]
have "f x \<sqinter> y = f ((x \<sqinter> --g y) \<squnion> (x \<sqinter> -g y)) \<sqinter> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f x \<sqinter> y = f (x \<sqinter> - - g y \<squnion> x \<sqinter> - g y) \<sqinter> y
[PROOF STEP]
by (simp add: sup.commute sup_inf_distrib1)
[PROOF STATE]
proof (state)
this:
f x \<sqinter> y = f (x \<sqinter> - - g y \<squnion> x \<sqinter> - g y) \<sqinter> y

goal (1 subgoal):
 1. f x \<sqinter> y \<le> f (x \<sqinter> - - g y) \<and> g y \<sqinter> x \<le> g (y \<sqinter> - - f x)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
f x \<sqinter> y = f (x \<sqinter> - - g y \<squnion> x \<sqinter> - g y) \<sqinter> y

goal (1 subgoal):
 1. f x \<sqinter> y \<le> f (x \<sqinter> - - g y) \<and> g y \<sqinter> x \<le> g (y \<sqinter> - - f x)
[PROOF STEP]
have "... = (f (x \<sqinter> --g y) \<sqinter> y) \<squnion> (f (x \<sqinter> -g y) \<sqinter> y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f (x \<sqinter> - - g y \<squnion> x \<sqinter> - g y) \<sqinter> y = f (x \<sqinter> - - g y) \<sqinter> y \<squnion> f (x \<sqinter> - g y) \<sqinter> y
[PROOF STEP]
using assms(2) additive_def inf_sup_distrib2
[PROOF STATE]
proof (prove)
using this:
additive f
additive ?f \<equiv> \<forall>x y. ?f (x \<squnion> y) = ?f x \<squnion> ?f y
(?y \<squnion> ?z) \<sqinter> ?x = ?y \<sqinter> ?x \<squnion> ?z \<sqinter> ?x

goal (1 subgoal):
 1. f (x \<sqinter> - - g y \<squnion> x \<sqinter> - g y) \<sqinter> y = f (x \<sqinter> - - g y) \<sqinter> y \<squnion> f (x \<sqinter> - g y) \<sqinter> y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f (x \<sqinter> - - g y \<squnion> x \<sqinter> - g y) \<sqinter> y = f (x \<sqinter> - - g y) \<sqinter> y \<squnion> f (x \<sqinter> - g y) \<sqinter> y

goal (1 subgoal):
 1. f x \<sqinter> y \<le> f (x \<sqinter> - - g y) \<and> g y \<sqinter> x \<le> g (y \<sqinter> - - f x)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
f (x \<sqinter> - - g y \<squnion> x \<sqinter> - g y) \<sqinter> y = f (x \<sqinter> - - g y) \<sqinter> y \<squnion> f (x \<sqinter> - g y) \<sqinter> y

goal (1 subgoal):
 1. f x \<sqinter> y \<le> f (x \<sqinter> - - g y) \<and> g y \<sqinter> x \<le> g (y \<sqinter> - - f x)
[PROOF STEP]
have "... = f (x \<sqinter> --g y) \<sqinter> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f (x \<sqinter> - - g y) \<sqinter> y \<squnion> f (x \<sqinter> - g y) \<sqinter> y = f (x \<sqinter> - - g y) \<sqinter> y
[PROOF STEP]
by (metis assms(1) conjugate_def inf_le2 pseudo_complement sup_bot.right_neutral)
[PROOF STATE]
proof (state)
this:
f (x \<sqinter> - - g y) \<sqinter> y \<squnion> f (x \<sqinter> - g y) \<sqinter> y = f (x \<sqinter> - - g y) \<sqinter> y

goal (1 subgoal):
 1. f x \<sqinter> y \<le> f (x \<sqinter> - - g y) \<and> g y \<sqinter> x \<le> g (y \<sqinter> - - f x)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
f x \<sqinter> y = f (x \<sqinter> - - g y) \<sqinter> y
[PROOF STEP]
have 2: "f x \<sqinter> y \<le> f (x \<sqinter> --g y)"
[PROOF STATE]
proof (prove)
using this:
f x \<sqinter> y = f (x \<sqinter> - - g y) \<sqinter> y

goal (1 subgoal):
 1. f x \<sqinter> y \<le> f (x \<sqinter> - - g y)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
f x \<sqinter> y \<le> f (x \<sqinter> - - g y)

goal (1 subgoal):
 1. f x \<sqinter> y \<le> f (x \<sqinter> - - g y) \<and> g y \<sqinter> x \<le> g (y \<sqinter> - - f x)
[PROOF STEP]
have "g y \<sqinter> x = g ((y \<sqinter> --f x) \<squnion> (y \<sqinter> -f x)) \<sqinter> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g y \<sqinter> x = g (y \<sqinter> - - f x \<squnion> y \<sqinter> - f x) \<sqinter> x
[PROOF STEP]
by (simp add: sup.commute sup_inf_distrib1)
[PROOF STATE]
proof (state)
this:
g y \<sqinter> x = g (y \<sqinter> - - f x \<squnion> y \<sqinter> - f x) \<sqinter> x

goal (1 subgoal):
 1. f x \<sqinter> y \<le> f (x \<sqinter> - - g y) \<and> g y \<sqinter> x \<le> g (y \<sqinter> - - f x)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
g y \<sqinter> x = g (y \<sqinter> - - f x \<squnion> y \<sqinter> - f x) \<sqinter> x

goal (1 subgoal):
 1. f x \<sqinter> y \<le> f (x \<sqinter> - - g y) \<and> g y \<sqinter> x \<le> g (y \<sqinter> - - f x)
[PROOF STEP]
have "... = (g (y \<sqinter> --f x) \<sqinter> x) \<squnion> (g (y \<sqinter> -f x) \<sqinter> x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g (y \<sqinter> - - f x \<squnion> y \<sqinter> - f x) \<sqinter> x = g (y \<sqinter> - - f x) \<sqinter> x \<squnion> g (y \<sqinter> - f x) \<sqinter> x
[PROOF STEP]
using assms(3) additive_def inf_sup_distrib2
[PROOF STATE]
proof (prove)
using this:
additive g
additive ?f \<equiv> \<forall>x y. ?f (x \<squnion> y) = ?f x \<squnion> ?f y
(?y \<squnion> ?z) \<sqinter> ?x = ?y \<sqinter> ?x \<squnion> ?z \<sqinter> ?x

goal (1 subgoal):
 1. g (y \<sqinter> - - f x \<squnion> y \<sqinter> - f x) \<sqinter> x = g (y \<sqinter> - - f x) \<sqinter> x \<squnion> g (y \<sqinter> - f x) \<sqinter> x
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
g (y \<sqinter> - - f x \<squnion> y \<sqinter> - f x) \<sqinter> x = g (y \<sqinter> - - f x) \<sqinter> x \<squnion> g (y \<sqinter> - f x) \<sqinter> x

goal (1 subgoal):
 1. f x \<sqinter> y \<le> f (x \<sqinter> - - g y) \<and> g y \<sqinter> x \<le> g (y \<sqinter> - - f x)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
g (y \<sqinter> - - f x \<squnion> y \<sqinter> - f x) \<sqinter> x = g (y \<sqinter> - - f x) \<sqinter> x \<squnion> g (y \<sqinter> - f x) \<sqinter> x

goal (1 subgoal):
 1. f x \<sqinter> y \<le> f (x \<sqinter> - - g y) \<and> g y \<sqinter> x \<le> g (y \<sqinter> - - f x)
[PROOF STEP]
have "... = g (y \<sqinter> --f x) \<sqinter> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g (y \<sqinter> - - f x) \<sqinter> x \<squnion> g (y \<sqinter> - f x) \<sqinter> x = g (y \<sqinter> - - f x) \<sqinter> x
[PROOF STEP]
by (metis assms(1) conjugate_def inf.cobounded2 pseudo_complement sup_bot.right_neutral inf_commute)
[PROOF STATE]
proof (state)
this:
g (y \<sqinter> - - f x) \<sqinter> x \<squnion> g (y \<sqinter> - f x) \<sqinter> x = g (y \<sqinter> - - f x) \<sqinter> x

goal (1 subgoal):
 1. f x \<sqinter> y \<le> f (x \<sqinter> - - g y) \<and> g y \<sqinter> x \<le> g (y \<sqinter> - - f x)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
g y \<sqinter> x = g (y \<sqinter> - - f x) \<sqinter> x
[PROOF STEP]
have "g y \<sqinter> x \<le> g (y \<sqinter> --f x)"
[PROOF STATE]
proof (prove)
using this:
g y \<sqinter> x = g (y \<sqinter> - - f x) \<sqinter> x

goal (1 subgoal):
 1. g y \<sqinter> x \<le> g (y \<sqinter> - - f x)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
g y \<sqinter> x \<le> g (y \<sqinter> - - f x)

goal (1 subgoal):
 1. f x \<sqinter> y \<le> f (x \<sqinter> - - g y) \<and> g y \<sqinter> x \<le> g (y \<sqinter> - - f x)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
g y \<sqinter> x \<le> g (y \<sqinter> - - f x)

goal (1 subgoal):
 1. f x \<sqinter> y \<le> f (x \<sqinter> - - g y) \<and> g y \<sqinter> x \<le> g (y \<sqinter> - - f x)
[PROOF STEP]
using 2
[PROOF STATE]
proof (prove)
using this:
g y \<sqinter> x \<le> g (y \<sqinter> - - f x)
f x \<sqinter> y \<le> f (x \<sqinter> - - g y)

goal (1 subgoal):
 1. f x \<sqinter> y \<le> f (x \<sqinter> - - g y) \<and> g y \<sqinter> x \<le> g (y \<sqinter> - - f x)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
f x \<sqinter> y \<le> f (x \<sqinter> - - g y) \<and> g y \<sqinter> x \<le> g (y \<sqinter> - - f x)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma artanh_real_at_right_1:
  "filterlim (artanh :: real \<Rightarrow> real) at_bot (at_right (-1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. filterlim artanh at_bot (at_right (- 1))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. filterlim artanh at_bot (at_right (- 1))
[PROOF STEP]
have "?thesis \<longleftrightarrow> filterlim (\<lambda>x::real. -artanh x) at_top (at_right (-1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. filterlim artanh at_bot (at_right (- 1)) = (LIM x at_right (- 1). - artanh x :> at_top)
[PROOF STEP]
by (simp add: filterlim_uminus_at_bot)
[PROOF STATE]
proof (state)
this:
filterlim artanh at_bot (at_right (- 1)) = (LIM x at_right (- 1). - artanh x :> at_top)

goal (1 subgoal):
 1. filterlim artanh at_bot (at_right (- 1))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
filterlim artanh at_bot (at_right (- 1)) = (LIM x at_right (- 1). - artanh x :> at_top)

goal (1 subgoal):
 1. filterlim artanh at_bot (at_right (- 1))
[PROOF STEP]
have "\<dots> \<longleftrightarrow> filterlim (\<lambda>x::real. artanh (-x)) at_top (at_right (-1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (LIM x at_right (- 1). - artanh x :> at_top) = (LIM x at_right (- 1). artanh (- x) :> at_top)
[PROOF STEP]
by (intro filterlim_cong refl eventually_mono[OF eventually_at_right_real[of "-1" "1"]]) auto
[PROOF STATE]
proof (state)
this:
(LIM x at_right (- 1). - artanh x :> at_top) = (LIM x at_right (- 1). artanh (- x) :> at_top)

goal (1 subgoal):
 1. filterlim artanh at_bot (at_right (- 1))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(LIM x at_right (- 1). - artanh x :> at_top) = (LIM x at_right (- 1). artanh (- x) :> at_top)

goal (1 subgoal):
 1. filterlim artanh at_bot (at_right (- 1))
[PROOF STEP]
have "\<dots> \<longleftrightarrow> filterlim (artanh :: real \<Rightarrow> real) at_top (at_left 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (LIM x at_right (- 1). artanh (- x) :> at_top) = filterlim artanh at_top (at_left 1)
[PROOF STEP]
by (simp add: filterlim_at_left_to_right)
[PROOF STATE]
proof (state)
this:
(LIM x at_right (- 1). artanh (- x) :> at_top) = filterlim artanh at_top (at_left 1)

goal (1 subgoal):
 1. filterlim artanh at_bot (at_right (- 1))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(LIM x at_right (- 1). artanh (- x) :> at_top) = filterlim artanh at_top (at_left 1)

goal (1 subgoal):
 1. filterlim artanh at_bot (at_right (- 1))
[PROOF STEP]
have \<dots>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. filterlim artanh at_top (at_left 1)
[PROOF STEP]
by (rule artanh_real_at_left_1)
[PROOF STATE]
proof (state)
this:
filterlim artanh at_top (at_left 1)

goal (1 subgoal):
 1. filterlim artanh at_bot (at_right (- 1))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
filterlim artanh at_bot (at_right (- 1))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
filterlim artanh at_bot (at_right (- 1))

goal (1 subgoal):
 1. filterlim artanh at_bot (at_right (- 1))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
filterlim artanh at_bot (at_right (- 1))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma elts_multE:
  assumes "z \<in> elts (x * y)"
  obtains u v where "u \<in> elts x" "v \<in> elts y" "z = x*v + u"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>u v. \<lbrakk>u \<in> elts x; v \<in> elts y; z = x * v + u\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using mult [of x y] lift_def assms
[PROOF STATE]
proof (prove)
using this:
x * y = (\<Squnion>u\<in>elts y. lift (x * u) x)
lift ?x ?y \<equiv> set ((+) ?x ` elts ?y)
z \<in> elts (x * y)

goal (1 subgoal):
 1. (\<And>u v. \<lbrakk>u \<in> elts x; v \<in> elts y; z = x * v + u\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto


[STATEMENT]
lemma mono_SucI2: "\<forall>n. X (Suc n) \<le> X n \<Longrightarrow> monoseq X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>n. X (Suc n) \<le> X n \<Longrightarrow> monoseq X
[PROOF STEP]
by (simp add: monoseq_Suc)


[STATEMENT]
lemma uniformly_continuous_imp_Cauchy_continuous:
  fixes f :: "'a::metric_space \<Rightarrow> 'b::metric_space"
  shows "\<lbrakk>uniformly_continuous_on S f; Cauchy \<sigma>; \<And>n. (\<sigma> n) \<in> S\<rbrakk> \<Longrightarrow> Cauchy(f \<circ> \<sigma>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>uniformly_continuous_on S f; Cauchy \<sigma>; \<And>n. \<sigma> n \<in> S\<rbrakk> \<Longrightarrow> Cauchy (f \<circ> \<sigma>)
[PROOF STEP]
by (simp add: uniformly_continuous_on_def Cauchy_def) meson


[STATEMENT]
lemma subtopology_map_topology:
  "subtopology (map_topology f T) X = map_topology f (subtopology T (f -` X))"
  if "openin T (f -` X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subtopology (map_topology f T) X = map_topology f (subtopology T (f -` X))
[PROOF STEP]
apply (rule antisym_finer_than)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. subtopology (map_topology f T) X finer_than map_topology f (subtopology T (f -` X))
 2. map_topology f (subtopology T (f -` X)) finer_than subtopology (map_topology f T) X
[PROOF STEP]
using sub_map_finer_than_commute[OF that] map_sub_finer_than_commute[of f T X]
[PROOF STATE]
proof (prove)
using this:
subtopology (map_topology f T) X finer_than map_topology f (subtopology T (f -` X))
map_topology f (subtopology T (f -` X)) finer_than subtopology (map_topology f T) X

goal (2 subgoals):
 1. subtopology (map_topology f T) X finer_than map_topology f (subtopology T (f -` X))
 2. map_topology f (subtopology T (f -` X)) finer_than subtopology (map_topology f T) X
[PROOF STEP]
by auto


[STATEMENT]
lemma all_coarser_partitions_with_list_equivalence:
  fixes elem::'a
    and Ps::"'a set list list"
  assumes distinct: "\<forall> P \<in> set Ps . distinct P"
  shows "set (map set (all_coarser_partitions_with_list elem Ps)) = all_coarser_partitions_with elem (set (map set Ps))"
    (is "?list_expr = ?set_expr")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (map set (all_coarser_partitions_with_list elem Ps)) = all_coarser_partitions_with elem (set (map set Ps))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. set (map set (all_coarser_partitions_with_list elem Ps)) = all_coarser_partitions_with elem (set (map set Ps))
[PROOF STEP]
have "?list_expr = set (map set (concat (map (coarser_partitions_with_list elem) Ps)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (map set (all_coarser_partitions_with_list elem Ps)) = set (map set (concat (map (coarser_partitions_with_list elem) Ps)))
[PROOF STEP]
unfolding all_coarser_partitions_with_list_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (map set (concat (map (coarser_partitions_with_list elem) Ps))) = set (map set (concat (map (coarser_partitions_with_list elem) Ps)))
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
set (map set (all_coarser_partitions_with_list elem Ps)) = set (map set (concat (map (coarser_partitions_with_list elem) Ps)))

goal (1 subgoal):
 1. set (map set (all_coarser_partitions_with_list elem Ps)) = all_coarser_partitions_with elem (set (map set Ps))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
set (map set (all_coarser_partitions_with_list elem Ps)) = set (map set (concat (map (coarser_partitions_with_list elem) Ps)))

goal (1 subgoal):
 1. set (map set (all_coarser_partitions_with_list elem Ps)) = all_coarser_partitions_with elem (set (map set Ps))
[PROOF STEP]
have "\<dots> = set ` (\<Union> x \<in> (coarser_partitions_with_list elem) ` (set Ps) . set x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (map set (concat (map (coarser_partitions_with_list elem) Ps))) = set ` \<Union> (set ` coarser_partitions_with_list elem ` set Ps)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
set (map set (concat (map (coarser_partitions_with_list elem) Ps))) = set ` \<Union> (set ` coarser_partitions_with_list elem ` set Ps)

goal (1 subgoal):
 1. set (map set (all_coarser_partitions_with_list elem Ps)) = all_coarser_partitions_with elem (set (map set Ps))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
set (map set (concat (map (coarser_partitions_with_list elem) Ps))) = set ` \<Union> (set ` coarser_partitions_with_list elem ` set Ps)

goal (1 subgoal):
 1. set (map set (all_coarser_partitions_with_list elem Ps)) = all_coarser_partitions_with elem (set (map set Ps))
[PROOF STEP]
have "\<dots> = set ` (\<Union> x \<in> { coarser_partitions_with_list elem P | P . P \<in> set Ps } . set x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set ` \<Union> (set ` coarser_partitions_with_list elem ` set Ps) = set ` \<Union> (set ` {coarser_partitions_with_list elem P |P. P \<in> set Ps})
[PROOF STEP]
by (simp add: image_Collect_mem)
[PROOF STATE]
proof (state)
this:
set ` \<Union> (set ` coarser_partitions_with_list elem ` set Ps) = set ` \<Union> (set ` {coarser_partitions_with_list elem P |P. P \<in> set Ps})

goal (1 subgoal):
 1. set (map set (all_coarser_partitions_with_list elem Ps)) = all_coarser_partitions_with elem (set (map set Ps))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
set ` \<Union> (set ` coarser_partitions_with_list elem ` set Ps) = set ` \<Union> (set ` {coarser_partitions_with_list elem P |P. P \<in> set Ps})

goal (1 subgoal):
 1. set (map set (all_coarser_partitions_with_list elem Ps)) = all_coarser_partitions_with elem (set (map set Ps))
[PROOF STEP]
have "\<dots> = \<Union> { set (map set (coarser_partitions_with_list elem P)) | P . P \<in> set Ps }"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set ` \<Union> (set ` {coarser_partitions_with_list elem P |P. P \<in> set Ps}) = \<Union> {set (map set (coarser_partitions_with_list elem P)) |P. P \<in> set Ps}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
set ` \<Union> (set ` {coarser_partitions_with_list elem P |P. P \<in> set Ps}) = \<Union> {set (map set (coarser_partitions_with_list elem P)) |P. P \<in> set Ps}

goal (1 subgoal):
 1. set (map set (all_coarser_partitions_with_list elem Ps)) = all_coarser_partitions_with elem (set (map set Ps))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
set ` \<Union> (set ` {coarser_partitions_with_list elem P |P. P \<in> set Ps}) = \<Union> {set (map set (coarser_partitions_with_list elem P)) |P. P \<in> set Ps}

goal (1 subgoal):
 1. set (map set (all_coarser_partitions_with_list elem Ps)) = all_coarser_partitions_with elem (set (map set Ps))
[PROOF STEP]
have "\<dots> = \<Union> { coarser_partitions_with elem (set P) | P . P \<in> set Ps }"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> {set (map set (coarser_partitions_with_list elem P)) |P. P \<in> set Ps} = \<Union> {coarser_partitions_with elem (set P) |P. P \<in> set Ps}
[PROOF STEP]
using distinct coarser_partitions_with_list_equivalence
[PROOF STATE]
proof (prove)
using this:
\<forall>P\<in>set Ps. distinct P
distinct ?P \<Longrightarrow> set (map set (coarser_partitions_with_list ?new_el ?P)) = coarser_partitions_with ?new_el (set ?P)

goal (1 subgoal):
 1. \<Union> {set (map set (coarser_partitions_with_list elem P)) |P. P \<in> set Ps} = \<Union> {coarser_partitions_with elem (set P) |P. P \<in> set Ps}
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
\<Union> {set (map set (coarser_partitions_with_list elem P)) |P. P \<in> set Ps} = \<Union> {coarser_partitions_with elem (set P) |P. P \<in> set Ps}

goal (1 subgoal):
 1. set (map set (all_coarser_partitions_with_list elem Ps)) = all_coarser_partitions_with elem (set (map set Ps))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<Union> {set (map set (coarser_partitions_with_list elem P)) |P. P \<in> set Ps} = \<Union> {coarser_partitions_with elem (set P) |P. P \<in> set Ps}

goal (1 subgoal):
 1. set (map set (all_coarser_partitions_with_list elem Ps)) = all_coarser_partitions_with elem (set (map set Ps))
[PROOF STEP]
have "\<dots> = \<Union> (coarser_partitions_with elem ` (set ` (set Ps)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> {coarser_partitions_with elem (set P) |P. P \<in> set Ps} = \<Union> (coarser_partitions_with elem ` set ` set Ps)
[PROOF STEP]
by (simp add: image_Collect_mem)
[PROOF STATE]
proof (state)
this:
\<Union> {coarser_partitions_with elem (set P) |P. P \<in> set Ps} = \<Union> (coarser_partitions_with elem ` set ` set Ps)

goal (1 subgoal):
 1. set (map set (all_coarser_partitions_with_list elem Ps)) = all_coarser_partitions_with elem (set (map set Ps))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<Union> {coarser_partitions_with elem (set P) |P. P \<in> set Ps} = \<Union> (coarser_partitions_with elem ` set ` set Ps)

goal (1 subgoal):
 1. set (map set (all_coarser_partitions_with_list elem Ps)) = all_coarser_partitions_with elem (set (map set Ps))
[PROOF STEP]
have "\<dots> = \<Union> (coarser_partitions_with elem ` (set (map set Ps)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> (coarser_partitions_with elem ` set ` set Ps) = \<Union> (coarser_partitions_with elem ` set (map set Ps))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<Union> (coarser_partitions_with elem ` set ` set Ps) = \<Union> (coarser_partitions_with elem ` set (map set Ps))

goal (1 subgoal):
 1. set (map set (all_coarser_partitions_with_list elem Ps)) = all_coarser_partitions_with elem (set (map set Ps))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<Union> (coarser_partitions_with elem ` set ` set Ps) = \<Union> (coarser_partitions_with elem ` set (map set Ps))

goal (1 subgoal):
 1. set (map set (all_coarser_partitions_with_list elem Ps)) = all_coarser_partitions_with elem (set (map set Ps))
[PROOF STEP]
have "\<dots> = ?set_expr"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> (coarser_partitions_with elem ` set (map set Ps)) = all_coarser_partitions_with elem (set (map set Ps))
[PROOF STEP]
unfolding all_coarser_partitions_with_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> (coarser_partitions_with elem ` set (map set Ps)) = \<Union> (coarser_partitions_with elem ` set (map set Ps))
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
\<Union> (coarser_partitions_with elem ` set (map set Ps)) = all_coarser_partitions_with elem (set (map set Ps))

goal (1 subgoal):
 1. set (map set (all_coarser_partitions_with_list elem Ps)) = all_coarser_partitions_with elem (set (map set Ps))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
set (map set (all_coarser_partitions_with_list elem Ps)) = all_coarser_partitions_with elem (set (map set Ps))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
set (map set (all_coarser_partitions_with_list elem Ps)) = all_coarser_partitions_with elem (set (map set Ps))

goal (1 subgoal):
 1. set (map set (all_coarser_partitions_with_list elem Ps)) = all_coarser_partitions_with elem (set (map set Ps))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
set (map set (all_coarser_partitions_with_list elem Ps)) = all_coarser_partitions_with elem (set (map set Ps))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma remaining_steps_decline_n_steps [simp]:
  "\<lbrakk>invar (states :: 'a states); remaining_steps states \<le> n\<rbrakk>
   \<Longrightarrow> remaining_steps ((step ^^ n) states) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>invar states; remaining_steps states \<le> n\<rbrakk> \<Longrightarrow> remaining_steps ((step ^^ n) states) = 0
[PROOF STEP]
by(induction n arbitrary: states)(auto simp: funpow_swap1 invar_step)


[STATEMENT]
lemma indep_card_eq_dim_span:
  assumes "independent B"
  shows "finite B \<and> card B = dim (span B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite B \<and> card B = dim (span B)
[PROOF STEP]
using dim_span_eq_card_independent[OF assms] finiteI_independent[OF assms]
[PROOF STATE]
proof (prove)
using this:
dim (span B) = card B
finite B

goal (1 subgoal):
 1. finite B \<and> card B = dim (span B)
[PROOF STEP]
by auto


[STATEMENT]
lemma monom_remove_key: "MPoly_Type.monom m (a :: 'a :: semiring_1) =
  MPoly_Type.monom (remove_key x m) a * MPoly_Type.monom (Poly_Mapping.single x (lookup m x)) 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. MPoly_Type.monom m a = MPoly_Type.monom (remove_key x m) a * MPoly_Type.monom (monomial (lookup m x) x) (1::'a)
[PROOF STEP]
unfolding MPoly_Type.mult_monom
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. MPoly_Type.monom m a = MPoly_Type.monom (remove_key x m + monomial (lookup m x) x) (a * (1::'a))
[PROOF STEP]
by (rule arg_cong2[of _ _ _ _ MPoly_Type.monom], auto simp: remove_key_sum)


[STATEMENT]
lemma liminf_finite_then_bounded_below:
  fixes u::"nat \<Rightarrow> real"
  assumes "liminf u > -\<infinity>"
  shows "\<exists>C. \<forall>n. u n \<ge> C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>C. \<forall>n. C \<le> u n
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>C. \<forall>n. C \<le> u n
[PROOF STEP]
obtain C where C: "liminf u > C" "C > -\<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>C. \<lbrakk>C < liminf (\<lambda>x. ereal (u x)); - \<infinity> < C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
- \<infinity> < liminf (\<lambda>x. ereal (u x))

goal (1 subgoal):
 1. (\<And>C. \<lbrakk>C < liminf (\<lambda>x. ereal (u x)); - \<infinity> < C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using ereal_dense2
[PROOF STATE]
proof (prove)
using this:
- \<infinity> < liminf (\<lambda>x. ereal (u x))
?x < ?y \<Longrightarrow> \<exists>z. ?x < ereal z \<and> ereal z < ?y

goal (1 subgoal):
 1. (\<And>C. \<lbrakk>C < liminf (\<lambda>x. ereal (u x)); - \<infinity> < C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
C < liminf (\<lambda>x. ereal (u x))
- \<infinity> < C

goal (1 subgoal):
 1. \<exists>C. \<forall>n. C \<le> u n
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
C < liminf (\<lambda>x. ereal (u x))
- \<infinity> < C
[PROOF STEP]
have "C = ereal(real_of_ereal C)"
[PROOF STATE]
proof (prove)
using this:
C < liminf (\<lambda>x. ereal (u x))
- \<infinity> < C

goal (1 subgoal):
 1. C = ereal (real_of_ereal C)
[PROOF STEP]
using ereal_real
[PROOF STATE]
proof (prove)
using this:
C < liminf (\<lambda>x. ereal (u x))
- \<infinity> < C
ereal (real_of_ereal ?x) = (if \<bar>?x\<bar> = \<infinity> then 0 else ?x)

goal (1 subgoal):
 1. C = ereal (real_of_ereal C)
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
C = ereal (real_of_ereal C)

goal (1 subgoal):
 1. \<exists>C. \<forall>n. C \<le> u n
[PROOF STEP]
have "eventually (\<lambda>n. u n > C) sequentially"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. C < ereal (u n)
[PROOF STEP]
using C(1)
[PROOF STATE]
proof (prove)
using this:
C < liminf (\<lambda>x. ereal (u x))

goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. C < ereal (u n)
[PROOF STEP]
unfolding Liminf_def
[PROOF STATE]
proof (prove)
using this:
C < (SUP P\<in>{P. eventually P sequentially}. INF x\<in>Collect P. ereal (u x))

goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. C < ereal (u n)
[PROOF STEP]
apply (auto simp add: less_SUP_iff)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>eventually x sequentially; C < (INF x\<in>Collect x. ereal (u x))\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F n in sequentially. C < ereal (u n)
[PROOF STEP]
using eventually_elim2 less_INF_D
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>eventually ?P ?F; eventually ?Q ?F; \<And>i. \<lbrakk>?P i; ?Q i\<rbrakk> \<Longrightarrow> ?R i\<rbrakk> \<Longrightarrow> eventually ?R ?F
\<lbrakk>?y < Inf (?f ` ?A); ?i \<in> ?A\<rbrakk> \<Longrightarrow> ?y < ?f ?i

goal (1 subgoal):
 1. \<And>x. \<lbrakk>eventually x sequentially; C < (INF x\<in>Collect x. ereal (u x))\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F n in sequentially. C < ereal (u n)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in sequentially. C < ereal (u n)

goal (1 subgoal):
 1. \<exists>C. \<forall>n. C \<le> u n
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F n in sequentially. C < ereal (u n)
[PROOF STEP]
obtain N where N: "\<And>n. n \<ge> N \<Longrightarrow> u n > C"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F n in sequentially. C < ereal (u n)

goal (1 subgoal):
 1. (\<And>N. (\<And>n. N \<le> n \<Longrightarrow> C < ereal (u n)) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using eventually_sequentially
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F n in sequentially. C < ereal (u n)
eventually ?P sequentially = (\<exists>N. \<forall>n\<ge>N. ?P n)

goal (1 subgoal):
 1. (\<And>N. (\<And>n. N \<le> n \<Longrightarrow> C < ereal (u n)) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
N \<le> ?n \<Longrightarrow> C < ereal (u ?n)

goal (1 subgoal):
 1. \<exists>C. \<forall>n. C \<le> u n
[PROOF STEP]
define D where "D = min (real_of_ereal C) (Min {u n |n. n \<le> N})"
[PROOF STATE]
proof (state)
this:
D = min (real_of_ereal C) (Min {u n |n. n \<le> N})

goal (1 subgoal):
 1. \<exists>C. \<forall>n. C \<le> u n
[PROOF STEP]
have "\<And>n. u n \<ge> D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n. D \<le> u n
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. D \<le> u n
[PROOF STEP]
fix n
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. D \<le> u n
[PROOF STEP]
show "u n \<ge> D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. D \<le> u n
[PROOF STEP]
proof (cases)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> D \<le> u n
 2. \<not> ?P \<Longrightarrow> D \<le> u n
[PROOF STEP]
assume *: "n \<le> N"
[PROOF STATE]
proof (state)
this:
n \<le> N

goal (2 subgoals):
 1. ?P \<Longrightarrow> D \<le> u n
 2. \<not> ?P \<Longrightarrow> D \<le> u n
[PROOF STEP]
have "u n \<ge> Min {u n |n. n \<le> N}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Min {u n |n. n \<le> N} \<le> u n
[PROOF STEP]
by (rule Min_le, auto simp add: *)
[PROOF STATE]
proof (state)
this:
Min {u n |n. n \<le> N} \<le> u n

goal (2 subgoals):
 1. ?P \<Longrightarrow> D \<le> u n
 2. \<not> ?P \<Longrightarrow> D \<le> u n
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Min {u n |n. n \<le> N} \<le> u n
[PROOF STEP]
show "u n \<ge> D"
[PROOF STATE]
proof (prove)
using this:
Min {u n |n. n \<le> N} \<le> u n

goal (1 subgoal):
 1. D \<le> u n
[PROOF STEP]
unfolding D_def
[PROOF STATE]
proof (prove)
using this:
Min {u n |n. n \<le> N} \<le> u n

goal (1 subgoal):
 1. min (real_of_ereal C) (Min {u n |n. n \<le> N}) \<le> u n
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
D \<le> u n

goal (1 subgoal):
 1. \<not> n \<le> N \<Longrightarrow> D \<le> u n
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> n \<le> N \<Longrightarrow> D \<le> u n
[PROOF STEP]
assume "\<not>(n \<le> N)"
[PROOF STATE]
proof (state)
this:
\<not> n \<le> N

goal (1 subgoal):
 1. \<not> n \<le> N \<Longrightarrow> D \<le> u n
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> n \<le> N
[PROOF STEP]
have "n \<ge> N"
[PROOF STATE]
proof (prove)
using this:
\<not> n \<le> N

goal (1 subgoal):
 1. N \<le> n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
N \<le> n

goal (1 subgoal):
 1. \<not> n \<le> N \<Longrightarrow> D \<le> u n
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
N \<le> n
[PROOF STEP]
have "u n > C"
[PROOF STATE]
proof (prove)
using this:
N \<le> n

goal (1 subgoal):
 1. C < ereal (u n)
[PROOF STEP]
using N
[PROOF STATE]
proof (prove)
using this:
N \<le> n
N \<le> ?n \<Longrightarrow> C < ereal (u ?n)

goal (1 subgoal):
 1. C < ereal (u n)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
C < ereal (u n)

goal (1 subgoal):
 1. \<not> n \<le> N \<Longrightarrow> D \<le> u n
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
C < ereal (u n)
[PROOF STEP]
have "u n > real_of_ereal C"
[PROOF STATE]
proof (prove)
using this:
C < ereal (u n)

goal (1 subgoal):
 1. real_of_ereal C < u n
[PROOF STEP]
using \<open>C = ereal(real_of_ereal C)\<close> less_ereal.simps(1)
[PROOF STATE]
proof (prove)
using this:
C < ereal (u n)
C = ereal (real_of_ereal C)
(ereal ?x < ereal ?y) = (?x < ?y)

goal (1 subgoal):
 1. real_of_ereal C < u n
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
real_of_ereal C < u n

goal (1 subgoal):
 1. \<not> n \<le> N \<Longrightarrow> D \<le> u n
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
real_of_ereal C < u n
[PROOF STEP]
show "u n \<ge> D"
[PROOF STATE]
proof (prove)
using this:
real_of_ereal C < u n

goal (1 subgoal):
 1. D \<le> u n
[PROOF STEP]
unfolding D_def
[PROOF STATE]
proof (prove)
using this:
real_of_ereal C < u n

goal (1 subgoal):
 1. min (real_of_ereal C) (Min {u n |n. n \<le> N}) \<le> u n
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
D \<le> u n

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
D \<le> u n

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
D \<le> u ?n

goal (1 subgoal):
 1. \<exists>C. \<forall>n. C \<le> u n
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
D \<le> u ?n
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
D \<le> u ?n

goal (1 subgoal):
 1. \<exists>C. \<forall>n. C \<le> u n
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>C. \<forall>n. C \<le> u n

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in padic_integers) Zp_residue_a_inv:
  assumes "a \<in> carrier Zp"
  shows "(\<ominus> a) k = \<ominus>\<^bsub>Zp_res_ring k\<^esub> (a k)"
        "(\<ominus> a) k = (- (a k)) mod (p^k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<ominus> a) k = \<ominus>\<^bsub>residue_ring (p ^ k)\<^esub> a k &&& (\<ominus> a) k = - a k mod p ^ k
[PROOF STEP]
using Zp_def assms padic_a_inv prime
[PROOF STATE]
proof (prove)
using this:
Zp \<equiv> padic_int p
a \<in> carrier Zp
\<lbrakk>prime ?p; ?a \<in> carrier (padic_int ?p)\<rbrakk> \<Longrightarrow> \<ominus>\<^bsub>padic_int ?p\<^esub> ?a = (\<lambda>n. \<ominus>\<^bsub>residue_ring (?p ^ n)\<^esub> ?a n)
prime p

goal (1 subgoal):
 1. (\<ominus> a) k = \<ominus>\<^bsub>residue_ring (p ^ k)\<^esub> a k &&& (\<ominus> a) k = - a k mod p ^ k
[PROOF STEP]
apply auto[1]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<ominus> a) k = - a k mod p ^ k
[PROOF STEP]
using residue_a_inv
[PROOF STATE]
proof (prove)
using this:
\<ominus>\<^bsub>residue_ring (p ^ ?k)\<^esub> ?y = \<ominus>\<^bsub>residue_ring (p ^ ?k)\<^esub> (?y mod p ^ ?k)

goal (1 subgoal):
 1. (\<ominus> a) k = - a k mod p ^ k
[PROOF STEP]
by (metis Zp_def assms mod_by_1 p_res_ring_zero padic_a_inv padic_integers.prime
        padic_integers_axioms power_0 residue_1_prop residues.res_neg_eq residues_n)


[STATEMENT]
lemma vproduct_index_vempty[simp]: "(\<Prod>\<^sub>\<circ>i\<in>\<^sub>\<circ>0. A i) = set {0}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vproduct 0 A = set {0}
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. vproduct 0 A = set {0}
[PROOF STEP]
have "{f. vsv f \<and> \<D>\<^sub>\<circ> f = 0 \<and> (\<forall>i\<in>\<^sub>\<circ>0. f\<lparr>i\<rparr> \<in>\<^sub>\<circ> A i)} = {0}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {f. vsv f \<and> \<D>\<^sub>\<circ> f = 0 \<and> (\<forall>i\<in>elts 0. f\<lparr>i\<rparr> \<in>\<^sub>\<circ> A i)} = {0}
[PROOF STEP]
using vbrelation.vlrestriction_vdomain vsv_eqI
[PROOF STATE]
proof (prove)
using this:
vbrelation ?r \<Longrightarrow> ?r \<restriction>\<^sup>l\<^sub>\<circ> \<D>\<^sub>\<circ> ?r = ?r
\<lbrakk>vsv ?r; vsv ?s; \<D>\<^sub>\<circ> ?r = \<D>\<^sub>\<circ> ?s; \<And>a. a \<in>\<^sub>\<circ> \<D>\<^sub>\<circ> ?r \<Longrightarrow> ?r\<lparr>a\<rparr> = ?s\<lparr>a\<rparr>\<rbrakk> \<Longrightarrow> ?r = ?s

goal (1 subgoal):
 1. {f. vsv f \<and> \<D>\<^sub>\<circ> f = 0 \<and> (\<forall>i\<in>elts 0. f\<lparr>i\<rparr> \<in>\<^sub>\<circ> A i)} = {0}
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
{f. vsv f \<and> \<D>\<^sub>\<circ> f = 0 \<and> (\<forall>i\<in>elts 0. f\<lparr>i\<rparr> \<in>\<^sub>\<circ> A i)} = {0}

goal (1 subgoal):
 1. vproduct 0 A = set {0}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
{f. vsv f \<and> \<D>\<^sub>\<circ> f = 0 \<and> (\<forall>i\<in>elts 0. f\<lparr>i\<rparr> \<in>\<^sub>\<circ> A i)} = {0}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
{f. vsv f \<and> \<D>\<^sub>\<circ> f = 0 \<and> (\<forall>i\<in>elts 0. f\<lparr>i\<rparr> \<in>\<^sub>\<circ> A i)} = {0}

goal (1 subgoal):
 1. vproduct 0 A = set {0}
[PROOF STEP]
unfolding vproduct_def
[PROOF STATE]
proof (prove)
using this:
{f. vsv f \<and> \<D>\<^sub>\<circ> f = 0 \<and> (\<forall>i\<in>elts 0. f\<lparr>i\<rparr> \<in>\<^sub>\<circ> A i)} = {0}

goal (1 subgoal):
 1. set {f. vsv f \<and> \<D>\<^sub>\<circ> f = 0 \<and> (\<forall>i\<in>elts 0. f\<lparr>i\<rparr> \<in>\<^sub>\<circ> A i)} = set {0}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
vproduct 0 A = set {0}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma finite_total_preorder_on_map:
  assumes "finite (f -` carrier)"
  shows   "finite_total_preorder_on (f -` carrier) (map_relation f le)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite_total_preorder_on (f -` carrier) (map_relation f le)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite_total_preorder_on (f -` carrier) (map_relation f le)
[PROOF STEP]
interpret R': total_preorder_on "f -` carrier" "map_relation f le"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. total_preorder_on (f -` carrier) (map_relation f le)
[PROOF STEP]
using total_preorder_on_map[of f]
[PROOF STATE]
proof (prove)
using this:
total_preorder_on (f -` carrier) (map_relation f le)

goal (1 subgoal):
 1. total_preorder_on (f -` carrier) (map_relation f le)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite_total_preorder_on (f -` carrier) (map_relation f le)
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
finite (f -` carrier)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
finite (f -` carrier)

goal (1 subgoal):
 1. finite_total_preorder_on (f -` carrier) (map_relation f le)
[PROOF STEP]
by unfold_locales simp
[PROOF STATE]
proof (state)
this:
finite_total_preorder_on (f -` carrier) (map_relation f le)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma is_orthogonal_closure_cspan:
  assumes "\<And>x y. x \<in> X \<Longrightarrow> y \<in> Y \<Longrightarrow> is_orthogonal x y"
  assumes \<open>x \<in> closure (cspan X)\<close> \<open>y \<in> closure (cspan Y)\<close>
  shows "is_orthogonal x y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_orthogonal x y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. is_orthogonal x y
[PROOF STEP]
have *: \<open>cinner x y = 0\<close> if \<open>y \<in> Y\<close> for y
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_orthogonal x y
[PROOF STEP]
using bounded_antilinear_cinner_left
[PROOF STATE]
proof (prove)
using this:
bounded_antilinear (\<lambda>a. a \<bullet>\<^sub>C ?b)

goal (1 subgoal):
 1. is_orthogonal x y
[PROOF STEP]
apply (rule bounded_antilinear_eq_on[where G=X])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. bounded_antilinear (\<lambda>a. 0)
 2. \<And>x. x \<in> X \<Longrightarrow> is_orthogonal x y
 3. x \<in> closure (cspan X)
[PROOF STEP]
using assms that
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?x \<in> X; ?y \<in> Y\<rbrakk> \<Longrightarrow> is_orthogonal ?x ?y
x \<in> closure (cspan X)
y \<in> closure (cspan Y)
y \<in> Y

goal (3 subgoals):
 1. bounded_antilinear (\<lambda>a. 0)
 2. \<And>x. x \<in> X \<Longrightarrow> is_orthogonal x y
 3. x \<in> closure (cspan X)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
?y \<in> Y \<Longrightarrow> is_orthogonal x ?y

goal (1 subgoal):
 1. is_orthogonal x y
[PROOF STEP]
show \<open>cinner x y = 0\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_orthogonal x y
[PROOF STEP]
using bounded_clinear_cinner_right
[PROOF STATE]
proof (prove)
using this:
bounded_clinear ((\<bullet>\<^sub>C) ?a)

goal (1 subgoal):
 1. is_orthogonal x y
[PROOF STEP]
apply (rule bounded_clinear_eq_on[where G=Y])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. bounded_clinear (\<lambda>a. 0)
 2. \<And>xa. xa \<in> Y \<Longrightarrow> is_orthogonal x xa
 3. y \<in> closure (cspan Y)
[PROOF STEP]
using * assms
[PROOF STATE]
proof (prove)
using this:
?y \<in> Y \<Longrightarrow> is_orthogonal x ?y
\<lbrakk>?x \<in> X; ?y \<in> Y\<rbrakk> \<Longrightarrow> is_orthogonal ?x ?y
x \<in> closure (cspan X)
y \<in> closure (cspan Y)

goal (3 subgoals):
 1. bounded_clinear (\<lambda>a. 0)
 2. \<And>xa. xa \<in> Y \<Longrightarrow> is_orthogonal x xa
 3. y \<in> closure (cspan Y)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
is_orthogonal x y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in bounded_bilinear) tendsto_left_zero:
  "(f \<longlongrightarrow> 0) F \<Longrightarrow> ((\<lambda>x. f x ** c) \<longlongrightarrow> 0) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<longlongrightarrow> (0::'a)) F \<Longrightarrow> ((\<lambda>x. f x ** c) \<longlongrightarrow> (0::'c)) F
[PROOF STEP]
by (rule bounded_linear.tendsto_zero [OF bounded_linear_left])


[STATEMENT]
lemma monotone_connex_image:
  assumes mono: "monotone_on I (\<preceq>) (\<sqsubseteq>) f"
  assumes connex: "connex I (\<preceq>)"
  shows "connex (f ` I) (\<sqsubseteq>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connex (f ` I) (\<sqsubseteq>)
[PROOF STEP]
proof (rule connexI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> f ` I; y \<in> f ` I\<rbrakk> \<Longrightarrow> x \<sqsubseteq> y \<or> y \<sqsubseteq> x
[PROOF STEP]
fix x y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> f ` I; y \<in> f ` I\<rbrakk> \<Longrightarrow> x \<sqsubseteq> y \<or> y \<sqsubseteq> x
[PROOF STEP]
assume "x \<in> f ` I" and "y \<in> f ` I"
[PROOF STATE]
proof (state)
this:
x \<in> f ` I
y \<in> f ` I

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> f ` I; y \<in> f ` I\<rbrakk> \<Longrightarrow> x \<sqsubseteq> y \<or> y \<sqsubseteq> x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> f ` I
y \<in> f ` I
[PROOF STEP]
obtain i j where ij: "i \<in> I" "j \<in> I" and [simp]: "x = f i" "y = f j"
[PROOF STATE]
proof (prove)
using this:
x \<in> f ` I
y \<in> f ` I

goal (1 subgoal):
 1. (\<And>i j. \<lbrakk>i \<in> I; j \<in> I; x = f i; y = f j\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
i \<in> I
j \<in> I
x = f i
y = f j

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> f ` I; y \<in> f ` I\<rbrakk> \<Longrightarrow> x \<sqsubseteq> y \<or> y \<sqsubseteq> x
[PROOF STEP]
from connex ij
[PROOF STATE]
proof (chain)
picking this:
connex I (\<preceq>)
i \<in> I
j \<in> I
[PROOF STEP]
have "i \<preceq> j \<or> j \<preceq> i"
[PROOF STATE]
proof (prove)
using this:
connex I (\<preceq>)
i \<in> I
j \<in> I

goal (1 subgoal):
 1. i \<preceq> j \<or> j \<preceq> i
[PROOF STEP]
by (auto elim: connexE)
[PROOF STATE]
proof (state)
this:
i \<preceq> j \<or> j \<preceq> i

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> f ` I; y \<in> f ` I\<rbrakk> \<Longrightarrow> x \<sqsubseteq> y \<or> y \<sqsubseteq> x
[PROOF STEP]
with ij mono
[PROOF STATE]
proof (chain)
picking this:
i \<in> I
j \<in> I
Binary_Relations.monotone_on I (\<preceq>) (\<sqsubseteq>) f
i \<preceq> j \<or> j \<preceq> i
[PROOF STEP]
show "x \<sqsubseteq> y \<or> y \<sqsubseteq> x"
[PROOF STATE]
proof (prove)
using this:
i \<in> I
j \<in> I
Binary_Relations.monotone_on I (\<preceq>) (\<sqsubseteq>) f
i \<preceq> j \<or> j \<preceq> i

goal (1 subgoal):
 1. x \<sqsubseteq> y \<or> y \<sqsubseteq> x
[PROOF STEP]
by (elim disjE, auto dest: monotone_onD)
[PROOF STATE]
proof (state)
this:
x \<sqsubseteq> y \<or> y \<sqsubseteq> x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma bl_to_bin_rep_False: "bl_to_bin (replicate n False) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bl_to_bin (replicate n False) = 0
[PROOF STEP]
by (induct n) auto


[STATEMENT]
lemma open_ne_zero: "open {x::'a::t1_space. x \<noteq> c}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. open {x. x \<noteq> c}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. open {x. x \<noteq> c}
[PROOF STEP]
have "{x::'a. x \<noteq> c} = UNIV - {c}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x. x \<noteq> c} = UNIV - {c}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{x. x \<noteq> c} = UNIV - {c}

goal (1 subgoal):
 1. open {x. x \<noteq> c}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
{x. x \<noteq> c} = UNIV - {c}

goal (1 subgoal):
 1. open {x. x \<noteq> c}
[PROOF STEP]
have "open \<dots>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. open (UNIV - {c})
[PROOF STEP]
by (rule open_delete; rule open_UNIV)
[PROOF STATE]
proof (state)
this:
open (UNIV - {c})

goal (1 subgoal):
 1. open {x. x \<noteq> c}
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
open {x. x \<noteq> c}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
open {x. x \<noteq> c}

goal (1 subgoal):
 1. open {x. x \<noteq> c}
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
open {x. x \<noteq> c}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma mset_replicate_mono:
  assumes "m1 \<subseteq># m2"
  shows "\<Sum>\<^sub># (mset (replicate n m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate n m2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Sum>\<^sub># (mset (replicate n m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate n m2))
[PROOF STEP]
proof (induct n)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<Sum>\<^sub># (mset (replicate 0 m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate 0 m2))
 2. \<And>n. \<Sum>\<^sub># (mset (replicate n m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate n m2)) \<Longrightarrow> \<Sum>\<^sub># (mset (replicate (Suc n) m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate (Suc n) m2))
[PROOF STEP]
case (Suc n)
[PROOF STATE]
proof (state)
this:
\<Sum>\<^sub># (mset (replicate n m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate n m2))

goal (2 subgoals):
 1. \<Sum>\<^sub># (mset (replicate 0 m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate 0 m2))
 2. \<And>n. \<Sum>\<^sub># (mset (replicate n m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate n m2)) \<Longrightarrow> \<Sum>\<^sub># (mset (replicate (Suc n) m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate (Suc n) m2))
[PROOF STEP]
have "\<Sum>\<^sub># (mset (replicate (Suc n) m1)) =
    \<Sum>\<^sub># (mset (replicate n m1)) + m1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Sum>\<^sub># (mset (replicate (Suc n) m1)) = \<Sum>\<^sub># (mset (replicate n m1)) + m1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<Sum>\<^sub># (mset (replicate (Suc n) m1)) = \<Sum>\<^sub># (mset (replicate n m1)) + m1

goal (2 subgoals):
 1. \<Sum>\<^sub># (mset (replicate 0 m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate 0 m2))
 2. \<And>n. \<Sum>\<^sub># (mset (replicate n m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate n m2)) \<Longrightarrow> \<Sum>\<^sub># (mset (replicate (Suc n) m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate (Suc n) m2))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<Sum>\<^sub># (mset (replicate (Suc n) m1)) = \<Sum>\<^sub># (mset (replicate n m1)) + m1

goal (2 subgoals):
 1. \<Sum>\<^sub># (mset (replicate 0 m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate 0 m2))
 2. \<And>n. \<Sum>\<^sub># (mset (replicate n m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate n m2)) \<Longrightarrow> \<Sum>\<^sub># (mset (replicate (Suc n) m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate (Suc n) m2))
[PROOF STEP]
have "\<dots> \<subseteq># \<Sum>\<^sub># (mset (replicate n m1)) + m2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Sum>\<^sub># (mset (replicate n m1)) + m1 \<subseteq># \<Sum>\<^sub># (mset (replicate n m1)) + m2
[PROOF STEP]
using \<open>m1 \<subseteq># m2\<close>
[PROOF STATE]
proof (prove)
using this:
m1 \<subseteq># m2

goal (1 subgoal):
 1. \<Sum>\<^sub># (mset (replicate n m1)) + m1 \<subseteq># \<Sum>\<^sub># (mset (replicate n m1)) + m2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<Sum>\<^sub># (mset (replicate n m1)) + m1 \<subseteq># \<Sum>\<^sub># (mset (replicate n m1)) + m2

goal (2 subgoals):
 1. \<Sum>\<^sub># (mset (replicate 0 m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate 0 m2))
 2. \<And>n. \<Sum>\<^sub># (mset (replicate n m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate n m2)) \<Longrightarrow> \<Sum>\<^sub># (mset (replicate (Suc n) m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate (Suc n) m2))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<Sum>\<^sub># (mset (replicate n m1)) + m1 \<subseteq># \<Sum>\<^sub># (mset (replicate n m1)) + m2

goal (2 subgoals):
 1. \<Sum>\<^sub># (mset (replicate 0 m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate 0 m2))
 2. \<And>n. \<Sum>\<^sub># (mset (replicate n m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate n m2)) \<Longrightarrow> \<Sum>\<^sub># (mset (replicate (Suc n) m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate (Suc n) m2))
[PROOF STEP]
have "\<dots> \<subseteq># \<Sum>\<^sub># (mset (replicate n m2)) + m2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Sum>\<^sub># (mset (replicate n m1)) + m2 \<subseteq># \<Sum>\<^sub># (mset (replicate n m2)) + m2
[PROOF STEP]
using Suc
[PROOF STATE]
proof (prove)
using this:
\<Sum>\<^sub># (mset (replicate n m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate n m2))

goal (1 subgoal):
 1. \<Sum>\<^sub># (mset (replicate n m1)) + m2 \<subseteq># \<Sum>\<^sub># (mset (replicate n m2)) + m2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<Sum>\<^sub># (mset (replicate n m1)) + m2 \<subseteq># \<Sum>\<^sub># (mset (replicate n m2)) + m2

goal (2 subgoals):
 1. \<Sum>\<^sub># (mset (replicate 0 m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate 0 m2))
 2. \<And>n. \<Sum>\<^sub># (mset (replicate n m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate n m2)) \<Longrightarrow> \<Sum>\<^sub># (mset (replicate (Suc n) m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate (Suc n) m2))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<Sum>\<^sub># (mset (replicate (Suc n) m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate n m2)) + m2
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<Sum>\<^sub># (mset (replicate (Suc n) m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate n m2)) + m2

goal (1 subgoal):
 1. \<Sum>\<^sub># (mset (replicate (Suc n) m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate (Suc n) m2))
[PROOF STEP]
by (simp add: union_commute)
[PROOF STATE]
proof (state)
this:
\<Sum>\<^sub># (mset (replicate (Suc n) m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate (Suc n) m2))

goal (1 subgoal):
 1. \<Sum>\<^sub># (mset (replicate 0 m1)) \<subseteq># \<Sum>\<^sub># (mset (replicate 0 m2))
[PROOF STEP]
qed simp


[STATEMENT]
lemma index_distinct_eqI:
  assumes "distinct xs" "i < length xs" "xs ! i = x"
  shows   "index xs x = i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. index xs x = i
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
distinct xs
i < length xs
xs ! i = x

goal (1 subgoal):
 1. index xs x = i
[PROOF STEP]
by (induction xs arbitrary: i) (auto simp: nth_Cons split: nat.splits)


[STATEMENT]
lemma continuous_rabs [continuous_intros]:
  "continuous F f \<Longrightarrow> continuous F (\<lambda>x. \<bar>f x :: real\<bar>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous F f \<Longrightarrow> continuous F (\<lambda>x. \<bar>f x\<bar>)
[PROOF STEP]
unfolding real_norm_def[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous F f \<Longrightarrow> continuous F (\<lambda>x. norm (f x))
[PROOF STEP]
by (rule continuous_norm)


[STATEMENT]
lemma tllist_equivp [quot_equiv]:
  "\<lbrakk> equivp R; equivp S \<rbrakk> \<Longrightarrow> equivp (tllist_all2 R S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>equivp R; equivp S\<rbrakk> \<Longrightarrow> equivp (tllist_all2 R S)
[PROOF STEP]
by (simp add: equivp_reflp_symp_transp reflp_tllist_all2 symp_tllist_all2 transp_tllist_all2)


[STATEMENT]
lemma Rf_mono_on_iia_on:
  shows "mono_on (Pow A) (Rf f) \<longleftrightarrow> iia_on A f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Basis.mono_on (Pow A) (Rf f) = iia_on A f
[PROOF STEP]
unfolding %invisible iia_on_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Basis.mono_on (Pow A) (Rf f) = (\<forall>B\<subseteq>A. \<forall>C\<subseteq>B. \<forall>a\<in>C. a \<in> f B \<longrightarrow> a \<in> f C)
[PROOF STEP]
by (rule iffI) (blast elim: mono_onE intro!: mono_onI)+


[STATEMENT]
lemma isnormNum0[simp]: "isnormNum x \<Longrightarrow> INum x = (0::'a::field_char_0) \<longleftrightarrow> x = 0\<^sub>N"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. isnormNum x \<Longrightarrow> (INum x = (0::'a)) = (x = 0\<^sub>N)
[PROOF STEP]
unfolding INum_int(2)[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. isnormNum x \<Longrightarrow> (INum x = INum 0\<^sub>N) = (x = 0\<^sub>N)
[PROOF STEP]
by (rule isnormNum_unique) simp_all


[STATEMENT]
lemma summable_zero_power' [simp]: "summable (\<lambda>n. f n * 0 ^ n :: 'a::{ring_1,topological_space})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. summable (\<lambda>n. f n * (0::'a) ^ n)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. summable (\<lambda>n. f n * (0::'a) ^ n)
[PROOF STEP]
have "(\<lambda>n. f n * 0 ^ n :: 'a) = (\<lambda>n. if n = 0 then f 0 * 0^0 else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. f n * (0::'a) ^ n) = (\<lambda>n. if n = 0 then f 0 * (0::'a) ^ 0 else (0::'a))
[PROOF STEP]
by (intro ext) (simp add: zero_power)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. f n * (0::'a) ^ n) = (\<lambda>n. if n = 0 then f 0 * (0::'a) ^ 0 else (0::'a))

goal (1 subgoal):
 1. summable (\<lambda>n. f n * (0::'a) ^ n)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(\<lambda>n. f n * (0::'a) ^ n) = (\<lambda>n. if n = 0 then f 0 * (0::'a) ^ 0 else (0::'a))

goal (1 subgoal):
 1. summable (\<lambda>n. f n * (0::'a) ^ n)
[PROOF STEP]
have "summable \<dots>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. summable (\<lambda>n. if n = 0 then f 0 * (0::'a) ^ 0 else (0::'a))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
summable (\<lambda>n. if n = 0 then f 0 * (0::'a) ^ 0 else (0::'a))

goal (1 subgoal):
 1. summable (\<lambda>n. f n * (0::'a) ^ n)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. f n * (0::'a) ^ n) = (\<lambda>n. if n = 0 then f 0 * (0::'a) ^ 0 else (0::'a))
summable (\<lambda>n. if n = 0 then f 0 * (0::'a) ^ 0 else (0::'a))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. f n * (0::'a) ^ n) = (\<lambda>n. if n = 0 then f 0 * (0::'a) ^ 0 else (0::'a))
summable (\<lambda>n. if n = 0 then f 0 * (0::'a) ^ 0 else (0::'a))

goal (1 subgoal):
 1. summable (\<lambda>n. f n * (0::'a) ^ n)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
summable (\<lambda>n. f n * (0::'a) ^ n)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma cycles_commute:
  assumes "cycle p" "cycle q" and "set p \<inter> set q = {}"
  shows "(cycle_of_list p) \<circ> (cycle_of_list q) = (cycle_of_list q) \<circ> (cycle_of_list p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cycle_of_list p \<circ> cycle_of_list q = cycle_of_list q \<circ> cycle_of_list p
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. (cycle_of_list p \<circ> cycle_of_list q) x = (cycle_of_list q \<circ> cycle_of_list p) x
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. (cycle_of_list p \<circ> cycle_of_list q) x = (cycle_of_list q \<circ> cycle_of_list p) x
[PROOF STEP]
fix p :: "'a list" and q :: "'a list" and i :: "'a"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. (cycle_of_list p \<circ> cycle_of_list q) x = (cycle_of_list q \<circ> cycle_of_list p) x
[PROOF STEP]
assume A: "cycle p" "cycle q" "set p \<inter> set q = {}" "i \<in> set p" "i \<notin> set q"
[PROOF STATE]
proof (state)
this:
cycle p
cycle q
set p \<inter> set q = {}
i \<in> set p
i \<notin> set q

goal (1 subgoal):
 1. \<And>x. (cycle_of_list p \<circ> cycle_of_list q) x = (cycle_of_list q \<circ> cycle_of_list p) x
[PROOF STEP]
have "((cycle_of_list p) \<circ> (cycle_of_list q)) i =
          ((cycle_of_list q) \<circ> (cycle_of_list p)) i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
[PROOF STEP]
have "((cycle_of_list p) \<circ> (cycle_of_list q)) i = (cycle_of_list p) i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (cycle_of_list p \<circ> cycle_of_list q) i = cycle_of_list p i
[PROOF STEP]
using id_outside_supp[OF A(5)]
[PROOF STATE]
proof (prove)
using this:
cycle_of_list q i = i

goal (1 subgoal):
 1. (cycle_of_list p \<circ> cycle_of_list q) i = cycle_of_list p i
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(cycle_of_list p \<circ> cycle_of_list q) i = cycle_of_list p i

goal (1 subgoal):
 1. (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(cycle_of_list p \<circ> cycle_of_list q) i = cycle_of_list p i

goal (1 subgoal):
 1. (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
[PROOF STEP]
have " ... = ((cycle_of_list q) \<circ> (cycle_of_list p)) i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cycle_of_list p i = (cycle_of_list q \<circ> cycle_of_list p) i
[PROOF STEP]
using id_outside_supp[of "(cycle_of_list p) i"] cycle_is_surj[OF A(1)] A(3,4)
[PROOF STATE]
proof (prove)
using this:
cycle_of_list p i \<notin> set ?cs \<Longrightarrow> cycle_of_list ?cs (cycle_of_list p i) = cycle_of_list p i
cycle_of_list p ` set p = set p
set p \<inter> set q = {}
i \<in> set p

goal (1 subgoal):
 1. cycle_of_list p i = (cycle_of_list q \<circ> cycle_of_list p) i
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
cycle_of_list p i = (cycle_of_list q \<circ> cycle_of_list p) i

goal (1 subgoal):
 1. (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i

goal (1 subgoal):
 1. (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i

goal (1 subgoal):
 1. \<And>x. (cycle_of_list p \<circ> cycle_of_list q) x = (cycle_of_list q \<circ> cycle_of_list p) x
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<lbrakk>cycle ?pa2; cycle ?qa2; set ?pa2 \<inter> set ?qa2 = {}; ?i2 \<in> set ?pa2; ?i2 \<notin> set ?qa2\<rbrakk> \<Longrightarrow> (cycle_of_list ?pa2 \<circ> cycle_of_list ?qa2) ?i2 = (cycle_of_list ?qa2 \<circ> cycle_of_list ?pa2) ?i2

goal (1 subgoal):
 1. \<And>x. (cycle_of_list p \<circ> cycle_of_list q) x = (cycle_of_list q \<circ> cycle_of_list p) x
[PROOF STEP]
note aui_lemma = this
[PROOF STATE]
proof (state)
this:
\<lbrakk>cycle ?pa2; cycle ?qa2; set ?pa2 \<inter> set ?qa2 = {}; ?i2 \<in> set ?pa2; ?i2 \<notin> set ?qa2\<rbrakk> \<Longrightarrow> (cycle_of_list ?pa2 \<circ> cycle_of_list ?qa2) ?i2 = (cycle_of_list ?qa2 \<circ> cycle_of_list ?pa2) ?i2

goal (1 subgoal):
 1. \<And>x. (cycle_of_list p \<circ> cycle_of_list q) x = (cycle_of_list q \<circ> cycle_of_list p) x
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. (cycle_of_list p \<circ> cycle_of_list q) x = (cycle_of_list q \<circ> cycle_of_list p) x
[PROOF STEP]
consider "i \<in> set p" "i \<notin> set q" | "i \<notin> set p" "i \<in> set q" | "i \<notin> set p" "i \<notin> set q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<lbrakk>i \<in> set p; i \<notin> set q\<rbrakk> \<Longrightarrow> thesis; \<lbrakk>i \<notin> set p; i \<in> set q\<rbrakk> \<Longrightarrow> thesis; \<lbrakk>i \<notin> set p; i \<notin> set q\<rbrakk> \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
using \<open>set p \<inter> set q = {}\<close>
[PROOF STATE]
proof (prove)
using this:
set p \<inter> set q = {}

goal (1 subgoal):
 1. \<lbrakk>\<lbrakk>i \<in> set p; i \<notin> set q\<rbrakk> \<Longrightarrow> thesis; \<lbrakk>i \<notin> set p; i \<in> set q\<rbrakk> \<Longrightarrow> thesis; \<lbrakk>i \<notin> set p; i \<notin> set q\<rbrakk> \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<lbrakk>\<lbrakk>i \<in> set p; i \<notin> set q\<rbrakk> \<Longrightarrow> ?thesis; \<lbrakk>i \<notin> set p; i \<in> set q\<rbrakk> \<Longrightarrow> ?thesis; \<lbrakk>i \<notin> set p; i \<notin> set q\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. \<And>x. (cycle_of_list p \<circ> cycle_of_list q) x = (cycle_of_list q \<circ> cycle_of_list p) x
[PROOF STEP]
thus "((cycle_of_list p) \<circ> (cycle_of_list q)) i = ((cycle_of_list q) \<circ> (cycle_of_list p)) i"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<lbrakk>i \<in> set p; i \<notin> set q\<rbrakk> \<Longrightarrow> ?thesis; \<lbrakk>i \<notin> set p; i \<in> set q\<rbrakk> \<Longrightarrow> ?thesis; \<lbrakk>i \<notin> set p; i \<notin> set q\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<lbrakk>i \<in> set p; i \<notin> set q\<rbrakk> \<Longrightarrow> (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
 2. \<lbrakk>i \<notin> set p; i \<in> set q\<rbrakk> \<Longrightarrow> (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
 3. \<lbrakk>i \<notin> set p; i \<notin> set q\<rbrakk> \<Longrightarrow> (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
[PROOF STEP]
case 1
[PROOF STATE]
proof (state)
this:
i \<in> set p
i \<notin> set q

goal (3 subgoals):
 1. \<lbrakk>i \<in> set p; i \<notin> set q\<rbrakk> \<Longrightarrow> (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
 2. \<lbrakk>i \<notin> set p; i \<in> set q\<rbrakk> \<Longrightarrow> (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
 3. \<lbrakk>i \<notin> set p; i \<notin> set q\<rbrakk> \<Longrightarrow> (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
i \<in> set p
i \<notin> set q

goal (1 subgoal):
 1. (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
[PROOF STEP]
using aui_lemma[OF assms]
[PROOF STATE]
proof (prove)
using this:
i \<in> set p
i \<notin> set q
\<lbrakk>?i2 \<in> set p; ?i2 \<notin> set q\<rbrakk> \<Longrightarrow> (cycle_of_list p \<circ> cycle_of_list q) ?i2 = (cycle_of_list q \<circ> cycle_of_list p) ?i2

goal (1 subgoal):
 1. (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i

goal (2 subgoals):
 1. \<lbrakk>i \<notin> set p; i \<in> set q\<rbrakk> \<Longrightarrow> (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
 2. \<lbrakk>i \<notin> set p; i \<notin> set q\<rbrakk> \<Longrightarrow> (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>i \<notin> set p; i \<in> set q\<rbrakk> \<Longrightarrow> (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
 2. \<lbrakk>i \<notin> set p; i \<notin> set q\<rbrakk> \<Longrightarrow> (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
[PROOF STEP]
case 2
[PROOF STATE]
proof (state)
this:
i \<notin> set p
i \<in> set q

goal (2 subgoals):
 1. \<lbrakk>i \<notin> set p; i \<in> set q\<rbrakk> \<Longrightarrow> (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
 2. \<lbrakk>i \<notin> set p; i \<notin> set q\<rbrakk> \<Longrightarrow> (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
i \<notin> set p
i \<in> set q

goal (1 subgoal):
 1. (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
[PROOF STEP]
using aui_lemma[OF assms(2,1)] assms(3)
[PROOF STATE]
proof (prove)
using this:
i \<notin> set p
i \<in> set q
\<lbrakk>set q \<inter> set p = {}; ?i2 \<in> set q; ?i2 \<notin> set p\<rbrakk> \<Longrightarrow> (cycle_of_list q \<circ> cycle_of_list p) ?i2 = (cycle_of_list p \<circ> cycle_of_list q) ?i2
set p \<inter> set q = {}

goal (1 subgoal):
 1. (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
[PROOF STEP]
by (simp add: ac_simps)
[PROOF STATE]
proof (state)
this:
(cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i

goal (1 subgoal):
 1. \<lbrakk>i \<notin> set p; i \<notin> set q\<rbrakk> \<Longrightarrow> (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>i \<notin> set p; i \<notin> set q\<rbrakk> \<Longrightarrow> (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
[PROOF STEP]
case 3
[PROOF STATE]
proof (state)
this:
i \<notin> set p
i \<notin> set q

goal (1 subgoal):
 1. \<lbrakk>i \<notin> set p; i \<notin> set q\<rbrakk> \<Longrightarrow> (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
i \<notin> set p
i \<notin> set q

goal (1 subgoal):
 1. (cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i
[PROOF STEP]
by (simp add: id_outside_supp)
[PROOF STATE]
proof (state)
this:
(cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(cycle_of_list p \<circ> cycle_of_list q) i = (cycle_of_list q \<circ> cycle_of_list p) i

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in vectorspace) lincomb_is_linear:
  fixes S
  assumes h: "finite S" and h2: "S\<subseteq>carrier V"
  shows "linear_map K (func_space S) V (\<lambda>a. lincomb a S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. linear_map K (func_space S) V (\<lambda>a. lincomb a S)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. linear_map K (func_space S) V (\<lambda>a. lincomb a S)
[PROOF STEP]
have 0: "vectorspace K V"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vectorspace K V
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
vectorspace K V

goal (1 subgoal):
 1. linear_map K (func_space S) V (\<lambda>a. lincomb a S)
[PROOF STEP]
from h h2
[PROOF STATE]
proof (chain)
picking this:
finite S
S \<subseteq> carrier V
[PROOF STEP]
have 1: "mod_hom K (func_space S) V (\<lambda>a. lincomb a S)"
[PROOF STATE]
proof (prove)
using this:
finite S
S \<subseteq> carrier V

goal (1 subgoal):
 1. mod_hom K (func_space S) V (\<lambda>a. lincomb a S)
[PROOF STEP]
by (rule lincomb_is_mod_hom)
[PROOF STATE]
proof (state)
this:
mod_hom K (func_space S) V (\<lambda>a. lincomb a S)

goal (1 subgoal):
 1. linear_map K (func_space S) V (\<lambda>a. lincomb a S)
[PROOF STEP]
from 0 1
[PROOF STATE]
proof (chain)
picking this:
vectorspace K V
mod_hom K (func_space S) V (\<lambda>a. lincomb a S)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
vectorspace K V
mod_hom K (func_space S) V (\<lambda>a. lincomb a S)

goal (1 subgoal):
 1. linear_map K (func_space S) V (\<lambda>a. lincomb a S)
[PROOF STEP]
by (unfold vectorspace_def mod_hom_def linear_map_def, auto)
[PROOF STATE]
proof (state)
this:
linear_map K (func_space S) V (\<lambda>a. lincomb a S)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma poincare_map_onto:
  assumes "closed P"
  assumes "0 < t" "t \<in> existence_ivl0 x" "\<forall>\<^sub>F t in at_right 0. flow0 x t \<notin> P"
  assumes "flow0 x t \<in> P"
  shows "poincare_map P x \<in> flow0 x ` {0 <.. t} \<inter> P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poincare_map P x \<in> flow0 x ` {0<..t} \<inter> P
[PROOF STEP]
proof (rule IntI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. poincare_map P x \<in> flow0 x ` {0<..t}
 2. poincare_map P x \<in> P
[PROOF STEP]
have "returns_to P x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. returns_to P x
[PROOF STEP]
by (rule returns_toI) (rule assms)+
[PROOF STATE]
proof (state)
this:
returns_to P x

goal (2 subgoals):
 1. poincare_map P x \<in> flow0 x ` {0<..t}
 2. poincare_map P x \<in> P
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
returns_to P x
[PROOF STEP]
have "return_time P x \<in> {0<..t}"
[PROOF STATE]
proof (prove)
using this:
returns_to P x

goal (1 subgoal):
 1. return_time P x \<in> {0<..t}
[PROOF STEP]
by (auto intro!: return_time_pos assms return_time_le)
[PROOF STATE]
proof (state)
this:
return_time P x \<in> {0<..t}

goal (2 subgoals):
 1. poincare_map P x \<in> flow0 x ` {0<..t}
 2. poincare_map P x \<in> P
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
return_time P x \<in> {0<..t}
[PROOF STEP]
show "poincare_map P x \<in> flow0 x ` {0<..t}"
[PROOF STATE]
proof (prove)
using this:
return_time P x \<in> {0<..t}

goal (1 subgoal):
 1. poincare_map P x \<in> flow0 x ` {0<..t}
[PROOF STEP]
by (auto simp: poincare_map_def)
[PROOF STATE]
proof (state)
this:
poincare_map P x \<in> flow0 x ` {0<..t}

goal (1 subgoal):
 1. poincare_map P x \<in> P
[PROOF STEP]
show "poincare_map P x \<in> P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poincare_map P x \<in> P
[PROOF STEP]
by (auto intro!: poincare_map_returns \<open>returns_to _ _\<close> \<open>closed _\<close>)
[PROOF STATE]
proof (state)
this:
poincare_map P x \<in> P

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma robdd_\<alpha>_simps_leafs [simp] :
  "robdd_\<alpha> (robdd_leaf f1) = robdd_\<alpha> (robdd_leaf f2) \<longleftrightarrow> (f1 = f2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (robdd_\<alpha> (robdd_leaf f1) = robdd_\<alpha> (robdd_leaf f2)) = (f1 = f2)
[PROOF STEP]
by (simp add: fun_eq_iff)


[STATEMENT]
lemma group_closure_sum:
  fixes S :: "int set"
  assumes X: "finite X" "X \<noteq> {}" "X \<subseteq> S"
  shows "(\<Sum>x\<in>X. a x * x) \<in> group_closure S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>x\<in>X. a x * x) \<in> group_closure S
[PROOF STEP]
using X
[PROOF STATE]
proof (prove)
using this:
finite X
X \<noteq> {}
X \<subseteq> S

goal (1 subgoal):
 1. (\<Sum>x\<in>X. a x * x) \<in> group_closure S
[PROOF STEP]
by (induction X rule: finite_ne_induct)
    (auto intro: group_closure_mult_right group_closure.base group_closure_add)


[STATEMENT]
lemma finite_length_sum_set: "finite (length_sum_set r n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (length_sum_set r n)
[PROOF STEP]
proof (induction r arbitrary: n)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>n. finite (length_sum_set 0 n)
 2. \<And>r n. (\<And>n. finite (length_sum_set r n)) \<Longrightarrow> finite (length_sum_set (Suc r) n)
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. \<And>n. finite (length_sum_set 0 n)
 2. \<And>r n. (\<And>n. finite (length_sum_set r n)) \<Longrightarrow> finite (length_sum_set (Suc r) n)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (length_sum_set 0 n)
[PROOF STEP]
by (auto simp: length_sum_set_def)
[PROOF STATE]
proof (state)
this:
finite (length_sum_set 0 n)

goal (1 subgoal):
 1. \<And>r n. (\<And>n. finite (length_sum_set r n)) \<Longrightarrow> finite (length_sum_set (Suc r) n)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>r n. (\<And>n. finite (length_sum_set r n)) \<Longrightarrow> finite (length_sum_set (Suc r) n)
[PROOF STEP]
case (Suc r)
[PROOF STATE]
proof (state)
this:
finite (length_sum_set r ?n1)

goal (1 subgoal):
 1. \<And>r n. (\<And>n. finite (length_sum_set r n)) \<Longrightarrow> finite (length_sum_set (Suc r) n)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite (length_sum_set r ?n1)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
finite (length_sum_set r ?n1)

goal (1 subgoal):
 1. finite (length_sum_set (Suc r) n)
[PROOF STEP]
using length_sum_set_Suc_eqpoll eqpoll_finite_iff
[PROOF STATE]
proof (prove)
using this:
finite (length_sum_set r ?n1)
length_sum_set (Suc ?r) ?n \<approx> (SIGMA i:{..?n}. length_sum_set ?r (?n - i))
?A \<approx> ?B \<Longrightarrow> finite ?A = finite ?B

goal (1 subgoal):
 1. finite (length_sum_set (Suc r) n)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
finite (length_sum_set (Suc r) n)

goal:
No subgoals!
[PROOF STEP]
qed