[STATEMENT]
lemma poincare_between_x_axis_intersection:
  assumes "u \<in> unit_disc" and "v \<in> unit_disc" and "z \<in> unit_disc" and "u \<noteq> v"
  assumes "u \<notin> circline_set x_axis" and "v \<notin> circline_set x_axis"
  assumes "z \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis"
  shows "poincare_between u z v \<longleftrightarrow> Arg (to_complex u) * Arg (to_complex v) < 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
have "\<forall> u v. u \<in> unit_disc \<and> v \<in> unit_disc \<and> u \<noteq> v \<and>
       u \<notin> circline_set x_axis \<and> v \<notin> circline_set x_axis \<and>
       z \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis \<longrightarrow>
       (poincare_between u z v \<longleftrightarrow> Arg (to_complex u) * Arg (to_complex v) < 0)" (is "?P z")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>u v. u \<in> unit_disc \<and> v \<in> unit_disc \<and> u \<noteq> v \<and> u \<notin> circline_set x_axis \<and> v \<notin> circline_set x_axis \<and> z \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis \<longrightarrow> poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
proof (rule wlog_real_zero)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. z \<in> unit_disc
 2. is_real (to_complex z)
 3. \<And>a u. \<lbrakk>u \<in> unit_disc; is_real a; cmod a < 1; \<forall>ua v. ua \<in> unit_disc \<and> v \<in> unit_disc \<and> ua \<noteq> v \<and> ua \<notin> circline_set x_axis \<and> v \<notin> circline_set x_axis \<and> moebius_pt (blaschke a) u \<in> circline_set (poincare_line ua v) \<inter> circline_set x_axis \<longrightarrow> poincare_between ua (moebius_pt (blaschke a) u) v = (Arg (to_complex ua) * Arg (to_complex v) < 0)\<rbrakk> \<Longrightarrow> \<forall>ua v. ua \<in> unit_disc \<and> v \<in> unit_disc \<and> ua \<noteq> v \<and> ua \<notin> circline_set x_axis \<and> v \<notin> circline_set x_axis \<and> u \<in> circline_set (poincare_line ua v) \<inter> circline_set x_axis \<longrightarrow> poincare_between ua u v = (Arg (to_complex ua) * Arg (to_complex v) < 0)
 4. \<forall>u v. u \<in> unit_disc \<and> v \<in> unit_disc \<and> u \<noteq> v \<and> u \<notin> circline_set x_axis \<and> v \<notin> circline_set x_axis \<and> 0\<^sub>h \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis \<longrightarrow> poincare_between u 0\<^sub>h v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
show "?P 0\<^sub>h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>u v. u \<in> unit_disc \<and> v \<in> unit_disc \<and> u \<noteq> v \<and> u \<notin> circline_set x_axis \<and> v \<notin> circline_set x_axis \<and> 0\<^sub>h \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis \<longrightarrow> poincare_between u 0\<^sub>h v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
proof ((rule allI)+, rule impI, (erule conjE)+)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>u v. \<lbrakk>u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; u \<notin> circline_set x_axis; v \<notin> circline_set x_axis; 0\<^sub>h \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis\<rbrakk> \<Longrightarrow> poincare_between u 0\<^sub>h v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
fix u v
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>u v. \<lbrakk>u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; u \<notin> circline_set x_axis; v \<notin> circline_set x_axis; 0\<^sub>h \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis\<rbrakk> \<Longrightarrow> poincare_between u 0\<^sub>h v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
assume *: "u \<in> unit_disc" "v \<in> unit_disc" "u \<noteq> v"
                "u \<notin> circline_set x_axis" "v \<notin> circline_set x_axis"
                "0\<^sub>h \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis"
[PROOF STATE]
proof (state)
this:
u \<in> unit_disc
v \<in> unit_disc
u \<noteq> v
u \<notin> circline_set x_axis
v \<notin> circline_set x_axis
0\<^sub>h \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis

goal (1 subgoal):
 1. \<And>u v. \<lbrakk>u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; u \<notin> circline_set x_axis; v \<notin> circline_set x_axis; 0\<^sub>h \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis\<rbrakk> \<Longrightarrow> poincare_between u 0\<^sub>h v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
obtain u' v' where uv: "u = of_complex u'" "v = of_complex v'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>u' v'. \<lbrakk>u = of_complex u'; v = of_complex v'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using * inf_or_of_complex[of u] inf_or_of_complex[of v]
[PROOF STATE]
proof (prove)
using this:
u \<in> unit_disc
v \<in> unit_disc
u \<noteq> v
u \<notin> circline_set x_axis
v \<notin> circline_set x_axis
0\<^sub>h \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis
u = \<infinity>\<^sub>h \<or> (\<exists>x. u = of_complex x)
v = \<infinity>\<^sub>h \<or> (\<exists>x. v = of_complex x)

