[STATEMENT]
lemma cindex_path_joinpaths:
  assumes "finite_axes_cross g1 z" "finite_axes_cross g2 z"
    and "path g1" "path g2" "pathfinish g1 = pathstart g2" "pathfinish g1\<noteq>z"
  shows "cindex_path (g1+++g2) z = cindex_path g1 z + jumpF_pathstart g2 z
            - jumpF_pathfinish g1 z  + cindex_path g2 z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_of_int (cindex_path (g1 +++ g2) z) = real_of_int (cindex_path g1 z) + jumpF_pathstart g2 z - jumpF_pathfinish g1 z + real_of_int (cindex_path g2 z)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. real_of_int (cindex_path (g1 +++ g2) z) = real_of_int (cindex_path g1 z) + jumpF_pathstart g2 z - jumpF_pathfinish g1 z + real_of_int (cindex_path g2 z)
[PROOF STEP]
define h12 where "h12 = (\<lambda>t. Im ((g1+++g2) t - z) / Re ((g1+++g2) t - z))"
[PROOF STATE]
proof (state)
this:
h12 = (\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z))

goal (1 subgoal):
 1. real_of_int (cindex_path (g1 +++ g2) z) = real_of_int (cindex_path g1 z) + jumpF_pathstart g2 z - jumpF_pathfinish g1 z + real_of_int (cindex_path g2 z)
[PROOF STEP]
let ?h = "\<lambda>g. \<lambda>t. Im (g t - z) / Re (g t - z)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. real_of_int (cindex_path (g1 +++ g2) z) = real_of_int (cindex_path g1 z) + jumpF_pathstart g2 z - jumpF_pathfinish g1 z + real_of_int (cindex_path g2 z)
[PROOF STEP]
have "cindex_path (g1+++g2) z = cindex 0 1 h12"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindex_path (g1 +++ g2) z = cindex 0 1 h12
[PROOF STEP]
unfolding cindex_path_def h12_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindex 0 1 (\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z)) = cindex 0 1 (\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
cindex_path (g1 +++ g2) z = cindex 0 1 h12

goal (1 subgoal):
 1. real_of_int (cindex_path (g1 +++ g2) z) = real_of_int (cindex_path g1 z) + jumpF_pathstart g2 z - jumpF_pathfinish g1 z + real_of_int (cindex_path g2 z)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
cindex_path (g1 +++ g2) z = cindex 0 1 h12

goal (1 subgoal):
 1. real_of_int (cindex_path (g1 +++ g2) z) = real_of_int (cindex_path g1 z) + jumpF_pathstart g2 z - jumpF_pathfinish g1 z + real_of_int (cindex_path g2 z)
[PROOF STEP]
have "... = cindex 0 (1/2) h12 + jump h12 (1/2) + cindex (1/2) 1 h12"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindex 0 1 h12 = cindex 0 (1 / 2) h12 + jump h12 (1 / 2) + cindex (1 / 2) 1 h12
[PROOF STEP]
proof (rule cindex_combine)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. finite {x. jump h12 x \<noteq> 0 \<and> 0 < x \<and> x < 1}
 2. 0 < 1 / 2
 3. 1 / 2 < 1
[PROOF STEP]
have "finite_axes_cross (g1+++g2) z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite_axes_cross (g1 +++ g2) z
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite_axes_cross g1 z
finite_axes_cross g2 z
path g1
path g2
pathfinish g1 = pathstart g2
pathfinish g1 \<noteq> z

goal (1 subgoal):
 1. finite_axes_cross (g1 +++ g2) z
[PROOF STEP]
by (auto intro:finite_cross_intros)
[PROOF STATE]
proof (state)
this:
finite_axes_cross (g1 +++ g2) z

goal (3 subgoals):
 1. finite {x. jump h12 x \<noteq> 0 \<and> 0 < x \<and> x < 1}
 2. 0 < 1 / 2
 3. 1 / 2 < 1
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite_axes_cross (g1 +++ g2) z
[PROOF STEP]
have "finite {t. Re ((g1+++g2) t - z) = 0 \<and> 0\<le>t \<and> t\<le>1}"
[PROOF STATE]
proof (prove)
using this:
finite_axes_cross (g1 +++ g2) z

goal (1 subgoal):
 1. finite {t. Re ((g1 +++ g2) t - z) = 0 \<and> 0 \<le> t \<and> t \<le> 1}
[PROOF STEP]
unfolding finite_axes_cross_def
[PROOF STATE]
proof (prove)
using this:
finite {t. (Re ((g1 +++ g2) t - z) = 0 \<or> Im ((g1 +++ g2) t - z) = 0) \<and> 0 \<le> t \<and> t \<le> 1}

goal (1 subgoal):
 1. finite {t. Re ((g1 +++ g2) t - z) = 0 \<and> 0 \<le> t \<and> t \<le> 1}
[PROOF STEP]
by (auto elim:rev_finite_subset)
[PROOF STATE]
proof (state)
this:
finite {t. Re ((g1 +++ g2) t - z) = 0 \<and> 0 \<le> t \<and> t \<le> 1}

goal (3 subgoals):
 1. finite {x. jump h12 x \<noteq> 0 \<and> 0 < x \<and> x < 1}
 2. 0 < 1 / 2
 3. 1 / 2 < 1
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
finite {t. Re ((g1 +++ g2) t - z) = 0 \<and> 0 \<le> t \<and> t \<le> 1}

goal (3 subgoals):
 1. finite {x. jump h12 x \<noteq> 0 \<and> 0 < x \<and> x < 1}
 2. 0 < 1 / 2
 3. 1 / 2 < 1
[PROOF STEP]
have " jump h12 t = 0" when "Re ((g1 +++ g2) t - z) \<noteq> 0" "0 < t" "t < 1" for t
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jump h12 t = 0
[PROOF STEP]
apply (rule jump_Im_divide_Re_0[of "\<lambda>t. (g1+++g2) t- z",folded h12_def,OF _ that])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path (\<lambda>t. (g1 +++ g2) t - z)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite_axes_cross g1 z
finite_axes_cross g2 z
path g1
path g2
pathfinish g1 = pathstart g2
pathfinish g1 \<noteq> z

goal (1 subgoal):
 1. path (\<lambda>t. (g1 +++ g2) t - z)
[PROOF STEP]
by (auto intro:path_offset)
[PROOF STATE]
proof (state)
this:
\<lbrakk>Re ((g1 +++ g2) ?t1 - z) \<noteq> 0; 0 < ?t1; ?t1 < 1\<rbrakk> \<Longrightarrow> jump h12 ?t1 = 0

goal (3 subgoals):
 1. finite {x. jump h12 x \<noteq> 0 \<and> 0 < x \<and> x < 1}
 2. 0 < 1 / 2
 3. 1 / 2 < 1
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
finite {t. Re ((g1 +++ g2) t - z) = 0 \<and> 0 \<le> t \<and> t \<le> 1}
\<lbrakk>Re ((g1 +++ g2) ?t1 - z) \<noteq> 0; 0 < ?t1; ?t1 < 1\<rbrakk> \<Longrightarrow> jump h12 ?t1 = 0
[PROOF STEP]
show "finite {x. jump h12 x \<noteq> 0 \<and> 0 < x \<and> x < 1}"
[PROOF STATE]
proof (prove)
using this:
finite {t. Re ((g1 +++ g2) t - z) = 0 \<and> 0 \<le> t \<and> t \<le> 1}
\<lbrakk>Re ((g1 +++ g2) ?t1 - z) \<noteq> 0; 0 < ?t1; ?t1 < 1\<rbrakk> \<Longrightarrow> jump h12 ?t1 = 0

goal (1 subgoal):
 1. finite {x. jump h12 x \<noteq> 0 \<and> 0 < x \<and> x < 1}
[PROOF STEP]
apply (elim rev_finite_subset)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>t. \<lbrakk>Re ((g1 +++ g2) t - z) \<noteq> 0; 0 < t; t < 1\<rbrakk> \<Longrightarrow> jump h12 t = 0) \<Longrightarrow> {x. jump h12 x \<noteq> 0 \<and> 0 < x \<and> x < 1} \<subseteq> {t. Re ((g1 +++ g2) t - z) = 0 \<and> 0 \<le> t \<and> t \<le> 1}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite {x. jump h12 x \<noteq> 0 \<and> 0 < x \<and> x < 1}

goal (2 subgoals):
 1. 0 < 1 / 2
 2. 1 / 2 < 1
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
cindex 0 1 h12 = cindex 0 (1 / 2) h12 + jump h12 (1 / 2) + cindex (1 / 2) 1 h12

goal (1 subgoal):
 1. real_of_int (cindex_path (g1 +++ g2) z) = real_of_int (cindex_path g1 z) + jumpF_pathstart g2 z - jumpF_pathfinish g1 z + real_of_int (cindex_path g2 z)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
cindex 0 1 h12 = cindex 0 (1 / 2) h12 + jump h12 (1 / 2) + cindex (1 / 2) 1 h12

goal (1 subgoal):
 1. real_of_int (cindex_path (g1 +++ g2) z) = real_of_int (cindex_path g1 z) + jumpF_pathstart g2 z - jumpF_pathfinish g1 z + real_of_int (cindex_path g2 z)
[PROOF STEP]
have "... = cindex_path g1 z + jumpF_pathstart g2 z
      - jumpF_pathfinish g1 z  + cindex_path g2 z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_of_int (cindex 0 (1 / 2) h12 + jump h12 (1 / 2) + cindex (1 / 2) 1 h12) = real_of_int (cindex_path g1 z) + jumpF_pathstart g2 z - jumpF_pathfinish g1 z + real_of_int (cindex_path g2 z)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. real_of_int (cindex 0 (1 / 2) h12 + jump h12 (1 / 2) + cindex (1 / 2) 1 h12) = real_of_int (cindex_path g1 z) + jumpF_pathstart g2 z - jumpF_pathfinish g1 z + real_of_int (cindex_path g2 z)
[PROOF STEP]
have "jump h12 (1/2) =  jumpF_pathstart g2 z -  jumpF_pathfinish g1 z  "
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_of_int (jump h12 (1 / 2)) = jumpF_pathstart g2 z - jumpF_pathfinish g1 z
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. real_of_int (jump h12 (1 / 2)) = jumpF_pathstart g2 z - jumpF_pathfinish g1 z
[PROOF STEP]
have "jump h12 (1 / 2) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))
[PROOF STEP]
proof (cases "Re ((g1+++g2) (1/2) - z) = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. Re ((g1 +++ g2) (1 / 2) - z) = 0 \<Longrightarrow> real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))
 2. Re ((g1 +++ g2) (1 / 2) - z) \<noteq> 0 \<Longrightarrow> real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
Re ((g1 +++ g2) (1 / 2) - z) \<noteq> 0

goal (2 subgoals):
 1. Re ((g1 +++ g2) (1 / 2) - z) = 0 \<Longrightarrow> real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))
 2. Re ((g1 +++ g2) (1 / 2) - z) \<noteq> 0 \<Longrightarrow> real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))
[PROOF STEP]
have "jump h12 (1 / 2) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jump h12 (1 / 2) = 0
[PROOF STEP]
unfolding h12_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jump (\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z)) (1 / 2) = 0
[PROOF STEP]
apply (rule jump_Im_divide_Re_0)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. path (\<lambda>t. (g1 +++ g2) t - z)
 2. Re ((g1 +++ g2) (1 / 2) - z) \<noteq> 0
 3. 0 < 1 / 2
 4. 1 / 2 < 1
[PROOF STEP]
using assms False
[PROOF STATE]
proof (prove)
using this:
finite_axes_cross g1 z
finite_axes_cross g2 z
path g1
path g2
pathfinish g1 = pathstart g2
pathfinish g1 \<noteq> z
Re ((g1 +++ g2) (1 / 2) - z) \<noteq> 0

goal (4 subgoals):
 1. path (\<lambda>t. (g1 +++ g2) t - z)
 2. Re ((g1 +++ g2) (1 / 2) - z) \<noteq> 0
 3. 0 < 1 / 2
 4. 1 / 2 < 1
[PROOF STEP]
by (auto intro:path_offset)
[PROOF STATE]
proof (state)
this:
jump h12 (1 / 2) = 0

goal (2 subgoals):
 1. Re ((g1 +++ g2) (1 / 2) - z) = 0 \<Longrightarrow> real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))
 2. Re ((g1 +++ g2) (1 / 2) - z) \<noteq> 0 \<Longrightarrow> real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
jump h12 (1 / 2) = 0

goal (2 subgoals):
 1. Re ((g1 +++ g2) (1 / 2) - z) = 0 \<Longrightarrow> real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))
 2. Re ((g1 +++ g2) (1 / 2) - z) \<noteq> 0 \<Longrightarrow> real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))
[PROOF STEP]
have "jumpF h12 (at_right (1/2)) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF h12 (at_right (1 / 2)) = 0
[PROOF STEP]
unfolding h12_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF (\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z)) (at_right (1 / 2)) = 0
[PROOF STEP]
apply (intro jumpF_im_divide_Re_0)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. path (\<lambda>t. (g1 +++ g2) t - z)
 2. Re ((g1 +++ g2) (1 / 2) - z) \<noteq> 0
 3. 0 \<le> 1 / 2
 4. 1 / 2 < 1
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path (\<lambda>t. (g1 +++ g2) t - z)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite_axes_cross g1 z
finite_axes_cross g2 z
path g1
path g2
pathfinish g1 = pathstart g2
pathfinish g1 \<noteq> z

goal (1 subgoal):
 1. path (\<lambda>t. (g1 +++ g2) t - z)
[PROOF STEP]
by (auto intro:path_offset)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. Re ((g1 +++ g2) (1 / 2) - z) \<noteq> 0
 2. 0 \<le> 1 / 2
 3. 1 / 2 < 1
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Re ((g1 +++ g2) (1 / 2) - z) \<noteq> 0
[PROOF STEP]
using assms(5-6) False
[PROOF STATE]
proof (prove)
using this:
pathfinish g1 = pathstart g2
pathfinish g1 \<noteq> z
Re ((g1 +++ g2) (1 / 2) - z) \<noteq> 0

goal (1 subgoal):
 1. Re ((g1 +++ g2) (1 / 2) - z) \<noteq> 0
