[STATEMENT]
lemma inj_hom_preserves_independent:
  assumes "inj_on h (R.Span K Us)"
  and "R.independent K Us" shows "independent (h ` K) (map h Us)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S.independent (h ` K) (map h Us)
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. S.dependent (h ` K) (map h Us) \<Longrightarrow> False
[PROOF STEP]
have in_carrier: "set Us \<subseteq> carrier R" "set (map h Us) \<subseteq> carrier S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set Us \<subseteq> carrier R &&& set (map h Us) \<subseteq> carrier S
[PROOF STEP]
using R.independent_in_carrier[OF assms(2)]
[PROOF STATE]
proof (prove)
using this:
set Us \<subseteq> carrier R

goal (1 subgoal):
 1. set Us \<subseteq> carrier R &&& set (map h Us) \<subseteq> carrier S
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
set Us \<subseteq> carrier R
set (map h Us) \<subseteq> carrier S

goal (1 subgoal):
 1. S.dependent (h ` K) (map h Us) \<Longrightarrow> False
[PROOF STEP]
assume ld: "dependent (h ` K) (map h Us)"
[PROOF STATE]
proof (state)
this:
S.dependent (h ` K) (map h Us)

goal (1 subgoal):
 1. S.dependent (h ` K) (map h Us) \<Longrightarrow> False
