[STATEMENT]
lemma coplanar_6 :
  assumes "rk {A, B, C} = 3" and "rk {B, C, \<alpha>} = 2" and "rk {A, B, \<gamma>} = 2" and "rk {A, C, \<beta>} = 2"
  shows "rk {A, B, C, \<alpha>, \<beta>, \<gamma>} = 3"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rk {A, B, C, \<alpha>, \<beta>, \<gamma>} = 3
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. rk {A, B, C, \<alpha>, \<beta>, \<gamma>} = 3
[PROOF STEP]
have f1:"rk {A, B, C, \<alpha>, \<gamma>} = 3"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rk {A, B, C, \<alpha>, \<gamma>} = 3
[PROOF STEP]
using coplanar_5_bis assms(1) assms(2) assms(3)
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>rk {?A, ?B, ?C} = 3; rk {?B, ?C, ?\<alpha>} = 2; rk {?A, ?B, ?\<gamma>} = 2\<rbrakk> \<Longrightarrow> rk {?A, ?B, ?C, ?\<alpha>, ?\<gamma>} = 3
rk {A, B, C} = 3
rk {B, C, \<alpha>} = 2
rk {A, B, \<gamma>} = 2

goal (1 subgoal):
 1. rk {A, B, C, \<alpha>, \<gamma>} = 3
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
rk {A, B, C, \<alpha>, \<gamma>} = 3

goal (1 subgoal):
 1. rk {A, B, C, \<alpha>, \<beta>, \<gamma>} = 3
[PROOF STEP]
have f2:"rk {A, B, C, \<alpha>, \<beta>} = 3"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rk {A, B, C, \<alpha>, \<beta>} = 3
[PROOF STEP]
using coplanar_5 assms(1) assms(2) assms(4)
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>rk {?A, ?B, ?C} = 3; rk {?B, ?C, ?\<alpha>} = 2; rk {?A, ?C, ?\<beta>} = 2\<rbrakk> \<Longrightarrow> rk {?A, ?B, ?C, ?\<alpha>, ?\<beta>} = 3
rk {A, B, C} = 3
rk {B, C, \<alpha>} = 2
rk {A, C, \<beta>} = 2

goal (1 subgoal):
 1. rk {A, B, C, \<alpha>, \<beta>} = 3
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
rk {A, B, C, \<alpha>, \<beta>} = 3

goal (1 subgoal):
 1. rk {A, B, C, \<alpha>, \<beta>, \<gamma>} = 3
[PROOF STEP]
have f3:"rk {A, B, C, \<alpha>} = 3"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rk {A, B, C, \<alpha>} = 3
[PROOF STEP]
using coplanar_4 assms(1) assms(2)
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>rk {?A, ?B, ?C} = 3; rk {?B, ?C, ?\<alpha>} = 2\<rbrakk> \<Longrightarrow> rk {?A, ?B, ?C, ?\<alpha>} = 3
rk {A, B, C} = 3
rk {B, C, \<alpha>} = 2

goal (1 subgoal):
 1. rk {A, B, C, \<alpha>} = 3
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
rk {A, B, C, \<alpha>} = 3

goal (1 subgoal):
 1. rk {A, B, C, \<alpha>, \<beta>, \<gamma>} = 3
[PROOF STEP]
from f1 and f2 and f3
[PROOF STATE]
proof (chain)
picking this:
rk {A, B, C, \<alpha>, \<gamma>} = 3
rk {A, B, C, \<alpha>, \<beta>} = 3
rk {A, B, C, \<alpha>} = 3
[PROOF STEP]
show "rk {A, B, C, \<alpha>, \<beta>, \<gamma>} = 3"
[PROOF STATE]
proof (prove)
using this:
rk {A, B, C, \<alpha>, \<gamma>} = 3
rk {A, B, C, \<alpha>, \<beta>} = 3
rk {A, B, C, \<alpha>} = 3

goal (1 subgoal):
 1. rk {A, B, C, \<alpha>, \<beta>, \<gamma>} = 3
[PROOF STEP]
using matroid_ax_3_alt'[of "{A, B, C, \<alpha>}" "\<beta>" "\<gamma>"]
[PROOF STATE]
proof (prove)
using this:
rk {A, B, C, \<alpha>, \<gamma>} = 3
rk {A, B, C, \<alpha>, \<beta>} = 3
rk {A, B, C, \<alpha>} = 3
rk ({A, B, C, \<alpha>} \<union> {\<beta>}) = rk ({A, B, C, \<alpha>} \<union> {\<gamma>}) \<longrightarrow> rk ({A, B, C, \<alpha>} \<union> {\<gamma>}) = rk {A, B, C, \<alpha>} \<longrightarrow> rk {A, B, C, \<alpha>} = rk ({A, B, C, \<alpha>} \<union> {\<beta>, \<gamma>})

goal (1 subgoal):
 1. rk {A, B, C, \<alpha>, \<beta>, \<gamma>} = 3
[PROOF STEP]
by (metis Un_insert_left sup_bot.left_neutral)
[PROOF STATE]
proof (state)
this:
rk {A, B, C, \<alpha>, \<beta>, \<gamma>} = 3

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma avl_fib_bound_auto: "avl t \<Longrightarrow> fib (height t + 2) \<le> size1 t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. avl t \<Longrightarrow> fib (height t + 2) \<le> size1 t
[PROOF STEP]
proof (induction t rule: tree2_induct)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. avl \<langle>\<rangle> \<Longrightarrow> fib (height \<langle>\<rangle> + 2) \<le> size1 \<langle>\<rangle>
 2. \<And>x1 a b x3. \<lbrakk>avl x1 \<Longrightarrow> fib (height x1 + 2) \<le> size1 x1; avl x3 \<Longrightarrow> fib (height x3 + 2) \<le> size1 x3; avl \<langle>x1, (a, b), x3\<rangle>\<rbrakk> \<Longrightarrow> fib (height \<langle>x1, (a, b), x3\<rangle> + 2) \<le> size1 \<langle>x1, (a, b), x3\<rangle>
[PROOF STEP]
case Leaf
[PROOF STATE]
proof (state)
this:
avl \<langle>\<rangle>

goal (2 subgoals):
 1. avl \<langle>\<rangle> \<Longrightarrow> fib (height \<langle>\<rangle> + 2) \<le> size1 \<langle>\<rangle>
 2. \<And>x1 a b x3. \<lbrakk>avl x1 \<Longrightarrow> fib (height x1 + 2) \<le> size1 x1; avl x3 \<Longrightarrow> fib (height x3 + 2) \<le> size1 x3; avl \<langle>x1, (a, b), x3\<rangle>\<rbrakk> \<Longrightarrow> fib (height \<langle>x1, (a, b), x3\<rangle> + 2) \<le> size1 \<langle>x1, (a, b), x3\<rangle>
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
avl \<langle>\<rangle>

goal (1 subgoal):
 1. fib (height \<langle>\<rangle> + 2) \<le> size1 \<langle>\<rangle>
[PROOF STEP]
by (simp)
[PROOF STATE]
proof (state)
this:
fib (height \<langle>\<rangle> + 2) \<le> size1 \<langle>\<rangle>

goal (1 subgoal):
 1. \<And>x1 a b x3. \<lbrakk>avl x1 \<Longrightarrow> fib (height x1 + 2) \<le> size1 x1; avl x3 \<Longrightarrow> fib (height x3 + 2) \<le> size1 x3; avl \<langle>x1, (a, b), x3\<rangle>\<rbrakk> \<Longrightarrow> fib (height \<langle>x1, (a, b), x3\<rangle> + 2) \<le> size1 \<langle>x1, (a, b), x3\<rangle>
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x1 a b x3. \<lbrakk>avl x1 \<Longrightarrow> fib (height x1 + 2) \<le> size1 x1; avl x3 \<Longrightarrow> fib (height x3 + 2) \<le> size1 x3; avl \<langle>x1, (a, b), x3\<rangle>\<rbrakk> \<Longrightarrow> fib (height \<langle>x1, (a, b), x3\<rangle> + 2) \<le> size1 \<langle>x1, (a, b), x3\<rangle>
[PROOF STEP]
case (Node l a h r)
[PROOF STATE]
proof (state)
this:
avl l \<Longrightarrow> fib (height l + 2) \<le> size1 l
avl r \<Longrightarrow> fib (height r + 2) \<le> size1 r
avl \<langle>l, (a, h), r\<rangle>

goal (1 subgoal):
 1. \<And>x1 a b x3. \<lbrakk>avl x1 \<Longrightarrow> fib (height x1 + 2) \<le> size1 x1; avl x3 \<Longrightarrow> fib (height x3 + 2) \<le> size1 x3; avl \<langle>x1, (a, b), x3\<rangle>\<rbrakk> \<Longrightarrow> fib (height \<langle>x1, (a, b), x3\<rangle> + 2) \<le> size1 \<langle>x1, (a, b), x3\<rangle>
[PROOF STEP]
have 1: "height l + 1 \<le> height r + 2" and 2: "height r + 1 \<le> height l + 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. height l + 1 \<le> height r + 2 &&& height r + 1 \<le> height l + 2
[PROOF STEP]
using Node.prems
[PROOF STATE]
proof (prove)
using this:
avl \<langle>l, (a, h), r\<rangle>

goal (1 subgoal):
 1. height l + 1 \<le> height r + 2 &&& height r + 1 \<le> height l + 2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
height l + 1 \<le> height r + 2
height r + 1 \<le> height l + 2

goal (1 subgoal):
 1. \<And>x1 a b x3. \<lbrakk>avl x1 \<Longrightarrow> fib (height x1 + 2) \<le> size1 x1; avl x3 \<Longrightarrow> fib (height x3 + 2) \<le> size1 x3; avl \<langle>x1, (a, b), x3\<rangle>\<rbrakk> \<Longrightarrow> fib (height \<langle>x1, (a, b), x3\<rangle> + 2) \<le> size1 \<langle>x1, (a, b), x3\<rangle>
[PROOF STEP]
have left: "height l \<ge> height r \<Longrightarrow> ?case" (is "?asm \<Longrightarrow> _")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. height r \<le> height l \<Longrightarrow> fib (height \<langle>l, (a, h), r\<rangle> + 2) \<le> size1 \<langle>l, (a, h), r\<rangle>
[PROOF STEP]
using Node fib_mono[OF 1]
[PROOF STATE]
proof (prove)
using this:
avl l \<Longrightarrow> fib (height l + 2) \<le> size1 l
avl r \<Longrightarrow> fib (height r + 2) \<le> size1 r
avl \<langle>l, (a, h), r\<rangle>
fib (height l + 1) \<le> fib (height r + 2)

goal (1 subgoal):
 1. height r \<le> height l \<Longrightarrow> fib (height \<langle>l, (a, h), r\<rangle> + 2) \<le> size1 \<langle>l, (a, h), r\<rangle>
[PROOF STEP]
by (simp add: max.absorb1)
[PROOF STATE]
proof (state)
this:
height r \<le> height l \<Longrightarrow> fib (height \<langle>l, (a, h), r\<rangle> + 2) \<le> size1 \<langle>l, (a, h), r\<rangle>

goal (1 subgoal):
 1. \<And>x1 a b x3. \<lbrakk>avl x1 \<Longrightarrow> fib (height x1 + 2) \<le> size1 x1; avl x3 \<Longrightarrow> fib (height x3 + 2) \<le> size1 x3; avl \<langle>x1, (a, b), x3\<rangle>\<rbrakk> \<Longrightarrow> fib (height \<langle>x1, (a, b), x3\<rangle> + 2) \<le> size1 \<langle>x1, (a, b), x3\<rangle>
