[STATEMENT]
lemma ceq_vector_fraction_iff [vector_add_divide_simps]:
  fixes x :: "'a :: complex_vector"
  shows "(x = (u / v) *\<^sub>C a) \<longleftrightarrow> (if v=0 then x = 0 else v *\<^sub>C x = u *\<^sub>C a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x = (u / v) *\<^sub>C a) = (if v = 0 then x = (0::'a) else v *\<^sub>C x = u *\<^sub>C a)
[PROOF STEP]
by auto (metis (no_types) divide_eq_1_iff divide_inverse_commute scaleC_one scaleC_scaleC)


[STATEMENT]
lemma finite_set_of_finite_maps':
    assumes "finite A" "finite B"
    shows "finite {m. dom m \<subseteq> A \<and> ran m \<subseteq> B}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {m. dom m \<subseteq> A \<and> ran m \<subseteq> B}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite {m. dom m \<subseteq> A \<and> ran m \<subseteq> B}
[PROOF STEP]
have "{m. dom m \<subseteq> A \<and> ran m \<subseteq> B} = (\<Union> \<A> \<in> Pow A. {m. dom m = \<A> \<and> ran m \<subseteq> B})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {m. dom m \<subseteq> A \<and> ran m \<subseteq> B} = (\<Union>\<A>\<in>Pow A. {m. dom m = \<A> \<and> ran m \<subseteq> B})
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{m. dom m \<subseteq> A \<and> ran m \<subseteq> B} = (\<Union>\<A>\<in>Pow A. {m. dom m = \<A> \<and> ran m \<subseteq> B})

goal (1 subgoal):
 1. finite {m. dom m \<subseteq> A \<and> ran m \<subseteq> B}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
{m. dom m \<subseteq> A \<and> ran m \<subseteq> B} = (\<Union>\<A>\<in>Pow A. {m. dom m = \<A> \<and> ran m \<subseteq> B})

goal (1 subgoal):
 1. finite {m. dom m \<subseteq> A \<and> ran m \<subseteq> B}
[PROOF STEP]
have "finite \<dots>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (\<Union>\<A>\<in>Pow A. {m. dom m = \<A> \<and> ran m \<subseteq> B})
[PROOF STEP]
using finite_subset assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?A \<subseteq> ?B; finite ?B\<rbrakk> \<Longrightarrow> finite ?A
finite A
finite B

goal (1 subgoal):
 1. finite (\<Union>\<A>\<in>Pow A. {m. dom m = \<A> \<and> ran m \<subseteq> B})
[PROOF STEP]
by (auto intro: finite_set_of_finite_maps)
[PROOF STATE]
proof (state)
this:
finite (\<Union>\<A>\<in>Pow A. {m. dom m = \<A> \<and> ran m \<subseteq> B})

goal (1 subgoal):
 1. finite {m. dom m \<subseteq> A \<and> ran m \<subseteq> B}
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
finite {m. dom m \<subseteq> A \<and> ran m \<subseteq> B}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
finite {m. dom m \<subseteq> A \<and> ran m \<subseteq> B}

goal (1 subgoal):
 1. finite {m. dom m \<subseteq> A \<and> ran m \<subseteq> B}
[PROOF STEP]
by this
[PROOF STATE]
proof (state)
this:
finite {m. dom m \<subseteq> A \<and> ran m \<subseteq> B}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma mod_0_imp_mod_pred: "
  \<lbrakk> 0 < (n::nat); n mod m = 0 \<rbrakk> \<Longrightarrow>
  (n - Suc 0) mod m = m - Suc 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < n; n mod m = 0\<rbrakk> \<Longrightarrow> (n - Suc 0) mod m = m - Suc 0
[PROOF STEP]
apply (case_tac "m = 0", simp_all)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < n; n mod m = 0; 0 < m\<rbrakk> \<Longrightarrow> (n - Suc 0) mod m = m - Suc 0
[PROOF STEP]
apply (simp only: Suc_le_eq[symmetric])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Suc 0 \<le> n; n mod m = 0; Suc 0 \<le> m\<rbrakk> \<Longrightarrow> (n - Suc 0) mod m = m - Suc 0
[PROOF STEP]
apply (simp only: mod_diff1_eq)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Suc 0 \<le> n; n mod m = 0; Suc 0 \<le> m\<rbrakk> \<Longrightarrow> (m + 0 - Suc 0 mod m) mod m = m - Suc 0
[PROOF STEP]
apply (case_tac "m = Suc 0")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>Suc 0 \<le> n; n mod m = 0; Suc 0 \<le> m; m = Suc 0\<rbrakk> \<Longrightarrow> (m + 0 - Suc 0 mod m) mod m = m - Suc 0
 2. \<lbrakk>Suc 0 \<le> n; n mod m = 0; Suc 0 \<le> m; m \<noteq> Suc 0\<rbrakk> \<Longrightarrow> (m + 0 - Suc 0 mod m) mod m = m - Suc 0
[PROOF STEP]
apply simp_all
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma irreflexiveLexLess:
  shows "(x, x) \<notin> lexLess"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x, x) \<notin> lexLess
[PROOF STEP]
using lexord_irreflexive[of "decisionLess" "x"] irreflexiveDecisionLess
[PROOF STATE]
proof (prove)
using this:
\<forall>x. (x, x) \<notin> decisionLess \<Longrightarrow> (x, x) \<notin> lexord decisionLess
(?x, ?x) \<notin> decisionLess

goal (1 subgoal):
 1. (x, x) \<notin> lexLess
[PROOF STEP]
unfolding lexLess_def
[PROOF STATE]
proof (prove)
using this:
\<forall>x. (x, x) \<notin> decisionLess \<Longrightarrow> (x, x) \<notin> lexord decisionLess
(?x, ?x) \<notin> decisionLess

goal (1 subgoal):
 1. (x, x) \<notin> {(M1, M2). (M2, M1) \<in> lexord decisionLess}
[PROOF STEP]
by auto


[STATEMENT]
lemma sin_npi [simp]: "sin (real n * pi) = 0"
  for n :: nat
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sin (real n * pi) = 0
[PROOF STEP]
by (induct n) (auto simp: distrib_right)


[STATEMENT]
lemma icard_Un_disjoint: "A \<inter> B = {} \<Longrightarrow> icard (A \<union> B) = icard A + icard B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<inter> B = {} \<Longrightarrow> icard (A \<union> B) = icard A + icard B
[PROOF STEP]
by (simp add: icard_Un_Int[of A])


[STATEMENT]
lemma count_list_ge_2_iff:
  assumes "y < z"
  assumes "z < length xs"
  assumes "xs ! y = xs ! z"
  shows "count_list xs (xs ! y) > 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 < count_list xs (xs ! y)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 1 < count_list xs (xs ! y)
[PROOF STEP]
have " 1 < card {k. k < length xs \<and> xs ! k = xs ! y}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 < card {k. k < length xs \<and> xs ! k = xs ! y}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
y < z
z < length xs
xs ! y = xs ! z

goal (1 subgoal):
 1. 1 < card {k. k < length xs \<and> xs ! k = xs ! y}
[PROOF STEP]
by (intro card_gr_1_iff[where x="y" and y="z"], auto)
[PROOF STATE]
proof (state)
this:
1 < card {k. k < length xs \<and> xs ! k = xs ! y}

goal (1 subgoal):
 1. 1 < count_list xs (xs ! y)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
1 < card {k. k < length xs \<and> xs ! k = xs ! y}

goal (1 subgoal):
 1. 1 < count_list xs (xs ! y)
[PROOF STEP]
by (simp add: count_list_card)
[PROOF STATE]
proof (state)
this:
1 < count_list xs (xs ! y)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma cos_60: "cos (pi / 3) = 1 / 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cos (pi / 3) = 1 / 2
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. cos (pi / 3) = 1 / 2
[PROOF STEP]
have "0 \<le> cos (pi / 3)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> cos (pi / 3)
[PROOF STEP]
by (rule cos_ge_zero) (use pi_half_ge_zero in \<open>linarith+\<close>)
[PROOF STATE]
proof (state)
this:
0 \<le> cos (pi / 3)

goal (1 subgoal):
 1. cos (pi / 3) = 1 / 2
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 \<le> cos (pi / 3)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
0 \<le> cos (pi / 3)

goal (1 subgoal):
 1. cos (pi / 3) = 1 / 2
[PROOF STEP]
by (simp add: cos_squared_eq sin_60 power_divide power2_eq_imp_eq)
[PROOF STATE]
proof (state)
this:
cos (pi / 3) = 1 / 2

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma cosh_real_nonneg_le_iff: "x \<ge> 0 \<Longrightarrow> y \<ge> 0 \<Longrightarrow> cosh x \<le> cosh y \<longleftrightarrow> x \<le> (y::real)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 \<le> x; 0 \<le> y\<rbrakk> \<Longrightarrow> (cosh x \<le> cosh y) = (x \<le> y)
[PROOF STEP]
using cosh_real_strict_mono[of x y] cosh_real_strict_mono[of y x]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 \<le> x; x < y\<rbrakk> \<Longrightarrow> cosh x < cosh y
\<lbrakk>0 \<le> y; y < x\<rbrakk> \<Longrightarrow> cosh y < cosh x

goal (1 subgoal):
 1. \<lbrakk>0 \<le> x; 0 \<le> y\<rbrakk> \<Longrightarrow> (cosh x \<le> cosh y) = (x \<le> y)
[PROOF STEP]
by (cases x y rule: linorder_cases) auto