[PROOF STEP]
obtain Ks :: "'c list"
    where Ks: "length Ks = length Us" "combine Ks (map h Us) = \<zero>\<^bsub>S\<^esub>" "set Ks \<subseteq> h ` K" "set Ks \<noteq> { \<zero>\<^bsub>S\<^esub> }"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>Ks. \<lbrakk>length Ks = length Us; S.combine Ks (map h Us) = \<zero>\<^bsub>S\<^esub>; set Ks \<subseteq> h ` K; set Ks \<noteq> {\<zero>\<^bsub>S\<^esub>}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using dependent_imp_non_trivial_combine[OF img_is_subfield(2)[OF K one_zero] in_carrier(2) ld]
[PROOF STATE]
proof (prove)
using this:
(\<And>Ks. \<lbrakk>length Ks = length (map h Us); S.combine Ks (map h Us) = \<zero>\<^bsub>S\<^esub>; set Ks \<subseteq> h ` K; set Ks \<noteq> {\<zero>\<^bsub>S\<^esub>}\<rbrakk> \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (\<And>Ks. \<lbrakk>length Ks = length Us; S.combine Ks (map h Us) = \<zero>\<^bsub>S\<^esub>; set Ks \<subseteq> h ` K; set Ks \<noteq> {\<zero>\<^bsub>S\<^esub>}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis length_map)
[PROOF STATE]
proof (state)
this:
length Ks = length Us
S.combine Ks (map h Us) = \<zero>\<^bsub>S\<^esub>
set Ks \<subseteq> h ` K
set Ks \<noteq> {\<zero>\<^bsub>S\<^esub>}

goal (1 subgoal):
 1. S.dependent (h ` K) (map h Us) \<Longrightarrow> False
[PROOF STEP]
obtain Ks' where Ks': "set Ks' \<subseteq> K" "Ks = map h Ks'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>Ks'. \<lbrakk>set Ks' \<subseteq> K; Ks = map h Ks'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using Ks(3)
[PROOF STATE]
proof (prove)
using this:
set Ks \<subseteq> h ` K

goal (1 subgoal):
 1. (\<And>Ks'. \<lbrakk>set Ks' \<subseteq> K; Ks = map h Ks'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (induct Ks) (auto, metis insert_subset list.simps(15,9))
[PROOF STATE]
proof (state)
this:
set Ks' \<subseteq> K
Ks = map h Ks'

goal (1 subgoal):
 1. S.dependent (h ` K) (map h Us) \<Longrightarrow> False
[PROOF STEP]
hence "h (R.combine Ks' Us) = \<zero>\<^bsub>S\<^esub>"
[PROOF STATE]
proof (prove)
using this:
set Ks' \<subseteq> K
Ks = map h Ks'

goal (1 subgoal):
 1. h (R.combine Ks' Us) = \<zero>\<^bsub>S\<^esub>
[PROOF STEP]
using combine_hom[OF _ in_carrier(1)] Ks(2) subfieldE(3)[OF K]
[PROOF STATE]
proof (prove)
using this:
set Ks' \<subseteq> K
Ks = map h Ks'
set ?Ks \<subseteq> carrier R \<Longrightarrow> S.combine (map h ?Ks) (map h Us) = h (R.combine ?Ks Us)
S.combine Ks (map h Us) = \<zero>\<^bsub>S\<^esub>
K \<subseteq> carrier R

goal (1 subgoal):
 1. h (R.combine Ks' Us) = \<zero>\<^bsub>S\<^esub>
[PROOF STEP]
by (metis subset_trans)
[PROOF STATE]
proof (state)
this:
h (R.combine Ks' Us) = \<zero>\<^bsub>S\<^esub>

goal (1 subgoal):
 1. S.dependent (h ` K) (map h Us) \<Longrightarrow> False
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
h (R.combine Ks' Us) = \<zero>\<^bsub>S\<^esub>

goal (1 subgoal):
 1. S.dependent (h ` K) (map h Us) \<Longrightarrow> False
[PROOF STEP]
have "R.combine Ks' Us \<in> R.Span K Us"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. R.combine Ks' Us \<in> R.Span K Us
[PROOF STEP]
using R.Span_eq_combine_set[OF K in_carrier(1)] Ks'(1)
[PROOF STATE]
proof (prove)
using this:
R.Span K Us = {R.combine Ks Us |Ks. set Ks \<subseteq> K}
set Ks' \<subseteq> K

goal (1 subgoal):
 1. R.combine Ks' Us \<in> R.Span K Us
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
R.combine Ks' Us \<in> R.Span K Us

goal (1 subgoal):
 1. S.dependent (h ` K) (map h Us) \<Longrightarrow> False
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
h (R.combine Ks' Us) = \<zero>\<^bsub>S\<^esub>
R.combine Ks' Us \<in> R.Span K Us
[PROOF STEP]
have "R.combine Ks' Us = \<zero>"
[PROOF STATE]
proof (prove)
using this:
h (R.combine Ks' Us) = \<zero>\<^bsub>S\<^esub>
R.combine Ks' Us \<in> R.Span K Us

goal (1 subgoal):
 1. R.combine Ks' Us = \<zero>
[PROOF STEP]
using assms hom_zero R.Span_subgroup_props(2)[OF K in_carrier(1)]
[PROOF STATE]
proof (prove)
using this:
h (R.combine Ks' Us) = \<zero>\<^bsub>S\<^esub>
R.combine Ks' Us \<in> R.Span K Us
inj_on h (R.Span K Us)
R.independent K Us
h \<zero> = \<zero>\<^bsub>S\<^esub>
\<zero> \<in> R.Span K Us

goal (1 subgoal):
 1. R.combine Ks' Us = \<zero>
[PROOF STEP]
by (auto simp add: inj_on_def)
[PROOF STATE]
proof (state)
this:
R.combine Ks' Us = \<zero>

goal (1 subgoal):
 1. S.dependent (h ` K) (map h Us) \<Longrightarrow> False
[PROOF STEP]
hence "set Ks' \<subseteq> { \<zero> }"
[PROOF STATE]
proof (prove)
using this:
R.combine Ks' Us = \<zero>

goal (1 subgoal):
 1. set Ks' \<subseteq> {\<zero>}
[PROOF STEP]
using R.independent_imp_trivial_combine[OF K assms(2)] Ks' Ks(1)
[PROOF STATE]
proof (prove)
using this:
R.combine Ks' Us = \<zero>
\<lbrakk>set ?Ks \<subseteq> K; R.combine ?Ks Us = \<zero>\<rbrakk> \<Longrightarrow> set (take (length Us) ?Ks) \<subseteq> {\<zero>}
set Ks' \<subseteq> K
Ks = map h Ks'
length Ks = length Us

goal (1 subgoal):
 1. set Ks' \<subseteq> {\<zero>}
[PROOF STEP]
by (metis length_map order_refl take_all)
[PROOF STATE]
proof (state)
this:
set Ks' \<subseteq> {\<zero>}

goal (1 subgoal):
 1. S.dependent (h ` K) (map h Us) \<Longrightarrow> False
[PROOF STEP]
hence "set Ks \<subseteq> { \<zero>\<^bsub>S\<^esub> }"
[PROOF STATE]
proof (prove)
using this:
set Ks' \<subseteq> {\<zero>}

goal (1 subgoal):
 1. set Ks \<subseteq> {\<zero>\<^bsub>S\<^esub>}
[PROOF STEP]
unfolding Ks'
[PROOF STATE]
proof (prove)
using this:
set Ks' \<subseteq> {\<zero>}

goal (1 subgoal):
 1. set (map h Ks') \<subseteq> {\<zero>\<^bsub>S\<^esub>}
[PROOF STEP]
using hom_zero
[PROOF STATE]
proof (prove)
using this:
set Ks' \<subseteq> {\<zero>}
h \<zero> = \<zero>\<^bsub>S\<^esub>

goal (1 subgoal):
 1. set (map h Ks') \<subseteq> {\<zero>\<^bsub>S\<^esub>}
[PROOF STEP]
by (induct Ks') (auto)
[PROOF STATE]
proof (state)
this:
set Ks \<subseteq> {\<zero>\<^bsub>S\<^esub>}

goal (1 subgoal):
 1. S.dependent (h ` K) (map h Us) \<Longrightarrow> False
[PROOF STEP]
hence "Ks = []"
[PROOF STATE]
proof (prove)
using this:
set Ks \<subseteq> {\<zero>\<^bsub>S\<^esub>}

goal (1 subgoal):
 1. Ks = []
[PROOF STEP]
using Ks(4)
[PROOF STATE]
proof (prove)
using this:
set Ks \<subseteq> {\<zero>\<^bsub>S\<^esub>}
set Ks \<noteq> {\<zero>\<^bsub>S\<^esub>}

goal (1 subgoal):
 1. Ks = []
[PROOF STEP]
by (metis set_empty2 subset_singletonD)
[PROOF STATE]
proof (state)
this:
Ks = []

goal (1 subgoal):
 1. S.dependent (h ` K) (map h Us) \<Longrightarrow> False
[PROOF STEP]
hence "independent (h ` K) (map h Us)"
[PROOF STATE]
proof (prove)
using this:
Ks = []

goal (1 subgoal):
 1. S.independent (h ` K) (map h Us)
[PROOF STEP]
using independent.li_Nil Ks(1)
[PROOF STATE]
proof (prove)
using this:
Ks = []
S.independent ?K []
length Ks = length Us

goal (1 subgoal):
 1. S.independent (h ` K) (map h Us)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
S.independent (h ` K) (map h Us)

goal (1 subgoal):
 1. S.dependent (h ` K) (map h Us) \<Longrightarrow> False
[PROOF STEP]
from \<open>dependent (h ` K) (map h Us)\<close> and this
[PROOF STATE]
proof (chain)
picking this:
S.dependent (h ` K) (map h Us)
S.independent (h ` K) (map h Us)
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
S.dependent (h ` K) (map h Us)
S.independent (h ` K) (map h Us)

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma distance_refl[simp]: "\<delta> s s = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<delta> s s = 0
[PROOF STEP]
using shortest_path_least[of s "[]" s]
[PROOF STATE]
proof (prove)
using this:
path s [] s \<Longrightarrow> \<delta> s s \<le> sum_list []

goal (1 subgoal):
 1. \<delta> s s = 0
[PROOF STEP]
by auto


[STATEMENT]
lemma summable_LIMSEQ: "summable f \<Longrightarrow> (\<lambda>n. \<Sum>i<n. f i) \<longlonglongrightarrow> suminf f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. summable f \<Longrightarrow> (\<lambda>n. sum f {..<n}) \<longlonglongrightarrow> suminf f
[PROOF STEP]
by (rule summable_sums [unfolded sums_def])


[STATEMENT]
lemma split_scaleC_neg_le: "(0 \<le> a \<and> x \<le> 0) \<or> (a \<le> 0 \<and> 0 \<le> x) \<Longrightarrow> a *\<^sub>C x \<le> 0"
  for x :: "'a::ordered_complex_vector"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> a \<and> x \<le> (0::'a) \<or> a \<le> 0 \<and> (0::'a) \<le> x \<Longrightarrow> a *\<^sub>C x \<le> (0::'a)
[PROOF STEP]
by (auto simp: scaleC_nonneg_nonpos scaleC_nonpos_nonneg)


[STATEMENT]
lemma bound_child_parent_neq_mems_state_set_neq_len:
  fixes s and k :: nat
  assumes "(\<forall>x. x \<in> s \<longrightarrow> x < k)"
  shows "finite s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite s
[PROOF STEP]
using assms bounded_nat_set_is_finite
[PROOF STATE]
proof (prove)
using this:
\<forall>x. x \<in> s \<longrightarrow> x < k
\<forall>i\<in>?N. i < ?n \<Longrightarrow> finite ?N

goal (1 subgoal):
 1. finite s
[PROOF STEP]
by blast


[STATEMENT]
lemma harm_asymp_equiv: "sum_upto (\<lambda>n. 1 / n) \<sim>[at_top] ln"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum_upto (\<lambda>n. 1 / real n) \<sim>[at_top] ln
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sum_upto (\<lambda>n. 1 / real n) \<sim>[at_top] ln
[PROOF STEP]
have "sum_upto (\<lambda>n. n powr -1) \<sim>[at_top] (\<lambda>x. ln (\<lfloor>x\<rfloor> + 1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum_upto (\<lambda>n. real n powr - 1) \<sim>[at_top] (\<lambda>x. ln (real_of_int (\<lfloor>x\<rfloor> + 1)))
[PROOF STEP]
proof (rule asymp_equiv_sandwich)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<forall>\<^sub>F x in at_top. 0 \<le> ln (real_of_int (\<lfloor>x\<rfloor> + 1))
 2. \<forall>\<^sub>F x in at_top. ln (real_of_int (\<lfloor>x\<rfloor> + 1)) \<le> sum_upto (\<lambda>n. real n powr - 1) x
 3. \<forall>\<^sub>F x in at_top. sum_upto (\<lambda>n. real n powr - 1) x \<le> ?h x
 4. (\<lambda>x. ln (real_of_int (\<lfloor>x\<rfloor> + 1))) \<sim>[at_top] ?h
[PROOF STEP]
have "eventually (\<lambda>x. sum_upto (\<lambda>n. n powr -1) x \<in> {ln (\<lfloor>x\<rfloor> + 1)..ln \<lfloor>x\<rfloor> + 1}) at_top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. sum_upto (\<lambda>n. real n powr - 1) x \<in> {ln (real_of_int (\<lfloor>x\<rfloor> + 1))..ln (real_of_int \<lfloor>x\<rfloor>) + 1}
[PROOF STEP]
using eventually_ge_at_top[of 1]
[PROOF STATE]
proof (prove)
using this:
eventually ((\<le>) (1::?'a1)) at_top

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. sum_upto (\<lambda>n. real n powr - 1) x \<in> {ln (real_of_int (\<lfloor>x\<rfloor> + 1))..ln (real_of_int \<lfloor>x\<rfloor>) + 1}
[PROOF STEP]
proof eventually_elim
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. 1 \<le> x \<Longrightarrow> sum_upto (\<lambda>n. real n powr - 1) x \<in> {ln (real_of_int (\<lfloor>x\<rfloor> + 1))..ln (real_of_int \<lfloor>x\<rfloor>) + 1}
[PROOF STEP]
case (elim x)
[PROOF STATE]
proof (state)
this:
1 \<le> x

goal (1 subgoal):
 1. \<And>x. 1 \<le> x \<Longrightarrow> sum_upto (\<lambda>n. real n powr - 1) x \<in> {ln (real_of_int (\<lfloor>x\<rfloor> + 1))..ln (real_of_int \<lfloor>x\<rfloor>) + 1}
[PROOF STEP]
have "sum_upto (\<lambda>n. real n powr -1) x = harm (nat \<lfloor>x\<rfloor>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum_upto (\<lambda>n. real n powr - 1) x = harm (nat \<lfloor>x\<rfloor>)
[PROOF STEP]
unfolding sum_upto_altdef harm_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>n\<in>{0<..nat \<lfloor>x\<rfloor>}. real n powr - 1) = (\<Sum>k = 1..nat \<lfloor>x\<rfloor>. inverse (real k))
[PROOF STEP]
by (intro sum.cong) (auto simp: field_simps powr_minus)
[PROOF STATE]
proof (state)
this:
sum_upto (\<lambda>n. real n powr - 1) x = harm (nat \<lfloor>x\<rfloor>)

goal (1 subgoal):
 1. \<And>x. 1 \<le> x \<Longrightarrow> sum_upto (\<lambda>n. real n powr - 1) x \<in> {ln (real_of_int (\<lfloor>x\<rfloor> + 1))..ln (real_of_int \<lfloor>x\<rfloor>) + 1}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sum_upto (\<lambda>n. real n powr - 1) x = harm (nat \<lfloor>x\<rfloor>)

goal (1 subgoal):
 1. \<And>x. 1 \<le> x \<Longrightarrow> sum_upto (\<lambda>n. real n powr - 1) x \<in> {ln (real_of_int (\<lfloor>x\<rfloor> + 1))..ln (real_of_int \<lfloor>x\<rfloor>) + 1}
[PROOF STEP]
have "\<dots> \<in> {ln (\<lfloor>x\<rfloor> + 1)..ln \<lfloor>x\<rfloor> + 1}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. harm (nat \<lfloor>x\<rfloor>) \<in> {ln (real_of_int (\<lfloor>x\<rfloor> + 1))..ln (real_of_int \<lfloor>x\<rfloor>) + 1}
[PROOF STEP]
using elim harm_le[of "nat \<lfloor>x\<rfloor>"] ln_le_harm[of "nat \<lfloor>x\<rfloor>"]
[PROOF STATE]
proof (prove)
using this:
1 \<le> x
1 \<le> nat \<lfloor>x\<rfloor> \<Longrightarrow> harm (nat \<lfloor>x\<rfloor>) \<le> ln (real (nat \<lfloor>x\<rfloor>)) + 1
ln (real (nat \<lfloor>x\<rfloor>) + 1) \<le> harm (nat \<lfloor>x\<rfloor>)

goal (1 subgoal):
 1. harm (nat \<lfloor>x\<rfloor>) \<in> {ln (real_of_int (\<lfloor>x\<rfloor> + 1))..ln (real_of_int \<lfloor>x\<rfloor>) + 1}
[PROOF STEP]
by (auto simp: le_nat_iff le_floor_iff)
[PROOF STATE]
proof (state)
this:
harm (nat \<lfloor>x\<rfloor>) \<in> {ln (real_of_int (\<lfloor>x\<rfloor> + 1))..ln (real_of_int \<lfloor>x\<rfloor>) + 1}

goal (1 subgoal):
 1. \<And>x. 1 \<le> x \<Longrightarrow> sum_upto (\<lambda>n. real n powr - 1) x \<in> {ln (real_of_int (\<lfloor>x\<rfloor> + 1))..ln (real_of_int \<lfloor>x\<rfloor>) + 1}
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
sum_upto (\<lambda>n. real n powr - 1) x \<in> {ln (real_of_int (\<lfloor>x\<rfloor> + 1))..ln (real_of_int \<lfloor>x\<rfloor>) + 1}
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
sum_upto (\<lambda>n. real n powr - 1) x \<in> {ln (real_of_int (\<lfloor>x\<rfloor> + 1))..ln (real_of_int \<lfloor>x\<rfloor>) + 1}

goal (1 subgoal):
 1. sum_upto (\<lambda>n. real n powr - 1) x \<in> {ln (real_of_int (\<lfloor>x\<rfloor> + 1))..ln (real_of_int \<lfloor>x\<rfloor>) + 1}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
sum_upto (\<lambda>n. real n powr - 1) x \<in> {ln (real_of_int (\<lfloor>x\<rfloor> + 1))..ln (real_of_int \<lfloor>x\<rfloor>) + 1}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_top. sum_upto (\<lambda>n. real n powr - 1) x \<in> {ln (real_of_int (\<lfloor>x\<rfloor> + 1))..ln (real_of_int \<lfloor>x\<rfloor>) + 1}

goal (4 subgoals):
 1. \<forall>\<^sub>F x in at_top. 0 \<le> ln (real_of_int (\<lfloor>x\<rfloor> + 1))
 2. \<forall>\<^sub>F x in at_top. ln (real_of_int (\<lfloor>x\<rfloor> + 1)) \<le> sum_upto (\<lambda>n. real n powr - 1) x
 3. \<forall>\<^sub>F x in at_top. sum_upto (\<lambda>n. real n powr - 1) x \<le> ?h x
 4. (\<lambda>x. ln (real_of_int (\<lfloor>x\<rfloor> + 1))) \<sim>[at_top] ?h
[PROOF STEP]
thus "eventually (\<lambda>x. sum_upto (\<lambda>n. n powr -1) x \<ge> ln (\<lfloor>x\<rfloor> + 1)) at_top"
         "eventually (\<lambda>x. sum_upto (\<lambda>n. n powr -1) x \<le> ln \<lfloor>x\<rfloor> + 1) at_top"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in at_top. sum_upto (\<lambda>n. real n powr - 1) x \<in> {ln (real_of_int (\<lfloor>x\<rfloor> + 1))..ln (real_of_int \<lfloor>x\<rfloor>) + 1}

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. ln (real_of_int (\<lfloor>x\<rfloor> + 1)) \<le> sum_upto (\<lambda>n. real n powr - 1) x &&& \<forall>\<^sub>F x in at_top. sum_upto (\<lambda>n. real n powr - 1) x \<le> ln (real_of_int \<lfloor>x\<rfloor>) + 1
[PROOF STEP]
by (eventually_elim; simp)+
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_top. ln (real_of_int (\<lfloor>x\<rfloor> + 1)) \<le> sum_upto (\<lambda>n. real n powr - 1) x
\<forall>\<^sub>F x in at_top. sum_upto (\<lambda>n. real n powr - 1) x \<le> ln (real_of_int \<lfloor>x\<rfloor>) + 1

goal (2 subgoals):
 1. \<forall>\<^sub>F x in at_top. 0 \<le> ln (real_of_int (\<lfloor>x\<rfloor> + 1))
 2. (\<lambda>x. ln (real_of_int (\<lfloor>x\<rfloor> + 1))) \<sim>[at_top] (\<lambda>x. ln (real_of_int \<lfloor>x\<rfloor>) + 1)
[PROOF STEP]
qed real_asymp+
[PROOF STATE]
proof (state)
this:
sum_upto (\<lambda>n. real n powr - 1) \<sim>[at_top] (\<lambda>x. ln (real_of_int (\<lfloor>x\<rfloor> + 1)))

goal (1 subgoal):
 1. sum_upto (\<lambda>n. 1 / real n) \<sim>[at_top] ln
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sum_upto (\<lambda>n. real n powr - 1) \<sim>[at_top] (\<lambda>x. ln (real_of_int (\<lfloor>x\<rfloor> + 1)))

goal (1 subgoal):
 1. sum_upto (\<lambda>n. 1 / real n) \<sim>[at_top] ln
[PROOF STEP]
have "\<dots> \<sim>[at_top] ln"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. ln (real_of_int (\<lfloor>x\<rfloor> + 1))) \<sim>[at_top] ln
[PROOF STEP]
by real_asymp
[PROOF STATE]
proof (state)
this:
(\<lambda>x. ln (real_of_int (\<lfloor>x\<rfloor> + 1))) \<sim>[at_top] ln

goal (1 subgoal):
 1. sum_upto (\<lambda>n. 1 / real n) \<sim>[at_top] ln
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<And>c d. c \<sim>[at_top] d \<Longrightarrow> c \<sim>[at_top] d) \<Longrightarrow> sum_upto (\<lambda>n. real n powr - 1) \<sim>[at_top] ln
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<And>c d. c \<sim>[at_top] d \<Longrightarrow> c \<sim>[at_top] d) \<Longrightarrow> sum_upto (\<lambda>n. real n powr - 1) \<sim>[at_top] ln

goal (1 subgoal):
 1. sum_upto (\<lambda>n. 1 / real n) \<sim>[at_top] ln
[PROOF STEP]
by (simp add: powr_minus field_simps)
[PROOF STATE]
proof (state)
this:
sum_upto (\<lambda>n. 1 / real n) \<sim>[at_top] ln

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sorted_subseqs_sorted:
  "sorted xs \<Longrightarrow> ys \<in> set (subseqs xs) \<Longrightarrow> sorted ys"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>sorted xs; ys \<in> set (subseqs xs)\<rbrakk> \<Longrightarrow> sorted ys
[PROOF STEP]
proof(induct xs arbitrary: ys)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>ys. \<lbrakk>sorted []; ys \<in> set (subseqs [])\<rbrakk> \<Longrightarrow> sorted ys
 2. \<And>a xs ys. \<lbrakk>\<And>ys. \<lbrakk>sorted xs; ys \<in> set (subseqs xs)\<rbrakk> \<Longrightarrow> sorted ys; sorted (a # xs); ys \<in> set (subseqs (a # xs))\<rbrakk> \<Longrightarrow> sorted ys
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:
sorted []
ys \<in> set (subseqs [])

goal (2 subgoals):
 1. \<And>ys. \<lbrakk>sorted []; ys \<in> set (subseqs [])\<rbrakk> \<Longrightarrow> sorted ys
 2. \<And>a xs ys. \<lbrakk>\<And>ys. \<lbrakk>sorted xs; ys \<in> set (subseqs xs)\<rbrakk> \<Longrightarrow> sorted ys; sorted (a # xs); ys \<in> set (subseqs (a # xs))\<rbrakk> \<Longrightarrow> sorted ys
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
sorted []
ys \<in> set (subseqs [])

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

goal (1 subgoal):
 1. \<And>a xs ys. \<lbrakk>\<And>ys. \<lbrakk>sorted xs; ys \<in> set (subseqs xs)\<rbrakk> \<Longrightarrow> sorted ys; sorted (a # xs); ys \<in> set (subseqs (a # xs))\<rbrakk> \<Longrightarrow> sorted ys
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a xs ys. \<lbrakk>\<And>ys. \<lbrakk>sorted xs; ys \<in> set (subseqs xs)\<rbrakk> \<Longrightarrow> sorted ys; sorted (a # xs); ys \<in> set (subseqs (a # xs))\<rbrakk> \<Longrightarrow> sorted ys
[PROOF STEP]
case Cons
[PROOF STATE]
proof (state)
this:
\<lbrakk>sorted xs_; ?ys \<in> set (subseqs xs_)\<rbrakk> \<Longrightarrow> sorted ?ys
sorted (a_ # xs_)
ys \<in> set (subseqs (a_ # xs_))

goal (1 subgoal):
 1. \<And>a xs ys. \<lbrakk>\<And>ys. \<lbrakk>sorted xs; ys \<in> set (subseqs xs)\<rbrakk> \<Longrightarrow> sorted ys; sorted (a # xs); ys \<in> set (subseqs (a # xs))\<rbrakk> \<Longrightarrow> sorted ys
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>sorted xs_; ?ys \<in> set (subseqs xs_)\<rbrakk> \<Longrightarrow> sorted ?ys
sorted (a_ # xs_)
ys \<in> set (subseqs (a_ # xs_))

goal (1 subgoal):
 1. sorted ys
[PROOF STEP]
using subseqs_subset
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>sorted xs_; ?ys \<in> set (subseqs xs_)\<rbrakk> \<Longrightarrow> sorted ?ys
sorted (a_ # xs_)
ys \<in> set (subseqs (a_ # xs_))
?ys \<in> set (subseqs ?xs) \<Longrightarrow> set ?ys \<subseteq> set ?xs

goal (1 subgoal):
 1. sorted ys
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
sorted ys

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma pow_res_eq_rel:
  assumes "n > 0"
  assumes "b \<in> carrier Q\<^sub>p"
  shows "{x \<in> carrier Q\<^sub>p. pow_res n x = pow_res n b} = pow_res n b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x \<in> carrier Q\<^sub>p. pow_res n x = pow_res n b} = pow_res n b
[PROOF STEP]
apply(rule equalityI',  unfold mem_Collect_eq, metis pow_res_refl,
        intro conjI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. x \<in> pow_res n b \<Longrightarrow> x \<in> carrier Q\<^sub>p
 2. \<And>x. x \<in> pow_res n b \<Longrightarrow> pow_res n x = pow_res n b
[PROOF STEP]
using pow_res_def
[PROOF STATE]
proof (prove)
using this:
pow_res ?n ?x = {a \<in> carrier Q\<^sub>p. \<exists>y\<in>nonzero Q\<^sub>p. a = ?x \<otimes> y [^] ?n}

goal (2 subgoals):
 1. \<And>x. x \<in> pow_res n b \<Longrightarrow> x \<in> carrier Q\<^sub>p
 2. \<And>x. x \<in> pow_res n b \<Longrightarrow> pow_res n x = pow_res n b
[PROOF STEP]
apply auto[1]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> pow_res n b \<Longrightarrow> pow_res n x = pow_res n b
[PROOF STEP]
apply(rule equal_pow_resI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. x \<in> pow_res n b \<Longrightarrow> x \<in> carrier Q\<^sub>p
 2. \<And>x. x \<in> pow_res n b \<Longrightarrow> b \<in> pow_res n x
[PROOF STEP]
using pow_res_def
[PROOF STATE]
proof (prove)
using this:
pow_res ?n ?x = {a \<in> carrier Q\<^sub>p. \<exists>y\<in>nonzero Q\<^sub>p. a = ?x \<otimes> y [^] ?n}

goal (2 subgoals):
 1. \<And>x. x \<in> pow_res n b \<Longrightarrow> x \<in> carrier Q\<^sub>p
 2. \<And>x. x \<in> pow_res n b \<Longrightarrow> b \<in> pow_res n x
[PROOF STEP]
apply auto[1]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> pow_res n b \<Longrightarrow> b \<in> pow_res n x
[PROOF STEP]
using  pow_res_refl assms
[PROOF STATE]
proof (prove)
using this:
?x \<in> carrier Q\<^sub>p \<Longrightarrow> ?x \<in> pow_res ?n ?x
0 < n
b \<in> carrier Q\<^sub>p

goal (1 subgoal):
 1. \<And>x. x \<in> pow_res n b \<Longrightarrow> b \<in> pow_res n x
[PROOF STEP]
by (metis equal_pow_resI)


[STATEMENT]
lemma timestamps_zmset_of_pair_image[simp]: "timestamps (zmset_of {# (c,t). t \<in># M #}) = zmset_of M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. timestamps (zmset_of (image_mset (Pair c) M)) = zmset_of M
[PROOF STEP]
by (induct M) auto


[STATEMENT]
lemma iso_finfun_Ball_Ball:
  "(\<forall>x. A $ x \<longrightarrow> P x) \<longleftrightarrow> finfun_Ball A P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x. A $ x \<longrightarrow> P x) = finfun_Ball A P
[PROOF STEP]
by(simp add: finfun_Ball_def)


[STATEMENT]
lemma vec_module_col_helper2:
  fixes A:: "('a :: field) mat"
  shows "\<And>a x. x \<in> LinearCombinations.module.span class_ring
                \<lparr>carrier = carrier_vec (dim_row A), mult = undefined, one = undefined,
                   zero = 0\<^sub>v (dim_row A), add = (+), smult = (\<cdot>\<^sub>v)\<rparr>
                (set (cols A)) \<Longrightarrow>
           (\<And>a b v. (a + b) \<cdot>\<^sub>v v = a \<cdot>\<^sub>v v + b \<cdot>\<^sub>v v) \<Longrightarrow>
           a \<cdot>\<^sub>v x
           \<in> LinearCombinations.module.span class_ring
               \<lparr>carrier = carrier_vec (dim_row A), mult = undefined, one = undefined,
                  zero = 0\<^sub>v (dim_row A), add = (+), smult = (\<cdot>\<^sub>v)\<rparr>
               (set (cols A))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a x. \<lbrakk>x \<in> LinearCombinations.module.span class_ring \<lparr>carrier = carrier_vec (dim_row A), mult = undefined, one = undefined, zero = 0\<^sub>v (dim_row A), add = (+), smult = (\<cdot>\<^sub>v)\<rparr> (set (cols A)); \<And>a b v. (a + b) \<cdot>\<^sub>v v = a \<cdot>\<^sub>v v + b \<cdot>\<^sub>v v\<rbrakk> \<Longrightarrow> a \<cdot>\<^sub>v x \<in> LinearCombinations.module.span class_ring \<lparr>carrier = carrier_vec (dim_row A), mult = undefined, one = undefined, zero = 0\<^sub>v (dim_row A), add = (+), smult = (\<cdot>\<^sub>v)\<rparr> (set (cols A))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a x. \<lbrakk>x \<in> LinearCombinations.module.span class_ring \<lparr>carrier = carrier_vec (dim_row A), mult = undefined, one = undefined, zero = 0\<^sub>v (dim_row A), add = (+), smult = (\<cdot>\<^sub>v)\<rparr> (set (cols A)); \<And>a b v. (a + b) \<cdot>\<^sub>v v = a \<cdot>\<^sub>v v + b \<cdot>\<^sub>v v\<rbrakk> \<Longrightarrow> a \<cdot>\<^sub>v x \<in> LinearCombinations.module.span class_ring \<lparr>carrier = carrier_vec (dim_row A), mult = undefined, one = undefined, zero = 0\<^sub>v (dim_row A), add = (+), smult = (\<cdot>\<^sub>v)\<rparr> (set (cols A))
[PROOF STEP]
fix a :: 'a and x :: "'a vec"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a x. \<lbrakk>x \<in> LinearCombinations.module.span class_ring \<lparr>carrier = carrier_vec (dim_row A), mult = undefined, one = undefined, zero = 0\<^sub>v (dim_row A), add = (+), smult = (\<cdot>\<^sub>v)\<rparr> (set (cols A)); \<And>a b v. (a + b) \<cdot>\<^sub>v v = a \<cdot>\<^sub>v v + b \<cdot>\<^sub>v v\<rbrakk> \<Longrightarrow> a \<cdot>\<^sub>v x \<in> LinearCombinations.module.span class_ring \<lparr>carrier = carrier_vec (dim_row A), mult = undefined, one = undefined, zero = 0\<^sub>v (dim_row A), add = (+), smult = (\<cdot>\<^sub>v)\<rparr> (set (cols A))
[PROOF STEP]
assume "x \<in> LinearCombinations.module.span class_ring \<lparr>carrier = carrier_vec (dim_row A), mult = undefined, one = undefined, zero = 0\<^sub>v (dim_row A), add = (+), smult = (\<cdot>\<^sub>v)\<rparr> (set (cols A))"
[PROOF STATE]
proof (state)
this:
x \<in> LinearCombinations.module.span class_ring \<lparr>carrier = carrier_vec (dim_row A), mult = undefined, one = undefined, zero = 0\<^sub>v (dim_row A), add = (+), smult = (\<cdot>\<^sub>v)\<rparr> (set (cols A))

goal (1 subgoal):
 1. \<And>a x. \<lbrakk>x \<in> LinearCombinations.module.span class_ring \<lparr>carrier = carrier_vec (dim_row A), mult = undefined, one = undefined, zero = 0\<^sub>v (dim_row A), add = (+), smult = (\<cdot>\<^sub>v)\<rparr> (set (cols A)); \<And>a b v. (a + b) \<cdot>\<^sub>v v = a \<cdot>\<^sub>v v + b \<cdot>\<^sub>v v\<rbrakk> \<Longrightarrow> a \<cdot>\<^sub>v x \<in> LinearCombinations.module.span class_ring \<lparr>carrier = carrier_vec (dim_row A), mult = undefined, one = undefined, zero = 0\<^sub>v (dim_row A), add = (+), smult = (\<cdot>\<^sub>v)\<rparr> (set (cols A))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> LinearCombinations.module.span class_ring \<lparr>carrier = carrier_vec (dim_row A), mult = undefined, one = undefined, zero = 0\<^sub>v (dim_row A), add = (+), smult = (\<cdot>\<^sub>v)\<rparr> (set (cols A))
[PROOF STEP]
show "a \<cdot>\<^sub>v x \<in> LinearCombinations.module.span class_ring \<lparr>carrier = carrier_vec (dim_row A), mult = undefined, one = undefined, zero = 0\<^sub>v (dim_row A), add = (+), smult = (\<cdot>\<^sub>v)\<rparr> (set (cols A))"
[PROOF STATE]
proof (prove)
using this:
x \<in> LinearCombinations.module.span class_ring \<lparr>carrier = carrier_vec (dim_row A), mult = undefined, one = undefined, zero = 0\<^sub>v (dim_row A), add = (+), smult = (\<cdot>\<^sub>v)\<rparr> (set (cols A))

goal (1 subgoal):
 1. a \<cdot>\<^sub>v x \<in> LinearCombinations.module.span class_ring \<lparr>carrier = carrier_vec (dim_row A), mult = undefined, one = undefined, zero = 0\<^sub>v (dim_row A), add = (+), smult = (\<cdot>\<^sub>v)\<rparr> (set (cols A))
[PROOF STEP]
by (metis (full_types) cols_dim idom_vec.smult_in_span module_vec_def)
[PROOF STATE]
proof (state)
this:
a \<cdot>\<^sub>v x \<in> LinearCombinations.module.span class_ring \<lparr>carrier = carrier_vec (dim_row A), mult = undefined, one = undefined, zero = 0\<^sub>v (dim_row A), add = (+), smult = (\<cdot>\<^sub>v)\<rparr> (set (cols A))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma euler_witnessI:
  "[x ^ ((n - 1) div 2) = a] (mod int n ) \<Longrightarrow> [Jacobi x (int n) \<noteq> a] (mod int n)
    \<Longrightarrow>  euler_witness x n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>[x ^ ((n - 1) div 2) = a] (mod int n); [Jacobi x (int n) \<noteq> a] (mod int n)\<rbrakk> \<Longrightarrow> euler_witness x n
[PROOF STEP]
unfolding euler_witness_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>[x ^ ((n - 1) div 2) = a] (mod int n); [Jacobi x (int n) \<noteq> a] (mod int n)\<rbrakk> \<Longrightarrow> [Jacobi x (int n) \<noteq> x ^ ((n - 1) div 2)] (mod int n)
[PROOF STEP]
using cong_trans
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>[?b = ?c] (mod ?a); [?c = ?d] (mod ?a)\<rbrakk> \<Longrightarrow> [?b = ?d] (mod ?a)

goal (1 subgoal):
 1. \<lbrakk>[x ^ ((n - 1) div 2) = a] (mod int n); [Jacobi x (int n) \<noteq> a] (mod int n)\<rbrakk> \<Longrightarrow> [Jacobi x (int n) \<noteq> x ^ ((n - 1) div 2)] (mod int n)
[PROOF STEP]
by blast


[STATEMENT]
lemma content_lt_nz: "0 < content (box a b) \<longleftrightarrow> content (box a b) \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (0 < content (box a b)) = (content (box a b) \<noteq> 0)
[PROOF STEP]
using Paths.content_eq_0 zero_less_measure_iff
[PROOF STATE]
proof (prove)
using this:
(content (box ?a ?b) = 0) = (\<exists>i\<in>Basis. ?b \<bullet> i \<le> ?a \<bullet> i)
(0 < Sigma_Algebra.measure ?M ?A) = (Sigma_Algebra.measure ?M ?A \<noteq> 0)

goal (1 subgoal):
 1. (0 < content (box a b)) = (content (box a b) \<noteq> 0)
[PROOF STEP]
by blast


[STATEMENT]
lemma iMODb_plus_divisor_mult2: "
  \<lbrakk> x \<in> [r, mod m, c]; k \<le> c - (x - r) div m \<rbrakk> \<Longrightarrow>
  x + k * m \<in> [r, mod m, c]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> [ r, mod m, c ]; k \<le> c - (x - r) div m\<rbrakk> \<Longrightarrow> x + k * m \<in> [ r, mod m, c ]
[PROOF STEP]
apply (rule iMODb_plus_divisor_mult, assumption)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> [ r, mod m, c ]; k \<le> c - (x - r) div m\<rbrakk> \<Longrightarrow> k * m \<le> r + m * c - x
[PROOF STEP]
apply (clarsimp simp: iMODb_iff)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>k \<le> c - (x - r) div m; x mod m = r mod m; r \<le> x; x \<le> r + m * c\<rbrakk> \<Longrightarrow> k * m \<le> r + m * c - x
[PROOF STEP]
apply (drule mult_le_mono1[of _ _ m])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x mod m = r mod m; r \<le> x; x \<le> r + m * c; k * m \<le> (c - (x - r) div m) * m\<rbrakk> \<Longrightarrow> k * m \<le> r + m * c - x
[PROOF STEP]
apply (simp add: diff_mult_distrib
  mod_0_div_mult_cancel[THEN iffD1, OF mod_eq_imp_diff_mod_0]
  add.commute[of r] mult.commute[of c])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma nth_root_nat_code_naive':
  "nth_root_nat k n = (if k = 0 then 0 else Max (Set.filter (\<lambda>m. m ^ k \<le> n) {..n}))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nth_root_nat k n = (if k = 0 then 0 else Max (Set.filter (\<lambda>m. m ^ k \<le> n) {..n}))
[PROOF STEP]
proof (cases "k > 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. 0 < k \<Longrightarrow> nth_root_nat k n = (if k = 0 then 0 else Max (Set.filter (\<lambda>m. m ^ k \<le> n) {..n}))
 2. \<not> 0 < k \<Longrightarrow> nth_root_nat k n = (if k = 0 then 0 else Max (Set.filter (\<lambda>m. m ^ k \<le> n) {..n}))
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
0 < k

goal (2 subgoals):
 1. 0 < k \<Longrightarrow> nth_root_nat k n = (if k = 0 then 0 else Max (Set.filter (\<lambda>m. m ^ k \<le> n) {..n}))
 2. \<not> 0 < k \<Longrightarrow> nth_root_nat k n = (if k = 0 then 0 else Max (Set.filter (\<lambda>m. m ^ k \<le> n) {..n}))
[PROOF STEP]
hence "{m. m ^ k \<le> n} \<subseteq> {..n}"
[PROOF STATE]
proof (prove)
using this:
0 < k

goal (1 subgoal):
 1. {m. m ^ k \<le> n} \<subseteq> {..n}
[PROOF STEP]
by (rule nth_root_nat_aux1)
[PROOF STATE]
proof (state)
this:
{m. m ^ k \<le> n} \<subseteq> {..n}

goal (2 subgoals):
 1. 0 < k \<Longrightarrow> nth_root_nat k n = (if k = 0 then 0 else Max (Set.filter (\<lambda>m. m ^ k \<le> n) {..n}))
 2. \<not> 0 < k \<Longrightarrow> nth_root_nat k n = (if k = 0 then 0 else Max (Set.filter (\<lambda>m. m ^ k \<le> n) {..n}))
[PROOF STEP]
hence "Set.filter (\<lambda>m. m ^ k \<le> n) {..n} = {m. m ^ k \<le> n}"
[PROOF STATE]
proof (prove)
using this:
{m. m ^ k \<le> n} \<subseteq> {..n}

goal (1 subgoal):
 1. Set.filter (\<lambda>m. m ^ k \<le> n) {..n} = {m. m ^ k \<le> n}
[PROOF STEP]
by (auto simp: Set.filter_def)
[PROOF STATE]
proof (state)
this:
Set.filter (\<lambda>m. m ^ k \<le> n) {..n} = {m. m ^ k \<le> n}

goal (2 subgoals):
 1. 0 < k \<Longrightarrow> nth_root_nat k n = (if k = 0 then 0 else Max (Set.filter (\<lambda>m. m ^ k \<le> n) {..n}))
 2. \<not> 0 < k \<Longrightarrow> nth_root_nat k n = (if k = 0 then 0 else Max (Set.filter (\<lambda>m. m ^ k \<le> n) {..n}))
[PROOF STEP]
with True
[PROOF STATE]
proof (chain)
picking this:
0 < k
Set.filter (\<lambda>m. m ^ k \<le> n) {..n} = {m. m ^ k \<le> n}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
0 < k
Set.filter (\<lambda>m. m ^ k \<le> n) {..n} = {m. m ^ k \<le> n}

goal (1 subgoal):
 1. nth_root_nat k n = (if k = 0 then 0 else Max (Set.filter (\<lambda>m. m ^ k \<le> n) {..n}))
[PROOF STEP]
by (simp add: nth_root_nat_def Set.filter_def)
[PROOF STATE]
proof (state)
this:
nth_root_nat k n = (if k = 0 then 0 else Max (Set.filter (\<lambda>m. m ^ k \<le> n) {..n}))

goal (1 subgoal):
 1. \<not> 0 < k \<Longrightarrow> nth_root_nat k n = (if k = 0 then 0 else Max (Set.filter (\<lambda>m. m ^ k \<le> n) {..n}))
[PROOF STEP]
qed simp


[STATEMENT]
lemma well_formed_path_io_containment :
  assumes "well_formed M"
  and     "path M p q"
shows "set (map fst p) \<subseteq> (inputs M \<times> outputs M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (map fst p) \<subseteq> inputs M \<times> outputs M
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
well_formed M
path M p q

goal (1 subgoal):
 1. set (map fst p) \<subseteq> inputs M \<times> outputs M
[PROOF STEP]
proof (induction p arbitrary: q)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>q. \<lbrakk>well_formed M; path M [] q\<rbrakk> \<Longrightarrow> set (map fst []) \<subseteq> inputs M \<times> outputs M
 2. \<And>a p q. \<lbrakk>\<And>q. \<lbrakk>well_formed M; path M p q\<rbrakk> \<Longrightarrow> set (map fst p) \<subseteq> inputs M \<times> outputs M; well_formed M; path M (a # p) q\<rbrakk> \<Longrightarrow> set (map fst (a # p)) \<subseteq> inputs M \<times> outputs M
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:
well_formed M
path M [] q

goal (2 subgoals):
 1. \<And>q. \<lbrakk>well_formed M; path M [] q\<rbrakk> \<Longrightarrow> set (map fst []) \<subseteq> inputs M \<times> outputs M
 2. \<And>a p q. \<lbrakk>\<And>q. \<lbrakk>well_formed M; path M p q\<rbrakk> \<Longrightarrow> set (map fst p) \<subseteq> inputs M \<times> outputs M; well_formed M; path M (a # p) q\<rbrakk> \<Longrightarrow> set (map fst (a # p)) \<subseteq> inputs M \<times> outputs M
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
well_formed M
path M [] q
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
well_formed M
path M [] q

goal (1 subgoal):
 1. set (map fst []) \<subseteq> inputs M \<times> outputs M
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
set (map fst []) \<subseteq> inputs M \<times> outputs M

goal (1 subgoal):
 1. \<And>a p q. \<lbrakk>\<And>q. \<lbrakk>well_formed M; path M p q\<rbrakk> \<Longrightarrow> set (map fst p) \<subseteq> inputs M \<times> outputs M; well_formed M; path M (a # p) q\<rbrakk> \<Longrightarrow> set (map fst (a # p)) \<subseteq> inputs M \<times> outputs M
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a p q. \<lbrakk>\<And>q. \<lbrakk>well_formed M; path M p q\<rbrakk> \<Longrightarrow> set (map fst p) \<subseteq> inputs M \<times> outputs M; well_formed M; path M (a # p) q\<rbrakk> \<Longrightarrow> set (map fst (a # p)) \<subseteq> inputs M \<times> outputs M
[PROOF STEP]
case (Cons a p)
[PROOF STATE]
proof (state)
this:
\<lbrakk>well_formed M; path M p ?q\<rbrakk> \<Longrightarrow> set (map fst p) \<subseteq> inputs M \<times> outputs M
well_formed M
path M (a # p) q

goal (1 subgoal):
 1. \<And>a p q. \<lbrakk>\<And>q. \<lbrakk>well_formed M; path M p q\<rbrakk> \<Longrightarrow> set (map fst p) \<subseteq> inputs M \<times> outputs M; well_formed M; path M (a # p) q\<rbrakk> \<Longrightarrow> set (map fst (a # p)) \<subseteq> inputs M \<times> outputs M
[PROOF STEP]
have "fst a \<in> (inputs M \<times> outputs M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fst a \<in> inputs M \<times> outputs M
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. fst a \<notin> inputs M \<times> outputs M \<Longrightarrow> False
[PROOF STEP]
assume "fst a \<notin> inputs M \<times> outputs M"
[PROOF STATE]
proof (state)
this:
fst a \<notin> inputs M \<times> outputs M

goal (1 subgoal):
 1. fst a \<notin> inputs M \<times> outputs M \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
fst a \<notin> inputs M \<times> outputs M
[PROOF STEP]
have "fst (fst a) \<notin> inputs M \<or> snd (fst a) \<notin> outputs M"
[PROOF STATE]
proof (prove)
using this:
fst a \<notin> inputs M \<times> outputs M

goal (1 subgoal):
 1. fst (fst a) \<notin> inputs M \<or> snd (fst a) \<notin> outputs M
[PROOF STEP]
by (metis SigmaI prod.collapse)
[PROOF STATE]
proof (state)
this:
fst (fst a) \<notin> inputs M \<or> snd (fst a) \<notin> outputs M

goal (1 subgoal):
 1. fst a \<notin> inputs M \<times> outputs M \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
fst (fst a) \<notin> inputs M \<or> snd (fst a) \<notin> outputs M
[PROOF STEP]
have "succ M (fst a) q = {}"
[PROOF STATE]
proof (prove)
using this:
fst (fst a) \<notin> inputs M \<or> snd (fst a) \<notin> outputs M

goal (1 subgoal):
 1. succ M (fst a) q = {}
[PROOF STEP]
using Cons
[PROOF STATE]
proof (prove)
using this:
fst (fst a) \<notin> inputs M \<or> snd (fst a) \<notin> outputs M
\<lbrakk>well_formed M; path M p ?q\<rbrakk> \<Longrightarrow> set (map fst p) \<subseteq> inputs M \<times> outputs M
well_formed M
path M (a # p) q

goal (1 subgoal):
 1. succ M (fst a) q = {}
[PROOF STEP]
by (metis prod.collapse well_formed.elims(2))
[PROOF STATE]
proof (state)
this:
succ M (fst a) q = {}

goal (1 subgoal):
 1. fst a \<notin> inputs M \<times> outputs M \<Longrightarrow> False
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
succ M (fst a) q = {}

goal (1 subgoal):
 1. fst a \<notin> inputs M \<times> outputs M \<Longrightarrow> False
[PROOF STEP]
have "(snd a) \<in> succ M (fst a) q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. snd a \<in> succ M (fst a) q
[PROOF STEP]
using Cons
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>well_formed M; path M p ?q\<rbrakk> \<Longrightarrow> set (map fst p) \<subseteq> inputs M \<times> outputs M
well_formed M
path M (a # p) q

goal (1 subgoal):
 1. snd a \<in> succ M (fst a) q
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
snd a \<in> succ M (fst a) q

goal (1 subgoal):
 1. fst a \<notin> inputs M \<times> outputs M \<Longrightarrow> False
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
succ M (fst a) q = {}
snd a \<in> succ M (fst a) q
[PROOF STEP]
show "False"
[PROOF STATE]
proof (prove)
using this:
succ M (fst a) q = {}
snd a \<in> succ M (fst a) q

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
fst a \<in> inputs M \<times> outputs M

goal (1 subgoal):
 1. \<And>a p q. \<lbrakk>\<And>q. \<lbrakk>well_formed M; path M p q\<rbrakk> \<Longrightarrow> set (map fst p) \<subseteq> inputs M \<times> outputs M; well_formed M; path M (a # p) q\<rbrakk> \<Longrightarrow> set (map fst (a # p)) \<subseteq> inputs M \<times> outputs M
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
fst a \<in> inputs M \<times> outputs M

goal (1 subgoal):
 1. \<And>a p q. \<lbrakk>\<And>q. \<lbrakk>well_formed M; path M p q\<rbrakk> \<Longrightarrow> set (map fst p) \<subseteq> inputs M \<times> outputs M; well_formed M; path M (a # p) q\<rbrakk> \<Longrightarrow> set (map fst (a # p)) \<subseteq> inputs M \<times> outputs M
[PROOF STEP]
have "set (map fst p) \<subseteq> (inputs M \<times> outputs M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (map fst p) \<subseteq> inputs M \<times> outputs M
[PROOF STEP]
using Cons
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>well_formed M; path M p ?q\<rbrakk> \<Longrightarrow> set (map fst p) \<subseteq> inputs M \<times> outputs M
well_formed M
path M (a # p) q

goal (1 subgoal):
 1. set (map fst p) \<subseteq> inputs M \<times> outputs M
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
set (map fst p) \<subseteq> inputs M \<times> outputs M

goal (1 subgoal):
 1. \<And>a p q. \<lbrakk>\<And>q. \<lbrakk>well_formed M; path M p q\<rbrakk> \<Longrightarrow> set (map fst p) \<subseteq> inputs M \<times> outputs M; well_formed M; path M (a # p) q\<rbrakk> \<Longrightarrow> set (map fst (a # p)) \<subseteq> inputs M \<times> outputs M
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
fst a \<in> inputs M \<times> outputs M
set (map fst p) \<subseteq> inputs M \<times> outputs M
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
fst a \<in> inputs M \<times> outputs M
set (map fst p) \<subseteq> inputs M \<times> outputs M

goal (1 subgoal):
 1. set (map fst (a # p)) \<subseteq> inputs M \<times> outputs M
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
set (map fst (a # p)) \<subseteq> inputs M \<times> outputs M

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma measurable_scount[measurable]:
  assumes [measurable]: "Measurable.pred (stream_space M) P"
  shows "scount P \<in> measurable (stream_space M) (count_space UNIV)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. scount P \<in> stream_space M \<rightarrow>\<^sub>M count_space UNIV
[PROOF STEP]
unfolding scount_eq[abs_def]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>\<omega>. if alw (ev P) \<omega> then \<infinity> else enat (card {i. P (sdrop i \<omega>)})) \<in> stream_space M \<rightarrow>\<^sub>M count_space UNIV
[PROOF STEP]
by measurable


[STATEMENT]
lemma sum_simps[simp]:
      "alphabet\<^sub>3 (sum A B) = alphabet\<^sub>1 A \<union> alphabet\<^sub>2 B"
      "initial\<^sub>3 (sum A B) = initial\<^sub>1 A <+> initial\<^sub>2 B"
      "transition\<^sub>3 (sum A B) a (Inl p) = Inl ` transition\<^sub>1 A a p"
      "transition\<^sub>3 (sum A B) a (Inr q) = Inr ` transition\<^sub>2 B a q"
      "condition\<^sub>3 (sum A B) = condition (condition\<^sub>1 A) (condition\<^sub>2 B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (alphabet\<^sub>3 (local.sum A B) = alphabet\<^sub>1 A \<union> alphabet\<^sub>2 B &&& initial\<^sub>3 (local.sum A B) = initial\<^sub>1 A <+> initial\<^sub>2 B) &&& transition\<^sub>3 (local.sum A B) a (Inl p) = Inl ` transition\<^sub>1 A a p &&& transition\<^sub>3 (local.sum A B) a (Inr q) = Inr ` transition\<^sub>2 B a q &&& condition\<^sub>3 (local.sum A B) = condition (condition\<^sub>1 A) (condition\<^sub>2 B)
[PROOF STEP]
unfolding sum_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (alphabet\<^sub>3 (automaton\<^sub>3 (alphabet\<^sub>1 A \<union> alphabet\<^sub>2 B) (initial\<^sub>1 A <+> initial\<^sub>2 B) (\<lambda>a x. case x of Inl p \<Rightarrow> Inl ` transition\<^sub>1 A a p | Inr q \<Rightarrow> Inr ` transition\<^sub>2 B a q) (condition (condition\<^sub>1 A) (condition\<^sub>2 B))) = alphabet\<^sub>1 A \<union> alphabet\<^sub>2 B &&& initial\<^sub>3 (automaton\<^sub>3 (alphabet\<^sub>1 A \<union> alphabet\<^sub>2 B) (initial\<^sub>1 A <+> initial\<^sub>2 B) (\<lambda>a x. case x of Inl p \<Rightarrow> Inl ` transition\<^sub>1 A a p | Inr q \<Rightarrow> Inr ` transition\<^sub>2 B a q) (condition (condition\<^sub>1 A) (condition\<^sub>2 B))) = initial\<^sub>1 A <+> initial\<^sub>2 B) &&& transition\<^sub>3 (automaton\<^sub>3 (alphabet\<^sub>1 A \<union> alphabet\<^sub>2 B) (initial\<^sub>1 A <+> initial\<^sub>2 B) (\<lambda>a x. case x of Inl p \<Rightarrow> Inl ` transition\<^sub>1 A a p | Inr q \<Rightarrow> Inr ` transition\<^sub>2 B a q) (condition (condition\<^sub>1 A) (condition\<^sub>2 B))) a (Inl p) = Inl ` transition\<^sub>1 A a p &&& transition\<^sub>3 (automaton\<^sub>3 (alphabet\<^sub>1 A \<union> alphabet\<^sub>2 B) (initial\<^sub>1 A <+> initial\<^sub>2 B) (\<lambda>a x. case x of Inl p \<Rightarrow> Inl ` transition\<^sub>1 A a p | Inr q \<Rightarrow> Inr ` transition\<^sub>2 B a q) (condition (condition\<^sub>1 A) (condition\<^sub>2 B))) a (Inr q) = Inr ` transition\<^sub>2 B a q &&& condition\<^sub>3 (automaton\<^sub>3 (alphabet\<^sub>1 A \<union> alphabet\<^sub>2 B) (initial\<^sub>1 A <+> initial\<^sub>2 B) (\<lambda>a x. case x of Inl p \<Rightarrow> Inl ` transition\<^sub>1 A a p | Inr q \<Rightarrow> Inr ` transition\<^sub>2 B a q) (condition (condition\<^sub>1 A) (condition\<^sub>2 B))) = condition (condition\<^sub>1 A) (condition\<^sub>2 B)
[PROOF STEP]
by auto


[STATEMENT]
lemma Invariants_func_is_invariant_n:
  fixes f::"_ \<Rightarrow> 'b::t2_space"
  assumes "f \<in> borel_measurable Invariants" "x \<in> space M"
  shows "f ((T^^n) x) = f x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ((T ^^ n) x) = f x
[PROOF STEP]
by (induction n, auto simp add: assms Invariants_func_is_invariant)


[STATEMENT]
lemma i_State_Change_exists: "
  \<lbrakk> n1 \<le> n2;
    \<not> P (i_Exec_Comp_Stream trans_fun input c n1);
    P (i_Exec_Comp_Stream trans_fun input c n2) \<rbrakk> \<Longrightarrow>
  \<exists>n\<ge>n1. n < n2 \<and>
    \<not> P (i_Exec_Comp_Stream trans_fun input c n) \<and>
    P (i_Exec_Comp_Stream trans_fun input c (Suc n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>n1 \<le> n2; \<not> P (i_Exec_Comp_Stream trans_fun input c n1); P (i_Exec_Comp_Stream trans_fun input c n2)\<rbrakk> \<Longrightarrow> \<exists>n\<ge>n1. n < n2 \<and> \<not> P (i_Exec_Comp_Stream trans_fun input c n) \<and> P (i_Exec_Comp_Stream trans_fun input c (Suc n))
[PROOF STEP]
by (rule nat_Suc_predicate_change_exists)


[STATEMENT]
lemma suppa2__conga123:
  assumes "A B C SuppA D E F" and
    "A' B' C' SuppA D E F"
  shows "A B C CongA A' B' C'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A B C CongA A' B' C'
[PROOF STEP]
using assms(1) assms(2) suppa2__conga456 suppa_sym
[PROOF STATE]
proof (prove)
using this:
A B C SuppA D E F
A' B' C' SuppA D E F
\<lbrakk>?A ?B ?C SuppA ?D ?E ?F ; ?A ?B ?C SuppA ?D' ?E' ?F' \<rbrakk> \<Longrightarrow> ?D ?E ?F CongA ?D' ?E' ?F'
?A ?B ?C SuppA ?D ?E ?F  \<Longrightarrow> ?D ?E ?F SuppA ?A ?B ?C

goal (1 subgoal):
 1. A B C CongA A' B' C'
[PROOF STEP]
by blast


[STATEMENT]
lemma extremally_disconnected_eqs:
  fixes X :: "'a::topological_space set"
  assumes "extremally_disconnected X"
  shows
    "I \<circ> K \<circ> I = K \<circ> (I :: 'a set \<Rightarrow> 'a set)"
    "K \<circ> I \<circ> K = I \<circ> (K :: 'a set \<Rightarrow> 'a set)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. I \<circ> K \<circ> I = K \<circ> I &&& K \<circ> I \<circ> K = I \<circ> K
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
extremally_disconnected X

goal (1 subgoal):
 1. I \<circ> K \<circ> I = K \<circ> I &&& K \<circ> I \<circ> K = I \<circ> K
[PROOF STEP]
unfolding extremally_disconnected_def
[PROOF STATE]
proof (prove)
using this:
K \<circ> I \<circ> K = I \<circ> K

goal (1 subgoal):
 1. I \<circ> K \<circ> I = K \<circ> I &&& K \<circ> I \<circ> K = I \<circ> K
[PROOF STEP]
by (metis K_I_K_I)+


[STATEMENT]
lemma ordinal_div_less: "x < y * z \<Longrightarrow> x div y < (z::ordinal)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x < y * z \<Longrightarrow> x div y < z
[PROOF STEP]
apply (auto simp add: div_ordinal_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x < y * z; 0 < y\<rbrakk> \<Longrightarrow> oInv ((*) y) x < z
[PROOF STEP]
apply (simp add: normal.oInv_less[OF normal_times])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma Limit_ex_eqpoll_vdisjnt:
  assumes "Limit \<alpha>" and "X \<subseteq>\<^sub>\<circ> Y" and "Y \<in>\<^sub>\<circ> Vset \<alpha>"
  obtains Z where "X \<approx>\<^sub>\<circ> Z" and "vdisjnt Z Y" and "Z \<subseteq>\<^sub>\<circ> Vset \<alpha>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>Z. \<lbrakk>X \<approx>\<^sub>\<circ> Z; Z \<inter>\<^sub>\<circ> Y = []\<^sub>\<circ>; Z \<subseteq>\<^sub>\<circ> Vset \<alpha>\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
Limit \<alpha>
X \<subseteq>\<^sub>\<circ> Y
Y \<in>\<^sub>\<circ> Vset \<alpha>

goal (1 subgoal):
 1. (\<And>Z. \<lbrakk>X \<approx>\<^sub>\<circ> Z; Z \<inter>\<^sub>\<circ> Y = []\<^sub>\<circ>; Z \<subseteq>\<^sub>\<circ> Vset \<alpha>\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (intro that[of \<open>mk_doubleton_image X Y\<close>])
    (
      simp_all add:
        mk_doubleton_image_veqpoll
        vdisjnt_mk_doubleton_image
        Limit_mk_doubleton_image_vsubset_Vset
    )


[STATEMENT]
lemma word_bit_induct [case_names zero even odd]:
  \<open>P a\<close> if word_zero: \<open>P 0\<close>
    and word_even: \<open>\<And>a. P a \<Longrightarrow> 0 < a \<Longrightarrow> a < 2 ^ (LENGTH('a) - Suc 0) \<Longrightarrow> P (2 * a)\<close>
    and word_odd: \<open>\<And>a. P a \<Longrightarrow> a < 2 ^ (LENGTH('a) - Suc 0) \<Longrightarrow> P (1 + 2 * a)\<close>
  for P and a :: \<open>'a::len word\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P a
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. P a
[PROOF STEP]
define m :: nat where \<open>m = LENGTH('a) - Suc 0\<close>
[PROOF STATE]
proof (state)
this:
m = LENGTH('a) - Suc 0

goal (1 subgoal):
 1. P a
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
m = LENGTH('a) - Suc 0
[PROOF STEP]
have l: \<open>LENGTH('a) = Suc m\<close>
[PROOF STATE]
proof (prove)
using this:
m = LENGTH('a) - Suc 0

goal (1 subgoal):
 1. LENGTH('a) = Suc m
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
LENGTH('a) = Suc m

goal (1 subgoal):
 1. P a
[PROOF STEP]
define n :: nat where \<open>n = unat a\<close>
[PROOF STATE]
proof (state)
this:
n = unat a

goal (1 subgoal):
 1. P a
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n = unat a
[PROOF STEP]
have \<open>n < 2 ^ LENGTH('a)\<close>
[PROOF STATE]
proof (prove)
using this:
n = unat a

goal (1 subgoal):
 1. n < 2 ^ LENGTH('a)
[PROOF STEP]
by transfer (simp add: take_bit_eq_mod)
[PROOF STATE]
proof (state)
this:
n < 2 ^ LENGTH('a)

goal (1 subgoal):
 1. P a
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n < 2 ^ LENGTH('a)
[PROOF STEP]
have \<open>n < 2 * 2 ^ m\<close>
[PROOF STATE]
proof (prove)
using this:
n < 2 ^ LENGTH('a)

goal (1 subgoal):
 1. n < 2 * 2 ^ m
[PROOF STEP]
by (simp add: l)
[PROOF STATE]
proof (state)
this:
n < 2 * 2 ^ m

goal (1 subgoal):
 1. P a
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n < 2 * 2 ^ m
[PROOF STEP]
have \<open>P (of_nat n)\<close>
[PROOF STATE]
proof (prove)
using this:
n < 2 * 2 ^ m

goal (1 subgoal):
 1. P (word_of_nat n)
[PROOF STEP]
proof (induction n rule: nat_bit_induct)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. 0 < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat 0)
 2. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); 0 < n; 2 * n < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (2 * n))
 3. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); Suc (2 * n) < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (Suc (2 * n)))
[PROOF STEP]
case zero
[PROOF STATE]
proof (state)
this:
0 < 2 * 2 ^ m

goal (3 subgoals):
 1. 0 < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat 0)
 2. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); 0 < n; 2 * n < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (2 * n))
 3. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); Suc (2 * n) < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (Suc (2 * n)))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P (word_of_nat 0)
[PROOF STEP]
by simp (rule word_zero)
[PROOF STATE]
proof (state)
this:
P (word_of_nat 0)

goal (2 subgoals):
 1. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); 0 < n; 2 * n < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (2 * n))
 2. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); Suc (2 * n) < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (Suc (2 * n)))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); 0 < n; 2 * n < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (2 * n))
 2. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); Suc (2 * n) < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (Suc (2 * n)))
[PROOF STEP]
case (even n)
[PROOF STATE]
proof (state)
this:
n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n)
0 < n
2 * n < 2 * 2 ^ m

goal (2 subgoals):
 1. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); 0 < n; 2 * n < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (2 * n))
 2. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); Suc (2 * n) < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (Suc (2 * n)))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n)
0 < n
2 * n < 2 * 2 ^ m
[PROOF STEP]
have \<open>n < 2 ^ m\<close>
[PROOF STATE]
proof (prove)
using this:
n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n)
0 < n
2 * n < 2 * 2 ^ m

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

goal (2 subgoals):
 1. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); 0 < n; 2 * n < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (2 * n))
 2. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); Suc (2 * n) < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (Suc (2 * n)))
[PROOF STEP]
with even.IH
[PROOF STATE]
proof (chain)
picking this:
n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n)
n < 2 ^ m
[PROOF STEP]
have \<open>P (of_nat n)\<close>
[PROOF STATE]
proof (prove)
using this:
n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n)
n < 2 ^ m

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

