[STATEMENT]
lemma n_bool_lists_correct_aux:
  "length xs = x \<Longrightarrow> count_list xs True = n \<Longrightarrow> xs \<in> set (n_bool_lists n x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>length xs = x; count_list xs True = n\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n x)
[PROOF STEP]
proof(induct x arbitrary: n xs)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>n xs. \<lbrakk>length xs = 0; count_list xs True = n\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n 0)
 2. \<And>x n xs. \<lbrakk>\<And>n xs. \<lbrakk>length xs = x; count_list xs True = n\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n x); length xs = Suc x; count_list xs True = n\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:
length xs = 0
count_list xs True = n

goal (2 subgoals):
 1. \<And>n xs. \<lbrakk>length xs = 0; count_list xs True = n\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n 0)
 2. \<And>x n xs. \<lbrakk>\<And>n xs. \<lbrakk>length xs = x; count_list xs True = n\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n x); length xs = Suc x; count_list xs True = n\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
length xs = 0
count_list xs True = n
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
length xs = 0
count_list xs True = n

goal (1 subgoal):
 1. xs \<in> set (n_bool_lists n 0)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
xs \<in> set (n_bool_lists n 0)

goal (1 subgoal):
 1. \<And>x n xs. \<lbrakk>\<And>n xs. \<lbrakk>length xs = x; count_list xs True = n\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n x); length xs = Suc x; count_list xs True = n\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x n xs. \<lbrakk>\<And>n xs. \<lbrakk>length xs = x; count_list xs True = n\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n x); length xs = Suc x; count_list xs True = n\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
case (Suc x)
[PROOF STATE]
proof (state)
this:
\<lbrakk>length ?xs = x; count_list ?xs True = ?n\<rbrakk> \<Longrightarrow> ?xs \<in> set (n_bool_lists ?n x)
length xs = Suc x
count_list xs True = n

goal (1 subgoal):
 1. \<And>x n xs. \<lbrakk>\<And>n xs. \<lbrakk>length xs = x; count_list xs True = n\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n x); length xs = Suc x; count_list xs True = n\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