[PROOF STEP]
unfolding joinpaths_def pathfinish_def pathstart_def
[PROOF STATE]
proof (prove)
using this:
g1 1 = g2 0
g1 1 \<noteq> z
Re ((if 1 / 2 \<le> 1 / 2 then g1 (2 * (1 / 2)) else g2 (2 * (1 / 2) - 1)) - z) \<noteq> 0

goal (1 subgoal):
 1. Re ((if 1 / 2 \<le> 1 / 2 then g1 (2 * (1 / 2)) else g2 (2 * (1 / 2) - 1)) - z) \<noteq> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. 0 \<le> 1 / 2
 2. 1 / 2 < 1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
jumpF h12 (at_right (1 / 2)) = 0

goal (2 subgoals):
 1. Re ((g1 +++ g2) (1 / 2) - z) = 0 \<Longrightarrow> real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))
 2. Re ((g1 +++ g2) (1 / 2) - z) \<noteq> 0 \<Longrightarrow> real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
jumpF h12 (at_right (1 / 2)) = 0

goal (2 subgoals):
 1. Re ((g1 +++ g2) (1 / 2) - z) = 0 \<Longrightarrow> real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))
 2. Re ((g1 +++ g2) (1 / 2) - z) \<noteq> 0 \<Longrightarrow> real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))
[PROOF STEP]
have "jumpF h12 (at_left (1/2)) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF h12 (at_left (1 / 2)) = 0
[PROOF STEP]
unfolding h12_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF (\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z)) (at_left (1 / 2)) = 0
[PROOF STEP]
apply (intro jumpF_im_divide_Re_0)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. path (\<lambda>t. (g1 +++ g2) t - z)
 2. Re ((g1 +++ g2) (1 / 2) - z) \<noteq> 0
 3. 0 < 1 / 2
 4. 1 / 2 \<le> 1
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path (\<lambda>t. (g1 +++ g2) t - z)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite_axes_cross g1 z
finite_axes_cross g2 z
path g1
path g2
pathfinish g1 = pathstart g2
pathfinish g1 \<noteq> z

goal (1 subgoal):
 1. path (\<lambda>t. (g1 +++ g2) t - z)
[PROOF STEP]
by (auto intro:path_offset)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. Re ((g1 +++ g2) (1 / 2) - z) \<noteq> 0
 2. 0 < 1 / 2
 3. 1 / 2 \<le> 1
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Re ((g1 +++ g2) (1 / 2) - z) \<noteq> 0
[PROOF STEP]
using assms(5-6) False
[PROOF STATE]
proof (prove)
using this:
pathfinish g1 = pathstart g2
pathfinish g1 \<noteq> z
Re ((g1 +++ g2) (1 / 2) - z) \<noteq> 0

goal (1 subgoal):
 1. Re ((g1 +++ g2) (1 / 2) - z) \<noteq> 0
[PROOF STEP]
unfolding joinpaths_def pathfinish_def pathstart_def
[PROOF STATE]
proof (prove)
using this:
g1 1 = g2 0
g1 1 \<noteq> z
Re ((if 1 / 2 \<le> 1 / 2 then g1 (2 * (1 / 2)) else g2 (2 * (1 / 2) - 1)) - z) \<noteq> 0

goal (1 subgoal):
 1. Re ((if 1 / 2 \<le> 1 / 2 then g1 (2 * (1 / 2)) else g2 (2 * (1 / 2) - 1)) - z) \<noteq> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. 0 < 1 / 2
 2. 1 / 2 \<le> 1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
jumpF h12 (at_left (1 / 2)) = 0

goal (2 subgoals):
 1. Re ((g1 +++ g2) (1 / 2) - z) = 0 \<Longrightarrow> real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))
 2. Re ((g1 +++ g2) (1 / 2) - z) \<noteq> 0 \<Longrightarrow> real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
jump h12 (1 / 2) = 0
jumpF h12 (at_right (1 / 2)) = 0
jumpF h12 (at_left (1 / 2)) = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
jump h12 (1 / 2) = 0
jumpF h12 (at_right (1 / 2)) = 0
jumpF h12 (at_left (1 / 2)) = 0

goal (1 subgoal):
 1. real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))

goal (1 subgoal):
 1. Re ((g1 +++ g2) (1 / 2) - z) = 0 \<Longrightarrow> real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Re ((g1 +++ g2) (1 / 2) - z) = 0 \<Longrightarrow> real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
Re ((g1 +++ g2) (1 / 2) - z) = 0

goal (1 subgoal):
 1. Re ((g1 +++ g2) (1 / 2) - z) = 0 \<Longrightarrow> real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Re ((g1 +++ g2) (1 / 2) - z) = 0
[PROOF STEP]
have "Im ((g1 +++ g2) (1 / 2) - z) \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
Re ((g1 +++ g2) (1 / 2) - z) = 0

goal (1 subgoal):
 1. Im ((g1 +++ g2) (1 / 2) - z) \<noteq> 0
[PROOF STEP]
using assms(5,6)
[PROOF STATE]
proof (prove)
using this:
Re ((g1 +++ g2) (1 / 2) - z) = 0
pathfinish g1 = pathstart g2
pathfinish g1 \<noteq> z

goal (1 subgoal):
 1. Im ((g1 +++ g2) (1 / 2) - z) \<noteq> 0
[PROOF STEP]
by (metis (no_types, opaque_lifting) Re_divide_numeral complex_Re_numeral complex_eq
              divide_self_if joinpaths_def  minus_complex.simps mult.commute mult.left_neutral
              numeral_One pathfinish_def pathstart_def right_minus_eq times_divide_eq_left zero_neq_numeral)
[PROOF STATE]
proof (state)
this:
Im ((g1 +++ g2) (1 / 2) - z) \<noteq> 0

goal (1 subgoal):
 1. Re ((g1 +++ g2) (1 / 2) - z) = 0 \<Longrightarrow> real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))
[PROOF STEP]
proof (rule jump_jumpF[of _ h12 "sgnx h12 (at_left (1/2))" "sgnx h12 (at_right (1/2))"])
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. isCont (inverse \<circ> h12) (1 / 2)
 2. (h12 has_sgnx sgnx h12 (at_left (1 / 2))) (at_left (1 / 2))
 3. (h12 has_sgnx sgnx h12 (at_right (1 / 2))) (at_right (1 / 2))
 4. sgnx h12 (at_left (1 / 2)) \<noteq> 0
 5. sgnx h12 (at_right (1 / 2)) \<noteq> 0
[PROOF STEP]
define g where "g=(\<lambda>t. (g1 +++ g2) t - z)"
[PROOF STATE]
proof (state)
this:
g = (\<lambda>t. (g1 +++ g2) t - z)

goal (5 subgoals):
 1. isCont (inverse \<circ> h12) (1 / 2)
 2. (h12 has_sgnx sgnx h12 (at_left (1 / 2))) (at_left (1 / 2))
 3. (h12 has_sgnx sgnx h12 (at_right (1 / 2))) (at_right (1 / 2))
 4. sgnx h12 (at_left (1 / 2)) \<noteq> 0
 5. sgnx h12 (at_right (1 / 2)) \<noteq> 0
