[STATEMENT]
lemma cindex_pathE_part_circlepath:
  assumes "cmod (z-z0) \<noteq>r" and "r>0" "0\<le>st" "st<tt" "tt\<le>2*pi"
  shows "cindex_pathE (part_circlepath z r st tt) z0 = (
    if \<bar>Re z - Re z0\<bar> < r then
      (let
          \<theta> = arccos ((Re z0 - Re z)/r);
          \<beta> = 2*pi - \<theta>
        in
          jumpF_pathstart (part_circlepath z r st tt) z0
          +
          (if st<\<theta> \<and> \<theta><tt then if r * sin \<theta> + Im z > Im z0 then -1 else 1 else 0)
          +
          (if st<\<beta> \<and> \<beta> < tt then if r * sin \<beta> + Im z > Im z0 then 1 else -1 else 0)
          -
          jumpF_pathfinish (part_circlepath z r st tt) z0
      )
    else
      if \<bar>Re z - Re z0\<bar> = r then
        jumpF_pathstart (part_circlepath z r st tt) z0
        - jumpF_pathfinish (part_circlepath z r st tt) z0
      else 0
    )"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
define f where "f=(\<lambda>i. r * sin i + Im z - Im z0)"
[PROOF STATE]
proof (state)
this:
f = (\<lambda>i. r * sin i + Im z - Im z0)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
define g where "g=(\<lambda>i. r * cos i + Re z - Re z0)"
[PROOF STATE]
proof (state)
this:
g = (\<lambda>i. r * cos i + Re z - Re z0)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
define h where "h=(\<lambda>t. f t / g t)"
[PROOF STATE]
proof (state)
this:
h = (\<lambda>t. f t / g t)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
have index_eq:"cindex_pathE (part_circlepath z r st tt) z0 = cindexE st tt h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = cindexE st tt h
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = cindexE st tt h
[PROOF STEP]
have "cindex_pathE (part_circlepath z r st tt) z0
      = cindexE 0 1 ((\<lambda>i. f i/g i) o (linepath st tt))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = cindexE 0 1 ((\<lambda>i. f i / g i) \<circ> linepath st tt)
[PROOF STEP]
unfolding cindex_pathE_def part_circlepath_def exp_Euler f_def g_def comp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindexE 0 1 (\<lambda>t. Im (z + complex_of_real r * (cos (complex_of_real (linepath st tt t)) + \<i> * sin (complex_of_real (linepath st tt t))) - z0) / Re (z + complex_of_real r * (cos (complex_of_real (linepath st tt t)) + \<i> * sin (complex_of_real (linepath st tt t))) - z0)) = cindexE 0 1 (\<lambda>x. (r * sin (linepath st tt x) + Im z - Im z0) / (r * cos (linepath st tt x) + Re z - Re z0))
[PROOF STEP]
by (simp add:cos_of_real sin_of_real algebra_simps)
[PROOF STATE]
proof (state)
this:
cindex_pathE (part_circlepath z r st tt) z0 = cindexE 0 1 ((\<lambda>i. f i / g i) \<circ> linepath st tt)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = cindexE st tt h
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
cindex_pathE (part_circlepath z r st tt) z0 = cindexE 0 1 ((\<lambda>i. f i / g i) \<circ> linepath st tt)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = cindexE st tt h
[PROOF STEP]
have "... = cindexE st tt (\<lambda>i. f i/g i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindexE 0 1 ((\<lambda>i. f i / g i) \<circ> linepath st tt) = cindexE st tt (\<lambda>i. f i / g i)
[PROOF STEP]
unfolding linepath_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindexE 0 1 ((\<lambda>i. f i / g i) \<circ> (\<lambda>x. (1 - x) *\<^sub>R st + x *\<^sub>R tt)) = cindexE st tt (\<lambda>i. f i / g i)
[PROOF STEP]
using cindexE_linear_comp[of "tt-st" 0 1 _ st] \<open>st<tt\<close>
[PROOF STATE]
proof (prove)
using this:
tt - st \<noteq> 0 \<Longrightarrow> cindexE 0 1 (?f \<circ> (\<lambda>x. (tt - st) * x + st)) = (if 0 < tt - st then cindexE ((tt - st) * 0 + st) ((tt - st) * 1 + st) ?f else - cindexE ((tt - st) * 1 + st) ((tt - st) * 0 + st) ?f)
st < tt

goal (1 subgoal):
 1. cindexE 0 1 ((\<lambda>i. f i / g i) \<circ> (\<lambda>x. (1 - x) *\<^sub>R st + x *\<^sub>R tt)) = cindexE st tt (\<lambda>i. f i / g i)
[PROOF STEP]
by (simp add:algebra_simps)
[PROOF STATE]
proof (state)
this:
cindexE 0 1 ((\<lambda>i. f i / g i) \<circ> linepath st tt) = cindexE st tt (\<lambda>i. f i / g i)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = cindexE st tt h
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
cindexE 0 1 ((\<lambda>i. f i / g i) \<circ> linepath st tt) = cindexE st tt (\<lambda>i. f i / g i)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = cindexE st tt h
[PROOF STEP]
have "... = cindexE st tt h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindexE st tt (\<lambda>i. f i / g i) = cindexE st tt h
[PROOF STEP]
unfolding h_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindexE st tt (\<lambda>i. f i / g i) = cindexE st tt (\<lambda>t. f t / g t)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
cindexE st tt (\<lambda>i. f i / g i) = cindexE st tt h

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = cindexE st tt h
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
cindex_pathE (part_circlepath z r st tt) z0 = cindexE st tt h
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
cindex_pathE (part_circlepath z r st tt) z0 = cindexE st tt h

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = cindexE st tt h
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
cindex_pathE (part_circlepath z r st tt) z0 = cindexE st tt h

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
cindex_pathE (part_circlepath z r st tt) z0 = cindexE st tt h

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
have jstart_eq:"jumpF_pathstart (part_circlepath z r st tt) z0 = jumpF h (at_right st)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF_pathstart (part_circlepath z r st tt) z0 = jumpF h (at_right st)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. jumpF_pathstart (part_circlepath z r st tt) z0 = jumpF h (at_right st)
[PROOF STEP]
have "jumpF_pathstart (part_circlepath z r st tt) z0
            = jumpF ((\<lambda>i. f i/g i) o (linepath st tt)) (at_right 0) "
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF_pathstart (part_circlepath z r st tt) z0 = jumpF ((\<lambda>i. f i / g i) \<circ> linepath st tt) (at_right 0)
[PROOF STEP]
unfolding jumpF_pathstart_def part_circlepath_def exp_Euler f_def g_def comp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF (\<lambda>t. Im (z + complex_of_real r * (cos (complex_of_real (linepath st tt t)) + \<i> * sin (complex_of_real (linepath st tt t))) - z0) / Re (z + complex_of_real r * (cos (complex_of_real (linepath st tt t)) + \<i> * sin (complex_of_real (linepath st tt t))) - z0)) (at_right 0) = jumpF (\<lambda>x. (r * sin (linepath st tt x) + Im z - Im z0) / (r * cos (linepath st tt x) + Re z - Re z0)) (at_right 0)
[PROOF STEP]
by (simp add:cos_of_real sin_of_real algebra_simps)
[PROOF STATE]
proof (state)
this:
jumpF_pathstart (part_circlepath z r st tt) z0 = jumpF ((\<lambda>i. f i / g i) \<circ> linepath st tt) (at_right 0)

goal (1 subgoal):
 1. jumpF_pathstart (part_circlepath z r st tt) z0 = jumpF h (at_right st)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
jumpF_pathstart (part_circlepath z r st tt) z0 = jumpF ((\<lambda>i. f i / g i) \<circ> linepath st tt) (at_right 0)

goal (1 subgoal):
 1. jumpF_pathstart (part_circlepath z r st tt) z0 = jumpF h (at_right st)
[PROOF STEP]
have "... = jumpF (\<lambda>i. f i/g i) (at_right st)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF ((\<lambda>i. f i / g i) \<circ> linepath st tt) (at_right 0) = jumpF (\<lambda>i. f i / g i) (at_right st)
[PROOF STEP]
unfolding linepath_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF ((\<lambda>i. f i / g i) \<circ> (\<lambda>x. (1 - x) *\<^sub>R st + x *\<^sub>R tt)) (at_right 0) = jumpF (\<lambda>i. f i / g i) (at_right st)
[PROOF STEP]
using jumpF_linear_comp(2)[of "tt-st" _ st 0] \<open>st<tt\<close>
[PROOF STATE]
proof (prove)
using this:
tt - st \<noteq> 0 \<Longrightarrow> jumpF (?f \<circ> (\<lambda>x. (tt - st) * x + st)) (at_right 0) = (if 0 < tt - st then jumpF ?f (at_right ((tt - st) * 0 + st)) else jumpF ?f (at_left ((tt - st) * 0 + st)))
st < tt

goal (1 subgoal):
 1. jumpF ((\<lambda>i. f i / g i) \<circ> (\<lambda>x. (1 - x) *\<^sub>R st + x *\<^sub>R tt)) (at_right 0) = jumpF (\<lambda>i. f i / g i) (at_right st)
[PROOF STEP]
by (simp add:algebra_simps)
[PROOF STATE]
proof (state)
this:
jumpF ((\<lambda>i. f i / g i) \<circ> linepath st tt) (at_right 0) = jumpF (\<lambda>i. f i / g i) (at_right st)

goal (1 subgoal):
 1. jumpF_pathstart (part_circlepath z r st tt) z0 = jumpF h (at_right st)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
jumpF ((\<lambda>i. f i / g i) \<circ> linepath st tt) (at_right 0) = jumpF (\<lambda>i. f i / g i) (at_right st)

goal (1 subgoal):
 1. jumpF_pathstart (part_circlepath z r st tt) z0 = jumpF h (at_right st)
[PROOF STEP]
have "... = jumpF h (at_right st)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF (\<lambda>i. f i / g i) (at_right st) = jumpF h (at_right st)
[PROOF STEP]
unfolding h_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF (\<lambda>i. f i / g i) (at_right st) = jumpF (\<lambda>t. f t / g t) (at_right st)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
jumpF (\<lambda>i. f i / g i) (at_right st) = jumpF h (at_right st)

goal (1 subgoal):
 1. jumpF_pathstart (part_circlepath z r st tt) z0 = jumpF h (at_right st)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
jumpF_pathstart (part_circlepath z r st tt) z0 = jumpF h (at_right st)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
jumpF_pathstart (part_circlepath z r st tt) z0 = jumpF h (at_right st)

goal (1 subgoal):
 1. jumpF_pathstart (part_circlepath z r st tt) z0 = jumpF h (at_right st)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
jumpF_pathstart (part_circlepath z r st tt) z0 = jumpF h (at_right st)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
jumpF_pathstart (part_circlepath z r st tt) z0 = jumpF h (at_right st)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
have jfinish_eq:"jumpF_pathfinish (part_circlepath z r st tt) z0 = jumpF h (at_left tt)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF_pathfinish (part_circlepath z r st tt) z0 = jumpF h (at_left tt)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. jumpF_pathfinish (part_circlepath z r st tt) z0 = jumpF h (at_left tt)
[PROOF STEP]
have "jumpF_pathfinish (part_circlepath z r st tt) z0
            = jumpF ((\<lambda>i. f i/g i) o (linepath st tt)) (at_left 1) "
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF_pathfinish (part_circlepath z r st tt) z0 = jumpF ((\<lambda>i. f i / g i) \<circ> linepath st tt) (at_left 1)
[PROOF STEP]
unfolding jumpF_pathfinish_def part_circlepath_def exp_Euler f_def g_def comp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF (\<lambda>t. Im (z + complex_of_real r * (cos (complex_of_real (linepath st tt t)) + \<i> * sin (complex_of_real (linepath st tt t))) - z0) / Re (z + complex_of_real r * (cos (complex_of_real (linepath st tt t)) + \<i> * sin (complex_of_real (linepath st tt t))) - z0)) (at_left 1) = jumpF (\<lambda>x. (r * sin (linepath st tt x) + Im z - Im z0) / (r * cos (linepath st tt x) + Re z - Re z0)) (at_left 1)
[PROOF STEP]
by (simp add:cos_of_real sin_of_real algebra_simps)
[PROOF STATE]
proof (state)
this:
jumpF_pathfinish (part_circlepath z r st tt) z0 = jumpF ((\<lambda>i. f i / g i) \<circ> linepath st tt) (at_left 1)

goal (1 subgoal):
 1. jumpF_pathfinish (part_circlepath z r st tt) z0 = jumpF h (at_left tt)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
jumpF_pathfinish (part_circlepath z r st tt) z0 = jumpF ((\<lambda>i. f i / g i) \<circ> linepath st tt) (at_left 1)

goal (1 subgoal):
 1. jumpF_pathfinish (part_circlepath z r st tt) z0 = jumpF h (at_left tt)
[PROOF STEP]
have "... = jumpF (\<lambda>i. f i/g i) (at_left tt)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF ((\<lambda>i. f i / g i) \<circ> linepath st tt) (at_left 1) = jumpF (\<lambda>i. f i / g i) (at_left tt)
[PROOF STEP]
unfolding linepath_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF ((\<lambda>i. f i / g i) \<circ> (\<lambda>x. (1 - x) *\<^sub>R st + x *\<^sub>R tt)) (at_left 1) = jumpF (\<lambda>i. f i / g i) (at_left tt)
[PROOF STEP]
using jumpF_linear_comp(1)[of "tt-st" _ st 1] \<open>st<tt\<close>
[PROOF STATE]
proof (prove)
using this:
tt - st \<noteq> 0 \<Longrightarrow> jumpF (?f \<circ> (\<lambda>x. (tt - st) * x + st)) (at_left 1) = (if 0 < tt - st then jumpF ?f (at_left ((tt - st) * 1 + st)) else jumpF ?f (at_right ((tt - st) * 1 + st)))
st < tt

goal (1 subgoal):
 1. jumpF ((\<lambda>i. f i / g i) \<circ> (\<lambda>x. (1 - x) *\<^sub>R st + x *\<^sub>R tt)) (at_left 1) = jumpF (\<lambda>i. f i / g i) (at_left tt)
[PROOF STEP]
by (simp add:algebra_simps)
[PROOF STATE]
proof (state)
this:
jumpF ((\<lambda>i. f i / g i) \<circ> linepath st tt) (at_left 1) = jumpF (\<lambda>i. f i / g i) (at_left tt)

goal (1 subgoal):
 1. jumpF_pathfinish (part_circlepath z r st tt) z0 = jumpF h (at_left tt)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
jumpF ((\<lambda>i. f i / g i) \<circ> linepath st tt) (at_left 1) = jumpF (\<lambda>i. f i / g i) (at_left tt)

goal (1 subgoal):
 1. jumpF_pathfinish (part_circlepath z r st tt) z0 = jumpF h (at_left tt)
[PROOF STEP]
have "... = jumpF h (at_left tt)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF (\<lambda>i. f i / g i) (at_left tt) = jumpF h (at_left tt)
[PROOF STEP]
unfolding h_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF (\<lambda>i. f i / g i) (at_left tt) = jumpF (\<lambda>t. f t / g t) (at_left tt)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
jumpF (\<lambda>i. f i / g i) (at_left tt) = jumpF h (at_left tt)

goal (1 subgoal):
 1. jumpF_pathfinish (part_circlepath z r st tt) z0 = jumpF h (at_left tt)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
jumpF_pathfinish (part_circlepath z r st tt) z0 = jumpF h (at_left tt)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
jumpF_pathfinish (part_circlepath z r st tt) z0 = jumpF h (at_left tt)

goal (1 subgoal):
 1. jumpF_pathfinish (part_circlepath z r st tt) z0 = jumpF h (at_left tt)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
jumpF_pathfinish (part_circlepath z r st tt) z0 = jumpF h (at_left tt)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
jumpF_pathfinish (part_circlepath z r st tt) z0 = jumpF h (at_left tt)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
have finite_jFs:"finite_jumpFs h st tt"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite_jumpFs h st tt
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite_jumpFs h st tt
[PROOF STEP]
note finite_ReZ_segments_imp_jumpFs[OF finite_ReZ_segments_part_circlepath
          ,of  z r st tt z0,simplified]
[PROOF STATE]
proof (state)
this:
finite_jumpFs (\<lambda>t. (Im (part_circlepath z r st tt t) - Im z0) / (Re (part_circlepath z r st tt t) - Re z0)) 0 1

goal (1 subgoal):
 1. finite_jumpFs h st tt
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite_jumpFs (\<lambda>t. (Im (part_circlepath z r st tt t) - Im z0) / (Re (part_circlepath z r st tt t) - Re z0)) 0 1
[PROOF STEP]
have "finite_jumpFs ((\<lambda>i. f i/g i) o (linepath st tt)) 0 1"
[PROOF STATE]
proof (prove)
using this:
finite_jumpFs (\<lambda>t. (Im (part_circlepath z r st tt t) - Im z0) / (Re (part_circlepath z r st tt t) - Re z0)) 0 1

goal (1 subgoal):
 1. finite_jumpFs ((\<lambda>i. f i / g i) \<circ> linepath st tt) 0 1
[PROOF STEP]
unfolding h_def f_def g_def part_circlepath_def exp_Euler comp_def
[PROOF STATE]
proof (prove)
using this:
finite_jumpFs (\<lambda>t. (Im (z + complex_of_real r * (cos (complex_of_real (linepath st tt t)) + \<i> * sin (complex_of_real (linepath st tt t)))) - Im z0) / (Re (z + complex_of_real r * (cos (complex_of_real (linepath st tt t)) + \<i> * sin (complex_of_real (linepath st tt t)))) - Re z0)) 0 1

goal (1 subgoal):
 1. finite_jumpFs (\<lambda>x. (r * sin (linepath st tt x) + Im z - Im z0) / (r * cos (linepath st tt x) + Re z - Re z0)) 0 1
[PROOF STEP]
by (simp add:cos_of_real sin_of_real algebra_simps)
[PROOF STATE]
proof (state)
this:
finite_jumpFs ((\<lambda>i. f i / g i) \<circ> linepath st tt) 0 1

goal (1 subgoal):
 1. finite_jumpFs h st tt
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite_jumpFs ((\<lambda>i. f i / g i) \<circ> linepath st tt) 0 1
[PROOF STEP]
have "finite_jumpFs (\<lambda>i. f i/g i) st tt"
[PROOF STATE]
proof (prove)
using this:
finite_jumpFs ((\<lambda>i. f i / g i) \<circ> linepath st tt) 0 1

goal (1 subgoal):
 1. finite_jumpFs (\<lambda>i. f i / g i) st tt
[PROOF STEP]
unfolding linepath_def
[PROOF STATE]
proof (prove)
using this:
finite_jumpFs ((\<lambda>i. f i / g i) \<circ> (\<lambda>x. (1 - x) *\<^sub>R st + x *\<^sub>R tt)) 0 1

goal (1 subgoal):
 1. finite_jumpFs (\<lambda>i. f i / g i) st tt
[PROOF STEP]
using finite_jumpFs_linear_pos[of "tt-st" _ st 0 1] \<open>st<tt\<close>
[PROOF STATE]
proof (prove)
using this:
finite_jumpFs ((\<lambda>i. f i / g i) \<circ> (\<lambda>x. (1 - x) *\<^sub>R st + x *\<^sub>R tt)) 0 1
0 < tt - st \<Longrightarrow> finite_jumpFs (?f \<circ> (\<lambda>x. (tt - st) * x + st)) 0 1 = finite_jumpFs ?f ((tt - st) * 0 + st) ((tt - st) * 1 + st)
st < tt

goal (1 subgoal):
 1. finite_jumpFs (\<lambda>i. f i / g i) st tt
[PROOF STEP]
by (simp add:algebra_simps)
[PROOF STATE]
proof (state)
this:
finite_jumpFs (\<lambda>i. f i / g i) st tt

goal (1 subgoal):
 1. finite_jumpFs h st tt
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite_jumpFs (\<lambda>i. f i / g i) st tt
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
finite_jumpFs (\<lambda>i. f i / g i) st tt

goal (1 subgoal):
 1. finite_jumpFs h st tt
[PROOF STEP]
unfolding h_def
[PROOF STATE]
proof (prove)
using this:
finite_jumpFs (\<lambda>i. f i / g i) st tt

goal (1 subgoal):
 1. finite_jumpFs (\<lambda>t. f t / g t) st tt
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite_jumpFs h st tt

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
finite_jumpFs h st tt

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
have g_imp_f:"g i = 0 \<Longrightarrow> f i\<noteq>0" for i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g i = 0 \<Longrightarrow> f i \<noteq> 0
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>g i = 0; \<not> f i \<noteq> 0\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
assume "g i = 0" "\<not> f i \<noteq> 0 "
[PROOF STATE]
proof (state)
this:
g i = 0
\<not> f i \<noteq> 0

goal (1 subgoal):
 1. \<lbrakk>g i = 0; \<not> f i \<noteq> 0\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
g i = 0
\<not> f i \<noteq> 0
[PROOF STEP]
have "r * sin i = Im (z0 - z)" "r * cos i = Re (z0 - z)"
[PROOF STATE]
proof (prove)
using this:
g i = 0
\<not> f i \<noteq> 0

goal (1 subgoal):
 1. r * sin i = Im (z0 - z) &&& r * cos i = Re (z0 - z)
[PROOF STEP]
unfolding f_def g_def
[PROOF STATE]
proof (prove)
using this:
r * cos i + Re z - Re z0 = 0
\<not> r * sin i + Im z - Im z0 \<noteq> 0

goal (1 subgoal):
 1. r * sin i = Im (z0 - z) &&& r * cos i = Re (z0 - z)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
r * sin i = Im (z0 - z)
r * cos i = Re (z0 - z)

goal (1 subgoal):
 1. \<lbrakk>g i = 0; \<not> f i \<noteq> 0\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
r * sin i = Im (z0 - z)
r * cos i = Re (z0 - z)
[PROOF STEP]
have "(r * sin i) ^2 + (r * cos i)^2 = Im (z0 - z) ^ 2 +  Re (z0 - z) ^2"
[PROOF STATE]
proof (prove)
using this:
r * sin i = Im (z0 - z)
r * cos i = Re (z0 - z)

goal (1 subgoal):
 1. (r * sin i)\<^sup>2 + (r * cos i)\<^sup>2 = (Im (z0 - z))\<^sup>2 + (Re (z0 - z))\<^sup>2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(r * sin i)\<^sup>2 + (r * cos i)\<^sup>2 = (Im (z0 - z))\<^sup>2 + (Re (z0 - z))\<^sup>2

goal (1 subgoal):
 1. \<lbrakk>g i = 0; \<not> f i \<noteq> 0\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(r * sin i)\<^sup>2 + (r * cos i)\<^sup>2 = (Im (z0 - z))\<^sup>2 + (Re (z0 - z))\<^sup>2
[PROOF STEP]
have "r^2 * (sin i ^2  + cos i^2) = Im (z0 - z) ^ 2 +  Re (z0 - z) ^2"
[PROOF STATE]
proof (prove)
using this:
(r * sin i)\<^sup>2 + (r * cos i)\<^sup>2 = (Im (z0 - z))\<^sup>2 + (Re (z0 - z))\<^sup>2