goal (2 subgoals):
 1. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); 0 < n; 2 * n < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (2 * n))
 2. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); Suc (2 * n) < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (Suc (2 * n)))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
P (word_of_nat n)

goal (2 subgoals):
 1. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); 0 < n; 2 * n < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (2 * n))
 2. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); Suc (2 * n) < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (Suc (2 * n)))
[PROOF STEP]
from \<open>n < 2 ^ m\<close> even.hyps
[PROOF STATE]
proof (chain)
picking this:
n < 2 ^ m
0 < n
[PROOF STEP]
have \<open>0 < (of_nat n :: 'a word)\<close>
[PROOF STATE]
proof (prove)
using this:
n < 2 ^ m
0 < n

goal (1 subgoal):
 1. 0 < word_of_nat n
[PROOF STEP]
by (auto simp add: word_greater_zero_iff l word_of_nat_eq_0_iff)
[PROOF STATE]
proof (state)
this:
0 < word_of_nat n

goal (2 subgoals):
 1. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); 0 < n; 2 * n < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (2 * n))
 2. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); Suc (2 * n) < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (Suc (2 * n)))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
0 < word_of_nat n

goal (2 subgoals):
 1. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); 0 < n; 2 * n < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (2 * n))
 2. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); Suc (2 * n) < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (Suc (2 * n)))