[PROOF STEP]
have right: "height l \<le> height r \<Longrightarrow> ?case"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. height l \<le> height r \<Longrightarrow> fib (height \<langle>l, (a, h), r\<rangle> + 2) \<le> size1 \<langle>l, (a, h), r\<rangle>
[PROOF STEP]
using Node fib_mono[OF 2]
[PROOF STATE]
proof (prove)
using this:
avl l \<Longrightarrow> fib (height l + 2) \<le> size1 l
avl r \<Longrightarrow> fib (height r + 2) \<le> size1 r
avl \<langle>l, (a, h), r\<rangle>
fib (height r + 1) \<le> fib (height l + 2)

goal (1 subgoal):
 1. height l \<le> height r \<Longrightarrow> fib (height \<langle>l, (a, h), r\<rangle> + 2) \<le> size1 \<langle>l, (a, h), r\<rangle>
[PROOF STEP]
by (simp add: max.absorb2)
[PROOF STATE]
proof (state)
this:
height l \<le> height r \<Longrightarrow> fib (height \<langle>l, (a, h), r\<rangle> + 2) \<le> size1 \<langle>l, (a, h), r\<rangle>

goal (1 subgoal):
 1. \<And>x1 a b x3. \<lbrakk>avl x1 \<Longrightarrow> fib (height x1 + 2) \<le> size1 x1; avl x3 \<Longrightarrow> fib (height x3 + 2) \<le> size1 x3; avl \<langle>x1, (a, b), x3\<rangle>\<rbrakk> \<Longrightarrow> fib (height \<langle>x1, (a, b), x3\<rangle> + 2) \<le> size1 \<langle>x1, (a, b), x3\<rangle>
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fib (height \<langle>l, (a, h), r\<rangle> + 2) \<le> size1 \<langle>l, (a, h), r\<rangle>
[PROOF STEP]
using left right
[PROOF STATE]
proof (prove)
using this:
height r \<le> height l \<Longrightarrow> fib (height \<langle>l, (a, h), r\<rangle> + 2) \<le> size1 \<langle>l, (a, h), r\<rangle>
height l \<le> height r \<Longrightarrow> fib (height \<langle>l, (a, h), r\<rangle> + 2) \<le> size1 \<langle>l, (a, h), r\<rangle>

goal (1 subgoal):
 1. fib (height \<langle>l, (a, h), r\<rangle> + 2) \<le> size1 \<langle>l, (a, h), r\<rangle>
[PROOF STEP]
using Node.prems
[PROOF STATE]
proof (prove)
using this:
height r \<le> height l \<Longrightarrow> fib (height \<langle>l, (a, h), r\<rangle> + 2) \<le> size1 \<langle>l, (a, h), r\<rangle>
height l \<le> height r \<Longrightarrow> fib (height \<langle>l, (a, h), r\<rangle> + 2) \<le> size1 \<langle>l, (a, h), r\<rangle>
avl \<langle>l, (a, h), r\<rangle>

goal (1 subgoal):
 1. fib (height \<langle>l, (a, h), r\<rangle> + 2) \<le> size1 \<langle>l, (a, h), r\<rangle>
[PROOF STEP]
by simp linarith
[PROOF STATE]
proof (state)
this:
fib (height \<langle>l, (a, h), r\<rangle> + 2) \<le> size1 \<langle>l, (a, h), r\<rangle>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma midpoint_idem [simp]: "midpoint x x = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. midpoint x x = x
[PROOF STEP]
unfolding midpoint_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x + x) /\<^sub>R 2 = x
[PROOF STEP]
by simp


[STATEMENT]
lemma dist_s_mtf[simp]: "distinct(s_mtf n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distinct (s_mtf n)
[PROOF STEP]
apply(induction n)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. distinct (s_mtf 0)
 2. \<And>n. distinct (s_mtf n) \<Longrightarrow> distinct (s_mtf (Suc n))