[PROOF STEP]
have h12_def:"h12 = (\<lambda>t. Im(g t)/Re(g t))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. h12 = (\<lambda>t. Im (g t) / Re (g t))
[PROOF STEP]
unfolding h12_def g_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z)) = (\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
h12 = (\<lambda>t. Im (g t) / Re (g t))

goal (5 subgoals):
 1. isCont (inverse \<circ> h12) (1 / 2)
 2. (h12 has_sgnx sgnx h12 (at_left (1 / 2))) (at_left (1 / 2))
 3. (h12 has_sgnx sgnx h12 (at_right (1 / 2))) (at_right (1 / 2))
 4. sgnx h12 (at_left (1 / 2)) \<noteq> 0
 5. sgnx h12 (at_right (1 / 2)) \<noteq> 0
[PROOF STEP]
have "path g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path g
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite_axes_cross g1 z
finite_axes_cross g2 z
path g1
path g2
pathfinish g1 = pathstart g2
pathfinish g1 \<noteq> z

goal (1 subgoal):
 1. path g
[PROOF STEP]
unfolding g_def
[PROOF STATE]
proof (prove)
using this:
finite_axes_cross g1 z
finite_axes_cross g2 z
path g1
path g2
pathfinish g1 = pathstart g2
pathfinish g1 \<noteq> z

goal (1 subgoal):
 1. path (\<lambda>t. (g1 +++ g2) t - z)
[PROOF STEP]
by (auto intro!:path_offset)
[PROOF STATE]
proof (state)
this:
path g

goal (5 subgoals):
 1. isCont (inverse \<circ> h12) (1 / 2)
 2. (h12 has_sgnx sgnx h12 (at_left (1 / 2))) (at_left (1 / 2))
 3. (h12 has_sgnx sgnx h12 (at_right (1 / 2))) (at_right (1 / 2))
 4. sgnx h12 (at_left (1 / 2)) \<noteq> 0
 5. sgnx h12 (at_right (1 / 2)) \<noteq> 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
path g
[PROOF STEP]
have "isCont (\<lambda>t. Im (g t)) (1 / 2)" "isCont (\<lambda>t. Re (g t)) (1 / 2)"
[PROOF STATE]
proof (prove)
using this:
path g

goal (1 subgoal):
 1. isCont (\<lambda>t. Im (g t)) (1 / 2) &&& isCont (\<lambda>t. Re (g t)) (1 / 2)
[PROOF STEP]
unfolding path_def
[PROOF STATE]
proof (prove)
using this:
continuous_on {0..1} g

goal (1 subgoal):
 1. isCont (\<lambda>t. Im (g t)) (1 / 2) &&& isCont (\<lambda>t. Re (g t)) (1 / 2)
[PROOF STEP]
by (auto intro!:continuous_intros continuous_on_interior)
[PROOF STATE]
proof (state)
this:
isCont (\<lambda>t. Im (g t)) (1 / 2)
isCont (\<lambda>t. Re (g t)) (1 / 2)

goal (5 subgoals):
 1. isCont (inverse \<circ> h12) (1 / 2)
 2. (h12 has_sgnx sgnx h12 (at_left (1 / 2))) (at_left (1 / 2))
 3. (h12 has_sgnx sgnx h12 (at_right (1 / 2))) (at_right (1 / 2))
 4. sgnx h12 (at_left (1 / 2)) \<noteq> 0
 5. sgnx h12 (at_right (1 / 2)) \<noteq> 0
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
isCont (\<lambda>t. Im (g t)) (1 / 2)
isCont (\<lambda>t. Re (g t)) (1 / 2)

goal (5 subgoals):
 1. isCont (inverse \<circ> h12) (1 / 2)
 2. (h12 has_sgnx sgnx h12 (at_left (1 / 2))) (at_left (1 / 2))
 3. (h12 has_sgnx sgnx h12 (at_right (1 / 2))) (at_right (1 / 2))
 4. sgnx h12 (at_left (1 / 2)) \<noteq> 0
 5. sgnx h12 (at_right (1 / 2)) \<noteq> 0
[PROOF STEP]
have "Im (g (1/2)) \<noteq>0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Im (g (1 / 2)) \<noteq> 0
[PROOF STEP]
using \<open>Im ((g1 +++ g2) (1 / 2) - z) \<noteq> 0\<close>
[PROOF STATE]
proof (prove)
using this:
Im ((g1 +++ g2) (1 / 2) - z) \<noteq> 0

goal (1 subgoal):
 1. Im (g (1 / 2)) \<noteq> 0
[PROOF STEP]
unfolding g_def
[PROOF STATE]
proof (prove)
using this:
Im ((g1 +++ g2) (1 / 2) - z) \<noteq> 0

goal (1 subgoal):
 1. Im ((g1 +++ g2) (1 / 2) - z) \<noteq> 0
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
Im (g (1 / 2)) \<noteq> 0

goal (5 subgoals):
 1. isCont (inverse \<circ> h12) (1 / 2)
 2. (h12 has_sgnx sgnx h12 (at_left (1 / 2))) (at_left (1 / 2))
 3. (h12 has_sgnx sgnx h12 (at_right (1 / 2))) (at_right (1 / 2))
 4. sgnx h12 (at_left (1 / 2)) \<noteq> 0
 5. sgnx h12 (at_right (1 / 2)) \<noteq> 0
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
isCont (\<lambda>t. Im (g t)) (1 / 2)
isCont (\<lambda>t. Re (g t)) (1 / 2)
Im (g (1 / 2)) \<noteq> 0
[PROOF STEP]
show "isCont (inverse \<circ> h12) (1 / 2)"
[PROOF STATE]
proof (prove)
using this:
isCont (\<lambda>t. Im (g t)) (1 / 2)
isCont (\<lambda>t. Re (g t)) (1 / 2)
Im (g (1 / 2)) \<noteq> 0

goal (1 subgoal):
 1. isCont (inverse \<circ> h12) (1 / 2)
[PROOF STEP]
unfolding h12_def comp_def
[PROOF STATE]
proof (prove)
using this:
isCont (\<lambda>t. Im (g t)) (1 / 2)
isCont (\<lambda>t. Re (g t)) (1 / 2)
Im (g (1 / 2)) \<noteq> 0

goal (1 subgoal):
 1. isCont (\<lambda>x. inverse (Im (g x) / Re (g x))) (1 / 2)
[PROOF STEP]
by (auto intro!: continuous_intros)
[PROOF STATE]
proof (state)
this:
isCont (inverse \<circ> h12) (1 / 2)

goal (4 subgoals):
 1. (h12 has_sgnx sgnx h12 (at_left (1 / 2))) (at_left (1 / 2))
 2. (h12 has_sgnx sgnx h12 (at_right (1 / 2))) (at_right (1 / 2))
 3. sgnx h12 (at_left (1 / 2)) \<noteq> 0
 4. sgnx h12 (at_right (1 / 2)) \<noteq> 0
[PROOF STEP]
define l where "l \<equiv> sgnx h12 (at_left (1/2))"
[PROOF STATE]
proof (state)
this:
l \<equiv> sgnx h12 (at_left (1 / 2))

goal (4 subgoals):
 1. (h12 has_sgnx sgnx h12 (at_left (1 / 2))) (at_left (1 / 2))
 2. (h12 has_sgnx sgnx h12 (at_right (1 / 2))) (at_right (1 / 2))
 3. sgnx h12 (at_left (1 / 2)) \<noteq> 0
 4. sgnx h12 (at_right (1 / 2)) \<noteq> 0
[PROOF STEP]
define r where "r \<equiv> sgnx h12 (at_right (1/2))"
[PROOF STATE]
proof (state)
this:
r \<equiv> sgnx h12 (at_right (1 / 2))

goal (4 subgoals):
 1. (h12 has_sgnx sgnx h12 (at_left (1 / 2))) (at_left (1 / 2))
 2. (h12 has_sgnx sgnx h12 (at_right (1 / 2))) (at_right (1 / 2))
 3. sgnx h12 (at_left (1 / 2)) \<noteq> 0
 4. sgnx h12 (at_right (1 / 2)) \<noteq> 0
[PROOF STEP]
have *:"continuous_on ({0<..<1}- {t. h12 t = 0 \<and> 0 < t \<and> t < 1}) h12"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on ({0<..<1} - {t. h12 t = 0 \<and> 0 < t \<and> t < 1}) h12
[PROOF STEP]
using \<open>path g\<close>[unfolded path_def]
[PROOF STATE]
proof (prove)
using this:
continuous_on {0..1} g

goal (1 subgoal):
 1. continuous_on ({0<..<1} - {t. h12 t = 0 \<and> 0 < t \<and> t < 1}) h12
[PROOF STEP]
unfolding h12_def
[PROOF STATE]
proof (prove)
using this:
continuous_on {0..1} g

goal (1 subgoal):
 1. continuous_on ({0<..<1} - {t. Im (g t) / Re (g t) = 0 \<and> 0 < t \<and> t < 1}) (\<lambda>t. Im (g t) / Re (g t))
[PROOF STEP]
apply (auto intro!: continuous_intros)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. continuous_on {0..1} g \<Longrightarrow> continuous_on ({0<..<1} - {t. (Im (g t) = 0 \<or> Re (g t) = 0) \<and> 0 < t \<and> t < 1}) g
 2. continuous_on {0..1} g \<Longrightarrow> continuous_on ({0<..<1} - {t. (Im (g t) = 0 \<or> Re (g t) = 0) \<and> 0 < t \<and> t < 1}) g
[PROOF STEP]
by (auto elim:continuous_on_subset)
[PROOF STATE]
proof (state)
this:
continuous_on ({0<..<1} - {t. h12 t = 0 \<and> 0 < t \<and> t < 1}) h12

goal (4 subgoals):
 1. (h12 has_sgnx sgnx h12 (at_left (1 / 2))) (at_left (1 / 2))
 2. (h12 has_sgnx sgnx h12 (at_right (1 / 2))) (at_right (1 / 2))
 3. sgnx h12 (at_left (1 / 2)) \<noteq> 0
 4. sgnx h12 (at_right (1 / 2)) \<noteq> 0
[PROOF STEP]
have **:"finite {t. h12 t = 0 \<and> 0 < t \<and> t < 1}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {t. h12 t = 0 \<and> 0 < t \<and> t < 1}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite {t. h12 t = 0 \<and> 0 < t \<and> t < 1}
[PROOF STEP]
have "finite_axes_cross (g1 +++ g2) z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite_axes_cross (g1 +++ g2) z
[PROOF STEP]
using assms(1,2) finite_cross_intros(3)[of g1 z g2]
[PROOF STATE]
proof (prove)
using this:
finite_axes_cross g1 z
finite_axes_cross g2 z
\<lbrakk>finite_axes_cross g1 z; finite_axes_cross g2 z\<rbrakk> \<Longrightarrow> finite_axes_cross (g1 +++ g2) z

goal (1 subgoal):
 1. finite_axes_cross (g1 +++ g2) z
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite_axes_cross (g1 +++ g2) z

goal (1 subgoal):
 1. finite {t. h12 t = 0 \<and> 0 < t \<and> t < 1}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite_axes_cross (g1 +++ g2) z
[PROOF STEP]
have "finite {t. (Re (g t) = 0 \<or> Im (g t) = 0) \<and> 0 < t \<and> t < 1}"
[PROOF STATE]
proof (prove)
using this:
finite_axes_cross (g1 +++ g2) z

goal (1 subgoal):
 1. finite {t. (Re (g t) = 0 \<or> Im (g t) = 0) \<and> 0 < t \<and> t < 1}
[PROOF STEP]
unfolding finite_axes_cross_def g_def
[PROOF STATE]
proof (prove)
using this:
finite {t. (Re ((g1 +++ g2) t - z) = 0 \<or> Im ((g1 +++ g2) t - z) = 0) \<and> 0 \<le> t \<and> t \<le> 1}

goal (1 subgoal):
 1. finite {t. (Re ((g1 +++ g2) t - z) = 0 \<or> Im ((g1 +++ g2) t - z) = 0) \<and> 0 < t \<and> t < 1}
[PROOF STEP]
apply (elim rev_finite_subset)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {t. (Re ((g1 +++ g2) t - z) = 0 \<or> Im ((g1 +++ g2) t - z) = 0) \<and> 0 < t \<and> t < 1} \<subseteq> {t. (Re ((g1 +++ g2) t - z) = 0 \<or> Im ((g1 +++ g2) t - z) = 0) \<and> 0 \<le> t \<and> t \<le> 1}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite {t. (Re (g t) = 0 \<or> Im (g t) = 0) \<and> 0 < t \<and> t < 1}

goal (1 subgoal):
 1. finite {t. h12 t = 0 \<and> 0 < t \<and> t < 1}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite {t. (Re (g t) = 0 \<or> Im (g t) = 0) \<and> 0 < t \<and> t < 1}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
finite {t. (Re (g t) = 0 \<or> Im (g t) = 0) \<and> 0 < t \<and> t < 1}

goal (1 subgoal):
 1. finite {t. h12 t = 0 \<and> 0 < t \<and> t < 1}
[PROOF STEP]
unfolding h12_def
[PROOF STATE]
proof (prove)
using this:
finite {t. (Re (g t) = 0 \<or> Im (g t) = 0) \<and> 0 < t \<and> t < 1}

goal (1 subgoal):
 1. finite {t. Im (g t) / Re (g t) = 0 \<and> 0 < t \<and> t < 1}
[PROOF STEP]
by (simp add:disj_commute)
[PROOF STATE]
proof (state)
this:
finite {t. h12 t = 0 \<and> 0 < t \<and> t < 1}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
finite {t. h12 t = 0 \<and> 0 < t \<and> t < 1}

goal (4 subgoals):
 1. (h12 has_sgnx sgnx h12 (at_left (1 / 2))) (at_left (1 / 2))
 2. (h12 has_sgnx sgnx h12 (at_right (1 / 2))) (at_right (1 / 2))
 3. sgnx h12 (at_left (1 / 2)) \<noteq> 0
 4. sgnx h12 (at_right (1 / 2)) \<noteq> 0
[PROOF STEP]
have "h12 sgnx_able at_left (1/2)" "l \<noteq> 0" "h12 sgnx_able at_right (1/2)" "r \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (h12 sgnx_able at_left (1 / 2) &&& l \<noteq> 0) &&& h12 sgnx_able at_right (1 / 2) &&& r \<noteq> 0
[PROOF STEP]
unfolding l_def r_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (h12 sgnx_able at_left (1 / 2) &&& sgnx h12 (at_left (1 / 2)) \<noteq> 0) &&& h12 sgnx_able at_right (1 / 2) &&& sgnx h12 (at_right (1 / 2)) \<noteq> 0
[PROOF STEP]
using finite_sgnx_at_left_at_right[OF ** * **]
[PROOF STATE]
proof (prove)
using this:
?x \<in> {0<..<1} \<Longrightarrow> h12 sgnx_able at_left ?x
?x \<in> {0<..<1} \<Longrightarrow> sgnx h12 (at_left ?x) \<noteq> 0
?x \<in> {0<..<1} \<Longrightarrow> h12 sgnx_able at_right ?x
?x \<in> {0<..<1} \<Longrightarrow> sgnx h12 (at_right ?x) \<noteq> 0

goal (1 subgoal):
 1. (h12 sgnx_able at_left (1 / 2) &&& sgnx h12 (at_left (1 / 2)) \<noteq> 0) &&& h12 sgnx_able at_right (1 / 2) &&& sgnx h12 (at_right (1 / 2)) \<noteq> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
h12 sgnx_able at_left (1 / 2)
l \<noteq> 0
h12 sgnx_able at_right (1 / 2)
r \<noteq> 0

goal (4 subgoals):
 1. (h12 has_sgnx sgnx h12 (at_left (1 / 2))) (at_left (1 / 2))
 2. (h12 has_sgnx sgnx h12 (at_right (1 / 2))) (at_right (1 / 2))
 3. sgnx h12 (at_left (1 / 2)) \<noteq> 0
 4. sgnx h12 (at_right (1 / 2)) \<noteq> 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
h12 sgnx_able at_left (1 / 2)
l \<noteq> 0
h12 sgnx_able at_right (1 / 2)
r \<noteq> 0
[PROOF STEP]
show "(h12 has_sgnx l) (at_left (1/2))" "(h12 has_sgnx r) (at_right (1/2))" "l\<noteq>0" "r\<noteq>0"
[PROOF STATE]
proof (prove)
using this:
h12 sgnx_able at_left (1 / 2)
l \<noteq> 0
h12 sgnx_able at_right (1 / 2)
r \<noteq> 0

goal (1 subgoal):
 1. ((h12 has_sgnx l) (at_left (1 / 2)) &&& (h12 has_sgnx r) (at_right (1 / 2))) &&& l \<noteq> 0 &&& r \<noteq> 0
[PROOF STEP]
unfolding l_def r_def
[PROOF STATE]
proof (prove)
using this:
h12 sgnx_able at_left (1 / 2)
sgnx h12 (at_left (1 / 2)) \<noteq> 0
h12 sgnx_able at_right (1 / 2)
sgnx h12 (at_right (1 / 2)) \<noteq> 0

goal (1 subgoal):
 1. ((h12 has_sgnx sgnx h12 (at_left (1 / 2))) (at_left (1 / 2)) &&& (h12 has_sgnx sgnx h12 (at_right (1 / 2))) (at_right (1 / 2))) &&& sgnx h12 (at_left (1 / 2)) \<noteq> 0 &&& sgnx h12 (at_right (1 / 2)) \<noteq> 0
[PROOF STEP]
by (auto elim:sgnx_able_sgnx)
[PROOF STATE]
proof (state)
this:
(h12 has_sgnx l) (at_left (1 / 2))
(h12 has_sgnx r) (at_right (1 / 2))
l \<noteq> 0
r \<noteq> 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))

goal (1 subgoal):
 1. real_of_int (jump h12 (1 / 2)) = jumpF_pathstart g2 z - jumpF_pathfinish g1 z
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))

goal (1 subgoal):
 1. real_of_int (jump h12 (1 / 2)) = jumpF_pathstart g2 z - jumpF_pathfinish g1 z
[PROOF STEP]
have "jumpF h12 (at_right (1/2)) = jumpF_pathstart g2 z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF h12 (at_right (1 / 2)) = jumpF_pathstart g2 z
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. jumpF h12 (at_right (1 / 2)) = jumpF_pathstart g2 z
[PROOF STEP]
have " jumpF h12 (at_right (1 / 2)) = jumpF (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) (at_right 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF h12 (at_right (1 / 2)) = jumpF (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) (at_right 0)
[PROOF STEP]
using jumpF_linear_comp[of "1/2" h12 "1/2" 0,simplified]
[PROOF STATE]
proof (prove)
using this:
jumpF (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) (at_left 0) = jumpF h12 (at_left (1 / 2))
jumpF (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) (at_right 0) = jumpF h12 (at_right (1 / 2))

goal (1 subgoal):
 1. jumpF h12 (at_right (1 / 2)) = jumpF (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) (at_right 0)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
jumpF h12 (at_right (1 / 2)) = jumpF (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) (at_right 0)

goal (1 subgoal):
 1. jumpF h12 (at_right (1 / 2)) = jumpF_pathstart g2 z
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
jumpF h12 (at_right (1 / 2)) = jumpF (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) (at_right 0)

goal (1 subgoal):
 1. jumpF h12 (at_right (1 / 2)) = jumpF_pathstart g2 z
[PROOF STEP]
have "jumpF (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) (at_right 0) = jumpF_pathstart g2 z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) (at_right 0) = jumpF_pathstart g2 z
[PROOF STEP]
unfolding h12_def jumpF_pathstart_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF ((\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z)) \<circ> (\<lambda>x. x / 2 + 1 / 2)) (at_right 0) = jumpF (\<lambda>t. Im (g2 t - z) / Re (g2 t - z)) (at_right 0)
[PROOF STEP]
proof (rule jumpF_cong)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. at_right 0 = at_right 0
 2. \<forall>\<^sub>F x in at_right 0. ((\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z)) \<circ> (\<lambda>x. x / 2 + 1 / 2)) x = Im (g2 x - z) / Re (g2 x - z)
[PROOF STEP]
show "\<forall>\<^sub>F x in at_right 0. ((\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z))
                  \<circ> (\<lambda>x. x / 2 + 1 / 2)) x = Im (g2 x - z) / Re (g2 x - z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_right 0. ((\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z)) \<circ> (\<lambda>x. x / 2 + 1 / 2)) x = Im (g2 x - z) / Re (g2 x - z)
[PROOF STEP]
unfolding eventually_at_right
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>b>0. \<forall>y>0. y < b \<longrightarrow> ((\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z)) \<circ> (\<lambda>x. x / 2 + 1 / 2)) y = Im (g2 y - z) / Re (g2 y - z)
[PROOF STEP]
apply (intro exI[where x="1/2"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < 1 / 2 \<and> (\<forall>y>0. y < 1 / 2 \<longrightarrow> ((\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z)) \<circ> (\<lambda>x. x / 2 + 1 / 2)) y = Im (g2 y - z) / Re (g2 y - z))
[PROOF STEP]
unfolding joinpaths_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < 1 / 2 \<and> (\<forall>y>0. y < 1 / 2 \<longrightarrow> ((\<lambda>t. Im ((if t \<le> 1 / 2 then g1 (2 * t) else g2 (2 * t - 1)) - z) / Re ((if t \<le> 1 / 2 then g1 (2 * t) else g2 (2 * t - 1)) - z)) \<circ> (\<lambda>x. x / 2 + 1 / 2)) y = Im (g2 y - z) / Re (g2 y - z))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_right 0. ((\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z)) \<circ> (\<lambda>x. x / 2 + 1 / 2)) x = Im (g2 x - z) / Re (g2 x - z)