proof(cases "n = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. n = 0 \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
 2. n \<noteq> 0 \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
n = 0

goal (2 subgoals):
 1. n = 0 \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
 2. n \<noteq> 0 \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
n = 0

goal (1 subgoal):
 1. xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
using Suc True replicate_True_not_False
[PROOF STATE]
proof (prove)
using this:
n = 0
\<lbrakk>length ?xs = x; count_list ?xs True = ?n\<rbrakk> \<Longrightarrow> ?xs \<in> set (n_bool_lists ?n x)
length xs = Suc x
count_list xs True = n
n = 0
(count_list ?ys True = 0) = (?ys = replicate (length ?ys) False)

goal (1 subgoal):
 1. xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
xs \<in> set (n_bool_lists n (Suc x))

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
case c1: False
[PROOF STATE]
proof (state)
this:
n \<noteq> 0

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n \<noteq> 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
n \<noteq> 0

goal (1 subgoal):
 1. xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
proof(cases "n = Suc x")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>n \<noteq> 0; n = Suc x\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
 2. \<lbrakk>n \<noteq> 0; n \<noteq> Suc x\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
n = Suc x

goal (2 subgoals):
 1. \<lbrakk>n \<noteq> 0; n = Suc x\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
 2. \<lbrakk>n \<noteq> 0; n \<noteq> Suc x\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n = Suc x
[PROOF STEP]
have "xs = True # replicate x True "
[PROOF STATE]
proof (prove)
using this:
n = Suc x

goal (1 subgoal):
 1. xs = True # replicate x True
[PROOF STEP]
using Suc.prems count_list_length_replicate replicate_Suc
[PROOF STATE]
proof (prove)
using this:
n = Suc x
length xs = Suc x
count_list xs True = n
(count_list ?xs ?y = length ?xs) = (?xs = replicate (length ?xs) ?y)
replicate (Suc ?n) ?x = ?x # replicate ?n ?x

goal (1 subgoal):
 1. xs = True # replicate x True
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
xs = True # replicate x True

goal (2 subgoals):
 1. \<lbrakk>n \<noteq> 0; n = Suc x\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
 2. \<lbrakk>n \<noteq> 0; n \<noteq> Suc x\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
xs = True # replicate x True
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
xs = True # replicate x True

goal (1 subgoal):
 1. xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
using True
[PROOF STATE]
proof (prove)
using this:
xs = True # replicate x True
n = Suc x

goal (1 subgoal):
 1. xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
xs \<in> set (n_bool_lists n (Suc x))

goal (1 subgoal):
 1. \<lbrakk>n \<noteq> 0; n \<noteq> Suc x\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>n \<noteq> 0; n \<noteq> Suc x\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
case c2: False
[PROOF STATE]
proof (state)
this:
n \<noteq> Suc x

goal (1 subgoal):
 1. \<lbrakk>n \<noteq> 0; n \<noteq> Suc x\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n \<noteq> Suc x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
n \<noteq> Suc x

goal (1 subgoal):
 1. xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
proof(cases "n > x")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>n \<noteq> Suc x; x < n\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
 2. \<lbrakk>n \<noteq> Suc x; \<not> x < n\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
x < n

goal (2 subgoals):
 1. \<lbrakk>n \<noteq> Suc x; x < n\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
 2. \<lbrakk>n \<noteq> Suc x; \<not> x < n\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x < n
[PROOF STEP]
have "xs = []"
[PROOF STATE]
proof (prove)
using this:
x < n

goal (1 subgoal):
 1. xs = []
[PROOF STEP]
using Suc.prems c2 count_le_length
[PROOF STATE]
proof (prove)
using this:
x < n
length xs = Suc x
count_list xs True = n
n \<noteq> Suc x
count_list ?xs ?x \<le> length ?xs

goal (1 subgoal):
 1. xs = []
[PROOF STEP]
by (metis Suc_lessI linorder_not_less)
[PROOF STATE]
proof (state)
this:
xs = []

goal (2 subgoals):
 1. \<lbrakk>n \<noteq> Suc x; x < n\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
 2. \<lbrakk>n \<noteq> Suc x; \<not> x < n\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
xs = []
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
xs = []

goal (1 subgoal):
 1. xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
using Suc
[PROOF STATE]
proof (prove)
using this:
xs = []
\<lbrakk>length ?xs = x; count_list ?xs True = ?n\<rbrakk> \<Longrightarrow> ?xs \<in> set (n_bool_lists ?n x)
length xs = Suc x
count_list xs True = n

goal (1 subgoal):
 1. xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
xs \<in> set (n_bool_lists n (Suc x))

goal (1 subgoal):
 1. \<lbrakk>n \<noteq> Suc x; \<not> x < n\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>n \<noteq> Suc x; \<not> x < n\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
case c3: False
[PROOF STATE]
proof (state)
this:
\<not> x < n

goal (1 subgoal):
 1. \<lbrakk>n \<noteq> Suc x; \<not> x < n\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> x < n
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<not> x < n

goal (1 subgoal):
 1. xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
proof (cases xs)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>\<not> x < n; xs = []\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
 2. \<And>a list. \<lbrakk>\<not> x < n; xs = a # list\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:
xs = []

goal (2 subgoals):
 1. \<lbrakk>\<not> x < n; xs = []\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
 2. \<And>a list. \<lbrakk>\<not> x < n; xs = a # list\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
xs = []
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
xs = []

goal (1 subgoal):
 1. xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
using Suc.prems(1)
[PROOF STATE]
proof (prove)
using this:
xs = []
length xs = Suc x

goal (1 subgoal):
 1. xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
xs \<in> set (n_bool_lists n (Suc x))

goal (1 subgoal):
 1. \<And>a list. \<lbrakk>\<not> x < n; xs = a # list\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a list. \<lbrakk>\<not> x < n; xs = a # list\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
case (Cons y ys)
[PROOF STATE]
proof (state)
this:
xs = y # ys

goal (1 subgoal):
 1. \<And>a list. \<lbrakk>\<not> x < n; xs = a # list\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
xs = y # ys
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
xs = y # ys

goal (1 subgoal):
 1. xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
proof (cases y)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>xs = y # ys; y\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
 2. \<lbrakk>xs = y # ys; \<not> y\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
y

goal (2 subgoals):
 1. \<lbrakk>xs = y # ys; y\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
 2. \<lbrakk>xs = y # ys; \<not> y\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
y
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
y

goal (1 subgoal):
 1. xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
using Suc c1 c2 c3 Cons
[PROOF STATE]
proof (prove)
using this:
y
\<lbrakk>length ?xs = x; count_list ?xs True = ?n\<rbrakk> \<Longrightarrow> ?xs \<in> set (n_bool_lists ?n x)
length xs = Suc x
count_list xs True = n
n \<noteq> 0
n \<noteq> Suc x
\<not> x < n
xs = y # ys

goal (1 subgoal):
 1. xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
xs \<in> set (n_bool_lists n (Suc x))

goal (1 subgoal):
 1. \<lbrakk>xs = y # ys; \<not> y\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>xs = y # ys; \<not> y\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> y

goal (1 subgoal):
 1. \<lbrakk>xs = y # ys; \<not> y\<rbrakk> \<Longrightarrow> xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> y
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<not> y

goal (1 subgoal):
 1. xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
using Suc c1 c2 c3 Cons
[PROOF STATE]
proof (prove)
using this:
\<not> y
\<lbrakk>length ?xs = x; count_list ?xs True = ?n\<rbrakk> \<Longrightarrow> ?xs \<in> set (n_bool_lists ?n x)
length xs = Suc x
count_list xs True = n
n \<noteq> 0
n \<noteq> Suc x
\<not> x < n
xs = y # ys

goal (1 subgoal):
 1. xs \<in> set (n_bool_lists n (Suc x))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
xs \<in> set (n_bool_lists n (Suc x))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
xs \<in> set (n_bool_lists n (Suc x))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
xs \<in> set (n_bool_lists n (Suc x))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
xs \<in> set (n_bool_lists n (Suc x))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
xs \<in> set (n_bool_lists n (Suc x))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
xs \<in> set (n_bool_lists n (Suc x))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma tendsto_add_zero:
  fixes f g :: "_ \<Rightarrow> 'b::topological_monoid_add"
  shows "(f \<longlongrightarrow> 0) F \<Longrightarrow> (g \<longlongrightarrow> 0) F \<Longrightarrow> ((\<lambda>x. f x + g x) \<longlongrightarrow> 0) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(f \<longlongrightarrow> (0::'b)) F; (g \<longlongrightarrow> (0::'b)) F\<rbrakk> \<Longrightarrow> ((\<lambda>x. f x + g x) \<longlongrightarrow> (0::'b)) F
[PROOF STEP]
by (drule (1) tendsto_add) simp


[STATEMENT]
lemma ex_complex_to_complex [simp]:
  fixes z1 z2 :: complex
  assumes "z1 \<noteq> 0" and "z2 \<noteq> 0"
  shows "\<exists>k. k \<noteq> 0 \<and> z2 = k * z1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>k. k \<noteq> 0 \<and> z2 = k * z1
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
z1 \<noteq> 0
z2 \<noteq> 0

goal (1 subgoal):
 1. \<exists>k. k \<noteq> 0 \<and> z2 = k * z1
[PROOF STEP]
by (rule_tac x="z2/z1" in exI) simp


[STATEMENT]
lemma squarefree_of_int_polyI:
  assumes "squarefree p" "content p = 1"
  shows   "squarefree (of_int_poly p :: 'a :: {field_char_0,field_gcd} poly)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. squarefree (of_int_poly p)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. squarefree (of_int_poly p)
[PROOF STEP]
have "Rings.coprime p (pderiv p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. algebraic_semidom_class.coprime p (pderiv p)
[PROOF STEP]
by (rule squarefree_imp_coprime_pderiv) fact+
[PROOF STATE]
proof (state)
this:
algebraic_semidom_class.coprime p (pderiv p)

goal (1 subgoal):
 1. squarefree (of_int_poly p)
[PROOF STEP]
hence "Rings.coprime (of_int_poly p :: 'a poly) (of_int_poly (pderiv p))"
[PROOF STATE]
proof (prove)
using this:
algebraic_semidom_class.coprime p (pderiv p)

goal (1 subgoal):
 1. algebraic_semidom_class.coprime (of_int_poly p) (of_int_poly (pderiv p))
[PROOF STEP]
by (rule coprime_of_int_polyI)
[PROOF STATE]
proof (state)
this:
algebraic_semidom_class.coprime (of_int_poly p) (of_int_poly (pderiv p))

goal (1 subgoal):
 1. squarefree (of_int_poly p)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
algebraic_semidom_class.coprime (of_int_poly p) (of_int_poly (pderiv p))

goal (1 subgoal):
 1. squarefree (of_int_poly p)
[PROOF STEP]
have "of_int_poly (pderiv p) = pderiv (of_int_poly p :: 'a poly)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_int_poly (pderiv p) = pderiv (of_int_poly p)
[PROOF STEP]
by (simp add: of_int_hom.map_poly_pderiv)
[PROOF STATE]
proof (state)
this:
of_int_poly (pderiv p) = pderiv (of_int_poly p)

goal (1 subgoal):
 1. squarefree (of_int_poly p)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
algebraic_semidom_class.coprime (of_int_poly p) (pderiv (of_int_poly p))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
algebraic_semidom_class.coprime (of_int_poly p) (pderiv (of_int_poly p))

goal (1 subgoal):
 1. squarefree (of_int_poly p)
[PROOF STEP]
using coprime_pderiv_imp_squarefree
[PROOF STATE]
proof (prove)
using this:
algebraic_semidom_class.coprime (of_int_poly p) (pderiv (of_int_poly p))
algebraic_semidom_class.coprime ?p (pderiv ?p) \<Longrightarrow> squarefree ?p

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Max_eq_length_takeWhile:
  \<open>Max {m. P m} = n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<n])))\<close>
  if *: \<open>\<And>m. P m \<Longrightarrow> m < n\<close> and \<open>\<exists>m. P m\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Max {m. P m} = n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<n])))
[PROOF STEP]
using *
[PROOF STATE]
proof (prove)
using this:
P ?m \<Longrightarrow> ?m < n

goal (1 subgoal):
 1. Max {m. P m} = n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<n])))
[PROOF STEP]
proof (induction n)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<And>m. P m \<Longrightarrow> m < 0) \<Longrightarrow> Max (Collect P) = 0 - Suc (length (takeWhile (Not \<circ> P) (rev [0..<0])))
 2. \<And>n. \<lbrakk>(\<And>m. P m \<Longrightarrow> m < n) \<Longrightarrow> Max (Collect P) = n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<n]))); \<And>m. P m \<Longrightarrow> m < Suc n\<rbrakk> \<Longrightarrow> Max (Collect P) = Suc n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<Suc n])))
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:
P ?m \<Longrightarrow> ?m < 0

goal (2 subgoals):
 1. (\<And>m. P m \<Longrightarrow> m < 0) \<Longrightarrow> Max (Collect P) = 0 - Suc (length (takeWhile (Not \<circ> P) (rev [0..<0])))
 2. \<And>n. \<lbrakk>(\<And>m. P m \<Longrightarrow> m < n) \<Longrightarrow> Max (Collect P) = n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<n]))); \<And>m. P m \<Longrightarrow> m < Suc n\<rbrakk> \<Longrightarrow> Max (Collect P) = Suc n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<Suc n])))
[PROOF STEP]
with \<open>\<exists>m. P m\<close>
[PROOF STATE]
proof (chain)
picking this:
\<exists>m. P m
P ?m \<Longrightarrow> ?m < 0
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<exists>m. P m
P ?m \<Longrightarrow> ?m < 0

