[STATEMENT]
lemma dg_prod_3_Cod_vrange:
  "\<R>\<^sub>\<circ> ((\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Cod\<rparr>) \<subseteq>\<^sub>\<circ> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Obj\<rparr>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<R>\<^sub>\<circ> ((\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Cod\<rparr>) \<subseteq>\<^sub>\<circ> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Obj\<rparr>
[PROOF STEP]
proof(rule vsv.vsv_vrange_vsubset, unfold dg_cs_simps)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. vsv ((\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Cod\<rparr>)
 2. \<And>x. x \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Arr\<rparr> \<Longrightarrow> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Cod\<rparr>\<lparr>x\<rparr> \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Obj\<rparr>
[PROOF STEP]
show "vsv ((\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Cod\<rparr>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vsv ((\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Cod\<rparr>)
[PROOF STEP]
by (rule dg_prod_3_Cod_vsv)
[PROOF STATE]
proof (state)
this:
vsv ((\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Cod\<rparr>)

goal (1 subgoal):
 1. \<And>x. x \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Arr\<rparr> \<Longrightarrow> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Cod\<rparr>\<lparr>x\<rparr> \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Obj\<rparr>
[PROOF STEP]
fix F
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Arr\<rparr> \<Longrightarrow> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Cod\<rparr>\<lparr>x\<rparr> \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Obj\<rparr>
[PROOF STEP]
assume prems: "F \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Arr\<rparr>"
[PROOF STATE]
proof (state)
this:
F \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Arr\<rparr>

goal (1 subgoal):
 1. \<And>x. x \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Arr\<rparr> \<Longrightarrow> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Cod\<rparr>\<lparr>x\<rparr> \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Obj\<rparr>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
F \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Arr\<rparr>
[PROOF STEP]
obtain f f' f'' where F_def: "F = [f, f', f'']\<^sub>\<circ>"
    and f: "f \<in>\<^sub>\<circ> \<AA>\<lparr>Arr\<rparr>"
    and f': "f' \<in>\<^sub>\<circ> \<BB>\<lparr>Arr\<rparr>"
    and f'': "f'' \<in>\<^sub>\<circ> \<CC>\<lparr>Arr\<rparr>"
[PROOF STATE]
proof (prove)
using this:
F \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Arr\<rparr>

goal (1 subgoal):
 1. (\<And>f f' f''. \<lbrakk>F = [f, f', f'']\<^sub>\<circ>; f \<in>\<^sub>\<circ> \<AA>\<lparr>Arr\<rparr>; f' \<in>\<^sub>\<circ> \<BB>\<lparr>Arr\<rparr>; f'' \<in>\<^sub>\<circ> \<CC>\<lparr>Arr\<rparr>\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (elim dg_prod_3_ArrE[OF \<AA> \<BB> \<CC>]) simp
[PROOF STATE]
proof (state)
this:
F = [f, f', f'']\<^sub>\<circ>
f \<in>\<^sub>\<circ> \<AA>\<lparr>Arr\<rparr>
f' \<in>\<^sub>\<circ> \<BB>\<lparr>Arr\<rparr>
f'' \<in>\<^sub>\<circ> \<CC>\<lparr>Arr\<rparr>

goal (1 subgoal):
 1. \<And>x. x \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Arr\<rparr> \<Longrightarrow> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Cod\<rparr>\<lparr>x\<rparr> \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Obj\<rparr>
[PROOF STEP]
from f f' f''
[PROOF STATE]
proof (chain)
picking this:
f \<in>\<^sub>\<circ> \<AA>\<lparr>Arr\<rparr>
f' \<in>\<^sub>\<circ> \<BB>\<lparr>Arr\<rparr>
f'' \<in>\<^sub>\<circ> \<CC>\<lparr>Arr\<rparr>
[PROOF STEP]
obtain a a' a'' b b' b''
    where f: "f : a \<mapsto>\<^bsub>\<AA>\<^esub> b"
      and f': "f' : a' \<mapsto>\<^bsub>\<BB>\<^esub> b'"
      and f'': "f'' : a'' \<mapsto>\<^bsub>\<CC>\<^esub> b''"
[PROOF STATE]
proof (prove)
using this:
f \<in>\<^sub>\<circ> \<AA>\<lparr>Arr\<rparr>
f' \<in>\<^sub>\<circ> \<BB>\<lparr>Arr\<rparr>
f'' \<in>\<^sub>\<circ> \<CC>\<lparr>Arr\<rparr>

goal (1 subgoal):
 1. (\<And>a b a' b' a'' b''. \<lbrakk>f : a \<mapsto>\<^bsub>\<AA>\<^esub> b; f' : a' \<mapsto>\<^bsub>\<BB>\<^esub> b'; f'' : a'' \<mapsto>\<^bsub>\<CC>\<^esub> b''\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis is_arrI)
[PROOF STATE]
proof (state)
this:
f : a \<mapsto>\<^bsub>\<AA>\<^esub> b
f' : a' \<mapsto>\<^bsub>\<BB>\<^esub> b'
f'' : a'' \<mapsto>\<^bsub>\<CC>\<^esub> b''

goal (1 subgoal):
 1. \<And>x. x \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Arr\<rparr> \<Longrightarrow> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Cod\<rparr>\<lparr>x\<rparr> \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Obj\<rparr>
[PROOF STEP]
from \<AA> \<BB> \<CC> f f' f''
[PROOF STATE]
proof (chain)
picking this:
digraph \<alpha> \<AA>
digraph \<alpha> \<BB>
digraph \<alpha> \<CC>
f : a \<mapsto>\<^bsub>\<AA>\<^esub> b
f' : a' \<mapsto>\<^bsub>\<BB>\<^esub> b'
f'' : a'' \<mapsto>\<^bsub>\<CC>\<^esub> b''
[PROOF STEP]
show
    "(\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Cod\<rparr>\<lparr>F\<rparr> \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Obj\<rparr>"
[PROOF STATE]
proof (prove)
using this:
digraph \<alpha> \<AA>
digraph \<alpha> \<BB>
digraph \<alpha> \<CC>
f : a \<mapsto>\<^bsub>\<AA>\<^esub> b
f' : a' \<mapsto>\<^bsub>\<BB>\<^esub> b'
f'' : a'' \<mapsto>\<^bsub>\<CC>\<^esub> b''

goal (1 subgoal):
 1. (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Cod\<rparr>\<lparr>F\<rparr> \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Obj\<rparr>
[PROOF STEP]
unfolding F_def dg_prod_3_Cod_app[OF prems[unfolded F_def]]
[PROOF STATE]
proof (prove)
using this:
digraph \<alpha> \<AA>
digraph \<alpha> \<BB>
digraph \<alpha> \<CC>
f : a \<mapsto>\<^bsub>\<AA>\<^esub> b
f' : a' \<mapsto>\<^bsub>\<BB>\<^esub> b'
f'' : a'' \<mapsto>\<^bsub>\<CC>\<^esub> b''

goal (1 subgoal):
 1. [\<AA>\<lparr>Cod\<rparr>\<lparr>f\<rparr>, \<BB>\<lparr>Cod\<rparr>\<lparr>f'\<rparr>, \<CC>\<lparr>Cod\<rparr>\<lparr>f''\<rparr>]\<^sub>\<circ> \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Obj\<rparr>
[PROOF STEP]
by
      (
        cs_concl cs_shallow
          cs_simp: dg_cs_simps cs_intro: dg_cs_intros dg_prod_cs_intros
      )
[PROOF STATE]
proof (state)
this:
(\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Cod\<rparr>\<lparr>F\<rparr> \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Obj\<rparr>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fps_nth_deriv_sub[simp]:
  "fps_nth_deriv n ((f :: 'a::ring_1 fps) - g) = fps_nth_deriv n f - fps_nth_deriv n g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fps_nth_deriv n (f - g) = fps_nth_deriv n f - fps_nth_deriv n g
[PROOF STEP]
using fps_nth_deriv_add [of n f "- g"]
[PROOF STATE]
proof (prove)
using this:
fps_nth_deriv n (f + - g) = fps_nth_deriv n f + fps_nth_deriv n (- g)

goal (1 subgoal):
 1. fps_nth_deriv n (f - g) = fps_nth_deriv n f - fps_nth_deriv n g
[PROOF STEP]
by simp


[STATEMENT]
lemma finite_\<R>_aux:
  fixes P A B assumes "finite {x. A x}" "finite {x. B x}"
  shows "finite {(I, J) | I J. P I J r \<and> A I \<and> B J}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {(I, J) |I J. P I J r \<and> A I \<and> B J}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite {x. A x}
finite {x. B x}

goal (1 subgoal):
 1. finite {(I, J) |I J. P I J r \<and> A I \<and> B J}
[PROOF STEP]
by (fastforce intro: pairwise_finiteI finite_ex_and1 finite_ex_and2)


[STATEMENT]
lemma floor_frac_add_preservation':
  fixes a d :: real
  assumes "0 \<le> d" "d < 1 - frac a"
  shows "floor a = floor (a + d)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lfloor>a\<rfloor> = \<lfloor>a + d\<rfloor>
[PROOF STEP]
using assms floor_frac_add_preservation
[PROOF STATE]
proof (prove)
using this:
0 \<le> d
d < 1 - frac a
\<lbrakk>0 < ?d; ?d < 1 - frac ?a\<rbrakk> \<Longrightarrow> \<lfloor>?a\<rfloor> = \<lfloor>?a + ?d\<rfloor>

goal (1 subgoal):
 1. \<lfloor>a\<rfloor> = \<lfloor>a + d\<rfloor>
[PROOF STEP]
by (cases "d = 0") auto


[STATEMENT]
lemma induced_pow_fun_inj_on:
  assumes "inj_on f A"
  shows   "inj_on ((`) f) (Pow A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on ((`) f) (Pow A)
[PROOF STEP]
using   inj_onD[OF assms] inj_onI[of "Pow A" "(`) f"]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>f ?x = f ?y; ?x \<in> A; ?y \<in> A\<rbrakk> \<Longrightarrow> ?x = ?y
(\<And>x y. \<lbrakk>x \<in> Pow A; y \<in> Pow A; f ` x = f ` y\<rbrakk> \<Longrightarrow> x = y) \<Longrightarrow> inj_on ((`) f) (Pow A)

goal (1 subgoal):
 1. inj_on ((`) f) (Pow A)
[PROOF STEP]
by      blast


[STATEMENT]
lemma UINF_cong:
  assumes "\<And> P. P \<in> A \<Longrightarrow> F(P) = G(P)"
  shows "(\<Sqinter> P\<in>A \<bullet> F(P)) = (\<Sqinter> P\<in>A \<bullet> G(P))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sqinter> P \<in> A \<bullet> F P) = (\<Sqinter> P \<in> A \<bullet> G P)
[PROOF STEP]
by (simp add: UINF_as_Sup_collect assms)


[STATEMENT]
lemma continuous_on_arsinh' [continuous_intros]:
  fixes f :: "real \<Rightarrow> real"
  assumes "continuous_on A f"
  shows   "continuous_on A (\<lambda>x. arsinh (f x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on A (\<lambda>x. arsinh (f x))
[PROOF STEP]
by (rule continuous_on_compose2[OF continuous_on_arsinh assms]) auto


[STATEMENT]
lemma lipschitz_on_mono: "L-lipschitz_on D f" if "M-lipschitz_on E f" "D \<subseteq> E" "M \<le> L"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. L-lipschitz_on D f
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
M-lipschitz_on E f
D \<subseteq> E
M \<le> L

goal (1 subgoal):
 1. L-lipschitz_on D f
[PROOF STEP]
by (force simp: lipschitz_on_def intro: order_trans[OF _ mult_right_mono])


[STATEMENT]
lemma n_omega_L_star_zero:
  "x * x\<^sup>\<star> * bot \<squnion> n(x\<^sup>\<omega>) * L = x * x\<^sup>\<star> * bot \<squnion> x * n(x\<^sup>\<omega>) * L"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x\<^sup>+ * bot \<squnion> n (x\<^sup>\<omega>) * L = x\<^sup>+ * bot \<squnion> x * n (x\<^sup>\<omega>) * L
[PROOF STEP]
by (metis n_mult_omega_L_star_zero omega_unfold)


[STATEMENT]
lemma not_simply_connected_circle:
  fixes a :: complex
  shows "0 < r \<Longrightarrow> \<not> simply_connected(sphere a r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < r \<Longrightarrow> \<not> simply_connected (sphere a r)
[PROOF STEP]
by (simp add: simply_connected_sphere_eq)


[STATEMENT]
lemma pathfinish_pathstart_partcirclepath_simps:
  "pathstart (part_circlepath z0 r (3*pi/2) tt) = z0 - Complex 0 r"
  "pathstart (part_circlepath z0 r (2*pi) tt) = z0 + r"
  "pathfinish (part_circlepath z0 r st (3*pi/2)) = z0 - Complex 0 r"
  "pathfinish (part_circlepath z0 r st (2*pi)) = z0 + r"
  "pathstart (part_circlepath z0 r 0 tt) = z0 + r"
  "pathstart (part_circlepath z0 r (pi/2) tt) = z0 + Complex 0 r"
  "pathstart (part_circlepath z0 r (pi) tt) = z0 - r"
  "pathfinish (part_circlepath z0 r st 0) = z0+r"
  "pathfinish (part_circlepath z0 r st (pi/2)) = z0 + Complex 0 r"
  "pathfinish (part_circlepath z0 r st (pi)) = z0 - r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((pathstart (part_circlepath z0 r (3 * pi / 2) tt) = z0 - Complex 0 r &&& pathstart (part_circlepath z0 r (2 * pi) tt) = z0 + complex_of_real r) &&& pathfinish (part_circlepath z0 r st (3 * pi / 2)) = z0 - Complex 0 r &&& pathfinish (part_circlepath z0 r st (2 * pi)) = z0 + complex_of_real r &&& pathstart (part_circlepath z0 r 0 tt) = z0 + complex_of_real r) &&& (pathstart (part_circlepath z0 r (pi / 2) tt) = z0 + Complex 0 r &&& pathstart (part_circlepath z0 r pi tt) = z0 - complex_of_real r) &&& pathfinish (part_circlepath z0 r st 0) = z0 + complex_of_real r &&& pathfinish (part_circlepath z0 r st (pi / 2)) = z0 + Complex 0 r &&& pathfinish (part_circlepath z0 r st pi) = z0 - complex_of_real r
[PROOF STEP]
unfolding part_circlepath_def linepath_def pathstart_def pathfinish_def exp_Euler
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((z0 + complex_of_real r * (cos (complex_of_real ((1 - 0) *\<^sub>R (3 * pi / 2) + 0 *\<^sub>R tt)) + \<i> * sin (complex_of_real ((1 - 0) *\<^sub>R (3 * pi / 2) + 0 *\<^sub>R tt))) = z0 - Complex 0 r &&& z0 + complex_of_real r * (cos (complex_of_real ((1 - 0) *\<^sub>R (2 * pi) + 0 *\<^sub>R tt)) + \<i> * sin (complex_of_real ((1 - 0) *\<^sub>R (2 * pi) + 0 *\<^sub>R tt))) = z0 + complex_of_real r) &&& z0 + complex_of_real r * (cos (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R (3 * pi / 2))) + \<i> * sin (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R (3 * pi / 2)))) = z0 - Complex 0 r &&& z0 + complex_of_real r * (cos (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R (2 * pi))) + \<i> * sin (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R (2 * pi)))) = z0 + complex_of_real r &&& z0 + complex_of_real r * (cos (complex_of_real ((1 - 0) *\<^sub>R 0 + 0 *\<^sub>R tt)) + \<i> * sin (complex_of_real ((1 - 0) *\<^sub>R 0 + 0 *\<^sub>R tt))) = z0 + complex_of_real r) &&& (z0 + complex_of_real r * (cos (complex_of_real ((1 - 0) *\<^sub>R (pi / 2) + 0 *\<^sub>R tt)) + \<i> * sin (complex_of_real ((1 - 0) *\<^sub>R (pi / 2) + 0 *\<^sub>R tt))) = z0 + Complex 0 r &&& z0 + complex_of_real r * (cos (complex_of_real ((1 - 0) *\<^sub>R pi + 0 *\<^sub>R tt)) + \<i> * sin (complex_of_real ((1 - 0) *\<^sub>R pi + 0 *\<^sub>R tt))) = z0 - complex_of_real r) &&& z0 + complex_of_real r * (cos (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R 0)) + \<i> * sin (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R 0))) = z0 + complex_of_real r &&& z0 + complex_of_real r * (cos (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R (pi / 2))) + \<i> * sin (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R (pi / 2)))) = z0 + Complex 0 r &&& z0 + complex_of_real r * (cos (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R pi)) + \<i> * sin (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R pi))) = z0 - complex_of_real r
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z0 + complex_of_real r * (cos (complex_of_real ((1 - 0) *\<^sub>R (3 * pi / 2) + 0 *\<^sub>R tt)) + \<i> * sin (complex_of_real ((1 - 0) *\<^sub>R (3 * pi / 2) + 0 *\<^sub>R tt))) = z0 - Complex 0 r
[PROOF STEP]
apply(simp, subst sin.minus_1[symmetric],subst cos.minus_1[symmetric])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real r * (cos (3 * complex_of_real pi / 2 - 2 * complex_of_real pi) + \<i> * sin (3 * complex_of_real pi / 2 - 2 * complex_of_real pi)) = - Complex 0 r
[PROOF STEP]
by (simp add: complex_of_real_i)
[PROOF STATE]
proof (prove)
goal (9 subgoals):
 1. z0 + complex_of_real r * (cos (complex_of_real ((1 - 0) *\<^sub>R (2 * pi) + 0 *\<^sub>R tt)) + \<i> * sin (complex_of_real ((1 - 0) *\<^sub>R (2 * pi) + 0 *\<^sub>R tt))) = z0 + complex_of_real r
 2. z0 + complex_of_real r * (cos (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R (3 * pi / 2))) + \<i> * sin (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R (3 * pi / 2)))) = z0 - Complex 0 r
 3. z0 + complex_of_real r * (cos (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R (2 * pi))) + \<i> * sin (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R (2 * pi)))) = z0 + complex_of_real r
 4. z0 + complex_of_real r * (cos (complex_of_real ((1 - 0) *\<^sub>R 0 + 0 *\<^sub>R tt)) + \<i> * sin (complex_of_real ((1 - 0) *\<^sub>R 0 + 0 *\<^sub>R tt))) = z0 + complex_of_real r
 5. z0 + complex_of_real r * (cos (complex_of_real ((1 - 0) *\<^sub>R (pi / 2) + 0 *\<^sub>R tt)) + \<i> * sin (complex_of_real ((1 - 0) *\<^sub>R (pi / 2) + 0 *\<^sub>R tt))) = z0 + Complex 0 r
 6. z0 + complex_of_real r * (cos (complex_of_real ((1 - 0) *\<^sub>R pi + 0 *\<^sub>R tt)) + \<i> * sin (complex_of_real ((1 - 0) *\<^sub>R pi + 0 *\<^sub>R tt))) = z0 - complex_of_real r
 7. z0 + complex_of_real r * (cos (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R 0)) + \<i> * sin (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R 0))) = z0 + complex_of_real r
 8. z0 + complex_of_real r * (cos (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R (pi / 2))) + \<i> * sin (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R (pi / 2)))) = z0 + Complex 0 r
 9. z0 + complex_of_real r * (cos (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R pi)) + \<i> * sin (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R pi))) = z0 - complex_of_real r
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z0 + complex_of_real r * (cos (complex_of_real ((1 - 0) *\<^sub>R (2 * pi) + 0 *\<^sub>R tt)) + \<i> * sin (complex_of_real ((1 - 0) *\<^sub>R (2 * pi) + 0 *\<^sub>R tt))) = z0 + complex_of_real r
[PROOF STEP]
by (simp add: complex_of_real_i)
[PROOF STATE]
proof (prove)
goal (8 subgoals):
 1. z0 + complex_of_real r * (cos (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R (3 * pi / 2))) + \<i> * sin (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R (3 * pi / 2)))) = z0 - Complex 0 r
 2. z0 + complex_of_real r * (cos (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R (2 * pi))) + \<i> * sin (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R (2 * pi)))) = z0 + complex_of_real r
 3. z0 + complex_of_real r * (cos (complex_of_real ((1 - 0) *\<^sub>R 0 + 0 *\<^sub>R tt)) + \<i> * sin (complex_of_real ((1 - 0) *\<^sub>R 0 + 0 *\<^sub>R tt))) = z0 + complex_of_real r
 4. z0 + complex_of_real r * (cos (complex_of_real ((1 - 0) *\<^sub>R (pi / 2) + 0 *\<^sub>R tt)) + \<i> * sin (complex_of_real ((1 - 0) *\<^sub>R (pi / 2) + 0 *\<^sub>R tt))) = z0 + Complex 0 r
 5. z0 + complex_of_real r * (cos (complex_of_real ((1 - 0) *\<^sub>R pi + 0 *\<^sub>R tt)) + \<i> * sin (complex_of_real ((1 - 0) *\<^sub>R pi + 0 *\<^sub>R tt))) = z0 - complex_of_real r
 6. z0 + complex_of_real r * (cos (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R 0)) + \<i> * sin (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R 0))) = z0 + complex_of_real r
 7. z0 + complex_of_real r * (cos (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R (pi / 2))) + \<i> * sin (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R (pi / 2)))) = z0 + Complex 0 r
 8. z0 + complex_of_real r * (cos (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R pi)) + \<i> * sin (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R pi))) = z0 - complex_of_real r
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z0 + complex_of_real r * (cos (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R (3 * pi / 2))) + \<i> * sin (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R (3 * pi / 2)))) = z0 - Complex 0 r
[PROOF STEP]
apply(simp, subst sin.minus_1[symmetric],subst cos.minus_1[symmetric])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real r * (cos (3 * complex_of_real pi / 2 - 2 * complex_of_real pi) + \<i> * sin (3 * complex_of_real pi / 2 - 2 * complex_of_real pi)) = - Complex 0 r
[PROOF STEP]
by (simp add: complex_of_real_i)
[PROOF STATE]
proof (prove)
goal (7 subgoals):
 1. z0 + complex_of_real r * (cos (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R (2 * pi))) + \<i> * sin (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R (2 * pi)))) = z0 + complex_of_real r
 2. z0 + complex_of_real r * (cos (complex_of_real ((1 - 0) *\<^sub>R 0 + 0 *\<^sub>R tt)) + \<i> * sin (complex_of_real ((1 - 0) *\<^sub>R 0 + 0 *\<^sub>R tt))) = z0 + complex_of_real r
 3. z0 + complex_of_real r * (cos (complex_of_real ((1 - 0) *\<^sub>R (pi / 2) + 0 *\<^sub>R tt)) + \<i> * sin (complex_of_real ((1 - 0) *\<^sub>R (pi / 2) + 0 *\<^sub>R tt))) = z0 + Complex 0 r
 4. z0 + complex_of_real r * (cos (complex_of_real ((1 - 0) *\<^sub>R pi + 0 *\<^sub>R tt)) + \<i> * sin (complex_of_real ((1 - 0) *\<^sub>R pi + 0 *\<^sub>R tt))) = z0 - complex_of_real r
 5. z0 + complex_of_real r * (cos (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R 0)) + \<i> * sin (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R 0))) = z0 + complex_of_real r
 6. z0 + complex_of_real r * (cos (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R (pi / 2))) + \<i> * sin (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R (pi / 2)))) = z0 + Complex 0 r
 7. z0 + complex_of_real r * (cos (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R pi)) + \<i> * sin (complex_of_real ((1 - 1) *\<^sub>R st + 1 *\<^sub>R pi))) = z0 - complex_of_real r