goal (1 subgoal):
 1. at_right 0 = at_right 0
[PROOF STEP]
qed simp
[PROOF STATE]
proof (state)
this:
jumpF (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) (at_right 0) = jumpF_pathstart g2 z

goal (1 subgoal):
 1. jumpF h12 (at_right (1 / 2)) = jumpF_pathstart g2 z
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
jumpF h12 (at_right (1 / 2)) = jumpF_pathstart g2 z
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
jumpF h12 (at_right (1 / 2)) = jumpF_pathstart g2 z

goal (1 subgoal):
 1. jumpF h12 (at_right (1 / 2)) = jumpF_pathstart g2 z
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
jumpF h12 (at_right (1 / 2)) = jumpF_pathstart g2 z

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
jumpF h12 (at_right (1 / 2)) = jumpF_pathstart g2 z

goal (1 subgoal):
 1. real_of_int (jump h12 (1 / 2)) = jumpF_pathstart g2 z - jumpF_pathfinish g1 z
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
jumpF h12 (at_right (1 / 2)) = jumpF_pathstart g2 z

goal (1 subgoal):
 1. real_of_int (jump h12 (1 / 2)) = jumpF_pathstart g2 z - jumpF_pathfinish g1 z
[PROOF STEP]
have "jumpF h12 (at_left (1 / 2)) = jumpF_pathfinish g1 z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF h12 (at_left (1 / 2)) = jumpF_pathfinish g1 z
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. jumpF h12 (at_left (1 / 2)) = jumpF_pathfinish g1 z
[PROOF STEP]
have "jumpF h12 (at_left (1 / 2)) = jumpF (h12 \<circ> (\<lambda>x. x / 2)) (at_left 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF h12 (at_left (1 / 2)) = jumpF (h12 \<circ> (\<lambda>x. x / 2)) (at_left 1)
[PROOF STEP]
using jumpF_linear_comp[of "1/2" h12 0 1,simplified]
[PROOF STATE]
proof (prove)
using this:
jumpF (h12 \<circ> (\<lambda>x. x / 2)) (at_left 1) = jumpF h12 (at_left (1 / 2))
jumpF (h12 \<circ> (\<lambda>x. x / 2)) (at_right 1) = jumpF h12 (at_right (1 / 2))

goal (1 subgoal):
 1. jumpF h12 (at_left (1 / 2)) = jumpF (h12 \<circ> (\<lambda>x. x / 2)) (at_left 1)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
jumpF h12 (at_left (1 / 2)) = jumpF (h12 \<circ> (\<lambda>x. x / 2)) (at_left 1)

goal (1 subgoal):
 1. jumpF h12 (at_left (1 / 2)) = jumpF_pathfinish g1 z
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
jumpF h12 (at_left (1 / 2)) = jumpF (h12 \<circ> (\<lambda>x. x / 2)) (at_left 1)

goal (1 subgoal):
 1. jumpF h12 (at_left (1 / 2)) = jumpF_pathfinish g1 z
[PROOF STEP]
have "jumpF (h12 \<circ> (\<lambda>x. x / 2 )) (at_left 1) = jumpF_pathfinish g1 z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF (h12 \<circ> (\<lambda>x. x / 2)) (at_left 1) = jumpF_pathfinish g1 z
[PROOF STEP]
unfolding h12_def jumpF_pathfinish_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF ((\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z)) \<circ> (\<lambda>x. x / 2)) (at_left 1) = jumpF (\<lambda>t. Im (g1 t - z) / Re (g1 t - z)) (at_left 1)
[PROOF STEP]
proof (rule jumpF_cong)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. at_left 1 = at_left 1
 2. \<forall>\<^sub>F x in at_left 1. ((\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z)) \<circ> (\<lambda>x. x / 2)) x = Im (g1 x - z) / Re (g1 x - z)
[PROOF STEP]
show " \<forall>\<^sub>F x in at_left 1. ((\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z))
              \<circ> (\<lambda>x. x / 2)) x = Im (g1 x - z) / Re (g1 x - z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_left 1. ((\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z)) \<circ> (\<lambda>x. x / 2)) x = Im (g1 x - z) / Re (g1 x - z)
[PROOF STEP]
unfolding eventually_at_left
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>b<1. \<forall>y>b. y < 1 \<longrightarrow> ((\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z)) \<circ> (\<lambda>x. x / 2)) y = Im (g1 y - z) / Re (g1 y - z)
[PROOF STEP]
apply (intro exI[where x="1/2"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 / 2 < 1 \<and> (\<forall>y>1 / 2. y < 1 \<longrightarrow> ((\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z)) \<circ> (\<lambda>x. x / 2)) y = Im (g1 y - z) / Re (g1 y - z))
[PROOF STEP]
unfolding joinpaths_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 / 2 < 1 \<and> (\<forall>y>1 / 2. y < 1 \<longrightarrow> ((\<lambda>t. Im ((if t \<le> 1 / 2 then g1 (2 * t) else g2 (2 * t - 1)) - z) / Re ((if t \<le> 1 / 2 then g1 (2 * t) else g2 (2 * t - 1)) - z)) \<circ> (\<lambda>x. x / 2)) y = Im (g1 y - z) / Re (g1 y - z))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_left 1. ((\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z)) \<circ> (\<lambda>x. x / 2)) x = Im (g1 x - z) / Re (g1 x - z)

goal (1 subgoal):
 1. at_left 1 = at_left 1
[PROOF STEP]
qed simp
[PROOF STATE]
proof (state)
this:
jumpF (h12 \<circ> (\<lambda>x. x / 2)) (at_left 1) = jumpF_pathfinish g1 z

goal (1 subgoal):
 1. jumpF h12 (at_left (1 / 2)) = jumpF_pathfinish g1 z
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
jumpF h12 (at_left (1 / 2)) = jumpF_pathfinish g1 z
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
jumpF h12 (at_left (1 / 2)) = jumpF_pathfinish g1 z

goal (1 subgoal):
 1. jumpF h12 (at_left (1 / 2)) = jumpF_pathfinish g1 z
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
jumpF h12 (at_left (1 / 2)) = jumpF_pathfinish g1 z

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
jumpF h12 (at_left (1 / 2)) = jumpF_pathfinish g1 z

goal (1 subgoal):
 1. real_of_int (jump h12 (1 / 2)) = jumpF_pathstart g2 z - jumpF_pathfinish g1 z
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))
jumpF h12 (at_right (1 / 2)) = jumpF_pathstart g2 z
jumpF h12 (at_left (1 / 2)) = jumpF_pathfinish g1 z
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
real_of_int (jump h12 (1 / 2)) = jumpF h12 (at_right (1 / 2)) - jumpF h12 (at_left (1 / 2))
jumpF h12 (at_right (1 / 2)) = jumpF_pathstart g2 z
jumpF h12 (at_left (1 / 2)) = jumpF_pathfinish g1 z

goal (1 subgoal):
 1. real_of_int (jump h12 (1 / 2)) = jumpF_pathstart g2 z - jumpF_pathfinish g1 z
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
real_of_int (jump h12 (1 / 2)) = jumpF_pathstart g2 z - jumpF_pathfinish g1 z

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
real_of_int (jump h12 (1 / 2)) = jumpF_pathstart g2 z - jumpF_pathfinish g1 z

goal (1 subgoal):
 1. real_of_int (cindex 0 (1 / 2) h12 + jump h12 (1 / 2) + cindex (1 / 2) 1 h12) = real_of_int (cindex_path g1 z) + jumpF_pathstart g2 z - jumpF_pathfinish g1 z + real_of_int (cindex_path g2 z)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
real_of_int (jump h12 (1 / 2)) = jumpF_pathstart g2 z - jumpF_pathfinish g1 z

goal (1 subgoal):
 1. real_of_int (cindex 0 (1 / 2) h12 + jump h12 (1 / 2) + cindex (1 / 2) 1 h12) = real_of_int (cindex_path g1 z) + jumpF_pathstart g2 z - jumpF_pathfinish g1 z + real_of_int (cindex_path g2 z)
[PROOF STEP]
have "cindex 0 (1 / 2) h12 = cindex_path g1 z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindex 0 (1 / 2) h12 = cindex_path g1 z
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. cindex 0 (1 / 2) h12 = cindex_path g1 z
[PROOF STEP]
have "cindex 0 (1 / 2) h12 = cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindex 0 (1 / 2) h12 = cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2))
[PROOF STEP]
using cindex_linear_comp[of "1/2" 0 1 h12 0,simplified,symmetric]
[PROOF STATE]
proof (prove)
using this:
cindex 0 (1 / 2) h12 = cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2))

goal (1 subgoal):
 1. cindex 0 (1 / 2) h12 = cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
cindex 0 (1 / 2) h12 = cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2))

goal (1 subgoal):
 1. cindex 0 (1 / 2) h12 = cindex_path g1 z
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
cindex 0 (1 / 2) h12 = cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2))

goal (1 subgoal):
 1. cindex 0 (1 / 2) h12 = cindex_path g1 z
[PROOF STEP]
have "... = cindex_path g1 z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2)) = cindex_path g1 z
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2)) = cindex_path g1 z
[PROOF STEP]
let ?g = " (\<lambda>t. Im (g1 t - z) / Re (g1 t - z))"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2)) = cindex_path g1 z
[PROOF STEP]
have *:"jump (h12 \<circ> (\<lambda>x. x / 2)) x = jump ?g x" when "0<x" "x<1" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jump (h12 \<circ> (\<lambda>x. x / 2)) x = jump (\<lambda>t. Im (g1 t - z) / Re (g1 t - z)) x
[PROOF STEP]
unfolding h12_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jump ((\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z)) \<circ> (\<lambda>x. x / 2)) x = jump (\<lambda>t. Im (g1 t - z) / Re (g1 t - z)) x
[PROOF STEP]
proof (rule jump_cong)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x = x
 2. \<forall>\<^sub>F x in at x. ((\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z)) \<circ> (\<lambda>x. x / 2)) x = Im (g1 x - z) / Re (g1 x - z)
[PROOF STEP]
show "\<forall>\<^sub>F x in at x. ((\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z))
              \<circ> (\<lambda>x. x / 2)) x = Im (g1 x - z) / Re (g1 x - z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in at x. ((\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z)) \<circ> (\<lambda>x. x / 2)) x = Im (g1 x - z) / Re (g1 x - z)
[PROOF STEP]
unfolding eventually_at joinpaths_def comp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>d>0. \<forall>xa\<in>UNIV. xa \<noteq> x \<and> dist xa x < d \<longrightarrow> Im ((if xa / 2 \<le> 1 / 2 then g1 (2 * (xa / 2)) else g2 (2 * (xa / 2) - 1)) - z) / Re ((if xa / 2 \<le> 1 / 2 then g1 (2 * (xa / 2)) else g2 (2 * (xa / 2) - 1)) - z) = Im (g1 xa - z) / Re (g1 xa - z)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
0 < x
x < 1

goal (1 subgoal):
 1. \<exists>d>0. \<forall>xa\<in>UNIV. xa \<noteq> x \<and> dist xa x < d \<longrightarrow> Im ((if xa / 2 \<le> 1 / 2 then g1 (2 * (xa / 2)) else g2 (2 * (xa / 2) - 1)) - z) / Re ((if xa / 2 \<le> 1 / 2 then g1 (2 * (xa / 2)) else g2 (2 * (xa / 2) - 1)) - z) = Im (g1 xa - z) / Re (g1 xa - z)
[PROOF STEP]
apply (intro exI[where x="(1-x)/2"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < x; x < 1\<rbrakk> \<Longrightarrow> 0 < (1 - x) / 2 \<and> (\<forall>xa\<in>UNIV. xa \<noteq> x \<and> dist xa x < (1 - x) / 2 \<longrightarrow> Im ((if xa / 2 \<le> 1 / 2 then g1 (2 * (xa / 2)) else g2 (2 * (xa / 2) - 1)) - z) / Re ((if xa / 2 \<le> 1 / 2 then g1 (2 * (xa / 2)) else g2 (2 * (xa / 2) - 1)) - z) = Im (g1 xa - z) / Re (g1 xa - z))
[PROOF STEP]
by (auto simp add: dist_norm)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at x. ((\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z)) \<circ> (\<lambda>x. x / 2)) x = Im (g1 x - z) / Re (g1 x - z)

goal (1 subgoal):
 1. x = x
[PROOF STEP]
qed simp
[PROOF STATE]
proof (state)
this:
\<lbrakk>0 < ?x1; ?x1 < 1\<rbrakk> \<Longrightarrow> jump (h12 \<circ> (\<lambda>x. x / 2)) ?x1 = jump (\<lambda>t. Im (g1 t - z) / Re (g1 t - z)) ?x1

goal (1 subgoal):
 1. cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2)) = cindex_path g1 z
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>0 < ?x1; ?x1 < 1\<rbrakk> \<Longrightarrow> jump (h12 \<circ> (\<lambda>x. x / 2)) ?x1 = jump (\<lambda>t. Im (g1 t - z) / Re (g1 t - z)) ?x1
[PROOF STEP]
have "{x. jump (h12 \<circ> (\<lambda>x. x / 2)) x \<noteq> 0 \<and> 0 < x \<and> x < 1}
            = {x. jump ?g x \<noteq> 0 \<and> 0 < x \<and> x < 1}"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 < ?x1; ?x1 < 1\<rbrakk> \<Longrightarrow> jump (h12 \<circ> (\<lambda>x. x / 2)) ?x1 = jump (\<lambda>t. Im (g1 t - z) / Re (g1 t - z)) ?x1

goal (1 subgoal):
 1. {x. jump (h12 \<circ> (\<lambda>x. x / 2)) x \<noteq> 0 \<and> 0 < x \<and> x < 1} = {x. jump (\<lambda>t. Im (g1 t - z) / Re (g1 t - z)) x \<noteq> 0 \<and> 0 < x \<and> x < 1}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{x. jump (h12 \<circ> (\<lambda>x. x / 2)) x \<noteq> 0 \<and> 0 < x \<and> x < 1} = {x. jump (\<lambda>t. Im (g1 t - z) / Re (g1 t - z)) x \<noteq> 0 \<and> 0 < x \<and> x < 1}

