[STATEMENT]
lemma sfilter_eq:
  assumes "ev (holds P) s"
  shows "sfilter P s = x ## s' \<longleftrightarrow>
    P x \<and> (not (holds P) suntil (HLD {x} aand nxt (\<lambda>s. sfilter P s = s'))) s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (sfilter P s = x ## s') = (P x \<and> ((\<lambda>xs. \<not> holds P xs) suntil (\<lambda>xs. HLD {x} xs \<and> nxt (\<lambda>s. sfilter P s = s') xs)) s)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
ev (holds P) s

goal (1 subgoal):
 1. (sfilter P s = x ## s') = (P x \<and> ((\<lambda>xs. \<not> holds P xs) suntil (\<lambda>xs. HLD {x} xs \<and> nxt (\<lambda>s. sfilter P s = s') xs)) s)
[PROOF STEP]
by (induct rule: ev_induct_strong)
     (auto simp add: HLD_iff intro: suntil.intros elim: suntil.cases)


[STATEMENT]
lemma while_right_plus_below_2:
  "(x \<star> x) * y \<le> x \<star> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<star> x) * y \<le> x \<star> y
[PROOF STEP]
by (smt order_trans while_right_plus_below while_sub_associative)


[STATEMENT]
lemma variation_comm: "variation x y= - variation y x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. variation x y = - variation y x
[PROOF STEP]
unfolding variation_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (if 0 \<le> x * y then 0 else if x < y then 1 else - 1) = - (if 0 \<le> y * x then 0 else if y < x then 1 else - 1)
[PROOF STEP]
by (auto simp add: mult.commute)


[STATEMENT]
lemma neq_PInf_trans: fixes x y :: ereal shows "\<lbrakk> y \<noteq> \<infinity>; x \<le> y \<rbrakk> \<Longrightarrow> x \<noteq> \<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>y \<noteq> \<infinity>; x \<le> y\<rbrakk> \<Longrightarrow> x \<noteq> \<infinity>
[PROOF STEP]
by auto


[STATEMENT]
lemma rev_numeral: "rev (<n::nat>) = <n::nat>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rev (<n>) = <n>
[PROOF STEP]
by (induct n)(auto simp add: tape_of_nat_def)


[STATEMENT]
lemma basis_reduction_swap: assumes
  inv: "LLL_invariant False i fs"
  and res: "basis_reduction_swap i fs = (upw',i',fs')"
  and cond: "sq_norm (gso fs (i - 1)) > \<alpha> * sq_norm (gso fs i)"
  and i: "i < m" "i \<noteq> 0"
shows "LLL_invariant upw' i' fs'" (is ?g1)
  "LLL_measure i' fs' < LLL_measure i fs" (is ?g2)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LLL_invariant upw' i' fs' &&& LLL_measure i' fs' < LLL_measure i fs
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. LLL_invariant upw' i' fs'
 2. LLL_measure i' fs' < LLL_measure i fs
[PROOF STEP]
note invw = LLL_inv_imp_w[OF inv]
[PROOF STATE]
proof (state)
this:
LLL_invariant_weak fs

goal (2 subgoals):
 1. LLL_invariant upw' i' fs'
 2. LLL_measure i' fs' < LLL_measure i fs
[PROOF STEP]
note def = basis_reduction_swap_def
[PROOF STATE]
proof (state)
this:
basis_reduction_swap ?i ?fs = (False, ?i - 1, ?fs[?i := ?fs ! (?i - 1), ?i - 1 := ?fs ! ?i])

goal (2 subgoals):
 1. LLL_invariant upw' i' fs'
 2. LLL_measure i' fs' < LLL_measure i fs
[PROOF STEP]
from res[unfolded basis_reduction_swap_def]
[PROOF STATE]
proof (chain)
picking this:
(False, i - 1, fs[i := fs ! (i - 1), i - 1 := fs ! i]) = (upw', i', fs')
[PROOF STEP]
have id: "upw' = False" "i' = i - 1" "fs' = fs[i := fs ! (i - 1), i - 1 := fs ! i]"
[PROOF STATE]
proof (prove)
using this:
(False, i - 1, fs[i := fs ! (i - 1), i - 1 := fs ! i]) = (upw', i', fs')

goal (1 subgoal):
 1. upw' = False &&& i' = i - 1 &&& fs' = fs[i := fs ! (i - 1), i - 1 := fs ! i]
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
upw' = False
i' = i - 1
fs' = fs[i := fs ! (i - 1), i - 1 := fs ! i]

goal (2 subgoals):
 1. LLL_invariant upw' i' fs'
 2. LLL_measure i' fs' < LLL_measure i fs
[PROOF STEP]
from basis_reduction_swap_main(2-3)[OF invw _ i cond id(3)] inv
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>LLL_invariant False i fs \<or> \<bar>gram_schmidt_fs.\<mu> n (map of_int_hom.vec_hom fs) i (i - 1)\<bar> \<le> 1 / 2; LLL_invariant False i fs\<rbrakk> \<Longrightarrow> LLL_invariant False (i - 1) fs'
LLL_invariant False i fs \<or> \<bar>gram_schmidt_fs.\<mu> n (map of_int_hom.vec_hom fs) i (i - 1)\<bar> \<le> 1 / 2 \<Longrightarrow> LLL_measure (i - 1) fs' < LLL_measure i fs
LLL_invariant False i fs
[PROOF STEP]
show ?g1 ?g2
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>LLL_invariant False i fs \<or> \<bar>gram_schmidt_fs.\<mu> n (map of_int_hom.vec_hom fs) i (i - 1)\<bar> \<le> 1 / 2; LLL_invariant False i fs\<rbrakk> \<Longrightarrow> LLL_invariant False (i - 1) fs'
LLL_invariant False i fs \<or> \<bar>gram_schmidt_fs.\<mu> n (map of_int_hom.vec_hom fs) i (i - 1)\<bar> \<le> 1 / 2 \<Longrightarrow> LLL_measure (i - 1) fs' < LLL_measure i fs
LLL_invariant False i fs

goal (1 subgoal):
 1. LLL_invariant upw' i' fs' &&& LLL_measure i' fs' < LLL_measure i fs
[PROOF STEP]
unfolding id
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>LLL_invariant False i fs \<or> \<bar>gram_schmidt_fs.\<mu> n (map of_int_hom.vec_hom fs) i (i - 1)\<bar> \<le> 1 / 2; LLL_invariant False i fs\<rbrakk> \<Longrightarrow> LLL_invariant False (i - 1) (fs[i := fs ! (i - 1), i - 1 := fs ! i])
LLL_invariant False i fs \<or> \<bar>gram_schmidt_fs.\<mu> n (map of_int_hom.vec_hom fs) i (i - 1)\<bar> \<le> 1 / 2 \<Longrightarrow> LLL_measure (i - 1) (fs[i := fs ! (i - 1), i - 1 := fs ! i]) < LLL_measure i fs
LLL_invariant False i fs

goal (1 subgoal):
 1. LLL_invariant False (i - 1) (fs[i := fs ! (i - 1), i - 1 := fs ! i]) &&& LLL_measure (i - 1) (fs[i := fs ! (i - 1), i - 1 := fs ! i]) < LLL_measure i fs
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
LLL_invariant upw' i' fs'
LLL_measure i' fs' < LLL_measure i fs

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma List_app: "\<And>x. List h x (as@bs) = (\<exists>y. Path h x as y \<and> List h y bs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. List h x (as @ bs) = (\<exists>y. Path h x as y \<and> List h y bs)
[PROOF STEP]
by(induct as, simp, clarsimp)


[STATEMENT]
lemma hcomplex_of_hypreal_pow: "\<And>x. hcomplex_of_hypreal (x ^ n) = hcomplex_of_hypreal x ^ n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. hcomplex_of_hypreal (x ^ n) = hcomplex_of_hypreal x ^ n
[PROOF STEP]
by transfer (rule of_real_power)


[STATEMENT]
lemma filter_M_pure_I [intro]: "(\<And>x. x \<in> set xs \<Longrightarrow> pure (P x) h) \<Longrightarrow> pure (filter_M P xs)h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x. x \<in> set xs \<Longrightarrow> pure (P x) h) \<Longrightarrow> pure (filter_M P xs) h
[PROOF STEP]
apply(induct xs)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. (\<And>x. x \<in> set [] \<Longrightarrow> pure (P x) h) \<Longrightarrow> pure (filter_M P []) h
 2. \<And>a xs. \<lbrakk>(\<And>x. x \<in> set xs \<Longrightarrow> pure (P x) h) \<Longrightarrow> pure (filter_M P xs) h; \<And>x. x \<in> set (a # xs) \<Longrightarrow> pure (P x) h\<rbrakk> \<Longrightarrow> pure (filter_M P (a # xs)) h
[PROOF STEP]
by(auto intro!: bind_pure_I)


[STATEMENT]
lemma IS_BELOW_ID_D: "(a,b)\<in>R \<Longrightarrow> IS_BELOW_ID R \<Longrightarrow> a=b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(a, b) \<in> R; IS_BELOW_ID R\<rbrakk> \<Longrightarrow> a = b
[PROOF STEP]
by (auto simp: IS_BELOW_ID_def)


[STATEMENT]
lemma tensor_gate_unitary2 [simp]:
  assumes "gate m G1" and "gate n G2"
  shows "(G1 \<Otimes> G2) * ((G1 \<Otimes> G2)\<^sup>\<dagger>) = 1\<^sub>m(dim_col G1 * dim_col G2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (G1 \<Otimes> G2) * G1 \<Otimes> G2\<^sup>\<dagger> = 1\<^sub>m (dim_col G1 * dim_col G2)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>i j. \<lbrakk>i < dim_row (1\<^sub>m (dim_col G1 * dim_col G2)); j < dim_col (1\<^sub>m (dim_col G1 * dim_col G2))\<rbrakk> \<Longrightarrow> ((G1 \<Otimes> G2) * G1 \<Otimes> G2\<^sup>\<dagger>) $$ (i, j) = 1\<^sub>m (dim_col G1 * dim_col G2) $$ (i, j)
 2. dim_row ((G1 \<Otimes> G2) * G1 \<Otimes> G2\<^sup>\<dagger>) = dim_row (1\<^sub>m (dim_col G1 * dim_col G2))
 3. dim_col ((G1 \<Otimes> G2) * G1 \<Otimes> G2\<^sup>\<dagger>) = dim_col (1\<^sub>m (dim_col G1 * dim_col G2))
[PROOF STEP]
show "dim_row ((G1 \<Otimes> G2) * ((G1 \<Otimes> G2)\<^sup>\<dagger>)) = dim_row(1\<^sub>m (dim_col G1 * dim_col G2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_row ((G1 \<Otimes> G2) * G1 \<Otimes> G2\<^sup>\<dagger>) = dim_row (1\<^sub>m (dim_col G1 * dim_col G2))
[PROOF STEP]
using assms gate_def
[PROOF STATE]
proof (prove)
using this:
gate m G1
gate n G2
gate ?n ?A \<equiv> dim_row ?A = 2 ^ ?n \<and> square_mat ?A \<and> unitary ?A

goal (1 subgoal):
 1. dim_row ((G1 \<Otimes> G2) * G1 \<Otimes> G2\<^sup>\<dagger>) = dim_row (1\<^sub>m (dim_col G1 * dim_col G2))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
dim_row ((G1 \<Otimes> G2) * G1 \<Otimes> G2\<^sup>\<dagger>) = dim_row (1\<^sub>m (dim_col G1 * dim_col G2))

goal (2 subgoals):
 1. \<And>i j. \<lbrakk>i < dim_row (1\<^sub>m (dim_col G1 * dim_col G2)); j < dim_col (1\<^sub>m (dim_col G1 * dim_col G2))\<rbrakk> \<Longrightarrow> ((G1 \<Otimes> G2) * G1 \<Otimes> G2\<^sup>\<dagger>) $$ (i, j) = 1\<^sub>m (dim_col G1 * dim_col G2) $$ (i, j)
 2. dim_col ((G1 \<Otimes> G2) * G1 \<Otimes> G2\<^sup>\<dagger>) = dim_col (1\<^sub>m (dim_col G1 * dim_col G2))
[PROOF STEP]
show "dim_col ((G1 \<Otimes> G2) * ((G1 \<Otimes> G2)\<^sup>\<dagger>)) = dim_col (1\<^sub>m(dim_col G1 * dim_col G2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_col ((G1 \<Otimes> G2) * G1 \<Otimes> G2\<^sup>\<dagger>) = dim_col (1\<^sub>m (dim_col G1 * dim_col G2))
[PROOF STEP]
using assms gate_def
[PROOF STATE]
proof (prove)
using this:
gate m G1
gate n G2
gate ?n ?A \<equiv> dim_row ?A = 2 ^ ?n \<and> square_mat ?A \<and> unitary ?A

goal (1 subgoal):
 1. dim_col ((G1 \<Otimes> G2) * G1 \<Otimes> G2\<^sup>\<dagger>) = dim_col (1\<^sub>m (dim_col G1 * dim_col G2))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
dim_col ((G1 \<Otimes> G2) * G1 \<Otimes> G2\<^sup>\<dagger>) = dim_col (1\<^sub>m (dim_col G1 * dim_col G2))

goal (1 subgoal):
 1. \<And>i j. \<lbrakk>i < dim_row (1\<^sub>m (dim_col G1 * dim_col G2)); j < dim_col (1\<^sub>m (dim_col G1 * dim_col G2))\<rbrakk> \<Longrightarrow> ((G1 \<Otimes> G2) * G1 \<Otimes> G2\<^sup>\<dagger>) $$ (i, j) = 1\<^sub>m (dim_col G1 * dim_col G2) $$ (i, j)
[PROOF STEP]
fix i j
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i j. \<lbrakk>i < dim_row (1\<^sub>m (dim_col G1 * dim_col G2)); j < dim_col (1\<^sub>m (dim_col G1 * dim_col G2))\<rbrakk> \<Longrightarrow> ((G1 \<Otimes> G2) * G1 \<Otimes> G2\<^sup>\<dagger>) $$ (i, j) = 1\<^sub>m (dim_col G1 * dim_col G2) $$ (i, j)
[PROOF STEP]
assume "i < dim_row (1\<^sub>m (dim_col G1 * dim_col G2))" and "j < dim_col (1\<^sub>m (dim_col G1 * dim_col G2))"
[PROOF STATE]
proof (state)
this:
i < dim_row (1\<^sub>m (dim_col G1 * dim_col G2))
j < dim_col (1\<^sub>m (dim_col G1 * dim_col G2))

goal (1 subgoal):
 1. \<And>i j. \<lbrakk>i < dim_row (1\<^sub>m (dim_col G1 * dim_col G2)); j < dim_col (1\<^sub>m (dim_col G1 * dim_col G2))\<rbrakk> \<Longrightarrow> ((G1 \<Otimes> G2) * G1 \<Otimes> G2\<^sup>\<dagger>) $$ (i, j) = 1\<^sub>m (dim_col G1 * dim_col G2) $$ (i, j)
[PROOF STEP]
thus "((G1 \<Otimes> G2) * ((G1 \<Otimes> G2)\<^sup>\<dagger>)) $$ (i, j) = 1\<^sub>m(dim_col G1 * dim_col G2) $$ (i, j)"
[PROOF STATE]
proof (prove)
using this:
i < dim_row (1\<^sub>m (dim_col G1 * dim_col G2))
j < dim_col (1\<^sub>m (dim_col G1 * dim_col G2))

goal (1 subgoal):
 1. ((G1 \<Otimes> G2) * G1 \<Otimes> G2\<^sup>\<dagger>) $$ (i, j) = 1\<^sub>m (dim_col G1 * dim_col G2) $$ (i, j)
[PROOF STEP]
using assms index_tensor_gate_unitary2
[PROOF STATE]
proof (prove)
using this:
i < dim_row (1\<^sub>m (dim_col G1 * dim_col G2))
j < dim_col (1\<^sub>m (dim_col G1 * dim_col G2))
gate m G1
gate n G2
\<lbrakk>gate ?m ?G1.0; gate ?n ?G2.0; ?i < dim_row (1\<^sub>m (dim_col ?G1.0 * dim_col ?G2.0)); ?j < dim_col (1\<^sub>m (dim_col ?G1.0 * dim_col ?G2.0))\<rbrakk> \<Longrightarrow> ((?G1.0 \<Otimes> ?G2.0) * ?G1.0 \<Otimes> ?G2.0\<^sup>\<dagger>) $$ (?i, ?j) = 1\<^sub>m (dim_col ?G1.0 * dim_col ?G2.0) $$ (?i, ?j)

goal (1 subgoal):
 1. ((G1 \<Otimes> G2) * G1 \<Otimes> G2\<^sup>\<dagger>) $$ (i, j) = 1\<^sub>m (dim_col G1 * dim_col G2) $$ (i, j)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
((G1 \<Otimes> G2) * G1 \<Otimes> G2\<^sup>\<dagger>) $$ (i, j) = 1\<^sub>m (dim_col G1 * dim_col G2) $$ (i, j)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma "Card C_continuum"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Card C_continuum
[PROOF STEP]
by (simp add: C_continuum_def Card_def)


[STATEMENT]
lemma tensor_P_adjoint_left_right:
  assumes "m1 \<in> carrier_mat N N" and "m2 \<in> carrier_mat K K" and "m3 \<in> carrier_mat N N" and "m4 \<in> carrier_mat K K"
  shows "adjoint (tensor_P m1 m2) * tensor_P m3 m4 * tensor_P m1 m2 = tensor_P (adjoint m1 * m3 * m1) (adjoint m2 * m4 * m2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. adjoint (tensor_P m1 m2) * tensor_P m3 m4 * tensor_P m1 m2 = tensor_P (adjoint m1 * m3 * m1) (adjoint m2 * m4 * m2)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. adjoint (tensor_P m1 m2) * tensor_P m3 m4 * tensor_P m1 m2 = tensor_P (adjoint m1 * m3 * m1) (adjoint m2 * m4 * m2)
[PROOF STEP]
have eq1: "adjoint (tensor_P m1 m2) = tensor_P (adjoint m1) (adjoint m2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. adjoint (tensor_P m1 m2) = tensor_P (adjoint m1) (adjoint m2)
[PROOF STEP]
unfolding ps2_P.ptensor_mat_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. adjoint (ps_P.tensor_mat m1 m2) = ps_P.tensor_mat (adjoint m1) (adjoint m2)
[PROOF STEP]
apply (subst ps_P.tensor_mat_adjoint)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. m1 \<in> carrier_mat ps_P.d1 ps_P.d1
 2. m2 \<in> carrier_mat ps_P.d2 ps_P.d2
 3. ps_P.tensor_mat (adjoint m1) (adjoint m2) = ps_P.tensor_mat (adjoint m1) (adjoint m2)
[PROOF STEP]
using ps_P_d1 ps_P_d2 assms
[PROOF STATE]
proof (prove)
using this:
ps_P.d1 = N
ps_P.d2 = K
m1 \<in> carrier_mat N N
m2 \<in> carrier_mat K K
m3 \<in> carrier_mat N N
m4 \<in> carrier_mat K K

goal (3 subgoals):
 1. m1 \<in> carrier_mat ps_P.d1 ps_P.d1
 2. m2 \<in> carrier_mat ps_P.d2 ps_P.d2
 3. ps_P.tensor_mat (adjoint m1) (adjoint m2) = ps_P.tensor_mat (adjoint m1) (adjoint m2)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
adjoint (tensor_P m1 m2) = tensor_P (adjoint m1) (adjoint m2)

goal (1 subgoal):
 1. adjoint (tensor_P m1 m2) * tensor_P m3 m4 * tensor_P m1 m2 = tensor_P (adjoint m1 * m3 * m1) (adjoint m2 * m4 * m2)
[PROOF STEP]
have eq2: "adjoint (tensor_P m1 m2) * tensor_P m3 m4 = tensor_P (adjoint m1 * m3) (adjoint m2 * m4)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. adjoint (tensor_P m1 m2) * tensor_P m3 m4 = tensor_P (adjoint m1 * m3) (adjoint m2 * m4)
[PROOF STEP]
unfolding ps2_P.ptensor_mat_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. adjoint (ps_P.tensor_mat m1 m2) * ps_P.tensor_mat m3 m4 = ps_P.tensor_mat (adjoint m1 * m3) (adjoint m2 * m4)
[PROOF STEP]
apply (subst ps_P.tensor_mat_mult)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. adjoint m1 \<in> carrier_mat ps_P.d1 ps_P.d1
 2. m3 \<in> carrier_mat ps_P.d1 ps_P.d1
 3. adjoint m2 \<in> carrier_mat ps_P.d2 ps_P.d2
 4. m4 \<in> carrier_mat ps_P.d2 ps_P.d2
 5. adjoint (ps_P.tensor_mat m1 m2) * ps_P.tensor_mat m3 m4 = ps_P.tensor_mat (adjoint m1) (adjoint m2) * ps_P.tensor_mat m3 m4
[PROOF STEP]
using ps_P_d1 ps_P_d2 assms eq1
[PROOF STATE]
proof (prove)
using this:
ps_P.d1 = N
ps_P.d2 = K
m1 \<in> carrier_mat N N
m2 \<in> carrier_mat K K
m3 \<in> carrier_mat N N
m4 \<in> carrier_mat K K
adjoint (tensor_P m1 m2) = tensor_P (adjoint m1) (adjoint m2)

goal (5 subgoals):
 1. adjoint m1 \<in> carrier_mat ps_P.d1 ps_P.d1
 2. m3 \<in> carrier_mat ps_P.d1 ps_P.d1
 3. adjoint m2 \<in> carrier_mat ps_P.d2 ps_P.d2
 4. m4 \<in> carrier_mat ps_P.d2 ps_P.d2
 5. adjoint (ps_P.tensor_mat m1 m2) * ps_P.tensor_mat m3 m4 = ps_P.tensor_mat (adjoint m1) (adjoint m2) * ps_P.tensor_mat m3 m4
[PROOF STEP]
unfolding ps2_P.ptensor_mat_def
[PROOF STATE]
proof (prove)
using this:
ps_P.d1 = N
ps_P.d2 = K
m1 \<in> carrier_mat N N
m2 \<in> carrier_mat K K
m3 \<in> carrier_mat N N
m4 \<in> carrier_mat K K
adjoint (ps_P.tensor_mat m1 m2) = ps_P.tensor_mat (adjoint m1) (adjoint m2)

goal (5 subgoals):
 1. adjoint m1 \<in> carrier_mat ps_P.d1 ps_P.d1
 2. m3 \<in> carrier_mat ps_P.d1 ps_P.d1
 3. adjoint m2 \<in> carrier_mat ps_P.d2 ps_P.d2
 4. m4 \<in> carrier_mat ps_P.d2 ps_P.d2
 5. adjoint (ps_P.tensor_mat m1 m2) * ps_P.tensor_mat m3 m4 = ps_P.tensor_mat (adjoint m1) (adjoint m2) * ps_P.tensor_mat m3 m4
[PROOF STEP]
by (auto simp add: adjoint_dim)
[PROOF STATE]
proof (state)
this:
adjoint (tensor_P m1 m2) * tensor_P m3 m4 = tensor_P (adjoint m1 * m3) (adjoint m2 * m4)

goal (1 subgoal):
 1. adjoint (tensor_P m1 m2) * tensor_P m3 m4 * tensor_P m1 m2 = tensor_P (adjoint m1 * m3 * m1) (adjoint m2 * m4 * m2)
[PROOF STEP]
have eq3: "tensor_P (adjoint m1 * m3) (adjoint m2 * m4) * (tensor_P m1 m2) = tensor_P (adjoint m1 * m3 * m1) (adjoint m2 * m4 * m2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. tensor_P (adjoint m1 * m3) (adjoint m2 * m4) * tensor_P m1 m2 = tensor_P (adjoint m1 * m3 * m1) (adjoint m2 * m4 * m2)
[PROOF STEP]
unfolding ps2_P.ptensor_mat_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ps_P.tensor_mat (adjoint m1 * m3) (adjoint m2 * m4) * ps_P.tensor_mat m1 m2 = ps_P.tensor_mat (adjoint m1 * m3 * m1) (adjoint m2 * m4 * m2)
[PROOF STEP]
apply (subst ps_P.tensor_mat_mult[of "adjoint m1 * m3"])
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. adjoint m1 * m3 \<in> carrier_mat ps_P.d1 ps_P.d1
 2. m1 \<in> carrier_mat ps_P.d1 ps_P.d1
 3. adjoint m2 * m4 \<in> carrier_mat ps_P.d2 ps_P.d2
 4. m2 \<in> carrier_mat ps_P.d2 ps_P.d2
 5. ps_P.tensor_mat (adjoint m1 * m3) (adjoint m2 * m4) * ps_P.tensor_mat m1 m2 = ps_P.tensor_mat (adjoint m1 * m3) (adjoint m2 * m4) * ps_P.tensor_mat m1 m2
[PROOF STEP]
using ps_P_d1 ps_P_d2 assms
[PROOF STATE]
proof (prove)
using this:
ps_P.d1 = N
ps_P.d2 = K
m1 \<in> carrier_mat N N
m2 \<in> carrier_mat K K
m3 \<in> carrier_mat N N
m4 \<in> carrier_mat K K

goal (5 subgoals):
 1. adjoint m1 * m3 \<in> carrier_mat ps_P.d1 ps_P.d1
 2. m1 \<in> carrier_mat ps_P.d1 ps_P.d1
 3. adjoint m2 * m4 \<in> carrier_mat ps_P.d2 ps_P.d2
 4. m2 \<in> carrier_mat ps_P.d2 ps_P.d2
 5. ps_P.tensor_mat (adjoint m1 * m3) (adjoint m2 * m4) * ps_P.tensor_mat m1 m2 = ps_P.tensor_mat (adjoint m1 * m3) (adjoint m2 * m4) * ps_P.tensor_mat m1 m2
[PROOF STEP]
by (auto simp add: adjoint_dim)
[PROOF STATE]
proof (state)
this:
tensor_P (adjoint m1 * m3) (adjoint m2 * m4) * tensor_P m1 m2 = tensor_P (adjoint m1 * m3 * m1) (adjoint m2 * m4 * m2)

goal (1 subgoal):
 1. adjoint (tensor_P m1 m2) * tensor_P m3 m4 * tensor_P m1 m2 = tensor_P (adjoint m1 * m3 * m1) (adjoint m2 * m4 * m2)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. adjoint (tensor_P m1 m2) * tensor_P m3 m4 * tensor_P m1 m2 = tensor_P (adjoint m1 * m3 * m1) (adjoint m2 * m4 * m2)
[PROOF STEP]
using eq1 eq2 eq3
[PROOF STATE]
proof (prove)
using this:
adjoint (tensor_P m1 m2) = tensor_P (adjoint m1) (adjoint m2)
adjoint (tensor_P m1 m2) * tensor_P m3 m4 = tensor_P (adjoint m1 * m3) (adjoint m2 * m4)
tensor_P (adjoint m1 * m3) (adjoint m2 * m4) * tensor_P m1 m2 = tensor_P (adjoint m1 * m3 * m1) (adjoint m2 * m4 * m2)

goal (1 subgoal):
 1. adjoint (tensor_P m1 m2) * tensor_P m3 m4 * tensor_P m1 m2 = tensor_P (adjoint m1 * m3 * m1) (adjoint m2 * m4 * m2)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
adjoint (tensor_P m1 m2) * tensor_P m3 m4 * tensor_P m1 m2 = tensor_P (adjoint m1 * m3 * m1) (adjoint m2 * m4 * m2)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma desargues_config_2D_rkA'B'PQ_rkA'C'PQ_rkB'C'PQ :
  assumes "desargues_config_2D A B C A' B' C' P \<alpha> \<beta> \<gamma>" and "rk {A', P} = 2" and "rk {B', P} = 2"
and "rk {C', P} = 2" and "rk {A, B, C, A', B', C', P, Q} \<ge> 4"
  shows "rk {A', B', P, Q} = 4" and "rk {A', C', P, Q} = 4" and "rk {B', C', P, Q} = 4"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rk {A', B', P, Q} = 4 &&& rk {A', C', P, Q} = 4 &&& rk {B', C', P, Q} = 4
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. rk {A', B', P, Q} = 4
 2. rk {A', C', P, Q} = 4
 3. rk {B', C', P, Q} = 4
[PROOF STEP]
show "rk {A', B', P, Q} = 4"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rk {A', B', P, Q} = 4
[PROOF STEP]
using rk_A'B'PQ[of "A" "A'" "B" "C" "B'" "C'" "P" "Q"] assms(1) desargues_config_2D_def[of A B C A' B' C' P \<alpha> \<beta> \<gamma>]
      assms(2) assms(3) assms(5)
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>rk {A, A'} = 2; rk {A, B, C, A', B', C'} = 3; rk {A, A', P} = 2; rk {A, B, P} = 3; rk {B, B', P} = 2; rk {A', P} = 2; rk {B', P} = 2; 4 \<le> rk {A, B, C, A', B', C', P, Q}\<rbrakk> \<Longrightarrow> rk {A', B', P, Q} = 4
desargues_config_2D A B C A' B' C' P \<alpha> \<beta> \<gamma>
desargues_config_2D A B C A' B' C' P \<alpha> \<beta> \<gamma> \<equiv> rk {A, B, C} = 3 \<and> rk {A', B', C'} = 3 \<and> rk {A, A', P} = 2 \<and> rk {B, B', P} = 2 \<and> rk {C, C', P} = 2 \<and> rk {A, B, \<gamma>} = 2 \<and> rk {A', B', \<gamma>} = 2 \<and> rk {A, C, \<beta>} = 2 \<and> rk {A', C', \<beta>} = 2 \<and> rk {B, C, \<alpha>} = 2 \<and> rk {B', C', \<alpha>} = 2 \<and> rk {A, B, C, A', B', C'} = 3 \<and> rk {A, B, P} = 3 \<and> rk {A, C, P} = 3 \<and> rk {B, C, P} = 3 \<and> rk {A, A'} = 2 \<and> rk {B, B'} = 2 \<and> rk {C, C'} = 2
rk {A', P} = 2
rk {B', P} = 2
4 \<le> rk {A, B, C, A', B', C', P, Q}

goal (1 subgoal):
 1. rk {A', B', P, Q} = 4
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
rk {A', B', P, Q} = 4

goal (2 subgoals):
 1. rk {A', C', P, Q} = 4
 2. rk {B', C', P, Q} = 4
[PROOF STEP]
show "rk {A', C', P, Q} = 4"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rk {A', C', P, Q} = 4
[PROOF STEP]
using rk_A'B'PQ[of "A" "A'" "C" "B" "C'" "B'" "P" "Q"] assms(1) desargues_config_2D_def[of A B C A' B' C' P \<alpha> \<beta> \<gamma>]
      assms(2) assms(4) assms(5)
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>rk {A, A'} = 2; rk {A, C, B, A', C', B'} = 3; rk {A, A', P} = 2; rk {A, C, P} = 3; rk {C, C', P} = 2; rk {A', P} = 2; rk {C', P} = 2; 4 \<le> rk {A, C, B, A', C', B', P, Q}\<rbrakk> \<Longrightarrow> rk {A', C', P, Q} = 4
desargues_config_2D A B C A' B' C' P \<alpha> \<beta> \<gamma>
desargues_config_2D A B C A' B' C' P \<alpha> \<beta> \<gamma> \<equiv> rk {A, B, C} = 3 \<and> rk {A', B', C'} = 3 \<and> rk {A, A', P} = 2 \<and> rk {B, B', P} = 2 \<and> rk {C, C', P} = 2 \<and> rk {A, B, \<gamma>} = 2 \<and> rk {A', B', \<gamma>} = 2 \<and> rk {A, C, \<beta>} = 2 \<and> rk {A', C', \<beta>} = 2 \<and> rk {B, C, \<alpha>} = 2 \<and> rk {B', C', \<alpha>} = 2 \<and> rk {A, B, C, A', B', C'} = 3 \<and> rk {A, B, P} = 3 \<and> rk {A, C, P} = 3 \<and> rk {B, C, P} = 3 \<and> rk {A, A'} = 2 \<and> rk {B, B'} = 2 \<and> rk {C, C'} = 2
rk {A', P} = 2
rk {C', P} = 2
4 \<le> rk {A, B, C, A', B', C', P, Q}

goal (1 subgoal):
 1. rk {A', C', P, Q} = 4
[PROOF STEP]
by (metis insert_commute)
[PROOF STATE]
proof (state)
this:
rk {A', C', P, Q} = 4

goal (1 subgoal):
 1. rk {B', C', P, Q} = 4
[PROOF STEP]
show "rk {B', C', P, Q} = 4"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rk {B', C', P, Q} = 4
[PROOF STEP]
using rk_A'B'PQ[of "B" "B'" "C" "A" "C'" "A'" "P" "Q"] assms(1) desargues_config_2D_def[of A B C A' B' C' P \<alpha> \<beta> \<gamma>]
      assms(3) assms(4) assms(5)
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>rk {B, B'} = 2; rk {B, C, A, B', C', A'} = 3; rk {B, B', P} = 2; rk {B, C, P} = 3; rk {C, C', P} = 2; rk {B', P} = 2; rk {C', P} = 2; 4 \<le> rk {B, C, A, B', C', A', P, Q}\<rbrakk> \<Longrightarrow> rk {B', C', P, Q} = 4
desargues_config_2D A B C A' B' C' P \<alpha> \<beta> \<gamma>
desargues_config_2D A B C A' B' C' P \<alpha> \<beta> \<gamma> \<equiv> rk {A, B, C} = 3 \<and> rk {A', B', C'} = 3 \<and> rk {A, A', P} = 2 \<and> rk {B, B', P} = 2 \<and> rk {C, C', P} = 2 \<and> rk {A, B, \<gamma>} = 2 \<and> rk {A', B', \<gamma>} = 2 \<and> rk {A, C, \<beta>} = 2 \<and> rk {A', C', \<beta>} = 2 \<and> rk {B, C, \<alpha>} = 2 \<and> rk {B', C', \<alpha>} = 2 \<and> rk {A, B, C, A', B', C'} = 3 \<and> rk {A, B, P} = 3 \<and> rk {A, C, P} = 3 \<and> rk {B, C, P} = 3 \<and> rk {A, A'} = 2 \<and> rk {B, B'} = 2 \<and> rk {C, C'} = 2
rk {B', P} = 2
rk {C', P} = 2
4 \<le> rk {A, B, C, A', B', C', P, Q}

goal (1 subgoal):
 1. rk {B', C', P, Q} = 4
[PROOF STEP]
by (metis insert_commute)
[PROOF STATE]
proof (state)
this:
rk {B', C', P, Q} = 4

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma i_expand_i_take_mod: "
  n mod k = 0 \<Longrightarrow> f \<odot>\<^sub>i k \<Down> n = f \<Down> (n div k) \<odot>\<^sub>f k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n mod k = 0 \<Longrightarrow> f \<odot> k \<Down> n = f \<Down> (n div k) \<odot> k
[PROOF STEP]
by (clarsimp simp: mult.commute[of k] i_expand_i_take_mult elim!: dvdE)


[STATEMENT]
lemma dba_language:
  "(\<And>w. to_stream w \<in> DBA.language \<AA> \<longleftrightarrow> w \<Turnstile>\<^sub>n \<phi>) \<Longrightarrow> DBA.language \<AA> = {w. to_omega w \<Turnstile>\<^sub>n \<phi>}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>w. (to_stream w \<in> DBA.language \<AA>) = w \<Turnstile>\<^sub>n \<phi>) \<Longrightarrow> DBA.language \<AA> = {w. to_omega w \<Turnstile>\<^sub>n \<phi>}
[PROOF STEP]
by (metis (mono_tags, lifting) Collect_cong dba.language_def mem_Collect_eq to_stream_to_omega)


[STATEMENT]
lemma all_ctxt_closedD:
  "all_ctxt_closed F r \<Longrightarrow> (f, length ss) \<in> F \<Longrightarrow> length ss = length ts \<Longrightarrow>
    (\<forall> i < length ts. (ss ! i, ts ! i) \<in> r) \<Longrightarrow> (GFun f ss, GFun f ts) \<in> r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>all_ctxt_closed F r; (f, length ss) \<in> F; length ss = length ts; \<forall>i<length ts. (ss ! i, ts ! i) \<in> r\<rbrakk> \<Longrightarrow> (GFun f ss, GFun f ts) \<in> r
[PROOF STEP]
by (auto simp: all_ctxt_closed_def)


[STATEMENT]
lemma has_field_derivative_cosh [THEN DERIV_chain2, derivative_intros]:
  "(cosh has_field_derivative sinh x) (at (x :: 'a :: {banach, real_normed_field}))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (cosh has_field_derivative sinh x) (at x)
[PROOF STEP]
unfolding sinh_def cosh_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. (exp x + exp (- x)) /\<^sub>R 2) has_field_derivative (exp x - exp (- x)) /\<^sub>R 2) (at x)
[PROOF STEP]
by (auto intro!: derivative_eq_intros)


[STATEMENT]
lemma finite_ex_and2:
  assumes "finite {b. \<exists>a. Q a b}" (is "finite ?A")
  shows "finite {b. \<exists>a. P a b \<and> Q a b}" (is "finite ?B")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {b. \<exists>a. P a b \<and> Q a b}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite {b. \<exists>a. Q a b}

goal (1 subgoal):
 1. finite {b. \<exists>a. P a b \<and> Q a b}
[PROOF STEP]
by - finite


[STATEMENT]
lemma left_total_rel_converter:
  "\<lbrakk> left_unique A; right_total A; left_total B; left_total C; left_unique R; right_total R \<rbrakk>
  \<Longrightarrow> left_total (rel_converter A B C R)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>left_unique A; right_total A; left_total B; left_total C; left_unique R; right_total R\<rbrakk> \<Longrightarrow> left_total (rel_converter A B C R)
[PROOF STEP]
unfolding left_unique_alt_def left_total_alt_def rel_converter_conversep[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>A OO A\<inverse>\<inverse> \<le> (=); right_total A; (=) \<le> B OO B\<inverse>\<inverse>; (=) \<le> C OO C\<inverse>\<inverse>; R OO R\<inverse>\<inverse> \<le> (=); right_total R\<rbrakk> \<Longrightarrow> (=) \<le> rel_converter A B C R OO rel_converter A\<inverse>\<inverse> B\<inverse>\<inverse> C\<inverse>\<inverse> R\<inverse>\<inverse>
[PROOF STEP]
apply(subst rel_converter_eq[symmetric])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>A OO A\<inverse>\<inverse> \<le> (=); right_total A; (=) \<le> B OO B\<inverse>\<inverse>; (=) \<le> C OO C\<inverse>\<inverse>; R OO R\<inverse>\<inverse> \<le> (=); right_total R\<rbrakk> \<Longrightarrow> rel_converter (=) (=) (=) (=) \<le> rel_converter A B C R OO rel_converter A\<inverse>\<inverse> B\<inverse>\<inverse> C\<inverse>\<inverse> R\<inverse>\<inverse>
[PROOF STEP]
apply(rule order_trans[rotated])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>A OO A\<inverse>\<inverse> \<le> (=); right_total A; (=) \<le> B OO B\<inverse>\<inverse>; (=) \<le> C OO C\<inverse>\<inverse>; R OO R\<inverse>\<inverse> \<le> (=); right_total R\<rbrakk> \<Longrightarrow> ?y \<le> rel_converter A B C R OO rel_converter A\<inverse>\<inverse> B\<inverse>\<inverse> C\<inverse>\<inverse> R\<inverse>\<inverse>
 2. \<lbrakk>A OO A\<inverse>\<inverse> \<le> (=); right_total A; (=) \<le> B OO B\<inverse>\<inverse>; (=) \<le> C OO C\<inverse>\<inverse>; R OO R\<inverse>\<inverse> \<le> (=); right_total R\<rbrakk> \<Longrightarrow> rel_converter (=) (=) (=) (=) \<le> ?y
[PROOF STEP]
apply(rule rel_converter_neg_distr; simp add: left_unique_alt_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>A OO A\<inverse>\<inverse> \<le> (=); right_total A; (=) \<le> B OO B\<inverse>\<inverse>; (=) \<le> C OO C\<inverse>\<inverse>; R OO R\<inverse>\<inverse> \<le> (=); right_total R\<rbrakk> \<Longrightarrow> rel_converter (=) (=) (=) (=) \<le> rel_converter (A OO A\<inverse>\<inverse>) (B OO B\<inverse>\<inverse>) (C OO C\<inverse>\<inverse>) (R OO R\<inverse>\<inverse>)
[PROOF STEP]
apply(rule rel_converter_mono; assumption)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma lookup_Some_imp_find_Some:
  "lookup P xs = Some v \<Longrightarrow> \<exists>x. List.find (\<lambda>(k,_). P k) xs = Some (x,v)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lookup P xs = Some v \<Longrightarrow> \<exists>x. List.find (\<lambda>(k, uu_). P k) xs = Some (x, v)
[PROOF STEP]
by (induction xs) auto


[STATEMENT]
lemma extensional_UNIV[simp]: "extensional UNIV = UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. extensional UNIV = UNIV
[PROOF STEP]
by (auto simp: extensional_def)


[STATEMENT]
lemma convert_semantics_R:
  shows "real_sem fml x = lookup_sem (fst (convert fml)) (map (\<lambda>p. poly p x) (snd (convert fml)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_sem fml x = lookup_sem (fst (convert fml)) (map (\<lambda>p. poly p x) (snd (convert fml)))
[PROOF STEP]
unfolding convert_def Let_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_sem fml x = lookup_sem (fst (map_fml (index_of (remdups (poly_list fml))) fml, remdups (poly_list fml))) (map (\<lambda>p. poly p x) (snd (map_fml (index_of (remdups (poly_list fml))) fml, remdups (poly_list fml))))
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_sem fml x = lookup_sem (map_fml (index_of (remdups (poly_list fml))) fml) (map (\<lambda>p. poly p x) (remdups (poly_list fml)))
[PROOF STEP]
apply (intro convert_semantics_lem_R)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>p. p \<in> set (poly_list fml) \<Longrightarrow> map (\<lambda>p. poly p x) (remdups (poly_list fml)) ! index_of (remdups (poly_list fml)) p = poly p x
[PROOF STEP]
by (simp add: index_of_lookup(1) index_of_lookup(2))


[STATEMENT]
lemma hypext_polyn:
  fixes coef :: "nat \<Rightarrow> 'a :: {real_normed_field}"
    and n :: nat
  shows "(*h* (\<lambda>x. \<Sum>i<n. coef i * x^i)) x = (\<Sum>i<n. (coef i) *\<^sub>H (x^i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (*h* (\<lambda>x. \<Sum>i<n. coef i * x ^ i)) x = (\<Sum>i<n. coef i *\<^sub>H x ^ i)
[PROOF STEP]
proof (induction n)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (*h* (\<lambda>x. \<Sum>i<0. coef i * x ^ i)) x = (\<Sum>i<0. coef i *\<^sub>H x ^ i)
 2. \<And>n. (*h* (\<lambda>x. \<Sum>i<n. coef i * x ^ i)) x = (\<Sum>i<n. coef i *\<^sub>H x ^ i) \<Longrightarrow> (*h* (\<lambda>x. \<Sum>i<Suc n. coef i * x ^ i)) x = (\<Sum>i<Suc n. coef i *\<^sub>H x ^ i)
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. (*h* (\<lambda>x. \<Sum>i<0. coef i * x ^ i)) x = (\<Sum>i<0. coef i *\<^sub>H x ^ i)
 2. \<And>n. (*h* (\<lambda>x. \<Sum>i<n. coef i * x ^ i)) x = (\<Sum>i<n. coef i *\<^sub>H x ^ i) \<Longrightarrow> (*h* (\<lambda>x. \<Sum>i<Suc n. coef i * x ^ i)) x = (\<Sum>i<Suc n. coef i *\<^sub>H x ^ i)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (*h* (\<lambda>x. \<Sum>i<0. coef i * x ^ i)) x = (\<Sum>i<0. coef i *\<^sub>H x ^ i)
[PROOF STEP]
by (simp add: zero_hyperdual_def)
[PROOF STATE]
proof (state)
this:
(*h* (\<lambda>x. \<Sum>i<0. coef i * x ^ i)) x = (\<Sum>i<0. coef i *\<^sub>H x ^ i)

goal (1 subgoal):
 1. \<And>n. (*h* (\<lambda>x. \<Sum>i<n. coef i * x ^ i)) x = (\<Sum>i<n. coef i *\<^sub>H x ^ i) \<Longrightarrow> (*h* (\<lambda>x. \<Sum>i<Suc n. coef i * x ^ i)) x = (\<Sum>i<Suc n. coef i *\<^sub>H x ^ i)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. (*h* (\<lambda>x. \<Sum>i<n. coef i * x ^ i)) x = (\<Sum>i<n. coef i *\<^sub>H x ^ i) \<Longrightarrow> (*h* (\<lambda>x. \<Sum>i<Suc n. coef i * x ^ i)) x = (\<Sum>i<Suc n. coef i *\<^sub>H x ^ i)
[PROOF STEP]
case hyp: (Suc n)
[PROOF STATE]
proof (state)
this:
(*h* (\<lambda>x. \<Sum>i<n. coef i * x ^ i)) x = (\<Sum>i<n. coef i *\<^sub>H x ^ i)

goal (1 subgoal):
 1. \<And>n. (*h* (\<lambda>x. \<Sum>i<n. coef i * x ^ i)) x = (\<Sum>i<n. coef i *\<^sub>H x ^ i) \<Longrightarrow> (*h* (\<lambda>x. \<Sum>i<Suc n. coef i * x ^ i)) x = (\<Sum>i<Suc n. coef i *\<^sub>H x ^ i)
[PROOF STEP]
have "(\<lambda>x. \<Sum>i<Suc n. coef i * x ^ i) = (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n)"
   and "(\<lambda>x. \<Sum>i<Suc n. coef i *\<^sub>H x ^ i) = (\<lambda>x. (\<Sum>i<n. coef i *\<^sub>H x ^ i) + coef n *\<^sub>H x ^ n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. \<Sum>i<Suc n. coef i * x ^ i) = (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n) &&& (\<lambda>x. \<Sum>i<Suc n. coef i *\<^sub>H x ^ i) = (\<lambda>x. (\<Sum>i<n. coef i *\<^sub>H x ^ i) + coef n *\<^sub>H x ^ n)
[PROOF STEP]
by (simp_all add: field_simps)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. \<Sum>i<Suc n. coef i * x ^ i) = (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n)
(\<lambda>x. \<Sum>i<Suc n. coef i *\<^sub>H x ^ i) = (\<lambda>x. (\<Sum>i<n. coef i *\<^sub>H x ^ i) + coef n *\<^sub>H x ^ n)

goal (1 subgoal):
 1. \<And>n. (*h* (\<lambda>x. \<Sum>i<n. coef i * x ^ i)) x = (\<Sum>i<n. coef i *\<^sub>H x ^ i) \<Longrightarrow> (*h* (\<lambda>x. \<Sum>i<Suc n. coef i * x ^ i)) x = (\<Sum>i<Suc n. coef i *\<^sub>H x ^ i)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x. \<Sum>i<Suc n. coef i * x ^ i) = (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n)
(\<lambda>x. \<Sum>i<Suc n. coef i *\<^sub>H x ^ i) = (\<lambda>x. (\<Sum>i<n. coef i *\<^sub>H x ^ i) + coef n *\<^sub>H x ^ n)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. \<Sum>i<Suc n. coef i * x ^ i) = (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n)
(\<lambda>x. \<Sum>i<Suc n. coef i *\<^sub>H x ^ i) = (\<lambda>x. (\<Sum>i<n. coef i *\<^sub>H x ^ i) + coef n *\<^sub>H x ^ n)

goal (1 subgoal):
 1. (*h* (\<lambda>x. \<Sum>i<Suc n. coef i * x ^ i)) x = (\<Sum>i<Suc n. coef i *\<^sub>H x ^ i)
[PROOF STEP]
proof (simp)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (*h* (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n)) x = (\<Sum>i<n. coef i *\<^sub>H x ^ i) + coef n *\<^sub>H x ^ n
[PROOF STEP]
have "(\<lambda>x. coef n * x ^ n) twice_field_differentiable_at Base x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. coef n * x ^ n) twice_field_differentiable_at Base x
[PROOF STEP]
using twice_field_differentiable_at_compose[of "\<lambda>x. x ^ n" "Base x" "(*) (coef n)"]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>(\<lambda>x. x ^ n) twice_field_differentiable_at Base x; (*) (coef n) twice_field_differentiable_at Base x ^ n\<rbrakk> \<Longrightarrow> (\<lambda>x. coef n * x ^ n) twice_field_differentiable_at Base x

goal (1 subgoal):
 1. (\<lambda>x. coef n * x ^ n) twice_field_differentiable_at Base x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<lambda>x. coef n * x ^ n) twice_field_differentiable_at Base x

goal (1 subgoal):
 1. (*h* (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n)) x = (\<Sum>i<n. coef i *\<^sub>H x ^ i) + coef n *\<^sub>H x ^ n
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x. coef n * x ^ n) twice_field_differentiable_at Base x
[PROOF STEP]
have "(*h* (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n)) x =
          (*h* (\<lambda>x. (\<Sum>i<n. coef i * x ^ i))) x + (*h* (\<lambda>x. coef n * x ^ n)) x"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. coef n * x ^ n) twice_field_differentiable_at Base x

goal (1 subgoal):
 1. (*h* (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n)) x = (*h* (\<lambda>x. \<Sum>i<n. coef i * x ^ i)) x + (*h* (\<lambda>x. coef n * x ^ n)) x
[PROOF STEP]
by (simp add: hypext_fun_add)
[PROOF STATE]
proof (state)
this:
(*h* (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n)) x = (*h* (\<lambda>x. \<Sum>i<n. coef i * x ^ i)) x + (*h* (\<lambda>x. coef n * x ^ n)) x

goal (1 subgoal):
 1. (*h* (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n)) x = (\<Sum>i<n. coef i *\<^sub>H x ^ i) + coef n *\<^sub>H x ^ n
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(*h* (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n)) x = (*h* (\<lambda>x. \<Sum>i<n. coef i * x ^ i)) x + (*h* (\<lambda>x. coef n * x ^ n)) x

goal (1 subgoal):
 1. (*h* (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n)) x = (\<Sum>i<n. coef i *\<^sub>H x ^ i) + coef n *\<^sub>H x ^ n
[PROOF STEP]
have "(*h* (\<lambda>x. coef n * x ^ n)) x = coef n *\<^sub>H x ^ n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (*h* (\<lambda>x. coef n * x ^ n)) x = coef n *\<^sub>H x ^ n
[PROOF STEP]
by (simp add: hypext_fun_scaleH hypext_power)
[PROOF STATE]
proof (state)
this:
(*h* (\<lambda>x. coef n * x ^ n)) x = coef n *\<^sub>H x ^ n

goal (1 subgoal):
 1. (*h* (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n)) x = (\<Sum>i<n. coef i *\<^sub>H x ^ i) + coef n *\<^sub>H x ^ n
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(*h* (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n)) x = (*h* (\<lambda>x. \<Sum>i<n. coef i * x ^ i)) x + (*h* (\<lambda>x. coef n * x ^ n)) x
(*h* (\<lambda>x. coef n * x ^ n)) x = coef n *\<^sub>H x ^ n
[PROOF STEP]
have "(*h* (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n)) x = (\<Sum>i<n. coef i *\<^sub>H x ^ i) + coef n *\<^sub>H x ^ n"
[PROOF STATE]
proof (prove)
using this:
(*h* (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n)) x = (*h* (\<lambda>x. \<Sum>i<n. coef i * x ^ i)) x + (*h* (\<lambda>x. coef n * x ^ n)) x
(*h* (\<lambda>x. coef n * x ^ n)) x = coef n *\<^sub>H x ^ n

goal (1 subgoal):
 1. (*h* (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n)) x = (\<Sum>i<n. coef i *\<^sub>H x ^ i) + coef n *\<^sub>H x ^ n
[PROOF STEP]
using hyp
[PROOF STATE]
proof (prove)
using this:
(*h* (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n)) x = (*h* (\<lambda>x. \<Sum>i<n. coef i * x ^ i)) x + (*h* (\<lambda>x. coef n * x ^ n)) x
(*h* (\<lambda>x. coef n * x ^ n)) x = coef n *\<^sub>H x ^ n
(*h* (\<lambda>x. \<Sum>i<n. coef i * x ^ i)) x = (\<Sum>i<n. coef i *\<^sub>H x ^ i)

goal (1 subgoal):
 1. (*h* (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n)) x = (\<Sum>i<n. coef i *\<^sub>H x ^ i) + coef n *\<^sub>H x ^ n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(*h* (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n)) x = (\<Sum>i<n. coef i *\<^sub>H x ^ i) + coef n *\<^sub>H x ^ n

goal (1 subgoal):
 1. (*h* (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n)) x = (\<Sum>i<n. coef i *\<^sub>H x ^ i) + coef n *\<^sub>H x ^ n
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(*h* (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n)) x = (\<Sum>i<n. coef i *\<^sub>H x ^ i) + coef n *\<^sub>H x ^ n
[PROOF STEP]
show "(*h* (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n)) x = (\<Sum>i<n. coef i *\<^sub>H x ^ i) + coef n *\<^sub>H x ^ n"
[PROOF STATE]
proof (prove)
using this:
(*h* (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n)) x = (\<Sum>i<n. coef i *\<^sub>H x ^ i) + coef n *\<^sub>H x ^ n

goal (1 subgoal):
 1. (*h* (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n)) x = (\<Sum>i<n. coef i *\<^sub>H x ^ i) + coef n *\<^sub>H x ^ n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(*h* (\<lambda>x. (\<Sum>i<n. coef i * x ^ i) + coef n * x ^ n)) x = (\<Sum>i<n. coef i *\<^sub>H x ^ i) + coef n *\<^sub>H x ^ n

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(*h* (\<lambda>x. \<Sum>i<Suc n. coef i * x ^ i)) x = (\<Sum>i<Suc n. coef i *\<^sub>H x ^ i)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma VLambda_iff1: "x \<in>\<^sub>\<circ> (\<lambda>a\<in>\<^sub>\<circ>A. f a) \<longleftrightarrow> (\<exists>a\<in>\<^sub>\<circ>A. x = \<langle>a, f a\<rangle>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<in>\<^sub>\<circ> VLambda A f) = (\<exists>a\<in>elts A. x = \<langle>a, f a\<rangle>)
[PROOF STEP]
by auto


[STATEMENT]
lemma incidence_mat_des_index:
  assumes "I \<subseteq> {0..<\<v>}"
  assumes "card I = \<t>"
  shows "mat_point_index N I = \<Lambda>\<^sub>t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_point_index N I = \<Lambda>\<^sub>t
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. mat_point_index N I = \<Lambda>\<^sub>t
[PROOF STEP]
have card: "card ((!) \<V>s ` I) = \<t>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card ((!) \<V>s ` I) = \<t>
[PROOF STEP]
using assms points_indexing_inj
[PROOF STATE]
proof (prove)
using this:
I \<subseteq> {0..<\<v>}
card I = \<t>
\<forall>i\<in>?I. i < length \<V>s \<Longrightarrow> inj_on ((!) \<V>s) ?I

goal (1 subgoal):
 1. card ((!) \<V>s ` I) = \<t>
[PROOF STEP]
by (metis (mono_tags, lifting) card_image ex_nat_less_eq not_le points_list_length subset_iff)
[PROOF STATE]
proof (state)
this:
card ((!) \<V>s ` I) = \<t>

goal (1 subgoal):
 1. mat_point_index N I = \<Lambda>\<^sub>t
[PROOF STEP]
have "((!) \<V>s ` I) \<subseteq> \<V>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (!) \<V>s ` I \<subseteq> \<V>
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
I \<subseteq> {0..<\<v>}
card I = \<t>

goal (1 subgoal):
 1. (!) \<V>s ` I \<subseteq> \<V>
[PROOF STEP]
by (metis atLeastLessThan_iff image_subset_iff subsetD valid_points_index)
[PROOF STATE]
proof (state)
this:
(!) \<V>s ` I \<subseteq> \<V>

goal (1 subgoal):
 1. mat_point_index N I = \<Lambda>\<^sub>t
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(!) \<V>s ` I \<subseteq> \<V>
[PROOF STEP]
have "\<B> index ((!) \<V>s ` I) = \<Lambda>\<^sub>t"
[PROOF STATE]
proof (prove)
using this:
(!) \<V>s ` I \<subseteq> \<V>

goal (1 subgoal):
 1. \<B> index (!) \<V>s ` I = \<Lambda>\<^sub>t
[PROOF STEP]
using balanced assms(2) card
[PROOF STATE]
proof (prove)
using this:
(!) \<V>s ` I \<subseteq> \<V>
\<lbrakk>?ps \<subseteq> \<V>; card ?ps = \<t>\<rbrakk> \<Longrightarrow> \<B> index ?ps = \<Lambda>\<^sub>t
card I = \<t>
card ((!) \<V>s ` I) = \<t>

goal (1 subgoal):
 1. \<B> index (!) \<V>s ` I = \<Lambda>\<^sub>t
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<B> index (!) \<V>s ` I = \<Lambda>\<^sub>t

goal (1 subgoal):
 1. mat_point_index N I = \<Lambda>\<^sub>t
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<B> index (!) \<V>s ` I = \<Lambda>\<^sub>t

goal (1 subgoal):
 1. mat_point_index N I = \<Lambda>\<^sub>t
[PROOF STEP]
using mat_point_index_rep assms(1) lessThan_atLeast0
[PROOF STATE]
proof (prove)
using this:
\<B> index (!) \<V>s ` I = \<Lambda>\<^sub>t
?I \<subseteq> {..<\<v>} \<Longrightarrow> mat_point_index N ?I = \<B> index (!) \<V>s ` ?I
I \<subseteq> {0..<\<v>}
{..<?n} = {0..<?n}

goal (1 subgoal):
 1. mat_point_index N I = \<Lambda>\<^sub>t
[PROOF STEP]
by presburger
[PROOF STATE]
proof (state)
this:
mat_point_index N I = \<Lambda>\<^sub>t

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma word_bitwise_1_simps [simp]:
  "NOT (1::'a::len word) = -2"
  "1 AND numeral b = word_of_int (1 AND numeral b)"
  "1 AND - numeral b = word_of_int (1 AND - numeral b)"
  "numeral a AND 1 = word_of_int (numeral a AND 1)"
  "- numeral a AND 1 = word_of_int (- numeral a AND 1)"
  "1 OR numeral b = word_of_int (1 OR numeral b)"
  "1 OR - numeral b = word_of_int (1 OR - numeral b)"
  "numeral a OR 1 = word_of_int (numeral a OR 1)"
  "- numeral a OR 1 = word_of_int (- numeral a OR 1)"
  "1 XOR numeral b = word_of_int (1 XOR numeral b)"
  "1 XOR - numeral b = word_of_int (1 XOR - numeral b)"
  "numeral a XOR 1 = word_of_int (numeral a XOR 1)"
  "- numeral a XOR 1 = word_of_int (- numeral a XOR 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((NOT 1 = - 2 &&& 1 AND numeral b = word_of_int (1 AND numeral b) &&& 1 AND - numeral b = word_of_int (1 AND - numeral b)) &&& numeral a AND 1 = word_of_int (numeral a AND 1) &&& - numeral a AND 1 = word_of_int (- numeral a AND 1) &&& 1 OR numeral b = word_of_int (1 OR numeral b)) &&& (1 OR - numeral b = word_of_int (1 OR - numeral b) &&& numeral a OR 1 = word_of_int (numeral a OR 1) &&& - numeral a OR 1 = word_of_int (- numeral a OR 1)) &&& (1 XOR numeral b = word_of_int (1 XOR numeral b) &&& 1 XOR - numeral b = word_of_int (1 XOR - numeral b)) &&& numeral a XOR 1 = word_of_int (numeral a XOR 1) &&& - numeral a XOR 1 = word_of_int (- numeral a XOR 1)
[PROOF STEP]
apply (simp_all add: word_uint_eq_iff unsigned_not_eq unsigned_and_eq unsigned_or_eq
         unsigned_xor_eq of_nat_take_bit ac_simps unsigned_of_int)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. 1 XOR take_bit LENGTH('k) (- numeral b) = take_bit LENGTH('k) (NOT (1 XOR neg_numeral_class.sub b num.One))
 2. 1 XOR take_bit LENGTH('m) (- numeral a) = take_bit LENGTH('m) (NOT (1 XOR neg_numeral_class.sub a num.One))
[PROOF STEP]
apply (simp_all add: minus_numeral_eq_not_sub_one)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. 1 XOR take_bit LENGTH('k) (NOT (neg_numeral_class.sub b num.One)) = take_bit LENGTH('k) (NOT (1 XOR neg_numeral_class.sub b num.One))
 2. 1 XOR take_bit LENGTH('m) (NOT (neg_numeral_class.sub a num.One)) = take_bit LENGTH('m) (NOT (1 XOR neg_numeral_class.sub a num.One))
[PROOF STEP]
apply (simp_all only: sub_one_eq_not_neg bit.xor_compl_right take_bit_xor bit.double_compl)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. 1 XOR take_bit LENGTH('k) (- numeral b) = take_bit LENGTH('k) 1 XOR take_bit LENGTH('k) (- numeral b)
 2. 1 XOR take_bit LENGTH('m) (- numeral a) = take_bit LENGTH('m) 1 XOR take_bit LENGTH('m) (- numeral a)
[PROOF STEP]
apply simp_all
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma hadd_pred_right: "Ord y \<Longrightarrow> y \<noteq> 0 \<Longrightarrow> x @+ pred y = pred (x @+ y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Ord y; y \<noteq> 0\<rbrakk> \<Longrightarrow> x @+ pred y = pred (x @+ y)
[PROOF STEP]
by (metis hadd_succ_right pred_succ succ_pred)


[STATEMENT]
lemma [code]: "List.coset (l::'a::enum list) = set (enum_class.enum) - set l"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. List.coset l = set enum_class.enum - set l
[PROOF STEP]
by (metis Compl_eq_Diff_UNIV coset_def enum_UNIV)


[STATEMENT]
theorem e_transcendental_complex: "\<not> algebraic (exp 1 :: complex)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> algebraic (exp 1)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. algebraic (exp 1) \<Longrightarrow> False
[PROOF STEP]
assume "algebraic (exp 1 :: complex)"
[PROOF STATE]
proof (state)
this:
algebraic (exp 1)

goal (1 subgoal):
 1. algebraic (exp 1) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
algebraic (exp 1)
[PROOF STEP]
obtain q :: "int poly"
    where q: "q \<noteq> 0" "coeff q 0 \<noteq> 0" "poly (of_int_poly q) (exp 1 :: complex) = 0"
[PROOF STATE]
proof (prove)
using this:
algebraic (exp 1)

goal (1 subgoal):
 1. (\<And>q. \<lbrakk>q \<noteq> 0; poly.coeff q 0 \<noteq> 0; poly (of_int_poly q) (exp 1) = 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (elim algebraicE'_nonzero) simp_all
[PROOF STATE]
proof (state)
this:
q \<noteq> 0
poly.coeff q 0 \<noteq> 0
poly (of_int_poly q) (exp 1) = 0

goal (1 subgoal):
 1. algebraic (exp 1) \<Longrightarrow> False
[PROOF STEP]
define n :: nat where "n = degree q"
[PROOF STATE]
proof (state)
this:
n = degree q

goal (1 subgoal):
 1. algebraic (exp 1) \<Longrightarrow> False
[PROOF STEP]
from q
[PROOF STATE]
proof (chain)
picking this:
q \<noteq> 0
poly.coeff q 0 \<noteq> 0
poly (of_int_poly q) (exp 1) = 0
[PROOF STEP]
have [simp]: "n \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
q \<noteq> 0
poly.coeff q 0 \<noteq> 0
poly (of_int_poly q) (exp 1) = 0

goal (1 subgoal):
 1. n \<noteq> 0
[PROOF STEP]
by (intro notI) (auto simp: n_def elim!: degree_eq_zeroE)
[PROOF STATE]
proof (state)
this:
n \<noteq> 0

goal (1 subgoal):
 1. algebraic (exp 1) \<Longrightarrow> False
[PROOF STEP]
define qmax where "qmax = Max (insert 0 (abs ` set (coeffs q)))"
[PROOF STATE]
proof (state)
this:
qmax = Max (insert 0 (abs ` set (coeffs q)))

goal (1 subgoal):
 1. algebraic (exp 1) \<Longrightarrow> False
[PROOF STEP]
have qmax_nonneg [simp]: "qmax \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> qmax
[PROOF STEP]
by (simp add: qmax_def)
[PROOF STATE]
proof (state)
this:
0 \<le> qmax

goal (1 subgoal):
 1. algebraic (exp 1) \<Longrightarrow> False
[PROOF STEP]
have qmax: "\<bar>coeff q k\<bar> \<le> qmax" for k
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>poly.coeff q k\<bar> \<le> qmax
[PROOF STEP]
by (cases "k \<le> degree q")
       (auto simp: qmax_def coeff_eq_0 coeffs_def simp del: upt_Suc intro: Max.coboundedI)
[PROOF STATE]
proof (state)
this:
\<bar>poly.coeff q ?k\<bar> \<le> qmax

goal (1 subgoal):
 1. algebraic (exp 1) \<Longrightarrow> False
[PROOF STEP]
obtain C where C: "C \<ge> 0"
    "\<And>x. x \<in> closed_segment 0 (of_nat n) \<Longrightarrow> norm (\<Prod>k\<in>{1..n}. (x - of_nat k :: complex)) \<le> C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>C. \<lbrakk>0 \<le> C; \<And>x. x \<in> closed_segment 0 (of_nat n) \<Longrightarrow> cmod (\<Prod>k = 1..n. x - of_nat k) \<le> C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (erule e_transcendental_aux_bound)
[PROOF STATE]
proof (state)
this:
0 \<le> C
?x \<in> closed_segment 0 (of_nat n) \<Longrightarrow> cmod (\<Prod>k = 1..n. ?x - of_nat k) \<le> C

goal (1 subgoal):
 1. algebraic (exp 1) \<Longrightarrow> False
[PROOF STEP]
define E where "E = (1 + real n) * real_of_int qmax * real n * exp (real n) / real n"
[PROOF STATE]
proof (state)
this:
E = (1 + real n) * real_of_int qmax * real n * exp (real n) / real n

goal (1 subgoal):
 1. algebraic (exp 1) \<Longrightarrow> False
[PROOF STEP]
define F where "F = real n * C"
[PROOF STATE]
proof (state)
this:
F = real n * C

goal (1 subgoal):
 1. algebraic (exp 1) \<Longrightarrow> False
[PROOF STEP]
have ineq: "fact (p - 1) \<le> E * F ^ p" if p: "prime p" "p > n" "p > abs (coeff q 0)" for p
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
from p(1)
[PROOF STATE]
proof (chain)
picking this:
prime p
[PROOF STEP]
have p_pos: "p > 0"
[PROOF STATE]
proof (prove)
using this:
prime p

goal (1 subgoal):
 1. 0 < p
[PROOF STEP]
by (simp add: prime_gt_0_nat)
[PROOF STATE]
proof (state)
this:
0 < p

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
define f :: "int poly"
      where "f = monom 1 (p - 1) * (\<Prod>k\<in>{1..n}. [:-of_nat k, 1:] ^ p)"
[PROOF STATE]
proof (state)
this:
f = Polynomial.monom 1 (p - 1) * (\<Prod>k = 1..n. [:- int k, 1:] ^ p)

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
have poly_f: "poly (of_int_poly f) x = x ^ (p - 1) * (\<Prod>k\<in>{1..n}. (x - of_nat k)) ^ p"
      for x :: complex
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly (of_int_poly f) x = x ^ (p - 1) * (\<Prod>k = 1..n. x - of_nat k) ^ p
[PROOF STEP]
by (simp add: f_def poly_prod poly_monom prod_power_distrib)
[PROOF STATE]
proof (state)
this:
poly (of_int_poly f) ?x = ?x ^ (p - 1) * (\<Prod>k = 1..n. ?x - of_nat k) ^ p

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
define m :: nat where "m = degree f"
[PROOF STATE]
proof (state)
this:
m = degree f

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
from p_pos
[PROOF STATE]
proof (chain)
picking this:
0 < p
[PROOF STEP]
have m: "m = (n + 1) * p - 1"
[PROOF STATE]
proof (prove)
using this:
0 < p

goal (1 subgoal):
 1. m = (n + 1) * p - 1
[PROOF STEP]
by (simp add: m_def f_def degree_mult_eq degree_monom_eq degree_prod_sum_eq degree_linear_power)
[PROOF STATE]
proof (state)
this:
m = (n + 1) * p - 1

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
define M :: int where "M = (- 1) ^ (n * p) * fact n ^ p"
[PROOF STATE]
proof (state)
this:
M = (- 1) ^ (n * p) * fact n ^ p

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
with p
[PROOF STATE]
proof (chain)
picking this:
prime p
n < p
\<bar>poly.coeff q 0\<bar> < int p
M = (- 1) ^ (n * p) * fact n ^ p
[PROOF STEP]
have p_not_dvd_M: "\<not>int p dvd M"
[PROOF STATE]
proof (prove)
using this:
prime p
n < p
\<bar>poly.coeff q 0\<bar> < int p
M = (- 1) ^ (n * p) * fact n ^ p

goal (1 subgoal):
 1. \<not> int p dvd M
[PROOF STEP]
by (auto simp: M_def prime_elem_int_not_dvd_neg1_power prime_dvd_power_iff
            prime_gt_0_nat prime_dvd_fact_iff_int prime_dvd_mult_iff)
[PROOF STATE]
proof (state)
this:
\<not> int p dvd M

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
interpret lindemann_weierstrass_aux "of_int_poly f"
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
.
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
define J :: complex where "J = (\<Sum>k\<le>n. of_int (coeff q k) * I (of_nat k))"
[PROOF STATE]
proof (state)
this:
J = (\<Sum>k\<le>n. of_int (poly.coeff q k) * I (of_nat k))

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
define idxs where "idxs = ({..n}\<times>{..m}) - {(0, p - 1)}"
[PROOF STATE]
proof (state)
this:
idxs = {..n} \<times> {..m} - {(0, p - 1)}

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
hence "J = (\<Sum>k\<le>n. of_int (coeff q k) * exp 1 ^ k) * (\<Sum>n\<le>m. of_int (poly ((pderiv ^^ n) f) 0)) -
                 of_int (\<Sum>k\<le>n. \<Sum>n\<le>m. coeff q k * poly ((pderiv ^^ n) f) (int k))"
[PROOF STATE]
proof (prove)
using this:
idxs = {..n} \<times> {..m} - {(0, p - 1)}

goal (1 subgoal):
 1. J = (\<Sum>k\<le>n. of_int (poly.coeff q k) * exp 1 ^ k) * (\<Sum>n\<le>m. of_int (poly ((pderiv ^^ n) f) 0)) - of_int (\<Sum>k\<le>n. \<Sum>n\<le>m. poly.coeff q k * poly ((pderiv ^^ n) f) (int k))
[PROOF STEP]
by (simp add: J_def I_def algebra_simps sum_subtractf sum_distrib_left m_def
                    exp_of_nat_mult [symmetric])
[PROOF STATE]
proof (state)
this:
J = (\<Sum>k\<le>n. of_int (poly.coeff q k) * exp 1 ^ k) * (\<Sum>n\<le>m. of_int (poly ((pderiv ^^ n) f) 0)) - of_int (\<Sum>k\<le>n. \<Sum>n\<le>m. poly.coeff q k * poly ((pderiv ^^ n) f) (int k))

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
J = (\<Sum>k\<le>n. of_int (poly.coeff q k) * exp 1 ^ k) * (\<Sum>n\<le>m. of_int (poly ((pderiv ^^ n) f) 0)) - of_int (\<Sum>k\<le>n. \<Sum>n\<le>m. poly.coeff q k * poly ((pderiv ^^ n) f) (int k))

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
have "(\<Sum>k\<le>n. of_int (coeff q k) * exp 1 ^ k) = poly (of_int_poly q) (exp 1 :: complex)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>k\<le>n. of_int (poly.coeff q k) * exp 1 ^ k) = poly (of_int_poly q) (exp 1)
[PROOF STEP]
by (simp add: poly_altdef n_def)
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<le>n. of_int (poly.coeff q k) * exp 1 ^ k) = poly (of_int_poly q) (exp 1)

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<le>n. of_int (poly.coeff q k) * exp 1 ^ k) = poly (of_int_poly q) (exp 1)

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
have "\<dots> = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly (of_int_poly q) (exp 1) = 0
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
poly (of_int_poly q) (exp 1) = 0

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
J = 0 * (\<Sum>n\<le>m. of_int (poly ((pderiv ^^ n) f) 0)) - of_int (\<Sum>k\<le>n. \<Sum>n\<le>m. poly.coeff q k * poly ((pderiv ^^ n) f) (int k))
[PROOF STEP]
have "J = of_int (-(\<Sum>(k,n)\<in>{..n}\<times>{..m}. coeff q k * poly ((pderiv ^^ n) f) (int k)))"
[PROOF STATE]
proof (prove)
using this:
J = 0 * (\<Sum>n\<le>m. of_int (poly ((pderiv ^^ n) f) 0)) - of_int (\<Sum>k\<le>n. \<Sum>n\<le>m. poly.coeff q k * poly ((pderiv ^^ n) f) (int k))

goal (1 subgoal):
 1. J = of_int (- (\<Sum>(k, n)\<in>{..n} \<times> {..m}. poly.coeff q k * poly ((pderiv ^^ n) f) (int k)))
[PROOF STEP]
by (simp add: sum.cartesian_product)
[PROOF STATE]
proof (state)
this:
J = of_int (- (\<Sum>(k, n)\<in>{..n} \<times> {..m}. poly.coeff q k * poly ((pderiv ^^ n) f) (int k)))

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
J = of_int (- (\<Sum>(k, n)\<in>{..n} \<times> {..m}. poly.coeff q k * poly ((pderiv ^^ n) f) (int k)))

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
have "{..n}\<times>{..m} = insert (0, p - 1) idxs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {..n} \<times> {..m} = insert (0, p - 1) idxs
[PROOF STEP]
by (auto simp: m idxs_def)
[PROOF STATE]
proof (state)
this:
{..n} \<times> {..m} = insert (0, p - 1) idxs

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
{..n} \<times> {..m} = insert (0, p - 1) idxs

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
have "-(\<Sum>(k,n)\<in>\<dots>. coeff q k * poly ((pderiv ^^ n) f) (int k)) =
       - (coeff q 0 * poly ((pderiv ^^ (p - 1)) f) 0) -
         (\<Sum>(k, n)\<in>idxs. coeff q k * poly ((pderiv ^^ n) f) (of_nat k))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - (\<Sum>(k, n)\<in>insert (0, p - 1) idxs. poly.coeff q k * poly ((pderiv ^^ n) f) (int k)) = - (poly.coeff q 0 * poly ((pderiv ^^ (p - 1)) f) 0) - (\<Sum>(k, n)\<in>idxs. poly.coeff q k * poly ((pderiv ^^ n) f) (int k))
[PROOF STEP]
by (subst sum.insert) (simp_all add: idxs_def)
[PROOF STATE]
proof (state)
this:
- (\<Sum>(k, n)\<in>insert (0, p - 1) idxs. poly.coeff q k * poly ((pderiv ^^ n) f) (int k)) = - (poly.coeff q 0 * poly ((pderiv ^^ (p - 1)) f) 0) - (\<Sum>(k, n)\<in>idxs. poly.coeff q k * poly ((pderiv ^^ n) f) (int k))

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
- (\<Sum>(k, n)\<in>insert (0, p - 1) idxs. poly.coeff q k * poly ((pderiv ^^ n) f) (int k)) = - (poly.coeff q 0 * poly ((pderiv ^^ (p - 1)) f) 0) - (\<Sum>(k, n)\<in>idxs. poly.coeff q k * poly ((pderiv ^^ n) f) (int k))

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
have "coeff q 0 * poly ((pderiv ^^ (p - 1)) f) 0 = coeff q 0 * M * fact (p - 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly.coeff q 0 * poly ((pderiv ^^ (p - 1)) f) 0 = poly.coeff q 0 * M * fact (p - 1)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. poly.coeff q 0 * poly ((pderiv ^^ (p - 1)) f) 0 = poly.coeff q 0 * M * fact (p - 1)
[PROOF STEP]
have "f = [:-0, 1:] ^ (p - 1) * (\<Prod>k = 1..n. [:- of_nat k, 1:] ^ p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f = [:- 0, 1:] ^ (p - 1) * (\<Prod>k = 1..n. [:- int k, 1:] ^ p)
[PROOF STEP]
by (simp add: f_def monom_altdef)
[PROOF STATE]
proof (state)
this:
f = [:- 0, 1:] ^ (p - 1) * (\<Prod>k = 1..n. [:- int k, 1:] ^ p)

goal (1 subgoal):
 1. poly.coeff q 0 * poly ((pderiv ^^ (p - 1)) f) 0 = poly.coeff q 0 * M * fact (p - 1)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
f = [:- 0, 1:] ^ (p - 1) * (\<Prod>k = 1..n. [:- int k, 1:] ^ p)

goal (1 subgoal):
 1. poly.coeff q 0 * poly ((pderiv ^^ (p - 1)) f) 0 = poly.coeff q 0 * M * fact (p - 1)
[PROOF STEP]
have "poly ((pderiv ^^ (p - 1)) \<dots>) 0 =
                   fact (p - 1) * poly (\<Prod>k = 1..n. [:- of_nat k, 1:] ^ p) 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly ((pderiv ^^ (p - 1)) ([:- 0, 1:] ^ (p - 1) * (\<Prod>k = 1..n. [:- int k, 1:] ^ p))) 0 = fact (p - 1) * poly (\<Prod>k = 1..n. [:- int k, 1:] ^ p) 0
[PROOF STEP]
by (rule poly_higher_pderiv_aux2)
[PROOF STATE]
proof (state)
this:
poly ((pderiv ^^ (p - 1)) ([:- 0, 1:] ^ (p - 1) * (\<Prod>k = 1..n. [:- int k, 1:] ^ p))) 0 = fact (p - 1) * poly (\<Prod>k = 1..n. [:- int k, 1:] ^ p) 0

goal (1 subgoal):
 1. poly.coeff q 0 * poly ((pderiv ^^ (p - 1)) f) 0 = poly.coeff q 0 * M * fact (p - 1)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
poly ((pderiv ^^ (p - 1)) ([:- 0, 1:] ^ (p - 1) * (\<Prod>k = 1..n. [:- int k, 1:] ^ p))) 0 = fact (p - 1) * poly (\<Prod>k = 1..n. [:- int k, 1:] ^ p) 0

goal (1 subgoal):
 1. poly.coeff q 0 * poly ((pderiv ^^ (p - 1)) f) 0 = poly.coeff q 0 * M * fact (p - 1)
[PROOF STEP]
have "poly (\<Prod>k = 1..n. [:- of_nat k :: int, 1:] ^ p) 0 = (-1)^(n*p) * fact n ^ p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly (\<Prod>k = 1..n. [:- int k, 1:] ^ p) 0 = (- 1) ^ (n * p) * fact n ^ p
[PROOF STEP]
by (induction n) (simp_all add: prod.nat_ivl_Suc' power_mult_distrib mult_ac
                            power_minus' power_add del: of_nat_Suc)
[PROOF STATE]
proof (state)
this:
poly (\<Prod>k = 1..n. [:- int k, 1:] ^ p) 0 = (- 1) ^ (n * p) * fact n ^ p

goal (1 subgoal):
 1. poly.coeff q 0 * poly ((pderiv ^^ (p - 1)) f) 0 = poly.coeff q 0 * M * fact (p - 1)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
poly ((pderiv ^^ (p - 1)) f) 0 = fact (p - 1) * ((- 1) ^ (n * p) * fact n ^ p)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
poly ((pderiv ^^ (p - 1)) f) 0 = fact (p - 1) * ((- 1) ^ (n * p) * fact n ^ p)

goal (1 subgoal):
 1. poly.coeff q 0 * poly ((pderiv ^^ (p - 1)) f) 0 = poly.coeff q 0 * M * fact (p - 1)
[PROOF STEP]
by (simp add: mult_ac M_def)
[PROOF STATE]
proof (state)
this:
poly.coeff q 0 * poly ((pderiv ^^ (p - 1)) f) 0 = poly.coeff q 0 * M * fact (p - 1)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
poly.coeff q 0 * poly ((pderiv ^^ (p - 1)) f) 0 = poly.coeff q 0 * M * fact (p - 1)

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
poly.coeff q 0 * poly ((pderiv ^^ (p - 1)) f) 0 = poly.coeff q 0 * M * fact (p - 1)

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
obtain N where "(\<Sum>(k, n)\<in>idxs. coeff q k * poly ((pderiv ^^ n) f) (int k)) = fact p * N"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>N. (\<Sum>(k, n)\<in>idxs. poly.coeff q k * poly ((pderiv ^^ n) f) (int k)) = fact p * N \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<And>N. (\<Sum>(k, n)\<in>idxs. poly.coeff q k * poly ((pderiv ^^ n) f) (int k)) = fact p * N \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have "\<forall>(k, n)\<in>idxs. fact p dvd poly ((pderiv ^^ n) f) (of_nat k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>(k, n)\<in>idxs. fact p dvd poly ((pderiv ^^ n) f) (int k)
[PROOF STEP]
proof clarify
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a b. (a, b) \<in> idxs \<Longrightarrow> fact p dvd poly ((pderiv ^^ b) f) (int a)
[PROOF STEP]
fix k j
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a b. (a, b) \<in> idxs \<Longrightarrow> fact p dvd poly ((pderiv ^^ b) f) (int a)
[PROOF STEP]
assume idxs: "(k, j) \<in> idxs"
[PROOF STATE]
proof (state)
this:
(k, j) \<in> idxs

goal (1 subgoal):
 1. \<And>a b. (a, b) \<in> idxs \<Longrightarrow> fact p dvd poly ((pderiv ^^ b) f) (int a)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(k, j) \<in> idxs
[PROOF STEP]
consider "k = 0" "j < p - 1" | "k = 0" "j > p - 1" | "k \<noteq> 0" "j < p" | "k \<noteq> 0" "j \<ge> p"
[PROOF STATE]
proof (prove)
using this:
(k, j) \<in> idxs

goal (1 subgoal):
 1. \<lbrakk>\<lbrakk>k = 0; j < p - 1\<rbrakk> \<Longrightarrow> thesis; \<lbrakk>k = 0; p - 1 < j\<rbrakk> \<Longrightarrow> thesis; \<lbrakk>k \<noteq> 0; j < p\<rbrakk> \<Longrightarrow> thesis; \<lbrakk>k \<noteq> 0; p \<le> j\<rbrakk> \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
by (fastforce simp: idxs_def)
[PROOF STATE]
proof (state)
this:
\<lbrakk>\<lbrakk>k = 0; j < p - 1\<rbrakk> \<Longrightarrow> ?thesis; \<lbrakk>k = 0; p - 1 < j\<rbrakk> \<Longrightarrow> ?thesis; \<lbrakk>k \<noteq> 0; j < p\<rbrakk> \<Longrightarrow> ?thesis; \<lbrakk>k \<noteq> 0; p \<le> j\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. \<And>a b. (a, b) \<in> idxs \<Longrightarrow> fact p dvd poly ((pderiv ^^ b) f) (int a)
[PROOF STEP]
thus "fact p dvd poly ((pderiv ^^ j) f) (of_nat k)"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<lbrakk>k = 0; j < p - 1\<rbrakk> \<Longrightarrow> ?thesis; \<lbrakk>k = 0; p - 1 < j\<rbrakk> \<Longrightarrow> ?thesis; \<lbrakk>k \<noteq> 0; j < p\<rbrakk> \<Longrightarrow> ?thesis; \<lbrakk>k \<noteq> 0; p \<le> j\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. fact p dvd poly ((pderiv ^^ j) f) (int k)
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<lbrakk>k = 0; j < p - 1\<rbrakk> \<Longrightarrow> fact p dvd poly ((pderiv ^^ j) f) (int k)
 2. \<lbrakk>k = 0; p - 1 < j\<rbrakk> \<Longrightarrow> fact p dvd poly ((pderiv ^^ j) f) (int k)
 3. \<lbrakk>k \<noteq> 0; j < p\<rbrakk> \<Longrightarrow> fact p dvd poly ((pderiv ^^ j) f) (int k)
 4. \<lbrakk>k \<noteq> 0; p \<le> j\<rbrakk> \<Longrightarrow> fact p dvd poly ((pderiv ^^ j) f) (int k)
[PROOF STEP]
case 1
[PROOF STATE]
proof (state)
this:
k = 0
j < p - 1

goal (4 subgoals):
 1. \<lbrakk>k = 0; j < p - 1\<rbrakk> \<Longrightarrow> fact p dvd poly ((pderiv ^^ j) f) (int k)
 2. \<lbrakk>k = 0; p - 1 < j\<rbrakk> \<Longrightarrow> fact p dvd poly ((pderiv ^^ j) f) (int k)
 3. \<lbrakk>k \<noteq> 0; j < p\<rbrakk> \<Longrightarrow> fact p dvd poly ((pderiv ^^ j) f) (int k)
 4. \<lbrakk>k \<noteq> 0; p \<le> j\<rbrakk> \<Longrightarrow> fact p dvd poly ((pderiv ^^ j) f) (int k)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
k = 0
j < p - 1

goal (1 subgoal):
 1. fact p dvd poly ((pderiv ^^ j) f) (int k)
[PROOF STEP]
by (simp add: f_def poly_higher_pderiv_aux1' monom_altdef)
[PROOF STATE]
proof (state)
this:
fact p dvd poly ((pderiv ^^ j) f) (int k)

goal (3 subgoals):
 1. \<lbrakk>k = 0; p - 1 < j\<rbrakk> \<Longrightarrow> fact p dvd poly ((pderiv ^^ j) f) (int k)
 2. \<lbrakk>k \<noteq> 0; j < p\<rbrakk> \<Longrightarrow> fact p dvd poly ((pderiv ^^ j) f) (int k)
 3. \<lbrakk>k \<noteq> 0; p \<le> j\<rbrakk> \<Longrightarrow> fact p dvd poly ((pderiv ^^ j) f) (int k)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<lbrakk>k = 0; p - 1 < j\<rbrakk> \<Longrightarrow> fact p dvd poly ((pderiv ^^ j) f) (int k)
 2. \<lbrakk>k \<noteq> 0; j < p\<rbrakk> \<Longrightarrow> fact p dvd poly ((pderiv ^^ j) f) (int k)
 3. \<lbrakk>k \<noteq> 0; p \<le> j\<rbrakk> \<Longrightarrow> fact p dvd poly ((pderiv ^^ j) f) (int k)
[PROOF STEP]
case 2
[PROOF STATE]
proof (state)
this:
k = 0
p - 1 < j

goal (3 subgoals):
 1. \<lbrakk>k = 0; p - 1 < j\<rbrakk> \<Longrightarrow> fact p dvd poly ((pderiv ^^ j) f) (int k)
 2. \<lbrakk>k \<noteq> 0; j < p\<rbrakk> \<Longrightarrow> fact p dvd poly ((pderiv ^^ j) f) (int k)
 3. \<lbrakk>k \<noteq> 0; p \<le> j\<rbrakk> \<Longrightarrow> fact p dvd poly ((pderiv ^^ j) f) (int k)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
k = 0
p - 1 < j

goal (1 subgoal):
 1. fact p dvd poly ((pderiv ^^ j) f) (int k)
[PROOF STEP]
by (simp add: f_def poly_higher_pderiv_aux3' monom_altdef fact_dvd_poly_higher_pderiv_aux')
[PROOF STATE]
proof (state)
this:
fact p dvd poly ((pderiv ^^ j) f) (int k)

goal (2 subgoals):
 1. \<lbrakk>k \<noteq> 0; j < p\<rbrakk> \<Longrightarrow> fact p dvd poly ((pderiv ^^ j) f) (int k)
 2. \<lbrakk>k \<noteq> 0; p \<le> j\<rbrakk> \<Longrightarrow> fact p dvd poly ((pderiv ^^ j) f) (int k)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>k \<noteq> 0; j < p\<rbrakk> \<Longrightarrow> fact p dvd poly ((pderiv ^^ j) f) (int k)
 2. \<lbrakk>k \<noteq> 0; p \<le> j\<rbrakk> \<Longrightarrow> fact p dvd poly ((pderiv ^^ j) f) (int k)
[PROOF STEP]
case 3
[PROOF STATE]
proof (state)
this:
k \<noteq> 0
j < p

goal (2 subgoals):
 1. \<lbrakk>k \<noteq> 0; j < p\<rbrakk> \<Longrightarrow> fact p dvd poly ((pderiv ^^ j) f) (int k)
 2. \<lbrakk>k \<noteq> 0; p \<le> j\<rbrakk> \<Longrightarrow> fact p dvd poly ((pderiv ^^ j) f) (int k)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
k \<noteq> 0
j < p

goal (1 subgoal):
 1. fact p dvd poly ((pderiv ^^ j) f) (int k)
[PROOF STEP]
unfolding f_def
[PROOF STATE]
proof (prove)
using this:
k \<noteq> 0
j < p

goal (1 subgoal):
 1. fact p dvd poly ((pderiv ^^ j) (Polynomial.monom 1 (p - 1) * (\<Prod>k = 1..n. [:- int k, 1:] ^ p))) (int k)
[PROOF STEP]
by (subst poly_higher_pderiv_aux1'[of _ p])
               (insert idxs, auto simp: idxs_def intro!: dvd_mult)
[PROOF STATE]
proof (state)
this:
fact p dvd poly ((pderiv ^^ j) f) (int k)

goal (1 subgoal):
 1. \<lbrakk>k \<noteq> 0; p \<le> j\<rbrakk> \<Longrightarrow> fact p dvd poly ((pderiv ^^ j) f) (int k)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>k \<noteq> 0; p \<le> j\<rbrakk> \<Longrightarrow> fact p dvd poly ((pderiv ^^ j) f) (int k)
[PROOF STEP]
case 4
[PROOF STATE]
proof (state)
this:
k \<noteq> 0
p \<le> j

goal (1 subgoal):
 1. \<lbrakk>k \<noteq> 0; p \<le> j\<rbrakk> \<Longrightarrow> fact p dvd poly ((pderiv ^^ j) f) (int k)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
k \<noteq> 0
p \<le> j

goal (1 subgoal):
 1. fact p dvd poly ((pderiv ^^ j) f) (int k)
[PROOF STEP]
unfolding f_def
[PROOF STATE]
proof (prove)
using this:
k \<noteq> 0
p \<le> j

goal (1 subgoal):
 1. fact p dvd poly ((pderiv ^^ j) (Polynomial.monom 1 (p - 1) * (\<Prod>k = 1..n. [:- int k, 1:] ^ p))) (int k)
[PROOF STEP]
by (intro poly_higher_pderiv_aux3') (insert idxs, auto intro!: dvd_mult simp: idxs_def)
[PROOF STATE]
proof (state)
this:
fact p dvd poly ((pderiv ^^ j) f) (int k)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
fact p dvd poly ((pderiv ^^ j) f) (int k)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>(k, n)\<in>idxs. fact p dvd poly ((pderiv ^^ n) f) (int k)

goal (1 subgoal):
 1. (\<And>N. (\<Sum>(k, n)\<in>idxs. poly.coeff q k * poly ((pderiv ^^ n) f) (int k)) = fact p * N \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
hence "fact p dvd (\<Sum>(k, n)\<in>idxs. coeff q k * poly ((pderiv ^^ n) f) (int k))"
[PROOF STATE]
proof (prove)
using this:
\<forall>(k, n)\<in>idxs. fact p dvd poly ((pderiv ^^ n) f) (int k)

goal (1 subgoal):
 1. fact p dvd (\<Sum>(k, n)\<in>idxs. poly.coeff q k * poly ((pderiv ^^ n) f) (int k))
[PROOF STEP]
by (auto intro!: dvd_sum dvd_mult simp del: of_int_fact)
[PROOF STATE]
proof (state)
this:
fact p dvd (\<Sum>(k, n)\<in>idxs. poly.coeff q k * poly ((pderiv ^^ n) f) (int k))

goal (1 subgoal):
 1. (\<And>N. (\<Sum>(k, n)\<in>idxs. poly.coeff q k * poly ((pderiv ^^ n) f) (int k)) = fact p * N \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
with that
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>(k, n)\<in>idxs. poly.coeff q k * poly ((pderiv ^^ n) f) (int k)) = fact p * ?N \<Longrightarrow> thesis
fact p dvd (\<Sum>(k, n)\<in>idxs. poly.coeff q k * poly ((pderiv ^^ n) f) (int k))
[PROOF STEP]
show thesis
[PROOF STATE]
proof (prove)
using this:
(\<Sum>(k, n)\<in>idxs. poly.coeff q k * poly ((pderiv ^^ n) f) (int k)) = fact p * ?N \<Longrightarrow> thesis
fact p dvd (\<Sum>(k, n)\<in>idxs. poly.coeff q k * poly ((pderiv ^^ n) f) (int k))

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>(k, n)\<in>idxs. poly.coeff q k * poly ((pderiv ^^ n) f) (int k)) = fact p * N

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>(k, n)\<in>idxs. poly.coeff q k * poly ((pderiv ^^ n) f) (int k)) = fact p * N

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
from p
[PROOF STATE]
proof (chain)
picking this:
prime p
n < p
\<bar>poly.coeff q 0\<bar> < int p
[PROOF STEP]
have "- (coeff q 0 * M * fact (p - 1)) - fact p * N =
                        - fact (p - 1) * (coeff q 0 * M + p * N)"
[PROOF STATE]
proof (prove)
using this:
prime p
n < p
\<bar>poly.coeff q 0\<bar> < int p

goal (1 subgoal):
 1. - (poly.coeff q 0 * M * fact (p - 1)) - fact p * N = - fact (p - 1) * (poly.coeff q 0 * M + int p * N)
[PROOF STEP]
by (subst fact_reduce[of p]) (simp_all add: algebra_simps)
[PROOF STATE]
proof (state)
this:
- (poly.coeff q 0 * M * fact (p - 1)) - fact p * N = - fact (p - 1) * (poly.coeff q 0 * M + int p * N)

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
J = of_int (- fact (p - 1) * (poly.coeff q 0 * M + int p * N))
[PROOF STEP]
have J: "J = -of_int (fact (p - 1) * (coeff q 0 * M + p * N))"
[PROOF STATE]
proof (prove)
using this:
J = of_int (- fact (p - 1) * (poly.coeff q 0 * M + int p * N))

goal (1 subgoal):
 1. J = - of_int (fact (p - 1) * (poly.coeff q 0 * M + int p * N))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
J = - of_int (fact (p - 1) * (poly.coeff q 0 * M + int p * N))

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
from p q(2)
[PROOF STATE]
proof (chain)
picking this:
prime p
n < p
\<bar>poly.coeff q 0\<bar> < int p
poly.coeff q 0 \<noteq> 0
[PROOF STEP]
have "\<not>p dvd coeff q 0 * M + p * N"
[PROOF STATE]
proof (prove)
using this:
prime p
n < p
\<bar>poly.coeff q 0\<bar> < int p
poly.coeff q 0 \<noteq> 0

goal (1 subgoal):
 1. \<not> int p dvd poly.coeff q 0 * M + int p * N
[PROOF STEP]
by (auto simp: dvd_add_left_iff p_not_dvd_M prime_dvd_fact_iff_int prime_dvd_mult_iff
               dest: dvd_imp_le_int)
[PROOF STATE]
proof (state)
this:
\<not> int p dvd poly.coeff q 0 * M + int p * N

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
hence "coeff q 0 * M + p * N \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
\<not> int p dvd poly.coeff q 0 * M + int p * N

goal (1 subgoal):
 1. poly.coeff q 0 * M + int p * N \<noteq> 0
[PROOF STEP]
by (intro notI) simp_all
[PROOF STATE]
proof (state)
this:
poly.coeff q 0 * M + int p * N \<noteq> 0

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
hence "abs (coeff q 0 * M + p * N) \<ge> 1"
[PROOF STATE]
proof (prove)
using this:
poly.coeff q 0 * M + int p * N \<noteq> 0

goal (1 subgoal):
 1. 1 \<le> \<bar>poly.coeff q 0 * M + int p * N\<bar>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
1 \<le> \<bar>poly.coeff q 0 * M + int p * N\<bar>

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
hence "norm (of_int (coeff q 0 * M + p * N) :: complex) \<ge> 1"
[PROOF STATE]
proof (prove)
using this:
1 \<le> \<bar>poly.coeff q 0 * M + int p * N\<bar>

goal (1 subgoal):
 1. 1 \<le> cmod (of_int (poly.coeff q 0 * M + int p * N))
[PROOF STEP]
by (simp only: norm_of_int)
[PROOF STATE]
proof (state)
this:
1 \<le> cmod (of_int (poly.coeff q 0 * M + int p * N))

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
hence "fact (p - 1) * \<dots> \<ge> fact (p - 1) * 1"
[PROOF STATE]
proof (prove)
using this:
1 \<le> cmod (of_int (poly.coeff q 0 * M + int p * N))

goal (1 subgoal):
 1. fact (p - 1) * 1 \<le> fact (p - 1) * cmod (of_int (poly.coeff q 0 * M + int p * N))
[PROOF STEP]
by (intro mult_left_mono) simp_all
[PROOF STATE]
proof (state)
this:
fact (p - 1) * 1 \<le> fact (p - 1) * cmod (of_int (poly.coeff q 0 * M + int p * N))

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
hence J_lower: "norm J \<ge> fact (p - 1)"
[PROOF STATE]
proof (prove)
using this:
fact (p - 1) * 1 \<le> fact (p - 1) * cmod (of_int (poly.coeff q 0 * M + int p * N))

goal (1 subgoal):
 1. fact (p - 1) \<le> cmod J
[PROOF STEP]
unfolding J norm_minus_cancel of_int_mult of_int_fact
[PROOF STATE]
proof (prove)
using this:
fact (p - 1) * 1 \<le> fact (p - 1) * cmod (of_int (poly.coeff q 0 * M + int p * N))

goal (1 subgoal):
 1. fact (p - 1) \<le> cmod (fact (p - 1) * of_int (poly.coeff q 0 * M + int p * N))
[PROOF STEP]
by (simp add: norm_mult)
[PROOF STATE]
proof (state)
this:
fact (p - 1) \<le> cmod J

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
have "norm J \<le> (\<Sum>k\<le>n. norm (of_int (coeff q k) * I (of_nat k)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmod J \<le> (\<Sum>k\<le>n. cmod (of_int (poly.coeff q k) * I (of_nat k)))
[PROOF STEP]
unfolding J_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmod (\<Sum>k\<le>n. of_int (poly.coeff q k) * I (of_nat k)) \<le> (\<Sum>k\<le>n. cmod (of_int (poly.coeff q k) * I (of_nat k)))
[PROOF STEP]
by (rule norm_sum)
[PROOF STATE]
proof (state)
this:
cmod J \<le> (\<Sum>k\<le>n. cmod (of_int (poly.coeff q k) * I (of_nat k)))

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
cmod J \<le> (\<Sum>k\<le>n. cmod (of_int (poly.coeff q k) * I (of_nat k)))

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
have "\<dots> \<le> (\<Sum>k\<le>n. of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>k\<le>n. cmod (of_int (poly.coeff q k) * I (of_nat k))) \<le> (\<Sum>k\<le>n. real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p))
[PROOF STEP]
proof (intro sum_mono)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>k. k \<in> {..n} \<Longrightarrow> cmod (of_int (poly.coeff q k) * I (of_nat k)) \<le> real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)
[PROOF STEP]
fix k
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>k. k \<in> {..n} \<Longrightarrow> cmod (of_int (poly.coeff q k) * I (of_nat k)) \<le> real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)
[PROOF STEP]
assume k: "k \<in> {..n}"
[PROOF STATE]
proof (state)
this:
k \<in> {..n}

goal (1 subgoal):
 1. \<And>k. k \<in> {..n} \<Longrightarrow> cmod (of_int (poly.coeff q k) * I (of_nat k)) \<le> real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)
[PROOF STEP]
have "n > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < n
[PROOF STEP]
by (rule ccontr) simp
[PROOF STATE]
proof (state)
this:
0 < n

goal (1 subgoal):
 1. \<And>k. k \<in> {..n} \<Longrightarrow> cmod (of_int (poly.coeff q k) * I (of_nat k)) \<le> real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
0 < n

goal (1 subgoal):
 1. \<And>k. k \<in> {..n} \<Longrightarrow> cmod (of_int (poly.coeff q k) * I (of_nat k)) \<le> real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)
[PROOF STEP]
fix x :: complex
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>k. k \<in> {..n} \<Longrightarrow> cmod (of_int (poly.coeff q k) * I (of_nat k)) \<le> real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)
[PROOF STEP]
assume x: "x \<in> closed_segment 0 (of_nat k)"
[PROOF STATE]
proof (state)
this:
x \<in> closed_segment 0 (of_nat k)

goal (1 subgoal):
 1. \<And>k. k \<in> {..n} \<Longrightarrow> cmod (of_int (poly.coeff q k) * I (of_nat k)) \<le> real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> closed_segment 0 (of_nat k)
[PROOF STEP]
obtain t where t: "t \<ge> 0" "t \<le> 1" "x = of_real t * of_nat k"
[PROOF STATE]
proof (prove)
using this:
x \<in> closed_segment 0 (of_nat k)

goal (1 subgoal):
 1. (\<And>t. \<lbrakk>0 \<le> t; t \<le> 1; x = complex_of_real t * of_nat k\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: closed_segment_def scaleR_conv_of_real)
[PROOF STATE]
proof (state)
this:
0 \<le> t
t \<le> 1
x = complex_of_real t * of_nat k

goal (1 subgoal):
 1. \<And>k. k \<in> {..n} \<Longrightarrow> cmod (of_int (poly.coeff q k) * I (of_nat k)) \<le> real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)
[PROOF STEP]
hence "norm x = t * real k"
[PROOF STATE]
proof (prove)
using this:
0 \<le> t
t \<le> 1
x = complex_of_real t * of_nat k

goal (1 subgoal):
 1. cmod x = t * real k
[PROOF STEP]
by (simp add: norm_mult)
[PROOF STATE]
proof (state)
this:
cmod x = t * real k

goal (1 subgoal):
 1. \<And>k. k \<in> {..n} \<Longrightarrow> cmod (of_int (poly.coeff q k) * I (of_nat k)) \<le> real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
cmod x = t * real k

goal (1 subgoal):
 1. \<And>k. k \<in> {..n} \<Longrightarrow> cmod (of_int (poly.coeff q k) * I (of_nat k)) \<le> real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)
[PROOF STEP]
from \<open>t \<le> 1\<close> k
[PROOF STATE]
proof (chain)
picking this:
t \<le> 1
k \<in> {..n}
[PROOF STEP]
have *: "\<dots> \<le> 1 * real n"
[PROOF STATE]
proof (prove)
using this:
t \<le> 1
k \<in> {..n}

goal (1 subgoal):
 1. t * real k \<le> 1 * real n
[PROOF STEP]
by (intro mult_mono) simp_all
[PROOF STATE]
proof (state)
this:
t * real k \<le> 1 * real n

goal (1 subgoal):
 1. \<And>k. k \<in> {..n} \<Longrightarrow> cmod (of_int (poly.coeff q k) * I (of_nat k)) \<le> real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
cmod x \<le> 1 * real n
[PROOF STEP]
have x': "norm x \<le> real n"
[PROOF STATE]
proof (prove)
using this:
cmod x \<le> 1 * real n

goal (1 subgoal):
 1. cmod x \<le> real n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
cmod x \<le> real n

goal (1 subgoal):
 1. \<And>k. k \<in> {..n} \<Longrightarrow> cmod (of_int (poly.coeff q k) * I (of_nat k)) \<le> real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)
[PROOF STEP]
from t \<open>n > 0\<close> *
[PROOF STATE]
proof (chain)
picking this:
0 \<le> t
t \<le> 1
x = complex_of_real t * of_nat k
0 < n
t * real k \<le> 1 * real n
[PROOF STEP]
have x'': "x \<in> closed_segment 0 (of_nat n)"
[PROOF STATE]
proof (prove)
using this:
0 \<le> t
t \<le> 1
x = complex_of_real t * of_nat k
0 < n
t * real k \<le> 1 * real n

goal (1 subgoal):
 1. x \<in> closed_segment 0 (of_nat n)
[PROOF STEP]
by (auto simp: closed_segment_def scaleR_conv_of_real field_simps
                   intro!: exI[of _ "t * real k / real n"] )
[PROOF STATE]
proof (state)
this:
x \<in> closed_segment 0 (of_nat n)

goal (1 subgoal):
 1. \<And>k. k \<in> {..n} \<Longrightarrow> cmod (of_int (poly.coeff q k) * I (of_nat k)) \<le> real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)
[PROOF STEP]
have "norm (poly (of_int_poly f) x) =
                norm x ^ (p - 1) * cmod (\<Prod>i = 1..n. x - i) ^ p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmod (poly (of_int_poly f) x) = cmod x ^ (p - 1) * cmod (\<Prod>i = 1..n. x - of_nat i) ^ p
[PROOF STEP]
by (simp add: poly_f norm_mult norm_power)
[PROOF STATE]
proof (state)
this:
cmod (poly (of_int_poly f) x) = cmod x ^ (p - 1) * cmod (\<Prod>i = 1..n. x - of_nat i) ^ p

goal (1 subgoal):
 1. \<And>k. k \<in> {..n} \<Longrightarrow> cmod (of_int (poly.coeff q k) * I (of_nat k)) \<le> real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
cmod (poly (of_int_poly f) x) = cmod x ^ (p - 1) * cmod (\<Prod>i = 1..n. x - of_nat i) ^ p

goal (1 subgoal):
 1. \<And>k. k \<in> {..n} \<Longrightarrow> cmod (of_int (poly.coeff q k) * I (of_nat k)) \<le> real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)
[PROOF STEP]
from x x' x''
[PROOF STATE]
proof (chain)
picking this:
x \<in> closed_segment 0 (of_nat k)
cmod x \<le> real n
x \<in> closed_segment 0 (of_nat n)
[PROOF STEP]
have "\<dots> \<le> of_nat n ^ (p - 1) * C ^ p"
[PROOF STATE]
proof (prove)
using this:
x \<in> closed_segment 0 (of_nat k)
cmod x \<le> real n
x \<in> closed_segment 0 (of_nat n)

goal (1 subgoal):
 1. cmod x ^ (p - 1) * cmod (\<Prod>i = 1..n. x - of_nat i) ^ p \<le> real n ^ (p - 1) * C ^ p
[PROOF STEP]
by (intro mult_mono C power_mono) simp_all
[PROOF STATE]
proof (state)
this:
cmod x ^ (p - 1) * cmod (\<Prod>i = 1..n. x - of_nat i) ^ p \<le> real n ^ (p - 1) * C ^ p

goal (1 subgoal):
 1. \<And>k. k \<in> {..n} \<Longrightarrow> cmod (of_int (poly.coeff q k) * I (of_nat k)) \<le> real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
cmod (poly (of_int_poly f) x) \<le> real n ^ (p - 1) * C ^ p
[PROOF STEP]
have "norm (poly (of_int_poly f) x) \<le> real n ^ (p - 1) * C ^ p"
[PROOF STATE]
proof (prove)
using this:
cmod (poly (of_int_poly f) x) \<le> real n ^ (p - 1) * C ^ p

goal (1 subgoal):
 1. cmod (poly (of_int_poly f) x) \<le> real n ^ (p - 1) * C ^ p
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
cmod (poly (of_int_poly f) x) \<le> real n ^ (p - 1) * C ^ p

goal (1 subgoal):
 1. \<And>k. k \<in> {..n} \<Longrightarrow> cmod (of_int (poly.coeff q k) * I (of_nat k)) \<le> real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
?x2 \<in> closed_segment 0 (of_nat k) \<Longrightarrow> cmod (poly (of_int_poly f) ?x2) \<le> real n ^ (p - 1) * C ^ p

goal (1 subgoal):
 1. \<And>k. k \<in> {..n} \<Longrightarrow> cmod (of_int (poly.coeff q k) * I (of_nat k)) \<le> real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)
[PROOF STEP]
note A = this
[PROOF STATE]
proof (state)
this:
?x2 \<in> closed_segment 0 (of_nat k) \<Longrightarrow> cmod (poly (of_int_poly f) ?x2) \<le> real n ^ (p - 1) * C ^ p

goal (1 subgoal):
 1. \<And>k. k \<in> {..n} \<Longrightarrow> cmod (of_int (poly.coeff q k) * I (of_nat k)) \<le> real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)
[PROOF STEP]
have "norm (I (of_nat k)) \<le>
                      cmod (of_nat k) * exp (cmod (of_nat k)) * (of_nat n ^ (p - 1) * C ^ p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmod (I (of_nat k)) \<le> cmod (of_nat k) * exp (cmod (of_nat k)) * (real n ^ (p - 1) * C ^ p)
[PROOF STEP]
by (intro lindemann_weierstrass_integral_bound[OF _ A]
              C mult_nonneg_nonneg zero_le_power) auto
[PROOF STATE]
proof (state)
this:
cmod (I (of_nat k)) \<le> cmod (of_nat k) * exp (cmod (of_nat k)) * (real n ^ (p - 1) * C ^ p)

goal (1 subgoal):
 1. \<And>k. k \<in> {..n} \<Longrightarrow> cmod (of_int (poly.coeff q k) * I (of_nat k)) \<le> real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
cmod (I (of_nat k)) \<le> cmod (of_nat k) * exp (cmod (of_nat k)) * (real n ^ (p - 1) * C ^ p)

goal (1 subgoal):
 1. \<And>k. k \<in> {..n} \<Longrightarrow> cmod (of_int (poly.coeff q k) * I (of_nat k)) \<le> real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)
[PROOF STEP]
have "\<dots> \<le> cmod (of_nat n) * exp (cmod (of_nat n)) * (of_nat n ^ (p - 1) * C ^ p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmod (of_nat k) * exp (cmod (of_nat k)) * (real n ^ (p - 1) * C ^ p) \<le> cmod (of_nat n) * exp (cmod (of_nat n)) * (real n ^ (p - 1) * C ^ p)
[PROOF STEP]
using k
[PROOF STATE]
proof (prove)
using this:
k \<in> {..n}

goal (1 subgoal):
 1. cmod (of_nat k) * exp (cmod (of_nat k)) * (real n ^ (p - 1) * C ^ p) \<le> cmod (of_nat n) * exp (cmod (of_nat n)) * (real n ^ (p - 1) * C ^ p)
[PROOF STEP]
by (intro mult_mono zero_le_power mult_nonneg_nonneg C) simp_all
[PROOF STATE]
proof (state)
this:
cmod (of_nat k) * exp (cmod (of_nat k)) * (real n ^ (p - 1) * C ^ p) \<le> cmod (of_nat n) * exp (cmod (of_nat n)) * (real n ^ (p - 1) * C ^ p)

goal (1 subgoal):
 1. \<And>k. k \<in> {..n} \<Longrightarrow> cmod (of_int (poly.coeff q k) * I (of_nat k)) \<le> real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
cmod (I (of_nat k)) \<le> cmod (of_nat n) * exp (cmod (of_nat n)) * (real n ^ (p - 1) * C ^ p)
[PROOF STEP]
show "cmod (of_int (coeff q k) * I (of_nat k)) \<le>
                      of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)"
[PROOF STATE]
proof (prove)
using this:
cmod (I (of_nat k)) \<le> cmod (of_nat n) * exp (cmod (of_nat n)) * (real n ^ (p - 1) * C ^ p)

goal (1 subgoal):
 1. cmod (of_int (poly.coeff q k) * I (of_nat k)) \<le> real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)
[PROOF STEP]
unfolding norm_mult
[PROOF STATE]
proof (prove)
using this:
cmod (I (of_nat k)) \<le> cmod (of_nat n) * exp (cmod (of_nat n)) * (real n ^ (p - 1) * C ^ p)

goal (1 subgoal):
 1. cmod (of_int (poly.coeff q k)) * cmod (I (of_nat k)) \<le> real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)
[PROOF STEP]
by (intro mult_mono) (simp_all add: qmax of_int_abs [symmetric] del: of_int_abs)
[PROOF STATE]
proof (state)
this:
cmod (of_int (poly.coeff q k) * I (of_nat k)) \<le> real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<le>n. cmod (of_int (poly.coeff q k) * I (of_nat k))) \<le> (\<Sum>k\<le>n. real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p))

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<le>n. cmod (of_int (poly.coeff q k) * I (of_nat k))) \<le> (\<Sum>k\<le>n. real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p))

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
have "\<dots> = E * F ^ p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>k\<le>n. real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)) = E * F ^ p
[PROOF STEP]
using p_pos
[PROOF STATE]
proof (prove)
using this:
0 < p

goal (1 subgoal):
 1. (\<Sum>k\<le>n. real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)) = E * F ^ p
[PROOF STEP]
by (simp add: power_diff power_mult_distrib E_def F_def)
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<le>n. real_of_int qmax * (real n * exp (real n) * real n ^ (p - 1) * C ^ p)) = E * F ^ p

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
cmod J \<le> E * F ^ p
[PROOF STEP]
show "fact (p - 1) \<le> E * F ^ p"
[PROOF STATE]
proof (prove)
using this:
cmod J \<le> E * F ^ p

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
using J_lower
[PROOF STATE]
proof (prove)
using this:
cmod J \<le> E * F ^ p
fact (p - 1) \<le> cmod J

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
fact (p - 1) \<le> E * F ^ p

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>prime ?p; n < ?p; \<bar>poly.coeff q 0\<bar> < int ?p\<rbrakk> \<Longrightarrow> fact (?p - 1) \<le> E * F ^ ?p

goal (1 subgoal):
 1. algebraic (exp 1) \<Longrightarrow> False
[PROOF STEP]
have "(\<lambda>n. E * F * F ^ (n - 1) / fact (n - 1)) \<longlonglongrightarrow> 0" (is ?P)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. E * F * F ^ (n - 1) / fact (n - 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
by (intro filterlim_compose[OF power_over_fact_tendsto_0' filterlim_minus_nat_at_top])
[PROOF STATE]
proof (state)
this:
(\<lambda>n. E * F * F ^ (n - 1) / fact (n - 1)) \<longlonglongrightarrow> 0

goal (1 subgoal):
 1. algebraic (exp 1) \<Longrightarrow> False
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>n. E * F * F ^ (n - 1) / fact (n - 1)) \<longlonglongrightarrow> 0

goal (1 subgoal):
 1. algebraic (exp 1) \<Longrightarrow> False
[PROOF STEP]
have "?P \<longleftrightarrow> (\<lambda>n. E * F ^ n / fact (n - 1)) \<longlonglongrightarrow> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. E * F * F ^ (n - 1) / fact (n - 1)) \<longlonglongrightarrow> 0 = (\<lambda>n. E * F ^ n / fact (n - 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
by (intro filterlim_cong refl eventually_mono[OF eventually_gt_at_top[of "0::nat"]])
       (auto simp: power_Suc [symmetric] simp del: power_Suc)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. E * F * F ^ (n - 1) / fact (n - 1)) \<longlonglongrightarrow> 0 = (\<lambda>n. E * F ^ n / fact (n - 1)) \<longlonglongrightarrow> 0

goal (1 subgoal):
 1. algebraic (exp 1) \<Longrightarrow> False
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. E * F ^ n / fact (n - 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
have "eventually (\<lambda>n. E * F ^ n / fact (n - 1) < 1) at_top"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. E * F ^ n / fact (n - 1)) \<longlonglongrightarrow> 0

goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. E * F ^ n / fact (n - 1) < 1
[PROOF STEP]
by (rule order_tendstoD) simp_all
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in sequentially. E * F ^ n / fact (n - 1) < 1

goal (1 subgoal):
 1. algebraic (exp 1) \<Longrightarrow> False
[PROOF STEP]
hence "eventually (\<lambda>n. E * F ^ n < fact (n - 1)) at_top"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F n in sequentially. E * F ^ n / fact (n - 1) < 1

goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. E * F ^ n < fact (n - 1)
[PROOF STEP]
by eventually_elim simp
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in sequentially. E * F ^ n < fact (n - 1)

goal (1 subgoal):
 1. algebraic (exp 1) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F n in sequentially. E * F ^ n < fact (n - 1)
[PROOF STEP]
obtain P where P: "\<And>n. n \<ge> P \<Longrightarrow> E * F ^ n < fact (n - 1)"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F n in sequentially. E * F ^ n < fact (n - 1)

goal (1 subgoal):
 1. (\<And>P. (\<And>n. P \<le> n \<Longrightarrow> E * F ^ n < fact (n - 1)) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: eventually_at_top_linorder)
[PROOF STATE]
proof (state)
this:
P \<le> ?n \<Longrightarrow> E * F ^ ?n < fact (?n - 1)

goal (1 subgoal):
 1. algebraic (exp 1) \<Longrightarrow> False
[PROOF STEP]
have "\<exists>p. prime p \<and> p > Max {nat (abs (coeff q 0)), n, P}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>p. prime p \<and> Max {nat \<bar>poly.coeff q 0\<bar>, n, P} < p
[PROOF STEP]
by (rule bigger_prime)
[PROOF STATE]
proof (state)
this:
\<exists>p. prime p \<and> Max {nat \<bar>poly.coeff q 0\<bar>, n, P} < p

goal (1 subgoal):
 1. algebraic (exp 1) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>p. prime p \<and> Max {nat \<bar>poly.coeff q 0\<bar>, n, P} < p
[PROOF STEP]
obtain p where "prime p" "p > Max {nat (abs (coeff q 0)), n, P}"
[PROOF STATE]
proof (prove)
using this:
\<exists>p. prime p \<and> Max {nat \<bar>poly.coeff q 0\<bar>, n, P} < p

goal (1 subgoal):
 1. (\<And>p. \<lbrakk>prime p; Max {nat \<bar>poly.coeff q 0\<bar>, n, P} < p\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
prime p
Max {nat \<bar>poly.coeff q 0\<bar>, n, P} < p

goal (1 subgoal):
 1. algebraic (exp 1) \<Longrightarrow> False
[PROOF STEP]
hence "int p > abs (coeff q 0)" "p > n" "p \<ge> P"
[PROOF STATE]
proof (prove)
using this:
prime p
Max {nat \<bar>poly.coeff q 0\<bar>, n, P} < p

goal (1 subgoal):
 1. \<bar>poly.coeff q 0\<bar> < int p &&& n < p &&& P \<le> p
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<bar>poly.coeff q 0\<bar> < int p
n < p
P \<le> p

goal (1 subgoal):
 1. algebraic (exp 1) \<Longrightarrow> False
[PROOF STEP]
with ineq[of p] \<open>prime p\<close>
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>prime p; n < p; \<bar>poly.coeff q 0\<bar> < int p\<rbrakk> \<Longrightarrow> fact (p - 1) \<le> E * F ^ p
prime p
\<bar>poly.coeff q 0\<bar> < int p
n < p
P \<le> p
[PROOF STEP]
have "fact (p - 1) \<le> E * F ^ p"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>prime p; n < p; \<bar>poly.coeff q 0\<bar> < int p\<rbrakk> \<Longrightarrow> fact (p - 1) \<le> E * F ^ p
prime p
\<bar>poly.coeff q 0\<bar> < int p
n < p
P \<le> p

goal (1 subgoal):
 1. fact (p - 1) \<le> E * F ^ p
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
fact (p - 1) \<le> E * F ^ p

goal (1 subgoal):
 1. algebraic (exp 1) \<Longrightarrow> False
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
fact (p - 1) \<le> E * F ^ p

goal (1 subgoal):
 1. algebraic (exp 1) \<Longrightarrow> False
[PROOF STEP]
from \<open>p \<ge> P\<close>
[PROOF STATE]
proof (chain)
picking this:
P \<le> p
[PROOF STEP]
have "fact (p - 1) > E * F ^ p"
[PROOF STATE]
proof (prove)
using this:
P \<le> p

goal (1 subgoal):
 1. E * F ^ p < fact (p - 1)
[PROOF STEP]
by (rule P)
[PROOF STATE]
proof (state)
this:
E * F ^ p < fact (p - 1)

goal (1 subgoal):
 1. algebraic (exp 1) \<Longrightarrow> False
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
fact (p - 1) \<le> E * F ^ p
E * F ^ p < fact (p - 1)
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
fact (p - 1) \<le> E * F ^ p
E * F ^ p < fact (p - 1)

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fls_divide_X_power [simp]:
  fixes f :: "'a::division_ring fls"
  shows "f / (fls_X ^ n) = fls_shift n f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f / fls_X ^ n = fls_shift (int n) f
[PROOF STEP]
by    (rule fls_divide_X_power'[OF inverse_1])


[STATEMENT]
lemma vec_of_dim_0[simp]: "dim_vec v = 0 \<longleftrightarrow> v = 0\<^sub>v 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (dim_vec v = 0) = (v = 0\<^sub>v 0)
[PROOF STEP]
by auto