[PROOF STEP]
by (simp_all add: complex_of_real_i)


[STATEMENT]
theorem FinGroupRepresentation_indspace :
  "FinGroupRepresentation H rrsmult indV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. FinGroupRepresentation H (\<currency>) indV
[PROOF STEP]
using FHModule_indspace
[PROOF STATE]
proof (prove)
using this:
FGModule H (\<currency>) indV

goal (1 subgoal):
 1. FinGroupRepresentation H (\<currency>) indV
[PROOF STEP]
proof (rule FinGroupRepresentation.intro)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. FinGroupRepresentation_axioms H (\<currency>) indV
[PROOF STEP]
from good_ordSupgrp
[PROOF STATE]
proof (chain)
picking this:
ordH \<noteq> (0::'f)
[PROOF STEP]
show "FinGroupRepresentation_axioms H (\<currency>) indV"
[PROOF STATE]
proof (prove)
using this:
ordH \<noteq> (0::'f)

goal (1 subgoal):
 1. FinGroupRepresentation_axioms H (\<currency>) indV
[PROOF STEP]
using indspace_findim
[PROOF STATE]
proof (prove)
using this:
ordH \<noteq> (0::'f)
\<exists>ms. set ms \<subseteq> indV \<and> R_scalar_mult.RSpan UNIV (\<currency>\<currency>) ms = indV

goal (1 subgoal):
 1. FinGroupRepresentation_axioms H (\<currency>) indV
[PROOF STEP]
by unfold_locales fast
[PROOF STATE]
proof (state)
this:
FinGroupRepresentation_axioms H (\<currency>) indV

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma word_add_less_dest:
  fixes i :: "'a :: len word"
  assumes le: "i + k < j + k"
  and    uik: "unat i + unat k < 2 ^ len_of TYPE ('a)"
  and    ujk: "unat j + unat k < 2 ^ len_of TYPE ('a)"
  shows  "i < j"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i < j
[PROOF STEP]
using uik ujk le
[PROOF STATE]
proof (prove)
using this:
unat i + unat k < 2 ^ LENGTH('a)
unat j + unat k < 2 ^ LENGTH('a)
i + k < j + k

goal (1 subgoal):
 1. i < j
[PROOF STEP]
by (auto simp: word_less_nat_alt iffD1 [OF unat_add_lem] elim: add_less_mono1)


[STATEMENT]
lemma master_integral'':
  fixes a p p' :: real
  assumes a: "a > 1"
  shows "(\<lambda>x::nat. x powr p * (1 + integral {a..x} (\<lambda>u. u powr p * ln u powr - 1/u powr (p+1)))) \<in>
           \<Theta>(\<lambda>x::nat. x powr p * ln (ln x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. real x powr p * (1 + integral {a..real x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1)))) \<in> \<Theta>(\<lambda>x. real x powr p * ln (ln (real x)))
[PROOF STEP]
proof (rule landau_real_nat_transfer)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>b. b powr p * (1 + integral {a..b} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1)))) \<in> \<Theta>(\<lambda>a. a powr p * ln (ln a))
[PROOF STEP]
have "(\<lambda>x::real. x powr p * (1 + integral {a..x} (\<lambda>u. u powr p * ln u powr - 1/u powr (p+1)))) \<in>
          \<Theta>(\<lambda>x::real. (1 - ln (ln a)) * x powr p + x powr p * ln (ln x))" (is "?f \<in> _")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. x powr p * (1 + integral {a..x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1)))) \<in> \<Theta>(\<lambda>x. (1 - ln (ln a)) * x powr p + x powr p * ln (ln x))
[PROOF STEP]
apply (rule bigthetaI_cong)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. x powr p * (1 + integral {a..x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1))) = (1 - ln (ln a)) * x powr p + x powr p * ln (ln x)
[PROOF STEP]
using eventually_ge_at_top[of a]
[PROOF STATE]
proof (prove)
using this:
eventually ((\<le>) a) at_top

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. x powr p * (1 + integral {a..x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1))) = (1 - ln (ln a)) * x powr p + x powr p * ln (ln x)
[PROOF STEP]
proof eventually_elim
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. a \<le> x \<Longrightarrow> x powr p * (1 + integral {a..x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1))) = (1 - ln (ln a)) * x powr p + x powr p * ln (ln x)
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. a \<le> x \<Longrightarrow> x powr p * (1 + integral {a..x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1))) = (1 - ln (ln a)) * x powr p + x powr p * ln (ln x)
[PROOF STEP]
assume x: "x \<ge> a"
[PROOF STATE]
proof (state)
this:
a \<le> x