goal (1 subgoal):
 1. Max {a. P a} = 0 - Suc (length (takeWhile (Not \<circ> P) (rev [0..<0])))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Max {a. P a} = 0 - Suc (length (takeWhile (Not \<circ> P) (rev [0..<0])))

goal (1 subgoal):
 1. \<And>n. \<lbrakk>(\<And>m. P m \<Longrightarrow> m < n) \<Longrightarrow> Max (Collect P) = n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<n]))); \<And>m. P m \<Longrightarrow> m < Suc n\<rbrakk> \<Longrightarrow> Max (Collect P) = Suc n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<Suc n])))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. \<lbrakk>(\<And>m. P m \<Longrightarrow> m < n) \<Longrightarrow> Max (Collect P) = n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<n]))); \<And>m. P m \<Longrightarrow> m < Suc n\<rbrakk> \<Longrightarrow> Max (Collect P) = Suc n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<Suc n])))
[PROOF STEP]
case (Suc n)
[PROOF STATE]
proof (state)
this:
(\<And>m. P m \<Longrightarrow> m < n) \<Longrightarrow> Max {a. P a} = n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<n])))
P ?m \<Longrightarrow> ?m < Suc n

goal (1 subgoal):
 1. \<And>n. \<lbrakk>(\<And>m. P m \<Longrightarrow> m < n) \<Longrightarrow> Max (Collect P) = n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<n]))); \<And>m. P m \<Longrightarrow> m < Suc n\<rbrakk> \<Longrightarrow> Max (Collect P) = Suc n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<Suc n])))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Max {a. P a} = Suc n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<Suc n])))
[PROOF STEP]
proof (cases \<open>P n\<close>)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. P n \<Longrightarrow> Max {a. P a} = Suc n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<Suc n])))
 2. \<not> P n \<Longrightarrow> Max {a. P a} = Suc n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<Suc n])))
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> P n

goal (2 subgoals):
 1. P n \<Longrightarrow> Max {a. P a} = Suc n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<Suc n])))
 2. \<not> P n \<Longrightarrow> Max {a. P a} = Suc n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<Suc n])))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> P n
[PROOF STEP]
have \<open>m < n\<close> if \<open>P m\<close> for m
[PROOF STATE]
proof (prove)
using this:
\<not> P n

goal (1 subgoal):
 1. m < n
[PROOF STEP]
using that Suc.prems [of m]
[PROOF STATE]
proof (prove)
using this:
\<not> P n
P m
P m \<Longrightarrow> m < Suc n

goal (1 subgoal):
 1. m < n
[PROOF STEP]
by (auto simp add: less_le)
[PROOF STATE]
proof (state)
this:
P ?m \<Longrightarrow> ?m < n

goal (2 subgoals):
 1. P n \<Longrightarrow> Max {a. P a} = Suc n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<Suc n])))
 2. \<not> P n \<Longrightarrow> Max {a. P a} = Suc n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<Suc n])))
[PROOF STEP]
with Suc.IH
[PROOF STATE]
proof (chain)
picking this:
(\<And>m. P m \<Longrightarrow> m < n) \<Longrightarrow> Max {a. P a} = n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<n])))
P ?m \<Longrightarrow> ?m < n
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<And>m. P m \<Longrightarrow> m < n) \<Longrightarrow> Max {a. P a} = n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<n])))
P ?m \<Longrightarrow> ?m < n

goal (1 subgoal):
 1. Max {a. P a} = Suc n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<Suc n])))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Max {a. P a} = Suc n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<Suc n])))

goal (1 subgoal):
 1. P n \<Longrightarrow> Max {a. P a} = Suc n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<Suc n])))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. P n \<Longrightarrow> Max {a. P a} = Suc n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<Suc n])))
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
P n

goal (1 subgoal):
 1. P n \<Longrightarrow> Max {a. P a} = Suc n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<Suc n])))
[PROOF STEP]
have \<open>{a. P a} \<subseteq> {0..n}\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {a. P a} \<subseteq> {0..n}
[PROOF STEP]
using Suc.prems
[PROOF STATE]
proof (prove)
using this:
P ?m \<Longrightarrow> ?m < Suc n

goal (1 subgoal):
 1. {a. P a} \<subseteq> {0..n}
[PROOF STEP]
by (auto simp add: less_Suc_eq_le)
[PROOF STATE]
proof (state)
this:
{a. P a} \<subseteq> {0..n}

goal (1 subgoal):
 1. P n \<Longrightarrow> Max {a. P a} = Suc n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<Suc n])))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
{a. P a} \<subseteq> {0..n}

goal (1 subgoal):
 1. P n \<Longrightarrow> Max {a. P a} = Suc n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<Suc n])))
[PROOF STEP]
have \<open>finite {0..n}\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {0..n}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
finite {0..n}

goal (1 subgoal):
 1. P n \<Longrightarrow> Max {a. P a} = Suc n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<Suc n])))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
{a. P a} \<subseteq> {0..n}
finite {0..n}
[PROOF STEP]
have \<open>finite {a. P a}\<close>
[PROOF STATE]
proof (prove)
using this:
{a. P a} \<subseteq> {0..n}
finite {0..n}

goal (1 subgoal):
 1. finite {a. P a}
[PROOF STEP]
by (rule finite_subset)
[PROOF STATE]
proof (state)
this:
finite {a. P a}

goal (1 subgoal):
 1. P n \<Longrightarrow> Max {a. P a} = Suc n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<Suc n])))
[PROOF STEP]
with \<open>P n\<close> Suc.prems
[PROOF STATE]
proof (chain)
picking this:
P n
P ?m \<Longrightarrow> ?m < Suc n
finite {a. P a}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P n
P ?m \<Longrightarrow> ?m < Suc n
finite {a. P a}

goal (1 subgoal):
 1. Max {a. P a} = Suc n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<Suc n])))
[PROOF STEP]
by (auto intro: Max_eqI simp add: less_Suc_eq_le)
[PROOF STATE]
proof (state)
this:
Max {a. P a} = Suc n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<Suc n])))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Max {a. P a} = Suc n - Suc (length (takeWhile (Not \<circ> P) (rev [0..<Suc n])))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lcoset_relI: "-x+y \<in> A \<Longrightarrow> (x,y) \<in> lcoset_rel A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - x + y \<in> A \<Longrightarrow> (x, y) \<in> lcoset_rel A
[PROOF STEP]
using lcoset_rel_def
[PROOF STATE]
proof (prove)
using this:
lcoset_rel ?A \<equiv> {(x, y). - x + y \<in> ?A}

goal (1 subgoal):
 1. - x + y \<in> A \<Longrightarrow> (x, y) \<in> lcoset_rel A
[PROOF STEP]
by fast


[STATEMENT]
lemma sup_continuous_ereal_of_enat[order_continuous_intros]:
  assumes f: "sup_continuous f" shows "sup_continuous (\<lambda>x. ereal_of_enat (f x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sup_continuous (\<lambda>x. ereal_of_enat (f x))
[PROOF STEP]
by (rule sup_continuous_compose[OF _ f])
     (auto simp: sup_continuous_def ereal_of_enat_SUP)


[STATEMENT]
lemma frontier_of_disjoint_eq:
  assumes "S \<subseteq> topspace X"
  shows "((X frontier_of S) \<inter> S = {} \<longleftrightarrow> openin X S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (X frontier_of S \<inter> S = {}) = openin X S
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. X frontier_of S \<inter> S = {} \<Longrightarrow> openin X S
 2. openin X S \<Longrightarrow> X frontier_of S \<inter> S = {}
[PROOF STEP]
assume "X frontier_of S \<inter> S = {}"
[PROOF STATE]
proof (state)
this:
X frontier_of S \<inter> S = {}

goal (2 subgoals):
 1. X frontier_of S \<inter> S = {} \<Longrightarrow> openin X S
 2. openin X S \<Longrightarrow> X frontier_of S \<inter> S = {}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
X frontier_of S \<inter> S = {}
[PROOF STEP]
have "closedin X (topspace X - S)"
[PROOF STATE]
proof (prove)
using this:
X frontier_of S \<inter> S = {}