goal (1 subgoal):
 1. r\<^sup>2 * ((sin i)\<^sup>2 + (cos i)\<^sup>2) = (Im (z0 - z))\<^sup>2 + (Re (z0 - z))\<^sup>2
[PROOF STEP]
by (auto simp only:algebra_simps power_mult_distrib)
[PROOF STATE]
proof (state)
this:
r\<^sup>2 * ((sin i)\<^sup>2 + (cos i)\<^sup>2) = (Im (z0 - z))\<^sup>2 + (Re (z0 - z))\<^sup>2

goal (1 subgoal):
 1. \<lbrakk>g i = 0; \<not> f i \<noteq> 0\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
r\<^sup>2 * ((sin i)\<^sup>2 + (cos i)\<^sup>2) = (Im (z0 - z))\<^sup>2 + (Re (z0 - z))\<^sup>2
[PROOF STEP]
have "r^2 = cmod (z0-z) ^ 2"
[PROOF STATE]
proof (prove)
using this:
r\<^sup>2 * ((sin i)\<^sup>2 + (cos i)\<^sup>2) = (Im (z0 - z))\<^sup>2 + (Re (z0 - z))\<^sup>2

goal (1 subgoal):
 1. r\<^sup>2 = (cmod (z0 - z))\<^sup>2
[PROOF STEP]
unfolding cmod_def
[PROOF STATE]
proof (prove)
using this:
r\<^sup>2 * ((sin i)\<^sup>2 + (cos i)\<^sup>2) = (Im (z0 - z))\<^sup>2 + (Re (z0 - z))\<^sup>2

goal (1 subgoal):
 1. r\<^sup>2 = (sqrt ((Re (z0 - z))\<^sup>2 + (Im (z0 - z))\<^sup>2))\<^sup>2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
r\<^sup>2 = (cmod (z0 - z))\<^sup>2

goal (1 subgoal):
 1. \<lbrakk>g i = 0; \<not> f i \<noteq> 0\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
r\<^sup>2 = (cmod (z0 - z))\<^sup>2
[PROOF STEP]
have "r = cmod (z0-z)"
[PROOF STATE]
proof (prove)
using this:
r\<^sup>2 = (cmod (z0 - z))\<^sup>2

goal (1 subgoal):
 1. r = cmod (z0 - z)
[PROOF STEP]
using \<open>r>0\<close> power2_eq_imp_eq
[PROOF STATE]
proof (prove)
using this:
r\<^sup>2 = (cmod (z0 - z))\<^sup>2
0 < r
\<lbrakk>?x\<^sup>2 = ?y\<^sup>2; (0::?'a) \<le> ?x; (0::?'a) \<le> ?y\<rbrakk> \<Longrightarrow> ?x = ?y

goal (1 subgoal):
 1. r = cmod (z0 - z)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
r = cmod (z0 - z)

goal (1 subgoal):
 1. \<lbrakk>g i = 0; \<not> f i \<noteq> 0\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
r = cmod (z0 - z)
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
r = cmod (z0 - z)

goal (1 subgoal):
 1. False
[PROOF STEP]
using \<open>cmod (z-z0) \<noteq>r\<close>
[PROOF STATE]
proof (prove)
using this:
r = cmod (z0 - z)
cmod (z - z0) \<noteq> r

goal (1 subgoal):
 1. False
[PROOF STEP]
using norm_minus_commute
[PROOF STATE]
proof (prove)
using this:
r = cmod (z0 - z)
cmod (z - z0) \<noteq> r
norm (?a - ?b) = norm (?b - ?a)

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
g ?i = 0 \<Longrightarrow> f ?i \<noteq> 0

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
have ?thesis when "\<bar>Re z - Re z0\<bar> > r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
have "jumpF h (at_right x) = 0" "jumpF h (at_left x) = 0" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF h (at_right x) = 0 &&& jumpF h (at_left x) = 0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. jumpF h (at_right x) = 0
 2. jumpF h (at_left x) = 0
[PROOF STEP]
have "g x \<noteq>0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g x \<noteq> 0
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> g x \<noteq> 0 \<Longrightarrow> False
[PROOF STEP]
assume "\<not> g x \<noteq> 0"
[PROOF STATE]
proof (state)
this:
\<not> g x \<noteq> 0

goal (1 subgoal):
 1. \<not> g x \<noteq> 0 \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> g x \<noteq> 0
[PROOF STEP]
have "cos x = (Re z0 - Re z) / r"
[PROOF STATE]
proof (prove)
using this:
\<not> g x \<noteq> 0

goal (1 subgoal):
 1. cos x = (Re z0 - Re z) / r
[PROOF STEP]
unfolding g_def
[PROOF STATE]
proof (prove)
using this:
\<not> r * cos x + Re z - Re z0 \<noteq> 0

goal (1 subgoal):
 1. cos x = (Re z0 - Re z) / r
[PROOF STEP]
using \<open>r>0\<close>
[PROOF STATE]
proof (prove)
using this:
\<not> r * cos x + Re z - Re z0 \<noteq> 0
0 < r

goal (1 subgoal):
 1. cos x = (Re z0 - Re z) / r
[PROOF STEP]
by (auto simp add:field_simps)
[PROOF STATE]
proof (state)
this:
cos x = (Re z0 - Re z) / r

goal (1 subgoal):
 1. \<not> g x \<noteq> 0 \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
cos x = (Re z0 - Re z) / r
[PROOF STEP]
have "\<bar>(Re z0 - Re z)/r\<bar> \<le> 1"
[PROOF STATE]
proof (prove)
using this:
cos x = (Re z0 - Re z) / r

goal (1 subgoal):
 1. \<bar>(Re z0 - Re z) / r\<bar> \<le> 1
[PROOF STEP]
by (metis abs_cos_le_one)
[PROOF STATE]
proof (state)
this:
\<bar>(Re z0 - Re z) / r\<bar> \<le> 1

goal (1 subgoal):
 1. \<not> g x \<noteq> 0 \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<bar>(Re z0 - Re z) / r\<bar> \<le> 1
[PROOF STEP]
have "\<bar>Re z0 - Re z\<bar> \<le> r"
[PROOF STATE]
proof (prove)
using this:
\<bar>(Re z0 - Re z) / r\<bar> \<le> 1

goal (1 subgoal):
 1. \<bar>Re z0 - Re z\<bar> \<le> r
[PROOF STEP]
using \<open>r>0\<close>
[PROOF STATE]
proof (prove)
using this:
\<bar>(Re z0 - Re z) / r\<bar> \<le> 1
0 < r

goal (1 subgoal):
 1. \<bar>Re z0 - Re z\<bar> \<le> r
[PROOF STEP]
by (auto simp add:field_simps)
[PROOF STATE]
proof (state)
this:
\<bar>Re z0 - Re z\<bar> \<le> r

goal (1 subgoal):
 1. \<not> g x \<noteq> 0 \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<bar>Re z0 - Re z\<bar> \<le> r
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
\<bar>Re z0 - Re z\<bar> \<le> r

goal (1 subgoal):
 1. False
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
\<bar>Re z0 - Re z\<bar> \<le> r
r < \<bar>Re z - Re z0\<bar>

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
g x \<noteq> 0

goal (2 subgoals):
 1. jumpF h (at_right x) = 0
 2. jumpF h (at_left x) = 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
g x \<noteq> 0
[PROOF STEP]
have "isCont h x"
[PROOF STATE]
proof (prove)
using this:
g x \<noteq> 0

goal (1 subgoal):
 1. isCont h x
[PROOF STEP]
unfolding h_def f_def g_def
[PROOF STATE]
proof (prove)
using this:
r * cos x + Re z - Re z0 \<noteq> 0

goal (1 subgoal):
 1. isCont (\<lambda>t. (r * sin t + Im z - Im z0) / (r * cos t + Re z - Re z0)) x
[PROOF STEP]
by (auto intro:continuous_intros)
[PROOF STATE]
proof (state)
this:
isCont h x

goal (2 subgoals):
 1. jumpF h (at_right x) = 0
 2. jumpF h (at_left x) = 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
isCont h x
[PROOF STEP]
show "jumpF h (at_right x) = 0" "jumpF h (at_left x) = 0"
[PROOF STATE]
proof (prove)
using this:
isCont h x

goal (1 subgoal):
 1. jumpF h (at_right x) = 0 &&& jumpF h (at_left x) = 0
[PROOF STEP]
using jumpF_not_infinity
[PROOF STATE]
proof (prove)
using this:
isCont h x
\<lbrakk>continuous ?F ?g; ?F \<noteq> bot\<rbrakk> \<Longrightarrow> jumpF ?g ?F = 0

goal (1 subgoal):
 1. jumpF h (at_right x) = 0 &&& jumpF h (at_left x) = 0
[PROOF STEP]
unfolding continuous_at_split
[PROOF STATE]
proof (prove)
using this:
continuous (at_left x) h \<and> continuous (at_right x) h
\<lbrakk>continuous ?F ?g; ?F \<noteq> bot\<rbrakk> \<Longrightarrow> jumpF ?g ?F = 0

goal (1 subgoal):
 1. jumpF h (at_right x) = 0 &&& jumpF h (at_left x) = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
jumpF h (at_right x) = 0
jumpF h (at_left x) = 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
jumpF h (at_right ?x) = 0
jumpF h (at_left ?x) = 0

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
jumpF h (at_right ?x) = 0
jumpF h (at_left ?x) = 0
[PROOF STEP]
have "cindexE st tt h = 0"
[PROOF STATE]
proof (prove)
using this:
jumpF h (at_right ?x) = 0
jumpF h (at_left ?x) = 0

goal (1 subgoal):
 1. cindexE st tt h = 0
[PROOF STEP]
unfolding cindexE_def
[PROOF STATE]
proof (prove)
using this:
jumpF h (at_right ?x) = 0
jumpF h (at_left ?x) = 0

goal (1 subgoal):
 1. (\<Sum>x | jumpF h (at_right x) \<noteq> 0 \<and> st \<le> x \<and> x < tt. jumpF h (at_right x)) - (\<Sum>x | jumpF h (at_left x) \<noteq> 0 \<and> st < x \<and> x \<le> tt. jumpF h (at_left x)) = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
cindexE st tt h = 0

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
cindexE st tt h = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
cindexE st tt h = 0

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
using index_eq that
[PROOF STATE]
proof (prove)
using this:
cindexE st tt h = 0
cindex_pathE (part_circlepath z r st tt) z0 = cindexE st tt h
r < \<bar>Re z - Re z0\<bar>

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
r < \<bar>Re z - Re z0\<bar> \<Longrightarrow> cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
r < \<bar>Re z - Re z0\<bar> \<Longrightarrow> cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
have ?thesis when "\<bar>Re z - Re z0\<bar> = r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
define R where "R=(\<lambda>S.{x. jumpF h (at_right x) \<noteq> 0 \<and> x\<in>S})"
[PROOF STATE]
proof (state)
this:
R = (\<lambda>S. {x. jumpF h (at_right x) \<noteq> 0 \<and> x \<in> S})

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
define L where "L=(\<lambda>S.{x. jumpF h (at_left x) \<noteq> 0 \<and> x\<in>S})"
[PROOF STATE]
proof (state)
this:
L = (\<lambda>S. {x. jumpF h (at_left x) \<noteq> 0 \<and> x \<in> S})

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
define right where
      "right = (\<lambda>S. (\<Sum>x\<in>R S. jumpF h (at_right x)))"
[PROOF STATE]
proof (state)
this:
right = (\<lambda>S. \<Sum>x\<in>R S. jumpF h (at_right x))

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
define left where
      "left = (\<lambda>S. (\<Sum>x\<in>L S. jumpF h (at_left x)))"
[PROOF STATE]
proof (state)
this:
left = (\<lambda>S. \<Sum>x\<in>L S. jumpF h (at_left x))

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
have "cindex_pathE (part_circlepath z r st tt) z0 = cindexE st tt h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = cindexE st tt h
[PROOF STEP]
using index_eq
[PROOF STATE]
proof (prove)
using this:
cindex_pathE (part_circlepath z r st tt) z0 = cindexE st tt h

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = cindexE st tt h
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
cindex_pathE (part_circlepath z r st tt) z0 = cindexE st tt h

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
cindex_pathE (part_circlepath z r st tt) z0 = cindexE st tt h

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
have "... = right {st..<tt} - left {st<..tt}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindexE st tt h = right {st..<tt} - left {st<..tt}
[PROOF STEP]
unfolding cindexE_def right_def left_def R_def L_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>x | jumpF h (at_right x) \<noteq> 0 \<and> st \<le> x \<and> x < tt. jumpF h (at_right x)) - (\<Sum>x | jumpF h (at_left x) \<noteq> 0 \<and> st < x \<and> x \<le> tt. jumpF h (at_left x)) = (\<Sum>x | jumpF h (at_right x) \<noteq> 0 \<and> x \<in> {st..<tt}. jumpF h (at_right x)) - (\<Sum>x | jumpF h (at_left x) \<noteq> 0 \<and> x \<in> {st<..tt}. jumpF h (at_left x))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
cindexE st tt h = right {st..<tt} - left {st<..tt}

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
cindexE st tt h = right {st..<tt} - left {st<..tt}

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
have "... = jumpF h (at_right st) +  right {st<..<tt} - left {st<..<tt} - jumpF h (at_left tt)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. right {st..<tt} - left {st<..tt} = jumpF h (at_right st) + right {st<..<tt} - left {st<..<tt} - jumpF h (at_left tt)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. right {st..<tt} - left {st<..tt} = jumpF h (at_right st) + right {st<..<tt} - left {st<..<tt} - jumpF h (at_left tt)
[PROOF STEP]
have "right {st..<tt} = jumpF h (at_right st) +  right {st<..<tt}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}
[PROOF STEP]
proof (cases "jumpF h (at_right st) =0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. jumpF h (at_right st) = 0 \<Longrightarrow> right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}
 2. jumpF h (at_right st) \<noteq> 0 \<Longrightarrow> right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
jumpF h (at_right st) = 0

goal (2 subgoals):
 1. jumpF h (at_right st) = 0 \<Longrightarrow> right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}
 2. jumpF h (at_right st) \<noteq> 0 \<Longrightarrow> right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
jumpF h (at_right st) = 0
[PROOF STEP]
have "R {st..<tt} = R {st<..<tt}"
[PROOF STATE]
proof (prove)
using this:
jumpF h (at_right st) = 0

goal (1 subgoal):
 1. R {st..<tt} = R {st<..<tt}
[PROOF STEP]
unfolding R_def
[PROOF STATE]
proof (prove)
using this:
jumpF h (at_right st) = 0

goal (1 subgoal):
 1. {x. jumpF h (at_right x) \<noteq> 0 \<and> x \<in> {st..<tt}} = {x. jumpF h (at_right x) \<noteq> 0 \<and> x \<in> {st<..<tt}}
[PROOF STEP]
using less_eq_real_def
[PROOF STATE]
proof (prove)
using this:
jumpF h (at_right st) = 0
(?x \<le> ?y) = (?x < ?y \<or> ?x = ?y)

goal (1 subgoal):
 1. {x. jumpF h (at_right x) \<noteq> 0 \<and> x \<in> {st..<tt}} = {x. jumpF h (at_right x) \<noteq> 0 \<and> x \<in> {st<..<tt}}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
R {st..<tt} = R {st<..<tt}

goal (2 subgoals):
 1. jumpF h (at_right st) = 0 \<Longrightarrow> right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}
 2. jumpF h (at_right st) \<noteq> 0 \<Longrightarrow> right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
R {st..<tt} = R {st<..<tt}
[PROOF STEP]
have "right {st..<tt} = right {st<..<tt}"
[PROOF STATE]
proof (prove)
using this:
R {st..<tt} = R {st<..<tt}

goal (1 subgoal):
 1. right {st..<tt} = right {st<..<tt}
[PROOF STEP]
unfolding right_def
[PROOF STATE]
proof (prove)
using this:
R {st..<tt} = R {st<..<tt}

goal (1 subgoal):
 1. (\<Sum>x\<in>R {st..<tt}. jumpF h (at_right x)) = (\<Sum>x\<in>R {st<..<tt}. jumpF h (at_right x))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
right {st..<tt} = right {st<..<tt}

goal (2 subgoals):
 1. jumpF h (at_right st) = 0 \<Longrightarrow> right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}
 2. jumpF h (at_right st) \<noteq> 0 \<Longrightarrow> right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
right {st..<tt} = right {st<..<tt}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
right {st..<tt} = right {st<..<tt}

goal (1 subgoal):
 1. right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}
[PROOF STEP]
using True
[PROOF STATE]
proof (prove)
using this:
right {st..<tt} = right {st<..<tt}
jumpF h (at_right st) = 0

goal (1 subgoal):
 1. right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}

goal (1 subgoal):
 1. jumpF h (at_right st) \<noteq> 0 \<Longrightarrow> right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. jumpF h (at_right st) \<noteq> 0 \<Longrightarrow> right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
jumpF h (at_right st) \<noteq> 0

goal (1 subgoal):
 1. jumpF h (at_right st) \<noteq> 0 \<Longrightarrow> right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}
[PROOF STEP]
have "finite (R {st..<tt})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (R {st..<tt})
[PROOF STEP]
using finite_jFs
[PROOF STATE]
proof (prove)
using this:
finite_jumpFs h st tt

goal (1 subgoal):
 1. finite (R {st..<tt})
[PROOF STEP]
unfolding R_def finite_jumpFs_def
[PROOF STATE]
proof (prove)
using this:
finite {x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st \<le> x \<and> x \<le> tt}

goal (1 subgoal):
 1. finite {x. jumpF h (at_right x) \<noteq> 0 \<and> x \<in> {st..<tt}}
[PROOF STEP]
by (auto elim:rev_finite_subset)
[PROOF STATE]
proof (state)
this:
finite (R {st..<tt})

goal (1 subgoal):
 1. jumpF h (at_right st) \<noteq> 0 \<Longrightarrow> right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
finite (R {st..<tt})

goal (1 subgoal):
 1. jumpF h (at_right st) \<noteq> 0 \<Longrightarrow> right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}
[PROOF STEP]
have "st \<in> R {st..<tt}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. st \<in> R {st..<tt}
[PROOF STEP]
using False \<open>st<tt\<close>
[PROOF STATE]
proof (prove)
using this:
jumpF h (at_right st) \<noteq> 0
st < tt

goal (1 subgoal):
 1. st \<in> R {st..<tt}
[PROOF STEP]
unfolding R_def
[PROOF STATE]
proof (prove)
using this:
jumpF h (at_right st) \<noteq> 0
st < tt

goal (1 subgoal):
 1. st \<in> {x. jumpF h (at_right x) \<noteq> 0 \<and> x \<in> {st..<tt}}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
st \<in> R {st..<tt}

goal (1 subgoal):
 1. jumpF h (at_right st) \<noteq> 0 \<Longrightarrow> right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
st \<in> R {st..<tt}

goal (1 subgoal):
 1. jumpF h (at_right st) \<noteq> 0 \<Longrightarrow> right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}
[PROOF STEP]
have "R {st..<tt} - {st} = R {st<..<tt}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. R {st..<tt} - {st} = R {st<..<tt}
[PROOF STEP]
unfolding R_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x. jumpF h (at_right x) \<noteq> 0 \<and> x \<in> {st..<tt}} - {st} = {x. jumpF h (at_right x) \<noteq> 0 \<and> x \<in> {st<..<tt}}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
R {st..<tt} - {st} = R {st<..<tt}

goal (1 subgoal):
 1. jumpF h (at_right st) \<noteq> 0 \<Longrightarrow> right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
finite (R {st..<tt})
st \<in> R {st..<tt}
R {st..<tt} - {st} = R {st<..<tt}
[PROOF STEP]
show "right {st..<tt}= jumpF h (at_right st)
            + right {st<..<tt}"
[PROOF STATE]
proof (prove)
using this:
finite (R {st..<tt})
st \<in> R {st..<tt}
R {st..<tt} - {st} = R {st<..<tt}

goal (1 subgoal):
 1. right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}
[PROOF STEP]
using sum.remove[of "R {st..<tt}" st "\<lambda>x. jumpF h (at_right x)"]
[PROOF STATE]
proof (prove)
using this:
finite (R {st..<tt})
st \<in> R {st..<tt}
R {st..<tt} - {st} = R {st<..<tt}
\<lbrakk>finite (R {st..<tt}); st \<in> R {st..<tt}\<rbrakk> \<Longrightarrow> (\<Sum>x\<in>R {st..<tt}. jumpF h (at_right x)) = jumpF h (at_right st) + (\<Sum>x\<in>R {st..<tt} - {st}. jumpF h (at_right x))

goal (1 subgoal):
 1. right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}
[PROOF STEP]
unfolding right_def
[PROOF STATE]
proof (prove)
using this:
finite (R {st..<tt})
st \<in> R {st..<tt}
R {st..<tt} - {st} = R {st<..<tt}
\<lbrakk>finite (R {st..<tt}); st \<in> R {st..<tt}\<rbrakk> \<Longrightarrow> (\<Sum>x\<in>R {st..<tt}. jumpF h (at_right x)) = jumpF h (at_right st) + (\<Sum>x\<in>R {st..<tt} - {st}. jumpF h (at_right x))

goal (1 subgoal):
 1. (\<Sum>x\<in>R {st..<tt}. jumpF h (at_right x)) = jumpF h (at_right st) + (\<Sum>x\<in>R {st<..<tt}. jumpF h (at_right x))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}

goal (1 subgoal):
 1. right {st..<tt} - left {st<..tt} = jumpF h (at_right st) + right {st<..<tt} - left {st<..<tt} - jumpF h (at_left tt)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}

goal (1 subgoal):
 1. right {st..<tt} - left {st<..tt} = jumpF h (at_right st) + right {st<..<tt} - left {st<..<tt} - jumpF h (at_left tt)