[STATEMENT]
lemma simple_closed_path_wn3:
  fixes p :: "real \<Rightarrow> complex"
  assumes "simple_path p" and loop: "pathfinish p = pathstart p"
  obtains z where "z \<in> inside (path_image p)" "cmod (winding_number p z) = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have ins: "inside(path_image p) \<noteq> {}" "open(inside(path_image p))"
            "connected(inside(path_image p))"
   and out: "outside(path_image p) \<noteq> {}" "open(outside(path_image p))"
            "connected(outside(path_image p))"
   and bo:  "bounded(inside(path_image p))" "\<not> bounded(outside(path_image p))"
   and ins_out: "inside(path_image p) \<inter> outside(path_image p) = {}"
                "inside(path_image p) \<union> outside(path_image p) = - path_image p"
   and fro: "frontier(inside(path_image p)) = path_image p"
            "frontier(outside(path_image p)) = path_image p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((inside (path_image p) \<noteq> {} &&& open (inside (path_image p)) &&& connected (inside (path_image p))) &&& outside (path_image p) \<noteq> {} &&& open (outside (path_image p)) &&& connected (outside (path_image p))) &&& (bounded (inside (path_image p)) &&& \<not> bounded (outside (path_image p))) &&& (inside (path_image p) \<inter> outside (path_image p) = {} &&& inside (path_image p) \<union> outside (path_image p) = - path_image p) &&& frontier (inside (path_image p)) = path_image p &&& frontier (outside (path_image p)) = path_image p
[PROOF STEP]
using Jordan_inside_outside [OF assms]
[PROOF STATE]
proof (prove)
using this:
inside (path_image p) \<noteq> {} \<and> open (inside (path_image p)) \<and> connected (inside (path_image p)) \<and> outside (path_image p) \<noteq> {} \<and> open (outside (path_image p)) \<and> connected (outside (path_image p)) \<and> bounded (inside (path_image p)) \<and> \<not> bounded (outside (path_image p)) \<and> inside (path_image p) \<inter> outside (path_image p) = {} \<and> inside (path_image p) \<union> outside (path_image p) = - path_image p \<and> frontier (inside (path_image p)) = path_image p \<and> frontier (outside (path_image p)) = path_image p

goal (1 subgoal):
 1. ((inside (path_image p) \<noteq> {} &&& open (inside (path_image p)) &&& connected (inside (path_image p))) &&& outside (path_image p) \<noteq> {} &&& open (outside (path_image p)) &&& connected (outside (path_image p))) &&& (bounded (inside (path_image p)) &&& \<not> bounded (outside (path_image p))) &&& (inside (path_image p) \<inter> outside (path_image p) = {} &&& inside (path_image p) \<union> outside (path_image p) = - path_image p) &&& frontier (inside (path_image p)) = path_image p &&& frontier (outside (path_image p)) = path_image p
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
inside (path_image p) \<noteq> {}
open (inside (path_image p))
connected (inside (path_image p))
outside (path_image p) \<noteq> {}
open (outside (path_image p))
connected (outside (path_image p))
bounded (inside (path_image p))
\<not> bounded (outside (path_image p))
inside (path_image p) \<inter> outside (path_image p) = {}
inside (path_image p) \<union> outside (path_image p) = - path_image p
frontier (inside (path_image p)) = path_image p
frontier (outside (path_image p)) = path_image p

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
obtain a where a: "a \<in> inside(path_image p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>a. a \<in> inside (path_image p) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using \<open>inside (path_image p) \<noteq> {}\<close>
[PROOF STATE]
proof (prove)
using this:
inside (path_image p) \<noteq> {}