goal (1 subgoal):
 1. (\<And>u' v'. \<lbrakk>u = of_complex u'; v = of_complex v'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
u = of_complex u'
v = of_complex v'

goal (1 subgoal):
 1. \<And>u v. \<lbrakk>u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; u \<notin> circline_set x_axis; v \<notin> circline_set x_axis; 0\<^sub>h \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis\<rbrakk> \<Longrightarrow> poincare_between u 0\<^sub>h v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
hence "u \<noteq> 0\<^sub>h" "v \<noteq> 0\<^sub>h" "u' \<noteq> 0" "v' \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
u = of_complex u'
v = of_complex v'

goal (1 subgoal):
 1. (u \<noteq> 0\<^sub>h &&& v \<noteq> 0\<^sub>h) &&& u' \<noteq> 0 &&& v' \<noteq> 0
[PROOF STEP]
using *
[PROOF STATE]
proof (prove)
using this:
u = of_complex u'
v = of_complex v'
u \<in> unit_disc
v \<in> unit_disc
u \<noteq> v
u \<notin> circline_set x_axis
v \<notin> circline_set x_axis
0\<^sub>h \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis

goal (1 subgoal):
 1. (u \<noteq> 0\<^sub>h &&& v \<noteq> 0\<^sub>h) &&& u' \<noteq> 0 &&& v' \<noteq> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
u \<noteq> 0\<^sub>h
v \<noteq> 0\<^sub>h
u' \<noteq> 0
v' \<noteq> 0

goal (1 subgoal):
 1. \<And>u v. \<lbrakk>u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; u \<notin> circline_set x_axis; v \<notin> circline_set x_axis; 0\<^sub>h \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis\<rbrakk> \<Longrightarrow> poincare_between u 0\<^sub>h v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
hence "Arg u' \<noteq> 0" "Arg v' \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
u \<noteq> 0\<^sub>h
v \<noteq> 0\<^sub>h
u' \<noteq> 0
v' \<noteq> 0

goal (1 subgoal):
 1. Arg u' \<noteq> 0 &&& Arg v' \<noteq> 0
[PROOF STEP]
using * arg_0_iff[of u'] arg_0_iff[of v']
[PROOF STATE]
proof (prove)
using this:
u \<noteq> 0\<^sub>h
v \<noteq> 0\<^sub>h
u' \<noteq> 0
v' \<noteq> 0
u \<in> unit_disc
v \<in> unit_disc
u \<noteq> v
u \<notin> circline_set x_axis
v \<notin> circline_set x_axis
0\<^sub>h \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis
(u' \<noteq> 0 \<and> Arg u' = 0) = (is_real u' \<and> 0 < Re u')
(v' \<noteq> 0 \<and> Arg v' = 0) = (is_real v' \<and> 0 < Re v')

goal (1 subgoal):
 1. Arg u' \<noteq> 0 &&& Arg v' \<noteq> 0
[PROOF STEP]
unfolding circline_set_x_axis uv
[PROOF STATE]
proof (prove)
using this:
of_complex u' \<noteq> 0\<^sub>h
of_complex v' \<noteq> 0\<^sub>h
u' \<noteq> 0
v' \<noteq> 0
of_complex u' \<in> unit_disc
of_complex v' \<in> unit_disc
of_complex u' \<noteq> of_complex v'
of_complex u' \<notin> of_complex ` {x. is_real x} \<union> {\<infinity>\<^sub>h}
of_complex v' \<notin> of_complex ` {x. is_real x} \<union> {\<infinity>\<^sub>h}
0\<^sub>h \<in> circline_set (poincare_line (of_complex u') (of_complex v')) \<inter> (of_complex ` {x. is_real x} \<union> {\<infinity>\<^sub>h})
(u' \<noteq> 0 \<and> Arg u' = 0) = (is_real u' \<and> 0 < Re u')
(v' \<noteq> 0 \<and> Arg v' = 0) = (is_real v' \<and> 0 < Re v')

goal (1 subgoal):
 1. Arg u' \<noteq> 0 &&& Arg v' \<noteq> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Arg u' \<noteq> 0
Arg v' \<noteq> 0

goal (1 subgoal):
 1. \<And>u v. \<lbrakk>u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; u \<notin> circline_set x_axis; v \<notin> circline_set x_axis; 0\<^sub>h \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis\<rbrakk> \<Longrightarrow> poincare_between u 0\<^sub>h v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
have "poincare_collinear {0\<^sub>h, u, v}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poincare_collinear {0\<^sub>h, u, v}
[PROOF STEP]
using *
[PROOF STATE]
proof (prove)
using this:
u \<in> unit_disc
v \<in> unit_disc
u \<noteq> v
u \<notin> circline_set x_axis
v \<notin> circline_set x_axis
0\<^sub>h \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis

goal (1 subgoal):
 1. poincare_collinear {0\<^sub>h, u, v}
[PROOF STEP]
unfolding poincare_collinear_def
[PROOF STATE]
proof (prove)
using this:
u \<in> unit_disc
v \<in> unit_disc
u \<noteq> v
u \<notin> circline_set x_axis
v \<notin> circline_set x_axis
0\<^sub>h \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis

goal (1 subgoal):
 1. \<exists>p. is_poincare_line p \<and> {0\<^sub>h, u, v} \<subseteq> circline_set p
[PROOF STEP]
by (rule_tac x="poincare_line u v" in exI, simp)
[PROOF STATE]
proof (state)
this:
poincare_collinear {0\<^sub>h, u, v}

goal (1 subgoal):
 1. \<And>u v. \<lbrakk>u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; u \<notin> circline_set x_axis; v \<notin> circline_set x_axis; 0\<^sub>h \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis\<rbrakk> \<Longrightarrow> poincare_between u 0\<^sub>h v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
have "(\<exists>k<0. u' = cor k * v') \<longleftrightarrow> (Arg u' * Arg v' < 0)" (is "?lhs \<longleftrightarrow> ?rhs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>k<0. u' = cor k * v') = (Arg u' * Arg v' < 0)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<exists>k<0. u' = cor k * v' \<Longrightarrow> Arg u' * Arg v' < 0
 2. Arg u' * Arg v' < 0 \<Longrightarrow> \<exists>k<0. u' = cor k * v'
[PROOF STEP]
assume "?lhs"
[PROOF STATE]
proof (state)
this:
\<exists>k<0. u' = cor k * v'

goal (2 subgoals):
 1. \<exists>k<0. u' = cor k * v' \<Longrightarrow> Arg u' * Arg v' < 0
 2. Arg u' * Arg v' < 0 \<Longrightarrow> \<exists>k<0. u' = cor k * v'
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>k<0. u' = cor k * v'
[PROOF STEP]
obtain k where "k < 0" "u' = cor k * v'"
[PROOF STATE]
proof (prove)
using this:
\<exists>k<0. u' = cor k * v'

goal (1 subgoal):
 1. (\<And>k. \<lbrakk>k < 0; u' = cor k * v'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
k < 0
u' = cor k * v'

goal (2 subgoals):
 1. \<exists>k<0. u' = cor k * v' \<Longrightarrow> Arg u' * Arg v' < 0
 2. Arg u' * Arg v' < 0 \<Longrightarrow> \<exists>k<0. u' = cor k * v'
[PROOF STEP]
thus ?rhs
[PROOF STATE]
proof (prove)
using this:
k < 0
u' = cor k * v'

goal (1 subgoal):
 1. Arg u' * Arg v' < 0
[PROOF STEP]
using arg_mult_real_negative[of k v'] arg_uminus_opposite_sign[of v']
[PROOF STATE]
proof (prove)
using this:
k < 0
u' = cor k * v'
k < 0 \<Longrightarrow> Arg (cor k * v') = Arg (- v')
v' \<noteq> 0 \<Longrightarrow> (0 < Arg v') = (\<not> 0 < Arg (- v'))

goal (1 subgoal):
 1. Arg u' * Arg v' < 0
[PROOF STEP]
using \<open>u' \<noteq> 0\<close> \<open>v' \<noteq> 0\<close> \<open>Arg u' \<noteq> 0\<close> \<open>Arg v' \<noteq> 0\<close>
[PROOF STATE]
proof (prove)
using this:
k < 0
u' = cor k * v'
k < 0 \<Longrightarrow> Arg (cor k * v') = Arg (- v')
v' \<noteq> 0 \<Longrightarrow> (0 < Arg v') = (\<not> 0 < Arg (- v'))
u' \<noteq> 0
v' \<noteq> 0
Arg u' \<noteq> 0
Arg v' \<noteq> 0

goal (1 subgoal):
 1. Arg u' * Arg v' < 0
[PROOF STEP]
by (auto simp add: mult_neg_pos mult_pos_neg)
[PROOF STATE]
proof (state)
this:
Arg u' * Arg v' < 0

goal (1 subgoal):
 1. Arg u' * Arg v' < 0 \<Longrightarrow> \<exists>k<0. u' = cor k * v'
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Arg u' * Arg v' < 0 \<Longrightarrow> \<exists>k<0. u' = cor k * v'
[PROOF STEP]
assume ?rhs
[PROOF STATE]
proof (state)
this:
Arg u' * Arg v' < 0

goal (1 subgoal):
 1. Arg u' * Arg v' < 0 \<Longrightarrow> \<exists>k<0. u' = cor k * v'
[PROOF STEP]
obtain ru rv \<phi> where polar: "u' = cor ru * cis \<phi>" "v' = cor rv * cis \<phi>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>ru \<phi> rv. \<lbrakk>u' = cor ru * cis \<phi>; v' = cor rv * cis \<phi>\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using \<open>poincare_collinear {0\<^sub>h, u, v}\<close> poincare_collinear_zero_polar_form[of u' v'] uv * \<open>u' \<noteq> 0\<close> \<open>v' \<noteq> 0\<close>
[PROOF STATE]
proof (prove)
using this:
poincare_collinear {0\<^sub>h, u, v}
\<lbrakk>poincare_collinear {0\<^sub>h, of_complex u', of_complex v'}; u' \<noteq> 0; v' \<noteq> 0; of_complex u' \<in> unit_disc; of_complex v' \<in> unit_disc\<rbrakk> \<Longrightarrow> \<exists>\<phi> rx ry. u' = cor rx * cis \<phi> \<and> v' = cor ry * cis \<phi> \<and> rx \<noteq> 0 \<and> ry \<noteq> 0
u = of_complex u'
v = of_complex v'
u \<in> unit_disc
v \<in> unit_disc
u \<noteq> v
u \<notin> circline_set x_axis
v \<notin> circline_set x_axis
0\<^sub>h \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis
u' \<noteq> 0
v' \<noteq> 0

goal (1 subgoal):
 1. (\<And>ru \<phi> rv. \<lbrakk>u' = cor ru * cis \<phi>; v' = cor rv * cis \<phi>\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
u' = cor ru * cis \<phi>
v' = cor rv * cis \<phi>

goal (1 subgoal):
 1. Arg u' * Arg v' < 0 \<Longrightarrow> \<exists>k<0. u' = cor k * v'
[PROOF STEP]
have "ru * rv < 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ru * rv < 0
[PROOF STEP]
using polar \<open>?rhs\<close> \<open>u' \<noteq> 0\<close> \<open>v' \<noteq> 0\<close>
[PROOF STATE]
proof (prove)
using this:
u' = cor ru * cis \<phi>
v' = cor rv * cis \<phi>
Arg u' * Arg v' < 0
u' \<noteq> 0
v' \<noteq> 0

goal (1 subgoal):
 1. ru * rv < 0
[PROOF STEP]
using arg_mult_real_negative[of "ru" "cis \<phi>"] arg_mult_real_positive[of "ru" "cis \<phi>"]
[PROOF STATE]
proof (prove)
using this:
u' = cor ru * cis \<phi>
v' = cor rv * cis \<phi>
Arg u' * Arg v' < 0
u' \<noteq> 0
v' \<noteq> 0
ru < 0 \<Longrightarrow> Arg (cor ru * cis \<phi>) = Arg (- cis \<phi>)
0 < ru \<Longrightarrow> Arg (cor ru * cis \<phi>) = Arg (cis \<phi>)

goal (1 subgoal):
 1. ru * rv < 0
[PROOF STEP]
using arg_mult_real_negative[of "rv" "cis \<phi>"] arg_mult_real_positive[of "rv" "cis \<phi>"]
[PROOF STATE]
proof (prove)
using this:
u' = cor ru * cis \<phi>
v' = cor rv * cis \<phi>
Arg u' * Arg v' < 0
u' \<noteq> 0
v' \<noteq> 0
ru < 0 \<Longrightarrow> Arg (cor ru * cis \<phi>) = Arg (- cis \<phi>)
0 < ru \<Longrightarrow> Arg (cor ru * cis \<phi>) = Arg (cis \<phi>)
rv < 0 \<Longrightarrow> Arg (cor rv * cis \<phi>) = Arg (- cis \<phi>)
0 < rv \<Longrightarrow> Arg (cor rv * cis \<phi>) = Arg (cis \<phi>)

goal (1 subgoal):
 1. ru * rv < 0
[PROOF STEP]
apply (cases "ru > 0")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>u' = cor ru * cis \<phi>; v' = cor rv * cis \<phi>; Arg u' * Arg v' < 0; u' \<noteq> 0; v' \<noteq> 0; ru < 0 \<Longrightarrow> Arg (cor ru * cis \<phi>) = Arg (- cis \<phi>); 0 < ru \<Longrightarrow> Arg (cor ru * cis \<phi>) = Arg (cis \<phi>); rv < 0 \<Longrightarrow> Arg (cor rv * cis \<phi>) = Arg (- cis \<phi>); 0 < rv \<Longrightarrow> Arg (cor rv * cis \<phi>) = Arg (cis \<phi>); 0 < ru\<rbrakk> \<Longrightarrow> ru * rv < 0
 2. \<lbrakk>u' = cor ru * cis \<phi>; v' = cor rv * cis \<phi>; Arg u' * Arg v' < 0; u' \<noteq> 0; v' \<noteq> 0; ru < 0 \<Longrightarrow> Arg (cor ru * cis \<phi>) = Arg (- cis \<phi>); 0 < ru \<Longrightarrow> Arg (cor ru * cis \<phi>) = Arg (cis \<phi>); rv < 0 \<Longrightarrow> Arg (cor rv * cis \<phi>) = Arg (- cis \<phi>); 0 < rv \<Longrightarrow> Arg (cor rv * cis \<phi>) = Arg (cis \<phi>); \<not> 0 < ru\<rbrakk> \<Longrightarrow> ru * rv < 0
[PROOF STEP]
apply (cases "rv > 0", simp, simp add: mult_pos_neg)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>u' = cor ru * cis \<phi>; v' = cor rv * cis \<phi>; Arg u' * Arg v' < 0; u' \<noteq> 0; v' \<noteq> 0; ru < 0 \<Longrightarrow> Arg (cor ru * cis \<phi>) = Arg (- cis \<phi>); 0 < ru \<Longrightarrow> Arg (cor ru * cis \<phi>) = Arg (cis \<phi>); rv < 0 \<Longrightarrow> Arg (cor rv * cis \<phi>) = Arg (- cis \<phi>); 0 < rv \<Longrightarrow> Arg (cor rv * cis \<phi>) = Arg (cis \<phi>); \<not> 0 < ru\<rbrakk> \<Longrightarrow> ru * rv < 0
[PROOF STEP]
apply (cases "rv > 0", simp add: mult_neg_pos, simp)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
ru * rv < 0

goal (1 subgoal):
 1. Arg u' * Arg v' < 0 \<Longrightarrow> \<exists>k<0. u' = cor k * v'
[PROOF STEP]
thus "?lhs"
[PROOF STATE]
proof (prove)
using this:
ru * rv < 0

goal (1 subgoal):
 1. \<exists>k<0. u' = cor k * v'
[PROOF STEP]
using polar
[PROOF STATE]
proof (prove)
using this:
ru * rv < 0
u' = cor ru * cis \<phi>
v' = cor rv * cis \<phi>

goal (1 subgoal):
 1. \<exists>k<0. u' = cor k * v'
[PROOF STEP]
by (rule_tac x="ru / rv" in exI, auto simp add: divide_less_0_iff mult_less_0_iff)
[PROOF STATE]
proof (state)
this:
\<exists>k<0. u' = cor k * v'

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<exists>k<0. u' = cor k * v') = (Arg u' * Arg v' < 0)

goal (1 subgoal):
 1. \<And>u v. \<lbrakk>u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; u \<notin> circline_set x_axis; v \<notin> circline_set x_axis; 0\<^sub>h \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis\<rbrakk> \<Longrightarrow> poincare_between u 0\<^sub>h v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
thus "poincare_between u 0\<^sub>h v = (Arg (to_complex u) * Arg (to_complex v) < 0)"
[PROOF STATE]
proof (prove)
using this:
(\<exists>k<0. u' = cor k * v') = (Arg u' * Arg v' < 0)

goal (1 subgoal):
 1. poincare_between u 0\<^sub>h v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
using poincare_between_u0v[of u v] * \<open>u \<noteq> 0\<^sub>h\<close> \<open>v \<noteq> 0\<^sub>h\<close> uv
[PROOF STATE]
proof (prove)
using this:
(\<exists>k<0. u' = cor k * v') = (Arg u' * Arg v' < 0)
\<lbrakk>u \<in> unit_disc; v \<in> unit_disc; u \<noteq> 0\<^sub>h; v \<noteq> 0\<^sub>h\<rbrakk> \<Longrightarrow> poincare_between u 0\<^sub>h v = (\<exists>k<0. to_complex u = cor k * to_complex v)
u \<in> unit_disc
v \<in> unit_disc
u \<noteq> v
u \<notin> circline_set x_axis
v \<notin> circline_set x_axis
0\<^sub>h \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis
u \<noteq> 0\<^sub>h
v \<noteq> 0\<^sub>h
u = of_complex u'
v = of_complex v'

goal (1 subgoal):
 1. poincare_between u 0\<^sub>h v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
poincare_between u 0\<^sub>h v = (Arg (to_complex u) * Arg (to_complex v) < 0)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>u v. u \<in> unit_disc \<and> v \<in> unit_disc \<and> u \<noteq> v \<and> u \<notin> circline_set x_axis \<and> v \<notin> circline_set x_axis \<and> 0\<^sub>h \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis \<longrightarrow> poincare_between u 0\<^sub>h v = (Arg (to_complex u) * Arg (to_complex v) < 0)

goal (3 subgoals):
 1. z \<in> unit_disc
 2. is_real (to_complex z)
 3. \<And>a u. \<lbrakk>u \<in> unit_disc; is_real a; cmod a < 1; \<forall>ua v. ua \<in> unit_disc \<and> v \<in> unit_disc \<and> ua \<noteq> v \<and> ua \<notin> circline_set x_axis \<and> v \<notin> circline_set x_axis \<and> moebius_pt (blaschke a) u \<in> circline_set (poincare_line ua v) \<inter> circline_set x_axis \<longrightarrow> poincare_between ua (moebius_pt (blaschke a) u) v = (Arg (to_complex ua) * Arg (to_complex v) < 0)\<rbrakk> \<Longrightarrow> \<forall>ua v. ua \<in> unit_disc \<and> v \<in> unit_disc \<and> ua \<noteq> v \<and> ua \<notin> circline_set x_axis \<and> v \<notin> circline_set x_axis \<and> u \<in> circline_set (poincare_line ua v) \<inter> circline_set x_axis \<longrightarrow> poincare_between ua u v = (Arg (to_complex ua) * Arg (to_complex v) < 0)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. z \<in> unit_disc
 2. is_real (to_complex z)
 3. \<And>a u. \<lbrakk>u \<in> unit_disc; is_real a; cmod a < 1; \<forall>ua v. ua \<in> unit_disc \<and> v \<in> unit_disc \<and> ua \<noteq> v \<and> ua \<notin> circline_set x_axis \<and> v \<notin> circline_set x_axis \<and> moebius_pt (blaschke a) u \<in> circline_set (poincare_line ua v) \<inter> circline_set x_axis \<longrightarrow> poincare_between ua (moebius_pt (blaschke a) u) v = (Arg (to_complex ua) * Arg (to_complex v) < 0)\<rbrakk> \<Longrightarrow> \<forall>ua v. ua \<in> unit_disc \<and> v \<in> unit_disc \<and> ua \<noteq> v \<and> ua \<notin> circline_set x_axis \<and> v \<notin> circline_set x_axis \<and> u \<in> circline_set (poincare_line ua v) \<inter> circline_set x_axis \<longrightarrow> poincare_between ua u v = (Arg (to_complex ua) * Arg (to_complex v) < 0)
[PROOF STEP]
fix a z
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. z \<in> unit_disc
 2. is_real (to_complex z)
 3. \<And>a u. \<lbrakk>u \<in> unit_disc; is_real a; cmod a < 1; \<forall>ua v. ua \<in> unit_disc \<and> v \<in> unit_disc \<and> ua \<noteq> v \<and> ua \<notin> circline_set x_axis \<and> v \<notin> circline_set x_axis \<and> moebius_pt (blaschke a) u \<in> circline_set (poincare_line ua v) \<inter> circline_set x_axis \<longrightarrow> poincare_between ua (moebius_pt (blaschke a) u) v = (Arg (to_complex ua) * Arg (to_complex v) < 0)\<rbrakk> \<Longrightarrow> \<forall>ua v. ua \<in> unit_disc \<and> v \<in> unit_disc \<and> ua \<noteq> v \<and> ua \<notin> circline_set x_axis \<and> v \<notin> circline_set x_axis \<and> u \<in> circline_set (poincare_line ua v) \<inter> circline_set x_axis \<longrightarrow> poincare_between ua u v = (Arg (to_complex ua) * Arg (to_complex v) < 0)
[PROOF STEP]
assume 1: "is_real a" "cmod a < 1" "z \<in> unit_disc"
[PROOF STATE]
proof (state)
this:
is_real a
cmod a < 1
z \<in> unit_disc

goal (3 subgoals):
 1. z \<in> unit_disc
 2. is_real (to_complex z)
 3. \<And>a u. \<lbrakk>u \<in> unit_disc; is_real a; cmod a < 1; \<forall>ua v. ua \<in> unit_disc \<and> v \<in> unit_disc \<and> ua \<noteq> v \<and> ua \<notin> circline_set x_axis \<and> v \<notin> circline_set x_axis \<and> moebius_pt (blaschke a) u \<in> circline_set (poincare_line ua v) \<inter> circline_set x_axis \<longrightarrow> poincare_between ua (moebius_pt (blaschke a) u) v = (Arg (to_complex ua) * Arg (to_complex v) < 0)\<rbrakk> \<Longrightarrow> \<forall>ua v. ua \<in> unit_disc \<and> v \<in> unit_disc \<and> ua \<noteq> v \<and> ua \<notin> circline_set x_axis \<and> v \<notin> circline_set x_axis \<and> u \<in> circline_set (poincare_line ua v) \<inter> circline_set x_axis \<longrightarrow> poincare_between ua u v = (Arg (to_complex ua) * Arg (to_complex v) < 0)
[PROOF STEP]
assume 2: "?P (moebius_pt (blaschke a) z)"
[PROOF STATE]
proof (state)
this:
\<forall>u v. u \<in> unit_disc \<and> v \<in> unit_disc \<and> u \<noteq> v \<and> u \<notin> circline_set x_axis \<and> v \<notin> circline_set x_axis \<and> moebius_pt (blaschke a) z \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis \<longrightarrow> poincare_between u (moebius_pt (blaschke a) z) v = (Arg (to_complex u) * Arg (to_complex v) < 0)

goal (3 subgoals):
 1. z \<in> unit_disc
 2. is_real (to_complex z)
 3. \<And>a u. \<lbrakk>u \<in> unit_disc; is_real a; cmod a < 1; \<forall>ua v. ua \<in> unit_disc \<and> v \<in> unit_disc \<and> ua \<noteq> v \<and> ua \<notin> circline_set x_axis \<and> v \<notin> circline_set x_axis \<and> moebius_pt (blaschke a) u \<in> circline_set (poincare_line ua v) \<inter> circline_set x_axis \<longrightarrow> poincare_between ua (moebius_pt (blaschke a) u) v = (Arg (to_complex ua) * Arg (to_complex v) < 0)\<rbrakk> \<Longrightarrow> \<forall>ua v. ua \<in> unit_disc \<and> v \<in> unit_disc \<and> ua \<noteq> v \<and> ua \<notin> circline_set x_axis \<and> v \<notin> circline_set x_axis \<and> u \<in> circline_set (poincare_line ua v) \<inter> circline_set x_axis \<longrightarrow> poincare_between ua u v = (Arg (to_complex ua) * Arg (to_complex v) < 0)
[PROOF STEP]
show "?P z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>u v. u \<in> unit_disc \<and> v \<in> unit_disc \<and> u \<noteq> v \<and> u \<notin> circline_set x_axis \<and> v \<notin> circline_set x_axis \<and> z \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis \<longrightarrow> poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
proof ((rule allI)+, rule impI, (erule conjE)+)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>u v. \<lbrakk>u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; u \<notin> circline_set x_axis; v \<notin> circline_set x_axis; z \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis\<rbrakk> \<Longrightarrow> poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
fix u v
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>u v. \<lbrakk>u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; u \<notin> circline_set x_axis; v \<notin> circline_set x_axis; z \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis\<rbrakk> \<Longrightarrow> poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
let ?M = "moebius_pt (blaschke a)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>u v. \<lbrakk>u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; u \<notin> circline_set x_axis; v \<notin> circline_set x_axis; z \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis\<rbrakk> \<Longrightarrow> poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
let ?Mu = "?M u"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>u v. \<lbrakk>u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; u \<notin> circline_set x_axis; v \<notin> circline_set x_axis; z \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis\<rbrakk> \<Longrightarrow> poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
let ?Mv = "?M v"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>u v. \<lbrakk>u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; u \<notin> circline_set x_axis; v \<notin> circline_set x_axis; z \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis\<rbrakk> \<Longrightarrow> poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
assume *: "u \<in> unit_disc" "v \<in> unit_disc" "u \<noteq> v" "u \<notin> circline_set x_axis" "v \<notin> circline_set x_axis"
[PROOF STATE]
proof (state)
this:
u \<in> unit_disc
v \<in> unit_disc
u \<noteq> v
u \<notin> circline_set x_axis
v \<notin> circline_set x_axis

goal (1 subgoal):
 1. \<And>u v. \<lbrakk>u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; u \<notin> circline_set x_axis; v \<notin> circline_set x_axis; z \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis\<rbrakk> \<Longrightarrow> poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
hence "u \<noteq> \<infinity>\<^sub>h" "v \<noteq> \<infinity>\<^sub>h"
[PROOF STATE]
proof (prove)
using this:
u \<in> unit_disc
v \<in> unit_disc
u \<noteq> v
u \<notin> circline_set x_axis
v \<notin> circline_set x_axis

goal (1 subgoal):
 1. u \<noteq> \<infinity>\<^sub>h &&& v \<noteq> \<infinity>\<^sub>h
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
u \<noteq> \<infinity>\<^sub>h
v \<noteq> \<infinity>\<^sub>h

goal (1 subgoal):
 1. \<And>u v. \<lbrakk>u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; u \<notin> circline_set x_axis; v \<notin> circline_set x_axis; z \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis\<rbrakk> \<Longrightarrow> poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
have **: "\<And> x y :: real. x * y < 0 \<longleftrightarrow> sgn (x * y) < 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y. (x * y < 0) = (sgn (x * y) < 0)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(?x * ?y < 0) = (sgn (?x * ?y) < 0)

goal (1 subgoal):
 1. \<And>u v. \<lbrakk>u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; u \<notin> circline_set x_axis; v \<notin> circline_set x_axis; z \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis\<rbrakk> \<Longrightarrow> poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
assume "z \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis"
[PROOF STATE]
proof (state)
this:
z \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis

goal (1 subgoal):
 1. \<And>u v. \<lbrakk>u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; u \<notin> circline_set x_axis; v \<notin> circline_set x_axis; z \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis\<rbrakk> \<Longrightarrow> poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
thus "poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)"
[PROOF STATE]
proof (prove)
using this:
z \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis

goal (1 subgoal):
 1. poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
using * 1 2[rule_format, of ?Mu ?Mv] \<open>cmod a < 1\<close> \<open>is_real a\<close> blaschke_unit_disc_fix[of a]
[PROOF STATE]
proof (prove)
using this:
z \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis
u \<in> unit_disc
v \<in> unit_disc
u \<noteq> v
u \<notin> circline_set x_axis
v \<notin> circline_set x_axis
is_real a
cmod a < 1
z \<in> unit_disc
moebius_pt (blaschke a) u \<in> unit_disc \<and> moebius_pt (blaschke a) v \<in> unit_disc \<and> moebius_pt (blaschke a) u \<noteq> moebius_pt (blaschke a) v \<and> moebius_pt (blaschke a) u \<notin> circline_set x_axis \<and> moebius_pt (blaschke a) v \<notin> circline_set x_axis \<and> moebius_pt (blaschke a) z \<in> circline_set (poincare_line (moebius_pt (blaschke a) u) (moebius_pt (blaschke a) v)) \<inter> circline_set x_axis \<Longrightarrow> poincare_between (moebius_pt (blaschke a) u) (moebius_pt (blaschke a) z) (moebius_pt (blaschke a) v) = (Arg (to_complex (moebius_pt (blaschke a) u)) * Arg (to_complex (moebius_pt (blaschke a) v)) < 0)
cmod a < 1
is_real a
cmod a < 1 \<Longrightarrow> unit_disc_fix (blaschke a)

goal (1 subgoal):
 1. poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
using inversion_noteq_unit_disc[of "of_complex a" u] \<open>u \<noteq> \<infinity>\<^sub>h\<close>
[PROOF STATE]
proof (prove)
using this:
z \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis
u \<in> unit_disc
v \<in> unit_disc
u \<noteq> v
u \<notin> circline_set x_axis
v \<notin> circline_set x_axis
is_real a
cmod a < 1
z \<in> unit_disc
moebius_pt (blaschke a) u \<in> unit_disc \<and> moebius_pt (blaschke a) v \<in> unit_disc \<and> moebius_pt (blaschke a) u \<noteq> moebius_pt (blaschke a) v \<and> moebius_pt (blaschke a) u \<notin> circline_set x_axis \<and> moebius_pt (blaschke a) v \<notin> circline_set x_axis \<and> moebius_pt (blaschke a) z \<in> circline_set (poincare_line (moebius_pt (blaschke a) u) (moebius_pt (blaschke a) v)) \<inter> circline_set x_axis \<Longrightarrow> poincare_between (moebius_pt (blaschke a) u) (moebius_pt (blaschke a) z) (moebius_pt (blaschke a) v) = (Arg (to_complex (moebius_pt (blaschke a) u)) * Arg (to_complex (moebius_pt (blaschke a) v)) < 0)
cmod a < 1
is_real a
cmod a < 1 \<Longrightarrow> unit_disc_fix (blaschke a)
\<lbrakk>of_complex a \<in> unit_disc; u \<in> unit_disc\<rbrakk> \<Longrightarrow> inversion (of_complex a) \<noteq> u
u \<noteq> \<infinity>\<^sub>h

goal (1 subgoal):
 1. poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
using inversion_noteq_unit_disc[of "of_complex a" v] \<open>v \<noteq> \<infinity>\<^sub>h\<close>
[PROOF STATE]
proof (prove)
using this:
z \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis
u \<in> unit_disc
v \<in> unit_disc
u \<noteq> v
u \<notin> circline_set x_axis
v \<notin> circline_set x_axis
is_real a
cmod a < 1
z \<in> unit_disc
moebius_pt (blaschke a) u \<in> unit_disc \<and> moebius_pt (blaschke a) v \<in> unit_disc \<and> moebius_pt (blaschke a) u \<noteq> moebius_pt (blaschke a) v \<and> moebius_pt (blaschke a) u \<notin> circline_set x_axis \<and> moebius_pt (blaschke a) v \<notin> circline_set x_axis \<and> moebius_pt (blaschke a) z \<in> circline_set (poincare_line (moebius_pt (blaschke a) u) (moebius_pt (blaschke a) v)) \<inter> circline_set x_axis \<Longrightarrow> poincare_between (moebius_pt (blaschke a) u) (moebius_pt (blaschke a) z) (moebius_pt (blaschke a) v) = (Arg (to_complex (moebius_pt (blaschke a) u)) * Arg (to_complex (moebius_pt (blaschke a) v)) < 0)
cmod a < 1
is_real a
cmod a < 1 \<Longrightarrow> unit_disc_fix (blaschke a)
\<lbrakk>of_complex a \<in> unit_disc; u \<in> unit_disc\<rbrakk> \<Longrightarrow> inversion (of_complex a) \<noteq> u
u \<noteq> \<infinity>\<^sub>h
\<lbrakk>of_complex a \<in> unit_disc; v \<in> unit_disc\<rbrakk> \<Longrightarrow> inversion (of_complex a) \<noteq> v
v \<noteq> \<infinity>\<^sub>h

goal (1 subgoal):
 1. poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; u \<notin> circline_set x_axis; v \<notin> circline_set x_axis; z \<in> unit_disc; cmod a < 1; is_real a; inversion (of_complex a) \<noteq> u; u \<noteq> \<infinity>\<^sub>h; inversion (of_complex a) \<noteq> v; v \<noteq> \<infinity>\<^sub>h; z \<in> circline_set (poincare_line u v); z \<in> circline_set x_axis; poincare_between u z v; Arg (to_complex (moebius_pt (blaschke a) u)) * Arg (to_complex (moebius_pt (blaschke a) v)) < 0\<rbrakk> \<Longrightarrow> Arg (to_complex u) * Arg (to_complex v) < 0
 2. \<lbrakk>u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; u \<notin> circline_set x_axis; v \<notin> circline_set x_axis; z \<in> unit_disc; cmod a < 1; is_real a; inversion (of_complex a) \<noteq> u; u \<noteq> \<infinity>\<^sub>h; inversion (of_complex a) \<noteq> v; v \<noteq> \<infinity>\<^sub>h; z \<in> circline_set (poincare_line u v); z \<in> circline_set x_axis; \<not> poincare_between u z v; \<not> Arg (to_complex (moebius_pt (blaschke a) u)) * Arg (to_complex (moebius_pt (blaschke a) v)) < 0; Arg (to_complex u) * Arg (to_complex v) < 0\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply (subst (asm) **, subst **, subst (asm) sgn_mult, subst sgn_mult, simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>u \<in> unit_disc; v \<in> unit_disc; u \<noteq> v; u \<notin> circline_set x_axis; v \<notin> circline_set x_axis; z \<in> unit_disc; cmod a < 1; is_real a; inversion (of_complex a) \<noteq> u; u \<noteq> \<infinity>\<^sub>h; inversion (of_complex a) \<noteq> v; v \<noteq> \<infinity>\<^sub>h; z \<in> circline_set (poincare_line u v); z \<in> circline_set x_axis; \<not> poincare_between u z v; \<not> Arg (to_complex (moebius_pt (blaschke a) u)) * Arg (to_complex (moebius_pt (blaschke a) v)) < 0; Arg (to_complex u) * Arg (to_complex v) < 0\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply (subst (asm) **, subst (asm) **, subst (asm) sgn_mult, subst (asm) sgn_mult, simp)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>u v. u \<in> unit_disc \<and> v \<in> unit_disc \<and> u \<noteq> v \<and> u \<notin> circline_set x_axis \<and> v \<notin> circline_set x_axis \<and> z \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis \<longrightarrow> poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)

goal (2 subgoals):
 1. z \<in> unit_disc
 2. is_real (to_complex z)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. z \<in> unit_disc
 2. is_real (to_complex z)
[PROOF STEP]
show "z \<in> unit_disc"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z \<in> unit_disc
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
z \<in> unit_disc

goal (1 subgoal):
 1. is_real (to_complex z)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. is_real (to_complex z)
[PROOF STEP]
show "is_real (to_complex z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_real (to_complex z)
[PROOF STEP]
using assms inf_or_of_complex[of z]
[PROOF STATE]
proof (prove)
using this:
u \<in> unit_disc
v \<in> unit_disc
z \<in> unit_disc
u \<noteq> v
u \<notin> circline_set x_axis
v \<notin> circline_set x_axis
z \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis
z = \<infinity>\<^sub>h \<or> (\<exists>x. z = of_complex x)

goal (1 subgoal):
 1. is_real (to_complex z)
[PROOF STEP]
by (auto simp add: circline_set_x_axis)
[PROOF STATE]
proof (state)
this:
is_real (to_complex z)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>u v. u \<in> unit_disc \<and> v \<in> unit_disc \<and> u \<noteq> v \<and> u \<notin> circline_set x_axis \<and> v \<notin> circline_set x_axis \<and> z \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis \<longrightarrow> poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)

goal (1 subgoal):
 1. poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>u v. u \<in> unit_disc \<and> v \<in> unit_disc \<and> u \<noteq> v \<and> u \<notin> circline_set x_axis \<and> v \<notin> circline_set x_axis \<and> z \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis \<longrightarrow> poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)

goal (1 subgoal):
 1. poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<forall>u v. u \<in> unit_disc \<and> v \<in> unit_disc \<and> u \<noteq> v \<and> u \<notin> circline_set x_axis \<and> v \<notin> circline_set x_axis \<and> z \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis \<longrightarrow> poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)
u \<in> unit_disc
v \<in> unit_disc
z \<in> unit_disc
u \<noteq> v
u \<notin> circline_set x_axis
v \<notin> circline_set x_axis
z \<in> circline_set (poincare_line u v) \<inter> circline_set x_axis

goal (1 subgoal):
 1. poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
poincare_between u z v = (Arg (to_complex u) * Arg (to_complex v) < 0)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma interior_of_subset_closure_of: "X interior_of S \<subseteq> X closure_of S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X interior_of S \<subseteq> X closure_of S
[PROOF STEP]
by (metis closure_of_subset_Int dual_order.trans interior_of_restrict interior_of_subset)


[STATEMENT]
lemma distinct4_def:
  "distinct [A,B,C,D] = ((A \<noteq> B) \<and> (A \<noteq> C) \<and> (A \<noteq> D) \<and> (B \<noteq> C) \<and> (B \<noteq> D) \<and> (C \<noteq> D))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distinct [A, B, C, D] = (A \<noteq> B \<and> A \<noteq> C \<and> A \<noteq> D \<and> B \<noteq> C \<and> B \<noteq> D \<and> C \<noteq> D)
[PROOF STEP]
by auto


[STATEMENT]
lemma bot_as_span[code]:
  \<comment> \<open>Code equation for \<^term>\<open>bot\<close>, the subspace containing everything.
      Top is represented as the span of the standard basis vectors.\<close>
  "(bot::'a::onb_enum ccsubspace) = SPAN []"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bottom> = SPAN []
[PROOF STEP]
unfolding SPAN_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bottom> = (let n = length canonical_basis in ccspan (basis_enum_of_vec ` Set.filter (\<lambda>v. dim_vec v = n) (set [])))
[PROOF STEP]
by (auto simp: Set.filter_def)