goal (1 subgoal):
 1. \<And>x. a \<le> x \<Longrightarrow> x powr p * (1 + integral {a..x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1))) = (1 - ln (ln a)) * x powr p + x powr p * ln (ln x)
[PROOF STEP]
have "integral {a..x} (\<lambda>u. u powr p * ln u powr -1 / u powr (p + 1)) =
          integral {a..x} (\<lambda>u. inverse (u * ln u))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integral {a..x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1)) = integral {a..x} (\<lambda>u. inverse (u * ln u))
[PROOF STEP]
using x a x0_less_x1
[PROOF STATE]
proof (prove)
using this:
a \<le> x
1 < a
x\<^sub>0 < x\<^sub>1

goal (1 subgoal):
 1. integral {a..x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1)) = integral {a..x} (\<lambda>u. inverse (u * ln u))
[PROOF STEP]
by (intro Henstock_Kurzweil_Integration.integral_cong) (simp_all add: powr_add powr_minus field_simps)
[PROOF STATE]
proof (state)
this:
integral {a..x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1)) = integral {a..x} (\<lambda>u. inverse (u * ln u))

goal (1 subgoal):
 1. \<And>x. a \<le> x \<Longrightarrow> x powr p * (1 + integral {a..x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1))) = (1 - ln (ln a)) * x powr p + x powr p * ln (ln x)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