[PROOF STEP]
apply (simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n. distinct (s_mtf n) \<Longrightarrow> distinct (s_mtf (Suc n))
[PROOF STEP]
apply (auto simp: mtf_def index_take set_drop_if_index)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n x. \<lbrakk>distinct (s_mtf n); rs ! n \<in> set (s_mtf n); x \<in> set (take (index (s_mtf n) (rs ! n)) (s_mtf n)); x \<in> set (drop (Suc (index (s_mtf n) (rs ! n))) (s_mtf n))\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply (metis set_drop_if_index index_take less_Suc_eq_le linear)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma LIMSEQ_indicator_UN:
  "(\<lambda>k. indicator (\<Union>i<k. A i) x :: 'a::{topological_space,zero_neq_one}) \<longlonglongrightarrow> indicator (\<Union>i. A i) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>k. indicator (\<Union> (A ` {..<k})) x) \<longlonglongrightarrow> indicator (\<Union> (range A)) x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>k. indicator (\<Union> (A ` {..<k})) x) \<longlonglongrightarrow> indicator (\<Union> (range A)) x
[PROOF STEP]
have "(\<lambda>k. indicator (\<Union>i<k. A i) x::'a) \<longlonglongrightarrow> indicator (\<Union>k. \<Union>i<k. A i) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>k. indicator (\<Union> (A ` {..<k})) x) \<longlonglongrightarrow> indicator (\<Union>k. \<Union> (A ` {..<k})) x
[PROOF STEP]
by (intro LIMSEQ_indicator_incseq) (auto simp: incseq_def intro: less_le_trans)
[PROOF STATE]
proof (state)
this:
(\<lambda>k. indicator (\<Union> (A ` {..<k})) x) \<longlonglongrightarrow> indicator (\<Union>k. \<Union> (A ` {..<k})) x

goal (1 subgoal):
 1. (\<lambda>k. indicator (\<Union> (A ` {..<k})) x) \<longlonglongrightarrow> indicator (\<Union> (range A)) x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>k. indicator (\<Union> (A ` {..<k})) x) \<longlonglongrightarrow> indicator (\<Union>k. \<Union> (A ` {..<k})) x

goal (1 subgoal):
 1. (\<lambda>k. indicator (\<Union> (A ` {..<k})) x) \<longlonglongrightarrow> indicator (\<Union> (range A)) x
[PROOF STEP]
have "(\<Union>k. \<Union>i<k. A i) = (\<Union>i. A i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Union>k. \<Union> (A ` {..<k})) = \<Union> (range A)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Union>k. \<Union> (A ` {..<k})) = \<Union> (range A)

goal (1 subgoal):
 1. (\<lambda>k. indicator (\<Union> (A ` {..<k})) x) \<longlonglongrightarrow> indicator (\<Union> (range A)) x
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>k. indicator (\<Union> (A ` {..<k})) x) \<longlonglongrightarrow> indicator (\<Union> (range A)) x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>k. indicator (\<Union> (A ` {..<k})) x) \<longlonglongrightarrow> indicator (\<Union> (range A)) x

goal (1 subgoal):
 1. (\<lambda>k. indicator (\<Union> (A ` {..<k})) x) \<longlonglongrightarrow> indicator (\<Union> (range A)) x
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<lambda>k. indicator (\<Union> (A ` {..<k})) x) \<longlonglongrightarrow> indicator (\<Union> (range A)) x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem sin_product_formula_complex:
  fixes z :: complex
  shows "(\<lambda>n. of_real pi * z * (\<Prod>k=1..n. 1 - z^2 / of_nat k^2)) \<longlonglongrightarrow> sin (of_real pi * z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. complex_of_real pi * z * (\<Prod>k = 1..n. 1 - z\<^sup>2 / (of_nat k)\<^sup>2)) \<longlonglongrightarrow> sin (complex_of_real pi * z)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>n. complex_of_real pi * z * (\<Prod>k = 1..n. 1 - z\<^sup>2 / (of_nat k)\<^sup>2)) \<longlonglongrightarrow> sin (complex_of_real pi * z)
[PROOF STEP]
let ?f = "rGamma_series_Weierstrass"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>n. complex_of_real pi * z * (\<Prod>k = 1..n. 1 - z\<^sup>2 / (of_nat k)\<^sup>2)) \<longlonglongrightarrow> sin (complex_of_real pi * z)
[PROOF STEP]
have "(\<lambda>n. (- of_real pi * inverse z) * (?f z n * ?f (- z) n))
            \<longlonglongrightarrow> (- of_real pi * inverse z) * (rGamma z * rGamma (- z))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. - complex_of_real pi * inverse z * (rGamma_series_Weierstrass z n * rGamma_series_Weierstrass (- z) n)) \<longlonglongrightarrow> - complex_of_real pi * inverse z * (rGamma z * rGamma (- z))
[PROOF STEP]
by (intro tendsto_intros rGamma_Weierstrass_complex)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. - complex_of_real pi * inverse z * (rGamma_series_Weierstrass z n * rGamma_series_Weierstrass (- z) n)) \<longlonglongrightarrow> - complex_of_real pi * inverse z * (rGamma z * rGamma (- z))

goal (1 subgoal):
 1. (\<lambda>n. complex_of_real pi * z * (\<Prod>k = 1..n. 1 - z\<^sup>2 / (of_nat k)\<^sup>2)) \<longlonglongrightarrow> sin (complex_of_real pi * z)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>n. - complex_of_real pi * inverse z * (rGamma_series_Weierstrass z n * rGamma_series_Weierstrass (- z) n)) \<longlonglongrightarrow> - complex_of_real pi * inverse z * (rGamma z * rGamma (- z))

goal (1 subgoal):
 1. (\<lambda>n. complex_of_real pi * z * (\<Prod>k = 1..n. 1 - z\<^sup>2 / (of_nat k)\<^sup>2)) \<longlonglongrightarrow> sin (complex_of_real pi * z)
[PROOF STEP]
have "(\<lambda>n. (- of_real pi * inverse z) * (?f z n * ?f (-z) n)) =
                    (\<lambda>n. of_real pi * z * (\<Prod>k=1..n. 1 - z^2 / of_nat k ^ 2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. - complex_of_real pi * inverse z * (rGamma_series_Weierstrass z n * rGamma_series_Weierstrass (- z) n)) = (\<lambda>n. complex_of_real pi * z * (\<Prod>k = 1..n. 1 - z\<^sup>2 / (of_nat k)\<^sup>2))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. - complex_of_real pi * inverse z * (rGamma_series_Weierstrass z n * rGamma_series_Weierstrass (- z) n) = complex_of_real pi * z * (\<Prod>k = 1..n. 1 - z\<^sup>2 / (of_nat k)\<^sup>2)
[PROOF STEP]
fix n :: nat
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. - complex_of_real pi * inverse z * (rGamma_series_Weierstrass z n * rGamma_series_Weierstrass (- z) n) = complex_of_real pi * z * (\<Prod>k = 1..n. 1 - z\<^sup>2 / (of_nat k)\<^sup>2)
[PROOF STEP]
have "(- of_real pi * inverse z) * (?f z n * ?f (-z) n) =
              of_real pi * z * (\<Prod>k=1..n. (of_nat k - z) * (of_nat k + z) / of_nat k ^ 2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - complex_of_real pi * inverse z * (rGamma_series_Weierstrass z n * rGamma_series_Weierstrass (- z) n) = complex_of_real pi * z * (\<Prod>k = 1..n. (of_nat k - z) * (of_nat k + z) / (of_nat k)\<^sup>2)
[PROOF STEP]
by (simp add: rGamma_series_Weierstrass_def mult_ac exp_minus
                    divide_simps prod.distrib[symmetric] power2_eq_square)
[PROOF STATE]
proof (state)
this:
- complex_of_real pi * inverse z * (rGamma_series_Weierstrass z n * rGamma_series_Weierstrass (- z) n) = complex_of_real pi * z * (\<Prod>k = 1..n. (of_nat k - z) * (of_nat k + z) / (of_nat k)\<^sup>2)

goal (1 subgoal):
 1. \<And>n. - complex_of_real pi * inverse z * (rGamma_series_Weierstrass z n * rGamma_series_Weierstrass (- z) n) = complex_of_real pi * z * (\<Prod>k = 1..n. 1 - z\<^sup>2 / (of_nat k)\<^sup>2)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
- complex_of_real pi * inverse z * (rGamma_series_Weierstrass z n * rGamma_series_Weierstrass (- z) n) = complex_of_real pi * z * (\<Prod>k = 1..n. (of_nat k - z) * (of_nat k + z) / (of_nat k)\<^sup>2)

goal (1 subgoal):
 1. \<And>n. - complex_of_real pi * inverse z * (rGamma_series_Weierstrass z n * rGamma_series_Weierstrass (- z) n) = complex_of_real pi * z * (\<Prod>k = 1..n. 1 - z\<^sup>2 / (of_nat k)\<^sup>2)
[PROOF STEP]
have "(\<Prod>k=1..n. (of_nat k - z) * (of_nat k + z) / of_nat k ^ 2) =
                 (\<Prod>k=1..n. 1 - z^2 / of_nat k ^ 2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Prod>k = 1..n. (of_nat k - z) * (of_nat k + z) / (of_nat k)\<^sup>2) = (\<Prod>k = 1..n. 1 - z\<^sup>2 / (of_nat k)\<^sup>2)
[PROOF STEP]
by (intro prod.cong) (simp_all add: power2_eq_square field_simps)
[PROOF STATE]
proof (state)
this:
(\<Prod>k = 1..n. (of_nat k - z) * (of_nat k + z) / (of_nat k)\<^sup>2) = (\<Prod>k = 1..n. 1 - z\<^sup>2 / (of_nat k)\<^sup>2)

goal (1 subgoal):
 1. \<And>n. - complex_of_real pi * inverse z * (rGamma_series_Weierstrass z n * rGamma_series_Weierstrass (- z) n) = complex_of_real pi * z * (\<Prod>k = 1..n. 1 - z\<^sup>2 / (of_nat k)\<^sup>2)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
- complex_of_real pi * inverse z * (rGamma_series_Weierstrass z n * rGamma_series_Weierstrass (- z) n) = complex_of_real pi * z * (\<Prod>k = 1..n. 1 - z\<^sup>2 / (of_nat k)\<^sup>2)
[PROOF STEP]
show "(- of_real pi * inverse z) * (?f z n * ?f (-z) n) = of_real pi * z * \<dots>"
[PROOF STATE]
proof (prove)
using this:
- complex_of_real pi * inverse z * (rGamma_series_Weierstrass z n * rGamma_series_Weierstrass (- z) n) = complex_of_real pi * z * (\<Prod>k = 1..n. 1 - z\<^sup>2 / (of_nat k)\<^sup>2)

goal (1 subgoal):
 1. - complex_of_real pi * inverse z * (rGamma_series_Weierstrass z n * rGamma_series_Weierstrass (- z) n) = complex_of_real pi * z * (\<Prod>k = 1..n. 1 - z\<^sup>2 / (of_nat k)\<^sup>2)
[PROOF STEP]
by (simp add: field_split_simps)
[PROOF STATE]
proof (state)
this:
- complex_of_real pi * inverse z * (rGamma_series_Weierstrass z n * rGamma_series_Weierstrass (- z) n) = complex_of_real pi * z * (\<Prod>k = 1..n. 1 - z\<^sup>2 / (of_nat k)\<^sup>2)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>n. - complex_of_real pi * inverse z * (rGamma_series_Weierstrass z n * rGamma_series_Weierstrass (- z) n)) = (\<lambda>n. complex_of_real pi * z * (\<Prod>k = 1..n. 1 - z\<^sup>2 / (of_nat k)\<^sup>2))

goal (1 subgoal):
 1. (\<lambda>n. complex_of_real pi * z * (\<Prod>k = 1..n. 1 - z\<^sup>2 / (of_nat k)\<^sup>2)) \<longlonglongrightarrow> sin (complex_of_real pi * z)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>n. - complex_of_real pi * inverse z * (rGamma_series_Weierstrass z n * rGamma_series_Weierstrass (- z) n)) = (\<lambda>n. complex_of_real pi * z * (\<Prod>k = 1..n. 1 - z\<^sup>2 / (of_nat k)\<^sup>2))

goal (1 subgoal):
 1. (\<lambda>n. complex_of_real pi * z * (\<Prod>k = 1..n. 1 - z\<^sup>2 / (of_nat k)\<^sup>2)) \<longlonglongrightarrow> sin (complex_of_real pi * z)
[PROOF STEP]
have "(- of_real pi * inverse z) * (rGamma z * rGamma (- z)) = sin (of_real pi * z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - complex_of_real pi * inverse z * (rGamma z * rGamma (- z)) = sin (complex_of_real pi * z)
[PROOF STEP]
by (subst rGamma_reflection_complex') (simp add: field_split_simps)
[PROOF STATE]
proof (state)
this:
- complex_of_real pi * inverse z * (rGamma z * rGamma (- z)) = sin (complex_of_real pi * z)

goal (1 subgoal):
 1. (\<lambda>n. complex_of_real pi * z * (\<Prod>k = 1..n. 1 - z\<^sup>2 / (of_nat k)\<^sup>2)) \<longlonglongrightarrow> sin (complex_of_real pi * z)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. complex_of_real pi * z * (\<Prod>k = 1..n. 1 - z\<^sup>2 / (of_nat k)\<^sup>2)) \<longlonglongrightarrow> sin (complex_of_real pi * z)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. complex_of_real pi * z * (\<Prod>k = 1..n. 1 - z\<^sup>2 / (of_nat k)\<^sup>2)) \<longlonglongrightarrow> sin (complex_of_real pi * z)

goal (1 subgoal):
 1. (\<lambda>n. complex_of_real pi * z * (\<Prod>k = 1..n. 1 - z\<^sup>2 / (of_nat k)\<^sup>2)) \<longlonglongrightarrow> sin (complex_of_real pi * z)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<lambda>n. complex_of_real pi * z * (\<Prod>k = 1..n. 1 - z\<^sup>2 / (of_nat k)\<^sup>2)) \<longlonglongrightarrow> sin (complex_of_real pi * z)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma monotone_SUP:
  "\<lbrakk> monotone ord (\<subseteq>) f; \<And>y. monotone ord (\<le>) (\<lambda>x. g x y) \<rbrakk> \<Longrightarrow> monotone ord (\<le>) (\<lambda>x. \<Squnion>y\<in>f x. g x y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>monotone ord (\<subseteq>) f; \<And>y. monotone ord (\<le>) (\<lambda>x. g x y)\<rbrakk> \<Longrightarrow> monotone ord (\<le>) (\<lambda>x. \<Squnion> (g x ` f x))
[PROOF STEP]
by(rule monotoneI)(blast dest: monotoneD intro: Sup_upper order_trans intro!: Sup_least)


[STATEMENT]
lemma enn2real_mono: "a \<le> b \<Longrightarrow> b < top \<Longrightarrow> enn2real a \<le> enn2real b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<le> b; b < top\<rbrakk> \<Longrightarrow> enn2real a \<le> enn2real b
[PROOF STEP]
by (auto simp add: enn2real_def less_eq_ennreal.rep_eq intro!: real_of_ereal_positive_mono enn2ereal_nonneg)


[STATEMENT]
lemma foldli_size_abort_aux:
    "\<lbrakk>n0\<le>m; distinct l\<rbrakk> \<Longrightarrow>
      foldli l (\<lambda>n. n<m) (\<lambda>_ n. Suc n) n0 = min m (n0 + card (set l))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>n0 \<le> m; distinct l\<rbrakk> \<Longrightarrow> foldli l (\<lambda>n. n < m) (\<lambda>_. Suc) n0 = min m (n0 + card (set l))