goal (1 subgoal):
 1. cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2)) = cindex_path g1 z
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
{x. jump (h12 \<circ> (\<lambda>x. x / 2)) x \<noteq> 0 \<and> 0 < x \<and> x < 1} = {x. jump (\<lambda>t. Im (g1 t - z) / Re (g1 t - z)) x \<noteq> 0 \<and> 0 < x \<and> x < 1}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
{x. jump (h12 \<circ> (\<lambda>x. x / 2)) x \<noteq> 0 \<and> 0 < x \<and> x < 1} = {x. jump (\<lambda>t. Im (g1 t - z) / Re (g1 t - z)) x \<noteq> 0 \<and> 0 < x \<and> x < 1}

goal (1 subgoal):
 1. cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2)) = cindex_path g1 z
[PROOF STEP]
unfolding cindex_def cindex_path_def
[PROOF STATE]
proof (prove)
using this:
{x. jump (h12 \<circ> (\<lambda>x. x / 2)) x \<noteq> 0 \<and> 0 < x \<and> x < 1} = {x. jump (\<lambda>t. Im (g1 t - z) / Re (g1 t - z)) x \<noteq> 0 \<and> 0 < x \<and> x < 1}

goal (1 subgoal):
 1. sum (jump (h12 \<circ> (\<lambda>x. x / 2))) {x. jump (h12 \<circ> (\<lambda>x. x / 2)) x \<noteq> 0 \<and> 0 < x \<and> x < 1} = sum (jump (\<lambda>t. Im (g1 t - z) / Re (g1 t - z))) {x. jump (\<lambda>t. Im (g1 t - z) / Re (g1 t - z)) x \<noteq> 0 \<and> 0 < x \<and> x < 1}
[PROOF STEP]
apply (elim sum.cong)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> {x. jump (\<lambda>t. Im (g1 t - z) / Re (g1 t - z)) x \<noteq> 0 \<and> 0 < x \<and> x < 1} \<Longrightarrow> jump (h12 \<circ> (\<lambda>x. x / 2)) x = jump (\<lambda>t. Im (g1 t - z) / Re (g1 t - z)) x
[PROOF STEP]
by (auto simp add:*)
[PROOF STATE]
proof (state)
this:
cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2)) = cindex_path g1 z

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2)) = cindex_path g1 z

goal (1 subgoal):
 1. cindex 0 (1 / 2) h12 = cindex_path g1 z
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
cindex 0 (1 / 2) h12 = cindex_path g1 z
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
cindex 0 (1 / 2) h12 = cindex_path g1 z

goal (1 subgoal):
 1. cindex 0 (1 / 2) h12 = cindex_path g1 z
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
cindex 0 (1 / 2) h12 = cindex_path g1 z

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
cindex 0 (1 / 2) h12 = cindex_path g1 z

goal (1 subgoal):
 1. real_of_int (cindex 0 (1 / 2) h12 + jump h12 (1 / 2) + cindex (1 / 2) 1 h12) = real_of_int (cindex_path g1 z) + jumpF_pathstart g2 z - jumpF_pathfinish g1 z + real_of_int (cindex_path g2 z)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
cindex 0 (1 / 2) h12 = cindex_path g1 z

goal (1 subgoal):
 1. real_of_int (cindex 0 (1 / 2) h12 + jump h12 (1 / 2) + cindex (1 / 2) 1 h12) = real_of_int (cindex_path g1 z) + jumpF_pathstart g2 z - jumpF_pathfinish g1 z + real_of_int (cindex_path g2 z)
[PROOF STEP]
have "cindex (1 / 2) 1 h12 = cindex_path g2 z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindex (1 / 2) 1 h12 = cindex_path g2 z
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. cindex (1 / 2) 1 h12 = cindex_path g2 z
[PROOF STEP]
have "cindex (1 / 2) 1 h12 = cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindex (1 / 2) 1 h12 = cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2))
[PROOF STEP]
using cindex_linear_comp[of "1/2" 0 1 h12 "1/2",simplified,symmetric]
[PROOF STATE]
proof (prove)
using this:
cindex (1 / 2) 1 h12 = cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2))

goal (1 subgoal):
 1. cindex (1 / 2) 1 h12 = cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
cindex (1 / 2) 1 h12 = cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2))

goal (1 subgoal):
 1. cindex (1 / 2) 1 h12 = cindex_path g2 z
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
cindex (1 / 2) 1 h12 = cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2))

goal (1 subgoal):
 1. cindex (1 / 2) 1 h12 = cindex_path g2 z
[PROOF STEP]
have "... = cindex_path g2 z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) = cindex_path g2 z
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) = cindex_path g2 z
[PROOF STEP]
let ?g = " (\<lambda>t. Im (g2 t - z) / Re (g2 t - z))"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) = cindex_path g2 z
[PROOF STEP]
have *:"jump (h12 \<circ> (\<lambda>x. x / 2+1/2)) x = jump ?g x" when "0<x" "x<1" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jump (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) x = jump (\<lambda>t. Im (g2 t - z) / Re (g2 t - z)) x
[PROOF STEP]
unfolding h12_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jump ((\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z)) \<circ> (\<lambda>x. x / 2 + 1 / 2)) x = jump (\<lambda>t. Im (g2 t - z) / Re (g2 t - z)) x
[PROOF STEP]
proof (rule jump_cong)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x = x
 2. \<forall>\<^sub>F x in at x. ((\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z)) \<circ> (\<lambda>x. x / 2 + 1 / 2)) x = Im (g2 x - z) / Re (g2 x - z)
[PROOF STEP]
show "\<forall>\<^sub>F x in at x. ((\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z))
              \<circ> (\<lambda>x. x / 2+1/2)) x = Im (g2 x - z) / Re (g2 x - z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in at x. ((\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z)) \<circ> (\<lambda>x. x / 2 + 1 / 2)) x = Im (g2 x - z) / Re (g2 x - z)
[PROOF STEP]
unfolding eventually_at joinpaths_def comp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>d>0. \<forall>xa\<in>UNIV. xa \<noteq> x \<and> dist xa x < d \<longrightarrow> Im ((if xa / 2 + 1 / 2 \<le> 1 / 2 then g1 (2 * (xa / 2 + 1 / 2)) else g2 (2 * (xa / 2 + 1 / 2) - 1)) - z) / Re ((if xa / 2 + 1 / 2 \<le> 1 / 2 then g1 (2 * (xa / 2 + 1 / 2)) else g2 (2 * (xa / 2 + 1 / 2) - 1)) - z) = Im (g2 xa - z) / Re (g2 xa - z)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
0 < x
x < 1

goal (1 subgoal):
 1. \<exists>d>0. \<forall>xa\<in>UNIV. xa \<noteq> x \<and> dist xa x < d \<longrightarrow> Im ((if xa / 2 + 1 / 2 \<le> 1 / 2 then g1 (2 * (xa / 2 + 1 / 2)) else g2 (2 * (xa / 2 + 1 / 2) - 1)) - z) / Re ((if xa / 2 + 1 / 2 \<le> 1 / 2 then g1 (2 * (xa / 2 + 1 / 2)) else g2 (2 * (xa / 2 + 1 / 2) - 1)) - z) = Im (g2 xa - z) / Re (g2 xa - z)
[PROOF STEP]
apply (intro exI[where x="x/2"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < x; x < 1\<rbrakk> \<Longrightarrow> 0 < x / 2 \<and> (\<forall>xa\<in>UNIV. xa \<noteq> x \<and> dist xa x < x / 2 \<longrightarrow> Im ((if xa / 2 + 1 / 2 \<le> 1 / 2 then g1 (2 * (xa / 2 + 1 / 2)) else g2 (2 * (xa / 2 + 1 / 2) - 1)) - z) / Re ((if xa / 2 + 1 / 2 \<le> 1 / 2 then g1 (2 * (xa / 2 + 1 / 2)) else g2 (2 * (xa / 2 + 1 / 2) - 1)) - z) = Im (g2 xa - z) / Re (g2 xa - z))
[PROOF STEP]
by (auto simp add: dist_norm)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at x. ((\<lambda>t. Im ((g1 +++ g2) t - z) / Re ((g1 +++ g2) t - z)) \<circ> (\<lambda>x. x / 2 + 1 / 2)) x = Im (g2 x - z) / Re (g2 x - z)

goal (1 subgoal):
 1. x = x
[PROOF STEP]
qed simp
[PROOF STATE]
proof (state)
this:
\<lbrakk>0 < ?x1; ?x1 < 1\<rbrakk> \<Longrightarrow> jump (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) ?x1 = jump (\<lambda>t. Im (g2 t - z) / Re (g2 t - z)) ?x1

goal (1 subgoal):
 1. cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) = cindex_path g2 z
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>0 < ?x1; ?x1 < 1\<rbrakk> \<Longrightarrow> jump (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) ?x1 = jump (\<lambda>t. Im (g2 t - z) / Re (g2 t - z)) ?x1
[PROOF STEP]
have "{x. jump (h12 \<circ> (\<lambda>x. x / 2+1/2)) x \<noteq> 0 \<and> 0 < x \<and> x < 1}
            = {x. jump ?g x \<noteq> 0 \<and> 0 < x \<and> x < 1}"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 < ?x1; ?x1 < 1\<rbrakk> \<Longrightarrow> jump (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) ?x1 = jump (\<lambda>t. Im (g2 t - z) / Re (g2 t - z)) ?x1

goal (1 subgoal):
 1. {x. jump (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) x \<noteq> 0 \<and> 0 < x \<and> x < 1} = {x. jump (\<lambda>t. Im (g2 t - z) / Re (g2 t - z)) x \<noteq> 0 \<and> 0 < x \<and> x < 1}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{x. jump (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) x \<noteq> 0 \<and> 0 < x \<and> x < 1} = {x. jump (\<lambda>t. Im (g2 t - z) / Re (g2 t - z)) x \<noteq> 0 \<and> 0 < x \<and> x < 1}

goal (1 subgoal):
 1. cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) = cindex_path g2 z
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
{x. jump (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) x \<noteq> 0 \<and> 0 < x \<and> x < 1} = {x. jump (\<lambda>t. Im (g2 t - z) / Re (g2 t - z)) x \<noteq> 0 \<and> 0 < x \<and> x < 1}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
{x. jump (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) x \<noteq> 0 \<and> 0 < x \<and> x < 1} = {x. jump (\<lambda>t. Im (g2 t - z) / Re (g2 t - z)) x \<noteq> 0 \<and> 0 < x \<and> x < 1}

goal (1 subgoal):
 1. cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) = cindex_path g2 z
[PROOF STEP]
unfolding cindex_def cindex_path_def
[PROOF STATE]
proof (prove)
using this:
{x. jump (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) x \<noteq> 0 \<and> 0 < x \<and> x < 1} = {x. jump (\<lambda>t. Im (g2 t - z) / Re (g2 t - z)) x \<noteq> 0 \<and> 0 < x \<and> x < 1}

goal (1 subgoal):
 1. sum (jump (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2))) {x. jump (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) x \<noteq> 0 \<and> 0 < x \<and> x < 1} = sum (jump (\<lambda>t. Im (g2 t - z) / Re (g2 t - z))) {x. jump (\<lambda>t. Im (g2 t - z) / Re (g2 t - z)) x \<noteq> 0 \<and> 0 < x \<and> x < 1}
[PROOF STEP]
apply (elim sum.cong)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> {x. jump (\<lambda>t. Im (g2 t - z) / Re (g2 t - z)) x \<noteq> 0 \<and> 0 < x \<and> x < 1} \<Longrightarrow> jump (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) x = jump (\<lambda>t. Im (g2 t - z) / Re (g2 t - z)) x
[PROOF STEP]
by (auto simp add:*)
[PROOF STATE]
proof (state)
this:
cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) = cindex_path g2 z

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
cindex 0 1 (h12 \<circ> (\<lambda>x. x / 2 + 1 / 2)) = cindex_path g2 z

goal (1 subgoal):
 1. cindex (1 / 2) 1 h12 = cindex_path g2 z
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
cindex (1 / 2) 1 h12 = cindex_path g2 z
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
cindex (1 / 2) 1 h12 = cindex_path g2 z

goal (1 subgoal):
 1. cindex (1 / 2) 1 h12 = cindex_path g2 z
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
cindex (1 / 2) 1 h12 = cindex_path g2 z

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
cindex (1 / 2) 1 h12 = cindex_path g2 z

goal (1 subgoal):
 1. real_of_int (cindex 0 (1 / 2) h12 + jump h12 (1 / 2) + cindex (1 / 2) 1 h12) = real_of_int (cindex_path g1 z) + jumpF_pathstart g2 z - jumpF_pathfinish g1 z + real_of_int (cindex_path g2 z)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
real_of_int (jump h12 (1 / 2)) = jumpF_pathstart g2 z - jumpF_pathfinish g1 z
cindex 0 (1 / 2) h12 = cindex_path g1 z
cindex (1 / 2) 1 h12 = cindex_path g2 z
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
real_of_int (jump h12 (1 / 2)) = jumpF_pathstart g2 z - jumpF_pathfinish g1 z
cindex 0 (1 / 2) h12 = cindex_path g1 z
cindex (1 / 2) 1 h12 = cindex_path g2 z

goal (1 subgoal):
 1. real_of_int (cindex 0 (1 / 2) h12 + jump h12 (1 / 2) + cindex (1 / 2) 1 h12) = real_of_int (cindex_path g1 z) + jumpF_pathstart g2 z - jumpF_pathfinish g1 z + real_of_int (cindex_path g2 z)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
real_of_int (cindex 0 (1 / 2) h12 + jump h12 (1 / 2) + cindex (1 / 2) 1 h12) = real_of_int (cindex_path g1 z) + jumpF_pathstart g2 z - jumpF_pathfinish g1 z + real_of_int (cindex_path g2 z)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
real_of_int (cindex 0 (1 / 2) h12 + jump h12 (1 / 2) + cindex (1 / 2) 1 h12) = real_of_int (cindex_path g1 z) + jumpF_pathstart g2 z - jumpF_pathfinish g1 z + real_of_int (cindex_path g2 z)

goal (1 subgoal):
 1. real_of_int (cindex_path (g1 +++ g2) z) = real_of_int (cindex_path g1 z) + jumpF_pathstart g2 z - jumpF_pathfinish g1 z + real_of_int (cindex_path g2 z)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
real_of_int (cindex_path (g1 +++ g2) z) = real_of_int (cindex_path g1 z) + jumpF_pathstart g2 z - jumpF_pathfinish g1 z + real_of_int (cindex_path g2 z)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
real_of_int (cindex_path (g1 +++ g2) z) = real_of_int (cindex_path g1 z) + jumpF_pathstart g2 z - jumpF_pathfinish g1 z + real_of_int (cindex_path g2 z)