integral {a..x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1)) = integral {a..x} (\<lambda>u. inverse (u * ln u))

goal (1 subgoal):
 1. \<And>x. a \<le> x \<Longrightarrow> x powr p * (1 + integral {a..x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1))) = (1 - ln (ln a)) * x powr p + x powr p * ln (ln x)
[PROOF STEP]
have "... = ln (ln x) - ln (ln a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integral {a..x} (\<lambda>u. inverse (u * ln u)) = ln (ln x) - ln (ln a)
[PROOF STEP]
using x0_less_x1 a(1) x
[PROOF STATE]
proof (prove)
using this:
x\<^sub>0 < x\<^sub>1
1 < a
a \<le> x

goal (1 subgoal):
 1. integral {a..x} (\<lambda>u. inverse (u * ln u)) = ln (ln x) - ln (ln a)
[PROOF STEP]
by (subst integral_one_over_x_ln_x) simp_all
[PROOF STATE]
proof (state)
this:
integral {a..x} (\<lambda>u. inverse (u * ln u)) = ln (ln x) - ln (ln a)

goal (1 subgoal):
 1. \<And>x. a \<le> x \<Longrightarrow> x powr p * (1 + integral {a..x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1))) = (1 - ln (ln a)) * x powr p + x powr p * ln (ln x)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
integral {a..x} (\<lambda>u. inverse (u * ln u)) = ln (ln x) - ln (ln a)

goal (1 subgoal):
 1. \<And>x. a \<le> x \<Longrightarrow> x powr p * (1 + integral {a..x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1))) = (1 - ln (ln a)) * x powr p + x powr p * ln (ln x)