[PROOF STEP]
apply (induct l arbitrary: n0)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>n0. \<lbrakk>n0 \<le> m; distinct []\<rbrakk> \<Longrightarrow> foldli [] (\<lambda>n. n < m) (\<lambda>_. Suc) n0 = min m (n0 + card (set []))
 2. \<And>a l n0. \<lbrakk>\<And>n0. \<lbrakk>n0 \<le> m; distinct l\<rbrakk> \<Longrightarrow> foldli l (\<lambda>n. n < m) (\<lambda>_. Suc) n0 = min m (n0 + card (set l)); n0 \<le> m; distinct (a # l)\<rbrakk> \<Longrightarrow> foldli (a # l) (\<lambda>n. n < m) (\<lambda>_. Suc) n0 = min m (n0 + card (set (a # l)))
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma open_map_imp_subset:
    "\<lbrakk>open_map X1 X2 f; S \<subseteq> topspace X1\<rbrakk> \<Longrightarrow> f ` S \<subseteq> topspace X2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>open_map X1 X2 f; S \<subseteq> topspace X1\<rbrakk> \<Longrightarrow> f ` S \<subseteq> topspace X2
[PROOF STEP]
by (meson order_trans open_map_imp_subset_topspace subset_image_iff)


[STATEMENT]
lemma finvimage_fcomp: "(g \<circ>\<^sub>\<bullet> f) -`\<^sub>\<bullet> x = f -`\<^sub>\<bullet> (g -`\<^sub>\<bullet> x) "
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (g \<circ>\<^sub>\<bullet> f) -`\<^sub>\<bullet> x = f -`\<^sub>\<bullet> g -`\<^sub>\<bullet> x
[PROOF STEP]
by (simp add: finvimage_def fconverse_fcomp fcomp_fimage)


[STATEMENT]
theorem ax_sound:
 "wf_prog G \<Longrightarrow> G,(A::'a triple set)|\<turnstile>(ts::'a triple set) \<Longrightarrow> G,A|\<Turnstile>ts"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>wf_prog G; G,A|\<turnstile>ts\<rbrakk> \<Longrightarrow> G,A|\<Turnstile>ts
[PROOF STEP]
apply (subst ax_valids2_eq [symmetric])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>wf_prog G; G,A|\<turnstile>ts\<rbrakk> \<Longrightarrow> wf_prog G
 2. \<lbrakk>wf_prog G; G,A|\<turnstile>ts\<rbrakk> \<Longrightarrow> G,A|\<Turnstile>\<Colon>ts
[PROOF STEP]
apply  assumption
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>wf_prog G; G,A|\<turnstile>ts\<rbrakk> \<Longrightarrow> G,A|\<Turnstile>\<Colon>ts
[PROOF STEP]
apply (erule (1) ax_sound2)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma hyp_inverse_divide_1 [divide_simps]:
  fixes a :: "('a :: {inverse, comm_ring_1, division_ring}) hyperdual"
  shows "inverse a = 1 / a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inverse a = 1 / a
[PROOF STEP]
by (simp add: hyp_divide_inverse)


[STATEMENT]
lemma path_connected_eq_connected_space:
   "locally_path_connected_space X
         \<Longrightarrow> path_connected_space X \<longleftrightarrow> connected_space X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. locally_path_connected_space X \<Longrightarrow> path_connected_space X = connected_space X
[PROOF STEP]
by (metis connected_components_of_subset_sing path_components_eq_connected_components_of path_components_of_subset_singleton)


[STATEMENT]
lemma in_out_arcs_reflexive: "v \<in> verts G \<Longrightarrow> (e \<in> (in_arcs G v) \<Longrightarrow>
    \<exists> e' . (e' \<in> (out_arcs G v) \<and> head G e' = tail G e))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>v \<in> verts G; e \<in> in_arcs G v\<rbrakk> \<Longrightarrow> \<exists>e'. e' \<in> out_arcs G v \<and> head G e' = tail G e
[PROOF STEP]
using symmetric_conv sym_arcs
[PROOF STATE]
proof (prove)
using this:
symmetric ?G = (\<forall>e1\<in>arcs ?G. \<exists>e2\<in>arcs ?G. tail ?G e1 = head ?G e2 \<and> head ?G e1 = tail ?G e2)
symmetric G

goal (1 subgoal):
 1. \<lbrakk>v \<in> verts G; e \<in> in_arcs G v\<rbrakk> \<Longrightarrow> \<exists>e'. e' \<in> out_arcs G v \<and> head G e' = tail G e
[PROOF STEP]
by fastforce


[STATEMENT]
lemma rank_hinsert [simp]: "rank (b \<triangleleft> a) = rank b \<squnion> succ(rank a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rank (b \<triangleleft> a) = rank b \<squnion> succ (rank a)
[PROOF STEP]
by (metis hinsert_eq_sup rank_singleton rank_sup)


[STATEMENT]
lemma Liminf_add_ereal_right:
  "F \<noteq> bot \<Longrightarrow> abs c \<noteq> \<infinity> \<Longrightarrow> Liminf F (\<lambda>n. g n + (c :: ereal)) = Liminf F g + c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>F \<noteq> bot; \<bar>c\<bar> \<noteq> \<infinity>\<rbrakk> \<Longrightarrow> Liminf F (\<lambda>n. g n + c) = Liminf F g + c
[PROOF STEP]
by (rule Liminf_compose_continuous_mono) (auto simp: mono_def add_mono continuous_on_def)


[STATEMENT]
lemma big_add_masks_asso:
  "big_add_masks A (big_add_masks B C) = big_add_masks (big_add_masks A B) C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. big_add_masks A (big_add_masks B C) = big_add_masks (big_add_masks A B) C
[PROOF STEP]
proof (rule ext)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. big_add_masks A (big_add_masks B C) x = big_add_masks (big_add_masks A B) C x
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. big_add_masks A (big_add_masks B C) x = big_add_masks (big_add_masks A B) C x
[PROOF STEP]
show "big_add_masks A (big_add_masks B C) x = big_add_masks (big_add_masks A B) C x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. big_add_masks A (big_add_masks B C) x = big_add_masks (big_add_masks A B) C x
[PROOF STEP]
by (simp add: add_masks_asso big_add_masks_def)
[PROOF STATE]
proof (state)
this:
big_add_masks A (big_add_masks B C) x = big_add_masks (big_add_masks A B) C x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma not_prefix_longer:
  "\<lbrakk> length xs > length ys \<rbrakk> \<Longrightarrow> \<not> prefix xs ys"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length ys < length xs \<Longrightarrow> \<not> prefix xs ys
[PROOF STEP]
by (clarsimp dest!: prefix_length_le)


[STATEMENT]
lemma de_morgan_orthogonal_complement_plus:
  fixes A B::"('a::complex_inner) set"
  assumes \<open>0 \<in> A\<close> and \<open>0 \<in> B\<close>
  shows \<open>orthogonal_complement (A +\<^sub>M B) = orthogonal_complement A \<inter> orthogonal_complement B\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. orthogonal_complement (A +\<^sub>M B) = orthogonal_complement A \<inter> orthogonal_complement B
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. orthogonal_complement (A +\<^sub>M B) = orthogonal_complement A \<inter> orthogonal_complement B
[PROOF STEP]
have "x \<in> (orthogonal_complement A) \<inter> (orthogonal_complement B)"
    if "x \<in> orthogonal_complement (A +\<^sub>M B)" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> orthogonal_complement A \<inter> orthogonal_complement B
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x \<in> orthogonal_complement A \<inter> orthogonal_complement B
[PROOF STEP]
have \<open>orthogonal_complement (A +\<^sub>M B) = orthogonal_complement (A + B)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. orthogonal_complement (A +\<^sub>M B) = orthogonal_complement (A + B)
[PROOF STEP]
unfolding closed_sum_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. orthogonal_complement (closure (A + B)) = orthogonal_complement (A + B)
[PROOF STEP]
by (subst orthogonal_complement_of_closure[symmetric], simp)
[PROOF STATE]
proof (state)
this:
orthogonal_complement (A +\<^sub>M B) = orthogonal_complement (A + B)

goal (1 subgoal):
 1. x \<in> orthogonal_complement A \<inter> orthogonal_complement B
[PROOF STEP]
hence \<open>x \<in> orthogonal_complement (A + B)\<close>
[PROOF STATE]
proof (prove)
using this:
orthogonal_complement (A +\<^sub>M B) = orthogonal_complement (A + B)

goal (1 subgoal):
 1. x \<in> orthogonal_complement (A + B)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
orthogonal_complement (A +\<^sub>M B) = orthogonal_complement (A + B)
x \<in> orthogonal_complement (A +\<^sub>M B)

goal (1 subgoal):
 1. x \<in> orthogonal_complement (A + B)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<in> orthogonal_complement (A + B)

goal (1 subgoal):
 1. x \<in> orthogonal_complement A \<inter> orthogonal_complement B
[PROOF STEP]
hence t1: \<open>\<forall>z \<in> (A + B). (z \<bullet>\<^sub>C x) = 0\<close>
[PROOF STATE]
proof (prove)
using this:
x \<in> orthogonal_complement (A + B)

goal (1 subgoal):
 1. \<forall>z\<in>A + B. is_orthogonal z x
[PROOF STEP]
by (simp add: orthogonal_complement_orthoI')
[PROOF STATE]
proof (state)
this:
\<forall>z\<in>A + B. is_orthogonal z x

goal (1 subgoal):
 1. x \<in> orthogonal_complement A \<inter> orthogonal_complement B
[PROOF STEP]
have \<open>A \<subseteq> A + B\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<subseteq> A + B
[PROOF STEP]
using subset_iff add.commute set_zero_plus2 \<open>0 \<in> B\<close>
[PROOF STATE]
proof (prove)
using this:
(?A \<subseteq> ?B) = (\<forall>t. t \<in> ?A \<longrightarrow> t \<in> ?B)
?a + ?b = ?b + ?a
(0::?'a) \<in> ?A \<Longrightarrow> ?B \<subseteq> ?A + ?B
(0::'a) \<in> B

goal (1 subgoal):
 1. A \<subseteq> A + B
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
A \<subseteq> A + B

goal (1 subgoal):
 1. x \<in> orthogonal_complement A \<inter> orthogonal_complement B
[PROOF STEP]
hence \<open>\<forall>z \<in> A. (z \<bullet>\<^sub>C x) = 0\<close>
[PROOF STATE]
proof (prove)
using this:
A \<subseteq> A + B

goal (1 subgoal):
 1. \<forall>z\<in>A. is_orthogonal z x
[PROOF STEP]
using t1
[PROOF STATE]
proof (prove)
using this:
A \<subseteq> A + B
\<forall>z\<in>A + B. is_orthogonal z x

goal (1 subgoal):
 1. \<forall>z\<in>A. is_orthogonal z x
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>z\<in>A. is_orthogonal z x

goal (1 subgoal):
 1. x \<in> orthogonal_complement A \<inter> orthogonal_complement B
[PROOF STEP]
hence w1: \<open>x \<in> (orthogonal_complement A)\<close>
[PROOF STATE]
proof (prove)
using this:
\<forall>z\<in>A. is_orthogonal z x

goal (1 subgoal):
 1. x \<in> orthogonal_complement A
[PROOF STEP]
by (smt mem_Collect_eq is_orthogonal_sym orthogonal_complement_def)
[PROOF STATE]
proof (state)
this:
x \<in> orthogonal_complement A

goal (1 subgoal):
 1. x \<in> orthogonal_complement A \<inter> orthogonal_complement B
[PROOF STEP]
have \<open>B \<subseteq> A + B\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. B \<subseteq> A + B
[PROOF STEP]
using \<open>0 \<in> A\<close> subset_iff set_zero_plus2
[PROOF STATE]
proof (prove)
using this:
(0::'a) \<in> A
(?A \<subseteq> ?B) = (\<forall>t. t \<in> ?A \<longrightarrow> t \<in> ?B)
(0::?'a) \<in> ?A \<Longrightarrow> ?B \<subseteq> ?A + ?B

goal (1 subgoal):
 1. B \<subseteq> A + B
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
B \<subseteq> A + B

goal (1 subgoal):
 1. x \<in> orthogonal_complement A \<inter> orthogonal_complement B
[PROOF STEP]
hence \<open>\<forall> z \<in> B. (z \<bullet>\<^sub>C x) = 0\<close>
[PROOF STATE]
proof (prove)
using this:
B \<subseteq> A + B

goal (1 subgoal):
 1. \<forall>z\<in>B. is_orthogonal z x
[PROOF STEP]
using t1
[PROOF STATE]
proof (prove)
using this:
B \<subseteq> A + B
\<forall>z\<in>A + B. is_orthogonal z x

goal (1 subgoal):
 1. \<forall>z\<in>B. is_orthogonal z x
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>z\<in>B. is_orthogonal z x

goal (1 subgoal):
 1. x \<in> orthogonal_complement A \<inter> orthogonal_complement B
[PROOF STEP]
hence \<open>x \<in> (orthogonal_complement B)\<close>
[PROOF STATE]
proof (prove)
using this:
\<forall>z\<in>B. is_orthogonal z x

goal (1 subgoal):
 1. x \<in> orthogonal_complement B
[PROOF STEP]
by (smt mem_Collect_eq is_orthogonal_sym orthogonal_complement_def)
[PROOF STATE]
proof (state)
this:
x \<in> orthogonal_complement B

goal (1 subgoal):
 1. x \<in> orthogonal_complement A \<inter> orthogonal_complement B
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
x \<in> orthogonal_complement B

goal (1 subgoal):
 1. x \<in> orthogonal_complement A \<inter> orthogonal_complement B
[PROOF STEP]
using w1
[PROOF STATE]
proof (prove)
using this:
x \<in> orthogonal_complement B
x \<in> orthogonal_complement A

goal (1 subgoal):
 1. x \<in> orthogonal_complement A \<inter> orthogonal_complement B
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x \<in> orthogonal_complement A \<inter> orthogonal_complement B

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?x \<in> orthogonal_complement (A +\<^sub>M B) \<Longrightarrow> ?x \<in> orthogonal_complement A \<inter> orthogonal_complement B

goal (1 subgoal):
 1. orthogonal_complement (A +\<^sub>M B) = orthogonal_complement A \<inter> orthogonal_complement B
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
?x \<in> orthogonal_complement (A +\<^sub>M B) \<Longrightarrow> ?x \<in> orthogonal_complement A \<inter> orthogonal_complement B

goal (1 subgoal):
 1. orthogonal_complement (A +\<^sub>M B) = orthogonal_complement A \<inter> orthogonal_complement B
[PROOF STEP]
have "x \<in> (orthogonal_complement (A +\<^sub>M B))"
    if v1: "x \<in> (orthogonal_complement A) \<inter> (orthogonal_complement B)"
    for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> orthogonal_complement (A +\<^sub>M B)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x \<in> orthogonal_complement (A +\<^sub>M B)
[PROOF STEP]
have \<open>x \<in> (orthogonal_complement A)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> orthogonal_complement A
[PROOF STEP]
using v1
[PROOF STATE]
proof (prove)
using this:
x \<in> orthogonal_complement A \<inter> orthogonal_complement B

goal (1 subgoal):
 1. x \<in> orthogonal_complement A
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<in> orthogonal_complement A

goal (1 subgoal):
 1. x \<in> orthogonal_complement (A +\<^sub>M B)
[PROOF STEP]
hence \<open>\<forall>y\<in> A. (y \<bullet>\<^sub>C x) = 0\<close>
[PROOF STATE]
proof (prove)
using this:
x \<in> orthogonal_complement A

goal (1 subgoal):
 1. \<forall>y\<in>A. is_orthogonal y x
[PROOF STEP]
by (simp add: orthogonal_complement_orthoI')
[PROOF STATE]
proof (state)
this:
\<forall>y\<in>A. is_orthogonal y x

goal (1 subgoal):
 1. x \<in> orthogonal_complement (A +\<^sub>M B)
[PROOF STEP]
have \<open>x \<in> (orthogonal_complement B)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> orthogonal_complement B
[PROOF STEP]
using v1
[PROOF STATE]
proof (prove)
using this:
x \<in> orthogonal_complement A \<inter> orthogonal_complement B

goal (1 subgoal):
 1. x \<in> orthogonal_complement B
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<in> orthogonal_complement B

goal (1 subgoal):
 1. x \<in> orthogonal_complement (A +\<^sub>M B)
[PROOF STEP]
hence \<open>\<forall> y\<in> B. (y \<bullet>\<^sub>C x) = 0\<close>
[PROOF STATE]
proof (prove)
using this:
x \<in> orthogonal_complement B

goal (1 subgoal):
 1. \<forall>y\<in>B. is_orthogonal y x
[PROOF STEP]
by (simp add: orthogonal_complement_orthoI')
[PROOF STATE]
proof (state)
this:
\<forall>y\<in>B. is_orthogonal y x

goal (1 subgoal):
 1. x \<in> orthogonal_complement (A +\<^sub>M B)
[PROOF STEP]
have \<open>\<forall> a\<in>A. \<forall> b\<in>B. (a+b) \<bullet>\<^sub>C x = 0\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>a\<in>A. \<forall>b\<in>B. is_orthogonal (a + b) x
[PROOF STEP]
by (simp add: \<open>\<forall>y\<in>A. y \<bullet>\<^sub>C x = 0\<close> \<open>\<forall>y\<in>B. (y \<bullet>\<^sub>C x) = 0\<close> cinner_add_left)
[PROOF STATE]
proof (state)
this:
\<forall>a\<in>A. \<forall>b\<in>B. is_orthogonal (a + b) x

goal (1 subgoal):
 1. x \<in> orthogonal_complement (A +\<^sub>M B)
[PROOF STEP]
hence \<open>\<forall> y \<in> (A + B). y \<bullet>\<^sub>C x = 0\<close>
[PROOF STATE]
proof (prove)
using this:
\<forall>a\<in>A. \<forall>b\<in>B. is_orthogonal (a + b) x

goal (1 subgoal):
 1. \<forall>y\<in>A + B. is_orthogonal y x
[PROOF STEP]
using set_plus_elim
[PROOF STATE]
proof (prove)
using this:
\<forall>a\<in>A. \<forall>b\<in>B. is_orthogonal (a + b) x
\<lbrakk>?x \<in> ?A + ?B; \<And>a b. \<lbrakk>?x = a + b; a \<in> ?A; b \<in> ?B\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. \<forall>y\<in>A + B. is_orthogonal y x
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
\<forall>y\<in>A + B. is_orthogonal y x

goal (1 subgoal):
 1. x \<in> orthogonal_complement (A +\<^sub>M B)
[PROOF STEP]
hence \<open>x \<in> (orthogonal_complement (A + B))\<close>
[PROOF STATE]
proof (prove)
using this:
\<forall>y\<in>A + B. is_orthogonal y x

goal (1 subgoal):
 1. x \<in> orthogonal_complement (A + B)
[PROOF STEP]
by (smt mem_Collect_eq is_orthogonal_sym orthogonal_complement_def)
[PROOF STATE]
proof (state)
this:
x \<in> orthogonal_complement (A + B)

goal (1 subgoal):
 1. x \<in> orthogonal_complement (A +\<^sub>M B)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
x \<in> orthogonal_complement (A + B)

goal (1 subgoal):
 1. x \<in> orthogonal_complement (A +\<^sub>M B)
[PROOF STEP]
have \<open>(orthogonal_complement (A + B)) = (orthogonal_complement (A +\<^sub>M B))\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. orthogonal_complement (A + B) = orthogonal_complement (A +\<^sub>M B)
[PROOF STEP]
unfolding closed_sum_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. orthogonal_complement (A + B) = orthogonal_complement (closure (A + B))
[PROOF STEP]
by (subst orthogonal_complement_of_closure[symmetric], simp)
[PROOF STATE]
proof (state)
this:
orthogonal_complement (A + B) = orthogonal_complement (A +\<^sub>M B)

goal (1 subgoal):
 1. x \<in> orthogonal_complement (A +\<^sub>M B)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
x \<in> orthogonal_complement (A + B)
orthogonal_complement (A + B) = orthogonal_complement (A +\<^sub>M B)
[PROOF STEP]
have \<open>x \<in> (orthogonal_complement (A +\<^sub>M B))\<close>
[PROOF STATE]
proof (prove)
using this:
x \<in> orthogonal_complement (A + B)
orthogonal_complement (A + B) = orthogonal_complement (A +\<^sub>M B)

goal (1 subgoal):
 1. x \<in> orthogonal_complement (A +\<^sub>M B)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<in> orthogonal_complement (A +\<^sub>M B)

goal (1 subgoal):
 1. x \<in> orthogonal_complement (A +\<^sub>M B)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
x \<in> orthogonal_complement (A +\<^sub>M B)

goal (1 subgoal):
 1. x \<in> orthogonal_complement (A +\<^sub>M B)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<in> orthogonal_complement (A +\<^sub>M B)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?x \<in> orthogonal_complement A \<inter> orthogonal_complement B \<Longrightarrow> ?x \<in> orthogonal_complement (A +\<^sub>M B)

goal (1 subgoal):
 1. orthogonal_complement (A +\<^sub>M B) = orthogonal_complement A \<inter> orthogonal_complement B
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
?x \<in> orthogonal_complement (A +\<^sub>M B) \<Longrightarrow> ?x \<in> orthogonal_complement A \<inter> orthogonal_complement B
?x \<in> orthogonal_complement A \<inter> orthogonal_complement B \<Longrightarrow> ?x \<in> orthogonal_complement (A +\<^sub>M B)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
?x \<in> orthogonal_complement (A +\<^sub>M B) \<Longrightarrow> ?x \<in> orthogonal_complement A \<inter> orthogonal_complement B
?x \<in> orthogonal_complement A \<inter> orthogonal_complement B \<Longrightarrow> ?x \<in> orthogonal_complement (A +\<^sub>M B)

goal (1 subgoal):
 1. orthogonal_complement (A +\<^sub>M B) = orthogonal_complement A \<inter> orthogonal_complement B
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
orthogonal_complement (A +\<^sub>M B) = orthogonal_complement A \<inter> orthogonal_complement B

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma uncountable_Complex_set: "uncountable (elts Complex_set)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. uncountable (elts Complex_set)
[PROOF STEP]
using V_of_Complex_set countableI_bij2 uncountable_UNIV_complex
[PROOF STATE]
proof (prove)
using this:
bij_betw V_of UNIV (elts Complex_set)
\<lbrakk>bij_betw ?f ?B ?A; countable ?A\<rbrakk> \<Longrightarrow> countable ?B
uncountable UNIV

goal (1 subgoal):
 1. uncountable (elts Complex_set)
[PROOF STEP]
by blast


[STATEMENT]
lemma two_circles:
  fixes P::"real poly" and l r::real
  assumes hlr: "l < r"
  and hP: "degree P \<le> p"
  and hP0: "P \<noteq> 0"
  and hp0: "p \<noteq> 0"
  and h: "proots_count (map_poly of_real P)
       (upper_circle l r \<union> lower_circle l r) = 1"
shows "Bernstein_changes p l r P = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Bernstein_changes p l r P = 1
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Bernstein_changes p l r P = 1
[PROOF STEP]
have 1: "Bernstein_changes p l r P =
           Bernstein_changes_01 p (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Bernstein_changes p l r P = Bernstein_changes_01 p (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
l < r
degree P \<le> p
P \<noteq> 0
p \<noteq> 0
proots_count (map_poly complex_of_real P) (upper_circle l r \<union> lower_circle l r) = 1

goal (1 subgoal):
 1. Bernstein_changes p l r P = Bernstein_changes_01 p (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])
[PROOF STEP]
by (force simp: Bernstein_changes_eq_rescale)
[PROOF STATE]
proof (state)
this:
Bernstein_changes p l r P = Bernstein_changes_01 p (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])

goal (1 subgoal):
 1. Bernstein_changes p l r P = 1
[PROOF STEP]
have "proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:]))
     (upper_circle_01 \<union> lower_circle_01) = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
l < r
degree P \<le> p
P \<noteq> 0
p \<noteq> 0
proots_count (map_poly complex_of_real P) (upper_circle l r \<union> lower_circle l r) = 1

goal (1 subgoal):
 1. proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1
[PROOF STEP]
by (auto simp: upper_circle_rescale lower_circle_rescale proots_pcompose image_Un
        of_real_hom.map_poly_pcompose pcompose_eq_0 image_image algebra_simps)
[PROOF STATE]
proof (state)
this:
proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1

goal (1 subgoal):
 1. Bernstein_changes p l r P = 1
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1

goal (1 subgoal):
 1. Bernstein_changes p l r P = 1
[PROOF STEP]
apply (subst 1)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1 \<Longrightarrow> Bernstein_changes_01 p (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:]) = 1
[PROOF STEP]
apply (rule two_circles_01)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1 \<Longrightarrow> degree (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:]) \<le> p
 2. proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1 \<Longrightarrow> P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:] \<noteq> 0
 3. proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1 \<Longrightarrow> p \<noteq> 0
 4. proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1 \<Longrightarrow> proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1
[PROOF STEP]
using hP
[PROOF STATE]
proof (prove)
using this:
degree P \<le> p

goal (4 subgoals):
 1. proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1 \<Longrightarrow> degree (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:]) \<le> p
 2. proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1 \<Longrightarrow> P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:] \<noteq> 0
 3. proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1 \<Longrightarrow> p \<noteq> 0
 4. proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1 \<Longrightarrow> proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1
[PROOF STEP]
apply (force simp: degree_pcompose)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1 \<Longrightarrow> P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:] \<noteq> 0
 2. proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1 \<Longrightarrow> p \<noteq> 0
 3. proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1 \<Longrightarrow> proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1
[PROOF STEP]
using hP0 hlr
[PROOF STATE]
proof (prove)
using this:
P \<noteq> 0
l < r

goal (3 subgoals):
 1. proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1 \<Longrightarrow> P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:] \<noteq> 0
 2. proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1 \<Longrightarrow> p \<noteq> 0
 3. proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1 \<Longrightarrow> proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1
[PROOF STEP]
apply (fastforce simp: pcompose_eq_0)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1 \<Longrightarrow> p \<noteq> 0
 2. proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1 \<Longrightarrow> proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1
[PROOF STEP]
using hp0
[PROOF STATE]
proof (prove)
using this:
p \<noteq> 0

goal (2 subgoals):
 1. proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1 \<Longrightarrow> p \<noteq> 0
 2. proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1 \<Longrightarrow> proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1 \<Longrightarrow> proots_count (map_poly complex_of_real (P \<circ>\<^sub>p [:l, 1:] \<circ>\<^sub>p [:0, r - l:])) (upper_circle_01 \<union> lower_circle_01) = 1
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Bernstein_changes p l r P = 1

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lm064:
  assumes "runiq R"
  shows "sum (toFunction R) (Domain R) = sum snd R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum (toFunction R) (Domain R) = sum snd R
[PROOF STEP]
using assms toFunction_def sum.reindex_cong functionOnFirstEqualsSecond
        rightUniqueInjectiveOnFirst
[PROOF STATE]
proof (prove)
using this:
runiq R
toFunction ?R = (,,) ?R
\<lbrakk>inj_on ?l ?B; ?A = ?l ` ?B; \<And>x. x \<in> ?B \<Longrightarrow> ?g (?l x) = ?h x\<rbrakk> \<Longrightarrow> sum ?g ?A = sum ?h ?B
\<lbrakk>runiq ?R; ?z \<in> ?R\<rbrakk> \<Longrightarrow> ?R ,, fst ?z = snd ?z
runiq ?P = inj_on fst ?P

goal (1 subgoal):
 1. sum (toFunction R) (Domain R) = sum snd R
[PROOF STEP]
by (metis (no_types) fst_eq_Domain)


[STATEMENT]
lemma degeneralize_alt_def: "degeneralize A = nba
      (ngba.alphabet A)
      ((\<lambda> p. (p, 0)) ` ngba.initial A)
      (\<lambda> a (p, k). (\<lambda> q. (q, Degeneralization.count (ngba.accepting A) p k)) ` ngba.transition A a p)
      (degen (ngba.accepting A))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. degeneralize A = nba (ngba.alphabet A) ((\<lambda>p. (p, 0)) ` ngba.initial A) (\<lambda>a (p, k). (\<lambda>q. (q, Degeneralization.count (ngba.accepting A) p k)) ` ngba.transition A a p) (degen (ngba.accepting A))
[PROOF STEP]
unfolding degeneralization.degeneralize_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nba (ngba.alphabet A) (ngba.initial A \<times> {0}) (\<lambda>a (p, k). {(q, Degeneralization.count (ngba.accepting A) (fst (p, a, q)) k) |q. q \<in> ngba.transition A a p}) (degen (ngba.accepting A) \<circ> id) = nba (ngba.alphabet A) ((\<lambda>p. (p, 0)) ` ngba.initial A) (\<lambda>a (p, k). (\<lambda>q. (q, Degeneralization.count (ngba.accepting A) p k)) ` ngba.transition A a p) (degen (ngba.accepting A))
[PROOF STEP]
by auto


[STATEMENT]
lemma toSet_eq_iff:
  "X = Y \<longleftrightarrow> toSet X = toSet Y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (X = Y) = (toSet X = toSet Y)
[PROOF STEP]
by (blast dest: injD[OF toSet_inj])


[STATEMENT]
theorem acts_on_subsets:
  assumes fin:"finite (carrier G)"
  shows "group_action G (conjugation_action p) (subgroups_of_size p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. group_action G (conjugation_action p) (subgroups_of_size p)
[PROOF STEP]
unfolding group_action_def group_action_axioms_def group_hom_def group_hom_axioms_def hom_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Group.group G \<and> Group.group G \<and> Group.group (BijGroup (subgroups_of_size p)) \<and> conjugation_action p \<in> {h \<in> carrier G \<rightarrow> carrier (BijGroup (subgroups_of_size p)). \<forall>x\<in>carrier G. \<forall>y\<in>carrier G. h (x \<otimes> y) = h x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> h y}
[PROOF STEP]
apply(auto simp add:is_group group_BijGroup)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. x \<in> carrier G \<Longrightarrow> conjugation_action p x \<in> carrier (BijGroup (subgroups_of_size p))
 2. \<And>x y. \<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> conjugation_action p (x \<otimes> y) = conjugation_action p x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjugation_action p y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x. x \<in> carrier G \<Longrightarrow> conjugation_action p x \<in> carrier (BijGroup (subgroups_of_size p))
 2. \<And>x y. \<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> conjugation_action p (x \<otimes> y) = conjugation_action p x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjugation_action p y
[PROOF STEP]
fix g
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x. x \<in> carrier G \<Longrightarrow> conjugation_action p x \<in> carrier (BijGroup (subgroups_of_size p))
 2. \<And>x y. \<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> conjugation_action p (x \<otimes> y) = conjugation_action p x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjugation_action p y
[PROOF STEP]
assume g:"g \<in> carrier G"
[PROOF STATE]
proof (state)
this:
g \<in> carrier G

goal (2 subgoals):
 1. \<And>x. x \<in> carrier G \<Longrightarrow> conjugation_action p x \<in> carrier (BijGroup (subgroups_of_size p))
 2. \<And>x y. \<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> conjugation_action p (x \<otimes> y) = conjugation_action p x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjugation_action p y
[PROOF STEP]
with fin
[PROOF STATE]
proof (chain)
picking this:
finite (carrier G)
g \<in> carrier G
[PROOF STEP]
show "conjugation_action p g \<in> carrier (BijGroup (subgroups_of_size p))"
[PROOF STATE]
proof (prove)
using this:
finite (carrier G)
g \<in> carrier G

goal (1 subgoal):
 1. conjugation_action p g \<in> carrier (BijGroup (subgroups_of_size p))
[PROOF STEP]
unfolding BijGroup_def
[PROOF STATE]
proof (prove)
using this:
finite (carrier G)
g \<in> carrier G

goal (1 subgoal):
 1. conjugation_action p g \<in> carrier \<lparr>carrier = Bij (subgroups_of_size p), monoid.mult = \<lambda>g\<in>Bij (subgroups_of_size p). restrict (compose (subgroups_of_size p) g) (Bij (subgroups_of_size p)), one = \<lambda>x\<in>subgroups_of_size p. x\<rparr>
[PROOF STEP]
by (metis conjugation_is_Bij partial_object.select_convs(1))
[PROOF STATE]
proof (state)
this:
conjugation_action p g \<in> carrier (BijGroup (subgroups_of_size p))

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> conjugation_action p (x \<otimes> y) = conjugation_action p x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjugation_action p y
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> conjugation_action p (x \<otimes> y) = conjugation_action p x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjugation_action p y
[PROOF STEP]
fix x y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> conjugation_action p (x \<otimes> y) = conjugation_action p x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjugation_action p y
[PROOF STEP]
assume x:"x \<in> carrier G" and y:"y \<in> carrier G"
[PROOF STATE]
proof (state)
this:
x \<in> carrier G
y \<in> carrier G

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> conjugation_action p (x \<otimes> y) = conjugation_action p x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjugation_action p y
[PROOF STEP]
hence invx:"inv x \<in> carrier G" and invy:"inv y \<in> carrier G"
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier G
y \<in> carrier G

goal (1 subgoal):
 1. inv x \<in> carrier G &&& inv y \<in> carrier G
[PROOF STEP]
by (metis inv_closed)+
[PROOF STATE]
proof (state)
this:
inv x \<in> carrier G
inv y \<in> carrier G

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> conjugation_action p (x \<otimes> y) = conjugation_action p x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjugation_action p y
[PROOF STEP]
from x y
[PROOF STATE]
proof (chain)
picking this:
x \<in> carrier G
y \<in> carrier G
[PROOF STEP]
have xyG:"x \<otimes> y \<in> carrier G"
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier G
y \<in> carrier G

goal (1 subgoal):
 1. x \<otimes> y \<in> carrier G
[PROOF STEP]
by (metis m_closed)
[PROOF STATE]
proof (state)
this:
x \<otimes> y \<in> carrier G

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> conjugation_action p (x \<otimes> y) = conjugation_action p x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjugation_action p y
[PROOF STEP]
define conjx where "conjx = conjugation_action p x"
[PROOF STATE]
proof (state)
this:
conjx = conjugation_action p x

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> conjugation_action p (x \<otimes> y) = conjugation_action p x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjugation_action p y
[PROOF STEP]
define conjy where "conjy = conjugation_action p y"
[PROOF STATE]
proof (state)
this:
conjy = conjugation_action p y

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> conjugation_action p (x \<otimes> y) = conjugation_action p x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjugation_action p y
[PROOF STEP]
from fin x
[PROOF STATE]
proof (chain)
picking this:
finite (carrier G)
x \<in> carrier G
[PROOF STEP]
have xBij:"conjx \<in> Bij (subgroups_of_size p)"
[PROOF STATE]
proof (prove)
using this:
finite (carrier G)
x \<in> carrier G

goal (1 subgoal):
 1. conjx \<in> Bij (subgroups_of_size p)
[PROOF STEP]
unfolding conjx_def
[PROOF STATE]
proof (prove)
using this:
finite (carrier G)
x \<in> carrier G

goal (1 subgoal):
 1. conjugation_action p x \<in> Bij (subgroups_of_size p)
[PROOF STEP]
by (metis conjugation_is_Bij)
[PROOF STATE]
proof (state)
this:
conjx \<in> Bij (subgroups_of_size p)

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> conjugation_action p (x \<otimes> y) = conjugation_action p x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjugation_action p y
[PROOF STEP]
from fin y
[PROOF STATE]
proof (chain)
picking this:
finite (carrier G)
y \<in> carrier G
[PROOF STEP]
have yBij:"conjy \<in> Bij (subgroups_of_size p)"
[PROOF STATE]
proof (prove)
using this:
finite (carrier G)
y \<in> carrier G

goal (1 subgoal):
 1. conjy \<in> Bij (subgroups_of_size p)
[PROOF STEP]
unfolding conjy_def
[PROOF STATE]
proof (prove)
using this:
finite (carrier G)
y \<in> carrier G

goal (1 subgoal):
 1. conjugation_action p y \<in> Bij (subgroups_of_size p)
[PROOF STEP]
by (metis conjugation_is_Bij)
[PROOF STATE]
proof (state)
this:
conjy \<in> Bij (subgroups_of_size p)

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> conjugation_action p (x \<otimes> y) = conjugation_action p x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjugation_action p y
[PROOF STEP]
have "conjx \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjy
    = (\<lambda>g\<in>Bij (subgroups_of_size p). restrict (compose (subgroups_of_size p) g) (Bij (subgroups_of_size p))) conjx conjy"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. conjx \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjy = (\<lambda>g\<in>Bij (subgroups_of_size p). restrict (compose (subgroups_of_size p) g) (Bij (subgroups_of_size p))) conjx conjy
[PROOF STEP]
unfolding BijGroup_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. conjx \<otimes>\<^bsub>\<lparr>carrier = Bij (subgroups_of_size p), monoid.mult = \<lambda>g\<in>Bij (subgroups_of_size p). restrict (compose (subgroups_of_size p) g) (Bij (subgroups_of_size p)), one = \<lambda>x\<in>subgroups_of_size p. x\<rparr>\<^esub> conjy = (\<lambda>g\<in>Bij (subgroups_of_size p). restrict (compose (subgroups_of_size p) g) (Bij (subgroups_of_size p))) conjx conjy
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
conjx \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjy = (\<lambda>g\<in>Bij (subgroups_of_size p). restrict (compose (subgroups_of_size p) g) (Bij (subgroups_of_size p))) conjx conjy

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> conjugation_action p (x \<otimes> y) = conjugation_action p x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjugation_action p y
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
conjx \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjy = (\<lambda>g\<in>Bij (subgroups_of_size p). restrict (compose (subgroups_of_size p) g) (Bij (subgroups_of_size p))) conjx conjy

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> conjugation_action p (x \<otimes> y) = conjugation_action p x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjugation_action p y
[PROOF STEP]
from xBij yBij
[PROOF STATE]
proof (chain)
picking this:
conjx \<in> Bij (subgroups_of_size p)
conjy \<in> Bij (subgroups_of_size p)
[PROOF STEP]
have "... = compose (subgroups_of_size p) conjx conjy"
[PROOF STATE]
proof (prove)
using this:
conjx \<in> Bij (subgroups_of_size p)
conjy \<in> Bij (subgroups_of_size p)

goal (1 subgoal):
 1. (\<lambda>g\<in>Bij (subgroups_of_size p). restrict (compose (subgroups_of_size p) g) (Bij (subgroups_of_size p))) conjx conjy = compose (subgroups_of_size p) conjx conjy
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<lambda>g\<in>Bij (subgroups_of_size p). restrict (compose (subgroups_of_size p) g) (Bij (subgroups_of_size p))) conjx conjy = compose (subgroups_of_size p) conjx conjy

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> conjugation_action p (x \<otimes> y) = conjugation_action p x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjugation_action p y
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>g\<in>Bij (subgroups_of_size p). restrict (compose (subgroups_of_size p) g) (Bij (subgroups_of_size p))) conjx conjy = compose (subgroups_of_size p) conjx conjy

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> conjugation_action p (x \<otimes> y) = conjugation_action p x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjugation_action p y
[PROOF STEP]
have "... = (\<lambda>P\<in>subgroups_of_size p. conjx (conjy P))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. compose (subgroups_of_size p) conjx conjy = (\<lambda>P\<in>subgroups_of_size p. conjx (conjy P))
[PROOF STEP]
by (metis compose_def)
[PROOF STATE]
proof (state)
this:
compose (subgroups_of_size p) conjx conjy = (\<lambda>P\<in>subgroups_of_size p. conjx (conjy P))

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> conjugation_action p (x \<otimes> y) = conjugation_action p x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjugation_action p y
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
compose (subgroups_of_size p) conjx conjy = (\<lambda>P\<in>subgroups_of_size p. conjx (conjy P))

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> conjugation_action p (x \<otimes> y) = conjugation_action p x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjugation_action p y
[PROOF STEP]
have "... = (\<lambda>P\<in>subgroups_of_size p. x \<otimes> y <# (P #> inv (x \<otimes> y)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>P\<in>subgroups_of_size p. conjx (conjy P)) = (\<lambda>P\<in>subgroups_of_size p. x \<otimes> y <# (P #> inv (x \<otimes> y)))
[PROOF STEP]
proof(rule restrict_ext)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>P. P \<in> subgroups_of_size p \<Longrightarrow> conjx (conjy P) = x \<otimes> y <# (P #> inv (x \<otimes> y))
[PROOF STEP]
fix P
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>P. P \<in> subgroups_of_size p \<Longrightarrow> conjx (conjy P) = x \<otimes> y <# (P #> inv (x \<otimes> y))
[PROOF STEP]
assume P:"P \<in> subgroups_of_size p"
[PROOF STATE]
proof (state)
this:
P \<in> subgroups_of_size p