goal (1 subgoal):
 1. closedin X (topspace X - S)
[PROOF STEP]
using assms closure_of_subset frontier_of_def interior_of_eq interior_of_subset
[PROOF STATE]
proof (prove)
using this:
X frontier_of S \<inter> S = {}
S \<subseteq> topspace X
?S \<subseteq> topspace ?X \<Longrightarrow> ?S \<subseteq> ?X closure_of ?S
?X frontier_of ?S \<equiv> ?X closure_of ?S - ?X interior_of ?S
(?X interior_of ?S = ?S) = openin ?X ?S
?X interior_of ?S \<subseteq> ?S

goal (1 subgoal):
 1. closedin X (topspace X - S)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
closedin X (topspace X - S)

goal (2 subgoals):
 1. X frontier_of S \<inter> S = {} \<Longrightarrow> openin X S
 2. openin X S \<Longrightarrow> X frontier_of S \<inter> S = {}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
closedin X (topspace X - S)
[PROOF STEP]
show "openin X S"
[PROOF STATE]
proof (prove)
using this:
closedin X (topspace X - S)

goal (1 subgoal):
 1. openin X S
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
closedin X (topspace X - S)
S \<subseteq> topspace X

goal (1 subgoal):
 1. openin X S
[PROOF STEP]
by (simp add: openin_closedin)
[PROOF STATE]
proof (state)
this:
openin X S

goal (1 subgoal):
 1. openin X S \<Longrightarrow> X frontier_of S \<inter> S = {}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. openin X S \<Longrightarrow> X frontier_of S \<inter> S = {}
[PROOF STEP]
show "openin X S \<Longrightarrow> X frontier_of S \<inter> S = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. openin X S \<Longrightarrow> X frontier_of S \<inter> S = {}
[PROOF STEP]
by (simp add: Diff_Diff_Int closedin_def frontier_of_openin inf.absorb_iff2 inf_commute)
[PROOF STATE]
proof (state)
this:
openin X S \<Longrightarrow> X frontier_of S \<inter> S = {}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma FunctorId:
  assumes "Ftor F : C \<longrightarrow> D" and "X \<in> Obj C"
  shows "F ## (Id C X) = Id D (F @@ X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F ## id\<^bsub>C\<^esub> X = id\<^bsub>D\<^esub> (F @@ X)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. F ## id\<^bsub>C\<^esub> X = id\<^bsub>D\<^esub> (F @@ X)
[PROOF STEP]
have "CatDom F = C" and "CatCod F = D" and "PreFunctor F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. CatDom F = C &&& CatCod F = D &&& PreFunctor F
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
Ftor F : C \<longrightarrow> D
X \<in> obj\<^bsub>C\<^esub>

goal (1 subgoal):
 1. CatDom F = C &&& CatCod F = D &&& PreFunctor F
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
CatDom F = C
CatCod F = D
PreFunctor F

goal (1 subgoal):
 1. F ## id\<^bsub>C\<^esub> X = id\<^bsub>D\<^esub> (F @@ X)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
CatDom F = C
CatCod F = D
PreFunctor F

goal (1 subgoal):
 1. F ## id\<^bsub>C\<^esub> X = id\<^bsub>D\<^esub> (F @@ X)
[PROOF STEP]
using assms PreFunctor.FunctorId2[of F X]
[PROOF STATE]
proof (prove)
using this:
CatDom F = C
CatCod F = D
PreFunctor F
Ftor F : C \<longrightarrow> D
X \<in> obj\<^bsub>C\<^esub>
\<lbrakk>PreFunctor F; X \<in> obj\<^bsub>CatDom F\<^esub>\<rbrakk> \<Longrightarrow> F @@ X \<in> obj\<^bsub>CatCod F\<^esub> \<and> F ## id\<^bsub>CatDom F\<^esub> X = id\<^bsub>CatCod F\<^esub> (F @@ X)

goal (1 subgoal):
 1. F ## id\<^bsub>C\<^esub> X = id\<^bsub>D\<^esub> (F @@ X)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
F ## id\<^bsub>C\<^esub> X = id\<^bsub>D\<^esub> (F @@ X)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma eventually_laplace_integrand_le:
  "\<forall>\<^sub>F t in at_top. cmod (laplace_integrand s t) \<le> M * exp (- (Re s - c) * t)"
  if "exponential_order M c f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F t in at_top. cmod (local.laplace_integrand s t) \<le> M * exp (- (Re s - c) * t)
[PROOF STEP]
using exponential_orderD(2)[OF that]
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F t in at_top. cmod (f t) \<le> M * exp (c * t)

goal (1 subgoal):
 1. \<forall>\<^sub>F t in at_top. cmod (local.laplace_integrand s t) \<le> M * exp (- (Re s - c) * t)
[PROOF STEP]
proof (eventually_elim)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>t. cmod (f t) \<le> M * exp (c * t) \<Longrightarrow> cmod (local.laplace_integrand s t) \<le> M * exp (- (Re s - c) * t)
[PROOF STEP]
case (elim t)
[PROOF STATE]
proof (state)
this:
cmod (f t) \<le> M * exp (c * t)

goal (1 subgoal):
 1. \<And>t. cmod (f t) \<le> M * exp (c * t) \<Longrightarrow> cmod (local.laplace_integrand s t) \<le> M * exp (- (Re s - c) * t)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmod (local.laplace_integrand s t) \<le> M * exp (- (Re s - c) * t)
[PROOF STEP]
unfolding laplace_integrand_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmod (exp (t *\<^sub>R - s) * f t) \<le> M * exp (- (Re s - c) * t)
[PROOF STEP]
apply (rule norm_mult_ineq[THEN order_trans])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmod (exp (t *\<^sub>R - s)) * cmod (f t) \<le> M * exp (- (Re s - c) * t)
[PROOF STEP]
apply (auto intro!: mult_left_mono[THEN order_trans, OF elim])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. exp (- (t * Re s)) * (M * exp (c * t)) \<le> M * exp ((c - Re s) * t)
[PROOF STEP]
apply (auto simp: exp_minus divide_simps algebra_simps exp_add[symmetric])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
cmod (local.laplace_integrand s t) \<le> M * exp (- (Re s - c) * t)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma beukers_integral3_integrand_bound:
  fixes x y z :: real
  assumes xyz: "x \<in> {0<..<1}" "y \<in> {0<..<1}" "z \<in> {0<..<1}"
  shows   "(x*(1-x)*y*(1-y)*z*(1-z)) / (1-(1-x*y)*z) \<le> 1 / 27" (is "?lhs \<le> _")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x * (1 - x) * y * (1 - y) * z * (1 - z) / (1 - (1 - x * y) * z) \<le> 1 / 27
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x * (1 - x) * y * (1 - y) * z * (1 - z) / (1 - (1 - x * y) * z) \<le> 1 / 27
[PROOF STEP]
have ineq1: "x * (1 - x) \<le> 1 / 4" if x: "x \<in> {0..1}" for x :: real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x * (1 - x) \<le> 1 / 4
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x * (1 - x) \<le> 1 / 4
[PROOF STEP]
have "x * (1 - x) - 1 / 4 = -((x - 1 / 2) ^ 2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x * (1 - x) - 1 / 4 = - (x - 1 / 2)\<^sup>2
[PROOF STEP]
by (simp add: algebra_simps power2_eq_square)
[PROOF STATE]
proof (state)
this:
x * (1 - x) - 1 / 4 = - (x - 1 / 2)\<^sup>2

goal (1 subgoal):
 1. x * (1 - x) \<le> 1 / 4
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x * (1 - x) - 1 / 4 = - (x - 1 / 2)\<^sup>2

goal (1 subgoal):
 1. x * (1 - x) \<le> 1 / 4
[PROOF STEP]
have "\<dots> \<le> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - (x - 1 / 2)\<^sup>2 \<le> 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
- (x - 1 / 2)\<^sup>2 \<le> 0