[PROOF STEP]
have "x powr p * (1 + ...) = (1 - ln (ln a)) * x powr p + x powr p * ln (ln x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x powr p * (1 + (ln (ln x) - ln (ln a))) = (1 - ln (ln a)) * x powr p + x powr p * ln (ln x)
[PROOF STEP]
by (simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
x powr p * (1 + (ln (ln x) - ln (ln a))) = (1 - ln (ln a)) * x powr p + x powr p * ln (ln x)

goal (1 subgoal):
 1. \<And>x. a \<le> x \<Longrightarrow> x powr p * (1 + integral {a..x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1))) = (1 - ln (ln a)) * x powr p + x powr p * ln (ln x)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
x powr p * (1 + integral {a..x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1))) = (1 - ln (ln a)) * x powr p + x powr p * ln (ln x)
[PROOF STEP]
show "x powr p * (1 + integral {a..x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p+1))) =
                    (1 - ln (ln a)) * x powr p + x powr p * ln (ln x)"
[PROOF STATE]
proof (prove)
using this:
x powr p * (1 + integral {a..x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1))) = (1 - ln (ln a)) * x powr p + x powr p * ln (ln x)

goal (1 subgoal):
 1. x powr p * (1 + integral {a..x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1))) = (1 - ln (ln a)) * x powr p + x powr p * ln (ln x)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
x powr p * (1 + integral {a..x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1))) = (1 - ln (ln a)) * x powr p + x powr p * ln (ln x)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>x. x powr p * (1 + integral {a..x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1)))) \<in> \<Theta>(\<lambda>x. (1 - ln (ln a)) * x powr p + x powr p * ln (ln x))

goal (1 subgoal):
 1. (\<lambda>b. b powr p * (1 + integral {a..b} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1)))) \<in> \<Theta>(\<lambda>a. a powr p * ln (ln a))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>x. x powr p * (1 + integral {a..x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1)))) \<in> \<Theta>(\<lambda>x. (1 - ln (ln a)) * x powr p + x powr p * ln (ln x))

goal (1 subgoal):
 1. (\<lambda>b. b powr p * (1 + integral {a..b} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1)))) \<in> \<Theta>(\<lambda>a. a powr p * ln (ln a))
[PROOF STEP]
have "(\<lambda>x. (1 - ln (ln a)) * x powr p + x powr p * ln (ln x)) \<in>
                \<Theta>(\<lambda>x. x powr p * ln (ln x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. (1 - ln (ln a)) * x powr p + x powr p * ln (ln x)) \<in> \<Theta>(\<lambda>x. x powr p * ln (ln x))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<lambda>x. (1 - ln (ln a)) * x powr p + x powr p * ln (ln x)) \<in> \<Theta>(\<lambda>x. x powr p * ln (ln x))

goal (1 subgoal):
 1. (\<lambda>b. b powr p * (1 + integral {a..b} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1)))) \<in> \<Theta>(\<lambda>a. a powr p * ln (ln a))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x. x powr p * (1 + integral {a..x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1)))) \<in> \<Theta>(\<lambda>x. x powr p * ln (ln x))
[PROOF STEP]
show "?f \<in> \<Theta>(\<lambda>a. a powr p * ln (ln a))"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. x powr p * (1 + integral {a..x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1)))) \<in> \<Theta>(\<lambda>x. x powr p * ln (ln x))

goal (1 subgoal):
 1. (\<lambda>x. x powr p * (1 + integral {a..x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1)))) \<in> \<Theta>(\<lambda>a. a powr p * ln (ln a))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<lambda>x. x powr p * (1 + integral {a..x} (\<lambda>u. u powr p * ln u powr - 1 / u powr (p + 1)))) \<in> \<Theta>(\<lambda>a. a powr p * ln (ln a))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma perm_count: "mset A = mset B \<Longrightarrow> (\<forall> x. count_list A x = count_list B x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mset A = mset B \<Longrightarrow> \<forall>x. count_list A x = count_list B x
[PROOF STEP]
by (simp add: count_eq)


[STATEMENT]
lemma Fake_analz_insert:
     "X\<in> synth (analz G) \<Longrightarrow>
      analz (insert X H) \<subseteq> synth (analz G) \<union> analz (G \<union> H)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X \<in> synth (analz G) \<Longrightarrow> analz (insert X H) \<subseteq> synth (analz G) \<union> analz (G \<union> H)