goal (1 subgoal):
 1. \<And>P. P \<in> subgroups_of_size p \<Longrightarrow> conjx (conjy P) = x \<otimes> y <# (P #> inv (x \<otimes> y))
[PROOF STEP]
hence PG:"P \<subseteq> carrier G"
[PROOF STATE]
proof (prove)
using this:
P \<in> subgroups_of_size p

goal (1 subgoal):
 1. P \<subseteq> carrier G
[PROOF STEP]
unfolding subgroups_of_size_def
[PROOF STATE]
proof (prove)
using this:
P \<in> {H. subgroup H G \<and> card H = p}

goal (1 subgoal):
 1. P \<subseteq> carrier G
[PROOF STEP]
by (auto simp:subgroup.subset)
[PROOF STATE]
proof (state)
this:
P \<subseteq> carrier G

goal (1 subgoal):
 1. \<And>P. P \<in> subgroups_of_size p \<Longrightarrow> conjx (conjy P) = x \<otimes> y <# (P #> inv (x \<otimes> y))
[PROOF STEP]
with y
[PROOF STATE]
proof (chain)
picking this:
y \<in> carrier G
P \<subseteq> carrier G
[PROOF STEP]
have yPG:"y <# P \<subseteq> carrier G"
[PROOF STATE]
proof (prove)
using this:
y \<in> carrier G
P \<subseteq> carrier G

