[STATEMENT]
lemma conv_radius_eqI_smallomega_smallo:
  fixes f :: "nat \<Rightarrow> 'a :: {real_normed_div_algebra, banach}"
  assumes "\<And>\<epsilon>. \<epsilon> > l \<Longrightarrow> \<epsilon> < inverse C \<Longrightarrow> (\<lambda>n. norm (f n)) \<in> \<omega>(\<lambda>n. \<epsilon> ^ n)"
  assumes "\<And>\<epsilon>. \<epsilon> < u \<Longrightarrow> \<epsilon> > inverse C \<Longrightarrow> (\<lambda>n. norm (f n)) \<in> o(\<lambda>n. \<epsilon> ^ n)"
  assumes C: "C > 0" and lu: "l > 0" "l < inverse C" "u > inverse C"
  shows   "conv_radius f = ereal C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. conv_radius f = ereal C
[PROOF STEP]
proof (intro antisym)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. conv_radius f \<le> ereal C
 2. ereal C \<le> conv_radius f
[PROOF STEP]
have "0 < inverse C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < inverse C
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>l < ?\<epsilon>; ?\<epsilon> < inverse C\<rbrakk> \<Longrightarrow> (\<lambda>n. norm (f n)) \<in> \<omega>((^) ?\<epsilon>)
\<lbrakk>?\<epsilon> < u; inverse C < ?\<epsilon>\<rbrakk> \<Longrightarrow> (\<lambda>n. norm (f n)) \<in> o((^) ?\<epsilon>)
0 < C
0 < l
l < inverse C
inverse C < u

goal (1 subgoal):
 1. 0 < inverse C
[PROOF STEP]
by (auto simp: field_simps)
[PROOF STATE]
proof (state)
this:
0 < inverse C

goal (2 subgoals):
 1. conv_radius f \<le> ereal C
 2. ereal C \<le> conv_radius f
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
0 < inverse C

goal (2 subgoals):
 1. conv_radius f \<le> ereal C
 2. ereal C \<le> conv_radius f
[PROOF STEP]
have "\<dots> < u"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inverse C < u
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
inverse C < u

goal (2 subgoals):
 1. conv_radius f \<le> ereal C
 2. ereal C \<le> conv_radius f
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
0 < u
[PROOF STEP]
have "u > 0"
[PROOF STATE]
proof (prove)
using this:
0 < u

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

goal (2 subgoals):
 1. conv_radius f \<le> ereal C
 2. ereal C \<le> conv_radius f
[PROOF STEP]
show "conv_radius f \<ge> C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ereal C \<le> conv_radius f
[PROOF STEP]
unfolding conv_radius_altdef le_Liminf_iff
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>y<ereal C. \<forall>\<^sub>F x in sequentially. y < inverse (ereal (root x (norm (f x))))
[PROOF STEP]
proof safe
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. y < ereal C \<Longrightarrow> \<forall>\<^sub>F x in sequentially. y < inverse (ereal (root x (norm (f x))))
[PROOF STEP]
fix c :: ereal
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. y < ereal C \<Longrightarrow> \<forall>\<^sub>F x in sequentially. y < inverse (ereal (root x (norm (f x))))
[PROOF STEP]
assume c: "c < C"
[PROOF STATE]
proof (state)
this:
c < ereal C

goal (1 subgoal):
 1. \<And>y. y < ereal C \<Longrightarrow> \<forall>\<^sub>F x in sequentially. y < inverse (ereal (root x (norm (f x))))
[PROOF STEP]
hence "max c (inverse u) < ereal C"
[PROOF STATE]
proof (prove)
using this:
c < ereal C

goal (1 subgoal):
 1. max c (ereal (inverse u)) < ereal C
[PROOF STEP]
using lu C \<open>u > 0\<close>
[PROOF STATE]
proof (prove)
using this:
c < ereal C
0 < l
l < inverse C
inverse C < u
0 < C
0 < u

goal (1 subgoal):
 1. max c (ereal (inverse u)) < ereal C
[PROOF STEP]
by (auto simp: field_simps)
[PROOF STATE]
proof (state)
this:
max c (ereal (inverse u)) < ereal C

goal (1 subgoal):
 1. \<And>y. y < ereal C \<Longrightarrow> \<forall>\<^sub>F x in sequentially. y < inverse (ereal (root x (norm (f x))))
[PROOF STEP]
from ereal_dense2[OF this]
[PROOF STATE]
proof (chain)
picking this:
\<exists>z. max c (ereal (inverse u)) < ereal z \<and> ereal z < ereal C
[PROOF STEP]
obtain c' where c': "c < ereal c'" "inverse u < c'" "c' < C"
[PROOF STATE]
proof (prove)
using this:
\<exists>z. max c (ereal (inverse u)) < ereal z \<and> ereal z < ereal C

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

goal (1 subgoal):
 1. \<And>y. y < ereal C \<Longrightarrow> \<forall>\<^sub>F x in sequentially. y < inverse (ereal (root x (norm (f x))))
[PROOF STEP]
have "inverse u > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < inverse u
[PROOF STEP]
using \<open>u > 0\<close>
[PROOF STATE]
proof (prove)
using this:
0 < u

goal (1 subgoal):
 1. 0 < inverse u
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
0 < inverse u

goal (1 subgoal):
 1. \<And>y. y < ereal C \<Longrightarrow> \<forall>\<^sub>F x in sequentially. y < inverse (ereal (root x (norm (f x))))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
0 < inverse u

goal (1 subgoal):
 1. \<And>y. y < ereal C \<Longrightarrow> \<forall>\<^sub>F x in sequentially. y < inverse (ereal (root x (norm (f x))))
[PROOF STEP]
have "\<dots> < c'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inverse u < c'
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
inverse u < c'

goal (1 subgoal):
 1. \<And>y. y < ereal C \<Longrightarrow> \<forall>\<^sub>F x in sequentially. y < inverse (ereal (root x (norm (f x))))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
0 < c'
[PROOF STEP]
have "c' > 0"
[PROOF STATE]
proof (prove)
using this:
0 < c'

goal (1 subgoal):
 1. 0 < c'
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
0 < c'

goal (1 subgoal):
 1. \<And>y. y < ereal C \<Longrightarrow> \<forall>\<^sub>F x in sequentially. y < inverse (ereal (root x (norm (f x))))