[PROOF STEP]
from \<open>n < 2 ^ m\<close>
[PROOF STATE]
proof (chain)
picking this:
n < 2 ^ m
[PROOF STEP]
have \<open>(of_nat n :: 'a word) < 2 ^ (LENGTH('a) - Suc 0)\<close>
[PROOF STATE]
proof (prove)
using this:
n < 2 ^ m

goal (1 subgoal):
 1. word_of_nat n < 2 ^ (LENGTH('a) - Suc 0)
[PROOF STEP]
using of_nat_word_less_iff [where ?'a = 'a, of n \<open>2 ^ m\<close>]
[PROOF STATE]
proof (prove)
using this:
n < 2 ^ m
(word_of_nat n < word_of_nat (2 ^ m)) = (take_bit LENGTH('a) n < take_bit LENGTH('a) (2 ^ m))

goal (1 subgoal):
 1. word_of_nat n < 2 ^ (LENGTH('a) - Suc 0)
[PROOF STEP]
by (simp add: l take_bit_eq_mod)
[PROOF STATE]
proof (state)
this:
word_of_nat n < 2 ^ (LENGTH('a) - Suc 0)

goal (2 subgoals):
 1. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); 0 < n; 2 * n < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (2 * n))
 2. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); Suc (2 * n) < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (Suc (2 * n)))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
P (word_of_nat n)
0 < word_of_nat n
word_of_nat n < 2 ^ (LENGTH('a) - Suc 0)
[PROOF STEP]
have \<open>P (2 * of_nat n)\<close>
[PROOF STATE]
proof (prove)
using this:
P (word_of_nat n)
0 < word_of_nat n
word_of_nat n < 2 ^ (LENGTH('a) - Suc 0)

goal (1 subgoal):
 1. P (2 * word_of_nat n)
[PROOF STEP]
by (rule word_even)
[PROOF STATE]
proof (state)
this:
P (2 * word_of_nat n)

goal (2 subgoals):
 1. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); 0 < n; 2 * n < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (2 * n))
 2. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); Suc (2 * n) < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (Suc (2 * n)))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
P (2 * word_of_nat n)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
P (2 * word_of_nat n)

goal (1 subgoal):
 1. P (word_of_nat (2 * n))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P (word_of_nat (2 * n))

goal (1 subgoal):
 1. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); Suc (2 * n) < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (Suc (2 * n)))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); Suc (2 * n) < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (Suc (2 * n)))