goal (1 subgoal):
 1. y <# P \<subseteq> carrier G
[PROOF STEP]
by (metis l_coset_subset_G)
[PROOF STATE]
proof (state)
this:
y <# P \<subseteq> carrier G

goal (1 subgoal):
 1. \<And>P. P \<in> subgroups_of_size p \<Longrightarrow> conjx (conjy P) = x \<otimes> y <# (P #> inv (x \<otimes> y))
[PROOF STEP]
from x y
[PROOF STATE]
proof (chain)
picking this:
x \<in> carrier G
y \<in> carrier G
[PROOF STEP]
have invxyG:"inv (x \<otimes> y) \<in> carrier G" and xyG:"x \<otimes> y \<in> carrier G"
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier G
y \<in> carrier G

goal (1 subgoal):
 1. inv (x \<otimes> y) \<in> carrier G &&& x \<otimes> y \<in> carrier G
[PROOF STEP]
using inv_closed m_closed
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier G
y \<in> carrier G
?x \<in> carrier G \<Longrightarrow> inv ?x \<in> carrier G
\<lbrakk>?x \<in> carrier G; ?y \<in> carrier G\<rbrakk> \<Longrightarrow> ?x \<otimes> ?y \<in> carrier G

goal (1 subgoal):
 1. inv (x \<otimes> y) \<in> carrier G &&& x \<otimes> y \<in> carrier G
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
inv (x \<otimes> y) \<in> carrier G
x \<otimes> y \<in> carrier G