[PROOF STEP]
apply (rule subsetI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>X \<in> synth (analz G); x \<in> analz (insert X H)\<rbrakk> \<Longrightarrow> x \<in> synth (analz G) \<union> analz (G \<union> H)
[PROOF STEP]
apply (subgoal_tac "x \<in> analz (synth (analz G) \<union> H)", force)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>X \<in> synth (analz G); x \<in> analz (insert X H)\<rbrakk> \<Longrightarrow> x \<in> analz (synth (analz G) \<union> H)
[PROOF STEP]
apply (blast intro: analz_mono [THEN [2] rev_subsetD] analz_mono [THEN synth_mono, THEN [2] rev_subsetD])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma totient_less_not_prime:
  assumes "\<not> prime n" "1 < n"
  shows "totient n < n - 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. totient n < n - 1
[PROOF STEP]
using totient_imp_prime totient_less assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>totient ?p = ?p - 1; 0 < ?p\<rbrakk> \<Longrightarrow> prime ?p
1 < ?n \<Longrightarrow> totient ?n < ?n
\<not> prime n
1 < n

goal (1 subgoal):
 1. totient n < n - 1
[PROOF STEP]
by (metis One_nat_def Suc_pred le_less_trans less_SucE zero_le_one)


[STATEMENT]
lemma LARY_eval:
  fixes PLL :: "polynomial list list"
  shows "eval (LARY R PLL) a = R (map (map (\<lambda>P. peval P a)) PLL)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eval (LARY R PLL) a = R (map (map (\<lambda>P. peval P a)) PLL)
[PROOF STEP]
unfolding LARY_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eval (NARY (\<lambda>l. R (splits l (map length PLL))) (Diophantine_Relations.concat PLL)) a = R (map (map (\<lambda>P. peval P a)) PLL)
[PROOF STEP]
apply (induction PLL, simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>aa PLL. eval (NARY (\<lambda>l. R (splits l (map length PLL))) (Diophantine_Relations.concat PLL)) a = R (map (map (\<lambda>P. peval P a)) PLL) \<Longrightarrow> eval (NARY (\<lambda>l. R (splits l (map length (aa # PLL)))) (Diophantine_Relations.concat (aa # PLL))) a = R (map (map (\<lambda>P. peval P a)) (aa # PLL))
[PROOF STEP]
subgoal for pl pls
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eval (NARY (\<lambda>l. R (splits l (map length pls))) (Diophantine_Relations.concat pls)) a = R (map (map (\<lambda>P. peval P a)) pls) \<Longrightarrow> eval (NARY (\<lambda>l. R (splits l (map length (pl # pls)))) (Diophantine_Relations.concat (pl # pls))) a = R (map (map (\<lambda>P. peval P a)) (pl # pls))
[PROOF STEP]
by (induction pl, auto simp: split_concat)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma aHom_add:"\<lbrakk>aGroup F; aGroup G; f \<in> aHom F G; a \<in> carrier F;
 b \<in> carrier F\<rbrakk> \<Longrightarrow> f (a \<plusminus>\<^bsub>F\<^esub> b) = (f a) \<plusminus>\<^bsub>G\<^esub> (f b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>aGroup F; aGroup G; f \<in> aHom F G; a \<in> carrier F; b \<in> carrier F\<rbrakk> \<Longrightarrow> f (a \<plusminus>\<^bsub>F\<^esub> b) = f a \<plusminus>\<^bsub>G\<^esub> f b
[PROOF STEP]
apply (simp add:aHom_def)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma omega_unfold_eq [simp]: "x \<cdot> x\<^sup>\<omega> = x\<^sup>\<omega>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<cdot> x\<^sup>\<omega> = x\<^sup>\<omega>
[PROOF STEP]
proof (rule order.antisym)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x \<cdot> x\<^sup>\<omega> \<le> x\<^sup>\<omega>
 2. x\<^sup>\<omega> \<le> x \<cdot> x\<^sup>\<omega>
[PROOF STEP]
have "x \<cdot> x\<^sup>\<omega> \<le> x \<cdot> x \<cdot> x\<^sup>\<omega>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<cdot> x\<^sup>\<omega> \<le> x \<cdot> x \<cdot> x\<^sup>\<omega>
[PROOF STEP]
by (simp add: local.mult_isol local.omega_unfold mult_assoc)
[PROOF STATE]
proof (state)
this:
x \<cdot> x\<^sup>\<omega> \<le> x \<cdot> x \<cdot> x\<^sup>\<omega>

goal (2 subgoals):
 1. x \<cdot> x\<^sup>\<omega> \<le> x\<^sup>\<omega>
 2. x\<^sup>\<omega> \<le> x \<cdot> x\<^sup>\<omega>
[PROOF STEP]
thus "x \<cdot> x\<^sup>\<omega> \<le> x\<^sup>\<omega>"
[PROOF STATE]
proof (prove)
using this:
x \<cdot> x\<^sup>\<omega> \<le> x \<cdot> x \<cdot> x\<^sup>\<omega>

goal (1 subgoal):
 1. x \<cdot> x\<^sup>\<omega> \<le> x\<^sup>\<omega>
[PROOF STEP]
by (simp add: mult_assoc omega_coinduct_var2)
[PROOF STATE]
proof (state)
this:
x \<cdot> x\<^sup>\<omega> \<le> x\<^sup>\<omega>

goal (1 subgoal):
 1. x\<^sup>\<omega> \<le> x \<cdot> x\<^sup>\<omega>
[PROOF STEP]
show  "x\<^sup>\<omega> \<le> x \<cdot> x\<^sup>\<omega>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x\<^sup>\<omega> \<le> x \<cdot> x\<^sup>\<omega>
[PROOF STEP]
by (fact omega_unfold)
[PROOF STATE]
proof (state)
this:
x\<^sup>\<omega> \<le> x \<cdot> x\<^sup>\<omega>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma complex_split_polar: "\<exists>r a. z = complex_of_real r * (cos a + \<i> * sin a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>r a. z = complex_of_real r * (complex_of_real (cos a) + \<i> * complex_of_real (sin a))
[PROOF STEP]
by (simp add: complex_eq_iff polar_Ex)


[STATEMENT]
lemma subarray_nth_array_back: "\<lbrakk> i < j; j \<le> Array.length h a\<rbrakk> \<Longrightarrow> subarray i j a h = subarray i (j - 1) a h @ [Array.get h a ! (j - 1)]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i < j; j \<le> Array.length h a\<rbrakk> \<Longrightarrow> subarray i j a h = subarray i (j - 1) a h @ [Array.get h a ! (j - 1)]
[PROOF STEP]
unfolding Array.length_def subarray_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i < j; j \<le> length (Array.get h a)\<rbrakk> \<Longrightarrow> nths' i j (Array.get h a) = nths' i (j - 1) (Array.get h a) @ [Array.get h a ! (j - 1)]
[PROOF STEP]
by (simp add: nths'_back)


[STATEMENT]
lemma \<psi>\<^sub>0_to_\<psi>\<^sub>1:
  shows "(\<psi>\<^sub>0\<^sub>0 \<Otimes> \<psi>\<^sub>0\<^sub>1) = \<psi>\<^sub>1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]]) = \<psi>\<^sub>1
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>i j. \<lbrakk>i < dim_row \<psi>\<^sub>1; j < dim_col \<psi>\<^sub>1\<rbrakk> \<Longrightarrow> (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) $$ (i, j) = \<psi>\<^sub>1 $$ (i, j)
 2. dim_row (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) = dim_row \<psi>\<^sub>1
 3. dim_col (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) = dim_col \<psi>\<^sub>1
[PROOF STEP]
fix i j:: nat
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>i j. \<lbrakk>i < dim_row \<psi>\<^sub>1; j < dim_col \<psi>\<^sub>1\<rbrakk> \<Longrightarrow> (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) $$ (i, j) = \<psi>\<^sub>1 $$ (i, j)
 2. dim_row (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) = dim_row \<psi>\<^sub>1
 3. dim_col (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) = dim_col \<psi>\<^sub>1
[PROOF STEP]
assume "i < dim_row \<psi>\<^sub>1" and "j < dim_col \<psi>\<^sub>1"
[PROOF STATE]
proof (state)
this:
i < dim_row \<psi>\<^sub>1
j < dim_col \<psi>\<^sub>1

goal (3 subgoals):
 1. \<And>i j. \<lbrakk>i < dim_row \<psi>\<^sub>1; j < dim_col \<psi>\<^sub>1\<rbrakk> \<Longrightarrow> (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) $$ (i, j) = \<psi>\<^sub>1 $$ (i, j)
 2. dim_row (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) = dim_row \<psi>\<^sub>1
 3. dim_col (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) = dim_col \<psi>\<^sub>1
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
i < dim_row \<psi>\<^sub>1
j < dim_col \<psi>\<^sub>1
[PROOF STEP]
have "i \<in> {0,1,2,3}" and "j = 0"
[PROOF STATE]
proof (prove)
using this:
i < dim_row \<psi>\<^sub>1
j < dim_col \<psi>\<^sub>1

goal (1 subgoal):
 1. i \<in> {0, 1, 2, 3} &&& j = 0
[PROOF STEP]
using mat_of_cols_list_def
[PROOF STATE]
proof (prove)
using this:
i < dim_row \<psi>\<^sub>1
j < dim_col \<psi>\<^sub>1
Tensor.mat_of_cols_list ?nr ?cs = Matrix.mat ?nr (length ?cs) (\<lambda>(i, j). ?cs ! j ! i)

goal (1 subgoal):
 1. i \<in> {0, 1, 2, 3} &&& j = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
i \<in> {0, 1, 2, 3}
j = 0

goal (3 subgoals):
 1. \<And>i j. \<lbrakk>i < dim_row \<psi>\<^sub>1; j < dim_col \<psi>\<^sub>1\<rbrakk> \<Longrightarrow> (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) $$ (i, j) = \<psi>\<^sub>1 $$ (i, j)
 2. dim_row (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) = dim_row \<psi>\<^sub>1
 3. dim_col (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) = dim_col \<psi>\<^sub>1
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
i \<in> {0, 1, 2, 3}
j = 0

goal (3 subgoals):
 1. \<And>i j. \<lbrakk>i < dim_row \<psi>\<^sub>1; j < dim_col \<psi>\<^sub>1\<rbrakk> \<Longrightarrow> (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) $$ (i, j) = \<psi>\<^sub>1 $$ (i, j)
 2. dim_row (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) = dim_row \<psi>\<^sub>1
 3. dim_col (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) = dim_col \<psi>\<^sub>1
[PROOF STEP]
have "complex_of_real (sqrt 2) * complex_of_real (sqrt 2) = 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real (sqrt 2) * complex_of_real (sqrt 2) = 2
[PROOF STEP]
by (metis mult_2_right numeral_Bit0 of_real_mult of_real_numeral real_sqrt_four real_sqrt_mult)
[PROOF STATE]
proof (state)
this:
complex_of_real (sqrt 2) * complex_of_real (sqrt 2) = 2

goal (3 subgoals):
 1. \<And>i j. \<lbrakk>i < dim_row \<psi>\<^sub>1; j < dim_col \<psi>\<^sub>1\<rbrakk> \<Longrightarrow> (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) $$ (i, j) = \<psi>\<^sub>1 $$ (i, j)
 2. dim_row (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) = dim_row \<psi>\<^sub>1
 3. dim_col (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) = dim_col \<psi>\<^sub>1
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
i \<in> {0, 1, 2, 3}
j = 0
complex_of_real (sqrt 2) * complex_of_real (sqrt 2) = 2
[PROOF STEP]
show "(\<psi>\<^sub>0\<^sub>0 \<Otimes> \<psi>\<^sub>0\<^sub>1) $$ (i,j) = \<psi>\<^sub>1 $$ (i,j)"
[PROOF STATE]
proof (prove)
using this:
i \<in> {0, 1, 2, 3}
j = 0
complex_of_real (sqrt 2) * complex_of_real (sqrt 2) = 2

goal (1 subgoal):
 1. (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) $$ (i, j) = \<psi>\<^sub>1 $$ (i, j)
[PROOF STEP]
using mat_of_cols_list_def
[PROOF STATE]
proof (prove)
using this:
i \<in> {0, 1, 2, 3}
j = 0
complex_of_real (sqrt 2) * complex_of_real (sqrt 2) = 2
Tensor.mat_of_cols_list ?nr ?cs = Matrix.mat ?nr (length ?cs) (\<lambda>(i, j). ?cs ! j ! i)

goal (1 subgoal):
 1. (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) $$ (i, j) = \<psi>\<^sub>1 $$ (i, j)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) $$ (i, j) = \<psi>\<^sub>1 $$ (i, j)

goal (2 subgoals):
 1. dim_row (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) = dim_row \<psi>\<^sub>1
 2. dim_col (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) = dim_col \<psi>\<^sub>1
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. dim_row (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) = dim_row \<psi>\<^sub>1
 2. dim_col (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) = dim_col \<psi>\<^sub>1
[PROOF STEP]
show "dim_row (\<psi>\<^sub>0\<^sub>0 \<Otimes> \<psi>\<^sub>0\<^sub>1) = dim_row \<psi>\<^sub>1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_row (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) = dim_row \<psi>\<^sub>1
[PROOF STEP]
by (simp add: mat_of_cols_list_def)
[PROOF STATE]
proof (state)
this:
dim_row (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) = dim_row \<psi>\<^sub>1

goal (1 subgoal):
 1. dim_col (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) = dim_col \<psi>\<^sub>1
[PROOF STEP]
show "dim_col (\<psi>\<^sub>0\<^sub>0 \<Otimes> \<psi>\<^sub>0\<^sub>1) = dim_col \<psi>\<^sub>1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_col (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) = dim_col \<psi>\<^sub>1
[PROOF STEP]
by (simp add: mat_of_cols_list_def)
[PROOF STATE]
proof (state)
this:
dim_col (Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, 1 / sqrt 2]]) \<Otimes> Tensor.mat_of_cols_list 2 (map (map complex_of_real) [[1 / sqrt 2, - 1 / sqrt 2]])) = dim_col \<psi>\<^sub>1

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma trivial_product_group: "trivial_group(product_group I G) \<longleftrightarrow> (\<forall>i \<in> I. trivial_group(G i))"
 (is "?lhs = ?rhs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. trivial_group (product_group I G) = (\<forall>i\<in>I. trivial_group (G i))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. trivial_group (product_group I G) \<Longrightarrow> \<forall>i\<in>I. trivial_group (G i)
 2. \<forall>i\<in>I. trivial_group (G i) \<Longrightarrow> trivial_group (product_group I G)
[PROOF STEP]
assume L: ?lhs
[PROOF STATE]
proof (state)
this:
trivial_group (product_group I G)

goal (2 subgoals):
 1. trivial_group (product_group I G) \<Longrightarrow> \<forall>i\<in>I. trivial_group (G i)
 2. \<forall>i\<in>I. trivial_group (G i) \<Longrightarrow> trivial_group (product_group I G)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
trivial_group (product_group I G)
[PROOF STEP]
have "inv\<^bsub>product_group I G\<^esub> (\<lambda>a\<in>I. \<one>\<^bsub>G a\<^esub>) = \<one>\<^bsub>product_group I G\<^esub>"
[PROOF STATE]
proof (prove)
using this:
trivial_group (product_group I G)

goal (1 subgoal):
 1. inv\<^bsub>product_group I G\<^esub> (\<lambda>a\<in>I. \<one>\<^bsub>G a\<^esub>) = \<one>\<^bsub>product_group I G\<^esub>
[PROOF STEP]
by (metis group.is_monoid monoid.inv_one one_product_group trivial_group_def)
[PROOF STATE]
proof (state)
this:
inv\<^bsub>product_group I G\<^esub> (\<lambda>a\<in>I. \<one>\<^bsub>G a\<^esub>) = \<one>\<^bsub>product_group I G\<^esub>

goal (2 subgoals):
 1. trivial_group (product_group I G) \<Longrightarrow> \<forall>i\<in>I. trivial_group (G i)
 2. \<forall>i\<in>I. trivial_group (G i) \<Longrightarrow> trivial_group (product_group I G)
[PROOF STEP]
have [simp]: "\<one>\<^bsub>G i\<^esub> \<otimes>\<^bsub>G i\<^esub> \<one>\<^bsub>G i\<^esub> = \<one>\<^bsub>G i\<^esub>" if "i \<in> I" for i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<one>\<^bsub>G i\<^esub> \<otimes>\<^bsub>G i\<^esub> \<one>\<^bsub>G i\<^esub> = \<one>\<^bsub>G i\<^esub>
[PROOF STEP]
unfolding trivial_group_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<one>\<^bsub>G i\<^esub> \<otimes>\<^bsub>G i\<^esub> \<one>\<^bsub>G i\<^esub> = \<one>\<^bsub>G i\<^esub>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<one>\<^bsub>G i\<^esub> \<otimes>\<^bsub>G i\<^esub> \<one>\<^bsub>G i\<^esub> = \<one>\<^bsub>G i\<^esub>
[PROOF STEP]
have 1: "(\<lambda>a\<in>I. \<one>\<^bsub>G a\<^esub>) i = \<one>\<^bsub>G i\<^esub>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>a\<in>I. \<one>\<^bsub>G a\<^esub>) i = \<one>\<^bsub>G i\<^esub>
[PROOF STEP]
by (simp add: that)
[PROOF STATE]
proof (state)
this:
(\<lambda>a\<in>I. \<one>\<^bsub>G a\<^esub>) i = \<one>\<^bsub>G i\<^esub>

goal (1 subgoal):
 1. \<one>\<^bsub>G i\<^esub> \<otimes>\<^bsub>G i\<^esub> \<one>\<^bsub>G i\<^esub> = \<one>\<^bsub>G i\<^esub>
[PROOF STEP]
have "(\<lambda>a\<in>I. \<one>\<^bsub>G a\<^esub>) = (\<lambda>a\<in>I. \<one>\<^bsub>G a\<^esub>) \<otimes>\<^bsub>product_group I G\<^esub> (\<lambda>a\<in>I. \<one>\<^bsub>G a\<^esub>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>a\<in>I. \<one>\<^bsub>G a\<^esub>) = (\<lambda>a\<in>I. \<one>\<^bsub>G a\<^esub>) \<otimes>\<^bsub>product_group I G\<^esub> (\<lambda>a\<in>I. \<one>\<^bsub>G a\<^esub>)
[PROOF STEP]
by (metis (no_types) L group.is_monoid monoid.l_one one_product_group singletonI trivial_group_def)
[PROOF STATE]
proof (state)
this:
(\<lambda>a\<in>I. \<one>\<^bsub>G a\<^esub>) = (\<lambda>a\<in>I. \<one>\<^bsub>G a\<^esub>) \<otimes>\<^bsub>product_group I G\<^esub> (\<lambda>a\<in>I. \<one>\<^bsub>G a\<^esub>)

goal (1 subgoal):
 1. \<one>\<^bsub>G i\<^esub> \<otimes>\<^bsub>G i\<^esub> \<one>\<^bsub>G i\<^esub> = \<one>\<^bsub>G i\<^esub>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>a\<in>I. \<one>\<^bsub>G a\<^esub>) = (\<lambda>a\<in>I. \<one>\<^bsub>G a\<^esub>) \<otimes>\<^bsub>product_group I G\<^esub> (\<lambda>a\<in>I. \<one>\<^bsub>G a\<^esub>)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>a\<in>I. \<one>\<^bsub>G a\<^esub>) = (\<lambda>a\<in>I. \<one>\<^bsub>G a\<^esub>) \<otimes>\<^bsub>product_group I G\<^esub> (\<lambda>a\<in>I. \<one>\<^bsub>G a\<^esub>)

goal (1 subgoal):
 1. \<one>\<^bsub>G i\<^esub> \<otimes>\<^bsub>G i\<^esub> \<one>\<^bsub>G i\<^esub> = \<one>\<^bsub>G i\<^esub>
[PROOF STEP]
using 1
[PROOF STATE]
proof (prove)
using this:
(\<lambda>a\<in>I. \<one>\<^bsub>G a\<^esub>) = (\<lambda>a\<in>I. \<one>\<^bsub>G a\<^esub>) \<otimes>\<^bsub>product_group I G\<^esub> (\<lambda>a\<in>I. \<one>\<^bsub>G a\<^esub>)
(\<lambda>a\<in>I. \<one>\<^bsub>G a\<^esub>) i = \<one>\<^bsub>G i\<^esub>

goal (1 subgoal):
 1. \<one>\<^bsub>G i\<^esub> \<otimes>\<^bsub>G i\<^esub> \<one>\<^bsub>G i\<^esub> = \<one>\<^bsub>G i\<^esub>
[PROOF STEP]
by (simp add: that)
[PROOF STATE]
proof (state)
this:
\<one>\<^bsub>G i\<^esub> \<otimes>\<^bsub>G i\<^esub> \<one>\<^bsub>G i\<^esub> = \<one>\<^bsub>G i\<^esub>

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?i \<in> I \<Longrightarrow> \<one>\<^bsub>G ?i\<^esub> \<otimes>\<^bsub>G ?i\<^esub> \<one>\<^bsub>G ?i\<^esub> = \<one>\<^bsub>G ?i\<^esub>

goal (2 subgoals):
 1. trivial_group (product_group I G) \<Longrightarrow> \<forall>i\<in>I. trivial_group (G i)
 2. \<forall>i\<in>I. trivial_group (G i) \<Longrightarrow> trivial_group (product_group I G)
[PROOF STEP]
show ?rhs
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i\<in>I. trivial_group (G i)
[PROOF STEP]
using L
[PROOF STATE]
proof (prove)
using this:
trivial_group (product_group I G)

goal (1 subgoal):
 1. \<forall>i\<in>I. trivial_group (G i)
[PROOF STEP]
by (auto simp: trivial_group_def product_group_def PiE_eq_singleton intro: groupI)
[PROOF STATE]
proof (state)
this:
\<forall>i\<in>I. trivial_group (G i)

goal (1 subgoal):
 1. \<forall>i\<in>I. trivial_group (G i) \<Longrightarrow> trivial_group (product_group I G)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>i\<in>I. trivial_group (G i) \<Longrightarrow> trivial_group (product_group I G)
[PROOF STEP]
assume ?rhs
[PROOF STATE]
proof (state)
this:
\<forall>i\<in>I. trivial_group (G i)

goal (1 subgoal):
 1. \<forall>i\<in>I. trivial_group (G i) \<Longrightarrow> trivial_group (product_group I G)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>i\<in>I. trivial_group (G i)
[PROOF STEP]
show ?lhs
[PROOF STATE]
proof (prove)
using this:
\<forall>i\<in>I. trivial_group (G i)

goal (1 subgoal):
 1. trivial_group (product_group I G)
[PROOF STEP]
by (simp add: PiE_eq_singleton trivial_group_def)
[PROOF STATE]
proof (state)
this:
trivial_group (product_group I G)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma distinct_mset_eq:"distinct a \<Longrightarrow> mset a = mset b \<Longrightarrow> distinct b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>distinct a; mset a = mset b\<rbrakk> \<Longrightarrow> distinct b
[PROOF STEP]
by (metis card_distinct distinct_card set_mset_mset size_mset)


[STATEMENT]
lemma imbal_ins_Bal: "ins n d x t = Bal t' \<Longrightarrow>
 real(imbal (node tw t' y s)) - imbal (node tw t y s) \<le> 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ins n d x t = Bal t' \<Longrightarrow> real (imbal (node tw t' y s)) - real (imbal (node tw t y s)) \<le> 1
[PROOF STEP]
apply(drule ins_size)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. size t' = size t + 1 \<Longrightarrow> real (imbal (node tw t' y s)) - real (imbal (node tw t y s)) \<le> 1
[PROOF STEP]
apply(auto simp add: size1_size imbal.simps)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma retract_inverse: "x \<in> carrier \<X> \<Longrightarrow> \<pi>\<^sub>* (\<pi>\<^sup>* x) = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> carrier \<X> \<Longrightarrow> \<pi>\<^sub>* (\<pi>\<^sup>* x) = x
[PROOF STEP]
by (meson funcset_mem inflation is_order_A lower_closure partial_order.le_antisym retract_axioms retract_axioms_def retract_def upper_closure)


[STATEMENT]
lemma fromSingleton_simp: "(fromSingleton xs = Inr x) = ([x] = xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (fromSingleton xs = Inr x) = ([x] = xs)
[PROOF STEP]
by (cases xs rule: fromSingleton.cases, auto)


[STATEMENT]
lemma keysFor_parts_insert:
     "\<lbrakk> K \<in> keysFor (parts (insert X G));  X \<in> synth (analz H) \<rbrakk>
      \<Longrightarrow> K \<in> keysFor (parts (G \<union> H)) \<or> Key (invKey K) \<in> parts H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>K \<in> keysFor (parts (insert X G)); X \<in> synth (analz H)\<rbrakk> \<Longrightarrow> K \<in> keysFor (parts (G \<union> H)) \<or> Key (invKey K) \<in> parts H
[PROOF STEP]
by (force
    dest!: parts_insert_subset_Un [THEN keysFor_mono, THEN [2] rev_subsetD]
           analz_subset_parts [THEN keysFor_mono, THEN [2] rev_subsetD]
    intro: analz_subset_parts [THEN subsetD] parts_mono [THEN [2] rev_subsetD])


[STATEMENT]
lemma Cons_distinct_concat_map_function_distinct_on_all:
  "\<lbrakk>\<forall> x. distinct (g x) ; distinct xs\<rbrakk> \<Longrightarrow> distinct [x # y. x \<leftarrow> xs, y \<leftarrow> g x]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>x. distinct (g x); distinct xs\<rbrakk> \<Longrightarrow> distinct (concat (map (\<lambda>x. map ((#) x) (g x)) xs))
[PROOF STEP]
using Cons_distinct_concat_map_function
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<forall>x\<in>set ?xs. distinct (?g x); distinct ?xs\<rbrakk> \<Longrightarrow> distinct (concat (map (\<lambda>x. map ((#) x) (?g x)) ?xs))

goal (1 subgoal):
 1. \<lbrakk>\<forall>x. distinct (g x); distinct xs\<rbrakk> \<Longrightarrow> distinct (concat (map (\<lambda>x. map ((#) x) (g x)) xs))
[PROOF STEP]
by (metis (full_types))


[STATEMENT]
lemma monoE:
  assumes "mono\<^sub>a\<^sub>b f" and "x \<le>\<^sub>a y"
  obtains "f x \<le>\<^sub>b f y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f x \<le>\<^sub>b f y \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
mono\<^sub>a\<^sub>b f
x \<le>\<^sub>a y

goal (1 subgoal):
 1. (f x \<le>\<^sub>b f y \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding mono_def
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>UNIV. \<forall>y\<in>UNIV. x \<le>\<^sub>a y \<longrightarrow> f x \<le>\<^sub>b f y
x \<le>\<^sub>a y

goal (1 subgoal):
 1. (f x \<le>\<^sub>b f y \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by simp


[STATEMENT]
lemma fun_sum_commute_canc:
  assumes "\<And>x y. f (x + y) = f x + ((f y)::'a::cancel_comm_monoid_add)"
  shows "f (sum g A) = (\<Sum>a\<in>A. f (g a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f (sum g A) = (\<Sum>a\<in>A. f (g a))
[PROOF STEP]
by (rule fun_sum_commute, rule additive_implies_homogenous, fact+)