goal (1 subgoal):
 1. real_of_int (cindex_path (g1 +++ g2) z) = real_of_int (cindex_path g1 z) + jumpF_pathstart g2 z - jumpF_pathfinish g1 z + real_of_int (cindex_path g2 z)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
real_of_int (cindex_path (g1 +++ g2) z) = real_of_int (cindex_path g1 z) + jumpF_pathstart g2 z - jumpF_pathfinish g1 z + real_of_int (cindex_path g2 z)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma hyperplane_facet_of_halfspace_ge:
    "a \<noteq> 0 \<Longrightarrow> {x. a \<bullet> x = b} facet_of {x. a \<bullet> x \<ge> b}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<noteq> (0::'a) \<Longrightarrow> {x. a \<bullet> x = b} facet_of {x. b \<le> a \<bullet> x}
[PROOF STEP]
unfolding facet_of_def hyperplane_eq_empty
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<noteq> (0::'a) \<Longrightarrow> {x. a \<bullet> x = b} face_of {x. b \<le> a \<bullet> x} \<and> \<not> (a = (0::'a) \<and> b \<noteq> 0) \<and> aff_dim {x. a \<bullet> x = b} = aff_dim {x. b \<le> a \<bullet> x} - 1
[PROOF STEP]
by (auto simp: hyperplane_face_of_halfspace_le hyperplane_face_of_halfspace_ge
           Suc_leI of_nat_diff aff_dim_halfspace_ge)


[STATEMENT]
lemma continuous_imp_integrable:
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
  assumes "continuous_on (cbox a b) f"
  shows "integrable (lebesgue_on (cbox a b)) f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integrable (lebesgue_on (cbox a b)) f
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. integrable (lebesgue_on (cbox a b)) f
[PROOF STEP]
have "f absolutely_integrable_on cbox a b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f absolutely_integrable_on cbox a b
[PROOF STEP]
by (simp add: absolutely_integrable_continuous assms)
[PROOF STATE]
proof (state)
this:
f absolutely_integrable_on cbox a b

goal (1 subgoal):
 1. integrable (lebesgue_on (cbox a b)) f
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
f absolutely_integrable_on cbox a b
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
f absolutely_integrable_on cbox a b

goal (1 subgoal):
 1. integrable (lebesgue_on (cbox a b)) f
[PROOF STEP]
by (simp add: integrable_restrict_space set_integrable_def)
[PROOF STATE]
proof (state)
this:
integrable (lebesgue_on (cbox a b)) f

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sum_ereal_left_distrib:
  "(\<And>i. i \<in> A \<Longrightarrow> 0 \<le> f i) \<Longrightarrow> sum f A * r = (\<Sum>n\<in>A. f n * r :: ereal)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>i. i \<in> A \<Longrightarrow> 0 \<le> f i) \<Longrightarrow> sum f A * r = (\<Sum>n\<in>A. f n * r)
[PROOF STEP]
using sum_ereal_right_distrib[of A f r]
[PROOF STATE]
proof (prove)
using this:
(\<And>i. i \<in> A \<Longrightarrow> 0 \<le> f i) \<Longrightarrow> r * sum f A = (\<Sum>n\<in>A. r * f n)

goal (1 subgoal):
 1. (\<And>i. i \<in> A \<Longrightarrow> 0 \<le> f i) \<Longrightarrow> sum f A * r = (\<Sum>n\<in>A. f n * r)
[PROOF STEP]
by (simp add: mult_ac)


[STATEMENT]
lemma prv_eql_subst_trm_id_back:
  assumes "y \<in> var" "\<phi> \<in> fmla" and "n \<in> num"
  shows "prv (imp (eql (Var y) n) (imp (subst \<phi> n y) \<phi>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prv (imp (eql (Var y) n) (imp (subst \<phi> n y) \<phi>))
[PROOF STEP]
by (metis Var assms in_num prv_eql_subst_trm_rev subst_same_Var)


[STATEMENT]
lemma semigroup_law_semigroup: "semigroup_law mult"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semigroup_law (\<otimes>)
[PROOF STEP]
unfolding semigroup_law_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x y z. x \<otimes> y \<otimes> z = x \<otimes> (y \<otimes> z)
[PROOF STEP]
using semigroup_class.axioms
[PROOF STATE]
proof (prove)
using this:
class.semigroup (\<otimes>)

goal (1 subgoal):
 1. \<forall>x y z. x \<otimes> y \<otimes> z = x \<otimes> (y \<otimes> z)
[PROOF STEP]
unfolding class.semigroup_def
[PROOF STATE]
proof (prove)
using this:
\<forall>x y z. x \<otimes> y \<otimes> z = x \<otimes> (y \<otimes> z)

goal (1 subgoal):
 1. \<forall>x y z. x \<otimes> y \<otimes> z = x \<otimes> (y \<otimes> z)
[PROOF STEP]
.


[STATEMENT]
lemma "i < x \<Longrightarrow> i < i + 1" for i x :: "'a::len word"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i < x \<Longrightarrow> i < i + 1
[PROOF STEP]
by unat_arith


[STATEMENT]
lemma unit_circle_fix_id_moebius [simp]:
  shows "unit_circle_fix id_moebius"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unit_circle_fix id_moebius
[PROOF STEP]
by (transfer, transfer, simp add: unitary11_gen_def mat_adj_def mat_cnj_def)


[STATEMENT]
lemma getPos_append: "getPos (as@bs) = getPos as @ getPos bs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. getPos (as @ bs) = getPos as @ getPos bs
[PROOF STEP]
by(induct as rule: getPos.induct) simp+


[STATEMENT]
lemma filter_even_nth: "2*j < l \<Longrightarrow> 2*x = l \<Longrightarrow> (filter even [0..<l] ! j) = (2*j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>2 * j < l; 2 * x = l\<rbrakk> \<Longrightarrow> filter even [0..<l] ! j = 2 * j
[PROOF STEP]
using filter_even_map[of x] nth_map[of j "filter even [0..<l]" "(*) 2"]
[PROOF STATE]
proof (prove)
using this:
filter even [0..<2 * x] = map ((*) 2) [0..<x]
j < length (filter even [0..<l]) \<Longrightarrow> map ((*) 2) (filter even [0..<l]) ! j = 2 * filter even [0..<l] ! j

goal (1 subgoal):
 1. \<lbrakk>2 * j < l; 2 * x = l\<rbrakk> \<Longrightarrow> filter even [0..<l] ! j = 2 * j
[PROOF STEP]
by auto


[STATEMENT]
lemma "\<exists>(x::int) y. 0 < x \<and> 0 \<le> y \<and> 3 * x - 5 * y = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x y. 0 < x \<and> 0 \<le> y \<and> 3 * x - 5 * y = 1
[PROOF STEP]
by cooper


[STATEMENT]
theorem ParT_ZObis[simp]:
assumes "properL cl" and "properL dl" and "SbisL cl dl"
shows "ParT cl \<approx>01 ParT dl"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ParT cl \<approx>01 ParT dl
[PROOF STEP]
using assms thetaZOParT_ZObis
[PROOF STATE]
proof (prove)
using this:
properL cl
properL dl
SbisL cl dl
thetaZOParT \<subseteq> ZObis

goal (1 subgoal):
 1. ParT cl \<approx>01 ParT dl
[PROOF STEP]
unfolding thetaZOParT_def
[PROOF STATE]
proof (prove)
using this:
properL cl
properL dl
SbisL cl dl
{(ParT cl, ParT dl) |cl dl. properL cl \<and> properL dl \<and> SbisL cl dl} \<subseteq> ZObis

goal (1 subgoal):
 1. ParT cl \<approx>01 ParT dl
[PROOF STEP]
by blast


[STATEMENT]
lemma ennreal_inverse_eq_top_iff[simp]: "inverse (a::ennreal) = top \<longleftrightarrow> a = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (inverse a = top) = (a = 0)
[PROOF STEP]
by transfer (simp add: top_ereal_def)


[STATEMENT]
lemma mk_v_exists:"\<exists>\<omega>. Vagree \<omega> \<nu> (- semBV I ODE)
\<and> Vagree \<omega> (mk_xode I ODE sol) (semBV I ODE)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>\<omega>. Vagree \<omega> \<nu> (- semBV I ODE) \<and> Vagree \<omega> (mk_xode I ODE sol) (semBV I ODE)
[PROOF STEP]
by(rule exI[where x="(concrete_v I ODE \<nu> sol)"], auto simp add: Vagree_def)


[STATEMENT]
lemma (in cpx_sq_mat) proj_measurement_carrier:
  assumes "proj_measurement p M"
  and "i < p"
  shows "meas_outcome_prj (M i) \<in> fc_mats"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. meas_outcome_prj (M i) \<in> fc_mats
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
proj_measurement p M
i < p

goal (1 subgoal):
 1. meas_outcome_prj (M i) \<in> fc_mats
[PROOF STEP]
unfolding proj_measurement_def
[PROOF STATE]
proof (prove)
using this:
inj_on (\<lambda>i. meas_outcome_val (M i)) {..<p} \<and> (\<forall>j<p. meas_outcome_prj (M j) \<in> fc_mats \<and> projector (meas_outcome_prj (M j))) \<and> (\<forall>i<p. \<forall>j<p. i \<noteq> j \<longrightarrow> meas_outcome_prj (M i) * meas_outcome_prj (M j) = 0\<^sub>m dimR dimR) \<and> local.sum_mat (\<lambda>j. meas_outcome_prj (M j)) {..<p} = 1\<^sub>m dimR
i < p

goal (1 subgoal):
 1. meas_outcome_prj (M i) \<in> fc_mats
[PROOF STEP]
by simp


[STATEMENT]
lemma approx_hrabs_add_minus_Infinitesimal: "e \<in> Infinitesimal ==> \<bar>x\<bar> \<approx> \<bar>x + -e\<bar>"
  for e x :: hypreal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. e \<in> Infinitesimal \<Longrightarrow> \<bar>x\<bar> \<approx> \<bar>x + - e\<bar>
[PROOF STEP]
by (fast intro: approx_hrabs Infinitesimal_add_minus_approx_self)


[STATEMENT]
lemma "((grd (local_init init S))::'a\<Rightarrow>bool) = Sup ((grd o S) ` init)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. grd (local_init init S) = Sup ((grd \<circ> S) ` init)
[PROOF STEP]
by (simp add: fun_eq_iff local_init_def assert_def grd_def)


[STATEMENT]
lemma EXT_set: "\<forall>\<alpha>::\<langle>\<langle>\<zero>\<rangle>\<rangle>. \<forall>\<beta>::\<langle>\<langle>\<zero>\<rangle>\<rangle>. (\<forall>\<gamma>::\<langle>\<zero>\<rangle>. (\<alpha> \<gamma> \<longleftrightarrow> \<beta> \<gamma>)) \<longrightarrow> (\<alpha> = \<beta>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. universal (\<lambda>\<alpha> \<beta>. (\<forall>\<gamma>. \<alpha> \<gamma> = \<beta> \<gamma>) \<longrightarrow> \<alpha> = \<beta>)
[PROOF STEP]
by auto


[STATEMENT]
theorem E17: "\<turnstile> \<box>\<diamond>\<box>F \<longrightarrow> \<box>\<diamond>F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> \<box>\<diamond>\<box>F \<longrightarrow> \<box>\<diamond>F
[PROOF STEP]
by (rule STL4[OF STL4_eve[OF ax1]])


[STATEMENT]
lemma (in order_topology)
  assumes "a < b"
  shows at_within_Icc_at_right: "at a within {a..b} = at_right a"
    and at_within_Icc_at_left:  "at b within {a..b} = at_left b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. at a within {a..b} = at_right a &&& at b within {a..b} = at_left b
[PROOF STEP]
using order_tendstoD(2)[OF tendsto_ident_at assms, of "{a<..}"]
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in at_right a. x < b

goal (1 subgoal):
 1. at a within {a..b} = at_right a &&& at b within {a..b} = at_left b
[PROOF STEP]
using order_tendstoD(1)[OF tendsto_ident_at assms, of "{..<b}"]
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in at_right a. x < b
eventually ((<) a) (at_left b)

goal (1 subgoal):
 1. at a within {a..b} = at_right a &&& at b within {a..b} = at_left b
[PROOF STEP]
by (auto intro!: order_class.order_antisym filter_leI
      simp: eventually_at_filter less_le
      elim: eventually_elim2)


[STATEMENT]
lemma metric_LIM_imp_LIM:
  fixes l :: "'a::metric_space"
    and m :: "'b::metric_space"
  assumes f: "f \<midarrow>a\<rightarrow> l"
    and le: "\<And>x. x \<noteq> a \<Longrightarrow> dist (g x) m \<le> dist (f x) l"
  shows "g \<midarrow>a\<rightarrow> m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g \<midarrow>a\<rightarrow> m
[PROOF STEP]
by (rule metric_tendsto_imp_tendsto [OF f]) (auto simp: eventually_at_topological le)


[STATEMENT]
lemma omega_coinduct_var1: "y \<le> 1 + x \<cdot> y \<Longrightarrow> y \<le> x\<^sup>\<omega> + x\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y \<le> (1::'a) + x \<cdot> y \<Longrightarrow> y \<le> x\<^sup>\<omega> + x\<^sup>\<star>
[PROOF STEP]
using local.omega_coinduct
[PROOF STATE]
proof (prove)
using this:
?y \<le> ?z + ?x \<cdot> ?y \<Longrightarrow> ?y \<le> ?x\<^sup>\<omega> + ?x\<^sup>\<star> \<cdot> ?z