goal (1 subgoal):
 1. \<And>P. P \<in> subgroups_of_size p \<Longrightarrow> conjx (conjy P) = x \<otimes> y <# (P #> inv (x \<otimes> y))
[PROOF STEP]
from yBij
[PROOF STATE]
proof (chain)
picking this:
conjy \<in> Bij (subgroups_of_size p)
[PROOF STEP]
have "conjy ` subgroups_of_size p = subgroups_of_size p"
[PROOF STATE]
proof (prove)
using this:
conjy \<in> Bij (subgroups_of_size p)

goal (1 subgoal):
 1. conjy ` subgroups_of_size p = subgroups_of_size p
[PROOF STEP]
unfolding Bij_def bij_betw_def
[PROOF STATE]
proof (prove)
using this:
conjy \<in> extensional (subgroups_of_size p) \<inter> {f. inj_on f (subgroups_of_size p) \<and> f ` subgroups_of_size p = subgroups_of_size p}

goal (1 subgoal):
 1. conjy ` subgroups_of_size p = subgroups_of_size p
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
conjy ` subgroups_of_size p = subgroups_of_size p

goal (1 subgoal):
 1. \<And>P. P \<in> subgroups_of_size p \<Longrightarrow> conjx (conjy P) = x \<otimes> y <# (P #> inv (x \<otimes> y))
[PROOF STEP]
with P
[PROOF STATE]
proof (chain)
picking this:
P \<in> subgroups_of_size p
conjy ` subgroups_of_size p = subgroups_of_size p
[PROOF STEP]
have conjyP:"conjy P \<in> subgroups_of_size p"
[PROOF STATE]
proof (prove)
using this:
P \<in> subgroups_of_size p
conjy ` subgroups_of_size p = subgroups_of_size p

goal (1 subgoal):
 1. conjy P \<in> subgroups_of_size p