[STATEMENT]
lemma lformula_NFAND: "finite \<Phi> \<Longrightarrow> lformula (NFAND \<Phi>) = (\<forall>\<phi> \<in> \<Phi>. lformula \<phi>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite \<Phi> \<Longrightarrow> lformula (NFAND \<Phi>) = Ball \<Phi> lformula
[PROOF STEP]
unfolding NFAND_def o_apply lformula_nFAND
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite \<Phi> \<Longrightarrow> Ball (set (sorted_list_of_set \<Phi>)) lformula = Ball \<Phi> lformula
[PROOF STEP]
by simp


[STATEMENT]
lemma qSwap_qSwapInp:
"((qOp delta qinp qbinp) #[[x \<and> y]]_xs) =
 qOp delta (qinp %[[x \<and> y]]_xs) (qbinp %%[[x \<and> y]]_xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. qOp delta qinp qbinp #[[x \<and> y]]_xs = qOp delta (qSwapInp xs x y qinp) (qSwapBinp xs x y qbinp)
[PROOF STEP]
unfolding qSwapInp_def qSwapBinp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. qOp delta qinp qbinp #[[x \<and> y]]_xs = qOp delta (lift (qSwap xs x y) qinp) (lift (qSwapAbs xs x y) qbinp)
[PROOF STEP]
by simp


[STATEMENT]
lemma currentD_IN_eq_0:
  assumes "current \<Gamma> f"
  shows "d_IN f x = 0 \<longleftrightarrow> (\<forall>y. f (y, x) = 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (d_IN f x = 0) = (\<forall>y. f (y, x) = 0)
[PROOF STEP]
by(simp add: d_IN_def nn_integral_0_iff emeasure_count_space_eq_0)


[STATEMENT]
lemma point_ordinate_diff [simp]:
  "ordinate (A - B) = ordinate (A) - ordinate (B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ordinate (A - B) = ordinate A - ordinate B
[PROOF STEP]
by (simp add: point_diff_def)


[STATEMENT]
lemma Buffon_set_altdef2:
  "Buffon_set = {(x,\<phi>) \<in> {-d/2..d/2} \<times> {-pi..pi}. abs x \<ge> d / 2 - abs (sin \<phi>) * l / 2}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Buffon_set = {(x, \<phi>). (x, \<phi>) \<in> {- d / 2..d / 2} \<times> {- pi..pi} \<and> d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>}
[PROOF STEP]
unfolding Buffon_set_altdef1
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {(x, \<phi>). (x, \<phi>) \<in> {- d / 2..d / 2} \<times> {- pi..pi} \<and> (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2)} = {(x, \<phi>). (x, \<phi>) \<in> {- d / 2..d / 2} \<times> {- pi..pi} \<and> d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>}
[PROOF STEP]
proof (intro Collect_cong prod.case_cong refl conj_cong)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x xa \<phi>. \<lbrakk>x = (xa, \<phi>); (xa, \<phi>) \<in> {- d / 2..d / 2} \<times> {- pi..pi}\<rbrakk> \<Longrightarrow> (let a = xa - l / 2 * sin \<phi>; b = xa + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>xa\<bar>)
[PROOF STEP]
fix x \<phi>
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x xa \<phi>. \<lbrakk>x = (xa, \<phi>); (xa, \<phi>) \<in> {- d / 2..d / 2} \<times> {- pi..pi}\<rbrakk> \<Longrightarrow> (let a = xa - l / 2 * sin \<phi>; b = xa + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>xa\<bar>)
[PROOF STEP]
assume *: "(x, \<phi>) \<in> {-d/2..d/2} \<times> {-pi..pi}"
[PROOF STATE]
proof (state)
this:
(x, \<phi>) \<in> {- d / 2..d / 2} \<times> {- pi..pi}

goal (1 subgoal):
 1. \<And>x xa \<phi>. \<lbrakk>x = (xa, \<phi>); (xa, \<phi>) \<in> {- d / 2..d / 2} \<times> {- pi..pi}\<rbrakk> \<Longrightarrow> (let a = xa - l / 2 * sin \<phi>; b = xa + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>xa\<bar>)
[PROOF STEP]
let ?P = "\<lambda>x \<phi>. let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi>
               in  min a b + d/2 \<le> 0 \<and> max a b + d/2 \<ge> 0 \<or> min a b - d/2 \<le> 0 \<and> max a b - d/2 \<ge> 0"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x xa \<phi>. \<lbrakk>x = (xa, \<phi>); (xa, \<phi>) \<in> {- d / 2..d / 2} \<times> {- pi..pi}\<rbrakk> \<Longrightarrow> (let a = xa - l / 2 * sin \<phi>; b = xa + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>xa\<bar>)
[PROOF STEP]
show "?P x \<phi> \<longleftrightarrow> (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>)
[PROOF STEP]
proof (cases "\<phi> \<ge> 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. 0 \<le> \<phi> \<Longrightarrow> (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>)
 2. \<not> 0 \<le> \<phi> \<Longrightarrow> (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
0 \<le> \<phi>

goal (2 subgoals):
 1. 0 \<le> \<phi> \<Longrightarrow> (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>)
 2. \<not> 0 \<le> \<phi> \<Longrightarrow> (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>)
[PROOF STEP]
have "x - l / 2 * sin \<phi> \<le> x + l / 2 * sin \<phi>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x - l / 2 * sin \<phi> \<le> x + l / 2 * sin \<phi>
[PROOF STEP]
using l True *
[PROOF STATE]
proof (prove)
using this:
0 < l
0 \<le> \<phi>
(x, \<phi>) \<in> {- d / 2..d / 2} \<times> {- pi..pi}

goal (1 subgoal):
 1. x - l / 2 * sin \<phi> \<le> x + l / 2 * sin \<phi>
[PROOF STEP]
by (auto simp: sin_ge_zero)
[PROOF STATE]
proof (state)
this:
x - l / 2 * sin \<phi> \<le> x + l / 2 * sin \<phi>

goal (2 subgoals):
 1. 0 \<le> \<phi> \<Longrightarrow> (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>)
 2. \<not> 0 \<le> \<phi> \<Longrightarrow> (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
x - l / 2 * sin \<phi> \<le> x + l / 2 * sin \<phi>

goal (2 subgoals):
 1. 0 \<le> \<phi> \<Longrightarrow> (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>)
 2. \<not> 0 \<le> \<phi> \<Longrightarrow> (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>)
[PROOF STEP]
from True and *
[PROOF STATE]
proof (chain)
picking this:
0 \<le> \<phi>
(x, \<phi>) \<in> {- d / 2..d / 2} \<times> {- pi..pi}
[PROOF STEP]
have "sin \<phi> \<ge> 0"
[PROOF STATE]
proof (prove)
using this:
0 \<le> \<phi>
(x, \<phi>) \<in> {- d / 2..d / 2} \<times> {- pi..pi}

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

goal (2 subgoals):
 1. 0 \<le> \<phi> \<Longrightarrow> (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>)
 2. \<not> 0 \<le> \<phi> \<Longrightarrow> (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
x - l / 2 * sin \<phi> \<le> x + l / 2 * sin \<phi>
0 \<le> sin \<phi>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x - l / 2 * sin \<phi> \<le> x + l / 2 * sin \<phi>
0 \<le> sin \<phi>

goal (1 subgoal):
 1. (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>)
[PROOF STEP]
using * True
[PROOF STATE]
proof (prove)
using this:
x - l / 2 * sin \<phi> \<le> x + l / 2 * sin \<phi>
0 \<le> sin \<phi>
(x, \<phi>) \<in> {- d / 2..d / 2} \<times> {- pi..pi}
0 \<le> \<phi>

goal (1 subgoal):
 1. (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>)
[PROOF STEP]
by (force simp: field_simps Let_def min_def max_def case_prod_unfold abs_if)
[PROOF STATE]
proof (state)
this:
(let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>)

goal (1 subgoal):
 1. \<not> 0 \<le> \<phi> \<Longrightarrow> (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> 0 \<le> \<phi> \<Longrightarrow> (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> 0 \<le> \<phi>

goal (1 subgoal):
 1. \<not> 0 \<le> \<phi> \<Longrightarrow> (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>)
[PROOF STEP]
with *
[PROOF STATE]
proof (chain)
picking this:
(x, \<phi>) \<in> {- d / 2..d / 2} \<times> {- pi..pi}
\<not> 0 \<le> \<phi>
[PROOF STEP]
have "x - l / 2 * sin \<phi> \<ge> x + l / 2 * sin \<phi>"
[PROOF STATE]
proof (prove)
using this:
(x, \<phi>) \<in> {- d / 2..d / 2} \<times> {- pi..pi}
\<not> 0 \<le> \<phi>

goal (1 subgoal):
 1. x + l / 2 * sin \<phi> \<le> x - l / 2 * sin \<phi>
[PROOF STEP]
using l
[PROOF STATE]
proof (prove)
using this:
(x, \<phi>) \<in> {- d / 2..d / 2} \<times> {- pi..pi}
\<not> 0 \<le> \<phi>
0 < l

goal (1 subgoal):
 1. x + l / 2 * sin \<phi> \<le> x - l / 2 * sin \<phi>
[PROOF STEP]
by (auto simp: sin_le_zero' mult_nonneg_nonpos)
[PROOF STATE]
proof (state)
this:
x + l / 2 * sin \<phi> \<le> x - l / 2 * sin \<phi>

goal (1 subgoal):
 1. \<not> 0 \<le> \<phi> \<Longrightarrow> (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
x + l / 2 * sin \<phi> \<le> x - l / 2 * sin \<phi>

goal (1 subgoal):
 1. \<not> 0 \<le> \<phi> \<Longrightarrow> (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>)
[PROOF STEP]
from False and *
[PROOF STATE]
proof (chain)
picking this:
\<not> 0 \<le> \<phi>
(x, \<phi>) \<in> {- d / 2..d / 2} \<times> {- pi..pi}
[PROOF STEP]
have "sin \<phi> \<le> 0"
[PROOF STATE]
proof (prove)
using this:
\<not> 0 \<le> \<phi>
(x, \<phi>) \<in> {- d / 2..d / 2} \<times> {- pi..pi}

goal (1 subgoal):
 1. sin \<phi> \<le> 0
[PROOF STEP]
by (auto simp: sin_le_zero')
[PROOF STATE]
proof (state)
this:
sin \<phi> \<le> 0

goal (1 subgoal):
 1. \<not> 0 \<le> \<phi> \<Longrightarrow> (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
x + l / 2 * sin \<phi> \<le> x - l / 2 * sin \<phi>
sin \<phi> \<le> 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x + l / 2 * sin \<phi> \<le> x - l / 2 * sin \<phi>
sin \<phi> \<le> 0

goal (1 subgoal):
 1. (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>)
[PROOF STEP]
using * False l d
[PROOF STATE]
proof (prove)
using this:
x + l / 2 * sin \<phi> \<le> x - l / 2 * sin \<phi>
sin \<phi> \<le> 0
(x, \<phi>) \<in> {- d / 2..d / 2} \<times> {- pi..pi}
\<not> 0 \<le> \<phi>
0 < l
0 < d

goal (1 subgoal):
 1. (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>)
[PROOF STEP]
by (force simp: field_simps Let_def min_def max_def case_prod_unfold abs_if)
[PROOF STATE]
proof (state)
this:
(let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2) = (d / 2 - \<bar>sin \<phi>\<bar> * l / 2 \<le> \<bar>x\<bar>)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma kat_3_equiv: "d x \<cdot> y \<cdot> ad z = 0 \<longleftrightarrow> d x \<cdot> y = d x \<cdot> y \<cdot> d z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (d x \<cdot> y \<cdot> ad z = 0) = (d x \<cdot> y = d x \<cdot> y \<cdot> d z)
[PROOF STEP]
apply standard
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. d x \<cdot> y \<cdot> ad z = 0 \<Longrightarrow> d x \<cdot> y = d x \<cdot> y \<cdot> d z
 2. d x \<cdot> y = d x \<cdot> y \<cdot> d z \<Longrightarrow> d x \<cdot> y \<cdot> ad z = 0
[PROOF STEP]
apply (metis kat_3')
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d x \<cdot> y = d x \<cdot> y \<cdot> d z \<Longrightarrow> d x \<cdot> y \<cdot> ad z = 0
[PROOF STEP]
by (simp add: mult_assoc a_zero_def am_d_def)


[STATEMENT]
lemma gcard_le_lepoll: "\<lbrakk>gcard A \<le> \<alpha>; small A\<rbrakk> \<Longrightarrow> A \<lesssim> elts \<alpha>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>gcard A \<le> \<alpha>; small A\<rbrakk> \<Longrightarrow> A \<lesssim> elts \<alpha>
[PROOF STEP]
by (meson eqpoll_sym gcard_eqpoll lepoll_trans1 less_eq_V_def subset_imp_lepoll)


[STATEMENT]
lemma confluence_equiv_ChurchRosser: "is_confluent = is_ChurchRosser"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_confluent = is_ChurchRosser
[PROOF STEP]
by (simp only: ChurchRosser_conversion confluent_CR, fact CR_iff_conversion_imp_join)


[STATEMENT]
lemma fMin_Min: "fMin (fset_of_list l) = Min (set l)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fMin (fset_of_list l) = Min (set l)
[PROOF STEP]
by (simp add: fMin.F.rep_eq fset_of_list.rep_eq)


[STATEMENT]
lemma decompose_code [code]:
  "decompose x ys = decompose' x ys (tl (rev (decompose_aux 1 (rev ys))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. decompose x ys = decompose' x ys (tl (rev (decompose_aux (1::'a) (rev ys))))
[PROOF STEP]
proof (induction x ys rule: decompose.induct)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>x. decompose x [] = decompose' x [] (tl (rev (decompose_aux (1::'a) (rev []))))
 2. \<And>x y. decompose x [y] = decompose' x [y] (tl (rev (decompose_aux (1::'a) (rev [y]))))
 3. \<And>x y v va. (\<And>xa ya. (xa, ya) = bezout_coefficients y (prod_list (v # va)) \<Longrightarrow> decompose (xa * x) (v # va) = decompose' (xa * x) (v # va) (tl (rev (decompose_aux (1::'a) (rev (v # va)))))) \<Longrightarrow> decompose x (y # v # va) = decompose' x (y # v # va) (tl (rev (decompose_aux (1::'a) (rev (y # v # va)))))
[PROOF STEP]
case (3 x y1 y2 ys)
[PROOF STATE]
proof (state)
this:
(?xa, ?ya) = bezout_coefficients y1 (prod_list (y2 # ys)) \<Longrightarrow> decompose (?xa * x) (y2 # ys) = decompose' (?xa * x) (y2 # ys) (tl (rev (decompose_aux (1::'a) (rev (y2 # ys)))))

goal (3 subgoals):
 1. \<And>x. decompose x [] = decompose' x [] (tl (rev (decompose_aux (1::'a) (rev []))))
 2. \<And>x y. decompose x [y] = decompose' x [y] (tl (rev (decompose_aux (1::'a) (rev [y]))))
 3. \<And>x y v va. (\<And>xa ya. (xa, ya) = bezout_coefficients y (prod_list (v # va)) \<Longrightarrow> decompose (xa * x) (v # va) = decompose' (xa * x) (v # va) (tl (rev (decompose_aux (1::'a) (rev (v # va)))))) \<Longrightarrow> decompose x (y # v # va) = decompose' x (y # v # va) (tl (rev (decompose_aux (1::'a) (rev (y # v # va)))))
[PROOF STEP]
have [simp]:
    "decompose_aux acc xs = map (\<lambda>x. prod_list x * acc) (prefixes xs)" for acc :: 'a and xs
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. decompose_aux acc xs = map (\<lambda>x. prod_list x * acc) (prefixes xs)
[PROOF STEP]
by (induction xs arbitrary: acc) (simp_all add: mult_ac)
[PROOF STATE]
proof (state)
this:
decompose_aux ?acc ?xs = map (\<lambda>x. prod_list x * ?acc) (prefixes ?xs)

goal (3 subgoals):
 1. \<And>x. decompose x [] = decompose' x [] (tl (rev (decompose_aux (1::'a) (rev []))))
 2. \<And>x y. decompose x [y] = decompose' x [y] (tl (rev (decompose_aux (1::'a) (rev [y]))))
 3. \<And>x y v va. (\<And>xa ya. (xa, ya) = bezout_coefficients y (prod_list (v # va)) \<Longrightarrow> decompose (xa * x) (v # va) = decompose' (xa * x) (v # va) (tl (rev (decompose_aux (1::'a) (rev (v # va)))))) \<Longrightarrow> decompose x (y # v # va) = decompose' x (y # v # va) (tl (rev (decompose_aux (1::'a) (rev (y # v # va)))))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. decompose x (y1 # y2 # ys) = decompose' x (y1 # y2 # ys) (tl (rev (decompose_aux (1::'a) (rev (y1 # y2 # ys)))))
[PROOF STEP]
using 3[of "fst (bezout_coefficients y1 (y2 * prod_list ys))"
               "snd (bezout_coefficients y1 (y2 * prod_list ys))"]
[PROOF STATE]
proof (prove)
using this:
(fst (bezout_coefficients y1 (y2 * prod_list ys)), snd (bezout_coefficients y1 (y2 * prod_list ys))) = bezout_coefficients y1 (prod_list (y2 # ys)) \<Longrightarrow> decompose (fst (bezout_coefficients y1 (y2 * prod_list ys)) * x) (y2 # ys) = decompose' (fst (bezout_coefficients y1 (y2 * prod_list ys)) * x) (y2 # ys) (tl (rev (decompose_aux (1::'a) (rev (y2 # ys)))))

goal (1 subgoal):
 1. decompose x (y1 # y2 # ys) = decompose' x (y1 # y2 # ys) (tl (rev (decompose_aux (1::'a) (rev (y1 # y2 # ys)))))
[PROOF STEP]
by (simp add: case_prod_unfold rev_map prefixes_conv_suffixes o_def mult_ac)
[PROOF STATE]
proof (state)
this:
decompose x (y1 # y2 # ys) = decompose' x (y1 # y2 # ys) (tl (rev (decompose_aux (1::'a) (rev (y1 # y2 # ys)))))

goal (2 subgoals):
 1. \<And>x. decompose x [] = decompose' x [] (tl (rev (decompose_aux (1::'a) (rev []))))
 2. \<And>x y. decompose x [y] = decompose' x [y] (tl (rev (decompose_aux (1::'a) (rev [y]))))