[PROOF STEP]
case (odd n)
[PROOF STATE]
proof (state)
this:
n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n)
Suc (2 * n) < 2 * 2 ^ m

goal (1 subgoal):
 1. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); Suc (2 * n) < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (Suc (2 * n)))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n)
Suc (2 * n) < 2 * 2 ^ m
[PROOF STEP]
have \<open>Suc n \<le> 2 ^ m\<close>
[PROOF STATE]
proof (prove)
using this:
n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n)
Suc (2 * n) < 2 * 2 ^ m

goal (1 subgoal):
 1. Suc n \<le> 2 ^ m
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Suc n \<le> 2 ^ m

goal (1 subgoal):
 1. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); Suc (2 * n) < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (Suc (2 * n)))
[PROOF STEP]
with odd.IH
[PROOF STATE]
proof (chain)
picking this:
n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n)
Suc n \<le> 2 ^ m
[PROOF STEP]
have \<open>P (of_nat n)\<close>
[PROOF STATE]
proof (prove)
using this:
n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n)
Suc n \<le> 2 ^ m

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

goal (1 subgoal):
 1. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); Suc (2 * n) < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (Suc (2 * n)))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
P (word_of_nat n)

goal (1 subgoal):
 1. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); Suc (2 * n) < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (Suc (2 * n)))