[PROOF STEP]
have "\<forall>\<^sub>F x in sequentially. norm (norm (f x)) \<le> 1/2 * norm (inverse c' ^ x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in sequentially. norm (norm (f x)) \<le> 1 / 2 * norm (inverse c' ^ x)
[PROOF STEP]
using landau_o.smallD[OF assms(2)[of "inverse c'"], of "1/2"] c' C lu \<open>c' > 0\<close> c
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>inverse c' < u; inverse C < inverse c'; 0 < 1 / 2\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F x in sequentially. norm (norm (f x)) \<le> 1 / 2 * norm (inverse c' ^ x)
c < ereal c'
inverse u < c'
c' < C
0 < C
0 < l
l < inverse C
inverse C < u
0 < c'
c < ereal C

goal (1 subgoal):
 1. \<forall>\<^sub>F x in sequentially. norm (norm (f x)) \<le> 1 / 2 * norm (inverse c' ^ x)
[PROOF STEP]
by (simp add: field_simps)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in sequentially. norm (norm (f x)) \<le> 1 / 2 * norm (inverse c' ^ x)

goal (1 subgoal):
 1. \<And>y. y < ereal C \<Longrightarrow> \<forall>\<^sub>F x in sequentially. y < inverse (ereal (root x (norm (f x))))
[PROOF STEP]
thus "\<forall>\<^sub>F n in sequentially. c < inverse (ereal (root n (norm (f n))))"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in sequentially. norm (norm (f x)) \<le> 1 / 2 * norm (inverse c' ^ x)

goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. c < inverse (ereal (root n (norm (f n))))
[PROOF STEP]
using eventually_gt_at_top[of 0]
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in sequentially. norm (norm (f x)) \<le> 1 / 2 * norm (inverse c' ^ x)
eventually ((<) (0::?'b1)) at_top

goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. c < inverse (ereal (root n (norm (f n))))
[PROOF STEP]
proof eventually_elim
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. \<lbrakk>norm (norm (f n)) \<le> 1 / 2 * norm (inverse c' ^ n); 0 < n\<rbrakk> \<Longrightarrow> c < inverse (ereal (root n (norm (f n))))
[PROOF STEP]
case (elim n)
[PROOF STATE]
proof (state)
this:
norm (norm (f n)) \<le> 1 / 2 * norm (inverse c' ^ n)
0 < n

goal (1 subgoal):
 1. \<And>n. \<lbrakk>norm (norm (f n)) \<le> 1 / 2 * norm (inverse c' ^ n); 0 < n\<rbrakk> \<Longrightarrow> c < inverse (ereal (root n (norm (f n))))
[PROOF STEP]
have "norm (f n) \<le> 1/2 * norm (inverse c' ^ n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (f n) \<le> 1 / 2 * norm (inverse c' ^ n)
[PROOF STEP]
using c'
[PROOF STATE]
proof (prove)
using this:
c < ereal c'
inverse u < c'
c' < C

goal (1 subgoal):
 1. norm (f n) \<le> 1 / 2 * norm (inverse c' ^ n)
[PROOF STEP]
using elim
[PROOF STATE]
proof (prove)
using this:
c < ereal c'
inverse u < c'
c' < C
norm (norm (f n)) \<le> 1 / 2 * norm (inverse c' ^ n)
0 < n

goal (1 subgoal):
 1. norm (f n) \<le> 1 / 2 * norm (inverse c' ^ n)
[PROOF STEP]
by (simp add: field_simps)
[PROOF STATE]
proof (state)
this:
norm (f n) \<le> 1 / 2 * norm (inverse c' ^ n)

goal (1 subgoal):
 1. \<And>n. \<lbrakk>norm (norm (f n)) \<le> 1 / 2 * norm (inverse c' ^ n); 0 < n\<rbrakk> \<Longrightarrow> c < inverse (ereal (root n (norm (f n))))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
norm (f n) \<le> 1 / 2 * norm (inverse c' ^ n)

goal (1 subgoal):
 1. \<And>n. \<lbrakk>norm (norm (f n)) \<le> 1 / 2 * norm (inverse c' ^ n); 0 < n\<rbrakk> \<Longrightarrow> c < inverse (ereal (root n (norm (f n))))
[PROOF STEP]
have "\<dots> < norm (inverse c' ^ n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 / 2 * norm (inverse c' ^ n) < norm (inverse c' ^ n)
[PROOF STEP]
using \<open>c' > 0\<close>
[PROOF STATE]
proof (prove)
using this:
0 < c'

goal (1 subgoal):
 1. 1 / 2 * norm (inverse c' ^ n) < norm (inverse c' ^ n)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
1 / 2 * norm (inverse c' ^ n) < norm (inverse c' ^ n)

goal (1 subgoal):
 1. \<And>n. \<lbrakk>norm (norm (f n)) \<le> 1 / 2 * norm (inverse c' ^ n); 0 < n\<rbrakk> \<Longrightarrow> c < inverse (ereal (root n (norm (f n))))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
norm (f n) < norm (inverse c' ^ n)
[PROOF STEP]
have "root n (norm (f n)) < root n (norm (inverse c' ^ n))"
[PROOF STATE]
proof (prove)
using this:
norm (f n) < norm (inverse c' ^ n)

goal (1 subgoal):
 1. root n (norm (f n)) < root n (norm (inverse c' ^ n))
[PROOF STEP]
using \<open>n > 0\<close> c'
[PROOF STATE]
proof (prove)
using this:
norm (f n) < norm (inverse c' ^ n)
0 < n
c < ereal c'
inverse u < c'
c' < C

goal (1 subgoal):
 1. root n (norm (f n)) < root n (norm (inverse c' ^ n))
[PROOF STEP]
by (intro real_root_less_mono) auto
[PROOF STATE]
proof (state)
this:
root n (norm (f n)) < root n (norm (inverse c' ^ n))

goal (1 subgoal):
 1. \<And>n. \<lbrakk>norm (norm (f n)) \<le> 1 / 2 * norm (inverse c' ^ n); 0 < n\<rbrakk> \<Longrightarrow> c < inverse (ereal (root n (norm (f n))))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
root n (norm (f n)) < root n (norm (inverse c' ^ n))

goal (1 subgoal):
 1. \<And>n. \<lbrakk>norm (norm (f n)) \<le> 1 / 2 * norm (inverse c' ^ n); 0 < n\<rbrakk> \<Longrightarrow> c < inverse (ereal (root n (norm (f n))))
[PROOF STEP]
have "root n (norm (inverse c' ^ n)) = inverse c'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. root n (norm (inverse c' ^ n)) = inverse c'
[PROOF STEP]
using \<open>n > 0\<close> \<open>c' > 0\<close>
[PROOF STATE]
proof (prove)
using this:
0 < n
0 < c'

goal (1 subgoal):
 1. root n (norm (inverse c' ^ n)) = inverse c'
[PROOF STEP]
by (simp add: norm_power real_root_power)
[PROOF STATE]
proof (state)
this:
root n (norm (inverse c' ^ n)) = inverse c'

goal (1 subgoal):
 1. \<And>n. \<lbrakk>norm (norm (f n)) \<le> 1 / 2 * norm (inverse c' ^ n); 0 < n\<rbrakk> \<Longrightarrow> c < inverse (ereal (root n (norm (f n))))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
root n (norm (f n)) < inverse c'
[PROOF STEP]
have "ereal (root n (norm (f n))) < ereal (inverse c')"
[PROOF STATE]
proof (prove)
using this:
root n (norm (f n)) < inverse c'

goal (1 subgoal):
 1. ereal (root n (norm (f n))) < ereal (inverse c')
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
ereal (root n (norm (f n))) < ereal (inverse c')

goal (1 subgoal):
 1. \<And>n. \<lbrakk>norm (norm (f n)) \<le> 1 / 2 * norm (inverse c' ^ n); 0 < n\<rbrakk> \<Longrightarrow> c < inverse (ereal (root n (norm (f n))))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
ereal (root n (norm (f n))) < ereal (inverse c')

goal (1 subgoal):
 1. \<And>n. \<lbrakk>norm (norm (f n)) \<le> 1 / 2 * norm (inverse c' ^ n); 0 < n\<rbrakk> \<Longrightarrow> c < inverse (ereal (root n (norm (f n))))
[PROOF STEP]
have "\<dots> = inverse (ereal c')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ereal (inverse c') = inverse (ereal c')
[PROOF STEP]
using \<open>c' > 0\<close>
[PROOF STATE]
proof (prove)
using this:
0 < c'

goal (1 subgoal):
 1. ereal (inverse c') = inverse (ereal c')
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
ereal (inverse c') = inverse (ereal c')

goal (1 subgoal):
 1. \<And>n. \<lbrakk>norm (norm (f n)) \<le> 1 / 2 * norm (inverse c' ^ n); 0 < n\<rbrakk> \<Longrightarrow> c < inverse (ereal (root n (norm (f n))))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
ereal (root n (norm (f n))) < inverse (ereal c')
[PROOF STEP]
have "inverse (inverse (ereal c')) < inverse (ereal (root n (norm (f n))))"
[PROOF STATE]
proof (prove)
using this:
ereal (root n (norm (f n))) < inverse (ereal c')

goal (1 subgoal):
 1. inverse (inverse (ereal c')) < inverse (ereal (root n (norm (f n))))
[PROOF STEP]
using c' \<open>n > 0\<close>
[PROOF STATE]
proof (prove)
using this:
ereal (root n (norm (f n))) < inverse (ereal c')
c < ereal c'
inverse u < c'
c' < C
0 < n

goal (1 subgoal):
 1. inverse (inverse (ereal c')) < inverse (ereal (root n (norm (f n))))
[PROOF STEP]
by (intro ereal_inverse_antimono_strict) auto
[PROOF STATE]
proof (state)
this:
inverse (inverse (ereal c')) < inverse (ereal (root n (norm (f n))))

goal (1 subgoal):
 1. \<And>n. \<lbrakk>norm (norm (f n)) \<le> 1 / 2 * norm (inverse c' ^ n); 0 < n\<rbrakk> \<Longrightarrow> c < inverse (ereal (root n (norm (f n))))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
inverse (inverse (ereal c')) < inverse (ereal (root n (norm (f n))))

goal (1 subgoal):
 1. \<And>n. \<lbrakk>norm (norm (f n)) \<le> 1 / 2 * norm (inverse c' ^ n); 0 < n\<rbrakk> \<Longrightarrow> c < inverse (ereal (root n (norm (f n))))
[PROOF STEP]
have "inverse (inverse (ereal c')) = ereal c'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inverse (inverse (ereal c')) = ereal c'
[PROOF STEP]
using c'
[PROOF STATE]
proof (prove)
using this:
c < ereal c'
inverse u < c'
c' < C

goal (1 subgoal):
 1. inverse (inverse (ereal c')) = ereal c'
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
inverse (inverse (ereal c')) = ereal c'

goal (1 subgoal):
 1. \<And>n. \<lbrakk>norm (norm (f n)) \<le> 1 / 2 * norm (inverse c' ^ n); 0 < n\<rbrakk> \<Longrightarrow> c < inverse (ereal (root n (norm (f n))))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
ereal c' < inverse (ereal (root n (norm (f n))))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
ereal c' < inverse (ereal (root n (norm (f n))))

goal (1 subgoal):
 1. c < inverse (ereal (root n (norm (f n))))
[PROOF STEP]
using \<open>c < c'\<close>
[PROOF STATE]
proof (prove)
using this:
ereal c' < inverse (ereal (root n (norm (f n))))
c < ereal c'

goal (1 subgoal):
 1. c < inverse (ereal (root n (norm (f n))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
c < inverse (ereal (root n (norm (f n))))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in sequentially. c < inverse (ereal (root n (norm (f n))))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
ereal C \<le> conv_radius f

goal (1 subgoal):
 1. conv_radius f \<le> ereal C
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. conv_radius f \<le> ereal C
[PROOF STEP]
show "conv_radius f \<le> C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. conv_radius f \<le> ereal C
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> conv_radius f \<le> ereal C \<Longrightarrow> False
[PROOF STEP]
assume "\<not>(conv_radius f \<le> C)"
[PROOF STATE]
proof (state)
this:
\<not> conv_radius f \<le> ereal C

goal (1 subgoal):
 1. \<not> conv_radius f \<le> ereal C \<Longrightarrow> False
[PROOF STEP]
hence "conv_radius f > C"
[PROOF STATE]
proof (prove)
using this:
\<not> conv_radius f \<le> ereal C

goal (1 subgoal):
 1. ereal C < conv_radius f
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
ereal C < conv_radius f

goal (1 subgoal):
 1. \<not> conv_radius f \<le> ereal C \<Longrightarrow> False
[PROOF STEP]
hence "min (conv_radius f) (inverse l) > ereal C"
[PROOF STATE]
proof (prove)
using this:
ereal C < conv_radius f

goal (1 subgoal):
 1. ereal C < min (conv_radius f) (ereal (inverse l))
[PROOF STEP]
using lu C \<open>l > 0\<close>
[PROOF STATE]
proof (prove)
using this:
ereal C < conv_radius f
0 < l
l < inverse C
inverse C < u
0 < C
0 < l

goal (1 subgoal):
 1. ereal C < min (conv_radius f) (ereal (inverse l))
[PROOF STEP]
by (auto simp: field_simps)
[PROOF STATE]
proof (state)
this:
ereal C < min (conv_radius f) (ereal (inverse l))

goal (1 subgoal):
 1. \<not> conv_radius f \<le> ereal C \<Longrightarrow> False
[PROOF STEP]
from ereal_dense2[OF this]
[PROOF STATE]
proof (chain)
picking this:
\<exists>z. ereal C < ereal z \<and> ereal z < min (conv_radius f) (ereal (inverse l))
[PROOF STEP]
obtain c where c: "C < ereal c" "inverse l > c" "c < conv_radius f"
[PROOF STATE]
proof (prove)
using this:
\<exists>z. ereal C < ereal z \<and> ereal z < min (conv_radius f) (ereal (inverse l))

goal (1 subgoal):
 1. (\<And>c. \<lbrakk>ereal C < ereal c; c < inverse l; ereal c < conv_radius f\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
ereal C < ereal c
c < inverse l
ereal c < conv_radius f

goal (1 subgoal):
 1. \<not> conv_radius f \<le> ereal C \<Longrightarrow> False
[PROOF STEP]
hence "c > 0"
[PROOF STATE]
proof (prove)
using this:
ereal C < ereal c
c < inverse l
ereal c < conv_radius f

goal (1 subgoal):
 1. 0 < c
[PROOF STEP]
using lu C
[PROOF STATE]
proof (prove)
using this:
ereal C < ereal c
c < inverse l
ereal c < conv_radius f
0 < l
l < inverse C
inverse C < u
0 < C

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

goal (1 subgoal):
 1. \<not> conv_radius f \<le> ereal C \<Longrightarrow> False
[PROOF STEP]
have "\<forall>\<^sub>F n in sequentially. ereal c < inverse (ereal (root n (norm (f n))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. ereal c < inverse (ereal (root n (norm (f n))))
[PROOF STEP]
using less_LiminfD[OF c(3)[unfolded conv_radius_altdef]]
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in sequentially. ereal c < inverse (ereal (root x (norm (f x))))

goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. ereal c < inverse (ereal (root n (norm (f n))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in sequentially. ereal c < inverse (ereal (root n (norm (f n))))

goal (1 subgoal):
 1. \<not> conv_radius f \<le> ereal C \<Longrightarrow> False
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in sequentially. ereal c < inverse (ereal (root n (norm (f n))))

goal (1 subgoal):
 1. \<not> conv_radius f \<le> ereal C \<Longrightarrow> False
[PROOF STEP]
have "\<forall>\<^sub>F n in sequentially. norm (f n) \<ge> 2 * norm (inverse c ^ n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. 2 * norm (inverse c ^ n) \<le> norm (f n)
[PROOF STEP]
using landau_omega.smallD[OF assms(1)[of "inverse c"], of 2] c C \<open>c > 0\<close> lu
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>l < inverse c; inverse c < inverse C; 0 < 2\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F x in sequentially. 2 * norm (inverse c ^ x) \<le> norm (norm (f x))
ereal C < ereal c
c < inverse l
ereal c < conv_radius f
0 < C
0 < c
0 < l
l < inverse C
inverse C < u

goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. 2 * norm (inverse c ^ n) \<le> norm (f n)
[PROOF STEP]
by (simp add: field_simps)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in sequentially. 2 * norm (inverse c ^ n) \<le> norm (f n)

goal (1 subgoal):
 1. \<not> conv_radius f \<le> ereal C \<Longrightarrow> False
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F n in sequentially. ereal c < inverse (ereal (root n (norm (f n))))
\<forall>\<^sub>F n in sequentially. 2 * norm (inverse c ^ n) \<le> norm (f n)
[PROOF STEP]
have "eventually (\<lambda>n. False) sequentially"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F n in sequentially. ereal c < inverse (ereal (root n (norm (f n))))
\<forall>\<^sub>F n in sequentially. 2 * norm (inverse c ^ n) \<le> norm (f n)

goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. False
[PROOF STEP]
using eventually_gt_at_top[of 0]
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F n in sequentially. ereal c < inverse (ereal (root n (norm (f n))))
\<forall>\<^sub>F n in sequentially. 2 * norm (inverse c ^ n) \<le> norm (f n)
eventually ((<) (0::?'b1)) at_top

goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. False
[PROOF STEP]
proof eventually_elim
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. \<lbrakk>ereal c < inverse (ereal (root n (norm (f n)))); 2 * norm (inverse c ^ n) \<le> norm (f n); 0 < n\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
case (elim n)
[PROOF STATE]
proof (state)
this:
ereal c < inverse (ereal (root n (norm (f n))))
2 * norm (inverse c ^ n) \<le> norm (f n)
0 < n

goal (1 subgoal):
 1. \<And>n. \<lbrakk>ereal c < inverse (ereal (root n (norm (f n)))); 2 * norm (inverse c ^ n) \<le> norm (f n); 0 < n\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
have "norm (inverse c ^ n) < 2 * norm (inverse c ^ n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (inverse c ^ n) < 2 * norm (inverse c ^ n)
[PROOF STEP]
using c \<open>n > 0\<close> C
[PROOF STATE]
proof (prove)
using this:
ereal C < ereal c
c < inverse l
ereal c < conv_radius f
0 < n
0 < C

goal (1 subgoal):
 1. norm (inverse c ^ n) < 2 * norm (inverse c ^ n)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
norm (inverse c ^ n) < 2 * norm (inverse c ^ n)

goal (1 subgoal):
 1. \<And>n. \<lbrakk>ereal c < inverse (ereal (root n (norm (f n)))); 2 * norm (inverse c ^ n) \<le> norm (f n); 0 < n\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
norm (inverse c ^ n) < 2 * norm (inverse c ^ n)

goal (1 subgoal):
 1. \<And>n. \<lbrakk>ereal c < inverse (ereal (root n (norm (f n)))); 2 * norm (inverse c ^ n) \<le> norm (f n); 0 < n\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
have "\<dots> \<le> norm (f n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 * norm (inverse c ^ n) \<le> norm (f n)
[PROOF STEP]
using elim
[PROOF STATE]
proof (prove)
using this:
ereal c < inverse (ereal (root n (norm (f n))))
2 * norm (inverse c ^ n) \<le> norm (f n)
0 < n

goal (1 subgoal):
 1. 2 * norm (inverse c ^ n) \<le> norm (f n)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
2 * norm (inverse c ^ n) \<le> norm (f n)

goal (1 subgoal):
 1. \<And>n. \<lbrakk>ereal c < inverse (ereal (root n (norm (f n)))); 2 * norm (inverse c ^ n) \<le> norm (f n); 0 < n\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
norm (inverse c ^ n) < norm (f n)
[PROOF STEP]
have "root n (inverse c ^ n) < root n (norm (f n))"
[PROOF STATE]
proof (prove)
using this:
norm (inverse c ^ n) < norm (f n)

goal (1 subgoal):
 1. root n (inverse c ^ n) < root n (norm (f n))
[PROOF STEP]
using \<open>n > 0\<close>
[PROOF STATE]
proof (prove)
using this:
norm (inverse c ^ n) < norm (f n)
0 < n

goal (1 subgoal):
 1. root n (inverse c ^ n) < root n (norm (f n))
[PROOF STEP]
by (intro real_root_less_mono) auto
[PROOF STATE]
proof (state)
this:
root n (inverse c ^ n) < root n (norm (f n))

goal (1 subgoal):
 1. \<And>n. \<lbrakk>ereal c < inverse (ereal (root n (norm (f n)))); 2 * norm (inverse c ^ n) \<le> norm (f n); 0 < n\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
root n (inverse c ^ n) < root n (norm (f n))

goal (1 subgoal):
 1. \<And>n. \<lbrakk>ereal c < inverse (ereal (root n (norm (f n)))); 2 * norm (inverse c ^ n) \<le> norm (f n); 0 < n\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
have "root n (inverse c ^ n) = inverse c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. root n (inverse c ^ n) = inverse c
[PROOF STEP]
using \<open>n > 0\<close> c C
[PROOF STATE]
proof (prove)
using this:
0 < n
ereal C < ereal c
c < inverse l
ereal c < conv_radius f
0 < C

goal (1 subgoal):
 1. root n (inverse c ^ n) = inverse c
[PROOF STEP]
by (subst real_root_power) auto
[PROOF STATE]
proof (state)
this:
root n (inverse c ^ n) = inverse c

goal (1 subgoal):
 1. \<And>n. \<lbrakk>ereal c < inverse (ereal (root n (norm (f n)))); 2 * norm (inverse c ^ n) \<le> norm (f n); 0 < n\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
inverse c < root n (norm (f n))
[PROOF STEP]
have "ereal (inverse c) < ereal (root n (norm (f n)))"
[PROOF STATE]
proof (prove)
using this:
inverse c < root n (norm (f n))

goal (1 subgoal):
 1. ereal (inverse c) < ereal (root n (norm (f n)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
ereal (inverse c) < ereal (root n (norm (f n)))

goal (1 subgoal):
 1. \<And>n. \<lbrakk>ereal c < inverse (ereal (root n (norm (f n)))); 2 * norm (inverse c ^ n) \<le> norm (f n); 0 < n\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
ereal (inverse c) < ereal (root n (norm (f n)))

goal (1 subgoal):
 1. \<And>n. \<lbrakk>ereal c < inverse (ereal (root n (norm (f n)))); 2 * norm (inverse c ^ n) \<le> norm (f n); 0 < n\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
have "ereal (inverse c) = inverse (ereal c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ereal (inverse c) = inverse (ereal c)
[PROOF STEP]
using c C
[PROOF STATE]
proof (prove)
using this:
ereal C < ereal c
c < inverse l
ereal c < conv_radius f
0 < C

goal (1 subgoal):
 1. ereal (inverse c) = inverse (ereal c)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
ereal (inverse c) = inverse (ereal c)

goal (1 subgoal):
 1. \<And>n. \<lbrakk>ereal c < inverse (ereal (root n (norm (f n)))); 2 * norm (inverse c ^ n) \<le> norm (f n); 0 < n\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
inverse (ereal c) < ereal (root n (norm (f n)))
[PROOF STEP]
have "inverse (ereal (root n (norm (f n)))) < inverse (inverse (ereal c))"
[PROOF STATE]
proof (prove)
using this:
inverse (ereal c) < ereal (root n (norm (f n)))

goal (1 subgoal):
 1. inverse (ereal (root n (norm (f n)))) < inverse (inverse (ereal c))
[PROOF STEP]
using c C
[PROOF STATE]
proof (prove)
using this:
inverse (ereal c) < ereal (root n (norm (f n)))
ereal C < ereal c
c < inverse l
ereal c < conv_radius f
0 < C

goal (1 subgoal):
 1. inverse (ereal (root n (norm (f n)))) < inverse (inverse (ereal c))
[PROOF STEP]
by (intro ereal_inverse_antimono_strict) auto
[PROOF STATE]
proof (state)
this:
inverse (ereal (root n (norm (f n)))) < inverse (inverse (ereal c))

goal (1 subgoal):
 1. \<And>n. \<lbrakk>ereal c < inverse (ereal (root n (norm (f n)))); 2 * norm (inverse c ^ n) \<le> norm (f n); 0 < n\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
inverse (ereal (root n (norm (f n)))) < inverse (inverse (ereal c))

goal (1 subgoal):
 1. \<And>n. \<lbrakk>ereal c < inverse (ereal (root n (norm (f n)))); 2 * norm (inverse c ^ n) \<le> norm (f n); 0 < n\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
have "\<dots> = ereal c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inverse (inverse (ereal c)) = ereal c
[PROOF STEP]
using c C
[PROOF STATE]
proof (prove)
using this:
ereal C < ereal c
c < inverse l
ereal c < conv_radius f
0 < C

goal (1 subgoal):
 1. inverse (inverse (ereal c)) = ereal c
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
inverse (inverse (ereal c)) = ereal c

goal (1 subgoal):
 1. \<And>n. \<lbrakk>ereal c < inverse (ereal (root n (norm (f n)))); 2 * norm (inverse c ^ n) \<le> norm (f n); 0 < n\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
inverse (inverse (ereal c)) = ereal c

goal (1 subgoal):
 1. \<And>n. \<lbrakk>ereal c < inverse (ereal (root n (norm (f n)))); 2 * norm (inverse c ^ n) \<le> norm (f n); 0 < n\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
have "\<dots> < inverse (ereal (root n (norm (f n))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ereal c < inverse (ereal (root n (norm (f n))))
[PROOF STEP]
using elim
[PROOF STATE]
proof (prove)
using this:
ereal c < inverse (ereal (root n (norm (f n))))
2 * norm (inverse c ^ n) \<le> norm (f n)
0 < n

goal (1 subgoal):
 1. ereal c < inverse (ereal (root n (norm (f n))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
ereal c < inverse (ereal (root n (norm (f n))))

goal (1 subgoal):
 1. \<And>n. \<lbrakk>ereal c < inverse (ereal (root n (norm (f n)))); 2 * norm (inverse c ^ n) \<le> norm (f n); 0 < n\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
?P
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
?P

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in sequentially. False

goal (1 subgoal):
 1. \<not> conv_radius f \<le> ereal C \<Longrightarrow> False
[PROOF STEP]
thus False
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F n in sequentially. False

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
conv_radius f \<le> ereal C

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lconsts_freshen: "lconsts (freshen a f) = freshenLC a ` lconsts f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lconsts (freshen a f) = freshenLC a ` lconsts f
[PROOF STEP]
unfolding freshen_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lconsts (renameLCs (freshenLC a) f) = freshenLC a ` lconsts f
[PROOF STEP]
by (rule lconsts_renameLCs)


[STATEMENT]
lemma rel_sym:
  assumes "x \<sim> y" "x \<in> R \<times> S" "y \<in> R \<times> S" shows "y \<sim> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y \<sim> x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. y \<sim> x
[PROOF STEP]
obtain rx sx ry sy s
    where \<section>: "rx \<in> R" "sx \<in> S" "ry \<in> R" "s \<in> S" "sy \<in> S" "s \<cdot> (sy \<cdot> rx - sx \<cdot> ry) = \<zero>" "x = (rx,sx)" "y = (ry,sy)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>rx sx ry s sy. \<lbrakk>rx \<in> R; sx \<in> S; ry \<in> R; s \<in> S; sy \<in> S; s \<cdot> (sy \<cdot> rx - sx \<cdot> ry) = \<zero>; x = (rx, sx); y = (ry, sy)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
x \<sim> y
x \<in> R \<times> S
y \<in> R \<times> S

goal (1 subgoal):
 1. (\<And>rx sx ry s sy. \<lbrakk>rx \<in> R; sx \<in> S; ry \<in> R; s \<in> S; sy \<in> S; s \<cdot> (sy \<cdot> rx - sx \<cdot> ry) = \<zero>; x = (rx, sx); y = (ry, sy)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: rel_def)
[PROOF STATE]
proof (state)
this:
rx \<in> R
sx \<in> S
ry \<in> R
s \<in> S
sy \<in> S
s \<cdot> (sy \<cdot> rx - sx \<cdot> ry) = \<zero>
x = (rx, sx)
y = (ry, sy)

goal (1 subgoal):
 1. y \<sim> x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
rx \<in> R
sx \<in> S
ry \<in> R
s \<in> S
sy \<in> S
s \<cdot> (sy \<cdot> rx - sx \<cdot> ry) = \<zero>
x = (rx, sx)
y = (ry, sy)
[PROOF STEP]
have "s \<cdot> (sx \<cdot> ry - sy \<cdot> rx) = \<zero>"
[PROOF STATE]
proof (prove)
using this:
rx \<in> R
sx \<in> S
ry \<in> R
s \<in> S
sy \<in> S
s \<cdot> (sy \<cdot> rx - sx \<cdot> ry) = \<zero>
x = (rx, sx)
y = (ry, sy)

goal (1 subgoal):
 1. s \<cdot> (sx \<cdot> ry - sy \<cdot> rx) = \<zero>
[PROOF STEP]
by (metis sub comm.additive.cancel_imp_equal comm.inverse_distributive(1) comm.multiplicative.composition_closed)
[PROOF STATE]
proof (state)
this:
s \<cdot> (sx \<cdot> ry - sy \<cdot> rx) = \<zero>

goal (1 subgoal):
 1. y \<sim> x
[PROOF STEP]
with \<section>
[PROOF STATE]
proof (chain)
picking this:
rx \<in> R
sx \<in> S
ry \<in> R
s \<in> S
sy \<in> S
s \<cdot> (sy \<cdot> rx - sx \<cdot> ry) = \<zero>
x = (rx, sx)
y = (ry, sy)
s \<cdot> (sx \<cdot> ry - sy \<cdot> rx) = \<zero>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
rx \<in> R
sx \<in> S
ry \<in> R
s \<in> S
sy \<in> S
s \<cdot> (sy \<cdot> rx - sx \<cdot> ry) = \<zero>
x = (rx, sx)
y = (ry, sy)
s \<cdot> (sx \<cdot> ry - sy \<cdot> rx) = \<zero>

goal (1 subgoal):
 1. y \<sim> x
[PROOF STEP]
by (auto simp: rel_def)
[PROOF STATE]
proof (state)
this:
y \<sim> x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ex_incl_iff_subset:
    assumes "ide a" and "ide b"
    shows "(\<exists>f. \<guillemotleft>f : a \<rightarrow> b\<guillemotright> \<and> incl f) \<longleftrightarrow> set a \<subseteq> set b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>f. \<guillemotleft>f : a \<rightarrow> b\<guillemotright> \<and> incl f) = (local.set a \<subseteq> local.set b)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<exists>f. \<guillemotleft>f : a \<rightarrow> b\<guillemotright> \<and> incl f \<Longrightarrow> local.set a \<subseteq> local.set b
 2. local.set a \<subseteq> local.set b \<Longrightarrow> \<exists>f. \<guillemotleft>f : a \<rightarrow> b\<guillemotright> \<and> incl f
[PROOF STEP]
show "\<exists>f. \<guillemotleft>f : a \<rightarrow> b\<guillemotright> \<and> incl f \<Longrightarrow> set a \<subseteq> set b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>f. \<guillemotleft>f : a \<rightarrow> b\<guillemotright> \<and> incl f \<Longrightarrow> local.set a \<subseteq> local.set b
[PROOF STEP]
using incl_def
[PROOF STATE]
proof (prove)
using this:
incl ?f = (arr ?f \<and> local.set (local.dom ?f) \<subseteq> local.set (cod ?f) \<and> ?f = mkArr (local.set (local.dom ?f)) (local.set (cod ?f)) (\<lambda>x. x))

goal (1 subgoal):
 1. \<exists>f. \<guillemotleft>f : a \<rightarrow> b\<guillemotright> \<and> incl f \<Longrightarrow> local.set a \<subseteq> local.set b
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>f. \<guillemotleft>f : a \<rightarrow> b\<guillemotright> \<and> incl f \<Longrightarrow> local.set a \<subseteq> local.set b

goal (1 subgoal):
 1. local.set a \<subseteq> local.set b \<Longrightarrow> \<exists>f. \<guillemotleft>f : a \<rightarrow> b\<guillemotright> \<and> incl f
[PROOF STEP]
show "set a \<subseteq> set b \<Longrightarrow> \<exists>f. \<guillemotleft>f : a \<rightarrow> b\<guillemotright> \<and> incl f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.set a \<subseteq> local.set b \<Longrightarrow> \<exists>f. \<guillemotleft>f : a \<rightarrow> b\<guillemotright> \<and> incl f
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. local.set a \<subseteq> local.set b \<Longrightarrow> \<guillemotleft>?f : a \<rightarrow> b\<guillemotright> \<and> incl ?f
[PROOF STEP]
assume 1: "set a \<subseteq> set b"
[PROOF STATE]
proof (state)
this:
local.set a \<subseteq> local.set b

goal (1 subgoal):
 1. local.set a \<subseteq> local.set b \<Longrightarrow> \<guillemotleft>?f : a \<rightarrow> b\<guillemotright> \<and> incl ?f
[PROOF STEP]
show "\<guillemotleft>mkArr (set a) (set b) (\<lambda>x. x) : a \<rightarrow> b\<guillemotright> \<and> incl (mkArr (set a) (set b) (\<lambda>x. x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<guillemotleft>mkArr (local.set a) (local.set b) (\<lambda>x. x) : a \<rightarrow> b\<guillemotright> \<and> incl (mkArr (local.set a) (local.set b) (\<lambda>x. x))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<guillemotleft>mkArr (local.set a) (local.set b) (\<lambda>x. x) : a \<rightarrow> b\<guillemotright>
 2. incl (mkArr (local.set a) (local.set b) (\<lambda>x. x))
[PROOF STEP]
show "\<guillemotleft>mkArr (set a) (set b) (\<lambda>x. x) : a \<rightarrow> b\<guillemotright>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<guillemotleft>mkArr (local.set a) (local.set b) (\<lambda>x. x) : a \<rightarrow> b\<guillemotright>
[PROOF STEP]
by (metis 1 assms image_ident image_subset_iff_funcset mkIde_set
                mkArr_in_hom setp_set_ide)
[PROOF STATE]
proof (state)
this:
\<guillemotleft>mkArr (local.set a) (local.set b) (\<lambda>x. x) : a \<rightarrow> b\<guillemotright>

goal (1 subgoal):
 1. incl (mkArr (local.set a) (local.set b) (\<lambda>x. x))
[PROOF STEP]
thus "incl (mkArr (set a) (set b) (\<lambda>x. x))"
[PROOF STATE]
proof (prove)
using this:
\<guillemotleft>mkArr (local.set a) (local.set b) (\<lambda>x. x) : a \<rightarrow> b\<guillemotright>

goal (1 subgoal):
 1. incl (mkArr (local.set a) (local.set b) (\<lambda>x. x))
[PROOF STEP]
using 1 incl_def
[PROOF STATE]
proof (prove)
using this:
\<guillemotleft>mkArr (local.set a) (local.set b) (\<lambda>x. x) : a \<rightarrow> b\<guillemotright>
local.set a \<subseteq> local.set b
incl ?f = (arr ?f \<and> local.set (local.dom ?f) \<subseteq> local.set (cod ?f) \<and> ?f = mkArr (local.set (local.dom ?f)) (local.set (cod ?f)) (\<lambda>x. x))

goal (1 subgoal):
 1. incl (mkArr (local.set a) (local.set b) (\<lambda>x. x))
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
incl (mkArr (local.set a) (local.set b) (\<lambda>x. x))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<guillemotleft>mkArr (local.set a) (local.set b) (\<lambda>x. x) : a \<rightarrow> b\<guillemotright> \<and> incl (mkArr (local.set a) (local.set b) (\<lambda>x. x))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
local.set a \<subseteq> local.set b \<Longrightarrow> \<exists>f. \<guillemotleft>f : a \<rightarrow> b\<guillemotright> \<and> incl f

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma SUPSEQ_regular:
  fixes A::"'a::finite lang"
  assumes "regular A"
  shows "regular (SUPSEQ A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. regular (SUPSEQ A)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. regular (SUPSEQ A)
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
regular A
[PROOF STEP]
obtain r::"'a::finite rexp" where "lang r = A"
[PROOF STATE]
proof (prove)
using this:
regular A

goal (1 subgoal):
 1. (\<And>r. lang r = A \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
lang r = A

goal (1 subgoal):
 1. regular (SUPSEQ A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
lang r = A
[PROOF STEP]
have "lang (UP r) = SUPSEQ A"
[PROOF STATE]
proof (prove)
using this:
lang r = A

goal (1 subgoal):
 1. lang (UP r) = SUPSEQ A
[PROOF STEP]
by (simp add: lang_UP)
[PROOF STATE]
proof (state)
this:
lang (UP r) = SUPSEQ A

goal (1 subgoal):
 1. regular (SUPSEQ A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
lang (UP r) = SUPSEQ A
[PROOF STEP]
show "regular (SUPSEQ A)"
[PROOF STATE]
proof (prove)
using this:
lang (UP r) = SUPSEQ A

goal (1 subgoal):
 1. regular (SUPSEQ A)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
regular (SUPSEQ A)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma prod_eq_linorder[intro?]:
  assumes "eq_linorder_on D1 cmp1"
  assumes "eq_linorder_on D2 cmp2"
  shows "eq_linorder_on (D1\<times>D2) (cmp_prod cmp1 cmp2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eq_linorder_on (D1 \<times> D2) (cmp_prod cmp1 cmp2)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. eq_linorder_on (D1 \<times> D2) (cmp_prod cmp1 cmp2)
[PROOF STEP]
interpret A: eq_linorder_on D1 cmp1
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eq_linorder_on D1 cmp1
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. eq_linorder_on (D1 \<times> D2) (cmp_prod cmp1 cmp2)
[PROOF STEP]
interpret B: eq_linorder_on D2 cmp2
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eq_linorder_on D2 cmp2
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. eq_linorder_on (D1 \<times> D2) (cmp_prod cmp1 cmp2)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eq_linorder_on (D1 \<times> D2) (cmp_prod cmp1 cmp2)
[PROOF STEP]
apply (rule eq_linorder_on.intro)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. linorder_on (D1 \<times> D2) (cmp_prod cmp1 cmp2)
 2. eq_linorder_on_axioms (D1 \<times> D2) (cmp_prod cmp1 cmp2)
[PROOF STEP]
apply rule
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. linorder_on D1 cmp1
 2. linorder_on D2 cmp2
 3. eq_linorder_on_axioms (D1 \<times> D2) (cmp_prod cmp1 cmp2)
[PROOF STEP]
apply unfold_locales
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> D1 \<times> D2; y \<in> D1 \<times> D2; cmp_prod cmp1 cmp2 x y = EQUAL\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
apply (auto split: comp_res.splits)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
eq_linorder_on (D1 \<times> D2) (cmp_prod cmp1 cmp2)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem Decrypt_Decrypt_eq [iff]:
  shows "(Decrypt K X = Decrypt K X') = (X=X')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Decrypt K X = Decrypt K X') = (X = X')
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. Decrypt K X = Decrypt K X' \<Longrightarrow> X = X'
 2. X = X' \<Longrightarrow> Decrypt K X = Decrypt K X'
[PROOF STEP]
assume "Decrypt K X = Decrypt K X'"
[PROOF STATE]
proof (state)
this:
Decrypt K X = Decrypt K X'

goal (2 subgoals):
 1. Decrypt K X = Decrypt K X' \<Longrightarrow> X = X'
 2. X = X' \<Longrightarrow> Decrypt K X = Decrypt K X'
[PROOF STEP]
hence "Crypt K (Decrypt K X) = Crypt K (Decrypt K X')"
[PROOF STATE]
proof (prove)
using this:
Decrypt K X = Decrypt K X'

goal (1 subgoal):
 1. Crypt K (Decrypt K X) = Crypt K (Decrypt K X')
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Crypt K (Decrypt K X) = Crypt K (Decrypt K X')

goal (2 subgoals):
 1. Decrypt K X = Decrypt K X' \<Longrightarrow> X = X'
 2. X = X' \<Longrightarrow> Decrypt K X = Decrypt K X'
[PROOF STEP]
thus "X = X'"
[PROOF STATE]
proof (prove)
using this:
Crypt K (Decrypt K X) = Crypt K (Decrypt K X')

goal (1 subgoal):
 1. X = X'
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
X = X'

goal (1 subgoal):
 1. X = X' \<Longrightarrow> Decrypt K X = Decrypt K X'
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. X = X' \<Longrightarrow> Decrypt K X = Decrypt K X'
[PROOF STEP]
assume "X = X'"
[PROOF STATE]
proof (state)
this:
X = X'

goal (1 subgoal):
 1. X = X' \<Longrightarrow> Decrypt K X = Decrypt K X'
[PROOF STEP]
thus "Decrypt K X = Decrypt K X'"
[PROOF STATE]
proof (prove)
using this:
X = X'

goal (1 subgoal):
 1. Decrypt K X = Decrypt K X'
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Decrypt K X = Decrypt K X'

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in group) cosets_finite:
     "\<lbrakk>c \<in> rcosets H;  H \<subseteq> carrier G;  finite (carrier G)\<rbrakk> \<Longrightarrow> finite c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>c \<in> rcosets H; H \<subseteq> carrier G; finite (carrier G)\<rbrakk> \<Longrightarrow> finite c
[PROOF STEP]
unfolding RCOSETS_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>c \<in> (\<Union>a\<in>carrier G. {H #> a}); H \<subseteq> carrier G; finite (carrier G)\<rbrakk> \<Longrightarrow> finite c
[PROOF STEP]
by (auto simp add: r_coset_subset_G [THEN finite_subset])


[STATEMENT]
lemma subdegree_inverse [simp]:
  fixes f :: "'a::{ab_group_add,inverse,mult_zero} fps"
  shows "subdegree (inverse f) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subdegree (inverse f) = 0
[PROOF STEP]
using subdegree_lr_inverse(2)
[PROOF STATE]
proof (prove)
using this:
subdegree (fps_right_inverse ?g ?y) = 0

goal (1 subgoal):
 1. subdegree (inverse f) = 0
[PROOF STEP]
by    (simp add: fps_inverse_def)


[STATEMENT]
lemma i_map2_cong: "
  \<lbrakk> xs1 = xs2; ys1 = ys2;
    \<And>x y. \<lbrakk> x \<in> range xs2; y \<in> range ys2 \<rbrakk> \<Longrightarrow> f x y = g x y \<rbrakk> \<Longrightarrow>
  i_map2 f xs1 ys1 = i_map2 g xs2 ys2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>xs1 = xs2; ys1 = ys2; \<And>x y. \<lbrakk>x \<in> range xs2; y \<in> range ys2\<rbrakk> \<Longrightarrow> f x y = g x y\<rbrakk> \<Longrightarrow> i_map2 f xs1 ys1 = i_map2 g xs2 ys2
[PROOF STEP]
by (simp add: fun_eq_iff i_map2_nth)


[STATEMENT]
lemma inj_on_funpow_dist1:
  assumes "y \<in> orbit f x" shows "inj_on (\<lambda>n. (f ^^ n) x) {0..<funpow_dist1 f x y}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on (\<lambda>n. (f ^^ n) x) {0..<funpow_dist1 f x y}
[PROOF STEP]
using funpow_neq_less_funpow_dist1[OF assms]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?m < funpow_dist1 f x y; ?n < funpow_dist1 f x y; ?m \<noteq> ?n\<rbrakk> \<Longrightarrow> (f ^^ ?m) x \<noteq> (f ^^ ?n) x

goal (1 subgoal):
 1. inj_on (\<lambda>n. (f ^^ n) x) {0..<funpow_dist1 f x y}
[PROOF STEP]
by (intro inj_onI) auto


[STATEMENT]
lemma block_sizes_non_empty:
  assumes "\<B> \<noteq> {#}"
  shows "card (sys_block_sizes) > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < card sys_block_sizes
[PROOF STEP]
using finite_block_sizes block_sizes_non_empty_set
[PROOF STATE]
proof (prove)
using this:
finite sys_block_sizes
\<B> \<noteq> {#} \<Longrightarrow> sys_block_sizes \<noteq> {}

goal (1 subgoal):
 1. 0 < card sys_block_sizes
[PROOF STEP]
by (simp add: assms card_gt_0_iff)


[STATEMENT]
lemma ereal_divide_left_mono[simp]:
  fixes x y z :: ereal
  assumes "y \<le> x"
    and "0 < z"
    and "0 < x * y"
  shows "z / x \<le> z / y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z / x \<le> z / y
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
y \<le> x
0 < z
0 < x * y

goal (1 subgoal):
 1. z / x \<le> z / y
[PROOF STEP]
by (cases x y z rule: ereal3_cases)
     (auto intro: divide_left_mono simp: field_simps zero_less_mult_iff mult_less_0_iff split: if_split_asm)


[STATEMENT]
lemma list_length_tl_neq_Nil: "1 < length (nl::nat list) \<Longrightarrow> tl nl \<noteq> []"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 < length nl \<Longrightarrow> tl nl \<noteq> []
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>1 < length nl; tl nl = []\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
assume "1 < length nl" and "tl nl = []"
[PROOF STATE]
proof (state)
this:
1 < length nl
tl nl = []

goal (1 subgoal):
 1. \<lbrakk>1 < length nl; tl nl = []\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
1 < length nl
tl nl = []
[PROOF STEP]
have "length (tl nl) = 0"
[PROOF STATE]
proof (prove)
using this:
1 < length nl
tl nl = []

goal (1 subgoal):
 1. length (tl nl) = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
length (tl nl) = 0

goal (1 subgoal):
 1. \<lbrakk>1 < length nl; tl nl = []\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
with \<open>1 < length nl\<close> and length_tl
[PROOF STATE]
proof (chain)
picking this:
1 < length nl
length (tl ?xs) = length ?xs - 1
length (tl nl) = 0
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
1 < length nl
length (tl ?xs) = length ?xs - 1
length (tl nl) = 0

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma bottom_weak_eq:
  "\<lbrakk> b \<in> carrier L; \<And> x. x \<in> carrier L \<Longrightarrow> b \<sqsubseteq> x \<rbrakk> \<Longrightarrow> b .= \<bottom>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>b \<in> carrier L; \<And>x. x \<in> carrier L \<Longrightarrow> b \<sqsubseteq> x\<rbrakk> \<Longrightarrow> b .= \<bottom>
[PROOF STEP]
by (metis bottom_closed bottom_lower weak_le_antisym)


[STATEMENT]
lemma convex_hull_empty[simp]: "convex hull {} = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. convex hull {} = {}
[PROOF STEP]
by (rule hull_unique) auto


[STATEMENT]
lemma sum_lower_bound_card:
  assumes "bp P"
  shows "(\<Sum>u \<in> U. w u) \<le> c * card P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. W U \<le> real (c * card P)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. W U \<le> real (c * card P)
[PROOF STEP]
have *: "\<forall>B \<in> P. 0 < W B \<and> W B \<le> c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>B\<in>P. 0 < W B \<and> W B \<le> real c
[PROOF STEP]
using bpE(2-4)[OF assms] weight
[PROOF STATE]
proof (prove)
using this:
{} \<notin> P
\<Union> P = U
\<forall>B\<in>P. W B \<le> real c
\<forall>u\<in>U. 0 < w u \<and> w u \<le> real c

goal (1 subgoal):
 1. \<forall>B\<in>P. 0 < W B \<and> W B \<le> real c
[PROOF STEP]
by (metis UnionI assms bp_bins_finite sum_pos)
[PROOF STATE]
proof (state)
this:
\<forall>B\<in>P. 0 < W B \<and> W B \<le> real c

goal (1 subgoal):
 1. W U \<le> real (c * card P)
[PROOF STEP]
have "(\<Sum>u \<in> U. w u) = (\<Sum>B \<in> P. W B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. W U = sum W P
[PROOF STEP]
using sum_Un_eq_sum_sum[OF assms]
[PROOF STATE]
proof (prove)
using this:
W U = sum W P

goal (1 subgoal):
 1. W U = sum W P
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
W U = sum W P

goal (1 subgoal):
 1. W U \<le> real (c * card P)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
W U = sum W P

goal (1 subgoal):
 1. W U \<le> real (c * card P)
[PROOF STEP]
have "... \<le> (\<Sum>B \<in> P. c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum W P \<le> real (\<Sum>B\<in>P. c)
[PROOF STEP]
using sum_mono *
[PROOF STATE]
proof (prove)
using this:
(\<And>i. i \<in> ?K \<Longrightarrow> ?f i \<le> ?g i) \<Longrightarrow> sum ?f ?K \<le> sum ?g ?K
\<forall>B\<in>P. 0 < W B \<and> W B \<le> real c

goal (1 subgoal):
 1. sum W P \<le> real (\<Sum>B\<in>P. c)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
sum W P \<le> real (\<Sum>B\<in>P. c)

goal (1 subgoal):
 1. W U \<le> real (c * card P)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sum W P \<le> real (\<Sum>B\<in>P. c)

goal (1 subgoal):
 1. W U \<le> real (c * card P)
[PROOF STEP]
have "... = c * card P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real (\<Sum>B\<in>P. c) = real (c * card P)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
real (\<Sum>B\<in>P. c) = real (c * card P)

goal (1 subgoal):
 1. W U \<le> real (c * card P)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
W U \<le> real (c * card P)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
W U \<le> real (c * card P)

goal (1 subgoal):
 1. W U \<le> real (c * card P)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
W U \<le> real (c * card P)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma nfoldli_map_inv:
  assumes "inj g"
  shows "nfoldli l c f = nfoldli (map g l) c (\<lambda>x s. f (the_inv g x) s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nfoldli l c f = nfoldli (map g l) c (\<lambda>x. f (the_inv g x))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
inj g

goal (1 subgoal):
 1. nfoldli l c f = nfoldli (map g l) c (\<lambda>x. f (the_inv g x))
[PROOF STEP]
apply (induction l)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. inj g \<Longrightarrow> nfoldli [] c f = nfoldli (map g []) c (\<lambda>x. f (the_inv g x))
 2. \<And>a l. \<lbrakk>inj g \<Longrightarrow> nfoldli l c f = nfoldli (map g l) c (\<lambda>x. f (the_inv g x)); inj g\<rbrakk> \<Longrightarrow> nfoldli (a # l) c f = nfoldli (map g (a # l)) c (\<lambda>x. f (the_inv g x))
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj g \<Longrightarrow> nfoldli [] c f = nfoldli (map g []) c (\<lambda>x. f (the_inv g x))
[PROOF STEP]
by auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a l. \<lbrakk>inj g \<Longrightarrow> nfoldli l c f = nfoldli (map g l) c (\<lambda>x. f (the_inv g x)); inj g\<rbrakk> \<Longrightarrow> nfoldli (a # l) c f = nfoldli (map g (a # l)) c (\<lambda>x. f (the_inv g x))
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>inj g \<Longrightarrow> nfoldli l_ c f = nfoldli (map g l_) c (\<lambda>x. f (the_inv g x)); inj g\<rbrakk> \<Longrightarrow> nfoldli (a_ # l_) c f = nfoldli (map g (a_ # l_)) c (\<lambda>x. f (the_inv g x))
[PROOF STEP]
by (auto simp: the_inv_f_f)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma incident_sedges_empty[simp]: "v \<notin> V \<Longrightarrow> incident_sedges v = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. v \<notin> V \<Longrightarrow> incident_sedges v = {}
[PROOF STEP]
unfolding incident_sedges_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. v \<notin> V \<Longrightarrow> {e \<in> E. incident v e \<and> card e = 2} = {}
[PROOF STEP]
using incident_def wellformed
[PROOF STATE]
proof (prove)
using this:
incident ?v ?e \<equiv> ?v \<in> ?e
?e \<in> E \<Longrightarrow> ?e \<subseteq> V

goal (1 subgoal):
 1. v \<notin> V \<Longrightarrow> {e \<in> E. incident v e \<and> card e = 2} = {}
[PROOF STEP]
by fastforce


[STATEMENT]
lemma l: "l > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < l
[PROOF STEP]
using n_voters_pos
[PROOF STATE]
proof (prove)
using this:
0 < l * (k + 1)

goal (1 subgoal):
 1. 0 < l
[PROOF STEP]
by auto


[STATEMENT]
lemma poly_nate_poly:
  "poly (poly_nate bs p) = (\<lambda>x:: 'a ::field_char_0. \<lparr>p\<rparr>\<^sub>p\<^bsup>x # bs\<^esup>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly (poly_nate bs p) = (\<lambda>x. \<lparr>p\<rparr>\<^sub>p\<^bsup>x # bs\<^esup>)
[PROOF STEP]
using polypoly'_poly[OF polynate_norm[unfolded isnpoly_def], symmetric, of bs p]
[PROOF STATE]
proof (prove)
using this:
poly (polypoly' bs (polynate p)) ?x = \<lparr>polynate p\<rparr>\<^sub>p\<^bsup>?x # bs\<^esup>

goal (1 subgoal):
 1. poly (poly_nate bs p) = (\<lambda>x. \<lparr>p\<rparr>\<^sub>p\<^bsup>x # bs\<^esup>)
[PROOF STEP]
unfolding poly_nate_polypoly'
[PROOF STATE]
proof (prove)
using this:
poly (polypoly' bs (polynate p)) ?x = \<lparr>polynate p\<rparr>\<^sub>p\<^bsup>?x # bs\<^esup>

goal (1 subgoal):
 1. poly (polypoly' bs (polynate p)) = (\<lambda>x. \<lparr>p\<rparr>\<^sub>p\<^bsup>x # bs\<^esup>)
[PROOF STEP]
by auto


[STATEMENT]
lemma (in information_space) KL_nonneg:
  assumes "prob_space (density M D)"
  assumes D: "D \<in> borel_measurable M" "AE x in M. 0 \<le> D x"
  assumes int: "integrable M (\<lambda>x. D x * log b (D x))"
  shows "0 \<le> KL_divergence b M (density M D)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> KL_divergence b M (density M (\<lambda>x. ennreal (D x)))
[PROOF STEP]
using KL_gt_0[OF assms]
[PROOF STATE]
proof (prove)
using this:
density M (\<lambda>x. ennreal (D x)) \<noteq> M \<Longrightarrow> 0 < KL_divergence b M (density M (\<lambda>x. ennreal (D x)))

goal (1 subgoal):
 1. 0 \<le> KL_divergence b M (density M (\<lambda>x. ennreal (D x)))
[PROOF STEP]
by (cases "density M D = M") (auto simp: KL_same_eq_0)


[STATEMENT]
lemma tarski_omega_idempotent:
  "x\<^sup>\<omega>\<^sup>\<omega> = x\<^sup>\<omega>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x\<^sup>\<omega>\<^sup>\<omega> = x\<^sup>\<omega>
[PROOF STEP]
by (metis omega_vector tarski_top_omega)


[STATEMENT]
lemma dist_eq_dist_code_lt:
  fixes p\<^sub>0 :: point
  shows "dist p\<^sub>0 p\<^sub>1 < dist p\<^sub>2 p\<^sub>3 \<longleftrightarrow> dist_code p\<^sub>0 p\<^sub>1 < dist_code p\<^sub>2 p\<^sub>3"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (dist (case p\<^sub>0 of (x, y) \<Rightarrow> (real_of_int x, real_of_int y)) (case p\<^sub>1 of (x, y) \<Rightarrow> (real_of_int x, real_of_int y)) < dist (case p\<^sub>2 of (x, y) \<Rightarrow> (real_of_int x, real_of_int y)) (case p\<^sub>3 of (x, y) \<Rightarrow> (real_of_int x, real_of_int y))) = (dist_code p\<^sub>0 p\<^sub>1 < dist_code p\<^sub>2 p\<^sub>3)
[PROOF STEP]
using dist_eq_sqrt_dist_code real_sqrt_less_iff
[PROOF STATE]
proof (prove)
using this:
dist (case ?p\<^sub>0 of (x, y) \<Rightarrow> (real_of_int x, real_of_int y)) (case ?p\<^sub>1 of (x, y) \<Rightarrow> (real_of_int x, real_of_int y)) = sqrt (real_of_int (dist_code ?p\<^sub>0 ?p\<^sub>1))
(sqrt ?x < sqrt ?y) = (?x < ?y)

goal (1 subgoal):
 1. (dist (case p\<^sub>0 of (x, y) \<Rightarrow> (real_of_int x, real_of_int y)) (case p\<^sub>1 of (x, y) \<Rightarrow> (real_of_int x, real_of_int y)) < dist (case p\<^sub>2 of (x, y) \<Rightarrow> (real_of_int x, real_of_int y)) (case p\<^sub>3 of (x, y) \<Rightarrow> (real_of_int x, real_of_int y))) = (dist_code p\<^sub>0 p\<^sub>1 < dist_code p\<^sub>2 p\<^sub>3)
[PROOF STEP]
by presburger


[STATEMENT]
lemma Suc_minus1: "Suc (x - Suc 0) = (if x = 0 then Suc 0 else x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Suc (x - Suc 0) = (if x = 0 then Suc 0 else x)
[PROOF STEP]
by auto


[STATEMENT]
lemma MapsToCompDef:
  assumes "f maps\<^bsub>C\<^esub> X to Y" and "g maps\<^bsub>C\<^esub> Y to Z"
  shows "f \<approx>>\<^bsub>C\<^esub> g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<approx>>\<^bsub>C\<^esub> g
[PROOF STEP]
proof(rule CompDefinedI)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. f \<in> mor\<^bsub>C\<^esub>
 2. g \<in> mor\<^bsub>C\<^esub>
 3. cod\<^bsub>C\<^esub> f = dom\<^bsub>C\<^esub> g
[PROOF STEP]
show "f \<in> mor\<^bsub>C\<^esub>" and "g \<in> mor\<^bsub>C\<^esub>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<in> mor\<^bsub>C\<^esub> &&& g \<in> mor\<^bsub>C\<^esub>
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
f maps\<^bsub>C\<^esub> X to Y
g maps\<^bsub>C\<^esub> Y to Z

goal (1 subgoal):
 1. f \<in> mor\<^bsub>C\<^esub> &&& g \<in> mor\<^bsub>C\<^esub>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f \<in> mor\<^bsub>C\<^esub>
g \<in> mor\<^bsub>C\<^esub>

goal (1 subgoal):
 1. cod\<^bsub>C\<^esub> f = dom\<^bsub>C\<^esub> g
[PROOF STEP]
have "cod\<^bsub>C\<^esub> f = Y" and "dom\<^bsub>C\<^esub> g = Y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cod\<^bsub>C\<^esub> f = Y &&& dom\<^bsub>C\<^esub> g = Y
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
f maps\<^bsub>C\<^esub> X to Y
g maps\<^bsub>C\<^esub> Y to Z

goal (1 subgoal):
 1. cod\<^bsub>C\<^esub> f = Y &&& dom\<^bsub>C\<^esub> g = Y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
cod\<^bsub>C\<^esub> f = Y
dom\<^bsub>C\<^esub> g = Y

goal (1 subgoal):
 1. cod\<^bsub>C\<^esub> f = dom\<^bsub>C\<^esub> g
[PROOF STEP]
thus "cod\<^bsub>C\<^esub> f = dom\<^bsub>C\<^esub> g"
[PROOF STATE]
proof (prove)
using this:
cod\<^bsub>C\<^esub> f = Y
dom\<^bsub>C\<^esub> g = Y

goal (1 subgoal):
 1. cod\<^bsub>C\<^esub> f = dom\<^bsub>C\<^esub> g
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
cod\<^bsub>C\<^esub> f = dom\<^bsub>C\<^esub> g

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Limit_mk_doubleton_image_vsubset_Vset:
  assumes "Limit \<alpha>" and "X \<subseteq>\<^sub>\<circ> Y" and "Y \<in>\<^sub>\<circ> Vset \<alpha>"
  shows "mk_doubleton_image X Y \<subseteq>\<^sub>\<circ> Vset \<alpha>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mk_doubleton_image X Y \<subseteq>\<^sub>\<circ> Vset \<alpha>
[PROOF STEP]
proof(intro vsubsetI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in>\<^sub>\<circ> mk_doubleton_image X Y \<Longrightarrow> x \<in>\<^sub>\<circ> Vset \<alpha>
[PROOF STEP]
fix b
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in>\<^sub>\<circ> mk_doubleton_image X Y \<Longrightarrow> x \<in>\<^sub>\<circ> Vset \<alpha>
[PROOF STEP]
assume "b \<in>\<^sub>\<circ> mk_doubleton_image X Y"
[PROOF STATE]
proof (state)
this:
b \<in>\<^sub>\<circ> mk_doubleton_image X Y

goal (1 subgoal):
 1. \<And>x. x \<in>\<^sub>\<circ> mk_doubleton_image X Y \<Longrightarrow> x \<in>\<^sub>\<circ> Vset \<alpha>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
b \<in>\<^sub>\<circ> mk_doubleton_image X Y
[PROOF STEP]
obtain a where "b = mk_doubleton Y a" and "a \<in>\<^sub>\<circ> X"
[PROOF STATE]
proof (prove)
using this:
b \<in>\<^sub>\<circ> mk_doubleton_image X Y

goal (1 subgoal):
 1. (\<And>a. \<lbrakk>b = mk_doubleton Y a; a \<in>\<^sub>\<circ> X\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding mk_doubleton_image_def
[PROOF STATE]
proof (prove)
using this:
b \<in>\<^sub>\<circ> set (mk_doubleton Y ` elts X)

goal (1 subgoal):
 1. (\<And>a. \<lbrakk>b = mk_doubleton Y a; a \<in>\<^sub>\<circ> X\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by clarsimp
[PROOF STATE]
proof (state)
this:
b = mk_doubleton Y a
a \<in>\<^sub>\<circ> X

goal (1 subgoal):
 1. \<And>x. x \<in>\<^sub>\<circ> mk_doubleton_image X Y \<Longrightarrow> x \<in>\<^sub>\<circ> Vset \<alpha>
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
Limit \<alpha>
X \<subseteq>\<^sub>\<circ> Y
Y \<in>\<^sub>\<circ> Vset \<alpha>
b = mk_doubleton Y a
a \<in>\<^sub>\<circ> X
[PROOF STEP]
have b_def: "b = set {a, Y}" and a\<alpha>: "a \<in>\<^sub>\<circ> Vset \<alpha>"
[PROOF STATE]
proof (prove)
using this:
Limit \<alpha>
X \<subseteq>\<^sub>\<circ> Y
Y \<in>\<^sub>\<circ> Vset \<alpha>
b = mk_doubleton Y a
a \<in>\<^sub>\<circ> X

goal (1 subgoal):
 1. b = set {a, Y} &&& a \<in>\<^sub>\<circ> Vset \<alpha>
[PROOF STEP]
by (auto simp: mk_doubleton_def)
[PROOF STATE]
proof (state)
this:
b = set {a, Y}
a \<in>\<^sub>\<circ> Vset \<alpha>

goal (1 subgoal):
 1. \<And>x. x \<in>\<^sub>\<circ> mk_doubleton_image X Y \<Longrightarrow> x \<in>\<^sub>\<circ> Vset \<alpha>
[PROOF STEP]
from this(2) assms
[PROOF STATE]
proof (chain)
picking this:
a \<in>\<^sub>\<circ> Vset \<alpha>
Limit \<alpha>
X \<subseteq>\<^sub>\<circ> Y
Y \<in>\<^sub>\<circ> Vset \<alpha>
[PROOF STEP]
show "b \<in>\<^sub>\<circ> Vset \<alpha>"
[PROOF STATE]
proof (prove)
using this:
a \<in>\<^sub>\<circ> Vset \<alpha>
Limit \<alpha>
X \<subseteq>\<^sub>\<circ> Y
Y \<in>\<^sub>\<circ> Vset \<alpha>

goal (1 subgoal):
 1. b \<in>\<^sub>\<circ> Vset \<alpha>
[PROOF STEP]
unfolding b_def
[PROOF STATE]
proof (prove)
using this:
a \<in>\<^sub>\<circ> Vset \<alpha>
Limit \<alpha>
X \<subseteq>\<^sub>\<circ> Y
Y \<in>\<^sub>\<circ> Vset \<alpha>

goal (1 subgoal):
 1. set {a, Y} \<in>\<^sub>\<circ> Vset \<alpha>
[PROOF STEP]
by (simp add: Limit_vdoubleton_in_VsetI)
[PROOF STATE]
proof (state)
this:
b \<in>\<^sub>\<circ> Vset \<alpha>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ftft_4: assumes dx: "dim_vec x = 4"
  and be: "x $ 0 = False \<and> x $ 1 = True \<and> x $ 2 = False \<and> x $ 3 = True"
  shows "ceros_of_boolean_input x = {0,2}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ceros_of_boolean_input x = {0, 2}
[PROOF STEP]
using dx be
[PROOF STATE]
proof (prove)
using this:
dim_vec x = 4
x $ 0 = False \<and> x $ 1 = True \<and> x $ 2 = False \<and> x $ 3 = True

goal (1 subgoal):
 1. ceros_of_boolean_input x = {0, 2}
[PROOF STEP]
unfolding ceros_of_boolean_input_def
[PROOF STATE]
proof (prove)
using this:
dim_vec x = 4
x $ 0 = False \<and> x $ 1 = True \<and> x $ 2 = False \<and> x $ 3 = True

goal (1 subgoal):
 1. {xa. xa < dim_vec x \<and> x $ xa = False} = {0, 2}
[PROOF STEP]
using less_4_cases
[PROOF STATE]
proof (prove)
using this:
dim_vec x = 4
x $ 0 = False \<and> x $ 1 = True \<and> x $ 2 = False \<and> x $ 3 = True
?n < 4 \<Longrightarrow> ?n = 0 \<or> ?n = 1 \<or> ?n = 2 \<or> ?n = 3

goal (1 subgoal):
 1. {xa. xa < dim_vec x \<and> x $ xa = False} = {0, 2}
[PROOF STEP]
by auto


[STATEMENT]
lemma uniformly_continuous_imp_continuous:
  assumes f: "uniformly_continuous_on s f"
  shows "continuous_on s f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on s f
[PROOF STEP]
by (auto simp: filterlim_iff eventually_at_filter eventually_nhds_uniformity continuous_on_def
           elim: eventually_mono dest!: uniformly_continuous_onD[OF f])


[STATEMENT]
theorem substEnv_idEnv: "(idEnv &[X / x]_xs) = (idEnv [x \<leftarrow> X]_xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. idEnv &[X / x]_xs = idEnv [x \<leftarrow> X]_xs
[PROOF STEP]
unfolding substEnv_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. idEnv &[idEnv [x \<leftarrow> X]_xs] = idEnv [x \<leftarrow> X]_xs
[PROOF STEP]
using psubstEnv_idEnv
[PROOF STATE]
proof (prove)
using this:
idEnv &[?rho] = ?rho

goal (1 subgoal):
 1. idEnv &[idEnv [x \<leftarrow> X]_xs] = idEnv [x \<leftarrow> X]_xs
[PROOF STEP]
by auto


[STATEMENT]
lemma right_move_to_left: "a + - c \<le> b \<Longrightarrow> a \<le> b + c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a + - c \<le> b \<Longrightarrow> a \<le> b + c
[PROOF STEP]
apply (drule_tac v = "c" in add_order_preserving_right)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a + - c + c \<le> b + c \<Longrightarrow> a \<le> b + c
[PROOF STEP]
by (simp add: add.assoc)


[STATEMENT]
lemma gfinprod_eq_finprod [simp]: "\<lbrakk>finite A; f \<in> A \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> gfinprod G f A = finprod G f A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite A; f \<in> A \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> gfinprod G f A = finprod G f A
[PROOF STEP]
by (auto simp: gfinprod_def intro: finprod_mono_neutral_cong_left)


[STATEMENT]
lemma sigma_sets_singleton:
  assumes "X \<subseteq> S"
  shows "sigma_sets S { X } = { {}, X, S - X, S }"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sigma_sets S {X} = {{}, X, S - X, S}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sigma_sets S {X} = {{}, X, S - X, S}
[PROOF STEP]
interpret sigma_algebra S "{ {}, X, S - X, S }"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sigma_algebra S {{}, X, S - X, S}
[PROOF STEP]
by (rule sigma_algebra_single_set) fact
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sigma_sets S {X} = {{}, X, S - X, S}
[PROOF STEP]
have "sigma_sets S { X } \<subseteq> sigma_sets S { {}, X, S - X, S }"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sigma_sets S {X} \<subseteq> sigma_sets S {{}, X, S - X, S}
[PROOF STEP]
by (rule sigma_sets_subseteq) simp
[PROOF STATE]
proof (state)
this:
sigma_sets S {X} \<subseteq> sigma_sets S {{}, X, S - X, S}

goal (1 subgoal):
 1. sigma_sets S {X} = {{}, X, S - X, S}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
sigma_sets S {X} \<subseteq> sigma_sets S {{}, X, S - X, S}

goal (1 subgoal):
 1. sigma_sets S {X} = {{}, X, S - X, S}
[PROOF STEP]
have "\<dots> = { {}, X, S - X, S }"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sigma_sets S {{}, X, S - X, S} = {{}, X, S - X, S}
[PROOF STEP]
using sigma_sets_eq
[PROOF STATE]
proof (prove)
using this:
sigma_sets S {{}, X, S - X, S} = {{}, X, S - X, S}

goal (1 subgoal):
 1. sigma_sets S {{}, X, S - X, S} = {{}, X, S - X, S}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
sigma_sets S {{}, X, S - X, S} = {{}, X, S - X, S}

goal (1 subgoal):
 1. sigma_sets S {X} = {{}, X, S - X, S}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
sigma_sets S {{}, X, S - X, S} = {{}, X, S - X, S}

goal (1 subgoal):
 1. sigma_sets S {X} = {{}, X, S - X, S}
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
sigma_sets S {{}, X, S - X, S} = {{}, X, S - X, S}

goal (1 subgoal):
 1. sigma_sets S {X} = {{}, X, S - X, S}
[PROOF STEP]
fix A
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sigma_sets S {X} = {{}, X, S - X, S}
[PROOF STEP]
assume "A \<in> { {}, X, S - X, S }"
[PROOF STATE]
proof (state)
this:
A \<in> {{}, X, S - X, S}

goal (1 subgoal):
 1. sigma_sets S {X} = {{}, X, S - X, S}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
A \<in> {{}, X, S - X, S}
[PROOF STEP]
have "A \<in> sigma_sets S { X }"
[PROOF STATE]
proof (prove)
using this:
A \<in> {{}, X, S - X, S}

goal (1 subgoal):
 1. A \<in> sigma_sets S {X}
[PROOF STEP]
by (auto intro: sigma_sets.intros(2-) sigma_sets_top)
[PROOF STATE]
proof (state)
this:
A \<in> sigma_sets S {X}

goal (1 subgoal):
 1. sigma_sets S {X} = {{}, X, S - X, S}
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
?A2 \<in> {{}, X, S - X, S} \<Longrightarrow> ?A2 \<in> sigma_sets S {X}

goal (1 subgoal):
 1. sigma_sets S {X} = {{}, X, S - X, S}
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
sigma_sets S {X} \<subseteq> sigma_sets S {{}, X, S - X, S}
sigma_sets S {{}, X, S - X, S} = {{}, X, S - X, S}
?A2 \<in> {{}, X, S - X, S} \<Longrightarrow> ?A2 \<in> sigma_sets S {X}
[PROOF STEP]
have "sigma_sets S { X } = sigma_sets S { {}, X, S - X, S }"
[PROOF STATE]
proof (prove)
using this:
sigma_sets S {X} \<subseteq> sigma_sets S {{}, X, S - X, S}
sigma_sets S {{}, X, S - X, S} = {{}, X, S - X, S}
?A2 \<in> {{}, X, S - X, S} \<Longrightarrow> ?A2 \<in> sigma_sets S {X}

goal (1 subgoal):
 1. sigma_sets S {X} = sigma_sets S {{}, X, S - X, S}
[PROOF STEP]
by (intro antisym) auto
[PROOF STATE]
proof (state)
this:
sigma_sets S {X} = sigma_sets S {{}, X, S - X, S}

goal (1 subgoal):
 1. sigma_sets S {X} = {{}, X, S - X, S}
[PROOF STEP]
with sigma_sets_eq
[PROOF STATE]
proof (chain)
picking this:
sigma_sets S {{}, X, S - X, S} = {{}, X, S - X, S}
sigma_sets S {X} = sigma_sets S {{}, X, S - X, S}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
sigma_sets S {{}, X, S - X, S} = {{}, X, S - X, S}
sigma_sets S {X} = sigma_sets S {{}, X, S - X, S}

goal (1 subgoal):
 1. sigma_sets S {X} = {{}, X, S - X, S}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
sigma_sets S {X} = {{}, X, S - X, S}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma closed_segment_line_iff:
  "{a--line a b i} = line a b ` {0..i}"
  if "0 < i" "a \<noteq> b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {a--{a -- b}\<^bsub>i\<^esub>} = {a -- b}\<^bsub>`{0..i}\<^esub>
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
0 < i
a \<noteq> b

goal (1 subgoal):
 1. {a--{a -- b}\<^bsub>i\<^esub>} = {a -- b}\<^bsub>`{0..i}\<^esub>
[PROOF STEP]
apply (auto simp: in_segment line_convex_combination2 plus_times_less_one_lemma)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>xa. \<lbrakk>0 < i; a \<noteq> b; 0 \<le> xa; xa \<le> i\<rbrakk> \<Longrightarrow> \<exists>u\<ge>0. u \<le> 1 \<and> xa = i * u
[PROOF STEP]
subgoal for j
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < i; a \<noteq> b; 0 \<le> j; j \<le> i\<rbrakk> \<Longrightarrow> \<exists>u\<ge>0. u \<le> 1 \<and> j = i * u
[PROOF STEP]
apply (rule exI[where x="j/i"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < i; a \<noteq> b; 0 \<le> j; j \<le> i\<rbrakk> \<Longrightarrow> 0 \<le> j / i \<and> j / i \<le> 1 \<and> j = i * (j / i)
[PROOF STEP]
by auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma partition_returns_index_in_bounds:
  assumes effect: "effect (partition a l r) h h' rs"
  assumes "l < r"
  shows "l \<le> rs \<and> rs \<le> r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. l \<le> rs \<and> rs \<le> r
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. l \<le> rs \<and> rs \<le> r
[PROOF STEP]
from effect
[PROOF STATE]
proof (chain)
picking this:
effect (Imperative_Quicksort.partition a l r) h h' rs
[PROOF STEP]
obtain middle h'' p where part: "effect (part1 a l (r - 1) p) h h'' middle"
    and rs_equals: "rs = (if Array.get h'' a ! middle \<le> Array.get h a ! r then middle + 1
         else middle)"
[PROOF STATE]
proof (prove)
using this:
effect (Imperative_Quicksort.partition a l r) h h' rs

goal (1 subgoal):
 1. (\<And>p h'' middle. \<lbrakk>effect (part1 a l (r - 1) p) h h'' middle; rs = (if Array.get h'' a ! middle \<le> Array.get h a ! r then middle + 1 else middle)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding partition.simps
[PROOF STATE]
proof (prove)
using this:
effect (Array.nth a r \<bind> (\<lambda>pivot. part1 a l (r - 1) pivot \<bind> (\<lambda>middle. Array.nth a middle \<bind> (\<lambda>v. return (if v \<le> pivot then middle + 1 else middle) \<bind> (\<lambda>m. swap a m r \<bind> (\<lambda>_. return m)))))) h h' rs

goal (1 subgoal):
 1. (\<And>p h'' middle. \<lbrakk>effect (part1 a l (r - 1) p) h h'' middle; rs = (if Array.get h'' a ! middle \<le> Array.get h a ! r then middle + 1 else middle)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (elim effect_bindE effect_returnE effect_nthE effect_ifE effect_updE) simp
[PROOF STATE]
proof (state)
this:
effect (part1 a l (r - 1) p) h h'' middle
rs = (if Array.get h'' a ! middle \<le> Array.get h a ! r then middle + 1 else middle)

goal (1 subgoal):
 1. l \<le> rs \<and> rs \<le> r
[PROOF STEP]
from \<open>l < r\<close>
[PROOF STATE]
proof (chain)
picking this:
l < r
[PROOF STEP]
have "l \<le> r - 1"
[PROOF STATE]
proof (prove)
using this:
l < r

goal (1 subgoal):
 1. l \<le> r - 1
[PROOF STEP]
by arith
[PROOF STATE]
proof (state)
this:
l \<le> r - 1

goal (1 subgoal):
 1. l \<le> rs \<and> rs \<le> r
[PROOF STEP]
from part_returns_index_in_bounds[OF part this] rs_equals \<open>l < r\<close>
[PROOF STATE]
proof (chain)
picking this:
l \<le> middle \<and> middle \<le> r - 1
rs = (if Array.get h'' a ! middle \<le> Array.get h a ! r then middle + 1 else middle)
l < r
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
l \<le> middle \<and> middle \<le> r - 1
rs = (if Array.get h'' a ! middle \<le> Array.get h a ! r then middle + 1 else middle)
l < r

goal (1 subgoal):
 1. l \<le> rs \<and> rs \<le> r
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
l \<le> rs \<and> rs \<le> r

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sin_less_zero_iff:
  assumes "0 \<le> x" "x < 2 * pi"
  shows "sin x < 0 \<longleftrightarrow> pi < x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (sin x < 0) = (pi < x)
[PROOF STEP]
using assms sin_ge_zero_iff
[PROOF STATE]
proof (prove)
using this:
0 \<le> x
x < 2 * pi
\<lbrakk>0 \<le> ?x; ?x < 2 * pi\<rbrakk> \<Longrightarrow> (0 \<le> sin ?x) = (?x \<le> pi)

goal (1 subgoal):
 1. (sin x < 0) = (pi < x)
[PROOF STEP]
by fastforce


[STATEMENT]
lemma img_in_bij:
  assumes "g \<in> carrier G"
  shows "(\<phi> g) \<in> Bij M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<phi> g \<in> Bij M
[PROOF STEP]
using assms grouphom
[PROOF STATE]
proof (prove)
using this:
g \<in> carrier G
group_hom G (BijGroup M) \<phi>

goal (1 subgoal):
 1. \<phi> g \<in> Bij M
[PROOF STEP]
unfolding BijGroup_def
[PROOF STATE]
proof (prove)
using this:
g \<in> carrier G
group_hom G \<lparr>carrier = Bij M, monoid.mult = \<lambda>g\<in>Bij M. restrict (compose M g) (Bij M), one = \<lambda>x\<in>M. x\<rparr> \<phi>

goal (1 subgoal):
 1. \<phi> g \<in> Bij M
[PROOF STEP]
by (auto dest: group_hom.hom_closed)


[STATEMENT]
lemma transpose_move_matrix[simp]:
  "transpose_matrix (move_matrix A x y) = move_matrix (transpose_matrix A) y x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. transpose_matrix (move_matrix A x y) = move_matrix (transpose_matrix A) y x
[PROOF STEP]
apply (subst Rep_matrix_inject[symmetric], (rule ext)+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>xa xaa. Rep_matrix (transpose_matrix (move_matrix A x y)) xa xaa = Rep_matrix (move_matrix (transpose_matrix A) y x) xa xaa
[PROOF STEP]
apply (simp)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma (in group_action) orbit_trans:
  assumes "x \<in> E" "y \<in> E" "z \<in> E"
    and "y \<in> orbit G \<phi> x" "z \<in> orbit G \<phi> y"
  shows "z \<in> orbit G \<phi> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z \<in> orbit G \<phi> x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. z \<in> orbit G \<phi> x
[PROOF STEP]
interpret group G
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Group.group G
[PROOF STEP]
using group_hom group_hom.axioms(1)
[PROOF STATE]
proof (prove)
using this:
group_hom G (BijGroup E) \<phi>
group_hom ?G ?H ?h \<Longrightarrow> Group.group ?G

goal (1 subgoal):
 1. Group.group G
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. z \<in> orbit G \<phi> x
[PROOF STEP]
obtain g1 where g1: "g1 \<in> carrier G \<and> (\<phi> g1) x = y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>g1. g1 \<in> carrier G \<and> \<phi> g1 x = y \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
x \<in> E
y \<in> E
z \<in> E
y \<in> orbit G \<phi> x
z \<in> orbit G \<phi> y

goal (1 subgoal):
 1. (\<And>g1. g1 \<in> carrier G \<and> \<phi> g1 x = y \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: orbit_def)
[PROOF STATE]
proof (state)
this:
g1 \<in> carrier G \<and> \<phi> g1 x = y

goal (1 subgoal):
 1. z \<in> orbit G \<phi> x
[PROOF STEP]
obtain g2 where g2: "g2 \<in> carrier G \<and> (\<phi> g2) y = z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>g2. g2 \<in> carrier G \<and> \<phi> g2 y = z \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
x \<in> E
y \<in> E
z \<in> E
y \<in> orbit G \<phi> x
z \<in> orbit G \<phi> y

goal (1 subgoal):
 1. (\<And>g2. g2 \<in> carrier G \<and> \<phi> g2 y = z \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: orbit_def)
[PROOF STATE]
proof (state)
this:
g2 \<in> carrier G \<and> \<phi> g2 y = z

goal (1 subgoal):
 1. z \<in> orbit G \<phi> x
[PROOF STEP]
have "(\<phi> (g2 \<otimes> g1)) x = ((\<phi> g2) \<otimes>\<^bsub>BijGroup E\<^esub> (\<phi> g1)) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<phi> (g2 \<otimes> g1) x = (\<phi> g2 \<otimes>\<^bsub>BijGroup E\<^esub> \<phi> g1) x
[PROOF STEP]
using g1 g2 group_hom group_hom.hom_mult
[PROOF STATE]
proof (prove)
using this:
g1 \<in> carrier G \<and> \<phi> g1 x = y
g2 \<in> carrier G \<and> \<phi> g2 y = z
group_hom G (BijGroup E) \<phi>
\<lbrakk>group_hom ?G ?H ?h; ?x \<in> carrier ?G; ?y \<in> carrier ?G\<rbrakk> \<Longrightarrow> ?h (?x \<otimes>\<^bsub>?G\<^esub> ?y) = ?h ?x \<otimes>\<^bsub>?H\<^esub> ?h ?y

goal (1 subgoal):
 1. \<phi> (g2 \<otimes> g1) x = (\<phi> g2 \<otimes>\<^bsub>BijGroup E\<^esub> \<phi> g1) x
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
\<phi> (g2 \<otimes> g1) x = (\<phi> g2 \<otimes>\<^bsub>BijGroup E\<^esub> \<phi> g1) x

goal (1 subgoal):
 1. z \<in> orbit G \<phi> x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<phi> (g2 \<otimes> g1) x = (\<phi> g2 \<otimes>\<^bsub>BijGroup E\<^esub> \<phi> g1) x

goal (1 subgoal):
 1. z \<in> orbit G \<phi> x
[PROOF STEP]
have " ... = (\<phi> g2) ((\<phi> g1) x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<phi> g2 \<otimes>\<^bsub>BijGroup E\<^esub> \<phi> g1) x = \<phi> g2 (\<phi> g1 x)
[PROOF STEP]
using composition_rule assms(1) calculation g1 g2
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?x \<in> E; ?g1.0 \<in> carrier G; ?g2.0 \<in> carrier G\<rbrakk> \<Longrightarrow> \<phi> (?g1.0 \<otimes> ?g2.0) ?x = \<phi> ?g1.0 (\<phi> ?g2.0 ?x)
x \<in> E
\<phi> (g2 \<otimes> g1) x = (\<phi> g2 \<otimes>\<^bsub>BijGroup E\<^esub> \<phi> g1) x
g1 \<in> carrier G \<and> \<phi> g1 x = y
g2 \<in> carrier G \<and> \<phi> g2 y = z

goal (1 subgoal):
 1. (\<phi> g2 \<otimes>\<^bsub>BijGroup E\<^esub> \<phi> g1) x = \<phi> g2 (\<phi> g1 x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<phi> g2 \<otimes>\<^bsub>BijGroup E\<^esub> \<phi> g1) x = \<phi> g2 (\<phi> g1 x)

goal (1 subgoal):
 1. z \<in> orbit G \<phi> x
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<phi> (g2 \<otimes> g1) x = \<phi> g2 (\<phi> g1 x)
[PROOF STEP]
have "(\<phi> (g2 \<otimes> g1)) x = z"
[PROOF STATE]
proof (prove)
using this:
\<phi> (g2 \<otimes> g1) x = \<phi> g2 (\<phi> g1 x)

goal (1 subgoal):
 1. \<phi> (g2 \<otimes> g1) x = z
[PROOF STEP]
by (simp add: g1 g2)
[PROOF STATE]
proof (state)
this:
\<phi> (g2 \<otimes> g1) x = z

goal (1 subgoal):
 1. z \<in> orbit G \<phi> x
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<phi> (g2 \<otimes> g1) x = z

goal (1 subgoal):
 1. z \<in> orbit G \<phi> x
[PROOF STEP]
using g1 g2 orbit_def
[PROOF STATE]
proof (prove)
using this:
\<phi> (g2 \<otimes> g1) x = z
g1 \<in> carrier G \<and> \<phi> g1 x = y
g2 \<in> carrier G \<and> \<phi> g2 y = z
orbit ?G ?\<phi> ?x = {?\<phi> g ?x |g. g \<in> carrier ?G}

goal (1 subgoal):
 1. z \<in> orbit G \<phi> x
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
z \<in> orbit G \<phi> x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma hd_swap_0: "i < length xs \<Longrightarrow> hd (swap xs 0 i) = xs ! i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i < length xs \<Longrightarrow> hd (swap xs 0 i) = xs ! i
[PROOF STEP]
unfolding swap_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i < length xs \<Longrightarrow> hd (xs[0 := xs ! i, i := xs ! 0]) = xs ! i
[PROOF STEP]
by (subst hd_conv_nth) (subst nth_list_update | force)+


[STATEMENT]
lemma interior_idempotent:
  assumes "U \<subseteq> carrier Q\<^sub>p"
  shows "interior (interior U) = interior U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. interior (interior U) = interior U
[PROOF STEP]
using assms interior_open[of U] open_interior[of "interior U"]
[PROOF STATE]
proof (prove)
using this:
U \<subseteq> carrier Q\<^sub>p
U \<subseteq> carrier Q\<^sub>p \<Longrightarrow> is_open (interior U)
is_open (interior U) \<Longrightarrow> interior (interior U) = interior U

goal (1 subgoal):
 1. interior (interior U) = interior U
[PROOF STEP]
by auto


[STATEMENT]
lemma dvd_factor_mult_gcd:
    assumes dvd: "k dvd p * q" "k dvd p * r"
      and q0: "q \<noteq> 0" and r0: "r \<noteq> 0"
    shows "k dvd p * gcd q r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k dvd p * gcd q r
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. k dvd p * gcd q r
[PROOF STEP]
from dvd gcd_greatest[of k "p * q" "p * r"]
[PROOF STATE]
proof (chain)
picking this:
k dvd p * q
k dvd p * r
\<lbrakk>k dvd p * q; k dvd p * r\<rbrakk> \<Longrightarrow> k dvd gcd (p * q) (p * r)
[PROOF STEP]
have "k dvd gcd (p * q) (p * r)"
[PROOF STATE]
proof (prove)
using this:
k dvd p * q
k dvd p * r
\<lbrakk>k dvd p * q; k dvd p * r\<rbrakk> \<Longrightarrow> k dvd gcd (p * q) (p * r)

goal (1 subgoal):
 1. k dvd gcd (p * q) (p * r)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
k dvd gcd (p * q) (p * r)

goal (1 subgoal):
 1. k dvd p * gcd q r
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
k dvd gcd (p * q) (p * r)

goal (1 subgoal):
 1. k dvd p * gcd q r
[PROOF STEP]
from gcd_mult_ddvd[of p q r]
[PROOF STATE]
proof (chain)
picking this:
p * gcd q r ddvd gcd (p * q) (p * r)
[PROOF STEP]
have "... dvd (p * gcd q r)"
[PROOF STATE]
proof (prove)
using this:
p * gcd q r ddvd gcd (p * q) (p * r)

goal (1 subgoal):
 1. gcd (p * q) (p * r) dvd p * gcd q r
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
gcd (p * q) (p * r) dvd p * gcd q r

goal (1 subgoal):
 1. k dvd p * gcd q r
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
k dvd p * gcd q r
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
k dvd p * gcd q r

goal (1 subgoal):
 1. k dvd p * gcd q r
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
k dvd p * gcd q r

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma prefixes_length_lower_bound: "e_length (prefixes j t) \<ge> Suc t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Suc t \<le> e_length (local.prefixes j t)
[PROOF STEP]
proof (induction t)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. Suc 0 \<le> e_length (local.prefixes j 0)
 2. \<And>t. Suc t \<le> e_length (local.prefixes j t) \<Longrightarrow> Suc (Suc t) \<le> e_length (local.prefixes j (Suc t))
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. Suc 0 \<le> e_length (local.prefixes j 0)
 2. \<And>t. Suc t \<le> e_length (local.prefixes j t) \<Longrightarrow> Suc (Suc t) \<le> e_length (local.prefixes j (Suc t))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Suc 0 \<le> e_length (local.prefixes j 0)
[PROOF STEP]
by (simp add: prefixes_def r_prefixes_0)
[PROOF STATE]
proof (state)
this:
Suc 0 \<le> e_length (local.prefixes j 0)

goal (1 subgoal):
 1. \<And>t. Suc t \<le> e_length (local.prefixes j t) \<Longrightarrow> Suc (Suc t) \<le> e_length (local.prefixes j (Suc t))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>t. Suc t \<le> e_length (local.prefixes j t) \<Longrightarrow> Suc (Suc t) \<le> e_length (local.prefixes j (Suc t))
[PROOF STEP]
case (Suc t)
[PROOF STATE]
proof (state)
this:
Suc t \<le> e_length (local.prefixes j t)

goal (1 subgoal):
 1. \<And>t. Suc t \<le> e_length (local.prefixes j t) \<Longrightarrow> Suc (Suc t) \<le> e_length (local.prefixes j (Suc t))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
Suc t \<le> e_length (local.prefixes j t)

goal (1 subgoal):
 1. \<And>t. Suc t \<le> e_length (local.prefixes j t) \<Longrightarrow> Suc (Suc t) \<le> e_length (local.prefixes j (Suc t))
[PROOF STEP]
have "Suc (e_length (prefixes j t)) \<le> e_length (prefixes j (Suc t))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Suc (e_length (local.prefixes j t)) \<le> e_length (local.prefixes j (Suc t))
[PROOF STEP]
using prefixes_length_mono
[PROOF STATE]
proof (prove)
using this:
e_length (local.prefixes ?j ?t) < e_length (local.prefixes ?j (Suc ?t))

goal (1 subgoal):
 1. Suc (e_length (local.prefixes j t)) \<le> e_length (local.prefixes j (Suc t))
[PROOF STEP]
by (simp add: Suc_leI)
[PROOF STATE]
proof (state)
this:
Suc (e_length (local.prefixes j t)) \<le> e_length (local.prefixes j (Suc t))

goal (1 subgoal):
 1. \<And>t. Suc t \<le> e_length (local.prefixes j t) \<Longrightarrow> Suc (Suc t) \<le> e_length (local.prefixes j (Suc t))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
Suc t \<le> e_length (local.prefixes j t)
Suc (e_length (local.prefixes j t)) \<le> e_length (local.prefixes j (Suc t))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
Suc t \<le> e_length (local.prefixes j t)
Suc (e_length (local.prefixes j t)) \<le> e_length (local.prefixes j (Suc t))

goal (1 subgoal):
 1. Suc (Suc t) \<le> e_length (local.prefixes j (Suc t))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Suc (Suc t) \<le> e_length (local.prefixes j (Suc t))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma hom_add_eq_zero: assumes "x + y = 0" shows "hom x + hom y = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hom x + hom y = (0::'b)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. hom x + hom y = (0::'b)
[PROOF STEP]
have "0 = x + y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (0::'a) = x + y
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
x + y = (0::'a)

goal (1 subgoal):
 1. (0::'a) = x + y
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
(0::'a) = x + y

goal (1 subgoal):
 1. hom x + hom y = (0::'b)
[PROOF STEP]
hence "hom 0 = hom (x + y)"
[PROOF STATE]
proof (prove)
using this:
(0::'a) = x + y

goal (1 subgoal):
 1. hom (0::'a) = hom (x + y)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
hom (0::'a) = hom (x + y)

goal (1 subgoal):
 1. hom x + hom y = (0::'b)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
hom (0::'a) = hom (x + y)

goal (1 subgoal):
 1. hom x + hom y = (0::'b)
[PROOF STEP]
by (auto simp: hom_distribs)
[PROOF STATE]
proof (state)
this:
hom x + hom y = (0::'b)

goal:
No subgoals!
[PROOF STEP]
qed