goal (1 subgoal):
 1. x * (1 - x) \<le> 1 / 4
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
x * (1 - x) - 1 / 4 \<le> 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x * (1 - x) - 1 / 4 \<le> 0

goal (1 subgoal):
 1. x * (1 - x) \<le> 1 / 4
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x * (1 - x) \<le> 1 / 4

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?x \<in> {0..1} \<Longrightarrow> ?x * (1 - ?x) \<le> 1 / 4

goal (1 subgoal):
 1. x * (1 - x) * y * (1 - y) * z * (1 - z) / (1 - (1 - x * y) * z) \<le> 1 / 27
[PROOF STEP]
have ineq2: "x * (1 - x) ^ 2 \<le> 4 / 27" if x: "x \<in> {0..1}" for x :: real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x * (1 - x)\<^sup>2 \<le> 4 / 27
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x * (1 - x)\<^sup>2 \<le> 4 / 27
[PROOF STEP]
have "x * (1 - x) ^ 2 - 4 / 27 = (x - 4 / 3) * (x - 1 / 3) ^ 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x * (1 - x)\<^sup>2 - 4 / 27 = (x - 4 / 3) * (x - 1 / 3)\<^sup>2
[PROOF STEP]
by (simp add: algebra_simps power2_eq_square)
[PROOF STATE]
proof (state)
this:
x * (1 - x)\<^sup>2 - 4 / 27 = (x - 4 / 3) * (x - 1 / 3)\<^sup>2

goal (1 subgoal):
 1. x * (1 - x)\<^sup>2 \<le> 4 / 27
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x * (1 - x)\<^sup>2 - 4 / 27 = (x - 4 / 3) * (x - 1 / 3)\<^sup>2

goal (1 subgoal):
 1. x * (1 - x)\<^sup>2 \<le> 4 / 27
[PROOF STEP]
have "\<dots> \<le> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x - 4 / 3) * (x - 1 / 3)\<^sup>2 \<le> 0
[PROOF STEP]
by (rule mult_nonpos_nonneg) (use x in auto)
[PROOF STATE]
proof (state)
this:
(x - 4 / 3) * (x - 1 / 3)\<^sup>2 \<le> 0

goal (1 subgoal):
 1. x * (1 - x)\<^sup>2 \<le> 4 / 27
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
x * (1 - x)\<^sup>2 - 4 / 27 \<le> 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x * (1 - x)\<^sup>2 - 4 / 27 \<le> 0

goal (1 subgoal):
 1. x * (1 - x)\<^sup>2 \<le> 4 / 27
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x * (1 - x)\<^sup>2 \<le> 4 / 27

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?x \<in> {0..1} \<Longrightarrow> ?x * (1 - ?x)\<^sup>2 \<le> 4 / 27

goal (1 subgoal):
 1. x * (1 - x) * y * (1 - y) * z * (1 - z) / (1 - (1 - x * y) * z) \<le> 1 / 27
[PROOF STEP]
have "1 - (1-x*y)*z = (1 - z) + x * y * z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 - (1 - x * y) * z = 1 - z + x * y * z
[PROOF STEP]
by (simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
1 - (1 - x * y) * z = 1 - z + x * y * z

goal (1 subgoal):
 1. x * (1 - x) * y * (1 - y) * z * (1 - z) / (1 - (1 - x * y) * z) \<le> 1 / 27
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
1 - (1 - x * y) * z = 1 - z + x * y * z

goal (1 subgoal):
 1. x * (1 - x) * y * (1 - y) * z * (1 - z) / (1 - (1 - x * y) * z) \<le> 1 / 27
[PROOF STEP]
have "\<dots> \<ge> 2 * sqrt (1 - z) * sqrt x * sqrt y * sqrt z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 * sqrt (1 - z) * sqrt x * sqrt y * sqrt z \<le> 1 - z + x * y * z
[PROOF STEP]
using arith_geo_mean_sqrt[of "1 - z" "x * y * z"] xyz
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 \<le> 1 - z; 0 \<le> x * y * z\<rbrakk> \<Longrightarrow> sqrt ((1 - z) * (x * y * z)) \<le> (1 - z + x * y * z) / 2
x \<in> {0<..<1}
y \<in> {0<..<1}
z \<in> {0<..<1}

goal (1 subgoal):
 1. 2 * sqrt (1 - z) * sqrt x * sqrt y * sqrt z \<le> 1 - z + x * y * z
[PROOF STEP]
by (auto simp: real_sqrt_mult)
[PROOF STATE]
proof (state)
this:
2 * sqrt (1 - z) * sqrt x * sqrt y * sqrt z \<le> 1 - z + x * y * z

goal (1 subgoal):
 1. x * (1 - x) * y * (1 - y) * z * (1 - z) / (1 - (1 - x * y) * z) \<le> 1 / 27
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
2 * sqrt (1 - z) * sqrt x * sqrt y * sqrt z \<le> 1 - (1 - x * y) * z
[PROOF STEP]
have *: "?lhs \<le> (x*(1-x)*y*(1-y)*z*(1-z)) / (2 * sqrt (1 - z) * sqrt x * sqrt y * sqrt z)"
[PROOF STATE]
proof (prove)
using this:
2 * sqrt (1 - z) * sqrt x * sqrt y * sqrt z \<le> 1 - (1 - x * y) * z

goal (1 subgoal):
 1. x * (1 - x) * y * (1 - y) * z * (1 - z) / (1 - (1 - x * y) * z) \<le> x * (1 - x) * y * (1 - y) * z * (1 - z) / (2 * sqrt (1 - z) * sqrt x * sqrt y * sqrt z)
[PROOF STEP]
using xyz beukers_denom_ineq[of x y z]
[PROOF STATE]
proof (prove)
using this:
2 * sqrt (1 - z) * sqrt x * sqrt y * sqrt z \<le> 1 - (1 - x * y) * z
x \<in> {0<..<1}
y \<in> {0<..<1}
z \<in> {0<..<1}
\<lbrakk>x \<in> {0<..<1}; y \<in> {0<..<1}; z \<in> {0..1}\<rbrakk> \<Longrightarrow> (1 - x * y) * z < 1

goal (1 subgoal):
 1. x * (1 - x) * y * (1 - y) * z * (1 - z) / (1 - (1 - x * y) * z) \<le> x * (1 - x) * y * (1 - y) * z * (1 - z) / (2 * sqrt (1 - z) * sqrt x * sqrt y * sqrt z)
[PROOF STEP]
by (intro divide_left_mono mult_nonneg_nonneg mult_pos_pos) auto
[PROOF STATE]
proof (state)
this:
x * (1 - x) * y * (1 - y) * z * (1 - z) / (1 - (1 - x * y) * z) \<le> x * (1 - x) * y * (1 - y) * z * (1 - z) / (2 * sqrt (1 - z) * sqrt x * sqrt y * sqrt z)

goal (1 subgoal):
 1. x * (1 - x) * y * (1 - y) * z * (1 - z) / (1 - (1 - x * y) * z) \<le> 1 / 27
[PROOF STEP]
have "(x*(1-x)*y*(1-y)*z*(1-z)) = (sqrt x * sqrt x * (1-x) * sqrt y * sqrt y *
               (1-y) * sqrt z * sqrt z * sqrt (1-z) * sqrt (1-z))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x * (1 - x) * y * (1 - y) * z * (1 - z) = sqrt x * sqrt x * (1 - x) * sqrt y * sqrt y * (1 - y) * sqrt z * sqrt z * sqrt (1 - z) * sqrt (1 - z)
[PROOF STEP]
using xyz
[PROOF STATE]
proof (prove)
using this:
x \<in> {0<..<1}
y \<in> {0<..<1}
z \<in> {0<..<1}

goal (1 subgoal):
 1. x * (1 - x) * y * (1 - y) * z * (1 - z) = sqrt x * sqrt x * (1 - x) * sqrt y * sqrt y * (1 - y) * sqrt z * sqrt z * sqrt (1 - z) * sqrt (1 - z)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x * (1 - x) * y * (1 - y) * z * (1 - z) = sqrt x * sqrt x * (1 - x) * sqrt y * sqrt y * (1 - y) * sqrt z * sqrt z * sqrt (1 - z) * sqrt (1 - z)