[PROOF STEP]
qed simp_all


[STATEMENT]
lemma of_neg_1: "f (-1) = f 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f (- (1::'a)) = f (0::'a)
[PROOF STEP]
using minus_of_nat[of 0 1]
[PROOF STATE]
proof (prove)
using this:
f ((0::'a) - of_nat 1) = f (0::'a)

goal (1 subgoal):
 1. f (- (1::'a)) = f (0::'a)
[PROOF STEP]
by simp


[STATEMENT]
lemma AE_uniform_measure:
  assumes "emeasure M A \<noteq> 0" "emeasure M A < \<infinity>"
  shows "(AE x in uniform_measure M A. P x) \<longleftrightarrow> (AE x in M. x \<in> A \<longrightarrow> P x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. almost_everywhere (uniform_measure M A) P = set_almost_everywhere A M P
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. almost_everywhere (uniform_measure M A) P = set_almost_everywhere A M P
[PROOF STEP]
have "A \<in> sets M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<in> sets M
[PROOF STEP]
using \<open>emeasure M A \<noteq> 0\<close>
[PROOF STATE]
proof (prove)
using this:
emeasure M A \<noteq> 0

goal (1 subgoal):
 1. A \<in> sets M
[PROOF STEP]
by (metis emeasure_notin_sets)
[PROOF STATE]
proof (state)
this:
A \<in> sets M

goal (1 subgoal):
 1. almost_everywhere (uniform_measure M A) P = set_almost_everywhere A M P
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
A \<in> sets M

goal (1 subgoal):
 1. almost_everywhere (uniform_measure M A) P = set_almost_everywhere A M P
[PROOF STEP]
have "\<And>x. 0 < indicator A x / emeasure M A \<longleftrightarrow> x \<in> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. (0 < indicator A x / emeasure M A) = (x \<in> A)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
emeasure M A \<noteq> 0
emeasure M A < \<infinity>

goal (1 subgoal):
 1. \<And>x. (0 < indicator A x / emeasure M A) = (x \<in> A)
[PROOF STEP]
by (cases "emeasure M A") (auto split: split_indicator simp: ennreal_zero_less_divide)
[PROOF STATE]
proof (state)
this:
(0 < indicator A ?x / emeasure M A) = (?x \<in> A)

goal (1 subgoal):
 1. almost_everywhere (uniform_measure M A) P = set_almost_everywhere A M P
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
A \<in> sets M
(0 < indicator A ?x / emeasure M A) = (?x \<in> A)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
A \<in> sets M
(0 < indicator A ?x / emeasure M A) = (?x \<in> A)

goal (1 subgoal):
 1. almost_everywhere (uniform_measure M A) P = set_almost_everywhere A M P
[PROOF STEP]
unfolding uniform_measure_def
[PROOF STATE]
proof (prove)
using this:
A \<in> sets M
(0 < indicator A ?x / emeasure M A) = (?x \<in> A)

goal (1 subgoal):
 1. almost_everywhere (density M (\<lambda>x. indicator A x / emeasure M A)) P = set_almost_everywhere A M P
[PROOF STEP]
by (simp add: AE_density)
[PROOF STATE]
proof (state)
this:
almost_everywhere (uniform_measure M A) P = set_almost_everywhere A M P

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ewp_alt: "x\<^sup>\<omega> = 0 \<longleftrightarrow> (\<forall>y z. y \<le> x \<cdot> y + z \<longrightarrow> y \<le> x\<^sup>\<star> \<cdot> z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x\<^sup>\<omega> = (0::'a)) = (\<forall>y z. y \<le> x \<cdot> y + z \<longrightarrow> y \<le> x\<^sup>\<star> \<cdot> z)
[PROOF STEP]
by (metis annir order.antisym ewp_alt1 join.bot_least)


[STATEMENT]
lemma finite_Max:
  "finite (range (\<lambda>xa. abs_infty_q (poly.coeff (of_qr x) xa)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (range (\<lambda>xa. abs_infty_q (poly.coeff (of_qr x) xa)))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite (range (\<lambda>xa. abs_infty_q (poly.coeff (of_qr x) xa)))
[PROOF STEP]
have finite_range: "finite (range (\<lambda>xa. (poly.coeff (of_qr x) xa)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (range (poly.coeff (of_qr x)))
[PROOF STEP]
using MOST_coeff_eq_0[of "of_qr x"]
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>\<infinity>n. poly.coeff (of_qr x) n = 0

goal (1 subgoal):
 1. finite (range (poly.coeff (of_qr x)))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite (range (poly.coeff (of_qr x)))

goal (1 subgoal):
 1. finite (range (\<lambda>xa. abs_infty_q (poly.coeff (of_qr x) xa)))
[PROOF STEP]
have "range (\<lambda>xa. \<bar>to_int_mod_ring (poly.coeff (of_qr x) xa) mod+- q\<bar>)
    = (\<lambda>z. \<bar>to_int_mod_ring z mod+- q\<bar>) ` range (poly.coeff (of_qr x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. range (\<lambda>xa. \<bar>to_int_mod_ring (poly.coeff (of_qr x) xa) mod+- q\<bar>) = (\<lambda>z. \<bar>to_int_mod_ring z mod+- q\<bar>) ` range (poly.coeff (of_qr x))
[PROOF STEP]
using range_composition[of "(\<lambda>z. abs (to_int_mod_ring z mod+- q))"
    "poly.coeff (of_qr x)"]
[PROOF STATE]
proof (prove)
using this:
range (\<lambda>xa. \<bar>to_int_mod_ring (poly.coeff (of_qr x) xa) mod+- q\<bar>) = (\<lambda>z. \<bar>to_int_mod_ring z mod+- q\<bar>) ` range (poly.coeff (of_qr x))

goal (1 subgoal):
 1. range (\<lambda>xa. \<bar>to_int_mod_ring (poly.coeff (of_qr x) xa) mod+- q\<bar>) = (\<lambda>z. \<bar>to_int_mod_ring z mod+- q\<bar>) ` range (poly.coeff (of_qr x))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
range (\<lambda>xa. \<bar>to_int_mod_ring (poly.coeff (of_qr x) xa) mod+- q\<bar>) = (\<lambda>z. \<bar>to_int_mod_ring z mod+- q\<bar>) ` range (poly.coeff (of_qr x))

goal (1 subgoal):
 1. finite (range (\<lambda>xa. abs_infty_q (poly.coeff (of_qr x) xa)))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
range (\<lambda>xa. \<bar>to_int_mod_ring (poly.coeff (of_qr x) xa) mod+- q\<bar>) = (\<lambda>z. \<bar>to_int_mod_ring z mod+- q\<bar>) ` range (poly.coeff (of_qr x))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
range (\<lambda>xa. \<bar>to_int_mod_ring (poly.coeff (of_qr x) xa) mod+- q\<bar>) = (\<lambda>z. \<bar>to_int_mod_ring z mod+- q\<bar>) ` range (poly.coeff (of_qr x))

goal (1 subgoal):
 1. finite (range (\<lambda>xa. abs_infty_q (poly.coeff (of_qr x) xa)))
[PROOF STEP]
using finite_range finite_image_set[where
      f = "(\<lambda>z. abs (to_int_mod_ring z) mod+- q)"]
[PROOF STATE]
proof (prove)
using this:
range (\<lambda>xa. \<bar>to_int_mod_ring (poly.coeff (of_qr x) xa) mod+- q\<bar>) = (\<lambda>z. \<bar>to_int_mod_ring z mod+- q\<bar>) ` range (poly.coeff (of_qr x))
finite (range (poly.coeff (of_qr x)))
finite {x. ?P x} \<Longrightarrow> finite {\<bar>to_int_mod_ring x\<bar> mod+- q |x. ?P x}

goal (1 subgoal):
 1. finite (range (\<lambda>xa. abs_infty_q (poly.coeff (of_qr x) xa)))
[PROOF STEP]
by (auto simp add: abs_infty_q_def)
[PROOF STATE]
proof (state)
this:
finite (range (\<lambda>xa. abs_infty_q (poly.coeff (of_qr x) xa)))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Infinitesimal_mult_disj: "x * y \<in> Infinitesimal \<Longrightarrow> x \<in> Infinitesimal \<or> y \<in> Infinitesimal"
  for x y :: "'a::real_normed_div_algebra star"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x * y \<in> Infinitesimal \<Longrightarrow> x \<in> Infinitesimal \<or> y \<in> Infinitesimal
[PROOF STEP]
using not_Infinitesimal_mult
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?x \<notin> Infinitesimal; ?y \<notin> Infinitesimal\<rbrakk> \<Longrightarrow> ?x * ?y \<notin> Infinitesimal

goal (1 subgoal):
 1. x * y \<in> Infinitesimal \<Longrightarrow> x \<in> Infinitesimal \<or> y \<in> Infinitesimal
[PROOF STEP]
by blast


[STATEMENT]
lemma \<dd>_Shuffle[simp]:
  "\<dd> (Shuffle r s) = (\<lambda>a. Plus (Shuffle (\<dd> r a) s) (Shuffle r (\<dd> s a)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<dd> (Shuffle r s) = (\<lambda>a. Plus (Shuffle (\<dd> r a) s) (Shuffle r (\<dd> s a)))
[PROOF STEP]
unfolding Shuffle_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<dd> (Times_Plus (ShuffleLR r s)) = (\<lambda>a. Plus (Times_Plus (ShuffleLR (\<dd> r a) s)) (Times_Plus (ShuffleLR r (\<dd> s a))))
[PROOF STEP]
by auto


[STATEMENT]
lemma path_connectedin_subtopology:
     "path_connectedin (subtopology X S) T \<longleftrightarrow> path_connectedin X T \<and> T \<subseteq> S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_connectedin (subtopology X S) T = (path_connectedin X T \<and> T \<subseteq> S)
[PROOF STEP]
by (auto simp: path_connectedin_def subtopology_subtopology inf.absorb2)


[STATEMENT]
lemma pp_pp_inf_bot_iff:
  "x \<sqinter> y = bot \<longleftrightarrow> --x \<sqinter> --y = bot"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<sqinter> y = bot) = (- - x \<sqinter> - - y = bot)
[PROOF STEP]
by (simp add: pseudo_complement_pp)


[STATEMENT]
lemma principal_bot: "principal x = bot \<longleftrightarrow> x = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (principal x = \<bottom>) = (x = {})
[PROOF STEP]
by (auto simp: filter_eq_iff eventually_principal)


[STATEMENT]
lemma ni_dist_sup:
  "ni(x \<squnion> y) = ni(x) \<squnion> ni(y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ni (x \<squnion> y) = ni x \<squnion> ni y
[PROOF STEP]
by (simp add: mult_right_dist_sup n_dist_sup ni_def)


[STATEMENT]
lemma opset_sublist:
  assumes "opset (set (xs @ ys @ zs)) deps"
  shows "opset (set (xs @ zs)) deps"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. opset (set (xs @ zs)) deps
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. opset (set (xs @ zs)) deps
[PROOF STEP]
have "set (xs @ zs) \<subseteq> set (xs @ ys @ zs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (xs @ zs) \<subseteq> set (xs @ ys @ zs)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
set (xs @ zs) \<subseteq> set (xs @ ys @ zs)

goal (1 subgoal):
 1. opset (set (xs @ zs)) deps
[PROOF STEP]
thus "opset (set (xs @ zs)) deps"
[PROOF STATE]
proof (prove)
using this:
set (xs @ zs) \<subseteq> set (xs @ ys @ zs)

goal (1 subgoal):
 1. opset (set (xs @ zs)) deps
[PROOF STEP]
using assms opset_subset
[PROOF STATE]
proof (prove)
using this:
set (xs @ zs) \<subseteq> set (xs @ ys @ zs)
opset (set (xs @ ys @ zs)) deps
\<lbrakk>opset ?Y ?deps; ?X \<subseteq> ?Y\<rbrakk> \<Longrightarrow> opset ?X ?deps

goal (1 subgoal):
 1. opset (set (xs @ zs)) deps
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
opset (set (xs @ zs)) deps

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ordered_fmap_image:
  assumes "is_fmap S"
  shows "map (\<lambda>(a, b). (a, f a b)) (ordered_fmap S) = ordered_fmap ((\<lambda>(a, b). (a, f a b)) |`| S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map (\<lambda>(a, b). (a, f a b)) (ordered_fmap S) = ordered_fmap ((\<lambda>(a, b). (a, f a b)) |`| S)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
is_fmap S

goal (1 subgoal):
 1. map (\<lambda>(a, b). (a, f a b)) (ordered_fmap S) = ordered_fmap ((\<lambda>(a, b). (a, f a b)) |`| S)
[PROOF STEP]
by transfer (rule ordered_map_image)


[STATEMENT]
lemma bipartite_sym: "bipartite_graph V E Y X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bipartite_graph V E Y X
[PROOF STEP]
using partition ne edge_betw all_bi_edges_sym
[PROOF STATE]
proof (prove)
using this:
partition_on V {X, Y}
X \<noteq> Y
?e \<in> E \<Longrightarrow> ?e \<in> all_bi_edges X Y
all_bi_edges ?X ?Y = all_bi_edges ?Y ?X

goal (1 subgoal):
 1. bipartite_graph V E Y X
[PROOF STEP]
by (unfold_locales) (auto simp add: insert_commute)


[STATEMENT]
lemma point_has_unique_group: "x \<in> \<V> \<Longrightarrow> \<exists>!G. x \<in> G \<and> G \<in> \<G>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> \<V> \<Longrightarrow> \<exists>!G. x \<in> G \<and> G \<in> \<G>
[PROOF STEP]
using partition_on_partition_on_unique group_partitions
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>partition_on ?A ?P; ?x \<in> ?A\<rbrakk> \<Longrightarrow> \<exists>!X. ?x \<in> X \<and> X \<in> ?P
partition_on \<V> \<G>

goal (1 subgoal):
 1. x \<in> \<V> \<Longrightarrow> \<exists>!G. x \<in> G \<and> G \<in> \<G>
[PROOF STEP]
by fastforce