goal (1 subgoal):
 1. (\<And>a. a \<in> inside (path_image p) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
a \<in> inside (path_image p)

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
obtain d::real where "0 < d" and d_fro: "a - d \<in> frontier (inside (path_image p))"
                 and d_int: "\<And>\<epsilon>. \<lbrakk>0 \<le> \<epsilon>; \<epsilon> < d\<rbrakk> \<Longrightarrow> (a - \<epsilon>) \<in> inside (path_image p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>d. \<lbrakk>0 < d; a - complex_of_real d \<in> frontier (inside (path_image p)); \<And>\<epsilon>. \<lbrakk>0 \<le> \<epsilon>; \<epsilon> < d\<rbrakk> \<Longrightarrow> a - complex_of_real \<epsilon> \<in> inside (path_image p)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using ray_to_frontier [of "inside (path_image p)" a "-1"] bo ins a interior_eq
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>bounded (inside (path_image p)); a \<in> interior (inside (path_image p)); - 1 \<noteq> 0; \<And>d. \<lbrakk>0 < d; a + d *\<^sub>R - 1 \<in> frontier (inside (path_image p)); \<And>e. \<lbrakk>0 \<le> e; e < d\<rbrakk> \<Longrightarrow> a + e *\<^sub>R - 1 \<in> interior (inside (path_image p))\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis
bounded (inside (path_image p))
\<not> bounded (outside (path_image p))
inside (path_image p) \<noteq> {}
open (inside (path_image p))
connected (inside (path_image p))
a \<in> inside (path_image p)
(interior ?S = ?S) = open ?S

goal (1 subgoal):
 1. (\<And>d. \<lbrakk>0 < d; a - complex_of_real d \<in> frontier (inside (path_image p)); \<And>\<epsilon>. \<lbrakk>0 \<le> \<epsilon>; \<epsilon> < d\<rbrakk> \<Longrightarrow> a - complex_of_real \<epsilon> \<in> inside (path_image p)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis ab_group_add_class.ab_diff_conv_add_uminus of_real_def scale_minus_right zero_neq_neg_one)
[PROOF STATE]
proof (state)
this:
0 < d
a - complex_of_real d \<in> frontier (inside (path_image p))
\<lbrakk>0 \<le> ?\<epsilon>; ?\<epsilon> < d\<rbrakk> \<Longrightarrow> a - complex_of_real ?\<epsilon> \<in> inside (path_image p)

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
obtain e::real where "0 < e" and e_fro: "a + e \<in> frontier (inside (path_image p))"
    and e_int: "\<And>\<epsilon>. \<lbrakk>0 \<le> \<epsilon>; \<epsilon> < e\<rbrakk> \<Longrightarrow> (a + \<epsilon>) \<in> inside (path_image p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>e. \<lbrakk>0 < e; a + complex_of_real e \<in> frontier (inside (path_image p)); \<And>\<epsilon>. \<lbrakk>0 \<le> \<epsilon>; \<epsilon> < e\<rbrakk> \<Longrightarrow> a + complex_of_real \<epsilon> \<in> inside (path_image p)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using ray_to_frontier [of "inside (path_image p)" a 1] bo ins a interior_eq
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>bounded (inside (path_image p)); a \<in> interior (inside (path_image p)); 1 \<noteq> 0; \<And>d. \<lbrakk>0 < d; a + d *\<^sub>R 1 \<in> frontier (inside (path_image p)); \<And>e. \<lbrakk>0 \<le> e; e < d\<rbrakk> \<Longrightarrow> a + e *\<^sub>R 1 \<in> interior (inside (path_image p))\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis
bounded (inside (path_image p))
\<not> bounded (outside (path_image p))
inside (path_image p) \<noteq> {}
open (inside (path_image p))
connected (inside (path_image p))
a \<in> inside (path_image p)
(interior ?S = ?S) = open ?S

goal (1 subgoal):
 1. (\<And>e. \<lbrakk>0 < e; a + complex_of_real e \<in> frontier (inside (path_image p)); \<And>\<epsilon>. \<lbrakk>0 \<le> \<epsilon>; \<epsilon> < e\<rbrakk> \<Longrightarrow> a + complex_of_real \<epsilon> \<in> inside (path_image p)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis of_real_def zero_neq_one)
[PROOF STATE]
proof (state)
this:
0 < e
a + complex_of_real e \<in> frontier (inside (path_image p))
\<lbrakk>0 \<le> ?\<epsilon>; ?\<epsilon> < e\<rbrakk> \<Longrightarrow> a + complex_of_real ?\<epsilon> \<in> inside (path_image p)

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
obtain t0 where "0 \<le> t0" "t0 \<le> 1" and pt: "p t0 = a - d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>t0. \<lbrakk>0 \<le> t0; t0 \<le> 1; p t0 = a - complex_of_real d\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using a d_fro fro
[PROOF STATE]
proof (prove)
using this:
a \<in> inside (path_image p)
a - complex_of_real d \<in> frontier (inside (path_image p))
frontier (inside (path_image p)) = path_image p
frontier (outside (path_image p)) = path_image p

goal (1 subgoal):
 1. (\<And>t0. \<lbrakk>0 \<le> t0; t0 \<le> 1; p t0 = a - complex_of_real d\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: path_image_def)
[PROOF STATE]
proof (state)
this:
0 \<le> t0
t0 \<le> 1
p t0 = a - complex_of_real d

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
obtain q where "simple_path q" and q_ends: "pathstart q = a - d" "pathfinish q = a - d"
    and q_eq_p: "path_image q = path_image p"
    and wn_q_eq_wn_p: "\<And>z. z \<in> inside(path_image p) \<Longrightarrow> winding_number q z = winding_number p z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>q. \<lbrakk>simple_path q; pathstart q = a - complex_of_real d; pathfinish q = a - complex_of_real d; path_image q = path_image p; \<And>z. z \<in> inside (path_image p) \<Longrightarrow> winding_number q z = winding_number p z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. (\<And>q. \<lbrakk>simple_path q; pathstart q = a - complex_of_real d; pathfinish q = a - complex_of_real d; path_image q = path_image p; \<And>z. z \<in> inside (path_image p) \<Longrightarrow> winding_number q z = winding_number p z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> simple_path ?q2
 2. (\<And>q. \<lbrakk>simple_path q; pathstart q = a - complex_of_real d; pathfinish q = a - complex_of_real d; path_image q = path_image p; \<And>z. z \<in> inside (path_image p) \<Longrightarrow> winding_number q z = winding_number p z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> pathstart ?q2 = a - complex_of_real d
 3. (\<And>q. \<lbrakk>simple_path q; pathstart q = a - complex_of_real d; pathfinish q = a - complex_of_real d; path_image q = path_image p; \<And>z. z \<in> inside (path_image p) \<Longrightarrow> winding_number q z = winding_number p z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> pathfinish ?q2 = a - complex_of_real d
 4. (\<And>q. \<lbrakk>simple_path q; pathstart q = a - complex_of_real d; pathfinish q = a - complex_of_real d; path_image q = path_image p; \<And>z. z \<in> inside (path_image p) \<Longrightarrow> winding_number q z = winding_number p z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> path_image ?q2 = path_image p
 5. \<And>z. \<lbrakk>\<And>q. \<lbrakk>simple_path q; pathstart q = a - complex_of_real d; pathfinish q = a - complex_of_real d; path_image q = path_image p; \<And>z. z \<in> inside (path_image p) \<Longrightarrow> winding_number q z = winding_number p z\<rbrakk> \<Longrightarrow> thesis; z \<in> inside (path_image p)\<rbrakk> \<Longrightarrow> winding_number ?q2 z = winding_number p z
[PROOF STEP]
show "simple_path (shiftpath t0 p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. simple_path (shiftpath t0 p)
[PROOF STEP]
by (simp add: pathstart_shiftpath pathfinish_shiftpath
          simple_path_shiftpath path_image_shiftpath \<open>0 \<le> t0\<close> \<open>t0 \<le> 1\<close> assms)
[PROOF STATE]
proof (state)
this:
simple_path (shiftpath t0 p)

goal (4 subgoals):
 1. (\<And>q. \<lbrakk>simple_path q; pathstart q = a - complex_of_real d; pathfinish q = a - complex_of_real d; path_image q = path_image p; \<And>z. z \<in> inside (path_image p) \<Longrightarrow> winding_number q z = winding_number p z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> pathstart (shiftpath t0 p) = a - complex_of_real d
 2. (\<And>q. \<lbrakk>simple_path q; pathstart q = a - complex_of_real d; pathfinish q = a - complex_of_real d; path_image q = path_image p; \<And>z. z \<in> inside (path_image p) \<Longrightarrow> winding_number q z = winding_number p z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> pathfinish (shiftpath t0 p) = a - complex_of_real d
 3. (\<And>q. \<lbrakk>simple_path q; pathstart q = a - complex_of_real d; pathfinish q = a - complex_of_real d; path_image q = path_image p; \<And>z. z \<in> inside (path_image p) \<Longrightarrow> winding_number q z = winding_number p z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> path_image (shiftpath t0 p) = path_image p
 4. \<And>z. \<lbrakk>\<And>q. \<lbrakk>simple_path q; pathstart q = a - complex_of_real d; pathfinish q = a - complex_of_real d; path_image q = path_image p; \<And>z. z \<in> inside (path_image p) \<Longrightarrow> winding_number q z = winding_number p z\<rbrakk> \<Longrightarrow> thesis; z \<in> inside (path_image p)\<rbrakk> \<Longrightarrow> winding_number (shiftpath t0 p) z = winding_number p z
[PROOF STEP]
show "pathstart (shiftpath t0 p) = a - d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pathstart (shiftpath t0 p) = a - complex_of_real d
[PROOF STEP]
using pt
[PROOF STATE]
proof (prove)
using this:
p t0 = a - complex_of_real d

goal (1 subgoal):
 1. pathstart (shiftpath t0 p) = a - complex_of_real d
[PROOF STEP]
by (simp add: \<open>t0 \<le> 1\<close> pathstart_shiftpath)
[PROOF STATE]
proof (state)
this:
pathstart (shiftpath t0 p) = a - complex_of_real d

goal (3 subgoals):
 1. (\<And>q. \<lbrakk>simple_path q; pathstart q = a - complex_of_real d; pathfinish q = a - complex_of_real d; path_image q = path_image p; \<And>z. z \<in> inside (path_image p) \<Longrightarrow> winding_number q z = winding_number p z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> pathfinish (shiftpath t0 p) = a - complex_of_real d
 2. (\<And>q. \<lbrakk>simple_path q; pathstart q = a - complex_of_real d; pathfinish q = a - complex_of_real d; path_image q = path_image p; \<And>z. z \<in> inside (path_image p) \<Longrightarrow> winding_number q z = winding_number p z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> path_image (shiftpath t0 p) = path_image p
 3. \<And>z. \<lbrakk>\<And>q. \<lbrakk>simple_path q; pathstart q = a - complex_of_real d; pathfinish q = a - complex_of_real d; path_image q = path_image p; \<And>z. z \<in> inside (path_image p) \<Longrightarrow> winding_number q z = winding_number p z\<rbrakk> \<Longrightarrow> thesis; z \<in> inside (path_image p)\<rbrakk> \<Longrightarrow> winding_number (shiftpath t0 p) z = winding_number p z
[PROOF STEP]
show "pathfinish (shiftpath t0 p) = a - d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pathfinish (shiftpath t0 p) = a - complex_of_real d
[PROOF STEP]
by (simp add: \<open>0 \<le> t0\<close> loop pathfinish_shiftpath pt)
[PROOF STATE]
proof (state)
this:
pathfinish (shiftpath t0 p) = a - complex_of_real d

goal (2 subgoals):
 1. (\<And>q. \<lbrakk>simple_path q; pathstart q = a - complex_of_real d; pathfinish q = a - complex_of_real d; path_image q = path_image p; \<And>z. z \<in> inside (path_image p) \<Longrightarrow> winding_number q z = winding_number p z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> path_image (shiftpath t0 p) = path_image p
 2. \<And>z. \<lbrakk>\<And>q. \<lbrakk>simple_path q; pathstart q = a - complex_of_real d; pathfinish q = a - complex_of_real d; path_image q = path_image p; \<And>z. z \<in> inside (path_image p) \<Longrightarrow> winding_number q z = winding_number p z\<rbrakk> \<Longrightarrow> thesis; z \<in> inside (path_image p)\<rbrakk> \<Longrightarrow> winding_number (shiftpath t0 p) z = winding_number p z
[PROOF STEP]
show "path_image (shiftpath t0 p) = path_image p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_image (shiftpath t0 p) = path_image p
[PROOF STEP]
by (simp add: \<open>0 \<le> t0\<close> \<open>t0 \<le> 1\<close> loop path_image_shiftpath)
[PROOF STATE]
proof (state)
this:
path_image (shiftpath t0 p) = path_image p

goal (1 subgoal):
 1. \<And>z. \<lbrakk>\<And>q. \<lbrakk>simple_path q; pathstart q = a - complex_of_real d; pathfinish q = a - complex_of_real d; path_image q = path_image p; \<And>z. z \<in> inside (path_image p) \<Longrightarrow> winding_number q z = winding_number p z\<rbrakk> \<Longrightarrow> thesis; z \<in> inside (path_image p)\<rbrakk> \<Longrightarrow> winding_number (shiftpath t0 p) z = winding_number p z
[PROOF STEP]
show "winding_number (shiftpath t0 p) z = winding_number p z"
      if "z \<in> inside (path_image p)" for z
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. winding_number (shiftpath t0 p) z = winding_number p z
[PROOF STEP]
by (metis ComplD Un_iff \<open>0 \<le> t0\<close> \<open>t0 \<le> 1\<close> \<open>simple_path p\<close> atLeastAtMost_iff inside_Un_outside
          loop simple_path_imp_path that winding_number_shiftpath)
[PROOF STATE]
proof (state)
this:
?z \<in> inside (path_image p) \<Longrightarrow> winding_number (shiftpath t0 p) ?z = winding_number p ?z

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
simple_path q
pathstart q = a - complex_of_real d
pathfinish q = a - complex_of_real d
path_image q = path_image p
?z \<in> inside (path_image p) \<Longrightarrow> winding_number q ?z = winding_number p ?z

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have ad_not_ae: "a - d \<noteq> a + e"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a - complex_of_real d \<noteq> a + complex_of_real e
[PROOF STEP]
by (metis \<open>0 < d\<close> \<open>0 < e\<close> add.left_inverse add_left_cancel add_uminus_conv_diff
        le_add_same_cancel2 less_eq_real_def not_less of_real_add of_real_def of_real_eq_0_iff pt)
[PROOF STATE]
proof (state)
this:
a - complex_of_real d \<noteq> a + complex_of_real e

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have ad_ae_q: "{a - d, a + e} \<subseteq> path_image q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {a - complex_of_real d, a + complex_of_real e} \<subseteq> path_image q
[PROOF STEP]
using \<open>path_image q = path_image p\<close> d_fro e_fro fro(1)
[PROOF STATE]
proof (prove)
using this:
path_image q = path_image p
a - complex_of_real d \<in> frontier (inside (path_image p))
a + complex_of_real e \<in> frontier (inside (path_image p))
frontier (inside (path_image p)) = path_image p

goal (1 subgoal):
 1. {a - complex_of_real d, a + complex_of_real e} \<subseteq> path_image q
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{a - complex_of_real d, a + complex_of_real e} \<subseteq> path_image q

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have ada: "open_segment (a - d) a \<subseteq> inside (path_image p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. open_segment (a - complex_of_real d) a \<subseteq> inside (path_image p)
[PROOF STEP]
proof (clarsimp simp: in_segment)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>u. \<lbrakk>d \<noteq> 0; 0 < u; u < 1\<rbrakk> \<Longrightarrow> (1 - u) *\<^sub>R (a - complex_of_real d) + u *\<^sub>R a \<in> inside (path_image p)
[PROOF STEP]
fix u::real
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>u. \<lbrakk>d \<noteq> 0; 0 < u; u < 1\<rbrakk> \<Longrightarrow> (1 - u) *\<^sub>R (a - complex_of_real d) + u *\<^sub>R a \<in> inside (path_image p)
[PROOF STEP]
assume "0 < u" "u < 1"
[PROOF STATE]
proof (state)
this:
0 < u
u < 1

goal (1 subgoal):
 1. \<And>u. \<lbrakk>d \<noteq> 0; 0 < u; u < 1\<rbrakk> \<Longrightarrow> (1 - u) *\<^sub>R (a - complex_of_real d) + u *\<^sub>R a \<in> inside (path_image p)
[PROOF STEP]
with d_int
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>0 \<le> ?\<epsilon>; ?\<epsilon> < d\<rbrakk> \<Longrightarrow> a - complex_of_real ?\<epsilon> \<in> inside (path_image p)
0 < u
u < 1
[PROOF STEP]
have "a - (1 - u) * d \<in> inside (path_image p)"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 \<le> ?\<epsilon>; ?\<epsilon> < d\<rbrakk> \<Longrightarrow> a - complex_of_real ?\<epsilon> \<in> inside (path_image p)
0 < u
u < 1

goal (1 subgoal):
 1. a - complex_of_real ((1 - u) * d) \<in> inside (path_image p)
[PROOF STEP]
by (metis \<open>0 < d\<close> add.commute diff_add_cancel left_diff_distrib' less_add_same_cancel2 less_eq_real_def mult.left_neutral zero_less_mult_iff)
[PROOF STATE]
proof (state)
this:
a - complex_of_real ((1 - u) * d) \<in> inside (path_image p)

goal (1 subgoal):
 1. \<And>u. \<lbrakk>d \<noteq> 0; 0 < u; u < 1\<rbrakk> \<Longrightarrow> (1 - u) *\<^sub>R (a - complex_of_real d) + u *\<^sub>R a \<in> inside (path_image p)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a - complex_of_real ((1 - u) * d) \<in> inside (path_image p)
[PROOF STEP]
show "(1 - u) *\<^sub>R (a - d) + u *\<^sub>R a \<in> inside (path_image p)"
[PROOF STATE]
proof (prove)
using this:
a - complex_of_real ((1 - u) * d) \<in> inside (path_image p)

goal (1 subgoal):
 1. (1 - u) *\<^sub>R (a - complex_of_real d) + u *\<^sub>R a \<in> inside (path_image p)
[PROOF STEP]
by (simp add: diff_add_eq of_real_def real_vector.scale_right_diff_distrib)
[PROOF STATE]
proof (state)
this:
(1 - u) *\<^sub>R (a - complex_of_real d) + u *\<^sub>R a \<in> inside (path_image p)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
open_segment (a - complex_of_real d) a \<subseteq> inside (path_image p)

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have aae: "open_segment a (a + e) \<subseteq> inside (path_image p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. open_segment a (a + complex_of_real e) \<subseteq> inside (path_image p)
[PROOF STEP]
proof (clarsimp simp: in_segment)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>u. \<lbrakk>e \<noteq> 0; 0 < u; u < 1\<rbrakk> \<Longrightarrow> (1 - u) *\<^sub>R a + u *\<^sub>R (a + complex_of_real e) \<in> inside (path_image p)
[PROOF STEP]
fix u::real
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>u. \<lbrakk>e \<noteq> 0; 0 < u; u < 1\<rbrakk> \<Longrightarrow> (1 - u) *\<^sub>R a + u *\<^sub>R (a + complex_of_real e) \<in> inside (path_image p)
[PROOF STEP]
assume "0 < u" "u < 1"
[PROOF STATE]
proof (state)
this:
0 < u
u < 1

goal (1 subgoal):
 1. \<And>u. \<lbrakk>e \<noteq> 0; 0 < u; u < 1\<rbrakk> \<Longrightarrow> (1 - u) *\<^sub>R a + u *\<^sub>R (a + complex_of_real e) \<in> inside (path_image p)
[PROOF STEP]
with e_int
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>0 \<le> ?\<epsilon>; ?\<epsilon> < e\<rbrakk> \<Longrightarrow> a + complex_of_real ?\<epsilon> \<in> inside (path_image p)
0 < u
u < 1
[PROOF STEP]
have "a + u * e \<in> inside (path_image p)"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 \<le> ?\<epsilon>; ?\<epsilon> < e\<rbrakk> \<Longrightarrow> a + complex_of_real ?\<epsilon> \<in> inside (path_image p)
0 < u
u < 1

goal (1 subgoal):
 1. a + complex_of_real (u * e) \<in> inside (path_image p)
[PROOF STEP]
by (meson \<open>0 < e\<close> less_eq_real_def mult_less_cancel_right2 not_less zero_less_mult_iff)
[PROOF STATE]
proof (state)
this:
a + complex_of_real (u * e) \<in> inside (path_image p)

goal (1 subgoal):
 1. \<And>u. \<lbrakk>e \<noteq> 0; 0 < u; u < 1\<rbrakk> \<Longrightarrow> (1 - u) *\<^sub>R a + u *\<^sub>R (a + complex_of_real e) \<in> inside (path_image p)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a + complex_of_real (u * e) \<in> inside (path_image p)
[PROOF STEP]
show "(1 - u) *\<^sub>R a + u *\<^sub>R (a + e) \<in> inside (path_image p)"
[PROOF STATE]
proof (prove)
using this:
a + complex_of_real (u * e) \<in> inside (path_image p)

goal (1 subgoal):
 1. (1 - u) *\<^sub>R a + u *\<^sub>R (a + complex_of_real e) \<in> inside (path_image p)
[PROOF STEP]
by (metis (mono_tags, lifting) add.assoc of_real_mult pth_6 scaleR_collapse scaleR_conv_of_real)
[PROOF STATE]
proof (state)
this:
(1 - u) *\<^sub>R a + u *\<^sub>R (a + complex_of_real e) \<in> inside (path_image p)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
open_segment a (a + complex_of_real e) \<subseteq> inside (path_image p)

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have "complex_of_real (d * d + (e * e + d * (e + e))) \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real (d * d + (e * e + d * (e + e))) \<noteq> 0
[PROOF STEP]
using ad_not_ae
[PROOF STATE]
proof (prove)
using this:
a - complex_of_real d \<noteq> a + complex_of_real e

goal (1 subgoal):
 1. complex_of_real (d * d + (e * e + d * (e + e))) \<noteq> 0
[PROOF STEP]
by (metis \<open>0 < d\<close> \<open>0 < e\<close> add_strict_left_mono less_add_same_cancel1 not_sum_squares_lt_zero
        of_real_eq_0_iff zero_less_double_add_iff_zero_less_single_add zero_less_mult_iff)
[PROOF STATE]
proof (state)
this:
complex_of_real (d * d + (e * e + d * (e + e))) \<noteq> 0

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
complex_of_real (d * d + (e * e + d * (e + e))) \<noteq> 0

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have "\<exists>u>0. u < 1 \<and> d = u * d + u * e"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>u>0. u < 1 \<and> d = u * d + u * e
[PROOF STEP]
using \<open>0 < d\<close> \<open>0 < e\<close>
[PROOF STATE]
proof (prove)
using this:
0 < d
0 < e

goal (1 subgoal):
 1. \<exists>u>0. u < 1 \<and> d = u * d + u * e
[PROOF STEP]
by (rule_tac x="d / (d+e)" in exI) (simp add: divide_simps scaleR_conv_of_real flip: distrib_left)
[PROOF STATE]
proof (state)
this:
\<exists>u>0. u < 1 \<and> d = u * d + u * e

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
complex_of_real (d * d + (e * e + d * (e + e))) \<noteq> 0
\<exists>u>0. u < 1 \<and> d = u * d + u * e
[PROOF STEP]
have a_in_de: "a \<in> open_segment (a - d) (a + e)"
[PROOF STATE]
proof (prove)
using this:
complex_of_real (d * d + (e * e + d * (e + e))) \<noteq> 0
\<exists>u>0. u < 1 \<and> d = u * d + u * e

goal (1 subgoal):
 1. a \<in> open_segment (a - complex_of_real d) (a + complex_of_real e)
[PROOF STEP]
using ad_not_ae
[PROOF STATE]
proof (prove)
using this:
complex_of_real (d * d + (e * e + d * (e + e))) \<noteq> 0
\<exists>u>0. u < 1 \<and> d = u * d + u * e
a - complex_of_real d \<noteq> a + complex_of_real e

goal (1 subgoal):
 1. a \<in> open_segment (a - complex_of_real d) (a + complex_of_real e)
[PROOF STEP]
by (simp add: in_segment algebra_simps scaleR_conv_of_real flip: of_real_add of_real_mult)
[PROOF STATE]
proof (state)
this:
a \<in> open_segment (a - complex_of_real d) (a + complex_of_real e)

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<in> open_segment (a - complex_of_real d) (a + complex_of_real e)
[PROOF STEP]
have "open_segment (a - d) (a + e) \<subseteq> inside (path_image p)"
[PROOF STATE]
proof (prove)
using this:
a \<in> open_segment (a - complex_of_real d) (a + complex_of_real e)

goal (1 subgoal):
 1. open_segment (a - complex_of_real d) (a + complex_of_real e) \<subseteq> inside (path_image p)
[PROOF STEP]
using ada a aae Un_open_segment [of a "a-d" "a+e"]
[PROOF STATE]
proof (prove)
using this:
a \<in> open_segment (a - complex_of_real d) (a + complex_of_real e)
open_segment (a - complex_of_real d) a \<subseteq> inside (path_image p)
a \<in> inside (path_image p)
open_segment a (a + complex_of_real e) \<subseteq> inside (path_image p)
a \<in> open_segment (a - complex_of_real d) (a + complex_of_real e) \<Longrightarrow> open_segment (a - complex_of_real d) a \<union> {a} \<union> open_segment a (a + complex_of_real e) = open_segment (a - complex_of_real d) (a + complex_of_real e)

goal (1 subgoal):
 1. open_segment (a - complex_of_real d) (a + complex_of_real e) \<subseteq> inside (path_image p)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
open_segment (a - complex_of_real d) (a + complex_of_real e) \<subseteq> inside (path_image p)

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
open_segment (a - complex_of_real d) (a + complex_of_real e) \<subseteq> inside (path_image p)
[PROOF STEP]
have "path_image q \<inter> open_segment (a - d) (a + e) = {}"
[PROOF STATE]
proof (prove)
using this:
open_segment (a - complex_of_real d) (a + complex_of_real e) \<subseteq> inside (path_image p)

goal (1 subgoal):
 1. path_image q \<inter> open_segment (a - complex_of_real d) (a + complex_of_real e) = {}
[PROOF STEP]
using inside_no_overlap
[PROOF STATE]
proof (prove)
using this:
open_segment (a - complex_of_real d) (a + complex_of_real e) \<subseteq> inside (path_image p)
inside ?S \<inter> ?S = {}

goal (1 subgoal):
 1. path_image q \<inter> open_segment (a - complex_of_real d) (a + complex_of_real e) = {}
[PROOF STEP]
by (fastforce simp: q_eq_p)
[PROOF STATE]
proof (state)
this:
path_image q \<inter> open_segment (a - complex_of_real d) (a + complex_of_real e) = {}

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
with ad_ae_q
[PROOF STATE]
proof (chain)
picking this:
{a - complex_of_real d, a + complex_of_real e} \<subseteq> path_image q
path_image q \<inter> open_segment (a - complex_of_real d) (a + complex_of_real e) = {}
[PROOF STEP]
have paq_Int_cs: "path_image q \<inter> closed_segment (a - d) (a + e) = {a - d, a + e}"
[PROOF STATE]
proof (prove)
using this:
{a - complex_of_real d, a + complex_of_real e} \<subseteq> path_image q
path_image q \<inter> open_segment (a - complex_of_real d) (a + complex_of_real e) = {}

goal (1 subgoal):
 1. path_image q \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) = {a - complex_of_real d, a + complex_of_real e}
[PROOF STEP]
by (simp add: closed_segment_eq_open)
[PROOF STATE]
proof (state)
this:
path_image q \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) = {a - complex_of_real d, a + complex_of_real e}

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
obtain t where "0 \<le> t" "t \<le> 1" and qt: "q t = a + e"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>t. \<lbrakk>0 \<le> t; t \<le> 1; q t = a + complex_of_real e\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using a e_fro fro ad_ae_q
[PROOF STATE]
proof (prove)
using this:
a \<in> inside (path_image p)
a + complex_of_real e \<in> frontier (inside (path_image p))
frontier (inside (path_image p)) = path_image p
frontier (outside (path_image p)) = path_image p
{a - complex_of_real d, a + complex_of_real e} \<subseteq> path_image q

goal (1 subgoal):
 1. (\<And>t. \<lbrakk>0 \<le> t; t \<le> 1; q t = a + complex_of_real e\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: path_defs)
[PROOF STATE]
proof (state)
this:
0 \<le> t
t \<le> 1
q t = a + complex_of_real e

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 \<le> t
t \<le> 1
q t = a + complex_of_real e
[PROOF STEP]
have "t \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
0 \<le> t
t \<le> 1
q t = a + complex_of_real e

goal (1 subgoal):
 1. t \<noteq> 0
[PROOF STEP]
by (metis ad_not_ae pathstart_def q_ends(1))
[PROOF STATE]
proof (state)
this:
t \<noteq> 0

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
t \<noteq> 0
[PROOF STEP]
have "t \<noteq> 1"
[PROOF STATE]
proof (prove)
using this:
t \<noteq> 0

goal (1 subgoal):
 1. t \<noteq> 1
[PROOF STEP]
by (metis ad_not_ae pathfinish_def q_ends(2) qt)
[PROOF STATE]
proof (state)
this:
t \<noteq> 1

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have q01: "q 0 = a - d" "q 1 = a - d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. q 0 = a - complex_of_real d &&& q 1 = a - complex_of_real d
[PROOF STEP]
using q_ends
[PROOF STATE]
proof (prove)
using this:
pathstart q = a - complex_of_real d
pathfinish q = a - complex_of_real d

goal (1 subgoal):
 1. q 0 = a - complex_of_real d &&& q 1 = a - complex_of_real d
[PROOF STEP]
by (auto simp: pathstart_def pathfinish_def)
[PROOF STATE]
proof (state)
this:
q 0 = a - complex_of_real d
q 1 = a - complex_of_real d

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
obtain z where zin: "z \<in> inside (path_image (subpath t 0 q +++ linepath (a - d) (a + e)))"
             and z1: "cmod (winding_number (subpath t 0 q +++ linepath (a - d) (a + e)) z) = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e))); cmod (winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
proof (rule simple_closed_path_wn2 [of d e "subpath t 0 q" a], simp_all add: q01)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e))); cmod (winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> 0 < d
 2. (\<And>z. \<lbrakk>z \<in> inside (path_image (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e))); cmod (winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> 0 < e
 3. (\<And>z. \<lbrakk>z \<in> inside (path_image (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e))); cmod (winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> simple_path (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e))
 4. (\<And>z. \<lbrakk>z \<in> inside (path_image (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e))); cmod (winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> q t = a + complex_of_real e
[PROOF STEP]
show "simple_path (subpath t 0 q +++ linepath (a - d) (a + e))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. simple_path (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e))
[PROOF STEP]
proof (rule simple_path_join_loop, simp_all add: qt q01)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. arc (subpath t 0 q)
 2. arc (linepath (a - complex_of_real d) (a + complex_of_real e))
 3. path_image (subpath t 0 q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) \<subseteq> {a + complex_of_real e, a - complex_of_real d}
[PROOF STEP]
have "inj_on q (closed_segment t 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on q (closed_segment t 0)
[PROOF STEP]
using \<open>0 \<le> t\<close> \<open>simple_path q\<close> \<open>t \<le> 1\<close> \<open>t \<noteq> 0\<close> \<open>t \<noteq> 1\<close>
[PROOF STATE]
proof (prove)
using this:
0 \<le> t
simple_path q
t \<le> 1
t \<noteq> 0
t \<noteq> 1

goal (1 subgoal):
 1. inj_on q (closed_segment t 0)
[PROOF STEP]
by (fastforce simp: simple_path_def inj_on_def closed_segment_eq_real_ivl)
[PROOF STATE]
proof (state)
this:
inj_on q (closed_segment t 0)

goal (3 subgoals):
 1. arc (subpath t 0 q)
 2. arc (linepath (a - complex_of_real d) (a + complex_of_real e))
 3. path_image (subpath t 0 q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) \<subseteq> {a + complex_of_real e, a - complex_of_real d}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
inj_on q (closed_segment t 0)
[PROOF STEP]
show "arc (subpath t 0 q)"
[PROOF STATE]
proof (prove)
using this:
inj_on q (closed_segment t 0)

goal (1 subgoal):
 1. arc (subpath t 0 q)
[PROOF STEP]
using \<open>0 \<le> t\<close> \<open>simple_path q\<close> \<open>t \<le> 1\<close> \<open>t \<noteq> 0\<close>
[PROOF STATE]
proof (prove)
using this:
inj_on q (closed_segment t 0)
0 \<le> t
simple_path q
t \<le> 1
t \<noteq> 0

goal (1 subgoal):
 1. arc (subpath t 0 q)
[PROOF STEP]
by (simp add: arc_subpath_eq simple_path_imp_path)
[PROOF STATE]
proof (state)
this:
arc (subpath t 0 q)

goal (2 subgoals):
 1. arc (linepath (a - complex_of_real d) (a + complex_of_real e))
 2. path_image (subpath t 0 q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) \<subseteq> {a + complex_of_real e, a - complex_of_real d}
[PROOF STEP]
show "arc (linepath (a - d) (a + e))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. arc (linepath (a - complex_of_real d) (a + complex_of_real e))
[PROOF STEP]
by (simp add: ad_not_ae)
[PROOF STATE]
proof (state)
this:
arc (linepath (a - complex_of_real d) (a + complex_of_real e))

goal (1 subgoal):
 1. path_image (subpath t 0 q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) \<subseteq> {a + complex_of_real e, a - complex_of_real d}
[PROOF STEP]
show "path_image (subpath t 0 q) \<inter> closed_segment (a - d) (a + e) \<subseteq> {a + e, a - d}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_image (subpath t 0 q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) \<subseteq> {a + complex_of_real e, a - complex_of_real d}
[PROOF STEP]
using qt paq_Int_cs  \<open>simple_path q\<close> \<open>0 \<le> t\<close> \<open>t \<le> 1\<close>
[PROOF STATE]
proof (prove)
using this:
q t = a + complex_of_real e
path_image q \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) = {a - complex_of_real d, a + complex_of_real e}
simple_path q
0 \<le> t
t \<le> 1

goal (1 subgoal):
 1. path_image (subpath t 0 q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) \<subseteq> {a + complex_of_real e, a - complex_of_real d}
[PROOF STEP]
by (force simp: dest: rev_subsetD [OF _ path_image_subpath_subset] intro: simple_path_imp_path)
[PROOF STATE]
proof (state)
this:
path_image (subpath t 0 q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) \<subseteq> {a + complex_of_real e, a - complex_of_real d}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
simple_path (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e))

goal (3 subgoals):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e))); cmod (winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> 0 < d
 2. (\<And>z. \<lbrakk>z \<in> inside (path_image (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e))); cmod (winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> 0 < e
 3. (\<And>z. \<lbrakk>z \<in> inside (path_image (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e))); cmod (winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> q t = a + complex_of_real e
[PROOF STEP]
qed (auto simp: \<open>0 < d\<close> \<open>0 < e\<close> qt)
[PROOF STATE]
proof (state)
this:
z \<in> inside (path_image (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)))
cmod (winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z) = 1

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have pa01_Un: "path_image (subpath 0 t q) \<union> path_image (subpath 1 t q) = path_image q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_image (subpath 0 t q) \<union> path_image (subpath 1 t q) = path_image q
[PROOF STEP]
unfolding path_image_subpath
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (if 0 \<le> t then q ` {0..t} else q ` {t..0}) \<union> (if 1 \<le> t then q ` {1..t} else q ` {t..1}) = path_image q
[PROOF STEP]
using \<open>0 \<le> t\<close> \<open>t \<le> 1\<close>
[PROOF STATE]
proof (prove)
using this:
0 \<le> t
t \<le> 1

goal (1 subgoal):
 1. (if 0 \<le> t then q ` {0..t} else q ` {t..0}) \<union> (if 1 \<le> t then q ` {1..t} else q ` {t..1}) = path_image q
[PROOF STEP]
by (force simp: path_image_def image_iff)
[PROOF STATE]
proof (state)
this:
path_image (subpath 0 t q) \<union> path_image (subpath 1 t q) = path_image q

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
with paq_Int_cs
[PROOF STATE]
proof (chain)
picking this:
path_image q \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) = {a - complex_of_real d, a + complex_of_real e}
path_image (subpath 0 t q) \<union> path_image (subpath 1 t q) = path_image q
[PROOF STEP]
have pa_01q:
        "(path_image (subpath 0 t q) \<union> path_image (subpath 1 t q)) \<inter> closed_segment (a - d) (a + e) = {a - d, a + e}"
[PROOF STATE]
proof (prove)
using this:
path_image q \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) = {a - complex_of_real d, a + complex_of_real e}
path_image (subpath 0 t q) \<union> path_image (subpath 1 t q) = path_image q

goal (1 subgoal):
 1. (path_image (subpath 0 t q) \<union> path_image (subpath 1 t q)) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) = {a - complex_of_real d, a + complex_of_real e}
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
(path_image (subpath 0 t q) \<union> path_image (subpath 1 t q)) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) = {a - complex_of_real d, a + complex_of_real e}

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have z_notin_ed: "z \<notin> closed_segment (a + e) (a - d)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z \<notin> closed_segment (a + complex_of_real e) (a - complex_of_real d)
[PROOF STEP]
using zin q01
[PROOF STATE]
proof (prove)
using this:
z \<in> inside (path_image (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)))
q 0 = a - complex_of_real d
q 1 = a - complex_of_real d

goal (1 subgoal):
 1. z \<notin> closed_segment (a + complex_of_real e) (a - complex_of_real d)
[PROOF STEP]
by (simp add: path_image_join closed_segment_commute inside_def)
[PROOF STATE]
proof (state)
this:
z \<notin> closed_segment (a + complex_of_real e) (a - complex_of_real d)

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have z_notin_0t: "z \<notin> path_image (subpath 0 t q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z \<notin> path_image (subpath 0 t q)
[PROOF STEP]
by (metis (no_types, opaque_lifting) IntI Un_upper1 subsetD empty_iff inside_no_overlap path_image_join
        path_image_subpath_commute pathfinish_subpath pathstart_def pathstart_linepath q_ends(1) qt subpath_trivial zin)
[PROOF STATE]
proof (state)
this:
z \<notin> path_image (subpath 0 t q)

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have [simp]: "- winding_number (subpath t 0 q) z = winding_number (subpath 0 t q) z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - winding_number (subpath t 0 q) z = winding_number (subpath 0 t q) z
[PROOF STEP]
by (metis \<open>0 \<le> t\<close> \<open>simple_path q\<close> \<open>t \<le> 1\<close> atLeastAtMost_iff zero_le_one
              path_image_subpath_commute path_subpath real_eq_0_iff_le_ge_0
              reversepath_subpath simple_path_imp_path winding_number_reversepath z_notin_0t)
[PROOF STATE]
proof (state)
this:
- winding_number (subpath t 0 q) z = winding_number (subpath 0 t q) z

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
obtain z_in_q: "z \<in> inside(path_image q)"
     and wn_q: "winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - d) (a + e)) z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
proof (rule winding_number_from_innerpath
          [of "subpath 0 t q" "a-d" "a+e" "subpath 1 t q" "linepath (a - d) (a + e)"
            z "- winding_number (subpath t 0 q +++ linepath (a - d) (a + e)) z"],
         simp_all add: q01 qt pa01_Un reversepath_subpath)
[PROOF STATE]
proof (state)
goal (11 subgoals):
 1. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> simple_path (subpath 0 t q)
 2. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> simple_path (subpath 1 t q)
 3. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> simple_path (linepath (a - complex_of_real d) (a + complex_of_real e))
 4. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> path_image (subpath 0 t q) \<inter> path_image (subpath 1 t q) = {a - complex_of_real d, a + complex_of_real e}
 5. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> path_image (subpath 0 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) = {a - complex_of_real d, a + complex_of_real e}
 6. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> path_image (subpath 1 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) = {a - complex_of_real d, a + complex_of_real e}
 7. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> closed_segment (a - complex_of_real d) (a + complex_of_real e) \<inter> inside (path_image q) \<noteq> {}
 8. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> z \<in> inside (path_image (subpath 0 t q) \<union> closed_segment (a - complex_of_real d) (a + complex_of_real e))
 9. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> winding_number (subpath 0 t q +++ linepath (a + complex_of_real e) (a - complex_of_real d)) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z
 10. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> - d \<noteq> e
A total of 11 subgoals...
[PROOF STEP]
show "simple_path (subpath 0 t q)" "simple_path (subpath 1 t q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. simple_path (subpath 0 t q) &&& simple_path (subpath 1 t q)
[PROOF STEP]
by (simp_all add: \<open>0 \<le> t\<close> \<open>simple_path q\<close> \<open>t \<le> 1\<close> \<open>t \<noteq> 0\<close> \<open>t \<noteq> 1\<close> simple_path_subpath)
[PROOF STATE]
proof (state)
this:
simple_path (subpath 0 t q)
simple_path (subpath 1 t q)

goal (9 subgoals):
 1. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> simple_path (linepath (a - complex_of_real d) (a + complex_of_real e))
 2. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> path_image (subpath 0 t q) \<inter> path_image (subpath 1 t q) = {a - complex_of_real d, a + complex_of_real e}
 3. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> path_image (subpath 0 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) = {a - complex_of_real d, a + complex_of_real e}
 4. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> path_image (subpath 1 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) = {a - complex_of_real d, a + complex_of_real e}
 5. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> closed_segment (a - complex_of_real d) (a + complex_of_real e) \<inter> inside (path_image q) \<noteq> {}
 6. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> z \<in> inside (path_image (subpath 0 t q) \<union> closed_segment (a - complex_of_real d) (a + complex_of_real e))
 7. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> winding_number (subpath 0 t q +++ linepath (a + complex_of_real e) (a - complex_of_real d)) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z
 8. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> - d \<noteq> e
 9. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z \<noteq> 0
[PROOF STEP]
show "simple_path (linepath (a - d) (a + e))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. simple_path (linepath (a - complex_of_real d) (a + complex_of_real e))
[PROOF STEP]
using ad_not_ae
[PROOF STATE]
proof (prove)
using this:
a - complex_of_real d \<noteq> a + complex_of_real e

goal (1 subgoal):
 1. simple_path (linepath (a - complex_of_real d) (a + complex_of_real e))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
simple_path (linepath (a - complex_of_real d) (a + complex_of_real e))

goal (8 subgoals):
 1. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> path_image (subpath 0 t q) \<inter> path_image (subpath 1 t q) = {a - complex_of_real d, a + complex_of_real e}
 2. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> path_image (subpath 0 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) = {a - complex_of_real d, a + complex_of_real e}
 3. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> path_image (subpath 1 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) = {a - complex_of_real d, a + complex_of_real e}
 4. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> closed_segment (a - complex_of_real d) (a + complex_of_real e) \<inter> inside (path_image q) \<noteq> {}
 5. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> z \<in> inside (path_image (subpath 0 t q) \<union> closed_segment (a - complex_of_real d) (a + complex_of_real e))
 6. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> winding_number (subpath 0 t q +++ linepath (a + complex_of_real e) (a - complex_of_real d)) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z
 7. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> - d \<noteq> e
 8. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z \<noteq> 0
[PROOF STEP]
show "path_image (subpath 0 t q) \<inter> path_image (subpath 1 t q) = {a - d, a + e}"  (is "?lhs = ?rhs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_image (subpath 0 t q) \<inter> path_image (subpath 1 t q) = {a - complex_of_real d, a + complex_of_real e}
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. path_image (subpath 0 t q) \<inter> path_image (subpath 1 t q) \<subseteq> {a - complex_of_real d, a + complex_of_real e}
 2. {a - complex_of_real d, a + complex_of_real e} \<subseteq> path_image (subpath 0 t q) \<inter> path_image (subpath 1 t q)
[PROOF STEP]
show "?lhs \<subseteq> ?rhs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_image (subpath 0 t q) \<inter> path_image (subpath 1 t q) \<subseteq> {a - complex_of_real d, a + complex_of_real e}
[PROOF STEP]
using \<open>0 \<le> t\<close> \<open>simple_path q\<close> \<open>t \<le> 1\<close> \<open>t \<noteq> 1\<close> q_ends qt q01
[PROOF STATE]
proof (prove)
using this:
0 \<le> t
simple_path q
t \<le> 1
t \<noteq> 1
pathstart q = a - complex_of_real d
pathfinish q = a - complex_of_real d
q t = a + complex_of_real e
q 0 = a - complex_of_real d
q 1 = a - complex_of_real d

goal (1 subgoal):
 1. path_image (subpath 0 t q) \<inter> path_image (subpath 1 t q) \<subseteq> {a - complex_of_real d, a + complex_of_real e}
[PROOF STEP]
by (force simp: pathfinish_def qt simple_path_def path_image_subpath)
[PROOF STATE]
proof (state)
this:
path_image (subpath 0 t q) \<inter> path_image (subpath 1 t q) \<subseteq> {a - complex_of_real d, a + complex_of_real e}

goal (1 subgoal):
 1. {a - complex_of_real d, a + complex_of_real e} \<subseteq> path_image (subpath 0 t q) \<inter> path_image (subpath 1 t q)
[PROOF STEP]
show "?rhs \<subseteq> ?lhs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {a - complex_of_real d, a + complex_of_real e} \<subseteq> path_image (subpath 0 t q) \<inter> path_image (subpath 1 t q)
[PROOF STEP]
using \<open>0 \<le> t\<close> \<open>t \<le> 1\<close> q01 qt
[PROOF STATE]
proof (prove)
using this:
0 \<le> t
t \<le> 1
q 0 = a - complex_of_real d
q 1 = a - complex_of_real d
q t = a + complex_of_real e

goal (1 subgoal):
 1. {a - complex_of_real d, a + complex_of_real e} \<subseteq> path_image (subpath 0 t q) \<inter> path_image (subpath 1 t q)
[PROOF STEP]
by (force simp: path_image_subpath)
[PROOF STATE]
proof (state)
this:
{a - complex_of_real d, a + complex_of_real e} \<subseteq> path_image (subpath 0 t q) \<inter> path_image (subpath 1 t q)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
path_image (subpath 0 t q) \<inter> path_image (subpath 1 t q) = {a - complex_of_real d, a + complex_of_real e}

goal (7 subgoals):
 1. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> path_image (subpath 0 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) = {a - complex_of_real d, a + complex_of_real e}
 2. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> path_image (subpath 1 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) = {a - complex_of_real d, a + complex_of_real e}
 3. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> closed_segment (a - complex_of_real d) (a + complex_of_real e) \<inter> inside (path_image q) \<noteq> {}
 4. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> z \<in> inside (path_image (subpath 0 t q) \<union> closed_segment (a - complex_of_real d) (a + complex_of_real e))
 5. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> winding_number (subpath 0 t q +++ linepath (a + complex_of_real e) (a - complex_of_real d)) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z
 6. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> - d \<noteq> e
 7. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z \<noteq> 0
[PROOF STEP]
show "path_image (subpath 0 t q) \<inter> closed_segment (a - d) (a + e) = {a - d, a + e}" (is "?lhs = ?rhs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_image (subpath 0 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) = {a - complex_of_real d, a + complex_of_real e}
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. path_image (subpath 0 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) \<subseteq> {a - complex_of_real d, a + complex_of_real e}
 2. {a - complex_of_real d, a + complex_of_real e} \<subseteq> path_image (subpath 0 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e)
[PROOF STEP]
show "?lhs \<subseteq> ?rhs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_image (subpath 0 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) \<subseteq> {a - complex_of_real d, a + complex_of_real e}
[PROOF STEP]
using paq_Int_cs pa01_Un
[PROOF STATE]
proof (prove)
using this:
path_image q \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) = {a - complex_of_real d, a + complex_of_real e}
path_image (subpath 0 t q) \<union> path_image (subpath 1 t q) = path_image q

goal (1 subgoal):
 1. path_image (subpath 0 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) \<subseteq> {a - complex_of_real d, a + complex_of_real e}
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
path_image (subpath 0 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) \<subseteq> {a - complex_of_real d, a + complex_of_real e}

goal (1 subgoal):
 1. {a - complex_of_real d, a + complex_of_real e} \<subseteq> path_image (subpath 0 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e)
[PROOF STEP]
show "?rhs \<subseteq> ?lhs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {a - complex_of_real d, a + complex_of_real e} \<subseteq> path_image (subpath 0 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e)
[PROOF STEP]
using \<open>0 \<le> t\<close> \<open>t \<le> 1\<close> q01 qt
[PROOF STATE]
proof (prove)
using this:
0 \<le> t
t \<le> 1
q 0 = a - complex_of_real d
q 1 = a - complex_of_real d
q t = a + complex_of_real e

goal (1 subgoal):
 1. {a - complex_of_real d, a + complex_of_real e} \<subseteq> path_image (subpath 0 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e)
[PROOF STEP]
by (force simp: path_image_subpath)
[PROOF STATE]
proof (state)
this:
{a - complex_of_real d, a + complex_of_real e} \<subseteq> path_image (subpath 0 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
path_image (subpath 0 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) = {a - complex_of_real d, a + complex_of_real e}

goal (6 subgoals):
 1. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> path_image (subpath 1 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) = {a - complex_of_real d, a + complex_of_real e}
 2. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> closed_segment (a - complex_of_real d) (a + complex_of_real e) \<inter> inside (path_image q) \<noteq> {}
 3. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> z \<in> inside (path_image (subpath 0 t q) \<union> closed_segment (a - complex_of_real d) (a + complex_of_real e))
 4. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> winding_number (subpath 0 t q +++ linepath (a + complex_of_real e) (a - complex_of_real d)) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z
 5. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> - d \<noteq> e
 6. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z \<noteq> 0
[PROOF STEP]
show "path_image (subpath 1 t q) \<inter> closed_segment (a - d) (a + e) = {a - d, a + e}" (is "?lhs = ?rhs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_image (subpath 1 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) = {a - complex_of_real d, a + complex_of_real e}
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. path_image (subpath 1 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) \<subseteq> {a - complex_of_real d, a + complex_of_real e}
 2. {a - complex_of_real d, a + complex_of_real e} \<subseteq> path_image (subpath 1 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e)
[PROOF STEP]
show "?lhs \<subseteq> ?rhs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_image (subpath 1 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) \<subseteq> {a - complex_of_real d, a + complex_of_real e}
[PROOF STEP]
by (auto simp: pa_01q [symmetric])
[PROOF STATE]
proof (state)
this:
path_image (subpath 1 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) \<subseteq> {a - complex_of_real d, a + complex_of_real e}

goal (1 subgoal):
 1. {a - complex_of_real d, a + complex_of_real e} \<subseteq> path_image (subpath 1 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e)
[PROOF STEP]
show "?rhs \<subseteq> ?lhs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {a - complex_of_real d, a + complex_of_real e} \<subseteq> path_image (subpath 1 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e)
[PROOF STEP]
using \<open>0 \<le> t\<close> \<open>t \<le> 1\<close> q01 qt
[PROOF STATE]
proof (prove)
using this:
0 \<le> t
t \<le> 1
q 0 = a - complex_of_real d
q 1 = a - complex_of_real d
q t = a + complex_of_real e

goal (1 subgoal):
 1. {a - complex_of_real d, a + complex_of_real e} \<subseteq> path_image (subpath 1 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e)
[PROOF STEP]
by (force simp: path_image_subpath)
[PROOF STATE]
proof (state)
this:
{a - complex_of_real d, a + complex_of_real e} \<subseteq> path_image (subpath 1 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
path_image (subpath 1 t q) \<inter> closed_segment (a - complex_of_real d) (a + complex_of_real e) = {a - complex_of_real d, a + complex_of_real e}

goal (5 subgoals):
 1. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> closed_segment (a - complex_of_real d) (a + complex_of_real e) \<inter> inside (path_image q) \<noteq> {}
 2. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> z \<in> inside (path_image (subpath 0 t q) \<union> closed_segment (a - complex_of_real d) (a + complex_of_real e))
 3. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> winding_number (subpath 0 t q +++ linepath (a + complex_of_real e) (a - complex_of_real d)) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z
 4. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> - d \<noteq> e
 5. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z \<noteq> 0
[PROOF STEP]
show "closed_segment (a - d) (a + e) \<inter> inside (path_image q) \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. closed_segment (a - complex_of_real d) (a + complex_of_real e) \<inter> inside (path_image q) \<noteq> {}
[PROOF STEP]
using a a_in_de open_closed_segment pa01_Un q_eq_p
[PROOF STATE]
proof (prove)
using this:
a \<in> inside (path_image p)
a \<in> open_segment (a - complex_of_real d) (a + complex_of_real e)
?u \<in> open_segment ?w ?z \<Longrightarrow> ?u \<in> closed_segment ?w ?z
path_image (subpath 0 t q) \<union> path_image (subpath 1 t q) = path_image q
path_image q = path_image p

goal (1 subgoal):
 1. closed_segment (a - complex_of_real d) (a + complex_of_real e) \<inter> inside (path_image q) \<noteq> {}
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
closed_segment (a - complex_of_real d) (a + complex_of_real e) \<inter> inside (path_image q) \<noteq> {}

goal (4 subgoals):
 1. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> z \<in> inside (path_image (subpath 0 t q) \<union> closed_segment (a - complex_of_real d) (a + complex_of_real e))
 2. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> winding_number (subpath 0 t q +++ linepath (a + complex_of_real e) (a - complex_of_real d)) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z
 3. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> - d \<noteq> e
 4. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z \<noteq> 0
[PROOF STEP]
show "z \<in> inside (path_image (subpath 0 t q) \<union> closed_segment (a - d) (a + e))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z \<in> inside (path_image (subpath 0 t q) \<union> closed_segment (a - complex_of_real d) (a + complex_of_real e))
[PROOF STEP]
by (metis path_image_join path_image_linepath path_image_subpath_commute pathfinish_subpath pathstart_linepath q01(1) zin)
[PROOF STATE]
proof (state)
this:
z \<in> inside (path_image (subpath 0 t q) \<union> closed_segment (a - complex_of_real d) (a + complex_of_real e))

goal (3 subgoals):
 1. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> winding_number (subpath 0 t q +++ linepath (a + complex_of_real e) (a - complex_of_real d)) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z
 2. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> - d \<noteq> e
 3. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z \<noteq> 0
[PROOF STEP]
show "winding_number (subpath 0 t q +++ linepath (a + e) (a - d)) z =
      - winding_number (subpath t 0 q +++ linepath (a - d) (a + e)) z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. winding_number (subpath 0 t q +++ linepath (a + complex_of_real e) (a - complex_of_real d)) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z
[PROOF STEP]
using z_notin_ed z_notin_0t \<open>0 \<le> t\<close> \<open>simple_path q\<close> \<open>t \<le> 1\<close>
[PROOF STATE]
proof (prove)
using this:
z \<notin> closed_segment (a + complex_of_real e) (a - complex_of_real d)
z \<notin> path_image (subpath 0 t q)
0 \<le> t
simple_path q
t \<le> 1

goal (1 subgoal):
 1. winding_number (subpath 0 t q +++ linepath (a + complex_of_real e) (a - complex_of_real d)) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z
[PROOF STEP]
by (simp add: simple_path_imp_path qt q01 path_image_subpath_commute closed_segment_commute winding_number_join winding_number_reversepath [symmetric])
[PROOF STATE]
proof (state)
this:
winding_number (subpath 0 t q +++ linepath (a + complex_of_real e) (a - complex_of_real d)) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z

goal (2 subgoals):
 1. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> - d \<noteq> e
 2. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z \<noteq> 0
[PROOF STEP]
show "- d \<noteq> e"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - d \<noteq> e
[PROOF STEP]
using ad_not_ae
[PROOF STATE]
proof (prove)
using this:
a - complex_of_real d \<noteq> a + complex_of_real e

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

goal (1 subgoal):
 1. (\<lbrakk>z \<in> inside (path_image q); winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z \<noteq> 0
[PROOF STEP]
show "winding_number (subpath t 0 q +++ linepath (a - d) (a + e)) z \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z \<noteq> 0
[PROOF STEP]
using z1
[PROOF STATE]
proof (prove)
using this:
cmod (winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z) = 1

goal (1 subgoal):
 1. winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z \<noteq> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z \<noteq> 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
z \<in> inside (path_image q)
winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> inside (path_image p); cmod (winding_number p z) = 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. thesis
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?z \<in> inside (path_image p)
 2. cmod (winding_number p ?z) = 1
[PROOF STEP]
show "z \<in> inside (path_image p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z \<in> inside (path_image p)
[PROOF STEP]
using q_eq_p z_in_q
[PROOF STATE]
proof (prove)
using this:
path_image q = path_image p
z \<in> inside (path_image q)

goal (1 subgoal):
 1. z \<in> inside (path_image p)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
z \<in> inside (path_image p)

goal (1 subgoal):
 1. cmod (winding_number p z) = 1
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
z \<in> inside (path_image p)
[PROOF STEP]
have [simp]: "z \<notin> path_image q"
[PROOF STATE]
proof (prove)
using this:
z \<in> inside (path_image p)

goal (1 subgoal):
 1. z \<notin> path_image q
[PROOF STEP]
by (metis disjoint_iff_not_equal inside_no_overlap q_eq_p)
[PROOF STATE]
proof (state)
this:
z \<notin> path_image q

goal (1 subgoal):
 1. cmod (winding_number p z) = 1
[PROOF STEP]
have [simp]: "z \<notin> path_image (subpath 1 t q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z \<notin> path_image (subpath 1 t q)
[PROOF STEP]
using inside_def pa01_Un z_in_q
[PROOF STATE]
proof (prove)
using this:
inside ?S \<equiv> {x. x \<notin> ?S \<and> bounded (connected_component_set (- ?S) x)}
path_image (subpath 0 t q) \<union> path_image (subpath 1 t q) = path_image q
z \<in> inside (path_image q)

goal (1 subgoal):
 1. z \<notin> path_image (subpath 1 t q)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
z \<notin> path_image (subpath 1 t q)

goal (1 subgoal):
 1. cmod (winding_number p z) = 1
[PROOF STEP]
have "winding_number(subpath 0 t q +++ subpath t 1 q) z = winding_number(subpath 0 1 q) z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. winding_number (subpath 0 t q +++ subpath t 1 q) z = winding_number (subpath 0 1 q) z
[PROOF STEP]
using z_notin_0t \<open>0 \<le> t\<close> \<open>simple_path q\<close> \<open>t \<le> 1\<close>
[PROOF STATE]
proof (prove)
using this:
z \<notin> path_image (subpath 0 t q)
0 \<le> t
simple_path q
t \<le> 1

goal (1 subgoal):
 1. winding_number (subpath 0 t q +++ subpath t 1 q) z = winding_number (subpath 0 1 q) z
[PROOF STEP]
by (simp add: simple_path_imp_path qt path_image_subpath_commute winding_number_join winding_number_subpath_combine)
[PROOF STATE]
proof (state)
this:
winding_number (subpath 0 t q +++ subpath t 1 q) z = winding_number (subpath 0 1 q) z

goal (1 subgoal):
 1. cmod (winding_number p z) = 1
[PROOF STEP]
with wn_q
[PROOF STATE]
proof (chain)
picking this:
winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z
winding_number (subpath 0 t q +++ subpath t 1 q) z = winding_number (subpath 0 1 q) z
[PROOF STEP]
have "winding_number (subpath t 0 q +++ linepath (a - d) (a + e)) z = - winding_number q z"
[PROOF STATE]
proof (prove)
using this:
winding_number (subpath 0 t q +++ subpath t 1 q) z = - winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z
winding_number (subpath 0 t q +++ subpath t 1 q) z = winding_number (subpath 0 1 q) z

goal (1 subgoal):
 1. winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z = - winding_number q z
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z = - winding_number q z

goal (1 subgoal):
 1. cmod (winding_number p z) = 1
[PROOF STEP]
with z1
[PROOF STATE]
proof (chain)
picking this:
cmod (winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z) = 1
winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z = - winding_number q z
[PROOF STEP]
have "cmod (winding_number q z) = 1"
[PROOF STATE]
proof (prove)
using this:
cmod (winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z) = 1
winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z = - winding_number q z

goal (1 subgoal):
 1. cmod (winding_number q z) = 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
cmod (winding_number q z) = 1

goal (1 subgoal):
 1. cmod (winding_number p z) = 1
[PROOF STEP]
with z1 wn_q_eq_wn_p
[PROOF STATE]
proof (chain)
picking this:
cmod (winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z) = 1
?z \<in> inside (path_image p) \<Longrightarrow> winding_number q ?z = winding_number p ?z
cmod (winding_number q z) = 1
[PROOF STEP]
show "cmod (winding_number p z) = 1"
[PROOF STATE]
proof (prove)
using this:
cmod (winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z) = 1
?z \<in> inside (path_image p) \<Longrightarrow> winding_number q ?z = winding_number p ?z
cmod (winding_number q z) = 1

goal (1 subgoal):
 1. cmod (winding_number p z) = 1
[PROOF STEP]
using z1 wn_q_eq_wn_p
[PROOF STATE]
proof (prove)
using this:
cmod (winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z) = 1
?z \<in> inside (path_image p) \<Longrightarrow> winding_number q ?z = winding_number p ?z
cmod (winding_number q z) = 1
cmod (winding_number (subpath t 0 q +++ linepath (a - complex_of_real d) (a + complex_of_real e)) z) = 1
?z \<in> inside (path_image p) \<Longrightarrow> winding_number q ?z = winding_number p ?z

goal (1 subgoal):
 1. cmod (winding_number p z) = 1
[PROOF STEP]
by (simp add: \<open>z \<in> inside (path_image p)\<close>)
[PROOF STATE]
proof (state)
this:
cmod (winding_number p z) = 1

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem rbt_comp_lookup_map_const: "rbt_comp_lookup c (RBT_Impl.map (\<lambda>_. f) t) = map_option f \<circ> rbt_comp_lookup c t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rbt_comp_lookup c (RBT_Impl.map (\<lambda>_. f) t) = map_option f \<circ> rbt_comp_lookup c t
[PROOF STEP]
by(induct t)(auto simp: fun_eq_iff split: order.split)


[STATEMENT]
lemma pderiv_monom: "pderiv (monom c n) = monom (of_nat n * c) (n - 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pderiv (Polynomial.monom c n) = Polynomial.monom (of_nat n * c) (n - 1)
[PROOF STEP]
by (simp add: monom_altdef pderiv_smult pderiv_power pderiv_pCons mult_ac)


[STATEMENT]
lemma sum_0_all:
  assumes a: "\<forall>a\<in>A. f a \<ge> (0 :: real)"
  and s0: "sum f A = 0" and f: "finite A"
  shows "\<forall>a\<in>A. f a = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>a\<in>A. f a = 0
[PROOF STEP]
using a f s0 sum_nonneg_eq_0_iff
[PROOF STATE]
proof (prove)
using this:
\<forall>a\<in>A. 0 \<le> f a
finite A
sum f A = 0
\<lbrakk>finite ?A; \<And>x. x \<in> ?A \<Longrightarrow> (0::?'a) \<le> ?f x\<rbrakk> \<Longrightarrow> (sum ?f ?A = (0::?'a)) = (\<forall>x\<in>?A. ?f x = (0::?'a))

goal (1 subgoal):
 1. \<forall>a\<in>A. f a = 0
[PROOF STEP]
by blast


[STATEMENT]
lemma oFix_plus: "oFix (\<lambda>x. a + x) 0 = a * \<omega>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. oFix ((+) a) 0 = a * \<omega>
[PROOF STEP]
apply (simp add: oFix_def omega_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. oLimit (\<lambda>n. iter n ((+) a) 0) = oLimit (\<lambda>n. a * ordinal_of_nat n)
[PROOF STEP]
apply (rule_tac f=oLimit in arg_cong)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. iter n ((+) a) 0) = (\<lambda>n. a * ordinal_of_nat n)
[PROOF STEP]
apply (rule ext, induct_tac n, simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n na. iter na ((+) a) 0 = a * ordinal_of_nat na \<Longrightarrow> iter (Suc na) ((+) a) 0 = a * ordinal_of_nat (Suc na)
[PROOF STEP]
apply (simp, rename_tac n)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n. iter n ((+) a) 0 = a * ordinal_of_nat n \<Longrightarrow> a + a * ordinal_of_nat n = a * ordinal_of_nat n + a
[PROOF STEP]
apply (induct_tac n, simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n na. \<lbrakk>iter n ((+) a) 0 = a * ordinal_of_nat n; a + a * ordinal_of_nat na = a * ordinal_of_nat na + a\<rbrakk> \<Longrightarrow> a + a * ordinal_of_nat (Suc na) = a * ordinal_of_nat (Suc na) + a
[PROOF STEP]
apply (simp add: ordinal_plus_assoc[symmetric])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done