goal (1 subgoal):
 1. x * (1 - x) * y * (1 - y) * z * (1 - z) / (1 - (1 - x * y) * z) \<le> 1 / 27
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x * (1 - x) * y * (1 - y) * z * (1 - z) = sqrt x * sqrt x * (1 - x) * sqrt y * sqrt y * (1 - y) * sqrt z * sqrt z * sqrt (1 - z) * sqrt (1 - z)

goal (1 subgoal):
 1. x * (1 - x) * y * (1 - y) * z * (1 - z) / (1 - (1 - x * y) * z) \<le> 1 / 27
[PROOF STEP]
have "\<dots> / (2 * sqrt (1 - z) * sqrt x * sqrt y * sqrt z) =
               sqrt (x * (1 - x) ^ 2) * sqrt (y * (1 - y) ^ 2) * sqrt (z * (1 - z)) / 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sqrt x * sqrt x * (1 - x) * sqrt y * sqrt y * (1 - y) * sqrt z * sqrt z * sqrt (1 - z) * sqrt (1 - z) / (2 * sqrt (1 - z) * sqrt x * sqrt y * sqrt z) = sqrt (x * (1 - x)\<^sup>2) * sqrt (y * (1 - y)\<^sup>2) * sqrt (z * (1 - z)) / 2
[PROOF STEP]
using xyz
[PROOF STATE]
proof (prove)
using this:
x \<in> {0<..<1}
y \<in> {0<..<1}
z \<in> {0<..<1}

goal (1 subgoal):
 1. sqrt x * sqrt x * (1 - x) * sqrt y * sqrt y * (1 - y) * sqrt z * sqrt z * sqrt (1 - z) * sqrt (1 - z) / (2 * sqrt (1 - z) * sqrt x * sqrt y * sqrt z) = sqrt (x * (1 - x)\<^sup>2) * sqrt (y * (1 - y)\<^sup>2) * sqrt (z * (1 - z)) / 2
[PROOF STEP]
by (simp add: divide_simps real_sqrt_mult del: real_sqrt_mult_self)
[PROOF STATE]
proof (state)
this:
sqrt x * sqrt x * (1 - x) * sqrt y * sqrt y * (1 - y) * sqrt z * sqrt z * sqrt (1 - z) * sqrt (1 - z) / (2 * sqrt (1 - z) * sqrt x * sqrt y * sqrt z) = sqrt (x * (1 - x)\<^sup>2) * sqrt (y * (1 - y)\<^sup>2) * sqrt (z * (1 - z)) / 2

goal (1 subgoal):
 1. x * (1 - x) * y * (1 - y) * z * (1 - z) / (1 - (1 - x * y) * z) \<le> 1 / 27
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sqrt x * sqrt x * (1 - x) * sqrt y * sqrt y * (1 - y) * sqrt z * sqrt z * sqrt (1 - z) * sqrt (1 - z) / (2 * sqrt (1 - z) * sqrt x * sqrt y * sqrt z) = sqrt (x * (1 - x)\<^sup>2) * sqrt (y * (1 - y)\<^sup>2) * sqrt (z * (1 - z)) / 2

goal (1 subgoal):
 1. x * (1 - x) * y * (1 - y) * z * (1 - z) / (1 - (1 - x * y) * z) \<le> 1 / 27
[PROOF STEP]
have "\<dots> \<le> sqrt (4 / 27) * sqrt (4 / 27) * sqrt (1 / 4) / 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sqrt (x * (1 - x)\<^sup>2) * sqrt (y * (1 - y)\<^sup>2) * sqrt (z * (1 - z)) / 2 \<le> sqrt (4 / 27) * sqrt (4 / 27) * sqrt (1 / 4) / 2
[PROOF STEP]
using xyz
[PROOF STATE]
proof (prove)
using this:
x \<in> {0<..<1}
y \<in> {0<..<1}
z \<in> {0<..<1}

goal (1 subgoal):
 1. sqrt (x * (1 - x)\<^sup>2) * sqrt (y * (1 - y)\<^sup>2) * sqrt (z * (1 - z)) / 2 \<le> sqrt (4 / 27) * sqrt (4 / 27) * sqrt (1 / 4) / 2
[PROOF STEP]
by (intro divide_right_mono mult_mono real_sqrt_le_mono ineq1 ineq2) auto
[PROOF STATE]
proof (state)
this:
sqrt (x * (1 - x)\<^sup>2) * sqrt (y * (1 - y)\<^sup>2) * sqrt (z * (1 - z)) / 2 \<le> sqrt (4 / 27) * sqrt (4 / 27) * sqrt (1 / 4) / 2

goal (1 subgoal):
 1. x * (1 - x) * y * (1 - y) * z * (1 - z) / (1 - (1 - x * y) * z) \<le> 1 / 27
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sqrt (x * (1 - x)\<^sup>2) * sqrt (y * (1 - y)\<^sup>2) * sqrt (z * (1 - z)) / 2 \<le> sqrt (4 / 27) * sqrt (4 / 27) * sqrt (1 / 4) / 2

goal (1 subgoal):
 1. x * (1 - x) * y * (1 - y) * z * (1 - z) / (1 - (1 - x * y) * z) \<le> 1 / 27
[PROOF STEP]
have "\<dots> = 1 / 27"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sqrt (4 / 27) * sqrt (4 / 27) * sqrt (1 / 4) / 2 = 1 / 27
[PROOF STEP]
by (simp add: real_sqrt_divide)
[PROOF STATE]
proof (state)
this:
sqrt (4 / 27) * sqrt (4 / 27) * sqrt (1 / 4) / 2 = 1 / 27

goal (1 subgoal):
 1. x * (1 - x) * y * (1 - y) * z * (1 - z) / (1 - (1 - x * y) * z) \<le> 1 / 27
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
x * (1 - x) * y * (1 - y) * z * (1 - z) / (2 * sqrt (1 - z) * sqrt x * sqrt y * sqrt z) \<le> 1 / 27
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x * (1 - x) * y * (1 - y) * z * (1 - z) / (2 * sqrt (1 - z) * sqrt x * sqrt y * sqrt z) \<le> 1 / 27

goal (1 subgoal):
 1. x * (1 - x) * y * (1 - y) * z * (1 - z) / (1 - (1 - x * y) * z) \<le> 1 / 27
[PROOF STEP]
using *
[PROOF STATE]
proof (prove)
using this:
x * (1 - x) * y * (1 - y) * z * (1 - z) / (2 * sqrt (1 - z) * sqrt x * sqrt y * sqrt z) \<le> 1 / 27
x * (1 - x) * y * (1 - y) * z * (1 - z) / (1 - (1 - x * y) * z) \<le> x * (1 - x) * y * (1 - y) * z * (1 - z) / (2 * sqrt (1 - z) * sqrt x * sqrt y * sqrt z)

goal (1 subgoal):
 1. x * (1 - x) * y * (1 - y) * z * (1 - z) / (1 - (1 - x * y) * z) \<le> 1 / 27
[PROOF STEP]
by argo
[PROOF STATE]
proof (state)
this:
x * (1 - x) * y * (1 - y) * z * (1 - z) / (1 - (1 - x * y) * z) \<le> 1 / 27

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in group) proper_subgroup_imp_bound_on_card:
  assumes "H \<subset> carrier G" "subgroup H G" "finite (carrier G)"
  shows "card H \<le> order G div 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card H \<le> order G div 2
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. card H \<le> order G div 2
[PROOF STEP]
from \<open>finite (carrier G)\<close>
[PROOF STATE]
proof (chain)
picking this:
finite (carrier G)
[PROOF STEP]
have "finite (rcosets H)"
[PROOF STATE]
proof (prove)
using this:
finite (carrier G)