[PROOF STEP]
from \<open>Suc n \<le> 2 ^ m\<close>
[PROOF STATE]
proof (chain)
picking this:
Suc n \<le> 2 ^ m
[PROOF STEP]
have \<open>(of_nat n :: 'a word) < 2 ^ (LENGTH('a) - Suc 0)\<close>
[PROOF STATE]
proof (prove)
using this:
Suc n \<le> 2 ^ m

goal (1 subgoal):
 1. word_of_nat n < 2 ^ (LENGTH('a) - Suc 0)
[PROOF STEP]
using of_nat_word_less_iff [where ?'a = 'a, of n \<open>2 ^ m\<close>]
[PROOF STATE]
proof (prove)
using this:
Suc n \<le> 2 ^ m
(word_of_nat n < word_of_nat (2 ^ m)) = (take_bit LENGTH('a) n < take_bit LENGTH('a) (2 ^ m))

goal (1 subgoal):
 1. word_of_nat n < 2 ^ (LENGTH('a) - Suc 0)
[PROOF STEP]
by (simp add: l take_bit_eq_mod)
[PROOF STATE]
proof (state)
this:
word_of_nat n < 2 ^ (LENGTH('a) - Suc 0)

goal (1 subgoal):
 1. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); Suc (2 * n) < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (Suc (2 * n)))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
P (word_of_nat n)
word_of_nat n < 2 ^ (LENGTH('a) - Suc 0)
[PROOF STEP]
have \<open>P (1 + 2 * of_nat n)\<close>
[PROOF STATE]
proof (prove)
using this:
P (word_of_nat n)
word_of_nat n < 2 ^ (LENGTH('a) - Suc 0)

goal (1 subgoal):
 1. P (1 + 2 * word_of_nat n)
[PROOF STEP]
by (rule word_odd)
[PROOF STATE]
proof (state)
this:
P (1 + 2 * word_of_nat n)

goal (1 subgoal):
 1. \<And>n. \<lbrakk>n < 2 * 2 ^ m \<Longrightarrow> P (word_of_nat n); Suc (2 * n) < 2 * 2 ^ m\<rbrakk> \<Longrightarrow> P (word_of_nat (Suc (2 * n)))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
P (1 + 2 * word_of_nat n)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
P (1 + 2 * word_of_nat n)

goal (1 subgoal):
 1. P (word_of_nat (Suc (2 * n)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P (word_of_nat (Suc (2 * n)))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P (word_of_nat n)

goal (1 subgoal):
 1. P a
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
P (word_of_nat n)

goal (1 subgoal):
 1. P a
[PROOF STEP]
have \<open>of_nat (nat (uint a)) = a\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. word_of_nat (nat (uint a)) = a
[PROOF STEP]
by transfer simp
[PROOF STATE]
proof (state)
this:
word_of_nat (nat (uint a)) = a

goal (1 subgoal):
 1. P a
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
P (word_of_nat n)
word_of_nat (nat (uint a)) = a
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P (word_of_nat n)
word_of_nat (nat (uint a)) = a

goal (1 subgoal):
 1. P a
[PROOF STEP]
by (simp add: n_def)
[PROOF STATE]
proof (state)
this:
P a

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma octo_add_cnj: "q + cnj q = 2 *\<^sub>R (Ree q) *\<^sub>R e0" "cnj q + q = (2*\<^sub>R (Ree q)*\<^sub>R e0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. q + Octonions.cnj q = 2 *\<^sub>R Ree q *\<^sub>R e0 &&& Octonions.cnj q + q = 2 *\<^sub>R Ree q *\<^sub>R e0
[PROOF STEP]
by (simp_all add: octo_eq_iff)


[STATEMENT]
lemma "g_orbital f G U S t\<^sub>0 s \<subseteq> g_orbital f (\<lambda>s. True) U S t\<^sub>0 s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g_orbital f G U S t\<^sub>0 s \<subseteq> g_orbital f (\<lambda>s. True) U S t\<^sub>0 s
[PROOF STEP]
unfolding g_orbital_eq
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {X t |t X. t \<in> U s \<and> \<P> X (down (U s) t) \<subseteq> Collect G \<and> X \<in> Sols f U S t\<^sub>0 s} \<subseteq> {X t |t X. t \<in> U s \<and> \<P> X (down (U s) t) \<subseteq> {s. True} \<and> X \<in> Sols f U S t\<^sub>0 s}
[PROOF STEP]
by auto


[STATEMENT]
lemma conway_powerstar1: "(x\<^bsup>n+1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n \<^esup>\<cdot> (x\<^bsup>n+1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>  = (x\<^bsup>n+1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
proof (cases n)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. n = 0 \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
 2. \<And>nat. n = Suc nat \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:
n = 0

goal (2 subgoals):
 1. n = 0 \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
 2. \<And>nat. n = Suc nat \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
n = 0

goal (1 subgoal):
 1. (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>

goal (1 subgoal):
 1. \<And>nat. n = Suc nat \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>nat. n = Suc nat \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
case (Suc m)
[PROOF STATE]
proof (state)
this:
n = Suc m

goal (1 subgoal):
 1. \<And>nat. n = Suc nat \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
n = Suc m

goal (1 subgoal):
 1. (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. n = Suc m \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
assume assm: "n = Suc m"
[PROOF STATE]
proof (state)
this:
n = Suc m

goal (1 subgoal):
 1. n = Suc m \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
have "(x\<^bsup>m+2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m+1 \<^esup>\<cdot> (x\<^bsup>m+2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m+1\<^esup>  = (x\<^bsup>m+2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsup>m+2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m+1 \<^esup>\<cdot> x\<^bsub>0\<^esub>\<^bsup>m+1\<^esup>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> \<cdot> (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup>
[PROOF STEP]
by (subgoal_tac "m + 1 \<le> m + 2", metis mult.assoc star_sum_power_slide, simp)
[PROOF STATE]
proof (state)
this:
(x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> \<cdot> (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup>

goal (1 subgoal):
 1. n = Suc m \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> \<cdot> (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup>

goal (1 subgoal):
 1. n = Suc m \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
have "...  = (x\<^bsup>m+2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m+1 \<^esup>\<cdot> x\<^bsub>0\<^esub>\<^bsup>m+1\<^esup>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup>
[PROOF STEP]
by (metis star_trans_eq)
[PROOF STATE]
proof (state)
this:
(x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup>

goal (1 subgoal):
 1. n = Suc m \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup>

goal (1 subgoal):
 1. n = Suc m \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
have "...  =  (x\<^bsup>m+2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>(Suc m)+(Suc m)\<^esup>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>Suc m + Suc m\<^esup>
[PROOF STEP]
by (simp add: mult.assoc powsum_prod)
[PROOF STATE]
proof (state)
this:
(x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>Suc m + Suc m\<^esup>

goal (1 subgoal):
 1. n = Suc m \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>Suc m + Suc m\<^esup>

goal (1 subgoal):
 1. n = Suc m \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
have "... =  (x\<^bsup>m+2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsub>0\<^esub>\<^bsup>Suc m \<^esup>+ x\<^bsub>m + 2\<^esub>\<^bsup>m\<^esup>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>Suc m + Suc m\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsub>0\<^esub>\<^bsup>Suc m\<^esup> + x\<^bsub>m + 2\<^esub>\<^bsup>m\<^esup>)
[PROOF STEP]
by (metis monoid_add_class.add.left_neutral powsum_split_var3 add_2_eq_Suc')
[PROOF STATE]
proof (state)
this:
(x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>Suc m + Suc m\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsub>0\<^esub>\<^bsup>Suc m\<^esup> + x\<^bsub>m + 2\<^esub>\<^bsup>m\<^esup>)

goal (1 subgoal):
 1. n = Suc m \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>Suc m + Suc m\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsub>0\<^esub>\<^bsup>Suc m\<^esup> + x\<^bsub>m + 2\<^esub>\<^bsup>m\<^esup>)

goal (1 subgoal):
 1. n = Suc m \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
have "... =  (x\<^bsup>m+2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>Suc m \<^esup>+ (x\<^bsup>m+2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>(m + 2)+ 0\<^esub>\<^bsup>m\<^esup>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsub>0\<^esub>\<^bsup>Suc m\<^esup> + x\<^bsub>m + 2\<^esub>\<^bsup>m\<^esup>) = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>Suc m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>m + 2 + 0\<^esub>\<^bsup>m\<^esup>
[PROOF STEP]
by (simp add: local.distrib_left)
[PROOF STATE]
proof (state)
this:
(x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsub>0\<^esub>\<^bsup>Suc m\<^esup> + x\<^bsub>m + 2\<^esub>\<^bsup>m\<^esup>) = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>Suc m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>m + 2 + 0\<^esub>\<^bsup>m\<^esup>

goal (1 subgoal):
 1. n = Suc m \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsub>0\<^esub>\<^bsup>Suc m\<^esup> + x\<^bsub>m + 2\<^esub>\<^bsup>m\<^esup>) = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>Suc m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>m + 2 + 0\<^esub>\<^bsup>m\<^esup>

goal (1 subgoal):
 1. n = Suc m \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
have "... =  (x\<^bsup>m+2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>Suc m \<^esup>+ (x\<^bsup>m+2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m+2 \<^esup>\<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>Suc m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>m + 2 + 0\<^esub>\<^bsup>m\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>Suc m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 2\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup>
[PROOF STEP]
by (subst powsum_shift[THEN sym], metis mult.assoc)
[PROOF STATE]
proof (state)
this:
(x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>Suc m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>m + 2 + 0\<^esub>\<^bsup>m\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>Suc m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 2\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup>

goal (1 subgoal):
 1. n = Suc m \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>Suc m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>m + 2 + 0\<^esub>\<^bsup>m\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>Suc m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 2\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup>

goal (1 subgoal):
 1. n = Suc m \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
have "... =  (x\<^bsup>m+2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsub>0\<^esub>\<^bsup>m \<^esup>+  x\<^bsup>m+1\<^esup>) + (x\<^bsup>m+2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m+2 \<^esup>\<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>Suc m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 2\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + x\<^bsup>m + 1\<^esup>) + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 2\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup>
[PROOF STEP]
by (simp add:powsum2)
[PROOF STATE]
proof (state)
this:
(x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>Suc m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 2\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + x\<^bsup>m + 1\<^esup>) + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 2\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup>

goal (1 subgoal):
 1. n = Suc m \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>Suc m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 2\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + x\<^bsup>m + 1\<^esup>) + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 2\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup>

goal (1 subgoal):
 1. n = Suc m \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
have "... =  (x\<^bsup>m+2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m \<^esup>+ (x\<^bsup>m+2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m+2 \<^esup>\<cdot> x\<^bsub>0\<^esub>\<^bsup>m \<^esup>+ (x\<^bsup>m+2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m+1\<^esup>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + x\<^bsup>m + 1\<^esup>) + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 2\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 2\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 1\<^esup>
[PROOF STEP]
by (metis add.assoc add.commute add.left_commute distrib_left mult.assoc)
[PROOF STATE]
proof (state)
this:
(x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + x\<^bsup>m + 1\<^esup>) + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 2\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 2\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 1\<^esup>

goal (1 subgoal):
 1. n = Suc m \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + x\<^bsup>m + 1\<^esup>) + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 2\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 2\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 1\<^esup>

goal (1 subgoal):
 1. n = Suc m \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
have "... =  (x\<^bsup>m+2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m \<^esup>+ (x\<^bsup>m+2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m \<^esup>+ (x\<^bsup>m+2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m+1\<^esup>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 2\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 1\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 1\<^esup>
[PROOF STEP]
by (metis add_idem' distrib_right' star_subsum)
[PROOF STATE]
proof (state)
this:
(x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 2\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 1\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 1\<^esup>

goal (1 subgoal):
 1. n = Suc m \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 2\<^esup> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 1\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 1\<^esup>

goal (1 subgoal):
 1. n = Suc m \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
have "... =  (x\<^bsup>m+2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsub>0\<^esub>\<^bsup>m \<^esup>+ x\<^bsup>m+1\<^esup>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 1\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + x\<^bsup>m + 1\<^esup>)
[PROOF STEP]
by (metis add_idem' distrib_left)
[PROOF STATE]
proof (state)
this:
(x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 1\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + x\<^bsup>m + 1\<^esup>)

goal (1 subgoal):
 1. n = Suc m \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m + 1\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + x\<^bsup>m + 1\<^esup>)

goal (1 subgoal):
 1. n = Suc m \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
have "... = (x\<^bsup>m+2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m+1\<^esup>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + x\<^bsup>m + 1\<^esup>) = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup>
[PROOF STEP]
by (simp add:powsum2)
[PROOF STATE]
proof (state)
this:
(x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> (x\<^bsub>0\<^esub>\<^bsup>m\<^esup> + x\<^bsup>m + 1\<^esup>) = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup>

goal (1 subgoal):
 1. n = Suc m \<Longrightarrow> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> \<cdot> (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> \<cdot> (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup> = (x\<^bsup>m + 2\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>m + 1\<^esup>

goal (1 subgoal):
 1. (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>
[PROOF STEP]
by (simp add: assm)
[PROOF STATE]
proof (state)
this:
(x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> \<cdot> (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup> = (x\<^bsup>n + 1\<^esup>)\<^sup>\<star> \<cdot> x\<^bsub>0\<^esub>\<^bsup>n\<^esup>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma line_line1: "line (line a b c) b x = line a b (c + x - c * x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {{a -- b}\<^bsub>c\<^esub> -- b}\<^bsub>x\<^esub> = {a -- b}\<^bsub>c + x - c * x\<^esub>
[PROOF STEP]
by (simp add: line_def algebra_simps)


[STATEMENT]
lemma mod_exp_less_eq_exp:
  \<open>a mod 2 ^ n < 2 ^ n\<close> for a :: int
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a mod 2 ^ n < 2 ^ n
[PROOF STEP]
by (rule pos_mod_bound) simp


[STATEMENT]
lemma powser_inside:
  fixes f :: "nat \<Rightarrow> 'a::{real_normed_div_algebra,banach}"
  shows
    "summable (\<lambda>n. f n * (x^n)) \<Longrightarrow> norm z < norm x \<Longrightarrow>
      summable (\<lambda>n. f n * (z ^ n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>summable (\<lambda>n. f n * x ^ n); norm z < norm x\<rbrakk> \<Longrightarrow> summable (\<lambda>n. f n * z ^ n)
[PROOF STEP]
by (rule powser_insidea [THEN summable_norm_cancel])


[STATEMENT]
lemma IdNatTransCompDefDom: "NatTrans f \<Longrightarrow> (IdNatTrans (NTDom f)) \<approx>>\<bullet> f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. NatTrans f \<Longrightarrow> IdNatTrans (NTDom f) \<approx>>\<bullet> f
[PROOF STEP]
apply(rule NTCompDefinedI)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. NatTrans f \<Longrightarrow> NatTrans (IdNatTrans (NTDom f))
 2. NatTrans f \<Longrightarrow> NatTrans f
 3. NatTrans f \<Longrightarrow> NTCatDom f = NTCatDom (IdNatTrans (NTDom f))
 4. NatTrans f \<Longrightarrow> NTCatCod f = NTCatCod (IdNatTrans (NTDom f))
 5. NatTrans f \<Longrightarrow> NTCod (IdNatTrans (NTDom f)) = NTDom f
[PROOF STEP]
apply(simp_all add: IdNatTransNatTrans NatTransP.NatTransFtor)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. NatTrans f \<Longrightarrow> NTCatDom f = NTCatDom (IdNatTrans (NTDom f))
 2. NatTrans f \<Longrightarrow> NTCatCod f = NTCatCod (IdNatTrans (NTDom f))
 3. NatTrans f \<Longrightarrow> NTCod (IdNatTrans (NTDom f)) = NTDom f
[PROOF STEP]
apply(simp_all add: IdNatTrans_defs CCCD)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma (in comm_semiring_0) poly_cmult_map: "poly (map ((*) c) p) x = c * poly p x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly (map ((*) c) p) x = c * poly p x
[PROOF STEP]
by (induct p) (auto simp add: distrib_left ac_simps)


[STATEMENT]
lemma image_sub: "\<lbrakk>f \<in> A \<rightarrow> B; A1 \<subseteq> A \<rbrakk> \<Longrightarrow> (f`A1) \<subseteq> B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<in> A \<rightarrow> B; A1 \<subseteq> A\<rbrakk> \<Longrightarrow> f ` A1 \<subseteq> B
[PROOF STEP]
by (auto simp add:image_def)


[STATEMENT]
lemma hfref_weaken_pre':
    assumes "\<And>x. \<lbrakk>P x; rdomp (fst R) x\<rbrakk> \<Longrightarrow> P' x"
    assumes "(f,h) \<in> hfref P' R S"
    shows "(f,h) \<in> hfref P R S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f, h) \<in> [P]\<^sub>a R \<rightarrow> S
[PROOF STEP]
apply (rule hfrefI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>c a. P a \<Longrightarrow> hn_refine (fst R a c) (f c) (snd R a c) S (h a)
[PROOF STEP]
apply (rule hn_refine_preI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>c a ha. \<lbrakk>P a; ha \<Turnstile> fst R a c\<rbrakk> \<Longrightarrow> hn_refine (fst R a c) (f c) (snd R a c) S (h a)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P ?x; rdomp (fst R) ?x\<rbrakk> \<Longrightarrow> P' ?x
(f, h) \<in> [P']\<^sub>a R \<rightarrow> S

goal (1 subgoal):
 1. \<And>c a ha. \<lbrakk>P a; ha \<Turnstile> fst R a c\<rbrakk> \<Longrightarrow> hn_refine (fst R a c) (f c) (snd R a c) S (h a)
[PROOF STEP]
by (auto simp: hfref_def rdomp_def)


[STATEMENT]
lemma dvd_prodD: "finite A \<Longrightarrow> prod f A dvd x \<Longrightarrow> a \<in> A \<Longrightarrow> f a dvd x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite A; prod f A dvd x; a \<in> A\<rbrakk> \<Longrightarrow> f a dvd x
[PROOF STEP]
by (erule dvd_trans[OF dvd_prodI])


[STATEMENT]
lemma connecting_walk_split:
  assumes "connecting_walk u v xs" assumes "connecting_walk v z ys"
  shows "connecting_walk u z (xs @ (tl ys))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connecting_walk u z (xs @ tl ys)
[PROOF STEP]
using connecting_walk_def is_walk_append
[PROOF STATE]
proof (prove)
using this:
connecting_walk ?u ?v ?xs \<equiv> is_walk ?xs \<and> hd ?xs = ?u \<and> last ?xs = ?v
\<lbrakk>is_walk ?xs; is_walk ?ys; last ?xs = hd ?ys\<rbrakk> \<Longrightarrow> is_walk (?xs @ tl ?ys)

goal (1 subgoal):
 1. connecting_walk u z (xs @ tl ys)
[PROOF STEP]
by (metis append.right_neutral assms(1) assms(2) connecting_walk_self connecting_walk_wf hd_append2 is_walk_not_empty last_appendR last_tl list.collapse)