[PROOF STEP]
have "left {st<..tt} = jumpF h (at_left tt) +  left {st<..<tt}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. left {st<..tt} = jumpF h (at_left tt) + left {st<..<tt}
[PROOF STEP]
proof (cases "jumpF h (at_left tt) =0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. jumpF h (at_left tt) = 0 \<Longrightarrow> left {st<..tt} = jumpF h (at_left tt) + left {st<..<tt}
 2. jumpF h (at_left tt) \<noteq> 0 \<Longrightarrow> left {st<..tt} = jumpF h (at_left tt) + left {st<..<tt}
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
jumpF h (at_left tt) = 0

goal (2 subgoals):
 1. jumpF h (at_left tt) = 0 \<Longrightarrow> left {st<..tt} = jumpF h (at_left tt) + left {st<..<tt}
 2. jumpF h (at_left tt) \<noteq> 0 \<Longrightarrow> left {st<..tt} = jumpF h (at_left tt) + left {st<..<tt}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
jumpF h (at_left tt) = 0
[PROOF STEP]
have "L {st<..tt} = L {st<..<tt}"
[PROOF STATE]
proof (prove)
using this:
jumpF h (at_left tt) = 0

goal (1 subgoal):
 1. L {st<..tt} = L {st<..<tt}
[PROOF STEP]
unfolding L_def
[PROOF STATE]
proof (prove)
using this:
jumpF h (at_left tt) = 0

goal (1 subgoal):
 1. {x. jumpF h (at_left x) \<noteq> 0 \<and> x \<in> {st<..tt}} = {x. jumpF h (at_left x) \<noteq> 0 \<and> x \<in> {st<..<tt}}
[PROOF STEP]
using less_eq_real_def
[PROOF STATE]
proof (prove)
using this:
jumpF h (at_left tt) = 0
(?x \<le> ?y) = (?x < ?y \<or> ?x = ?y)

goal (1 subgoal):
 1. {x. jumpF h (at_left x) \<noteq> 0 \<and> x \<in> {st<..tt}} = {x. jumpF h (at_left x) \<noteq> 0 \<and> x \<in> {st<..<tt}}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
L {st<..tt} = L {st<..<tt}

goal (2 subgoals):
 1. jumpF h (at_left tt) = 0 \<Longrightarrow> left {st<..tt} = jumpF h (at_left tt) + left {st<..<tt}
 2. jumpF h (at_left tt) \<noteq> 0 \<Longrightarrow> left {st<..tt} = jumpF h (at_left tt) + left {st<..<tt}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
L {st<..tt} = L {st<..<tt}
[PROOF STEP]
have "left {st<..tt} = left {st<..<tt}"
[PROOF STATE]
proof (prove)
using this:
L {st<..tt} = L {st<..<tt}

goal (1 subgoal):
 1. left {st<..tt} = left {st<..<tt}
[PROOF STEP]
unfolding left_def
[PROOF STATE]
proof (prove)
using this:
L {st<..tt} = L {st<..<tt}

goal (1 subgoal):
 1. (\<Sum>x\<in>L {st<..tt}. jumpF h (at_left x)) = (\<Sum>x\<in>L {st<..<tt}. jumpF h (at_left x))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
left {st<..tt} = left {st<..<tt}

goal (2 subgoals):
 1. jumpF h (at_left tt) = 0 \<Longrightarrow> left {st<..tt} = jumpF h (at_left tt) + left {st<..<tt}
 2. jumpF h (at_left tt) \<noteq> 0 \<Longrightarrow> left {st<..tt} = jumpF h (at_left tt) + left {st<..<tt}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
left {st<..tt} = left {st<..<tt}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
left {st<..tt} = left {st<..<tt}

goal (1 subgoal):
 1. left {st<..tt} = jumpF h (at_left tt) + left {st<..<tt}
[PROOF STEP]
using True
[PROOF STATE]
proof (prove)
using this:
left {st<..tt} = left {st<..<tt}
jumpF h (at_left tt) = 0

goal (1 subgoal):
 1. left {st<..tt} = jumpF h (at_left tt) + left {st<..<tt}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
left {st<..tt} = jumpF h (at_left tt) + left {st<..<tt}

goal (1 subgoal):
 1. jumpF h (at_left tt) \<noteq> 0 \<Longrightarrow> left {st<..tt} = jumpF h (at_left tt) + left {st<..<tt}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. jumpF h (at_left tt) \<noteq> 0 \<Longrightarrow> left {st<..tt} = jumpF h (at_left tt) + left {st<..<tt}
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
jumpF h (at_left tt) \<noteq> 0

goal (1 subgoal):
 1. jumpF h (at_left tt) \<noteq> 0 \<Longrightarrow> left {st<..tt} = jumpF h (at_left tt) + left {st<..<tt}
[PROOF STEP]
have "finite (L {st<..tt})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (L {st<..tt})
[PROOF STEP]
using finite_jFs
[PROOF STATE]
proof (prove)
using this:
finite_jumpFs h st tt

goal (1 subgoal):
 1. finite (L {st<..tt})
[PROOF STEP]
unfolding L_def finite_jumpFs_def
[PROOF STATE]
proof (prove)
using this:
finite {x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st \<le> x \<and> x \<le> tt}

goal (1 subgoal):
 1. finite {x. jumpF h (at_left x) \<noteq> 0 \<and> x \<in> {st<..tt}}
[PROOF STEP]
by (auto elim:rev_finite_subset)
[PROOF STATE]
proof (state)
this:
finite (L {st<..tt})

goal (1 subgoal):
 1. jumpF h (at_left tt) \<noteq> 0 \<Longrightarrow> left {st<..tt} = jumpF h (at_left tt) + left {st<..<tt}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
finite (L {st<..tt})

goal (1 subgoal):
 1. jumpF h (at_left tt) \<noteq> 0 \<Longrightarrow> left {st<..tt} = jumpF h (at_left tt) + left {st<..<tt}
[PROOF STEP]
have "tt \<in> L {st<..tt}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. tt \<in> L {st<..tt}
[PROOF STEP]
using False \<open>st<tt\<close>
[PROOF STATE]
proof (prove)
using this:
jumpF h (at_left tt) \<noteq> 0
st < tt

goal (1 subgoal):
 1. tt \<in> L {st<..tt}
[PROOF STEP]
unfolding L_def
[PROOF STATE]
proof (prove)
using this:
jumpF h (at_left tt) \<noteq> 0
st < tt

goal (1 subgoal):
 1. tt \<in> {x. jumpF h (at_left x) \<noteq> 0 \<and> x \<in> {st<..tt}}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
tt \<in> L {st<..tt}

goal (1 subgoal):
 1. jumpF h (at_left tt) \<noteq> 0 \<Longrightarrow> left {st<..tt} = jumpF h (at_left tt) + left {st<..<tt}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
tt \<in> L {st<..tt}

goal (1 subgoal):
 1. jumpF h (at_left tt) \<noteq> 0 \<Longrightarrow> left {st<..tt} = jumpF h (at_left tt) + left {st<..<tt}
[PROOF STEP]
have "L {st<..tt} - {tt} = L {st<..<tt}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. L {st<..tt} - {tt} = L {st<..<tt}
[PROOF STEP]
unfolding L_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x. jumpF h (at_left x) \<noteq> 0 \<and> x \<in> {st<..tt}} - {tt} = {x. jumpF h (at_left x) \<noteq> 0 \<and> x \<in> {st<..<tt}}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
L {st<..tt} - {tt} = L {st<..<tt}

goal (1 subgoal):
 1. jumpF h (at_left tt) \<noteq> 0 \<Longrightarrow> left {st<..tt} = jumpF h (at_left tt) + left {st<..<tt}
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
finite (L {st<..tt})
tt \<in> L {st<..tt}
L {st<..tt} - {tt} = L {st<..<tt}
[PROOF STEP]
show "left {st<..tt}= jumpF h (at_left tt) + left {st<..<tt}"
[PROOF STATE]
proof (prove)
using this:
finite (L {st<..tt})
tt \<in> L {st<..tt}
L {st<..tt} - {tt} = L {st<..<tt}

goal (1 subgoal):
 1. left {st<..tt} = jumpF h (at_left tt) + left {st<..<tt}
[PROOF STEP]
using sum.remove[of "L {st<..tt}" tt "\<lambda>x. jumpF h (at_left x)"]
[PROOF STATE]
proof (prove)
using this:
finite (L {st<..tt})
tt \<in> L {st<..tt}
L {st<..tt} - {tt} = L {st<..<tt}
\<lbrakk>finite (L {st<..tt}); tt \<in> L {st<..tt}\<rbrakk> \<Longrightarrow> (\<Sum>x\<in>L {st<..tt}. jumpF h (at_left x)) = jumpF h (at_left tt) + (\<Sum>x\<in>L {st<..tt} - {tt}. jumpF h (at_left x))

goal (1 subgoal):
 1. left {st<..tt} = jumpF h (at_left tt) + left {st<..<tt}
[PROOF STEP]
unfolding left_def
[PROOF STATE]
proof (prove)
using this:
finite (L {st<..tt})
tt \<in> L {st<..tt}
L {st<..tt} - {tt} = L {st<..<tt}
\<lbrakk>finite (L {st<..tt}); tt \<in> L {st<..tt}\<rbrakk> \<Longrightarrow> (\<Sum>x\<in>L {st<..tt}. jumpF h (at_left x)) = jumpF h (at_left tt) + (\<Sum>x\<in>L {st<..tt} - {tt}. jumpF h (at_left x))

goal (1 subgoal):
 1. (\<Sum>x\<in>L {st<..tt}. jumpF h (at_left x)) = jumpF h (at_left tt) + (\<Sum>x\<in>L {st<..<tt}. jumpF h (at_left x))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
left {st<..tt} = jumpF h (at_left tt) + left {st<..<tt}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
left {st<..tt} = jumpF h (at_left tt) + left {st<..<tt}

goal (1 subgoal):
 1. right {st..<tt} - left {st<..tt} = jumpF h (at_right st) + right {st<..<tt} - left {st<..<tt} - jumpF h (at_left tt)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}
left {st<..tt} = jumpF h (at_left tt) + left {st<..<tt}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
right {st..<tt} = jumpF h (at_right st) + right {st<..<tt}
left {st<..tt} = jumpF h (at_left tt) + left {st<..<tt}

goal (1 subgoal):
 1. right {st..<tt} - left {st<..tt} = jumpF h (at_right st) + right {st<..<tt} - left {st<..<tt} - jumpF h (at_left tt)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
right {st..<tt} - left {st<..tt} = jumpF h (at_right st) + right {st<..<tt} - left {st<..<tt} - jumpF h (at_left tt)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
right {st..<tt} - left {st<..tt} = jumpF h (at_right st) + right {st<..<tt} - left {st<..<tt} - jumpF h (at_left tt)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
right {st..<tt} - left {st<..tt} = jumpF h (at_right st) + right {st<..<tt} - left {st<..<tt} - jumpF h (at_left tt)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
have "... =  jumpF h (at_right st) - jumpF h (at_left tt)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF h (at_right st) + right {st<..<tt} - left {st<..<tt} - jumpF h (at_left tt) = jumpF h (at_right st) - jumpF h (at_left tt)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. jumpF h (at_right st) + right {st<..<tt} - left {st<..<tt} - jumpF h (at_left tt) = jumpF h (at_right st) - jumpF h (at_left tt)
[PROOF STEP]
define S where "S={x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st < x \<and> x < tt}"
[PROOF STATE]
proof (state)
this:
S = {x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st < x \<and> x < tt}

goal (1 subgoal):
 1. jumpF h (at_right st) + right {st<..<tt} - left {st<..<tt} - jumpF h (at_left tt) = jumpF h (at_right st) - jumpF h (at_left tt)
[PROOF STEP]
have "right {st<..<tt} = sum (\<lambda>x. jumpF h (at_right x)) S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. right {st<..<tt} = (\<Sum>x\<in>S. jumpF h (at_right x))
[PROOF STEP]
unfolding right_def S_def R_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>x | jumpF h (at_right x) \<noteq> 0 \<and> x \<in> {st<..<tt}. jumpF h (at_right x)) = (\<Sum>x | (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st < x \<and> x < tt. jumpF h (at_right x))
[PROOF STEP]
apply (rule sum.mono_neutral_left)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. finite {x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st < x \<and> x < tt}
 2. {x. jumpF h (at_right x) \<noteq> 0 \<and> x \<in> {st<..<tt}} \<subseteq> {x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st < x \<and> x < tt}
 3. \<forall>i\<in>{x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st < x \<and> x < tt} - {x. jumpF h (at_right x) \<noteq> 0 \<and> x \<in> {st<..<tt}}. jumpF h (at_right i) = 0
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st < x \<and> x < tt}
[PROOF STEP]
using finite_jFs
[PROOF STATE]
proof (prove)
using this:
finite_jumpFs h st tt

goal (1 subgoal):
 1. finite {x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st < x \<and> x < tt}
[PROOF STEP]
unfolding finite_jumpFs_def
[PROOF STATE]
proof (prove)
using this:
finite {x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st \<le> x \<and> x \<le> tt}

goal (1 subgoal):
 1. finite {x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st < x \<and> x < tt}
[PROOF STEP]
by (auto elim:rev_finite_subset)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. {x. jumpF h (at_right x) \<noteq> 0 \<and> x \<in> {st<..<tt}} \<subseteq> {x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st < x \<and> x < tt}
 2. \<forall>i\<in>{x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st < x \<and> x < tt} - {x. jumpF h (at_right x) \<noteq> 0 \<and> x \<in> {st<..<tt}}. jumpF h (at_right i) = 0
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x. jumpF h (at_right x) \<noteq> 0 \<and> x \<in> {st<..<tt}} \<subseteq> {x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st < x \<and> x < tt}
[PROOF STEP]
by auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i\<in>{x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st < x \<and> x < tt} - {x. jumpF h (at_right x) \<noteq> 0 \<and> x \<in> {st<..<tt}}. jumpF h (at_right i) = 0
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i\<in>{x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st < x \<and> x < tt} - {x. jumpF h (at_right x) \<noteq> 0 \<and> x \<in> {st<..<tt}}. jumpF h (at_right i) = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
right {st<..<tt} = (\<Sum>x\<in>S. jumpF h (at_right x))

goal (1 subgoal):
 1. jumpF h (at_right st) + right {st<..<tt} - left {st<..<tt} - jumpF h (at_left tt) = jumpF h (at_right st) - jumpF h (at_left tt)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
right {st<..<tt} = (\<Sum>x\<in>S. jumpF h (at_right x))

goal (1 subgoal):
 1. jumpF h (at_right st) + right {st<..<tt} - left {st<..<tt} - jumpF h (at_left tt) = jumpF h (at_right st) - jumpF h (at_left tt)
[PROOF STEP]
have "left {st<..<tt} = sum (\<lambda>x. jumpF h (at_left x)) S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. left {st<..<tt} = (\<Sum>x\<in>S. jumpF h (at_left x))
[PROOF STEP]
unfolding left_def S_def L_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>x | jumpF h (at_left x) \<noteq> 0 \<and> x \<in> {st<..<tt}. jumpF h (at_left x)) = (\<Sum>x | (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st < x \<and> x < tt. jumpF h (at_left x))
[PROOF STEP]
apply (rule sum.mono_neutral_left)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. finite {x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st < x \<and> x < tt}
 2. {x. jumpF h (at_left x) \<noteq> 0 \<and> x \<in> {st<..<tt}} \<subseteq> {x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st < x \<and> x < tt}
 3. \<forall>i\<in>{x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st < x \<and> x < tt} - {x. jumpF h (at_left x) \<noteq> 0 \<and> x \<in> {st<..<tt}}. jumpF h (at_left i) = 0
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st < x \<and> x < tt}
[PROOF STEP]
using finite_jFs
[PROOF STATE]
proof (prove)
using this:
finite_jumpFs h st tt

goal (1 subgoal):
 1. finite {x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st < x \<and> x < tt}
[PROOF STEP]
unfolding finite_jumpFs_def
[PROOF STATE]
proof (prove)
using this:
finite {x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st \<le> x \<and> x \<le> tt}

goal (1 subgoal):
 1. finite {x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st < x \<and> x < tt}
[PROOF STEP]
by (auto elim:rev_finite_subset)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. {x. jumpF h (at_left x) \<noteq> 0 \<and> x \<in> {st<..<tt}} \<subseteq> {x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st < x \<and> x < tt}
 2. \<forall>i\<in>{x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st < x \<and> x < tt} - {x. jumpF h (at_left x) \<noteq> 0 \<and> x \<in> {st<..<tt}}. jumpF h (at_left i) = 0
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x. jumpF h (at_left x) \<noteq> 0 \<and> x \<in> {st<..<tt}} \<subseteq> {x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st < x \<and> x < tt}
[PROOF STEP]
by auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i\<in>{x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st < x \<and> x < tt} - {x. jumpF h (at_left x) \<noteq> 0 \<and> x \<in> {st<..<tt}}. jumpF h (at_left i) = 0
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i\<in>{x. (jumpF h (at_left x) \<noteq> 0 \<or> jumpF h (at_right x) \<noteq> 0) \<and> st < x \<and> x < tt} - {x. jumpF h (at_left x) \<noteq> 0 \<and> x \<in> {st<..<tt}}. jumpF h (at_left i) = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
left {st<..<tt} = (\<Sum>x\<in>S. jumpF h (at_left x))

goal (1 subgoal):
 1. jumpF h (at_right st) + right {st<..<tt} - left {st<..<tt} - jumpF h (at_left tt) = jumpF h (at_right st) - jumpF h (at_left tt)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
right {st<..<tt} = (\<Sum>x\<in>S. jumpF h (at_right x))
left {st<..<tt} = (\<Sum>x\<in>S. jumpF h (at_left x))
[PROOF STEP]
have "right {st<..<tt} - left {st<..<tt}
          = sum (\<lambda>x. jumpF h (at_right x) - jumpF h (at_left x)) S"
[PROOF STATE]
proof (prove)
using this:
right {st<..<tt} = (\<Sum>x\<in>S. jumpF h (at_right x))
left {st<..<tt} = (\<Sum>x\<in>S. jumpF h (at_left x))

goal (1 subgoal):
 1. right {st<..<tt} - left {st<..<tt} = (\<Sum>x\<in>S. jumpF h (at_right x) - jumpF h (at_left x))
[PROOF STEP]
by (simp add: sum_subtractf)
[PROOF STATE]
proof (state)
this:
right {st<..<tt} - left {st<..<tt} = (\<Sum>x\<in>S. jumpF h (at_right x) - jumpF h (at_left x))

goal (1 subgoal):
 1. jumpF h (at_right st) + right {st<..<tt} - left {st<..<tt} - jumpF h (at_left tt) = jumpF h (at_right st) - jumpF h (at_left tt)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
right {st<..<tt} - left {st<..<tt} = (\<Sum>x\<in>S. jumpF h (at_right x) - jumpF h (at_left x))

goal (1 subgoal):
 1. jumpF h (at_right st) + right {st<..<tt} - left {st<..<tt} - jumpF h (at_left tt) = jumpF h (at_right st) - jumpF h (at_left tt)
[PROOF STEP]
have "... = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>x\<in>S. jumpF h (at_right x) - jumpF h (at_left x)) = 0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>x\<in>S. jumpF h (at_right x) - jumpF h (at_left x)) = 0
[PROOF STEP]
have "jumpF h (at_right i) - jumpF h (at_left i) = 0" when "g i=0" for i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF h (at_right i) - jumpF h (at_left i) = 0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. jumpF h (at_right i) - jumpF h (at_left i) = 0
[PROOF STEP]
have "(LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
[PROOF STEP]
have *: "f \<midarrow>i\<rightarrow> f i" "g \<midarrow>i\<rightarrow> 0" "f i \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<midarrow>i\<rightarrow> f i &&& g \<midarrow>i\<rightarrow> 0 &&& f i \<noteq> 0
[PROOF STEP]
using g_imp_f[OF \<open>g i=0\<close>] \<open>g i=0\<close>
[PROOF STATE]
proof (prove)
using this:
f i \<noteq> 0
g i = 0

goal (1 subgoal):
 1. f \<midarrow>i\<rightarrow> f i &&& g \<midarrow>i\<rightarrow> 0 &&& f i \<noteq> 0
[PROOF STEP]
unfolding f_def g_def
[PROOF STATE]
proof (prove)
using this:
r * sin i + Im z - Im z0 \<noteq> 0
r * cos i + Re z - Re z0 = 0

goal (1 subgoal):
 1. (\<lambda>i. r * sin i + Im z - Im z0) \<midarrow>i\<rightarrow> r * sin i + Im z - Im z0 &&& (\<lambda>i. r * cos i + Re z - Re z0) \<midarrow>i\<rightarrow> 0 &&& r * sin i + Im z - Im z0 \<noteq> 0
[PROOF STEP]
by (auto intro!:tendsto_eq_intros)
[PROOF STATE]
proof (state)
this:
f \<midarrow>i\<rightarrow> f i
g \<midarrow>i\<rightarrow> 0
f i \<noteq> 0

goal (1 subgoal):
 1. (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
[PROOF STEP]
have ?thesis when "Re z > Re z0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
[PROOF STEP]
have g_alt:"g = (\<lambda>t. r * cos t + r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g = (\<lambda>t. r * cos t + r)
[PROOF STEP]
unfolding g_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i. r * cos i + Re z - Re z0) = (\<lambda>t. r * cos t + r)
[PROOF STEP]
using \<open>\<bar>Re z - Re z0\<bar> = r\<close> that
[PROOF STATE]
proof (prove)
using this:
\<bar>Re z - Re z0\<bar> = r
Re z0 < Re z

goal (1 subgoal):
 1. (\<lambda>i. r * cos i + Re z - Re z0) = (\<lambda>t. r * cos t + r)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
g = (\<lambda>t. r * cos t + r)