goal (1 subgoal):
 1. finite (rcosets H)
[PROOF STEP]
by (simp add: RCOSETS_def)
[PROOF STATE]
proof (state)
this:
finite (rcosets H)

goal (1 subgoal):
 1. card H \<le> order G div 2
[PROOF STEP]
note subgroup.subgroup_in_rcosets[OF \<open>subgroup H G\<close> is_group]
[PROOF STATE]
proof (state)
this:
H \<in> rcosets H

goal (1 subgoal):
 1. card H \<le> order G div 2
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
H \<in> rcosets H
[PROOF STEP]
obtain J where "J \<noteq> H" "J \<in> rcosets H"
[PROOF STATE]
proof (prove)
using this:
H \<in> rcosets H

goal (1 subgoal):
 1. (\<And>J. \<lbrakk>J \<noteq> H; J \<in> rcosets H\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using rcosets_part_G[OF \<open>subgroup H G\<close>] and \<open>H \<subset> carrier G\<close>
[PROOF STATE]
proof (prove)
using this:
H \<in> rcosets H
\<Union> (rcosets H) = carrier G
H \<subset> carrier G

goal (1 subgoal):
 1. (\<And>J. \<lbrakk>J \<noteq> H; J \<in> rcosets H\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis Sup_le_iff inf.absorb_iff2 inf.idem inf.strict_order_iff)
[PROOF STATE]
proof (state)
this:
J \<noteq> H
J \<in> rcosets H

goal (1 subgoal):
 1. card H \<le> order G div 2
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
J \<noteq> H
J \<in> rcosets H
[PROOF STEP]
have "2 \<le> card (rcosets H)"
[PROOF STATE]
proof (prove)
using this:
J \<noteq> H
J \<in> rcosets H

goal (1 subgoal):
 1. 2 \<le> card (rcosets H)
[PROOF STEP]
using \<open>H \<in> rcosets H\<close> card_mono[OF \<open>finite (rcosets H)\<close>, of "{H, J}"]
[PROOF STATE]
proof (prove)
using this:
J \<noteq> H
J \<in> rcosets H
H \<in> rcosets H
{H, J} \<subseteq> rcosets H \<Longrightarrow> card {H, J} \<le> card (rcosets H)

goal (1 subgoal):
 1. 2 \<le> card (rcosets H)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
2 \<le> card (rcosets H)

goal (1 subgoal):
 1. card H \<le> order G div 2
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
2 \<le> card (rcosets H)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
2 \<le> card (rcosets H)

goal (1 subgoal):
 1. card H \<le> order G div 2
[PROOF STEP]
using mult_le_mono[of 2 "card (rcosets H)" "card H" "card H"]
[PROOF STATE]
proof (prove)
using this:
2 \<le> card (rcosets H)
\<lbrakk>2 \<le> card (rcosets H); card H \<le> card H\<rbrakk> \<Longrightarrow> 2 * card H \<le> card (rcosets H) * card H

goal (1 subgoal):
 1. card H \<le> order G div 2
[PROOF STEP]
unfolding lagrange[OF \<open>subgroup H G\<close>]
[PROOF STATE]
proof (prove)
using this:
2 \<le> card (rcosets H)
\<lbrakk>2 \<le> card (rcosets H); card H \<le> card H\<rbrakk> \<Longrightarrow> 2 * card H \<le> order G

goal (1 subgoal):
 1. card H \<le> order G div 2
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
card H \<le> order G div 2

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma inc_mat_of_cols_inc_vecs: "cols (inc_mat_of Vs Bs) = map (\<lambda> j . inc_vec_of Vs j) Bs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cols (inc_mat_of Vs Bs) = map (inc_vec_of Vs) Bs
[PROOF STEP]
proof (intro nth_equalityI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. length (cols (inc_mat_of Vs Bs)) = length (map (inc_vec_of Vs) Bs)
 2. \<And>i. i < length (cols (inc_mat_of Vs Bs)) \<Longrightarrow> cols (inc_mat_of Vs Bs) ! i = map (inc_vec_of Vs) Bs ! i
[PROOF STEP]
have l1: "length (cols (inc_mat_of Vs Bs)) = length Bs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (cols (inc_mat_of Vs Bs)) = length Bs
[PROOF STEP]
using inc_mat_dim_col
[PROOF STATE]
proof (prove)
using this:
dim_col (inc_mat_of ?Vs ?Bs) = length ?Bs

goal (1 subgoal):
 1. length (cols (inc_mat_of Vs Bs)) = length Bs
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
length (cols (inc_mat_of Vs Bs)) = length Bs

goal (2 subgoals):
 1. length (cols (inc_mat_of Vs Bs)) = length (map (inc_vec_of Vs) Bs)
 2. \<And>i. i < length (cols (inc_mat_of Vs Bs)) \<Longrightarrow> cols (inc_mat_of Vs Bs) ! i = map (inc_vec_of Vs) Bs ! i
[PROOF STEP]
have l2: "length (map (\<lambda> j . inc_vec_of Vs j) Bs) = length Bs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (map (inc_vec_of Vs) Bs) = length Bs
[PROOF STEP]
using length_map
[PROOF STATE]
proof (prove)
using this:
length (map ?f ?xs) = length ?xs

goal (1 subgoal):
 1. length (map (inc_vec_of Vs) Bs) = length Bs
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
length (map (inc_vec_of Vs) Bs) = length Bs

goal (2 subgoals):
 1. length (cols (inc_mat_of Vs Bs)) = length (map (inc_vec_of Vs) Bs)
 2. \<And>i. i < length (cols (inc_mat_of Vs Bs)) \<Longrightarrow> cols (inc_mat_of Vs Bs) ! i = map (inc_vec_of Vs) Bs ! i
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
length (map (inc_vec_of Vs) Bs) = length Bs
[PROOF STEP]
show "length (cols (inc_mat_of Vs Bs)) = length (map (inc_vec_of Vs) Bs)"
[PROOF STATE]
proof (prove)
using this:
length (map (inc_vec_of Vs) Bs) = length Bs

goal (1 subgoal):
 1. length (cols (inc_mat_of Vs Bs)) = length (map (inc_vec_of Vs) Bs)
[PROOF STEP]
using l1 l2
[PROOF STATE]
proof (prove)
using this:
length (map (inc_vec_of Vs) Bs) = length Bs
length (cols (inc_mat_of Vs Bs)) = length Bs
length (map (inc_vec_of Vs) Bs) = length Bs

goal (1 subgoal):
 1. length (cols (inc_mat_of Vs Bs)) = length (map (inc_vec_of Vs) Bs)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
length (cols (inc_mat_of Vs Bs)) = length (map (inc_vec_of Vs) Bs)

goal (1 subgoal):
 1. \<And>i. i < length (cols (inc_mat_of Vs Bs)) \<Longrightarrow> cols (inc_mat_of Vs Bs) ! i = map (inc_vec_of Vs) Bs ! i
[PROOF STEP]
show "\<And> i. i < length (cols (inc_mat_of Vs Bs)) \<Longrightarrow>
    (cols (inc_mat_of Vs Bs) ! i) = (map (\<lambda> j . inc_vec_of Vs j) Bs) ! i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. i < length (cols (inc_mat_of Vs Bs)) \<Longrightarrow> cols (inc_mat_of Vs Bs) ! i = map (inc_vec_of Vs) Bs ! i
[PROOF STEP]
using inc_mat_col_inc_vec l1
[PROOF STATE]
proof (prove)
using this:
?j < length ?Bs \<Longrightarrow> col (inc_mat_of ?Vs ?Bs) ?j = inc_vec_of ?Vs (?Bs ! ?j)
length (cols (inc_mat_of Vs Bs)) = length Bs

goal (1 subgoal):
 1. \<And>i. i < length (cols (inc_mat_of Vs Bs)) \<Longrightarrow> cols (inc_mat_of Vs Bs) ! i = map (inc_vec_of Vs) Bs ! i
[PROOF STEP]
by (metis cols_nth inc_mat_dim_col nth_map)
[PROOF STATE]
proof (state)
this:
?i3 < length (cols (inc_mat_of Vs Bs)) \<Longrightarrow> cols (inc_mat_of Vs Bs) ! ?i3 = map (inc_vec_of Vs) Bs ! ?i3

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma matrix_to_lpolies_vec_of_row:
  "i <dim_row A \<Longrightarrow> matrix_to_lpolies A ! i = vec_to_lpoly (row A i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i < dim_row A \<Longrightarrow> matrix_to_lpolies A ! i = vec_to_lpoly (row A i)
[PROOF STEP]
using matrix_to_lpolies.simps[of A]
[PROOF STATE]
proof (prove)
using this:
matrix_to_lpolies A = map vec_to_lpoly (rows A)

goal (1 subgoal):
 1. i < dim_row A \<Longrightarrow> matrix_to_lpolies A ! i = vec_to_lpoly (row A i)
[PROOF STEP]
by simp


[STATEMENT]
lemma set_rel_empty_iff[simp]:
  "({},y)\<in>\<langle>A\<rangle>set_rel \<longleftrightarrow> y={}"
  "(x,{})\<in>\<langle>A\<rangle>set_rel \<longleftrightarrow> x={}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (({}, y) \<in> \<langle>A\<rangle>set_rel) = (y = {}) &&& ((x, {}) \<in> \<langle>A\<rangle>set_rel) = (x = {})
[PROOF STEP]
by (auto simp: set_rel_def; fastforce)+


[STATEMENT]
lemma has_integral_mult_left:
  fixes c :: "_ :: real_normed_algebra"
  shows "(f has_integral y) S \<Longrightarrow> ((\<lambda>x. f x * c) has_integral (y * c)) S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f has_integral y) S \<Longrightarrow> ((\<lambda>x. f x * c) has_integral y * c) S
[PROOF STEP]
using has_integral_linear[OF _ bounded_linear_mult_left]
[PROOF STATE]
proof (prove)
using this:
(?f has_integral ?y) ?S \<Longrightarrow> ((\<lambda>x. x * ?y1) \<circ> ?f has_integral ?y * ?y1) ?S

goal (1 subgoal):
 1. (f has_integral y) S \<Longrightarrow> ((\<lambda>x. f x * c) has_integral y * c) S
[PROOF STEP]
by (simp add: comp_def)


[STATEMENT]
lemma SN_rel_mono':
  "R \<subseteq> R' \<Longrightarrow> S \<subseteq> R' \<union> S' \<Longrightarrow> SN_rel R' S' \<Longrightarrow> SN_rel R S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>R \<subseteq> R'; S \<subseteq> R' \<union> S'; SN_rel R' S'\<rbrakk> \<Longrightarrow> SN_rel R S
[PROOF STEP]
unfolding SN_rel_on_conv SN_rel_defs INFM_nat_le
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>R \<subseteq> R'; S \<subseteq> R' \<union> S'; \<forall>f. (\<forall>i. (f i, f (Suc i)) \<in> R' \<union> S') \<and> f 0 \<in> UNIV \<longrightarrow> \<not> (\<forall>m. \<exists>n\<ge>m. (f n, f (Suc n)) \<in> R')\<rbrakk> \<Longrightarrow> \<forall>f. (\<forall>i. (f i, f (Suc i)) \<in> R \<union> S) \<and> f 0 \<in> UNIV \<longrightarrow> \<not> (\<forall>m. \<exists>n\<ge>m. (f n, f (Suc n)) \<in> R)
[PROOF STEP]
by (metis contra_subsetD sup.left_idem sup.mono)


[STATEMENT]
lemma pair_measurable[measurable]:
  assumes "f \<in> X \<rightarrow>\<^sub>M Y"
      and "g \<in> X' \<rightarrow>\<^sub>M Y'"
    shows "map_prod f g \<in> X \<Otimes>\<^sub>M X' \<rightarrow>\<^sub>M Y \<Otimes>\<^sub>M Y'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_prod f g \<in> X \<Otimes>\<^sub>M X' \<rightarrow>\<^sub>M Y \<Otimes>\<^sub>M Y'
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
f \<in> X \<rightarrow>\<^sub>M Y
g \<in> X' \<rightarrow>\<^sub>M Y'

goal (1 subgoal):
 1. map_prod f g \<in> X \<Otimes>\<^sub>M X' \<rightarrow>\<^sub>M Y \<Otimes>\<^sub>M Y'
[PROOF STEP]
by(auto simp add: measurable_pair_iff)


[STATEMENT]
lemma dX_union:
  shows "dX (X \<union> Y) d = dX X d \<union> dX Y d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dX (X \<union> Y) d = dX X d \<union> dX Y d
[PROOF STEP]
unfolding dX_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x \<in> X \<union> Y. Xd x = d} = {x \<in> X. Xd x = d} \<union> {x \<in> Y. Xd x = d}
[PROOF STEP]
by auto