goal (1 subgoal):
 1. y \<le> (1::'a) + x \<cdot> y \<Longrightarrow> y \<le> x\<^sup>\<omega> + x\<^sup>\<star>
[PROOF STEP]
by fastforce


[STATEMENT]
lemma max_Var_floatariths_map_divide[simp]:
  "max_Var_floatariths (map (\<lambda>i. fa1 i / fa2 i) xs) = max (max_Var_floatariths (map fa1 xs)) (max_Var_floatariths (map fa2 xs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. max_Var_floatariths (map (\<lambda>i. fa1 i / fa2 i) xs) = max (max_Var_floatariths (map fa1 xs)) (max_Var_floatariths (map fa2 xs))
[PROOF STEP]
by (auto simp: max_Var_floatariths_Max image_image Max_Image_distrib)


[STATEMENT]
lemma decompose_zmset_of2:
  obtains A B C where
    "M = zmset_of A + C" and
    "N = zmset_of B + C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>A C B. \<lbrakk>M = zmset_of A + C; N = zmset_of B + C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<And>A C B. \<lbrakk>M = zmset_of A + C; N = zmset_of B + C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> M = zmset_of ?A2 + ?C2
 2. (\<And>A C B. \<lbrakk>M = zmset_of A + C; N = zmset_of B + C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> N = zmset_of ?B2 + ?C2
[PROOF STEP]
let ?A = "zmset_of (mset_pos M + mset_neg N)"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<And>A C B. \<lbrakk>M = zmset_of A + C; N = zmset_of B + C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> M = zmset_of ?A2 + ?C2
 2. (\<And>A C B. \<lbrakk>M = zmset_of A + C; N = zmset_of B + C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> N = zmset_of ?B2 + ?C2
[PROOF STEP]
let ?B = "zmset_of (mset_pos N + mset_neg M)"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<And>A C B. \<lbrakk>M = zmset_of A + C; N = zmset_of B + C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> M = zmset_of ?A2 + ?C2
 2. (\<And>A C B. \<lbrakk>M = zmset_of A + C; N = zmset_of B + C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> N = zmset_of ?B2 + ?C2
[PROOF STEP]
let ?C = "- (zmset_of (mset_neg M) + zmset_of (mset_neg N))"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<And>A C B. \<lbrakk>M = zmset_of A + C; N = zmset_of B + C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> M = zmset_of ?A2 + ?C2
 2. (\<And>A C B. \<lbrakk>M = zmset_of A + C; N = zmset_of B + C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> N = zmset_of ?B2 + ?C2
[PROOF STEP]
show "M = ?A + ?C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M = zmset_of (mset_pos M + mset_neg N) + - (zmset_of (mset_neg M) + zmset_of (mset_neg N))
[PROOF STEP]
by (simp add: zmset_of_plus mset_pos_neg_partition)
[PROOF STATE]
proof (state)
this:
M = zmset_of (mset_pos M + mset_neg N) + - (zmset_of (mset_neg M) + zmset_of (mset_neg N))

goal (1 subgoal):
 1. (\<And>A C B. \<lbrakk>M = zmset_of A + C; N = zmset_of B + C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> N = zmset_of ?B2 + - (zmset_of (mset_neg M) + zmset_of (mset_neg N))
[PROOF STEP]
show "N = ?B + ?C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. N = zmset_of (mset_pos N + mset_neg M) + - (zmset_of (mset_neg M) + zmset_of (mset_neg N))
[PROOF STEP]
by (simp add: zmset_of_plus diff_add_zmset mset_pos_neg_partition)
[PROOF STATE]
proof (state)
this:
N = zmset_of (mset_pos N + mset_neg M) + - (zmset_of (mset_neg M) + zmset_of (mset_neg N))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma na_an:"na (an n) = n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. na (an n) = n
[PROOF STEP]
by (simp only:na_def an_def,
       subgoal_tac "\<not> ant (int n) < 0", simp,
       simp add:tna_ant, subst aneg_less[of "ant (int n)" "0"],
       simp only:ant_0[THEN sym], subst ale_zle[of "0" "int n"], simp)


[STATEMENT]
lemma elem_natUnion: "(\<forall> n. x \<in> f n) \<Longrightarrow> x \<in> natUnion f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>n. x \<in> f n \<Longrightarrow> x \<in> natUnion f
[PROOF STEP]
by (auto simp add: natUnion_def)


[STATEMENT]
lemma upd_row_transpose: "upd_row (transpose M) i p = transpose (upd_col M i p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. upd_row (Square_Matrix.transpose M) i p = Square_Matrix.transpose (upd_col M i p)
[PROOF STEP]
by transfer simp


[STATEMENT]
lemma regular_Elem: "regular is_Elem_of"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. regular is_Elem_of
[PROOF STEP]
by (simp add: regular_def is_Elem_of_def Regularity)


[STATEMENT]
lemma (in jozsa) \<psi>\<^sub>2_values_odd_hidden [simp]:
  assumes "2*k+1 < dim_row \<psi>\<^sub>2" and "j < dim_col \<psi>\<^sub>2"
  shows "\<psi>\<^sub>2 $$ (2*k+1,j) = ((-1)^(f((2*k+1) div 2)+1))/(sqrt 2)^(n+1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Matrix.mat (2 ^ (n + 1)) 1 (\<lambda>x. complex_of_real (case x of (i, j) \<Rightarrow> if even i then (- 1) ^ f (i div 2) / sqrt 2 ^ (n + 1) else (- 1) ^ (f (i div 2) + 1) / sqrt 2 ^ (n + 1))) $$ (2 * k + 1, j) = complex_of_real ((- 1) ^ (f ((2 * k + 1) div 2) + 1) / sqrt 2 ^ (n + 1))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
2 * k + 1 < dim_row (Matrix.mat (2 ^ (n + 1)) 1 (\<lambda>x. complex_of_real (case x of (i, j) \<Rightarrow> if even i then (- 1) ^ f (i div 2) / sqrt 2 ^ (n + 1) else (- 1) ^ (f (i div 2) + 1) / sqrt 2 ^ (n + 1))))
j < dim_col (Matrix.mat (2 ^ (n + 1)) 1 (\<lambda>x. complex_of_real (case x of (i, j) \<Rightarrow> if even i then (- 1) ^ f (i div 2) / sqrt 2 ^ (n + 1) else (- 1) ^ (f (i div 2) + 1) / sqrt 2 ^ (n + 1))))

goal (1 subgoal):
 1. Matrix.mat (2 ^ (n + 1)) 1 (\<lambda>x. complex_of_real (case x of (i, j) \<Rightarrow> if even i then (- 1) ^ f (i div 2) / sqrt 2 ^ (n + 1) else (- 1) ^ (f (i div 2) + 1) / sqrt 2 ^ (n + 1))) $$ (2 * k + 1, j) = complex_of_real ((- 1) ^ (f ((2 * k + 1) div 2) + 1) / sqrt 2 ^ (n + 1))
[PROOF STEP]
by simp


[STATEMENT]
lemma small_mult: "f1 \<in> l F (g1) \<Longrightarrow> f2 \<in> l F (g2) \<Longrightarrow> (\<lambda>x. f1 x * f2 x) \<in> l F (\<lambda>x. g1 x * g2 x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f1 \<in> l F g1; f2 \<in> l F g2\<rbrakk> \<Longrightarrow> (\<lambda>x. f1 x * f2 x) \<in> l F (\<lambda>x. g1 x * g2 x)
[PROOF STEP]
by (rule small_big_mult, assumption, rule small_imp_big)


[STATEMENT]
lemma tendsto_add_ereal:
  fixes x y :: ereal
  assumes x: "\<bar>x\<bar> \<noteq> \<infinity>" and y: "\<bar>y\<bar> \<noteq> \<infinity>"
  assumes f: "(f \<longlongrightarrow> x) F" and g: "(g \<longlongrightarrow> y) F"
  shows "((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
from x
[PROOF STATE]
proof (chain)
picking this:
\<bar>x\<bar> \<noteq> \<infinity>
[PROOF STEP]
obtain r where x': "x = ereal r"
[PROOF STATE]
proof (prove)
using this:
\<bar>x\<bar> \<noteq> \<infinity>

goal (1 subgoal):
 1. (\<And>r. x = ereal r \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (cases x) auto
[PROOF STATE]
proof (state)
this:
x = ereal r

goal (1 subgoal):
 1. ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
with f
[PROOF STATE]
proof (chain)
picking this:
(f \<longlongrightarrow> x) F
x = ereal r
[PROOF STEP]
have "((\<lambda>i. real_of_ereal (f i)) \<longlongrightarrow> r) F"
[PROOF STATE]
proof (prove)
using this:
(f \<longlongrightarrow> x) F
x = ereal r

goal (1 subgoal):
 1. ((\<lambda>i. real_of_ereal (f i)) \<longlongrightarrow> r) F
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
((\<lambda>i. real_of_ereal (f i)) \<longlongrightarrow> r) F

goal (1 subgoal):
 1. ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
((\<lambda>i. real_of_ereal (f i)) \<longlongrightarrow> r) F

goal (1 subgoal):
 1. ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
from y
[PROOF STATE]
proof (chain)
picking this:
\<bar>y\<bar> \<noteq> \<infinity>
[PROOF STEP]
obtain p where y': "y = ereal p"
[PROOF STATE]
proof (prove)
using this:
\<bar>y\<bar> \<noteq> \<infinity>

goal (1 subgoal):
 1. (\<And>p. y = ereal p \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (cases y) auto
[PROOF STATE]
proof (state)
this:
y = ereal p

goal (1 subgoal):
 1. ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
with g
[PROOF STATE]
proof (chain)
picking this:
(g \<longlongrightarrow> y) F
y = ereal p
[PROOF STEP]
have "((\<lambda>i. real_of_ereal (g i)) \<longlongrightarrow> p) F"
[PROOF STATE]
proof (prove)
using this:
(g \<longlongrightarrow> y) F
y = ereal p

goal (1 subgoal):
 1. ((\<lambda>i. real_of_ereal (g i)) \<longlongrightarrow> p) F
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
((\<lambda>i. real_of_ereal (g i)) \<longlongrightarrow> p) F

goal (1 subgoal):
 1. ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>i. real_of_ereal (f i)) \<longlongrightarrow> r) F
((\<lambda>i. real_of_ereal (g i)) \<longlongrightarrow> p) F
[PROOF STEP]
have "((\<lambda>i. real_of_ereal (f i) + real_of_ereal (g i)) \<longlongrightarrow> r + p) F"
[PROOF STATE]
proof (prove)
using this:
((\<lambda>i. real_of_ereal (f i)) \<longlongrightarrow> r) F
((\<lambda>i. real_of_ereal (g i)) \<longlongrightarrow> p) F

goal (1 subgoal):
 1. ((\<lambda>i. real_of_ereal (f i) + real_of_ereal (g i)) \<longlongrightarrow> r + p) F
[PROOF STEP]
by (rule tendsto_add)
[PROOF STATE]
proof (state)
this:
((\<lambda>i. real_of_ereal (f i) + real_of_ereal (g i)) \<longlongrightarrow> r + p) F

goal (1 subgoal):
 1. ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
((\<lambda>i. real_of_ereal (f i) + real_of_ereal (g i)) \<longlongrightarrow> r + p) F

goal (1 subgoal):
 1. ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
from eventually_finite[OF x f] eventually_finite[OF y g]
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F x in F. \<bar>f x\<bar> \<noteq> \<infinity>
\<forall>\<^sub>F x in F. \<bar>g x\<bar> \<noteq> \<infinity>
[PROOF STEP]
have "eventually (\<lambda>x. f x + g x = ereal (real_of_ereal (f x) + real_of_ereal (g x))) F"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in F. \<bar>f x\<bar> \<noteq> \<infinity>
\<forall>\<^sub>F x in F. \<bar>g x\<bar> \<noteq> \<infinity>

goal (1 subgoal):
 1. \<forall>\<^sub>F x in F. f x + g x = ereal (real_of_ereal (f x) + real_of_ereal (g x))
[PROOF STEP]
by eventually_elim auto
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in F. f x + g x = ereal (real_of_ereal (f x) + real_of_ereal (g x))

goal (1 subgoal):
 1. ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>i. real_of_ereal (f i) + real_of_ereal (g i)) \<longlongrightarrow> r + p) F
\<forall>\<^sub>F x in F. f x + g x = ereal (real_of_ereal (f x) + real_of_ereal (g x))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
((\<lambda>i. real_of_ereal (f i) + real_of_ereal (g i)) \<longlongrightarrow> r + p) F
\<forall>\<^sub>F x in F. f x + g x = ereal (real_of_ereal (f x) + real_of_ereal (g x))

goal (1 subgoal):
 1. ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
by (simp add: x' y' cong: filterlim_cong)
[PROOF STATE]
proof (state)
this:
((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma trunc_bl2bin: "take_bit m (bl_to_bin bl) = bl_to_bin (drop (length bl - m) bl)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. take_bit m (bl_to_bin bl) = bl_to_bin (drop (length bl - m) bl)
[PROOF STEP]
by (simp add: bl_to_bin_def trunc_bl2bin_aux)


[STATEMENT]
lemma prime_factorization_eqI:
  assumes "\<And>p. p \<in># P \<Longrightarrow> prime p" "normalize (prod_mset P) = normalize n"
  shows   "prime_factorization n = P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prime_factorization n = P
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. prime_factorization n = P
[PROOF STEP]
have "P = prime_factorization (normalize (prod_mset P))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P = prime_factorization (normalize (\<Prod>\<^sub># P))
[PROOF STEP]
using prime_factorization_prod_mset_primes[of P] assms(1)
[PROOF STATE]
proof (prove)
using this:
(\<And>p. p \<in># P \<Longrightarrow> prime p) \<Longrightarrow> prime_factorization (\<Prod>\<^sub># P) = P
?p1 \<in># P \<Longrightarrow> prime ?p1

goal (1 subgoal):
 1. P = prime_factorization (normalize (\<Prod>\<^sub># P))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P = prime_factorization (normalize (\<Prod>\<^sub># P))

goal (1 subgoal):
 1. prime_factorization n = P
[PROOF STEP]
with assms(2)
[PROOF STATE]
proof (chain)
picking this:
normalize (\<Prod>\<^sub># P) = normalize n
P = prime_factorization (normalize (\<Prod>\<^sub># P))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
normalize (\<Prod>\<^sub># P) = normalize n
P = prime_factorization (normalize (\<Prod>\<^sub># P))

goal (1 subgoal):
 1. prime_factorization n = P
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
prime_factorization n = P

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma weight_lub_spmf:
  assumes Y: "Y \<noteq> {}"
  shows "weight_spmf lub_spmf = (SUP y\<in>Y. weight_spmf y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. weight_spmf local.lub_spmf = \<Squnion> (weight_spmf ` Y)
[PROOF STEP]
unfolding weight_spmf_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sigma_Algebra.measure (measure_spmf local.lub_spmf) UNIV = (\<Squnion>y\<in>Y. Sigma_Algebra.measure (measure_spmf y) UNIV)
[PROOF STEP]
by(rule measure_lub_spmf) fact


[STATEMENT]
lemma tendsto_arctan [tendsto_intros]: "(f \<longlongrightarrow> x) F \<Longrightarrow> ((\<lambda>x. arctan (f x)) \<longlongrightarrow> arctan x) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<longlongrightarrow> x) F \<Longrightarrow> ((\<lambda>x. arctan (f x)) \<longlongrightarrow> arctan x) F
[PROOF STEP]
by (rule isCont_tendsto_compose [OF isCont_arctan])


[STATEMENT]
lemma flow_image_eq_rev: "flow0 x ` S = rev.flow0 x ` (uminus ` S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. flow0 x ` S = rev.flow0 x ` uminus ` S
[PROOF STEP]
unfolding rev_eq_flow[abs_def]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. flow0 x ` S = (\<lambda>t. flow0 x (- t)) ` uminus ` S
[PROOF STEP]
by force


[STATEMENT]
lemma dconvfactor_id [simp]: "dconvfactor id\<^sub>C d = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dconvfactor id\<^sub>C d = 1
[PROOF STEP]
by (simp add: dconvfactor_def, transfer, simp)


[STATEMENT]
lemma r2f2r_inv1 [simp]: "\<R> \<circ> \<F> = id"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<R> \<circ> \<F> = id
[PROOF STEP]
unfolding f2r_def r2f_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>f. {(x, y). y \<in> f x}) \<circ> (\<lambda>R. (``) R \<circ> \<eta>) = id
[PROOF STEP]
by force


[STATEMENT]
lemma pparts_insert_eq: "pparts (insert X H) = pparts {X} Un pparts H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pparts (insert X H) = pparts {X} \<union> pparts H
[PROOF STEP]
by (rule_tac A=H in insert_Un, rule pparts_Un)


[STATEMENT]
lemma finite_permutations_of_set [simp]: "finite (permutations_of_set A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (permutations_of_set A)
[PROOF STEP]
by (cases "finite A") (simp_all add: permutations_of_set_infinite permutations_of_set_altdef)


[STATEMENT]
lemma powser_sums_zero: "(\<lambda>n. a n * 0^n) sums a 0"
  for a :: "nat \<Rightarrow> 'a::real_normed_div_algebra"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. a n * (0::'a) ^ n) sums a 0
[PROOF STEP]
using sums_finite [of "{0}" "\<lambda>n. a n * 0 ^ n"]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>finite {0}; \<And>n. n \<notin> {0} \<Longrightarrow> a n * (0::'a) ^ n = (0::'a)\<rbrakk> \<Longrightarrow> (\<lambda>n. a n * (0::'a) ^ n) sums (\<Sum>n\<in>{0}. a n * (0::'a) ^ n)

goal (1 subgoal):
 1. (\<lambda>n. a n * (0::'a) ^ n) sums a 0
[PROOF STEP]
by simp


[STATEMENT]
lemma DERIV_cos [simp]: "DERIV cos x :> - sin x"
  for x :: "'a::{real_normed_field,banach}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (cos has_field_derivative - sin x) (at x)
[PROOF STEP]
unfolding sin_def cos_def scaleR_conv_of_real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. \<Sum>n. of_real (cos_coeff n) * x ^ n) has_field_derivative - (\<Sum>n. of_real (sin_coeff n) * x ^ n)) (at x)
[PROOF STEP]
apply (rule DERIV_cong)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. ((\<lambda>x. \<Sum>n. of_real (cos_coeff n) * x ^ n) has_field_derivative ?X) (at x)
 2. ?X = - (\<Sum>n. of_real (sin_coeff n) * x ^ n)
[PROOF STEP]
apply (rule termdiffs [where K="of_real (norm x) + 1 :: 'a"])
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. summable (\<lambda>n. of_real (cos_coeff n) * (of_real (norm x) + (1::'a)) ^ n)
 2. summable (\<lambda>n. diffs (\<lambda>n. of_real (cos_coeff n)) n * (of_real (norm x) + (1::'a)) ^ n)
 3. summable (\<lambda>n. diffs (diffs (\<lambda>n. of_real (cos_coeff n))) n * (of_real (norm x) + (1::'a)) ^ n)
 4. norm x < norm (of_real (norm x) + (1::'a))
 5. (\<Sum>n. diffs (\<lambda>n. of_real (cos_coeff n)) n * x ^ n) = - (\<Sum>n. of_real (sin_coeff n) * x ^ n)
[PROOF STEP]
apply (simp_all add: norm_less_p1 diffs_of_real diffs_minus suminf_minus
              diffs_sin_coeff diffs_cos_coeff
              summable_minus_iff scaleR_conv_of_real [symmetric]
              summable_norm_sin [THEN summable_norm_cancel]
              summable_norm_cos [THEN summable_norm_cancel])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma monadP_qbs_space[simp] : "qbs_space (monadP_qbs X) = monadP_qbs_Px X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. qbs_space (monadP_qbs X) = monadP_qbs_Px X
[PROOF STEP]
by(simp add: qbs_space_def monadP_qbs_correct)


[STATEMENT]
lemma (in comm_monoid_cancel) prime_divides:
  assumes carr: "a \<in> carrier G"  "b \<in> carrier G"
    and pprime: "prime G p"
    and pdvd: "p divides a \<otimes> b"
  shows "p divides a \<or> p divides b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p divides a \<or> p divides b
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
a \<in> carrier G
b \<in> carrier G
prime G p
p divides a \<otimes> b

goal (1 subgoal):
 1. p divides a \<or> p divides b
[PROOF STEP]
by (blast elim: primeE)


[STATEMENT]
lemma fdisjnt_insert: "x |\<notin>| N \<Longrightarrow> fdisjnt M N \<Longrightarrow> fdisjnt (finsert x M) N"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x |\<notin>| N; fdisjnt M N\<rbrakk> \<Longrightarrow> fdisjnt (finsert x M) N
[PROOF STEP]
by transfer' (rule disjnt_insert)


[STATEMENT]
lemma Cons_not_Nil [iff]: "x # xs ~= Nil"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x # xs \<noteq> []
[PROOF STEP]
apply (unfold Nil_def Cons_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Abs_List (CONS (Leaf x) (Rep_List xs)) \<noteq> Abs_List NIL
[PROOF STEP]
apply (rule CONS_not_NIL [THEN inj_on_Abs_list [THEN inj_on_contraD]])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. CONS (Leaf x) (Rep_List xs) \<in> list (range Leaf)
 2. NIL \<in> list (range Leaf)
[PROOF STEP]
apply (simp_all add: list.intros rangeI Rep_List [unfolded List_def])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma rlfm_I:
  assumes qfp: "qfree p"
  and xp: "0 \<le> x" and x1: "x < 1"
  shows "(Ifm (x#bs) (rlfm p) = Ifm (x# bs) p) \<and> isrlfm (rlfm p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ifm (x # bs) (rlfm p) = Ifm (x # bs) p \<and> isrlfm (rlfm p)
[PROOF STEP]
using qfp
[PROOF STATE]
proof (prove)
using this:
qfree p

goal (1 subgoal):
 1. Ifm (x # bs) (rlfm p) = Ifm (x # bs) p \<and> isrlfm (rlfm p)
[PROOF STEP]
by (induct p rule: rlfm.induct)
(auto simp add: rsplit[OF xp x1 lt_mono] lt_l rsplit[OF xp x1 le_mono] le_l rsplit[OF xp x1 gt_mono] gt_l
               rsplit[OF xp x1 ge_mono] ge_l rsplit[OF xp x1 eq_mono] eq_l rsplit[OF xp x1 neq_mono] neq_l
               rsplit[OF xp x1 DVD_mono[OF xp x1]] DVD_l rsplit[OF xp x1 NDVD_mono[OF xp x1]] NDVD_l simpfm_rl)


[STATEMENT]
lemma enum_ind_neq [simp]: "x \<noteq> y \<Longrightarrow> enum_ind x \<noteq> enum_ind y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<noteq> y \<Longrightarrow> enum_ind x \<noteq> enum_ind y
[PROOF STEP]
by (simp add: enum_ind_inj inj_eq)


[STATEMENT]
lemma finite_\<F>: "finite \<F>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite \<F>
[PROOF STEP]
unfolding \<F>_def numbers_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite ({..<m} \<rightarrow>\<^sub>E {..<k - 1})
[PROOF STEP]
by (meson finite_PiE finite_lessThan)


[STATEMENT]
lemma isCont_exp' [simp]: "isCont f a \<Longrightarrow> isCont (\<lambda>x. exp (f x)) a"
  for f :: "_ \<Rightarrow>'a::{real_normed_field,banach}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. isCont f a \<Longrightarrow> isCont (\<lambda>x. exp (f x)) a
[PROOF STEP]
by (rule isCont_o2 [OF _ isCont_exp])


[STATEMENT]
lemma ofilter_subset_iso:
assumes WELL: "Well_order r" and
        OFA: "ofilter r A" and OFB: "ofilter r B"
shows "(A = B) = iso (Restr r A) (Restr r B) id"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (A = B) = iso (Restr r A) (Restr r B) id
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
Well_order r
ofilter r A
ofilter r B

goal (1 subgoal):
 1. (A = B) = iso (Restr r A) (Restr r B) id
[PROOF STEP]
by (auto simp add: ofilter_subset_embedS_iso)


[STATEMENT]
lemma lens_equiv_trans [trans]:
  "\<lbrakk> X \<approx>\<^sub>L Y; Y \<approx>\<^sub>L Z \<rbrakk> \<Longrightarrow> X \<approx>\<^sub>L Z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>X \<approx>\<^sub>L Y; Y \<approx>\<^sub>L Z\<rbrakk> \<Longrightarrow> X \<approx>\<^sub>L Z
[PROOF STEP]
by (auto intro: sublens_trans simp add: lens_equiv_def)


[STATEMENT]
lemma strict_mono_mono[dest?]:
  assumes "strict_mono\<^sub>a\<^sub>b f"
  shows "mono\<^sub>a\<^sub>b f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mono\<^sub>a\<^sub>b f
[PROOF STEP]
proof(rule monoI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. x \<le>\<^sub>a y \<Longrightarrow> f x \<le>\<^sub>b f y
[PROOF STEP]
fix x y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. x \<le>\<^sub>a y \<Longrightarrow> f x \<le>\<^sub>b f y
[PROOF STEP]
assume "x \<le>\<^sub>a y"
[PROOF STATE]
proof (state)
this:
x \<le>\<^sub>a y

goal (1 subgoal):
 1. \<And>x y. x \<le>\<^sub>a y \<Longrightarrow> f x \<le>\<^sub>b f y
[PROOF STEP]
show "f x \<le>\<^sub>b f y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f x \<le>\<^sub>b f y
[PROOF STEP]
proof (cases "x = y")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x = y \<Longrightarrow> f x \<le>\<^sub>b f y
 2. x \<noteq> y \<Longrightarrow> f x \<le>\<^sub>b f y
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
x = y

goal (2 subgoals):
 1. x = y \<Longrightarrow> f x \<le>\<^sub>b f y
 2. x \<noteq> y \<Longrightarrow> f x \<le>\<^sub>b f y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x = y
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x = y

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

goal (1 subgoal):
 1. x \<noteq> y \<Longrightarrow> f x \<le>\<^sub>b f y
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x \<noteq> y \<Longrightarrow> f x \<le>\<^sub>b f y
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
x \<noteq> y

goal (1 subgoal):
 1. x \<noteq> y \<Longrightarrow> f x \<le>\<^sub>b f y
[PROOF STEP]
with \<open>x \<le>\<^sub>a y\<close>
[PROOF STATE]
proof (chain)
picking this:
x \<le>\<^sub>a y
x \<noteq> y
[PROOF STEP]
have "x <\<^sub>a y"
[PROOF STATE]
proof (prove)
using this:
x \<le>\<^sub>a y
x \<noteq> y

goal (1 subgoal):
 1. x <\<^sub>a y
[PROOF STEP]
by (simp add: ord\<^sub>a.neq_le_trans)
[PROOF STATE]
proof (state)
this:
x <\<^sub>a y

goal (1 subgoal):
 1. x \<noteq> y \<Longrightarrow> f x \<le>\<^sub>b f y
[PROOF STEP]
with assms strict_monoD
[PROOF STATE]
proof (chain)
picking this:
strict_mono\<^sub>a\<^sub>b f
\<lbrakk>strict_mono\<^sub>a\<^sub>b ?f; ?x <\<^sub>a ?y\<rbrakk> \<Longrightarrow> ?f ?x <\<^sub>b ?f ?y
x <\<^sub>a y
[PROOF STEP]
have "f x <\<^sub>b f y"
[PROOF STATE]
proof (prove)
using this:
strict_mono\<^sub>a\<^sub>b f
\<lbrakk>strict_mono\<^sub>a\<^sub>b ?f; ?x <\<^sub>a ?y\<rbrakk> \<Longrightarrow> ?f ?x <\<^sub>b ?f ?y
x <\<^sub>a y

goal (1 subgoal):
 1. f x <\<^sub>b f y
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
f x <\<^sub>b f y

goal (1 subgoal):
 1. x \<noteq> y \<Longrightarrow> f x \<le>\<^sub>b f y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
f x <\<^sub>b f y
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
f x <\<^sub>b f y

goal (1 subgoal):
 1. f x \<le>\<^sub>b f y
[PROOF STEP]
by (simp add: ord\<^sub>b.le_less)
[PROOF STATE]
proof (state)
this:
f x \<le>\<^sub>b f y

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
f x \<le>\<^sub>b f y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma word_and_1:
  "n AND 1 = (if bit n 0 then 1 else 0)" for n :: "_ word"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n AND 1 = (if bit n 0 then 1 else 0)
[PROOF STEP]
by (rule bit_word_eqI) (auto simp add: bit_and_iff bit_1_iff intro: gr0I)


[STATEMENT]
lemma lang_pow_simps: "(A ^^ Suc n) = (A ^^ n @@ A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A ^^ Suc n = A ^^ n @@ A
[PROOF STEP]
using lang_pow_add[of n "Suc 0" A]
[PROOF STATE]
proof (prove)
using this:
A ^^ (n + Suc 0) = A ^^ n @@ A ^^ Suc 0

goal (1 subgoal):
 1. A ^^ Suc n = A ^^ n @@ A
[PROOF STEP]
by auto