goal (1 subgoal):
 1. (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
[PROOF STEP]
have "(g has_sgnx 1) (at i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (g has_sgnx 1) (at i)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (g has_sgnx 1) (at i)
[PROOF STEP]
have "sgn (g t) = 1" when "t \<noteq> i " "dist t i < pi" for t
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sgn (g t) = 1
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sgn (g t) = 1
[PROOF STEP]
have "cos i = - 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cos i = - 1
[PROOF STEP]
using \<open>g i =0\<close> \<open>r>0\<close>
[PROOF STATE]
proof (prove)
using this:
g i = 0
0 < r

goal (1 subgoal):
 1. cos i = - 1
[PROOF STEP]
unfolding g_alt
[PROOF STATE]
proof (prove)
using this:
r * cos i + r = 0
0 < r

goal (1 subgoal):
 1. cos i = - 1
[PROOF STEP]
by (metis add.inverse_inverse less_numeral_extra(3) mult_cancel_left
                        mult_minus1_right real_add_minus_iff)
[PROOF STATE]
proof (state)
this:
cos i = - 1

goal (1 subgoal):
 1. sgn (g t) = 1
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
cos i = - 1
[PROOF STEP]
obtain k::int where k_def:"i = (2 * k + 1) * pi"
[PROOF STATE]
proof (prove)
using this:
cos i = - 1

goal (1 subgoal):
 1. (\<And>k. i = real_of_int (2 * k + 1) * pi \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using cos_eq_minus1[of i]
[PROOF STATE]
proof (prove)
using this:
cos i = - 1
(cos i = - 1) = (\<exists>x. i = (2 * real_of_int x + 1) * pi)

goal (1 subgoal):
 1. (\<And>k. i = real_of_int (2 * k + 1) * pi \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
i = real_of_int (2 * k + 1) * pi

goal (1 subgoal):
 1. sgn (g t) = 1
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sgn (g t) = 1
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sgn (g t) \<noteq> 1 \<Longrightarrow> False
[PROOF STEP]
assume "sgn (g t) \<noteq> 1"
[PROOF STATE]
proof (state)
this:
sgn (g t) \<noteq> 1

goal (1 subgoal):
 1. sgn (g t) \<noteq> 1 \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
sgn (g t) \<noteq> 1
[PROOF STEP]
have "cos t + 1\<le>0"
[PROOF STATE]
proof (prove)
using this:
sgn (g t) \<noteq> 1

goal (1 subgoal):
 1. cos t + 1 \<le> 0
[PROOF STEP]
using \<open>r>0\<close>
[PROOF STATE]
proof (prove)
using this:
sgn (g t) \<noteq> 1
0 < r

goal (1 subgoal):
 1. cos t + 1 \<le> 0
[PROOF STEP]
unfolding g_alt
[PROOF STATE]
proof (prove)
using this:
sgn (r * cos t + r) \<noteq> 1
0 < r

goal (1 subgoal):
 1. cos t + 1 \<le> 0
[PROOF STEP]
by (metis (no_types, opaque_lifting) add_le_same_cancel1 add_minus_cancel
                          mult_le_cancel_left1 mult_le_cancel_right1 mult_minus_right mult_zero_left
                          sgn_pos zero_le_one)
[PROOF STATE]
proof (state)
this:
cos t + 1 \<le> 0

goal (1 subgoal):
 1. sgn (g t) \<noteq> 1 \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
cos t + 1 \<le> 0
[PROOF STEP]
have "cos t = -1"
[PROOF STATE]
proof (prove)
using this:
cos t + 1 \<le> 0

goal (1 subgoal):
 1. cos t = - 1
[PROOF STEP]
by (metis add.commute cos_ge_minus_one le_less not_less real_add_le_0_iff)
[PROOF STATE]
proof (state)
this:
cos t = - 1

goal (1 subgoal):
 1. sgn (g t) \<noteq> 1 \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
cos t = - 1
[PROOF STEP]
obtain k'::int where k'_def:"t = (2 * k' + 1) * pi"
[PROOF STATE]
proof (prove)
using this:
cos t = - 1

goal (1 subgoal):
 1. (\<And>k'. t = real_of_int (2 * k' + 1) * pi \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using cos_eq_minus1[of t]
[PROOF STATE]
proof (prove)
using this:
cos t = - 1
(cos t = - 1) = (\<exists>x. t = (2 * real_of_int x + 1) * pi)

goal (1 subgoal):
 1. (\<And>k'. t = real_of_int (2 * k' + 1) * pi \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
t = real_of_int (2 * k' + 1) * pi

goal (1 subgoal):
 1. sgn (g t) \<noteq> 1 \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
t = real_of_int (2 * k' + 1) * pi
[PROOF STEP]
have "t - i = 2 * pi*(k' - k)"
[PROOF STATE]
proof (prove)
using this:
t = real_of_int (2 * k' + 1) * pi

goal (1 subgoal):
 1. t - i = 2 * pi * real_of_int (k' - k)
[PROOF STEP]
using k_def
[PROOF STATE]
proof (prove)
using this:
t = real_of_int (2 * k' + 1) * pi
i = real_of_int (2 * k + 1) * pi

goal (1 subgoal):
 1. t - i = 2 * pi * real_of_int (k' - k)
[PROOF STEP]
by (auto simp add:algebra_simps)
[PROOF STATE]
proof (state)
this:
t - i = 2 * pi * real_of_int (k' - k)

goal (1 subgoal):
 1. sgn (g t) \<noteq> 1 \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
t - i = 2 * pi * real_of_int (k' - k)
[PROOF STEP]
have "2  * pi * \<bar>  (k' - k)\<bar> < pi"
[PROOF STATE]
proof (prove)
using this:
t - i = 2 * pi * real_of_int (k' - k)

goal (1 subgoal):
 1. 2 * pi * real_of_int \<bar>k' - k\<bar> < pi
[PROOF STEP]
using \<open>dist t i < pi\<close>
[PROOF STATE]
proof (prove)
using this:
t - i = 2 * pi * real_of_int (k' - k)
dist t i < pi

goal (1 subgoal):
 1. 2 * pi * real_of_int \<bar>k' - k\<bar> < pi
[PROOF STEP]
by (simp add:dist_norm abs_mult)
[PROOF STATE]
proof (state)
this:
2 * pi * real_of_int \<bar>k' - k\<bar> < pi

goal (1 subgoal):
 1. sgn (g t) \<noteq> 1 \<Longrightarrow> False
[PROOF STEP]
from divide_strict_right_mono[OF this, of "2*pi",simplified]
[PROOF STATE]
proof (chain)
picking this:
\<bar>real_of_int k' - real_of_int k\<bar> * 2 < 1
[PROOF STEP]
have "\<bar>k' - k \<bar> < 1/2"
[PROOF STATE]
proof (prove)
using this:
\<bar>real_of_int k' - real_of_int k\<bar> * 2 < 1

goal (1 subgoal):
 1. real_of_int \<bar>k' - k\<bar> < 1 / 2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
real_of_int \<bar>k' - k\<bar> < 1 / 2

goal (1 subgoal):
 1. sgn (g t) \<noteq> 1 \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
real_of_int \<bar>k' - k\<bar> < 1 / 2
[PROOF STEP]
have "k=k'"
[PROOF STATE]
proof (prove)
using this:
real_of_int \<bar>k' - k\<bar> < 1 / 2

goal (1 subgoal):
 1. k = k'
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
k = k'

goal (1 subgoal):
 1. sgn (g t) \<noteq> 1 \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
k = k'
[PROOF STEP]
have "t=i"
[PROOF STATE]
proof (prove)
using this:
k = k'

goal (1 subgoal):
 1. t = i
[PROOF STEP]
using k_def k'_def
[PROOF STATE]
proof (prove)
using this:
k = k'
i = real_of_int (2 * k + 1) * pi
t = real_of_int (2 * k' + 1) * pi

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

goal (1 subgoal):
 1. sgn (g t) \<noteq> 1 \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
t = i
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
t = i

goal (1 subgoal):
 1. False
[PROOF STEP]
using \<open>t\<noteq>i\<close>
[PROOF STATE]
proof (prove)
using this:
t = i
t \<noteq> i

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
sgn (g t) = 1

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>?t \<noteq> i; dist ?t i < pi\<rbrakk> \<Longrightarrow> sgn (g ?t) = 1

goal (1 subgoal):
 1. (g has_sgnx 1) (at i)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?t \<noteq> i; dist ?t i < pi\<rbrakk> \<Longrightarrow> sgn (g ?t) = 1
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?t \<noteq> i; dist ?t i < pi\<rbrakk> \<Longrightarrow> sgn (g ?t) = 1

goal (1 subgoal):
 1. (g has_sgnx 1) (at i)
[PROOF STEP]
unfolding has_sgnx_def eventually_at
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?t \<noteq> i; dist ?t i < pi\<rbrakk> \<Longrightarrow> sgn (g ?t) = 1

goal (1 subgoal):
 1. \<exists>d>0. \<forall>x\<in>UNIV. x \<noteq> i \<and> dist x i < d \<longrightarrow> sgn (g x) = 1
[PROOF STEP]
apply(intro exI[where x="pi"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>t. \<lbrakk>t \<noteq> i; dist t i < pi\<rbrakk> \<Longrightarrow> sgn (g t) = 1) \<Longrightarrow> 0 < pi \<and> (\<forall>x\<in>UNIV. x \<noteq> i \<and> dist x i < pi \<longrightarrow> sgn (g x) = 1)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(g has_sgnx 1) (at i)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(g has_sgnx 1) (at i)

goal (1 subgoal):
 1. (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(g has_sgnx 1) (at i)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(g has_sgnx 1) (at i)

goal (1 subgoal):
 1. (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
[PROOF STEP]
using * filterlim_divide_at_bot_at_top_iff[of f "f i" "at i" g]
[PROOF STATE]
proof (prove)
using this:
(g has_sgnx 1) (at i)
f \<midarrow>i\<rightarrow> f i
g \<midarrow>i\<rightarrow> 0
f i \<noteq> 0
\<lbrakk>f \<midarrow>i\<rightarrow> f i; f i \<noteq> 0\<rbrakk> \<Longrightarrow> (LIM x at i. f x / g x :> at_bot) = (g \<midarrow>i\<rightarrow> 0 \<and> (g has_sgnx - sgn (f i)) (at i))
\<lbrakk>f \<midarrow>i\<rightarrow> f i; f i \<noteq> 0\<rbrakk> \<Longrightarrow> (LIM x at i. f x / g x :> at_top) = (g \<midarrow>i\<rightarrow> 0 \<and> (g has_sgnx sgn (f i)) (at i))

goal (1 subgoal):
 1. (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
[PROOF STEP]
by (simp add: sgn_if)
[PROOF STATE]
proof (state)
this:
(LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Re z0 < Re z \<Longrightarrow> (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)

goal (1 subgoal):
 1. (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
Re z0 < Re z \<Longrightarrow> (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)

goal (1 subgoal):
 1. (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
[PROOF STEP]
have ?thesis when "Re z < Re z0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
[PROOF STEP]
have g_alt:"g = (\<lambda>t. r * cos t - r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g = (\<lambda>t. r * cos t - r)
[PROOF STEP]
unfolding g_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i. r * cos i + Re z - Re z0) = (\<lambda>t. r * cos t - r)
[PROOF STEP]
using \<open>\<bar>Re z - Re z0\<bar> = r\<close> that
[PROOF STATE]
proof (prove)
using this:
\<bar>Re z - Re z0\<bar> = r
Re z < Re z0

goal (1 subgoal):
 1. (\<lambda>i. r * cos i + Re z - Re z0) = (\<lambda>t. r * cos t - r)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
g = (\<lambda>t. r * cos t - r)

goal (1 subgoal):
 1. (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
[PROOF STEP]
have "(g has_sgnx - 1) (at i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (g has_sgnx - 1) (at i)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (g has_sgnx - 1) (at i)
[PROOF STEP]
have "sgn (g t) = - 1" when "t \<noteq> i " "dist t i < pi" for t
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sgn (g t) = - 1
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sgn (g t) = - 1
[PROOF STEP]
have "cos i = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cos i = 1
[PROOF STEP]
using \<open>g i =0\<close> \<open>r>0\<close>
[PROOF STATE]
proof (prove)
using this:
g i = 0
0 < r

goal (1 subgoal):
 1. cos i = 1
[PROOF STEP]
unfolding g_alt
[PROOF STATE]
proof (prove)
using this:
r * cos i - r = 0
0 < r

goal (1 subgoal):
 1. cos i = 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
cos i = 1

goal (1 subgoal):
 1. sgn (g t) = - 1
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
cos i = 1
[PROOF STEP]
obtain k::int where k_def:"i = (2 * k  * pi)"
[PROOF STATE]
proof (prove)
using this:
cos i = 1

goal (1 subgoal):
 1. (\<And>k. i = real_of_int (2 * k) * pi \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using cos_one_2pi_int[of i]
[PROOF STATE]
proof (prove)
using this:
cos i = 1
(cos i = 1) = (\<exists>x. i = real_of_int x * 2 * pi)

goal (1 subgoal):
 1. (\<And>k. i = real_of_int (2 * k) * pi \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
i = real_of_int (2 * k) * pi

goal (1 subgoal):
 1. sgn (g t) = - 1
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sgn (g t) = - 1
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sgn (g t) \<noteq> - 1 \<Longrightarrow> False
[PROOF STEP]
assume "sgn (g t) \<noteq> - 1"
[PROOF STATE]
proof (state)
this:
sgn (g t) \<noteq> - 1

goal (1 subgoal):
 1. sgn (g t) \<noteq> - 1 \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
sgn (g t) \<noteq> - 1
[PROOF STEP]
have "cos t - 1\<ge>0"
[PROOF STATE]
proof (prove)
using this:
sgn (g t) \<noteq> - 1

goal (1 subgoal):
 1. 0 \<le> cos t - 1
[PROOF STEP]
using \<open>r>0\<close>
[PROOF STATE]
proof (prove)
using this:
sgn (g t) \<noteq> - 1
0 < r

goal (1 subgoal):
 1. 0 \<le> cos t - 1
[PROOF STEP]
unfolding g_alt
[PROOF STATE]
proof (prove)
using this:
sgn (r * cos t - r) \<noteq> - 1
0 < r

goal (1 subgoal):
 1. 0 \<le> cos t - 1
[PROOF STEP]
using mult_le_cancel_left1
[PROOF STATE]
proof (prove)
using this:
sgn (r * cos t - r) \<noteq> - 1
0 < r
(?c \<le> ?c * ?b) = (((0::?'a) < ?c \<longrightarrow> (1::?'a) \<le> ?b) \<and> (?c < (0::?'a) \<longrightarrow> ?b \<le> (1::?'a)))

goal (1 subgoal):
 1. 0 \<le> cos t - 1
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
0 \<le> cos t - 1

goal (1 subgoal):
 1. sgn (g t) \<noteq> - 1 \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 \<le> cos t - 1
[PROOF STEP]
have "cos t = 1"
[PROOF STATE]
proof (prove)
using this:
0 \<le> cos t - 1

goal (1 subgoal):
 1. cos t = 1
[PROOF STEP]
by (meson cos_le_one diff_ge_0_iff_ge le_less not_less)
[PROOF STATE]
proof (state)
this:
cos t = 1

goal (1 subgoal):
 1. sgn (g t) \<noteq> - 1 \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
cos t = 1
[PROOF STEP]
obtain k'::int where k'_def:"t = 2 * k'* pi"
[PROOF STATE]
proof (prove)
using this:
cos t = 1

goal (1 subgoal):
 1. (\<And>k'. t = real_of_int (2 * k') * pi \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using cos_one_2pi_int[of t]
[PROOF STATE]
proof (prove)
using this:
cos t = 1
(cos t = 1) = (\<exists>x. t = real_of_int x * 2 * pi)

goal (1 subgoal):
 1. (\<And>k'. t = real_of_int (2 * k') * pi \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
t = real_of_int (2 * k') * pi

goal (1 subgoal):
 1. sgn (g t) \<noteq> - 1 \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
t = real_of_int (2 * k') * pi
[PROOF STEP]
have "t - i = 2 * pi*(k' - k)"
[PROOF STATE]
proof (prove)
using this:
t = real_of_int (2 * k') * pi

goal (1 subgoal):
 1. t - i = 2 * pi * real_of_int (k' - k)
[PROOF STEP]
using k_def
[PROOF STATE]
proof (prove)
using this:
t = real_of_int (2 * k') * pi
i = real_of_int (2 * k) * pi

goal (1 subgoal):
 1. t - i = 2 * pi * real_of_int (k' - k)
[PROOF STEP]
by (auto simp add:algebra_simps)
[PROOF STATE]
proof (state)
this:
t - i = 2 * pi * real_of_int (k' - k)

goal (1 subgoal):
 1. sgn (g t) \<noteq> - 1 \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
t - i = 2 * pi * real_of_int (k' - k)
[PROOF STEP]
have "2  * pi * \<bar>  (k' - k)\<bar> < pi"
[PROOF STATE]
proof (prove)
using this:
t - i = 2 * pi * real_of_int (k' - k)

goal (1 subgoal):
 1. 2 * pi * real_of_int \<bar>k' - k\<bar> < pi
[PROOF STEP]
using \<open>dist t i < pi\<close>
[PROOF STATE]
proof (prove)
using this:
t - i = 2 * pi * real_of_int (k' - k)
dist t i < pi

goal (1 subgoal):
 1. 2 * pi * real_of_int \<bar>k' - k\<bar> < pi
[PROOF STEP]
by (simp add:dist_norm abs_mult)
[PROOF STATE]
proof (state)
this:
2 * pi * real_of_int \<bar>k' - k\<bar> < pi

goal (1 subgoal):
 1. sgn (g t) \<noteq> - 1 \<Longrightarrow> False
[PROOF STEP]
from divide_strict_right_mono[OF this, of "2*pi",simplified]
[PROOF STATE]
proof (chain)
picking this:
\<bar>real_of_int k' - real_of_int k\<bar> * 2 < 1
[PROOF STEP]
have "\<bar>k' - k \<bar> < 1/2"
[PROOF STATE]
proof (prove)
using this:
\<bar>real_of_int k' - real_of_int k\<bar> * 2 < 1

goal (1 subgoal):
 1. real_of_int \<bar>k' - k\<bar> < 1 / 2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
real_of_int \<bar>k' - k\<bar> < 1 / 2

goal (1 subgoal):
 1. sgn (g t) \<noteq> - 1 \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
real_of_int \<bar>k' - k\<bar> < 1 / 2
[PROOF STEP]
have "k=k'"
[PROOF STATE]
proof (prove)
using this:
real_of_int \<bar>k' - k\<bar> < 1 / 2

goal (1 subgoal):
 1. k = k'
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
k = k'

goal (1 subgoal):
 1. sgn (g t) \<noteq> - 1 \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
k = k'
[PROOF STEP]
have "t=i"
[PROOF STATE]
proof (prove)
using this:
k = k'

goal (1 subgoal):
 1. t = i
[PROOF STEP]
using k_def k'_def
[PROOF STATE]
proof (prove)
using this:
k = k'
i = real_of_int (2 * k) * pi
t = real_of_int (2 * k') * pi

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

goal (1 subgoal):
 1. sgn (g t) \<noteq> - 1 \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
t = i
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
t = i

goal (1 subgoal):
 1. False
[PROOF STEP]
using \<open>t\<noteq>i\<close>
[PROOF STATE]
proof (prove)
using this:
t = i
t \<noteq> i

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
sgn (g t) = - 1

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>?t \<noteq> i; dist ?t i < pi\<rbrakk> \<Longrightarrow> sgn (g ?t) = - 1

goal (1 subgoal):
 1. (g has_sgnx - 1) (at i)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?t \<noteq> i; dist ?t i < pi\<rbrakk> \<Longrightarrow> sgn (g ?t) = - 1
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?t \<noteq> i; dist ?t i < pi\<rbrakk> \<Longrightarrow> sgn (g ?t) = - 1

goal (1 subgoal):
 1. (g has_sgnx - 1) (at i)
[PROOF STEP]
unfolding has_sgnx_def eventually_at
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?t \<noteq> i; dist ?t i < pi\<rbrakk> \<Longrightarrow> sgn (g ?t) = - 1

goal (1 subgoal):
 1. \<exists>d>0. \<forall>x\<in>UNIV. x \<noteq> i \<and> dist x i < d \<longrightarrow> sgn (g x) = - 1
[PROOF STEP]
apply(intro exI[where x="pi"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>t. \<lbrakk>t \<noteq> i; dist t i < pi\<rbrakk> \<Longrightarrow> sgn (g t) = - 1) \<Longrightarrow> 0 < pi \<and> (\<forall>x\<in>UNIV. x \<noteq> i \<and> dist x i < pi \<longrightarrow> sgn (g x) = - 1)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(g has_sgnx - 1) (at i)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(g has_sgnx - 1) (at i)

goal (1 subgoal):
 1. (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(g has_sgnx - 1) (at i)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(g has_sgnx - 1) (at i)

goal (1 subgoal):
 1. (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
[PROOF STEP]
using * filterlim_divide_at_bot_at_top_iff[of f "f i" "at i" g]
[PROOF STATE]
proof (prove)
using this:
(g has_sgnx - 1) (at i)
f \<midarrow>i\<rightarrow> f i
g \<midarrow>i\<rightarrow> 0
f i \<noteq> 0
\<lbrakk>f \<midarrow>i\<rightarrow> f i; f i \<noteq> 0\<rbrakk> \<Longrightarrow> (LIM x at i. f x / g x :> at_bot) = (g \<midarrow>i\<rightarrow> 0 \<and> (g has_sgnx - sgn (f i)) (at i))
\<lbrakk>f \<midarrow>i\<rightarrow> f i; f i \<noteq> 0\<rbrakk> \<Longrightarrow> (LIM x at i. f x / g x :> at_top) = (g \<midarrow>i\<rightarrow> 0 \<and> (g has_sgnx sgn (f i)) (at i))

goal (1 subgoal):
 1. (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
[PROOF STEP]
by (simp add: sgn_if)
[PROOF STATE]
proof (state)
this:
(LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Re z < Re z0 \<Longrightarrow> (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)

goal (1 subgoal):
 1. (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
Re z < Re z0 \<Longrightarrow> (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)

goal (1 subgoal):
 1. (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
[PROOF STEP]
have "Re z\<noteq> Re z0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Re z \<noteq> Re z0
[PROOF STEP]
using \<open>\<bar>Re z - Re z0\<bar> = r\<close> \<open>r>0\<close>
[PROOF STATE]
proof (prove)
using this:
\<bar>Re z - Re z0\<bar> = r
0 < r

goal (1 subgoal):
 1. Re z \<noteq> Re z0
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
Re z \<noteq> Re z0

goal (1 subgoal):
 1. (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
Re z0 < Re z \<Longrightarrow> (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
Re z < Re z0 \<Longrightarrow> (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
Re z \<noteq> Re z0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Re z0 < Re z \<Longrightarrow> (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
Re z < Re z0 \<Longrightarrow> (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
Re z \<noteq> Re z0

goal (1 subgoal):
 1. (LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
(LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)

goal (1 subgoal):
 1. jumpF h (at_right i) - jumpF h (at_left i) = 0
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)

goal (1 subgoal):
 1. jumpF h (at_right i) - jumpF h (at_left i) = 0
[PROOF STEP]
have ?thesis when "(LIM x at i. f x / g x :> at_bot)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF h (at_right i) - jumpF h (at_left i) = 0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. jumpF h (at_right i) - jumpF h (at_left i) = 0
[PROOF STEP]
have "jumpF h (at_right i) = - 1/2" "jumpF h (at_left i) = -1/2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF h (at_right i) = - 1 / 2 &&& jumpF h (at_left i) = - 1 / 2
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
LIM x at i. f x / g x :> at_bot

goal (1 subgoal):
 1. jumpF h (at_right i) = - 1 / 2 &&& jumpF h (at_left i) = - 1 / 2
[PROOF STEP]
unfolding jumpF_def h_def filterlim_at_split
[PROOF STATE]
proof (prove)
using this:
(LIM x at_left i. f x / g x :> at_bot) \<and> (LIM x at_right i. f x / g x :> at_bot)

goal (1 subgoal):
 1. (if LIM t at_right i. f t / g t :> at_top then 1 / 2 else if LIM t at_right i. f t / g t :> at_bot then - 1 / 2 else 0) = - 1 / 2 &&& (if LIM t at_left i. f t / g t :> at_top then 1 / 2 else if LIM t at_left i. f t / g t :> at_bot then - 1 / 2 else 0) = - 1 / 2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
jumpF h (at_right i) = - 1 / 2
jumpF h (at_left i) = - 1 / 2

goal (1 subgoal):
 1. jumpF h (at_right i) - jumpF h (at_left i) = 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
jumpF h (at_right i) = - 1 / 2
jumpF h (at_left i) = - 1 / 2
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
jumpF h (at_right i) = - 1 / 2
jumpF h (at_left i) = - 1 / 2

goal (1 subgoal):
 1. jumpF h (at_right i) - jumpF h (at_left i) = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
jumpF h (at_right i) - jumpF h (at_left i) = 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
LIM x at i. f x / g x :> at_bot \<Longrightarrow> jumpF h (at_right i) - jumpF h (at_left i) = 0

goal (1 subgoal):
 1. jumpF h (at_right i) - jumpF h (at_left i) = 0
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
LIM x at i. f x / g x :> at_bot \<Longrightarrow> jumpF h (at_right i) - jumpF h (at_left i) = 0

goal (1 subgoal):
 1. jumpF h (at_right i) - jumpF h (at_left i) = 0
[PROOF STEP]
have ?thesis when "(LIM x at i. f x / g x :> at_top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF h (at_right i) - jumpF h (at_left i) = 0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. jumpF h (at_right i) - jumpF h (at_left i) = 0
[PROOF STEP]
have "jumpF h (at_right i) =  1/2" "jumpF h (at_left i) = 1/2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF h (at_right i) = 1 / 2 &&& jumpF h (at_left i) = 1 / 2
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
LIM x at i. f x / g x :> at_top

goal (1 subgoal):
 1. jumpF h (at_right i) = 1 / 2 &&& jumpF h (at_left i) = 1 / 2
[PROOF STEP]
unfolding jumpF_def h_def filterlim_at_split
[PROOF STATE]
proof (prove)
using this:
(LIM x at_left i. f x / g x :> at_top) \<and> (LIM x at_right i. f x / g x :> at_top)

goal (1 subgoal):
 1. (if LIM t at_right i. f t / g t :> at_top then 1 / 2 else if LIM t at_right i. f t / g t :> at_bot then - 1 / 2 else 0) = 1 / 2 &&& (if LIM t at_left i. f t / g t :> at_top then 1 / 2 else if LIM t at_left i. f t / g t :> at_bot then - 1 / 2 else 0) = 1 / 2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
jumpF h (at_right i) = 1 / 2
jumpF h (at_left i) = 1 / 2

goal (1 subgoal):
 1. jumpF h (at_right i) - jumpF h (at_left i) = 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
jumpF h (at_right i) = 1 / 2
jumpF h (at_left i) = 1 / 2
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
jumpF h (at_right i) = 1 / 2
jumpF h (at_left i) = 1 / 2

goal (1 subgoal):
 1. jumpF h (at_right i) - jumpF h (at_left i) = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
jumpF h (at_right i) - jumpF h (at_left i) = 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
LIM x at i. f x / g x :> at_top \<Longrightarrow> jumpF h (at_right i) - jumpF h (at_left i) = 0

goal (1 subgoal):
 1. jumpF h (at_right i) - jumpF h (at_left i) = 0
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
LIM x at i. f x / g x :> at_bot \<Longrightarrow> jumpF h (at_right i) - jumpF h (at_left i) = 0
LIM x at i. f x / g x :> at_top \<Longrightarrow> jumpF h (at_right i) - jumpF h (at_left i) = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(LIM x at i. f x / g x :> at_bot) \<or> (LIM x at i. f x / g x :> at_top)
LIM x at i. f x / g x :> at_bot \<Longrightarrow> jumpF h (at_right i) - jumpF h (at_left i) = 0
LIM x at i. f x / g x :> at_top \<Longrightarrow> jumpF h (at_right i) - jumpF h (at_left i) = 0

goal (1 subgoal):
 1. jumpF h (at_right i) - jumpF h (at_left i) = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
jumpF h (at_right i) - jumpF h (at_left i) = 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
g ?i = 0 \<Longrightarrow> jumpF h (at_right ?i) - jumpF h (at_left ?i) = 0

goal (1 subgoal):
 1. (\<Sum>x\<in>S. jumpF h (at_right x) - jumpF h (at_left x)) = 0
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
g ?i = 0 \<Longrightarrow> jumpF h (at_right ?i) - jumpF h (at_left ?i) = 0

goal (1 subgoal):
 1. (\<Sum>x\<in>S. jumpF h (at_right x) - jumpF h (at_left x)) = 0
[PROOF STEP]
have "jumpF h (at_right i) - jumpF h (at_left i) = 0" when "g i\<noteq>0" for i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF h (at_right i) - jumpF h (at_left i) = 0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. jumpF h (at_right i) - jumpF h (at_left i) = 0
[PROOF STEP]
have "isCont h i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. isCont h i
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
g i \<noteq> 0

goal (1 subgoal):
 1. isCont h i
[PROOF STEP]
unfolding h_def f_def g_def
[PROOF STATE]
proof (prove)
using this:
r * cos i + Re z - Re z0 \<noteq> 0

goal (1 subgoal):
 1. isCont (\<lambda>t. (r * sin t + Im z - Im z0) / (r * cos t + Re z - Re z0)) i
[PROOF STEP]
by (auto intro!:continuous_intros)
[PROOF STATE]
proof (state)
this:
isCont h i

goal (1 subgoal):
 1. jumpF h (at_right i) - jumpF h (at_left i) = 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
isCont h i
[PROOF STEP]
have "jumpF h (at_right i) = 0" "jumpF h (at_left i) = 0"
[PROOF STATE]
proof (prove)
using this:
isCont h i

goal (1 subgoal):
 1. jumpF h (at_right i) = 0 &&& jumpF h (at_left i) = 0
[PROOF STEP]
using jumpF_not_infinity
[PROOF STATE]
proof (prove)
using this:
isCont h i
\<lbrakk>continuous ?F ?g; ?F \<noteq> bot\<rbrakk> \<Longrightarrow> jumpF ?g ?F = 0

goal (1 subgoal):
 1. jumpF h (at_right i) = 0 &&& jumpF h (at_left i) = 0
[PROOF STEP]
unfolding continuous_at_split
[PROOF STATE]
proof (prove)
using this:
continuous (at_left i) h \<and> continuous (at_right i) h
\<lbrakk>continuous ?F ?g; ?F \<noteq> bot\<rbrakk> \<Longrightarrow> jumpF ?g ?F = 0

goal (1 subgoal):
 1. jumpF h (at_right i) = 0 &&& jumpF h (at_left i) = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
jumpF h (at_right i) = 0
jumpF h (at_left i) = 0

goal (1 subgoal):
 1. jumpF h (at_right i) - jumpF h (at_left i) = 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
jumpF h (at_right i) = 0
jumpF h (at_left i) = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
jumpF h (at_right i) = 0
jumpF h (at_left i) = 0

goal (1 subgoal):
 1. jumpF h (at_right i) - jumpF h (at_left i) = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
jumpF h (at_right i) - jumpF h (at_left i) = 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
g ?i \<noteq> 0 \<Longrightarrow> jumpF h (at_right ?i) - jumpF h (at_left ?i) = 0

goal (1 subgoal):
 1. (\<Sum>x\<in>S. jumpF h (at_right x) - jumpF h (at_left x)) = 0
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
g ?i = 0 \<Longrightarrow> jumpF h (at_right ?i) - jumpF h (at_left ?i) = 0
g ?i \<noteq> 0 \<Longrightarrow> jumpF h (at_right ?i) - jumpF h (at_left ?i) = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
g ?i = 0 \<Longrightarrow> jumpF h (at_right ?i) - jumpF h (at_left ?i) = 0
g ?i \<noteq> 0 \<Longrightarrow> jumpF h (at_right ?i) - jumpF h (at_left ?i) = 0

goal (1 subgoal):
 1. (\<Sum>x\<in>S. jumpF h (at_right x) - jumpF h (at_left x)) = 0
[PROOF STEP]
by (intro sum.neutral,auto)
[PROOF STATE]
proof (state)
this:
(\<Sum>x\<in>S. jumpF h (at_right x) - jumpF h (at_left x)) = 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>x\<in>S. jumpF h (at_right x) - jumpF h (at_left x)) = 0

goal (1 subgoal):
 1. jumpF h (at_right st) + right {st<..<tt} - left {st<..<tt} - jumpF h (at_left tt) = jumpF h (at_right st) - jumpF h (at_left tt)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
right {st<..<tt} - left {st<..<tt} = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
right {st<..<tt} - left {st<..<tt} = 0

goal (1 subgoal):
 1. jumpF h (at_right st) + right {st<..<tt} - left {st<..<tt} - jumpF h (at_left tt) = jumpF h (at_right st) - jumpF h (at_left tt)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
jumpF h (at_right st) + right {st<..<tt} - left {st<..<tt} - jumpF h (at_left tt) = jumpF h (at_right st) - jumpF h (at_left tt)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
jumpF h (at_right st) + right {st<..<tt} - left {st<..<tt} - jumpF h (at_left tt) = jumpF h (at_right st) - jumpF h (at_left tt)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
jumpF h (at_right st) + right {st<..<tt} - left {st<..<tt} - jumpF h (at_left tt) = jumpF h (at_right st) - jumpF h (at_left tt)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
have "... = jumpF_pathstart (part_circlepath z r st tt) z0
        - jumpF_pathfinish (part_circlepath z r st tt) z0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF h (at_right st) - jumpF h (at_left tt) = jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0
[PROOF STEP]
using jstart_eq jfinish_eq
[PROOF STATE]
proof (prove)
using this:
jumpF_pathstart (part_circlepath z r st tt) z0 = jumpF h (at_right st)
jumpF_pathfinish (part_circlepath z r st tt) z0 = jumpF h (at_left tt)

goal (1 subgoal):
 1. jumpF h (at_right st) - jumpF h (at_left tt) = jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
jumpF h (at_right st) - jumpF h (at_left tt) = jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
cindex_pathE (part_circlepath z r st tt) z0 = jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0
[PROOF STEP]
have "cindex_pathE (part_circlepath z r st tt) z0 =
        jumpF_pathstart (part_circlepath z r st tt) z0
        - jumpF_pathfinish (part_circlepath z r st tt) z0"
[PROOF STATE]
proof (prove)
using this:
cindex_pathE (part_circlepath z r st tt) z0 = jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
cindex_pathE (part_circlepath z r st tt) z0 = jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
cindex_pathE (part_circlepath z r st tt) z0 = jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
cindex_pathE (part_circlepath z r st tt) z0 = jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
cindex_pathE (part_circlepath z r st tt) z0 = jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0
\<bar>Re z - Re z0\<bar> = r

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<bar>Re z - Re z0\<bar> = r \<Longrightarrow> cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<bar>Re z - Re z0\<bar> = r \<Longrightarrow> cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
have ?thesis when "\<bar>Re z - Re z0\<bar> < r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
define zr where "zr= (Re z0 - Re z)/r"
[PROOF STATE]
proof (state)
this:
zr = (Re z0 - Re z) / r

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
define \<theta> where "\<theta> = arccos zr"
[PROOF STATE]
proof (state)
this:
\<theta> = arccos zr

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
define \<beta> where "\<beta> = 2*pi - \<theta>"
[PROOF STATE]
proof (state)
this:
\<beta> = 2 * pi - \<theta>

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
have "0<\<theta>" "\<theta><pi"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < \<theta> &&& \<theta> < pi
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. 0 < \<theta>
 2. \<theta> < pi
[PROOF STEP]
have "- 1 < zr" "zr < 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - 1 < zr &&& zr < 1
[PROOF STEP]
using that \<open>r>0\<close>
[PROOF STATE]
proof (prove)
using this:
\<bar>Re z - Re z0\<bar> < r
0 < r

goal (1 subgoal):
 1. - 1 < zr &&& zr < 1
[PROOF STEP]
unfolding zr_def
[PROOF STATE]
proof (prove)
using this:
\<bar>Re z - Re z0\<bar> < r
0 < r

goal (1 subgoal):
 1. - 1 < (Re z0 - Re z) / r &&& (Re z0 - Re z) / r < 1
[PROOF STEP]
by (auto simp add:field_simps)
[PROOF STATE]
proof (state)
this:
- 1 < zr
zr < 1

goal (2 subgoals):
 1. 0 < \<theta>
 2. \<theta> < pi
[PROOF STEP]
from arccos_lt_bounded[OF this]
[PROOF STATE]
proof (chain)
picking this:
0 < arccos zr \<and> arccos zr < pi
[PROOF STEP]
show "0<\<theta>" "\<theta><pi"
[PROOF STATE]
proof (prove)
using this:
0 < arccos zr \<and> arccos zr < pi

goal (1 subgoal):
 1. 0 < \<theta> &&& \<theta> < pi
[PROOF STEP]
unfolding \<theta>_def
[PROOF STATE]
proof (prove)
using this:
0 < arccos zr \<and> arccos zr < pi

goal (1 subgoal):
 1. 0 < arccos zr &&& arccos zr < pi
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 < \<theta>
\<theta> < pi

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
0 < \<theta>
\<theta> < pi

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
have "g \<theta> = 0" "g \<beta> = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g \<theta> = 0 &&& g \<beta> = 0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. g \<theta> = 0
 2. g \<beta> = 0
[PROOF STEP]
have "\<bar>zr\<bar>\<le>1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>zr\<bar> \<le> 1
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
\<bar>Re z - Re z0\<bar> < r

goal (1 subgoal):
 1. \<bar>zr\<bar> \<le> 1
[PROOF STEP]
unfolding zr_def
[PROOF STATE]
proof (prove)
using this:
\<bar>Re z - Re z0\<bar> < r

goal (1 subgoal):
 1. \<bar>(Re z0 - Re z) / r\<bar> \<le> 1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<bar>zr\<bar> \<le> 1

goal (2 subgoals):
 1. g \<theta> = 0
 2. g \<beta> = 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<bar>zr\<bar> \<le> 1
[PROOF STEP]
have "cos \<theta> = zr" "cos \<beta> = cos \<theta>"
[PROOF STATE]
proof (prove)
using this:
\<bar>zr\<bar> \<le> 1

goal (1 subgoal):
 1. cos \<theta> = zr &&& cos \<beta> = cos \<theta>
[PROOF STEP]
unfolding \<theta>_def[folded zr_def] \<beta>_def
[PROOF STATE]
proof (prove)
using this:
\<bar>zr\<bar> \<le> 1

goal (1 subgoal):
 1. cos (arccos zr) = zr &&& cos (2 * pi - arccos zr) = cos (arccos zr)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
cos \<theta> = zr
cos \<beta> = cos \<theta>

goal (2 subgoals):
 1. g \<theta> = 0
 2. g \<beta> = 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
cos \<theta> = zr
cos \<beta> = cos \<theta>
[PROOF STEP]
show "g \<theta> = 0" "g \<beta> = 0"
[PROOF STATE]
proof (prove)
using this:
cos \<theta> = zr
cos \<beta> = cos \<theta>

goal (1 subgoal):
 1. g \<theta> = 0 &&& g \<beta> = 0
[PROOF STEP]
unfolding zr_def g_def
[PROOF STATE]
proof (prove)
using this:
cos \<theta> = (Re z0 - Re z) / r
cos \<beta> = cos \<theta>

goal (1 subgoal):
 1. r * cos \<theta> + Re z - Re z0 = 0 &&& r * cos \<beta> + Re z - Re z0 = 0
[PROOF STEP]
using \<open>r>0\<close>
[PROOF STATE]
proof (prove)
using this:
cos \<theta> = (Re z0 - Re z) / r
cos \<beta> = cos \<theta>
0 < r

goal (1 subgoal):
 1. r * cos \<theta> + Re z - Re z0 = 0 &&& r * cos \<beta> + Re z - Re z0 = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
g \<theta> = 0
g \<beta> = 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
g \<theta> = 0
g \<beta> = 0

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
have g_sgnx_\<theta>:"(g has_sgnx 1) (at_left \<theta>)" "(g has_sgnx -1) (at_right \<theta>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (g has_sgnx 1) (at_left \<theta>) &&& (g has_sgnx - 1) (at_right \<theta>)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (g has_sgnx 1) (at_left \<theta>)
 2. (g has_sgnx - 1) (at_right \<theta>)
[PROOF STEP]
have "(g has_real_derivative - r * sin \<theta>) (at \<theta>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (g has_real_derivative - r * sin \<theta>) (at \<theta>)
[PROOF STEP]
unfolding g_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>i. r * cos i + Re z - Re z0) has_real_derivative - r * sin \<theta>) (at \<theta>)
[PROOF STEP]
by (auto intro!:derivative_eq_intros)
[PROOF STATE]
proof (state)
this:
(g has_real_derivative - r * sin \<theta>) (at \<theta>)

goal (2 subgoals):
 1. (g has_sgnx 1) (at_left \<theta>)
 2. (g has_sgnx - 1) (at_right \<theta>)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(g has_real_derivative - r * sin \<theta>) (at \<theta>)

goal (2 subgoals):
 1. (g has_sgnx 1) (at_left \<theta>)
 2. (g has_sgnx - 1) (at_right \<theta>)
[PROOF STEP]
have "- r * sin \<theta> <0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - r * sin \<theta> < 0
[PROOF STEP]
using sin_gt_zero[OF \<open>0<\<theta>\<close> \<open>\<theta><pi\<close>] \<open>r>0\<close>
[PROOF STATE]
proof (prove)
using this:
0 < sin \<theta>
0 < r

goal (1 subgoal):
 1. - r * sin \<theta> < 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
- r * sin \<theta> < 0

goal (2 subgoals):
 1. (g has_sgnx 1) (at_left \<theta>)
 2. (g has_sgnx - 1) (at_right \<theta>)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(g has_real_derivative - r * sin \<theta>) (at \<theta>)
- r * sin \<theta> < 0
[PROOF STEP]
show "(g has_sgnx 1) (at_left \<theta>)" "(g has_sgnx -1) (at_right \<theta>)"
[PROOF STATE]
proof (prove)
using this:
(g has_real_derivative - r * sin \<theta>) (at \<theta>)
- r * sin \<theta> < 0

goal (1 subgoal):
 1. (g has_sgnx 1) (at_left \<theta>) &&& (g has_sgnx - 1) (at_right \<theta>)
[PROOF STEP]
using has_sgnx_derivative_at_left[of g "- r * sin \<theta>", OF _ \<open>g \<theta>=0\<close>]
              has_sgnx_derivative_at_right[of g "- r * sin \<theta>", OF _ \<open>g \<theta>=0\<close>]
[PROOF STATE]
proof (prove)
using this:
(g has_real_derivative - r * sin \<theta>) (at \<theta>)
- r * sin \<theta> < 0
\<lbrakk>(g has_real_derivative - r * sin \<theta>) (at \<theta>); - r * sin \<theta> \<noteq> 0\<rbrakk> \<Longrightarrow> (g has_sgnx - sgn (- r * sin \<theta>)) (at_left \<theta>)
\<lbrakk>(g has_real_derivative - r * sin \<theta>) (at \<theta>); - r * sin \<theta> \<noteq> 0\<rbrakk> \<Longrightarrow> (g has_sgnx sgn (- r * sin \<theta>)) (at_right \<theta>)

goal (1 subgoal):
 1. (g has_sgnx 1) (at_left \<theta>) &&& (g has_sgnx - 1) (at_right \<theta>)
[PROOF STEP]
by force+
[PROOF STATE]
proof (state)
this:
(g has_sgnx 1) (at_left \<theta>)
(g has_sgnx - 1) (at_right \<theta>)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(g has_sgnx 1) (at_left \<theta>)
(g has_sgnx - 1) (at_right \<theta>)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
have g_sgnx_\<beta>:"(g has_sgnx -1) (at_left \<beta>)" "(g has_sgnx 1) (at_right \<beta>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (g has_sgnx - 1) (at_left \<beta>) &&& (g has_sgnx 1) (at_right \<beta>)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (g has_sgnx - 1) (at_left \<beta>)
 2. (g has_sgnx 1) (at_right \<beta>)
[PROOF STEP]
have "(g has_real_derivative - r * sin \<beta>) (at \<beta>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (g has_real_derivative - r * sin \<beta>) (at \<beta>)
[PROOF STEP]
unfolding g_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>i. r * cos i + Re z - Re z0) has_real_derivative - r * sin \<beta>) (at \<beta>)
[PROOF STEP]
by (auto intro!:derivative_eq_intros)
[PROOF STATE]
proof (state)
this:
(g has_real_derivative - r * sin \<beta>) (at \<beta>)

goal (2 subgoals):
 1. (g has_sgnx - 1) (at_left \<beta>)
 2. (g has_sgnx 1) (at_right \<beta>)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(g has_real_derivative - r * sin \<beta>) (at \<beta>)

goal (2 subgoals):
 1. (g has_sgnx - 1) (at_left \<beta>)
 2. (g has_sgnx 1) (at_right \<beta>)
[PROOF STEP]
have "pi<\<beta>" "\<beta><2*pi"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pi < \<beta> &&& \<beta> < 2 * pi
[PROOF STEP]
unfolding \<beta>_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pi < 2 * pi - \<theta> &&& 2 * pi - \<theta> < 2 * pi
[PROOF STEP]
using \<open>0<\<theta>\<close> \<open>\<theta><pi\<close>
[PROOF STATE]
proof (prove)
using this:
0 < \<theta>
\<theta> < pi

goal (1 subgoal):
 1. pi < 2 * pi - \<theta> &&& 2 * pi - \<theta> < 2 * pi
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
pi < \<beta>
\<beta> < 2 * pi

goal (2 subgoals):
 1. (g has_sgnx - 1) (at_left \<beta>)
 2. (g has_sgnx 1) (at_right \<beta>)
[PROOF STEP]
from sin_lt_zero[OF this] \<open>r>0\<close>
[PROOF STATE]
proof (chain)
picking this:
sin \<beta> < 0
0 < r
[PROOF STEP]
have "- r * sin \<beta> >0"
[PROOF STATE]
proof (prove)
using this:
sin \<beta> < 0
0 < r

goal (1 subgoal):
 1. 0 < - r * sin \<beta>
[PROOF STEP]
by (simp add: mult_pos_neg)
[PROOF STATE]
proof (state)
this:
0 < - r * sin \<beta>

goal (2 subgoals):
 1. (g has_sgnx - 1) (at_left \<beta>)
 2. (g has_sgnx 1) (at_right \<beta>)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(g has_real_derivative - r * sin \<beta>) (at \<beta>)
0 < - r * sin \<beta>
[PROOF STEP]
show "(g has_sgnx -1) (at_left \<beta>)" "(g has_sgnx 1) (at_right \<beta>)"
[PROOF STATE]
proof (prove)
using this:
(g has_real_derivative - r * sin \<beta>) (at \<beta>)
0 < - r * sin \<beta>

goal (1 subgoal):
 1. (g has_sgnx - 1) (at_left \<beta>) &&& (g has_sgnx 1) (at_right \<beta>)
[PROOF STEP]
using has_sgnx_derivative_at_left[of g "- r * sin \<beta>", OF _ \<open>g \<beta>=0\<close>]
              has_sgnx_derivative_at_right[of g "- r * sin \<beta>", OF _ \<open>g \<beta>=0\<close>]
[PROOF STATE]
proof (prove)
using this:
(g has_real_derivative - r * sin \<beta>) (at \<beta>)
0 < - r * sin \<beta>
\<lbrakk>(g has_real_derivative - r * sin \<beta>) (at \<beta>); - r * sin \<beta> \<noteq> 0\<rbrakk> \<Longrightarrow> (g has_sgnx - sgn (- r * sin \<beta>)) (at_left \<beta>)
\<lbrakk>(g has_real_derivative - r * sin \<beta>) (at \<beta>); - r * sin \<beta> \<noteq> 0\<rbrakk> \<Longrightarrow> (g has_sgnx sgn (- r * sin \<beta>)) (at_right \<beta>)

goal (1 subgoal):
 1. (g has_sgnx - 1) (at_left \<beta>) &&& (g has_sgnx 1) (at_right \<beta>)
[PROOF STEP]
by force+
[PROOF STATE]
proof (state)
this:
(g has_sgnx - 1) (at_left \<beta>)
(g has_sgnx 1) (at_right \<beta>)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(g has_sgnx - 1) (at_left \<beta>)
(g has_sgnx 1) (at_right \<beta>)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
have f_tendsto: "(f \<longlongrightarrow> f i) (at_left i)" "(f \<longlongrightarrow> f i) (at_right i)"
     and g_tendsto: "(g \<longlongrightarrow> g i) (at_left i)" "(g \<longlongrightarrow> g i) (at_right i)" for i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((f \<longlongrightarrow> f i) (at_left i) &&& (f \<longlongrightarrow> f i) (at_right i)) &&& (g \<longlongrightarrow> g i) (at_left i) &&& (g \<longlongrightarrow> g i) (at_right i)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. (f \<longlongrightarrow> f i) (at_left i)
 2. (f \<longlongrightarrow> f i) (at_right i)
 3. (g \<longlongrightarrow> g i) (at_left i)
 4. (g \<longlongrightarrow> g i) (at_right i)
[PROOF STEP]
have "(f \<longlongrightarrow> f i) (at i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<midarrow>i\<rightarrow> f i
[PROOF STEP]
unfolding f_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i. r * sin i + Im z - Im z0) \<midarrow>i\<rightarrow> r * sin i + Im z - Im z0
[PROOF STEP]
by (auto intro!:tendsto_eq_intros)
[PROOF STATE]
proof (state)
this:
f \<midarrow>i\<rightarrow> f i

goal (4 subgoals):
 1. (f \<longlongrightarrow> f i) (at_left i)
 2. (f \<longlongrightarrow> f i) (at_right i)
 3. (g \<longlongrightarrow> g i) (at_left i)
 4. (g \<longlongrightarrow> g i) (at_right i)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
f \<midarrow>i\<rightarrow> f i
[PROOF STEP]
show "(f \<longlongrightarrow> f i) (at_left i)" "(f \<longlongrightarrow> f i) (at_right i)"
[PROOF STATE]
proof (prove)
using this:
f \<midarrow>i\<rightarrow> f i

goal (1 subgoal):
 1. (f \<longlongrightarrow> f i) (at_left i) &&& (f \<longlongrightarrow> f i) (at_right i)
[PROOF STEP]
by (auto simp add: filterlim_at_split)
[PROOF STATE]
proof (state)
this:
(f \<longlongrightarrow> f i) (at_left i)
(f \<longlongrightarrow> f i) (at_right i)

goal (2 subgoals):
 1. (g \<longlongrightarrow> g i) (at_left i)
 2. (g \<longlongrightarrow> g i) (at_right i)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (g \<longlongrightarrow> g i) (at_left i)
 2. (g \<longlongrightarrow> g i) (at_right i)
[PROOF STEP]
have "(g \<longlongrightarrow> g i) (at i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g \<midarrow>i\<rightarrow> g i
[PROOF STEP]
unfolding g_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i. r * cos i + Re z - Re z0) \<midarrow>i\<rightarrow> r * cos i + Re z - Re z0
[PROOF STEP]
by (auto intro!:tendsto_eq_intros)
[PROOF STATE]
proof (state)
this:
g \<midarrow>i\<rightarrow> g i

goal (2 subgoals):
 1. (g \<longlongrightarrow> g i) (at_left i)
 2. (g \<longlongrightarrow> g i) (at_right i)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
g \<midarrow>i\<rightarrow> g i
[PROOF STEP]
show "(g \<longlongrightarrow> g i) (at_left i)" "(g \<longlongrightarrow> g i) (at_right i)"
[PROOF STATE]
proof (prove)
using this:
g \<midarrow>i\<rightarrow> g i

goal (1 subgoal):
 1. (g \<longlongrightarrow> g i) (at_left i) &&& (g \<longlongrightarrow> g i) (at_right i)
[PROOF STEP]
by (auto simp add: filterlim_at_split)
[PROOF STATE]
proof (state)
this:
(g \<longlongrightarrow> g i) (at_left i)
(g \<longlongrightarrow> g i) (at_right i)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(f \<longlongrightarrow> f ?i) (at_left ?i)
(f \<longlongrightarrow> f ?i) (at_right ?i)
(g \<longlongrightarrow> g ?i) (at_left ?i)
(g \<longlongrightarrow> g ?i) (at_right ?i)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
define \<theta>_if::real where "\<theta>_if = (if r * sin \<theta> + Im z > Im z0 then -1 else 1)"
[PROOF STATE]
proof (state)
this:
\<theta>_if = (if Im z0 < r * sin \<theta> + Im z then - 1 else 1)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
define \<beta>_if::real where "\<beta>_if = (if r * sin \<beta> + Im z > Im z0 then 1 else -1)"
[PROOF STATE]
proof (state)
this:
\<beta>_if = (if Im z0 < r * sin \<beta> + Im z then 1 else - 1)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
have "jump (\<lambda>i. f i/g i) \<theta> = \<theta>_if"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
[PROOF STEP]
have ?thesis when "r * sin \<theta> + Im z > Im z0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
[PROOF STEP]
have "f \<theta> > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < f \<theta>
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
Im z0 < r * sin \<theta> + Im z

goal (1 subgoal):
 1. 0 < f \<theta>
[PROOF STEP]
unfolding f_def
[PROOF STATE]
proof (prove)
using this:
Im z0 < r * sin \<theta> + Im z

goal (1 subgoal):
 1. 0 < r * sin \<theta> + Im z - Im z0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 < f \<theta>

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
[PROOF STEP]
have "(LIM x (at_left \<theta>). f x / g x :> at_top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LIM x at_left \<theta>. f x / g x :> at_top
[PROOF STEP]
apply (subst filterlim_divide_at_bot_at_top_iff[of f "f \<theta>" _ g])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. (f \<longlongrightarrow> f \<theta>) (at_left \<theta>)
 2. f \<theta> \<noteq> 0
 3. (g \<longlongrightarrow> 0) (at_left \<theta>) \<and> (g has_sgnx sgn (f \<theta>)) (at_left \<theta>)
[PROOF STEP]
using \<open>f \<theta> > 0\<close> \<open>g \<theta> =0\<close> f_tendsto g_tendsto[of \<theta>] g_sgnx_\<theta>
[PROOF STATE]
proof (prove)
using this:
0 < f \<theta>
g \<theta> = 0
(f \<longlongrightarrow> f ?i) (at_left ?i)
(f \<longlongrightarrow> f ?i) (at_right ?i)
(g \<longlongrightarrow> g \<theta>) (at_left \<theta>)
(g \<longlongrightarrow> g \<theta>) (at_right \<theta>)
(g has_sgnx 1) (at_left \<theta>)
(g has_sgnx - 1) (at_right \<theta>)

goal (3 subgoals):
 1. (f \<longlongrightarrow> f \<theta>) (at_left \<theta>)
 2. f \<theta> \<noteq> 0
 3. (g \<longlongrightarrow> 0) (at_left \<theta>) \<and> (g has_sgnx sgn (f \<theta>)) (at_left \<theta>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
LIM x at_left \<theta>. f x / g x :> at_top

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
LIM x at_left \<theta>. f x / g x :> at_top

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
LIM x at_left \<theta>. f x / g x :> at_top
[PROOF STEP]
have "\<not> (LIM x (at_left \<theta>). f x / g x :> at_bot)"
[PROOF STATE]
proof (prove)
using this:
LIM x at_left \<theta>. f x / g x :> at_top

goal (1 subgoal):
 1. \<not> (LIM x at_left \<theta>. f x / g x :> at_bot)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<not> (LIM x at_left \<theta>. f x / g x :> at_bot)

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<not> (LIM x at_left \<theta>. f x / g x :> at_bot)

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
[PROOF STEP]
have "(LIM x (at_right \<theta>). f x / g x :> at_bot)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LIM x at_right \<theta>. f x / g x :> at_bot
[PROOF STEP]
apply (subst filterlim_divide_at_bot_at_top_iff[of f "f \<theta>" _ g])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. (f \<longlongrightarrow> f \<theta>) (at_right \<theta>)
 2. f \<theta> \<noteq> 0
 3. (g \<longlongrightarrow> 0) (at_right \<theta>) \<and> (g has_sgnx - sgn (f \<theta>)) (at_right \<theta>)
[PROOF STEP]
using \<open>f \<theta> > 0\<close> \<open>g \<theta> =0\<close> f_tendsto g_tendsto[of \<theta>] g_sgnx_\<theta>
[PROOF STATE]
proof (prove)
using this:
0 < f \<theta>
g \<theta> = 0
(f \<longlongrightarrow> f ?i) (at_left ?i)
(f \<longlongrightarrow> f ?i) (at_right ?i)
(g \<longlongrightarrow> g \<theta>) (at_left \<theta>)
(g \<longlongrightarrow> g \<theta>) (at_right \<theta>)
(g has_sgnx 1) (at_left \<theta>)
(g has_sgnx - 1) (at_right \<theta>)

goal (3 subgoals):
 1. (f \<longlongrightarrow> f \<theta>) (at_right \<theta>)
 2. f \<theta> \<noteq> 0
 3. (g \<longlongrightarrow> 0) (at_right \<theta>) \<and> (g has_sgnx - sgn (f \<theta>)) (at_right \<theta>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
LIM x at_right \<theta>. f x / g x :> at_bot

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
LIM x at_left \<theta>. f x / g x :> at_top
\<not> (LIM x at_left \<theta>. f x / g x :> at_bot)
LIM x at_right \<theta>. f x / g x :> at_bot
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
LIM x at_left \<theta>. f x / g x :> at_top
\<not> (LIM x at_left \<theta>. f x / g x :> at_bot)
LIM x at_right \<theta>. f x / g x :> at_bot

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
LIM x at_left \<theta>. f x / g x :> at_top
\<not> (LIM x at_left \<theta>. f x / g x :> at_bot)
LIM x at_right \<theta>. f x / g x :> at_bot
Im z0 < r * sin \<theta> + Im z

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
[PROOF STEP]
unfolding jump_def \<theta>_if_def
[PROOF STATE]
proof (prove)
using this:
LIM x at_left \<theta>. f x / g x :> at_top
\<not> (LIM x at_left \<theta>. f x / g x :> at_bot)
LIM x at_right \<theta>. f x / g x :> at_bot
Im z0 < r * sin \<theta> + Im z

goal (1 subgoal):
 1. real_of_int (if (LIM i at_left \<theta>. f i / g i :> at_bot) \<and> (LIM i at_right \<theta>. f i / g i :> at_top) then 1 else if (LIM i at_left \<theta>. f i / g i :> at_top) \<and> (LIM i at_right \<theta>. f i / g i :> at_bot) then - 1 else 0) = (if Im z0 < r * sin \<theta> + Im z then - 1 else 1)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Im z0 < r * sin \<theta> + Im z \<Longrightarrow> real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
Im z0 < r * sin \<theta> + Im z \<Longrightarrow> real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
[PROOF STEP]
have ?thesis when "r * sin \<theta> + Im z < Im z0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
[PROOF STEP]
have "f \<theta> < 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<theta> < 0
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
r * sin \<theta> + Im z < Im z0

goal (1 subgoal):
 1. f \<theta> < 0
[PROOF STEP]
unfolding f_def
[PROOF STATE]
proof (prove)
using this:
r * sin \<theta> + Im z < Im z0

goal (1 subgoal):
 1. r * sin \<theta> + Im z - Im z0 < 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f \<theta> < 0

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
[PROOF STEP]
have "(LIM x (at_left \<theta>). f x / g x :> at_bot)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LIM x at_left \<theta>. f x / g x :> at_bot
[PROOF STEP]
apply (subst filterlim_divide_at_bot_at_top_iff[of f "f \<theta>" _ g])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. (f \<longlongrightarrow> f \<theta>) (at_left \<theta>)
 2. f \<theta> \<noteq> 0
 3. (g \<longlongrightarrow> 0) (at_left \<theta>) \<and> (g has_sgnx - sgn (f \<theta>)) (at_left \<theta>)
[PROOF STEP]
using \<open>f \<theta> < 0\<close> \<open>g \<theta> =0\<close> f_tendsto g_tendsto[of \<theta>] g_sgnx_\<theta>
[PROOF STATE]
proof (prove)
using this:
f \<theta> < 0
g \<theta> = 0
(f \<longlongrightarrow> f ?i) (at_left ?i)
(f \<longlongrightarrow> f ?i) (at_right ?i)
(g \<longlongrightarrow> g \<theta>) (at_left \<theta>)
(g \<longlongrightarrow> g \<theta>) (at_right \<theta>)
(g has_sgnx 1) (at_left \<theta>)
(g has_sgnx - 1) (at_right \<theta>)

goal (3 subgoals):
 1. (f \<longlongrightarrow> f \<theta>) (at_left \<theta>)
 2. f \<theta> \<noteq> 0
 3. (g \<longlongrightarrow> 0) (at_left \<theta>) \<and> (g has_sgnx - sgn (f \<theta>)) (at_left \<theta>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
LIM x at_left \<theta>. f x / g x :> at_bot

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
LIM x at_left \<theta>. f x / g x :> at_bot

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
[PROOF STEP]
have "(LIM x (at_right \<theta>). f x / g x :> at_top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LIM x at_right \<theta>. f x / g x :> at_top
[PROOF STEP]
apply (subst filterlim_divide_at_bot_at_top_iff[of f "f \<theta>" _ g])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. (f \<longlongrightarrow> f \<theta>) (at_right \<theta>)
 2. f \<theta> \<noteq> 0
 3. (g \<longlongrightarrow> 0) (at_right \<theta>) \<and> (g has_sgnx sgn (f \<theta>)) (at_right \<theta>)
[PROOF STEP]
using \<open>f \<theta> < 0\<close> \<open>g \<theta> =0\<close> f_tendsto g_tendsto[of \<theta>] g_sgnx_\<theta>
[PROOF STATE]
proof (prove)
using this:
f \<theta> < 0
g \<theta> = 0
(f \<longlongrightarrow> f ?i) (at_left ?i)
(f \<longlongrightarrow> f ?i) (at_right ?i)
(g \<longlongrightarrow> g \<theta>) (at_left \<theta>)
(g \<longlongrightarrow> g \<theta>) (at_right \<theta>)
(g has_sgnx 1) (at_left \<theta>)
(g has_sgnx - 1) (at_right \<theta>)

goal (3 subgoals):
 1. (f \<longlongrightarrow> f \<theta>) (at_right \<theta>)
 2. f \<theta> \<noteq> 0
 3. (g \<longlongrightarrow> 0) (at_right \<theta>) \<and> (g has_sgnx sgn (f \<theta>)) (at_right \<theta>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
LIM x at_right \<theta>. f x / g x :> at_top

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
LIM x at_left \<theta>. f x / g x :> at_bot
LIM x at_right \<theta>. f x / g x :> at_top
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
LIM x at_left \<theta>. f x / g x :> at_bot
LIM x at_right \<theta>. f x / g x :> at_top

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
LIM x at_left \<theta>. f x / g x :> at_bot
LIM x at_right \<theta>. f x / g x :> at_top
r * sin \<theta> + Im z < Im z0

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
[PROOF STEP]
unfolding jump_def \<theta>_if_def
[PROOF STATE]
proof (prove)
using this:
LIM x at_left \<theta>. f x / g x :> at_bot
LIM x at_right \<theta>. f x / g x :> at_top
r * sin \<theta> + Im z < Im z0

goal (1 subgoal):
 1. real_of_int (if (LIM i at_left \<theta>. f i / g i :> at_bot) \<and> (LIM i at_right \<theta>. f i / g i :> at_top) then 1 else if (LIM i at_left \<theta>. f i / g i :> at_top) \<and> (LIM i at_right \<theta>. f i / g i :> at_bot) then - 1 else 0) = (if Im z0 < r * sin \<theta> + Im z then - 1 else 1)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
r * sin \<theta> + Im z < Im z0 \<Longrightarrow> real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
r * sin \<theta> + Im z < Im z0 \<Longrightarrow> real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
[PROOF STEP]
have "r * sin \<theta> + Im z \<noteq> Im z0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. r * sin \<theta> + Im z \<noteq> Im z0
[PROOF STEP]
using g_imp_f[OF \<open>g \<theta>=0\<close>]
[PROOF STATE]
proof (prove)
using this:
f \<theta> \<noteq> 0

goal (1 subgoal):
 1. r * sin \<theta> + Im z \<noteq> Im z0
[PROOF STEP]
unfolding f_def
[PROOF STATE]
proof (prove)
using this:
r * sin \<theta> + Im z - Im z0 \<noteq> 0

goal (1 subgoal):
 1. r * sin \<theta> + Im z \<noteq> Im z0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
r * sin \<theta> + Im z \<noteq> Im z0

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
Im z0 < r * sin \<theta> + Im z \<Longrightarrow> real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
r * sin \<theta> + Im z < Im z0 \<Longrightarrow> real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
r * sin \<theta> + Im z \<noteq> Im z0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Im z0 < r * sin \<theta> + Im z \<Longrightarrow> real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
r * sin \<theta> + Im z < Im z0 \<Longrightarrow> real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
r * sin \<theta> + Im z \<noteq> Im z0

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
have "jump (\<lambda>i. f i/g i) \<beta> = \<beta>_if"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
[PROOF STEP]
have ?thesis when "r * sin \<beta> + Im z > Im z0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
[PROOF STEP]
have "f \<beta> > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < f \<beta>
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
Im z0 < r * sin \<beta> + Im z

goal (1 subgoal):
 1. 0 < f \<beta>
[PROOF STEP]
unfolding f_def
[PROOF STATE]
proof (prove)
using this:
Im z0 < r * sin \<beta> + Im z

goal (1 subgoal):
 1. 0 < r * sin \<beta> + Im z - Im z0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 < f \<beta>

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
[PROOF STEP]
have "(LIM x (at_left \<beta>). f x / g x :> at_bot)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LIM x at_left \<beta>. f x / g x :> at_bot
[PROOF STEP]
apply (subst filterlim_divide_at_bot_at_top_iff[of f "f \<beta>" _ g])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. (f \<longlongrightarrow> f \<beta>) (at_left \<beta>)
 2. f \<beta> \<noteq> 0
 3. (g \<longlongrightarrow> 0) (at_left \<beta>) \<and> (g has_sgnx - sgn (f \<beta>)) (at_left \<beta>)
[PROOF STEP]
using \<open>f \<beta> > 0\<close> \<open>g \<beta> =0\<close> f_tendsto g_tendsto[of \<beta>] g_sgnx_\<beta>
[PROOF STATE]
proof (prove)
using this:
0 < f \<beta>
g \<beta> = 0
(f \<longlongrightarrow> f ?i) (at_left ?i)
(f \<longlongrightarrow> f ?i) (at_right ?i)
(g \<longlongrightarrow> g \<beta>) (at_left \<beta>)
(g \<longlongrightarrow> g \<beta>) (at_right \<beta>)
(g has_sgnx - 1) (at_left \<beta>)
(g has_sgnx 1) (at_right \<beta>)

goal (3 subgoals):
 1. (f \<longlongrightarrow> f \<beta>) (at_left \<beta>)
 2. f \<beta> \<noteq> 0
 3. (g \<longlongrightarrow> 0) (at_left \<beta>) \<and> (g has_sgnx - sgn (f \<beta>)) (at_left \<beta>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
LIM x at_left \<beta>. f x / g x :> at_bot

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
LIM x at_left \<beta>. f x / g x :> at_bot

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
[PROOF STEP]
have "(LIM x (at_right \<beta>). f x / g x :> at_top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LIM x at_right \<beta>. f x / g x :> at_top
[PROOF STEP]
apply (subst filterlim_divide_at_bot_at_top_iff[of f "f \<beta>" _ g])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. (f \<longlongrightarrow> f \<beta>) (at_right \<beta>)
 2. f \<beta> \<noteq> 0
 3. (g \<longlongrightarrow> 0) (at_right \<beta>) \<and> (g has_sgnx sgn (f \<beta>)) (at_right \<beta>)
[PROOF STEP]
using \<open>f \<beta> > 0\<close> \<open>g \<beta> =0\<close> f_tendsto g_tendsto[of \<beta>] g_sgnx_\<beta>
[PROOF STATE]
proof (prove)
using this:
0 < f \<beta>
g \<beta> = 0
(f \<longlongrightarrow> f ?i) (at_left ?i)
(f \<longlongrightarrow> f ?i) (at_right ?i)
(g \<longlongrightarrow> g \<beta>) (at_left \<beta>)
(g \<longlongrightarrow> g \<beta>) (at_right \<beta>)
(g has_sgnx - 1) (at_left \<beta>)
(g has_sgnx 1) (at_right \<beta>)

goal (3 subgoals):
 1. (f \<longlongrightarrow> f \<beta>) (at_right \<beta>)
 2. f \<beta> \<noteq> 0
 3. (g \<longlongrightarrow> 0) (at_right \<beta>) \<and> (g has_sgnx sgn (f \<beta>)) (at_right \<beta>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
LIM x at_right \<beta>. f x / g x :> at_top

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
LIM x at_left \<beta>. f x / g x :> at_bot
LIM x at_right \<beta>. f x / g x :> at_top
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
LIM x at_left \<beta>. f x / g x :> at_bot
LIM x at_right \<beta>. f x / g x :> at_top

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
LIM x at_left \<beta>. f x / g x :> at_bot
LIM x at_right \<beta>. f x / g x :> at_top
Im z0 < r * sin \<beta> + Im z

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
[PROOF STEP]
unfolding jump_def \<beta>_if_def
[PROOF STATE]
proof (prove)
using this:
LIM x at_left \<beta>. f x / g x :> at_bot
LIM x at_right \<beta>. f x / g x :> at_top
Im z0 < r * sin \<beta> + Im z

goal (1 subgoal):
 1. real_of_int (if (LIM i at_left \<beta>. f i / g i :> at_bot) \<and> (LIM i at_right \<beta>. f i / g i :> at_top) then 1 else if (LIM i at_left \<beta>. f i / g i :> at_top) \<and> (LIM i at_right \<beta>. f i / g i :> at_bot) then - 1 else 0) = (if Im z0 < r * sin \<beta> + Im z then 1 else - 1)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Im z0 < r * sin \<beta> + Im z \<Longrightarrow> real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
Im z0 < r * sin \<beta> + Im z \<Longrightarrow> real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
[PROOF STEP]
have ?thesis when "r * sin \<beta> + Im z < Im z0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
[PROOF STEP]
have "f \<beta> < 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<beta> < 0
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
r * sin \<beta> + Im z < Im z0

goal (1 subgoal):
 1. f \<beta> < 0
[PROOF STEP]
unfolding f_def
[PROOF STATE]
proof (prove)
using this:
r * sin \<beta> + Im z < Im z0

goal (1 subgoal):
 1. r * sin \<beta> + Im z - Im z0 < 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f \<beta> < 0

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
[PROOF STEP]
have "(LIM x (at_left \<beta>). f x / g x :> at_top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LIM x at_left \<beta>. f x / g x :> at_top
[PROOF STEP]
apply (subst filterlim_divide_at_bot_at_top_iff[of f "f \<beta>" _ g])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. (f \<longlongrightarrow> f \<beta>) (at_left \<beta>)
 2. f \<beta> \<noteq> 0
 3. (g \<longlongrightarrow> 0) (at_left \<beta>) \<and> (g has_sgnx sgn (f \<beta>)) (at_left \<beta>)
[PROOF STEP]
using \<open>f \<beta> < 0\<close> \<open>g \<beta> =0\<close> f_tendsto g_tendsto[of \<beta>] g_sgnx_\<beta>
[PROOF STATE]
proof (prove)
using this:
f \<beta> < 0
g \<beta> = 0
(f \<longlongrightarrow> f ?i) (at_left ?i)
(f \<longlongrightarrow> f ?i) (at_right ?i)
(g \<longlongrightarrow> g \<beta>) (at_left \<beta>)
(g \<longlongrightarrow> g \<beta>) (at_right \<beta>)
(g has_sgnx - 1) (at_left \<beta>)
(g has_sgnx 1) (at_right \<beta>)

goal (3 subgoals):
 1. (f \<longlongrightarrow> f \<beta>) (at_left \<beta>)
 2. f \<beta> \<noteq> 0
 3. (g \<longlongrightarrow> 0) (at_left \<beta>) \<and> (g has_sgnx sgn (f \<beta>)) (at_left \<beta>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
LIM x at_left \<beta>. f x / g x :> at_top

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
LIM x at_left \<beta>. f x / g x :> at_top

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
[PROOF STEP]
have "(LIM x (at_right \<beta>). f x / g x :> at_bot)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LIM x at_right \<beta>. f x / g x :> at_bot
[PROOF STEP]
apply (subst filterlim_divide_at_bot_at_top_iff[of f "f \<beta>" _ g])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. (f \<longlongrightarrow> f \<beta>) (at_right \<beta>)
 2. f \<beta> \<noteq> 0
 3. (g \<longlongrightarrow> 0) (at_right \<beta>) \<and> (g has_sgnx - sgn (f \<beta>)) (at_right \<beta>)
[PROOF STEP]
using \<open>f \<beta> < 0\<close> \<open>g \<beta> =0\<close> f_tendsto g_tendsto[of \<beta>] g_sgnx_\<beta>
[PROOF STATE]
proof (prove)
using this:
f \<beta> < 0
g \<beta> = 0
(f \<longlongrightarrow> f ?i) (at_left ?i)
(f \<longlongrightarrow> f ?i) (at_right ?i)
(g \<longlongrightarrow> g \<beta>) (at_left \<beta>)
(g \<longlongrightarrow> g \<beta>) (at_right \<beta>)
(g has_sgnx - 1) (at_left \<beta>)
(g has_sgnx 1) (at_right \<beta>)

goal (3 subgoals):
 1. (f \<longlongrightarrow> f \<beta>) (at_right \<beta>)
 2. f \<beta> \<noteq> 0
 3. (g \<longlongrightarrow> 0) (at_right \<beta>) \<and> (g has_sgnx - sgn (f \<beta>)) (at_right \<beta>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
LIM x at_right \<beta>. f x / g x :> at_bot

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
LIM x at_left \<beta>. f x / g x :> at_top
LIM x at_right \<beta>. f x / g x :> at_bot
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
LIM x at_left \<beta>. f x / g x :> at_top
LIM x at_right \<beta>. f x / g x :> at_bot

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
LIM x at_left \<beta>. f x / g x :> at_top
LIM x at_right \<beta>. f x / g x :> at_bot
r * sin \<beta> + Im z < Im z0

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
[PROOF STEP]
unfolding jump_def \<beta>_if_def
[PROOF STATE]
proof (prove)
using this:
LIM x at_left \<beta>. f x / g x :> at_top
LIM x at_right \<beta>. f x / g x :> at_bot
r * sin \<beta> + Im z < Im z0

goal (1 subgoal):
 1. real_of_int (if (LIM i at_left \<beta>. f i / g i :> at_bot) \<and> (LIM i at_right \<beta>. f i / g i :> at_top) then 1 else if (LIM i at_left \<beta>. f i / g i :> at_top) \<and> (LIM i at_right \<beta>. f i / g i :> at_bot) then - 1 else 0) = (if Im z0 < r * sin \<beta> + Im z then 1 else - 1)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
r * sin \<beta> + Im z < Im z0 \<Longrightarrow> real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
r * sin \<beta> + Im z < Im z0 \<Longrightarrow> real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
[PROOF STEP]
have "r * sin \<beta> + Im z \<noteq> Im z0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. r * sin \<beta> + Im z \<noteq> Im z0
[PROOF STEP]
using g_imp_f[OF \<open>g \<beta>=0\<close>]
[PROOF STATE]
proof (prove)
using this:
f \<beta> \<noteq> 0

goal (1 subgoal):
 1. r * sin \<beta> + Im z \<noteq> Im z0
[PROOF STEP]
unfolding f_def
[PROOF STATE]
proof (prove)
using this:
r * sin \<beta> + Im z - Im z0 \<noteq> 0

goal (1 subgoal):
 1. r * sin \<beta> + Im z \<noteq> Im z0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
r * sin \<beta> + Im z \<noteq> Im z0

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
Im z0 < r * sin \<beta> + Im z \<Longrightarrow> real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
r * sin \<beta> + Im z < Im z0 \<Longrightarrow> real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
r * sin \<beta> + Im z \<noteq> Im z0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Im z0 < r * sin \<beta> + Im z \<Longrightarrow> real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
r * sin \<beta> + Im z < Im z0 \<Longrightarrow> real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
r * sin \<beta> + Im z \<noteq> Im z0

goal (1 subgoal):
 1. real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
have "jump (\<lambda>i. f i / g i) x \<noteq> 0 \<longleftrightarrow> x=\<theta> \<or> x=\<beta>" when "st<x" "x<tt" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (jump (\<lambda>i. f i / g i) x \<noteq> 0) = (x = \<theta> \<or> x = \<beta>)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. jump (\<lambda>i. f i / g i) x \<noteq> 0 \<Longrightarrow> x = \<theta> \<or> x = \<beta>
 2. x = \<theta> \<or> x = \<beta> \<Longrightarrow> jump (\<lambda>i. f i / g i) x \<noteq> 0
[PROOF STEP]
assume "x = \<theta> \<or> x = \<beta>"
[PROOF STATE]
proof (state)
this:
x = \<theta> \<or> x = \<beta>

goal (2 subgoals):
 1. jump (\<lambda>i. f i / g i) x \<noteq> 0 \<Longrightarrow> x = \<theta> \<or> x = \<beta>
 2. x = \<theta> \<or> x = \<beta> \<Longrightarrow> jump (\<lambda>i. f i / g i) x \<noteq> 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x = \<theta> \<or> x = \<beta>
[PROOF STEP]
show "jump (\<lambda>i. f i / g i) x \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
x = \<theta> \<or> x = \<beta>

goal (1 subgoal):
 1. jump (\<lambda>i. f i / g i) x \<noteq> 0
[PROOF STEP]
using \<open>jump (\<lambda>i. f i/g i) \<theta> = \<theta>_if\<close> \<open>jump (\<lambda>i. f i/g i) \<beta> = \<beta>_if\<close>
[PROOF STATE]
proof (prove)
using this:
x = \<theta> \<or> x = \<beta>
real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if

goal (1 subgoal):
 1. jump (\<lambda>i. f i / g i) x \<noteq> 0
[PROOF STEP]
unfolding \<theta>_if_def \<beta>_if_def
[PROOF STATE]
proof (prove)
using this:
x = \<theta> \<or> x = \<beta>
real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = (if Im z0 < r * sin \<theta> + Im z then - 1 else 1)
real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = (if Im z0 < r * sin \<beta> + Im z then 1 else - 1)

goal (1 subgoal):
 1. jump (\<lambda>i. f i / g i) x \<noteq> 0
[PROOF STEP]
by (metis add.inverse_inverse add.inverse_neutral of_int_0 one_neq_zero)
[PROOF STATE]
proof (state)
this:
jump (\<lambda>i. f i / g i) x \<noteq> 0

goal (1 subgoal):
 1. jump (\<lambda>i. f i / g i) x \<noteq> 0 \<Longrightarrow> x = \<theta> \<or> x = \<beta>
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. jump (\<lambda>i. f i / g i) x \<noteq> 0 \<Longrightarrow> x = \<theta> \<or> x = \<beta>
[PROOF STEP]
assume asm:"jump (\<lambda>i. f i / g i) x \<noteq> 0"
[PROOF STATE]
proof (state)
this:
jump (\<lambda>i. f i / g i) x \<noteq> 0

goal (1 subgoal):
 1. jump (\<lambda>i. f i / g i) x \<noteq> 0 \<Longrightarrow> x = \<theta> \<or> x = \<beta>
[PROOF STEP]
let ?thesis = "x = \<theta> \<or> x = \<beta>"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. jump (\<lambda>i. f i / g i) x \<noteq> 0 \<Longrightarrow> x = \<theta> \<or> x = \<beta>
[PROOF STEP]
have "g x=0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g x = 0
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. g x \<noteq> 0 \<Longrightarrow> False
[PROOF STEP]
assume "g x \<noteq> 0"
[PROOF STATE]
proof (state)
this:
g x \<noteq> 0

goal (1 subgoal):
 1. g x \<noteq> 0 \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
g x \<noteq> 0
[PROOF STEP]
have "isCont (\<lambda>i. f i / g i) x"
[PROOF STATE]
proof (prove)
using this:
g x \<noteq> 0

goal (1 subgoal):
 1. isCont (\<lambda>i. f i / g i) x
[PROOF STEP]
unfolding f_def g_def
[PROOF STATE]
proof (prove)
using this:
r * cos x + Re z - Re z0 \<noteq> 0

goal (1 subgoal):
 1. isCont (\<lambda>i. (r * sin i + Im z - Im z0) / (r * cos i + Re z - Re z0)) x
[PROOF STEP]
by (auto intro:continuous_intros)
[PROOF STATE]
proof (state)
this:
isCont (\<lambda>i. f i / g i) x

goal (1 subgoal):
 1. g x \<noteq> 0 \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
isCont (\<lambda>i. f i / g i) x
[PROOF STEP]
have "jump (\<lambda>i. f i / g i) x = 0"
[PROOF STATE]
proof (prove)
using this:
isCont (\<lambda>i. f i / g i) x

goal (1 subgoal):
 1. jump (\<lambda>i. f i / g i) x = 0
[PROOF STEP]
using jump_not_infinity
[PROOF STATE]
proof (prove)
using this:
isCont (\<lambda>i. f i / g i) x
isCont ?f ?a \<Longrightarrow> jump ?f ?a = 0

goal (1 subgoal):
 1. jump (\<lambda>i. f i / g i) x = 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
jump (\<lambda>i. f i / g i) x = 0

goal (1 subgoal):
 1. g x \<noteq> 0 \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
jump (\<lambda>i. f i / g i) x = 0
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
jump (\<lambda>i. f i / g i) x = 0

goal (1 subgoal):
 1. False
[PROOF STEP]
using asm
[PROOF STATE]
proof (prove)
using this:
jump (\<lambda>i. f i / g i) x = 0
jump (\<lambda>i. f i / g i) x \<noteq> 0

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
g x = 0

goal (1 subgoal):
 1. jump (\<lambda>i. f i / g i) x \<noteq> 0 \<Longrightarrow> x = \<theta> \<or> x = \<beta>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
g x = 0
[PROOF STEP]
have "cos x = zr"
[PROOF STATE]
proof (prove)
using this:
g x = 0

goal (1 subgoal):
 1. cos x = zr
[PROOF STEP]
unfolding g_def zr_def
[PROOF STATE]
proof (prove)
using this:
r * cos x + Re z - Re z0 = 0

goal (1 subgoal):
 1. cos x = (Re z0 - Re z) / r
[PROOF STEP]
using \<open>r>0\<close>
[PROOF STATE]
proof (prove)
using this:
r * cos x + Re z - Re z0 = 0
0 < r

goal (1 subgoal):
 1. cos x = (Re z0 - Re z) / r
[PROOF STEP]
by (auto simp add:field_simps)
[PROOF STATE]
proof (state)
this:
cos x = zr

goal (1 subgoal):
 1. jump (\<lambda>i. f i / g i) x \<noteq> 0 \<Longrightarrow> x = \<theta> \<or> x = \<beta>
[PROOF STEP]
have ?thesis when "x\<le>pi"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x = \<theta> \<or> x = \<beta>
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x = \<theta> \<or> x = \<beta>
[PROOF STEP]
have "x\<ge>0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> x
[PROOF STEP]
using \<open>st<x\<close> \<open>st\<ge>0\<close>
[PROOF STATE]
proof (prove)
using this:
st < x
0 \<le> st

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

goal (1 subgoal):
 1. x = \<theta> \<or> x = \<beta>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 \<le> x
[PROOF STEP]
have "arccos (cos x) = x"
[PROOF STATE]
proof (prove)
using this:
0 \<le> x

goal (1 subgoal):
 1. arccos (cos x) = x
[PROOF STEP]
using arccos_cos[of x] that
[PROOF STATE]
proof (prove)
using this:
0 \<le> x
\<lbrakk>0 \<le> x; x \<le> pi\<rbrakk> \<Longrightarrow> arccos (cos x) = x
x \<le> pi

goal (1 subgoal):
 1. arccos (cos x) = x
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
arccos (cos x) = x

goal (1 subgoal):
 1. x = \<theta> \<or> x = \<beta>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
arccos (cos x) = x
[PROOF STEP]
have "x=\<theta>"
[PROOF STATE]
proof (prove)
using this:
arccos (cos x) = x

goal (1 subgoal):
 1. x = \<theta>
[PROOF STEP]
unfolding \<theta>_def \<open>cos x=zr\<close>
[PROOF STATE]
proof (prove)
using this:
arccos zr = x

goal (1 subgoal):
 1. x = arccos zr
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x = \<theta>

goal (1 subgoal):
 1. x = \<theta> \<or> x = \<beta>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x = \<theta>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x = \<theta>

goal (1 subgoal):
 1. x = \<theta> \<or> x = \<beta>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x = \<theta> \<or> x = \<beta>

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
x \<le> pi \<Longrightarrow> x = \<theta> \<or> x = \<beta>

goal (1 subgoal):
 1. jump (\<lambda>i. f i / g i) x \<noteq> 0 \<Longrightarrow> x = \<theta> \<or> x = \<beta>
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
x \<le> pi \<Longrightarrow> x = \<theta> \<or> x = \<beta>

goal (1 subgoal):
 1. jump (\<lambda>i. f i / g i) x \<noteq> 0 \<Longrightarrow> x = \<theta> \<or> x = \<beta>
[PROOF STEP]
have ?thesis when "\<not> x\<le>pi"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x = \<theta> \<or> x = \<beta>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x = \<theta> \<or> x = \<beta>
[PROOF STEP]
have "x-2*pi\<le>0" "-pi\<le>x-2*pi"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x - 2 * pi \<le> 0 &&& - pi \<le> x - 2 * pi
[PROOF STEP]
using that \<open>x<tt\<close> \<open>tt\<le>2*pi\<close>
[PROOF STATE]
proof (prove)
using this:
\<not> x \<le> pi
x < tt
tt \<le> 2 * pi

goal (1 subgoal):
 1. x - 2 * pi \<le> 0 &&& - pi \<le> x - 2 * pi
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x - 2 * pi \<le> 0
- pi \<le> x - 2 * pi

goal (1 subgoal):
 1. x = \<theta> \<or> x = \<beta>
[PROOF STEP]
from arccos_cos2[OF this]
[PROOF STATE]
proof (chain)
picking this:
arccos (cos (x - 2 * pi)) = - (x - 2 * pi)
[PROOF STEP]
have "arccos (cos (x - 2 * pi)) = 2*pi-x"
[PROOF STATE]
proof (prove)
using this:
arccos (cos (x - 2 * pi)) = - (x - 2 * pi)

goal (1 subgoal):
 1. arccos (cos (x - 2 * pi)) = 2 * pi - x
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
arccos (cos (x - 2 * pi)) = 2 * pi - x

goal (1 subgoal):
 1. x = \<theta> \<or> x = \<beta>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
arccos (cos (x - 2 * pi)) = 2 * pi - x
[PROOF STEP]
have "arccos (cos x) = 2*pi-x"
[PROOF STATE]
proof (prove)
using this:
arccos (cos (x - 2 * pi)) = 2 * pi - x

goal (1 subgoal):
 1. arccos (cos x) = 2 * pi - x
[PROOF STEP]
by (metis arccos cos_2pi_minus cos_ge_minus_one cos_le_one)
[PROOF STATE]
proof (state)
this:
arccos (cos x) = 2 * pi - x

goal (1 subgoal):
 1. x = \<theta> \<or> x = \<beta>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
arccos (cos x) = 2 * pi - x
[PROOF STEP]
have "x=\<beta>"
[PROOF STATE]
proof (prove)
using this:
arccos (cos x) = 2 * pi - x

goal (1 subgoal):
 1. x = \<beta>
[PROOF STEP]
unfolding \<beta>_def \<theta>_def
[PROOF STATE]
proof (prove)
using this:
arccos (cos x) = 2 * pi - x

goal (1 subgoal):
 1. x = 2 * pi - arccos zr
[PROOF STEP]
using \<open>cos x =zr\<close>
[PROOF STATE]
proof (prove)
using this:
arccos (cos x) = 2 * pi - x
cos x = zr

goal (1 subgoal):
 1. x = 2 * pi - arccos zr
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x = \<beta>

goal (1 subgoal):
 1. x = \<theta> \<or> x = \<beta>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x = \<beta>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x = \<beta>

goal (1 subgoal):
 1. x = \<theta> \<or> x = \<beta>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x = \<theta> \<or> x = \<beta>

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<not> x \<le> pi \<Longrightarrow> x = \<theta> \<or> x = \<beta>

goal (1 subgoal):
 1. jump (\<lambda>i. f i / g i) x \<noteq> 0 \<Longrightarrow> x = \<theta> \<or> x = \<beta>
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
x \<le> pi \<Longrightarrow> x = \<theta> \<or> x = \<beta>
\<not> x \<le> pi \<Longrightarrow> x = \<theta> \<or> x = \<beta>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x \<le> pi \<Longrightarrow> x = \<theta> \<or> x = \<beta>
\<not> x \<le> pi \<Longrightarrow> x = \<theta> \<or> x = \<beta>

goal (1 subgoal):
 1. x = \<theta> \<or> x = \<beta>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x = \<theta> \<or> x = \<beta>

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>st < ?x; ?x < tt\<rbrakk> \<Longrightarrow> (jump (\<lambda>i. f i / g i) ?x \<noteq> 0) = (?x = \<theta> \<or> ?x = \<beta>)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>st < ?x; ?x < tt\<rbrakk> \<Longrightarrow> (jump (\<lambda>i. f i / g i) ?x \<noteq> 0) = (?x = \<theta> \<or> ?x = \<beta>)
[PROOF STEP]
have "{x. jump (\<lambda>i. f i / g i) x \<noteq> 0 \<and> st < x \<and> x < tt} = {\<theta>,\<beta>} \<inter> {st<..<tt}"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>st < ?x; ?x < tt\<rbrakk> \<Longrightarrow> (jump (\<lambda>i. f i / g i) ?x \<noteq> 0) = (?x = \<theta> \<or> ?x = \<beta>)

goal (1 subgoal):
 1. {x. jump (\<lambda>i. f i / g i) x \<noteq> 0 \<and> st < x \<and> x < tt} = {\<theta>, \<beta>} \<inter> {st<..<tt}
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
{x. jump (\<lambda>i. f i / g i) x \<noteq> 0 \<and> st < x \<and> x < tt} = {\<theta>, \<beta>} \<inter> {st<..<tt}

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
{x. jump (\<lambda>i. f i / g i) x \<noteq> 0 \<and> st < x \<and> x < tt} = {\<theta>, \<beta>} \<inter> {st<..<tt}

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
have "\<theta>\<noteq>\<beta>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<theta> \<noteq> \<beta>
[PROOF STEP]
using \<beta>_def \<open>\<theta> < pi\<close>
[PROOF STATE]
proof (prove)
using this:
\<beta> = 2 * pi - \<theta>
\<theta> < pi

goal (1 subgoal):
 1. \<theta> \<noteq> \<beta>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<theta> \<noteq> \<beta>

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
{x. jump (\<lambda>i. f i / g i) x \<noteq> 0 \<and> st < x \<and> x < tt} = {\<theta>, \<beta>} \<inter> {st<..<tt}
\<theta> \<noteq> \<beta>
[PROOF STEP]
have "cindex st tt h =
          (if st<\<theta> \<and> \<theta><tt then \<theta>_if else 0)
          +
          (if st<\<beta> \<and> \<beta> < tt then \<beta>_if else 0)"
[PROOF STATE]
proof (prove)
using this:
real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
{x. jump (\<lambda>i. f i / g i) x \<noteq> 0 \<and> st < x \<and> x < tt} = {\<theta>, \<beta>} \<inter> {st<..<tt}
\<theta> \<noteq> \<beta>

goal (1 subgoal):
 1. real_of_int (cindex st tt h) = (if st < \<theta> \<and> \<theta> < tt then \<theta>_if else 0) + (if st < \<beta> \<and> \<beta> < tt then \<beta>_if else 0)
[PROOF STEP]
unfolding cindex_def h_def
[PROOF STATE]
proof (prove)
using this:
real_of_int (jump (\<lambda>i. f i / g i) \<theta>) = \<theta>_if
real_of_int (jump (\<lambda>i. f i / g i) \<beta>) = \<beta>_if
{x. jump (\<lambda>i. f i / g i) x \<noteq> 0 \<and> st < x \<and> x < tt} = {\<theta>, \<beta>} \<inter> {st<..<tt}
\<theta> \<noteq> \<beta>

goal (1 subgoal):
 1. real_of_int (sum (jump (\<lambda>t. f t / g t)) {x. jump (\<lambda>t. f t / g t) x \<noteq> 0 \<and> st < x \<and> x < tt}) = (if st < \<theta> \<and> \<theta> < tt then \<theta>_if else 0) + (if st < \<beta> \<and> \<beta> < tt then \<beta>_if else 0)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
real_of_int (cindex st tt h) = (if st < \<theta> \<and> \<theta> < tt then \<theta>_if else 0) + (if st < \<beta> \<and> \<beta> < tt then \<beta>_if else 0)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
real_of_int (cindex st tt h) = (if st < \<theta> \<and> \<theta> < tt then \<theta>_if else 0) + (if st < \<beta> \<and> \<beta> < tt then \<beta>_if else 0)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
have "cindexE st tt h = jumpF h (at_right st) + cindex st tt h - jumpF h (at_left tt)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cindexE st tt h = jumpF h (at_right st) + real_of_int (cindex st tt h) - jumpF h (at_left tt)
[PROOF STEP]
proof (rule cindex_eq_cindexE_divide[of st tt f g,folded h_def])
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. st < tt
 2. finite {x. (f x = 0 \<or> g x = 0) \<and> st \<le> x \<and> x \<le> tt}
 3. \<forall>x\<in>{st..tt}. g x = 0 \<longrightarrow> f x \<noteq> 0
 4. continuous_on {st..tt} f
 5. continuous_on {st..tt} g
[PROOF STEP]
show "st < tt"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. st < tt
[PROOF STEP]
using \<open>st < tt\<close>
[PROOF STATE]
proof (prove)
using this:
st < tt

goal (1 subgoal):
 1. st < tt
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
st < tt

goal (4 subgoals):
 1. finite {x. (f x = 0 \<or> g x = 0) \<and> st \<le> x \<and> x \<le> tt}
 2. \<forall>x\<in>{st..tt}. g x = 0 \<longrightarrow> f x \<noteq> 0
 3. continuous_on {st..tt} f
 4. continuous_on {st..tt} g
[PROOF STEP]
show "\<forall>x\<in>{st..tt}. g x = 0 \<longrightarrow> f x \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<in>{st..tt}. g x = 0 \<longrightarrow> f x \<noteq> 0
[PROOF STEP]
using g_imp_f
[PROOF STATE]
proof (prove)
using this:
g ?i = 0 \<Longrightarrow> f ?i \<noteq> 0

goal (1 subgoal):
 1. \<forall>x\<in>{st..tt}. g x = 0 \<longrightarrow> f x \<noteq> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>x\<in>{st..tt}. g x = 0 \<longrightarrow> f x \<noteq> 0

goal (3 subgoals):
 1. finite {x. (f x = 0 \<or> g x = 0) \<and> st \<le> x \<and> x \<le> tt}
 2. continuous_on {st..tt} f
 3. continuous_on {st..tt} g
[PROOF STEP]
show "continuous_on {st..tt} f" "continuous_on {st..tt} g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on {st..tt} f &&& continuous_on {st..tt} g
[PROOF STEP]
unfolding f_def g_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on {st..tt} (\<lambda>i. r * sin i + Im z - Im z0) &&& continuous_on {st..tt} (\<lambda>i. r * cos i + Re z - Re z0)
[PROOF STEP]
by (auto intro!:continuous_intros)
[PROOF STATE]
proof (state)
this:
continuous_on {st..tt} f
continuous_on {st..tt} g

goal (1 subgoal):
 1. finite {x. (f x = 0 \<or> g x = 0) \<and> st \<le> x \<and> x \<le> tt}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite {x. (f x = 0 \<or> g x = 0) \<and> st \<le> x \<and> x \<le> tt}
[PROOF STEP]
let ?S1="{t. Re (part_circlepath z r st tt t-z0) = 0 \<and> 0 \<le> t \<and> t \<le> 1}"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite {x. (f x = 0 \<or> g x = 0) \<and> st \<le> x \<and> x \<le> tt}
[PROOF STEP]
let ?S2="{t. Im (part_circlepath z r st tt t-z0) = 0 \<and> 0 \<le> t \<and> t \<le> 1}"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite {x. (f x = 0 \<or> g x = 0) \<and> st \<le> x \<and> x \<le> tt}
[PROOF STEP]
define G where "G={t.  g (linepath st tt t) = 0 \<and> 0 \<le> t \<and> t \<le> 1}"
[PROOF STATE]
proof (state)
this:
G = {t. g (linepath st tt t) = 0 \<and> 0 \<le> t \<and> t \<le> 1}

goal (1 subgoal):
 1. finite {x. (f x = 0 \<or> g x = 0) \<and> st \<le> x \<and> x \<le> tt}
[PROOF STEP]
define F where "F={t.  f (linepath st tt t) = 0 \<and> 0 \<le> t \<and> t \<le> 1}"
[PROOF STATE]
proof (state)
this:
F = {t. f (linepath st tt t) = 0 \<and> 0 \<le> t \<and> t \<le> 1}

goal (1 subgoal):
 1. finite {x. (f x = 0 \<or> g x = 0) \<and> st \<le> x \<and> x \<le> tt}
[PROOF STEP]
define vl where "vl=(\<lambda>x. (x-st)/(tt-st))"
[PROOF STATE]
proof (state)
this:
vl = (\<lambda>x. (x - st) / (tt - st))

goal (1 subgoal):
 1. finite {x. (f x = 0 \<or> g x = 0) \<and> st \<le> x \<and> x \<le> tt}
[PROOF STEP]
have "finite G" "finite F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite G &&& finite F
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. finite G
 2. finite F
[PROOF STEP]
have "finite {t. Re (part_circlepath z r st tt t-z0) = 0 \<and> 0 \<le> t \<and> t \<le> 1}"
             "finite {t. Im (part_circlepath z r st tt t-z0) = 0 \<and> 0 \<le> t \<and> t \<le> 1}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {t. Re (part_circlepath z r st tt t - z0) = 0 \<and> 0 \<le> t \<and> t \<le> 1} &&& finite {t. Im (part_circlepath z r st tt t - z0) = 0 \<and> 0 \<le> t \<and> t \<le> 1}
[PROOF STEP]
using part_circlepath_half_finite_inter[of st tt r "Complex 1 0" z "Re z0"]
              part_circlepath_half_finite_inter[of st tt r "Complex 0 1" z "Im z0"] \<open>st<tt\<close> \<open>r>0\<close>
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>st \<noteq> tt; r \<noteq> 0; Complex 1 0 \<noteq> 0\<rbrakk> \<Longrightarrow> finite {t. part_circlepath z r st tt t \<bullet> Complex 1 0 = Re z0 \<and> 0 \<le> t \<and> t \<le> 1}
\<lbrakk>st \<noteq> tt; r \<noteq> 0; Complex 0 1 \<noteq> 0\<rbrakk> \<Longrightarrow> finite {t. part_circlepath z r st tt t \<bullet> Complex 0 1 = Im z0 \<and> 0 \<le> t \<and> t \<le> 1}
st < tt
0 < r

goal (1 subgoal):
 1. finite {t. Re (part_circlepath z r st tt t - z0) = 0 \<and> 0 \<le> t \<and> t \<le> 1} &&& finite {t. Im (part_circlepath z r st tt t - z0) = 0 \<and> 0 \<le> t \<and> t \<le> 1}
[PROOF STEP]
by (auto simp add:inner_complex_def Complex_eq_0)
[PROOF STATE]
proof (state)
this:
finite {t. Re (part_circlepath z r st tt t - z0) = 0 \<and> 0 \<le> t \<and> t \<le> 1}
finite {t. Im (part_circlepath z r st tt t - z0) = 0 \<and> 0 \<le> t \<and> t \<le> 1}

goal (2 subgoals):
 1. finite G
 2. finite F
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
finite {t. Re (part_circlepath z r st tt t - z0) = 0 \<and> 0 \<le> t \<and> t \<le> 1}
finite {t. Im (part_circlepath z r st tt t - z0) = 0 \<and> 0 \<le> t \<and> t \<le> 1}

goal (2 subgoals):
 1. finite G
 2. finite F
[PROOF STEP]
have
            "Re (part_circlepath z r st tt t-z0) = 0 \<longleftrightarrow> g (linepath st tt t) = 0"
            "Im (part_circlepath z r st tt t-z0) = 0 \<longleftrightarrow> f (linepath st tt t) = 0"
            for t
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Re (part_circlepath z r st tt t - z0) = 0) = (g (linepath st tt t) = 0) &&& (Im (part_circlepath z r st tt t - z0) = 0) = (f (linepath st tt t) = 0)
[PROOF STEP]
unfolding cindex_pathE_def part_circlepath_def exp_Euler f_def g_def comp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Re (z + complex_of_real r * (cos (complex_of_real (linepath st tt t)) + \<i> * sin (complex_of_real (linepath st tt t))) - z0) = 0) = (r * cos (linepath st tt t) + Re z - Re z0 = 0) &&& (Im (z + complex_of_real r * (cos (complex_of_real (linepath st tt t)) + \<i> * sin (complex_of_real (linepath st tt t))) - z0) = 0) = (r * sin (linepath st tt t) + Im z - Im z0 = 0)
[PROOF STEP]
by (auto simp add:cos_of_real sin_of_real algebra_simps)
[PROOF STATE]
proof (state)
this:
(Re (part_circlepath z r st tt ?t - z0) = 0) = (g (linepath st tt ?t) = 0)
(Im (part_circlepath z r st tt ?t - z0) = 0) = (f (linepath st tt ?t) = 0)

goal (2 subgoals):
 1. finite G
 2. finite F
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
finite {t. Re (part_circlepath z r st tt t - z0) = 0 \<and> 0 \<le> t \<and> t \<le> 1}
finite {t. Im (part_circlepath z r st tt t - z0) = 0 \<and> 0 \<le> t \<and> t \<le> 1}
(Re (part_circlepath z r st tt ?t - z0) = 0) = (g (linepath st tt ?t) = 0)
(Im (part_circlepath z r st tt ?t - z0) = 0) = (f (linepath st tt ?t) = 0)
[PROOF STEP]
show "finite G" "finite F"
[PROOF STATE]
proof (prove)
using this:
finite {t. Re (part_circlepath z r st tt t - z0) = 0 \<and> 0 \<le> t \<and> t \<le> 1}
finite {t. Im (part_circlepath z r st tt t - z0) = 0 \<and> 0 \<le> t \<and> t \<le> 1}
(Re (part_circlepath z r st tt ?t - z0) = 0) = (g (linepath st tt ?t) = 0)
(Im (part_circlepath z r st tt ?t - z0) = 0) = (f (linepath st tt ?t) = 0)

goal (1 subgoal):
 1. finite G &&& finite F
[PROOF STEP]
unfolding G_def F_def
[PROOF STATE]
proof (prove)
using this:
finite {t. Re (part_circlepath z r st tt t - z0) = 0 \<and> 0 \<le> t \<and> t \<le> 1}
finite {t. Im (part_circlepath z r st tt t - z0) = 0 \<and> 0 \<le> t \<and> t \<le> 1}
(Re (part_circlepath z r st tt ?t - z0) = 0) = (g (linepath st tt ?t) = 0)
(Im (part_circlepath z r st tt ?t - z0) = 0) = (f (linepath st tt ?t) = 0)

goal (1 subgoal):
 1. finite {t. g (linepath st tt t) = 0 \<and> 0 \<le> t \<and> t \<le> 1} &&& finite {t. f (linepath st tt t) = 0 \<and> 0 \<le> t \<and> t \<le> 1}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite G
finite F

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
finite G
finite F

goal (1 subgoal):
 1. finite {x. (f x = 0 \<or> g x = 0) \<and> st \<le> x \<and> x \<le> tt}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite G
finite F
[PROOF STEP]
have "finite (linepath st tt ` F)" "finite (linepath st tt ` G)"
[PROOF STATE]
proof (prove)
using this:
finite G
finite F

goal (1 subgoal):
 1. finite (linepath st tt ` F) &&& finite (linepath st tt ` G)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite (linepath st tt ` F)
finite (linepath st tt ` G)

goal (1 subgoal):
 1. finite {x. (f x = 0 \<or> g x = 0) \<and> st \<le> x \<and> x \<le> tt}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
finite (linepath st tt ` F)
finite (linepath st tt ` G)

goal (1 subgoal):
 1. finite {x. (f x = 0 \<or> g x = 0) \<and> st \<le> x \<and> x \<le> tt}
[PROOF STEP]
have
          "{x. f x = 0 \<and> st \<le> x \<and> x \<le> tt} \<subseteq> linepath st tt ` F"
          "{x. g x = 0 \<and> st \<le> x \<and> x \<le> tt} \<subseteq> linepath st tt ` G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x. f x = 0 \<and> st \<le> x \<and> x \<le> tt} \<subseteq> linepath st tt ` F &&& {x. g x = 0 \<and> st \<le> x \<and> x \<le> tt} \<subseteq> linepath st tt ` G
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. {x. f x = 0 \<and> st \<le> x \<and> x \<le> tt} \<subseteq> linepath st tt ` F
 2. {x. g x = 0 \<and> st \<le> x \<and> x \<le> tt} \<subseteq> linepath st tt ` G
[PROOF STEP]
have *: "linepath st tt (vl t) = t" "vl t\<ge>0 \<longleftrightarrow> t\<ge>st" "vl t\<le>1 \<longleftrightarrow>t\<le>tt" for t
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. linepath st tt (vl t) = t &&& (0 \<le> vl t) = (st \<le> t) &&& (vl t \<le> 1) = (t \<le> tt)
[PROOF STEP]
unfolding linepath_def vl_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1 - (t - st) / (tt - st)) *\<^sub>R st + ((t - st) / (tt - st)) *\<^sub>R tt = t &&& (0 \<le> (t - st) / (tt - st)) = (st \<le> t) &&& ((t - st) / (tt - st) \<le> 1) = (t \<le> tt)
[PROOF STEP]
using \<open>tt>st\<close>
[PROOF STATE]
proof (prove)
using this:
st < tt

goal (1 subgoal):
 1. (1 - (t - st) / (tt - st)) *\<^sub>R st + ((t - st) / (tt - st)) *\<^sub>R tt = t &&& (0 \<le> (t - st) / (tt - st)) = (st \<le> t) &&& ((t - st) / (tt - st) \<le> 1) = (t \<le> tt)
[PROOF STEP]
apply (auto simp add:divide_simps)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. st < tt \<Longrightarrow> (tt - t) * st + (t - st) * tt = t * (tt - st)
[PROOF STEP]
by (simp add:algebra_simps)
[PROOF STATE]
proof (state)
this:
linepath st tt (vl ?t) = ?t
(0 \<le> vl ?t) = (st \<le> ?t)
(vl ?t \<le> 1) = (?t \<le> tt)

goal (2 subgoals):
 1. {x. f x = 0 \<and> st \<le> x \<and> x \<le> tt} \<subseteq> linepath st tt ` F
 2. {x. g x = 0 \<and> st \<le> x \<and> x \<le> tt} \<subseteq> linepath st tt ` G
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
linepath st tt (vl ?t) = ?t
(0 \<le> vl ?t) = (st \<le> ?t)
(vl ?t \<le> 1) = (?t \<le> tt)
[PROOF STEP]
show
            "{x. f x = 0 \<and> st \<le> x \<and> x \<le> tt} \<subseteq> linepath st tt `F"
            "{x. g x = 0 \<and> st \<le> x \<and> x \<le> tt} \<subseteq> linepath st tt `G"
[PROOF STATE]
proof (prove)
using this:
linepath st tt (vl ?t) = ?t
(0 \<le> vl ?t) = (st \<le> ?t)
(vl ?t \<le> 1) = (?t \<le> tt)

goal (1 subgoal):
 1. {x. f x = 0 \<and> st \<le> x \<and> x \<le> tt} \<subseteq> linepath st tt ` F &&& {x. g x = 0 \<and> st \<le> x \<and> x \<le> tt} \<subseteq> linepath st tt ` G
[PROOF STEP]
unfolding F_def G_def
[PROOF STATE]
proof (prove)
using this:
linepath st tt (vl ?t) = ?t
(0 \<le> vl ?t) = (st \<le> ?t)
(vl ?t \<le> 1) = (?t \<le> tt)

goal (1 subgoal):
 1. {x. f x = 0 \<and> st \<le> x \<and> x \<le> tt} \<subseteq> linepath st tt ` {t. f (linepath st tt t) = 0 \<and> 0 \<le> t \<and> t \<le> 1} &&& {x. g x = 0 \<and> st \<le> x \<and> x \<le> tt} \<subseteq> linepath st tt ` {t. g (linepath st tt t) = 0 \<and> 0 \<le> t \<and> t \<le> 1}
[PROOF STEP]
by (clarify|rule_tac x="vl x" in rev_image_eqI,auto)+
[PROOF STATE]
proof (state)
this:
{x. f x = 0 \<and> st \<le> x \<and> x \<le> tt} \<subseteq> linepath st tt ` F
{x. g x = 0 \<and> st \<le> x \<and> x \<le> tt} \<subseteq> linepath st tt ` G

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
{x. f x = 0 \<and> st \<le> x \<and> x \<le> tt} \<subseteq> linepath st tt ` F
{x. g x = 0 \<and> st \<le> x \<and> x \<le> tt} \<subseteq> linepath st tt ` G

goal (1 subgoal):
 1. finite {x. (f x = 0 \<or> g x = 0) \<and> st \<le> x \<and> x \<le> tt}
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
finite (linepath st tt ` F)
finite (linepath st tt ` G)
{x. f x = 0 \<and> st \<le> x \<and> x \<le> tt} \<subseteq> linepath st tt ` F
{x. g x = 0 \<and> st \<le> x \<and> x \<le> tt} \<subseteq> linepath st tt ` G
[PROOF STEP]
have
          "finite {x. f x = 0 \<and> st \<le> x \<and> x \<le> tt}"
          "finite {x. g x = 0 \<and> st \<le> x \<and> x \<le> tt}"
[PROOF STATE]
proof (prove)
using this:
finite (linepath st tt ` F)
finite (linepath st tt ` G)
{x. f x = 0 \<and> st \<le> x \<and> x \<le> tt} \<subseteq> linepath st tt ` F
{x. g x = 0 \<and> st \<le> x \<and> x \<le> tt} \<subseteq> linepath st tt ` G

goal (1 subgoal):
 1. finite {x. f x = 0 \<and> st \<le> x \<and> x \<le> tt} &&& finite {x. g x = 0 \<and> st \<le> x \<and> x \<le> tt}
[PROOF STEP]
by (auto elim:rev_finite_subset)
[PROOF STATE]
proof (state)
this:
finite {x. f x = 0 \<and> st \<le> x \<and> x \<le> tt}
finite {x. g x = 0 \<and> st \<le> x \<and> x \<le> tt}

goal (1 subgoal):
 1. finite {x. (f x = 0 \<or> g x = 0) \<and> st \<le> x \<and> x \<le> tt}
[PROOF STEP]
from finite_UnI[OF this]
[PROOF STATE]
proof (chain)
picking this:
finite ({x. f x = 0 \<and> st \<le> x \<and> x \<le> tt} \<union> {x. g x = 0 \<and> st \<le> x \<and> x \<le> tt})
[PROOF STEP]
show "finite {x. (f x = 0 \<or> g x = 0) \<and> st \<le> x \<and> x \<le> tt}"
[PROOF STATE]
proof (prove)
using this:
finite ({x. f x = 0 \<and> st \<le> x \<and> x \<le> tt} \<union> {x. g x = 0 \<and> st \<le> x \<and> x \<le> tt})

goal (1 subgoal):
 1. finite {x. (f x = 0 \<or> g x = 0) \<and> st \<le> x \<and> x \<le> tt}
[PROOF STEP]
by (elim rev_finite_subset,auto)
[PROOF STATE]
proof (state)
this:
finite {x. (f x = 0 \<or> g x = 0) \<and> st \<le> x \<and> x \<le> tt}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
cindexE st tt h = jumpF h (at_right st) + real_of_int (cindex st tt h) - jumpF h (at_left tt)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
real_of_int (cindex st tt h) = (if st < \<theta> \<and> \<theta> < tt then \<theta>_if else 0) + (if st < \<beta> \<and> \<beta> < tt then \<beta>_if else 0)
cindexE st tt h = jumpF h (at_right st) + real_of_int (cindex st tt h) - jumpF h (at_left tt)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
real_of_int (cindex st tt h) = (if st < \<theta> \<and> \<theta> < tt then \<theta>_if else 0) + (if st < \<beta> \<and> \<beta> < tt then \<beta>_if else 0)
cindexE st tt h = jumpF h (at_right st) + real_of_int (cindex st tt h) - jumpF h (at_left tt)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
unfolding Let_def
[PROOF STATE]
proof (prove)
using this:
real_of_int (cindex st tt h) = (if st < \<theta> \<and> \<theta> < tt then \<theta>_if else 0) + (if st < \<beta> \<and> \<beta> < tt then \<beta>_if else 0)
cindexE st tt h = jumpF h (at_right st) + real_of_int (cindex st tt h) - jumpF h (at_left tt)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < arccos ((Re z0 - Re z) / r) \<and> arccos ((Re z0 - Re z) / r) < tt then if Im z0 < r * sin (arccos ((Re z0 - Re z) / r)) + Im z then - 1 else 1 else 0) + (if st < 2 * pi - arccos ((Re z0 - Re z) / r) \<and> 2 * pi - arccos ((Re z0 - Re z) / r) < tt then if Im z0 < r * sin (2 * pi - arccos ((Re z0 - Re z) / r)) + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
apply (fold zr_def \<theta>_def \<beta>_def \<theta>_if_def \<beta>_if_def)+
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>real_of_int (cindex st tt h) = (if st < \<theta> \<and> \<theta> < tt then \<theta>_if else 0) + (if st < \<beta> \<and> \<beta> < tt then \<beta>_if else 0); cindexE st tt h = jumpF h (at_right st) + real_of_int (cindex st tt h) - jumpF h (at_left tt); real_of_int (cindex st tt h) = (if st < \<theta> \<and> \<theta> < tt then \<theta>_if else 0) + (if st < \<beta> \<and> \<beta> < tt then \<beta>_if else 0); cindexE st tt h = jumpF h (at_right st) + real_of_int (cindex st tt h) - jumpF h (at_left tt); real_of_int (cindex st tt h) = (if st < \<theta> \<and> \<theta> < tt then \<theta>_if else 0) + (if st < \<beta> \<and> \<beta> < tt then \<beta>_if else 0); cindexE st tt h = jumpF h (at_right st) + real_of_int (cindex st tt h) - jumpF h (at_left tt)\<rbrakk> \<Longrightarrow> cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then \<theta>_if else 0) + (if st < \<beta> \<and> \<beta> < tt then \<beta>_if else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
using jstart_eq jfinish_eq index_eq that
[PROOF STATE]
proof (prove)
using this:
jumpF_pathstart (part_circlepath z r st tt) z0 = jumpF h (at_right st)
jumpF_pathfinish (part_circlepath z r st tt) z0 = jumpF h (at_left tt)
cindex_pathE (part_circlepath z r st tt) z0 = cindexE st tt h
\<bar>Re z - Re z0\<bar> < r

goal (1 subgoal):
 1. \<lbrakk>real_of_int (cindex st tt h) = (if st < \<theta> \<and> \<theta> < tt then \<theta>_if else 0) + (if st < \<beta> \<and> \<beta> < tt then \<beta>_if else 0); cindexE st tt h = jumpF h (at_right st) + real_of_int (cindex st tt h) - jumpF h (at_left tt); real_of_int (cindex st tt h) = (if st < \<theta> \<and> \<theta> < tt then \<theta>_if else 0) + (if st < \<beta> \<and> \<beta> < tt then \<beta>_if else 0); cindexE st tt h = jumpF h (at_right st) + real_of_int (cindex st tt h) - jumpF h (at_left tt); real_of_int (cindex st tt h) = (if st < \<theta> \<and> \<theta> < tt then \<theta>_if else 0) + (if st < \<beta> \<and> \<beta> < tt then \<beta>_if else 0); cindexE st tt h = jumpF h (at_right st) + real_of_int (cindex st tt h) - jumpF h (at_left tt)\<rbrakk> \<Longrightarrow> cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then \<theta>_if else 0) + (if st < \<beta> \<and> \<beta> < tt then \<beta>_if else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<bar>Re z - Re z0\<bar> < r \<Longrightarrow> cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
r < \<bar>Re z - Re z0\<bar> \<Longrightarrow> cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
\<bar>Re z - Re z0\<bar> = r \<Longrightarrow> cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
\<bar>Re z - Re z0\<bar> < r \<Longrightarrow> cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
r < \<bar>Re z - Re z0\<bar> \<Longrightarrow> cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
\<bar>Re z - Re z0\<bar> = r \<Longrightarrow> cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
\<bar>Re z - Re z0\<bar> < r \<Longrightarrow> cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)

goal (1 subgoal):
 1. cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
cindex_pathE (part_circlepath z r st tt) z0 = (if \<bar>Re z - Re z0\<bar> < r then let \<theta> = arccos ((Re z0 - Re z) / r); \<beta> = 2 * pi - \<theta> in jumpF_pathstart (part_circlepath z r st tt) z0 + (if st < \<theta> \<and> \<theta> < tt then if Im z0 < r * sin \<theta> + Im z then - 1 else 1 else 0) + (if st < \<beta> \<and> \<beta> < tt then if Im z0 < r * sin \<beta> + Im z then 1 else - 1 else 0) - jumpF_pathfinish (part_circlepath z r st tt) z0 else if \<bar>Re z - Re z0\<bar> = r then jumpF_pathstart (part_circlepath z r st tt) z0 - jumpF_pathfinish (part_circlepath z r st tt) z0 else 0)

goal:
No subgoals!
[PROOF STEP]
qed