[STATEMENT]
lemma star_n_diff: "star_n X - star_n Y = star_n (\<lambda>n. X n - Y n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. star_n X - star_n Y = star_n (\<lambda>n. X n - Y n)
[PROOF STEP]
by (simp only: star_diff_def starfun2_star_n)


[STATEMENT]
lemma h_obs_simps[simp]: "FSM.h_obs M q x y = (let
      tgts = snd ` Set.filter (\<lambda> (y',q') . y' = y) (h M (q,x))
    in if card tgts = 1
      then Some (the_elem tgts)
      else None)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. FSM.h_obs M q x y = (let tgts = snd ` Set.filter (\<lambda>(y', q'). y' = y) (FSM.h M (q, x)) in if card tgts = 1 then Some (the_elem tgts) else None)
[PROOF STEP]
by (transfer; auto)


[STATEMENT]
lemma close_funE:
  assumes "cring S"
  assumes "g \<in> I \<rightarrow> carrier S"
  shows "closed_fun S (close_fun I S g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. close_fun I S g \<in> UNIV \<rightarrow> carrier S
[PROOF STEP]
apply(rule cring.closed_funI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. cring S
 2. \<And>x. close_fun I S g x \<in> carrier S
[PROOF STEP]
apply (simp add: assms(1))
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. close_fun I S g x \<in> carrier S
[PROOF STEP]
by (metis close_fun_def PiE assms(1) assms(2) cring.cring_simprules(2))


[STATEMENT]
lemma guardK_MPair [iff]: "(\<lbrace>X,Y\<rbrace> \<in> guardK n Ks)
= (X \<in> guardK n Ks \<and> Y \<in> guardK n Ks)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lbrace>X, Y\<rbrace> \<in> guardK n Ks) = (X \<in> guardK n Ks \<and> Y \<in> guardK n Ks)
[PROOF STEP]
by (auto, (ind_cases "\<lbrace>X,Y\<rbrace> \<in> guardK n Ks", auto)+)


[STATEMENT]
lemma bigtheta_powr_nonneg' [landau_simp]:
  "eventually (\<lambda>x. (f x :: real) \<ge> 0) F \<Longrightarrow> (\<lambda>x. if f x < 0 then g x else h x) \<in> \<Theta>[F](h)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in F. 0 \<le> f x \<Longrightarrow> (\<lambda>x. if f x < 0 then g x else h x) \<in> \<Theta>[F](h)
[PROOF STEP]
by (intro bigthetaI_cong) (auto elim!: eventually_mono)


[STATEMENT]
lemma (in ordered_term) compute_Macaulay_list [code]:
  "Macaulay_list ps =
     (let ts = Keys_to_list ps in
      filter (\<lambda>p. p \<noteq> 0) (mat_to_polys ts (row_echelon (polys_to_mat ts ps)))
     )"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Macaulay_list ps = (let ts = Keys_to_list ps in filter (\<lambda>p. p \<noteq> 0) (mat_to_polys ts (row_echelon (polys_to_mat ts ps))))
[PROOF STEP]
by (simp add: Macaulay_list_def Macaulay_mat_def Let_def)