[PROOF STEP]
unfolding Bij_def bij_betw_def
[PROOF STATE]
proof (prove)
using this:
P \<in> subgroups_of_size p
conjy ` subgroups_of_size p = subgroups_of_size p

goal (1 subgoal):
 1. conjy P \<in> subgroups_of_size p
[PROOF STEP]
by (metis (full_types) imageI)
[PROOF STATE]
proof (state)
this:
conjy P \<in> subgroups_of_size p

goal (1 subgoal):
 1. \<And>P. P \<in> subgroups_of_size p \<Longrightarrow> conjx (conjy P) = x \<otimes> y <# (P #> inv (x \<otimes> y))
[PROOF STEP]
with x y P
[PROOF STATE]
proof (chain)
picking this:
x \<in> carrier G
y \<in> carrier G
P \<in> subgroups_of_size p
conjy P \<in> subgroups_of_size p
[PROOF STEP]
have "conjx (conjy P) = x <# ((y <# (P #> inv y)) #> inv x)"
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier G
y \<in> carrier G
P \<in> subgroups_of_size p
conjy P \<in> subgroups_of_size p

goal (1 subgoal):
 1. conjx (conjy P) = x <# (y <# (P #> inv y) #> inv x)
[PROOF STEP]
unfolding conjy_def conjx_def conjugation_action_def
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier G
y \<in> carrier G
P \<in> subgroups_of_size p
(\<lambda>g\<in>carrier G. \<lambda>P\<in>subgroups_of_size p. g <# (P #> inv g)) y P \<in> subgroups_of_size p

goal (1 subgoal):
 1. (\<lambda>g\<in>carrier G. \<lambda>P\<in>subgroups_of_size p. g <# (P #> inv g)) x ((\<lambda>g\<in>carrier G. \<lambda>P\<in>subgroups_of_size p. g <# (P #> inv g)) y P) = x <# (y <# (P #> inv y) #> inv x)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
conjx (conjy P) = x <# (y <# (P #> inv y) #> inv x)

goal (1 subgoal):
 1. \<And>P. P \<in> subgroups_of_size p \<Longrightarrow> conjx (conjy P) = x \<otimes> y <# (P #> inv (x \<otimes> y))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
conjx (conjy P) = x <# (y <# (P #> inv y) #> inv x)

goal (1 subgoal):
 1. \<And>P. P \<in> subgroups_of_size p \<Longrightarrow> conjx (conjy P) = x \<otimes> y <# (P #> inv (x \<otimes> y))
[PROOF STEP]
from y invy PG
[PROOF STATE]
proof (chain)
picking this:
y \<in> carrier G
inv y \<in> carrier G
P \<subseteq> carrier G
[PROOF STEP]
have "... = x <# (((y <# P) #> inv y) #> inv x)"
[PROOF STATE]
proof (prove)
using this:
y \<in> carrier G
inv y \<in> carrier G
P \<subseteq> carrier G

goal (1 subgoal):
 1. x <# (y <# (P #> inv y) #> inv x) = x <# (y <# P #> inv y #> inv x)
[PROOF STEP]
by (metis lr_coset_assoc)
[PROOF STATE]
proof (state)
this:
x <# (y <# (P #> inv y) #> inv x) = x <# (y <# P #> inv y #> inv x)

goal (1 subgoal):
 1. \<And>P. P \<in> subgroups_of_size p \<Longrightarrow> conjx (conjy P) = x \<otimes> y <# (P #> inv (x \<otimes> y))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x <# (y <# (P #> inv y) #> inv x) = x <# (y <# P #> inv y #> inv x)

goal (1 subgoal):
 1. \<And>P. P \<in> subgroups_of_size p \<Longrightarrow> conjx (conjy P) = x \<otimes> y <# (P #> inv (x \<otimes> y))
[PROOF STEP]
from PG invx invy y
[PROOF STATE]
proof (chain)
picking this:
P \<subseteq> carrier G
inv x \<in> carrier G
inv y \<in> carrier G
y \<in> carrier G
[PROOF STEP]
have "... = x <# ((y <# P) #> (inv y \<otimes> inv x))"
[PROOF STATE]
proof (prove)
using this:
P \<subseteq> carrier G
inv x \<in> carrier G
inv y \<in> carrier G
y \<in> carrier G

goal (1 subgoal):
 1. x <# (y <# P #> inv y #> inv x) = x <# (y <# P #> inv y \<otimes> inv x)
[PROOF STEP]
by (metis coset_mult_assoc yPG)
[PROOF STATE]
proof (state)
this:
x <# (y <# P #> inv y #> inv x) = x <# (y <# P #> inv y \<otimes> inv x)

goal (1 subgoal):
 1. \<And>P. P \<in> subgroups_of_size p \<Longrightarrow> conjx (conjy P) = x \<otimes> y <# (P #> inv (x \<otimes> y))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x <# (y <# P #> inv y #> inv x) = x <# (y <# P #> inv y \<otimes> inv x)

goal (1 subgoal):
 1. \<And>P. P \<in> subgroups_of_size p \<Longrightarrow> conjx (conjy P) = x \<otimes> y <# (P #> inv (x \<otimes> y))
[PROOF STEP]
from x y
[PROOF STATE]
proof (chain)
picking this:
x \<in> carrier G
y \<in> carrier G
[PROOF STEP]
have "... = x <# ((y <# P) #> inv (x \<otimes> y))"
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier G
y \<in> carrier G

goal (1 subgoal):
 1. x <# (y <# P #> inv y \<otimes> inv x) = x <# (y <# P #> inv (x \<otimes> y))
[PROOF STEP]
by (metis inv_mult_group)
[PROOF STATE]
proof (state)
this:
x <# (y <# P #> inv y \<otimes> inv x) = x <# (y <# P #> inv (x \<otimes> y))

goal (1 subgoal):
 1. \<And>P. P \<in> subgroups_of_size p \<Longrightarrow> conjx (conjy P) = x \<otimes> y <# (P #> inv (x \<otimes> y))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x <# (y <# P #> inv y \<otimes> inv x) = x <# (y <# P #> inv (x \<otimes> y))

goal (1 subgoal):
 1. \<And>P. P \<in> subgroups_of_size p \<Longrightarrow> conjx (conjy P) = x \<otimes> y <# (P #> inv (x \<otimes> y))
[PROOF STEP]
from invxyG x yPG
[PROOF STATE]
proof (chain)
picking this:
inv (x \<otimes> y) \<in> carrier G
x \<in> carrier G
y <# P \<subseteq> carrier G
[PROOF STEP]
have "... = (x <# (y <# P)) #> inv (x \<otimes> y)"
[PROOF STATE]
proof (prove)
using this:
inv (x \<otimes> y) \<in> carrier G
x \<in> carrier G
y <# P \<subseteq> carrier G

goal (1 subgoal):
 1. x <# (y <# P #> inv (x \<otimes> y)) = x <# (y <# P) #> inv (x \<otimes> y)
[PROOF STEP]
by (metis lr_coset_assoc)
[PROOF STATE]
proof (state)
this:
x <# (y <# P #> inv (x \<otimes> y)) = x <# (y <# P) #> inv (x \<otimes> y)

goal (1 subgoal):
 1. \<And>P. P \<in> subgroups_of_size p \<Longrightarrow> conjx (conjy P) = x \<otimes> y <# (P #> inv (x \<otimes> y))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x <# (y <# P #> inv (x \<otimes> y)) = x <# (y <# P) #> inv (x \<otimes> y)

goal (1 subgoal):
 1. \<And>P. P \<in> subgroups_of_size p \<Longrightarrow> conjx (conjy P) = x \<otimes> y <# (P #> inv (x \<otimes> y))
[PROOF STEP]
from x y PG
[PROOF STATE]
proof (chain)
picking this:
x \<in> carrier G
y \<in> carrier G
P \<subseteq> carrier G
[PROOF STEP]
have "... = ((x \<otimes> y) <# P) #> inv (x \<otimes> y)"
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier G
y \<in> carrier G
P \<subseteq> carrier G

goal (1 subgoal):
 1. x <# (y <# P) #> inv (x \<otimes> y) = x \<otimes> y <# P #> inv (x \<otimes> y)
[PROOF STEP]
by (metis lcos_m_assoc)
[PROOF STATE]
proof (state)
this:
x <# (y <# P) #> inv (x \<otimes> y) = x \<otimes> y <# P #> inv (x \<otimes> y)

goal (1 subgoal):
 1. \<And>P. P \<in> subgroups_of_size p \<Longrightarrow> conjx (conjy P) = x \<otimes> y <# (P #> inv (x \<otimes> y))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x <# (y <# P) #> inv (x \<otimes> y) = x \<otimes> y <# P #> inv (x \<otimes> y)

goal (1 subgoal):
 1. \<And>P. P \<in> subgroups_of_size p \<Longrightarrow> conjx (conjy P) = x \<otimes> y <# (P #> inv (x \<otimes> y))
[PROOF STEP]
from xyG invxyG PG
[PROOF STATE]
proof (chain)
picking this:
x \<otimes> y \<in> carrier G
inv (x \<otimes> y) \<in> carrier G
P \<subseteq> carrier G
[PROOF STEP]
have "... = (x \<otimes> y) <# (P #> inv (x \<otimes> y))"
[PROOF STATE]
proof (prove)
using this:
x \<otimes> y \<in> carrier G
inv (x \<otimes> y) \<in> carrier G
P \<subseteq> carrier G

goal (1 subgoal):
 1. x \<otimes> y <# P #> inv (x \<otimes> y) = x \<otimes> y <# (P #> inv (x \<otimes> y))
[PROOF STEP]
by (metis lr_coset_assoc)
[PROOF STATE]
proof (state)
this:
x \<otimes> y <# P #> inv (x \<otimes> y) = x \<otimes> y <# (P #> inv (x \<otimes> y))

goal (1 subgoal):
 1. \<And>P. P \<in> subgroups_of_size p \<Longrightarrow> conjx (conjy P) = x \<otimes> y <# (P #> inv (x \<otimes> y))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
conjx (conjy P) = x \<otimes> y <# (P #> inv (x \<otimes> y))
[PROOF STEP]
show "conjx (conjy P) = x \<otimes> y <# (P #> inv (x \<otimes> y))"
[PROOF STATE]
proof (prove)
using this:
conjx (conjy P) = x \<otimes> y <# (P #> inv (x \<otimes> y))

goal (1 subgoal):
 1. conjx (conjy P) = x \<otimes> y <# (P #> inv (x \<otimes> y))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
conjx (conjy P) = x \<otimes> y <# (P #> inv (x \<otimes> y))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>P\<in>subgroups_of_size p. conjx (conjy P)) = (\<lambda>P\<in>subgroups_of_size p. x \<otimes> y <# (P #> inv (x \<otimes> y)))

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> conjugation_action p (x \<otimes> y) = conjugation_action p x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjugation_action p y
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
conjx \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjy = (\<lambda>P\<in>subgroups_of_size p. x \<otimes> y <# (P #> inv (x \<otimes> y)))
[PROOF STEP]
have "conjx \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjy = (\<lambda>P\<in>subgroups_of_size p. x \<otimes> y <# (P #> inv (x \<otimes> y)))"
[PROOF STATE]
proof (prove)
using this:
conjx \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjy = (\<lambda>P\<in>subgroups_of_size p. x \<otimes> y <# (P #> inv (x \<otimes> y)))

goal (1 subgoal):
 1. conjx \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjy = (\<lambda>P\<in>subgroups_of_size p. x \<otimes> y <# (P #> inv (x \<otimes> y)))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
conjx \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjy = (\<lambda>P\<in>subgroups_of_size p. x \<otimes> y <# (P #> inv (x \<otimes> y)))

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> conjugation_action p (x \<otimes> y) = conjugation_action p x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjugation_action p y
[PROOF STEP]
with xyG
[PROOF STATE]
proof (chain)
picking this:
x \<otimes> y \<in> carrier G
conjx \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjy = (\<lambda>P\<in>subgroups_of_size p. x \<otimes> y <# (P #> inv (x \<otimes> y)))
[PROOF STEP]
show "conjugation_action p (x \<otimes> y)
    = conjugation_action p x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjugation_action p y"
[PROOF STATE]
proof (prove)
using this:
x \<otimes> y \<in> carrier G
conjx \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjy = (\<lambda>P\<in>subgroups_of_size p. x \<otimes> y <# (P #> inv (x \<otimes> y)))

goal (1 subgoal):
 1. conjugation_action p (x \<otimes> y) = conjugation_action p x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjugation_action p y
[PROOF STEP]
unfolding conjx_def conjy_def conjugation_action_def
[PROOF STATE]
proof (prove)
using this:
x \<otimes> y \<in> carrier G
(\<lambda>g\<in>carrier G. \<lambda>P\<in>subgroups_of_size p. g <# (P #> inv g)) x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> (\<lambda>g\<in>carrier G. \<lambda>P\<in>subgroups_of_size p. g <# (P #> inv g)) y = (\<lambda>P\<in>subgroups_of_size p. x \<otimes> y <# (P #> inv (x \<otimes> y)))

goal (1 subgoal):
 1. (\<lambda>g\<in>carrier G. \<lambda>P\<in>subgroups_of_size p. g <# (P #> inv g)) (x \<otimes> y) = (\<lambda>g\<in>carrier G. \<lambda>P\<in>subgroups_of_size p. g <# (P #> inv g)) x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> (\<lambda>g\<in>carrier G. \<lambda>P\<in>subgroups_of_size p. g <# (P #> inv g)) y
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
conjugation_action p (x \<otimes> y) = conjugation_action p x \<otimes>\<^bsub>BijGroup (subgroups_of_size p)\<^esub> conjugation_action p y

goal:
No subgoals!
[PROOF STEP]
qed