[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)


[STATEMENT]
lemma has_derivative_compose:
  "(f has_derivative f') (at x within s) \<Longrightarrow> (g has_derivative g') (at (f x)) \<Longrightarrow>
  ((\<lambda>x. g (f x)) has_derivative (\<lambda>x. g' (f' x))) (at x within s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(f has_derivative f') (at x within s); (g has_derivative g') (at (f x))\<rbrakk> \<Longrightarrow> ((\<lambda>x. g (f x)) has_derivative (\<lambda>x. g' (f' x))) (at x within s)
[PROOF STEP]
by (blast intro: has_derivative_in_compose has_derivative_subset)


[STATEMENT]
lemma wfP_multp: "wfP r \<Longrightarrow> wfP (multp r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wfP r \<Longrightarrow> wfP (multp r)
[PROOF STEP]
unfolding multp_def wfP_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wf {(x, y). r x y} \<Longrightarrow> wf {(M, N). (M, N) \<in> mult {(x, y). r x y}}
[PROOF STEP]
by (simp add: wf_mult)


[STATEMENT]
lemma meet_compl_bot_left1 [simp]: "\<^bold>- x \<sqinter> (x \<sqinter> y) = \<bottom>" if [simp]: "x \<in> carrier L" "y \<in> carrier L"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<^bold>- x \<sqinter> (x \<sqinter> y) = \<bottom>
[PROOF STEP]
by (simp add: meet_assoc[symmetric])


[STATEMENT]
lemma wfP_lstrict_prefix: "wfP lstrict_prefix"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wfP lstrict_prefix
[PROOF STEP]
proof(unfold wfP_def)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. wf {(x, y). lstrict_prefix x y}
[PROOF STEP]
have "wf {(x :: enat, y). x < y}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wf {(x, y). x < y}
[PROOF STEP]
unfolding wf_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>P. (\<forall>x. (\<forall>y. (y, x) \<in> {(x, y). x < y} \<longrightarrow> P y) \<longrightarrow> P x) \<longrightarrow> All P
[PROOF STEP]
by(blast intro: less_induct)
[PROOF STATE]
proof (state)
this:
wf {(x, y). x < y}

goal (1 subgoal):
 1. wf {(x, y). lstrict_prefix x y}
[PROOF STEP]
hence "wf (inv_image {(x, y). x < y} llength)"
[PROOF STATE]
proof (prove)
using this:
wf {(x, y). x < y}

goal (1 subgoal):
 1. wf (inv_image {(x, y). x < y} llength)
[PROOF STEP]
by(rule wf_inv_image)
[PROOF STATE]
proof (state)
this:
wf (inv_image {(x, y). x < y} llength)

goal (1 subgoal):
 1. wf {(x, y). lstrict_prefix x y}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
wf (inv_image {(x, y). x < y} llength)

goal (1 subgoal):
 1. wf {(x, y). lstrict_prefix x y}
[PROOF STEP]
have "{(xs, ys). lstrict_prefix xs ys} \<subseteq> inv_image {(x, y). x < y} llength"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {(xs, ys). lstrict_prefix xs ys} \<subseteq> inv_image {(x, y). x < y} llength
[PROOF STEP]
by(auto intro: lstrict_prefix_llength_less)
[PROOF STATE]
proof (state)
this:
{(xs, ys). lstrict_prefix xs ys} \<subseteq> inv_image {(x, y). x < y} llength

goal (1 subgoal):
 1. wf {(x, y). lstrict_prefix x y}
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
wf (inv_image {(x, y). x < y} llength)
{(xs, ys). lstrict_prefix xs ys} \<subseteq> inv_image {(x, y). x < y} llength
[PROOF STEP]
show "wf {(xs, ys). lstrict_prefix xs ys}"
[PROOF STATE]
proof (prove)
using this:
wf (inv_image {(x, y). x < y} llength)
{(xs, ys). lstrict_prefix xs ys} \<subseteq> inv_image {(x, y). x < y} llength

goal (1 subgoal):
 1. wf {(xs, ys). lstrict_prefix xs ys}
[PROOF STEP]
by(rule wf_subset)
[PROOF STATE]
proof (state)
this:
wf {(xs, ys). lstrict_prefix xs ys}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ideal_field_cases:
  obtains "ideal B = {0}" | "ideal (B::'a::field set) = UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>ideal B = {0::'a} \<Longrightarrow> thesis; ideal B = UNIV \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
proof (cases "ideal B = {0}")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>ideal B = {0::'a} \<Longrightarrow> thesis; ideal B = UNIV \<Longrightarrow> thesis; ideal B = {0::'a}\<rbrakk> \<Longrightarrow> thesis
 2. \<lbrakk>ideal B = {0::'a} \<Longrightarrow> thesis; ideal B = UNIV \<Longrightarrow> thesis; ideal B \<noteq> {0::'a}\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
ideal B = {0::'a}

goal (2 subgoals):
 1. \<lbrakk>ideal B = {0::'a} \<Longrightarrow> thesis; ideal B = UNIV \<Longrightarrow> thesis; ideal B = {0::'a}\<rbrakk> \<Longrightarrow> thesis
 2. \<lbrakk>ideal B = {0::'a} \<Longrightarrow> thesis; ideal B = UNIV \<Longrightarrow> thesis; ideal B \<noteq> {0::'a}\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
ideal B = {0::'a}

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

goal (1 subgoal):
 1. \<lbrakk>ideal B = {0::'a} \<Longrightarrow> thesis; ideal B = UNIV \<Longrightarrow> thesis; ideal B \<noteq> {0::'a}\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>ideal B = {0::'a} \<Longrightarrow> thesis; ideal B = UNIV \<Longrightarrow> thesis; ideal B \<noteq> {0::'a}\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
ideal B \<noteq> {0::'a}

goal (1 subgoal):
 1. \<lbrakk>ideal B = {0::'a} \<Longrightarrow> thesis; ideal B = UNIV \<Longrightarrow> thesis; ideal B \<noteq> {0::'a}\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
hence "\<not> B \<subseteq> {0}"
[PROOF STATE]
proof (prove)
using this:
ideal B \<noteq> {0::'a}

goal (1 subgoal):
 1. \<not> B \<subseteq> {0::'a}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<not> B \<subseteq> {0::'a}

goal (1 subgoal):
 1. \<lbrakk>ideal B = {0::'a} \<Longrightarrow> thesis; ideal B = UNIV \<Longrightarrow> thesis; ideal B \<noteq> {0::'a}\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> B \<subseteq> {0::'a}
[PROOF STEP]
obtain b where "b \<in> B" and "b \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
\<not> B \<subseteq> {0::'a}

goal (1 subgoal):
 1. (\<And>b. \<lbrakk>b \<in> B; b \<noteq> (0::'a)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
b \<in> B
b \<noteq> (0::'a)

goal (1 subgoal):
 1. \<lbrakk>ideal B = {0::'a} \<Longrightarrow> thesis; ideal B = UNIV \<Longrightarrow> thesis; ideal B \<noteq> {0::'a}\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
from this(1)
[PROOF STATE]
proof (chain)
picking this:
b \<in> B
[PROOF STEP]
have "b \<in> ideal B"
[PROOF STATE]
proof (prove)
using this:
b \<in> B

goal (1 subgoal):
 1. b \<in> ideal B
[PROOF STEP]
by (rule ideal.span_base)
[PROOF STATE]
proof (state)
this:
b \<in> ideal B

goal (1 subgoal):
 1. \<lbrakk>ideal B = {0::'a} \<Longrightarrow> thesis; ideal B = UNIV \<Longrightarrow> thesis; ideal B \<noteq> {0::'a}\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
hence "inverse b * b \<in> ideal B"
[PROOF STATE]
proof (prove)
using this:
b \<in> ideal B

goal (1 subgoal):
 1. inverse b * b \<in> ideal B
[PROOF STEP]
by (rule ideal.span_scale)
[PROOF STATE]
proof (state)
this:
inverse b * b \<in> ideal B

goal (1 subgoal):
 1. \<lbrakk>ideal B = {0::'a} \<Longrightarrow> thesis; ideal B = UNIV \<Longrightarrow> thesis; ideal B \<noteq> {0::'a}\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
with \<open>b \<noteq> 0\<close>
[PROOF STATE]
proof (chain)
picking this:
b \<noteq> (0::'a)
inverse b * b \<in> ideal B
[PROOF STEP]
have "ideal B = UNIV"
[PROOF STATE]
proof (prove)
using this:
b \<noteq> (0::'a)
inverse b * b \<in> ideal B

goal (1 subgoal):
 1. ideal B = UNIV
[PROOF STEP]
by (simp add: ideal_eq_UNIV_iff_contains_one)
[PROOF STATE]
proof (state)
this:
ideal B = UNIV

goal (1 subgoal):
 1. \<lbrakk>ideal B = {0::'a} \<Longrightarrow> thesis; ideal B = UNIV \<Longrightarrow> thesis; ideal B \<noteq> {0::'a}\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
ideal B = UNIV

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma unbounded_Greater:
  assumes "valid_region X k I r" "c \<in> X" "unbounded c (region X I r)"
  shows "I c = Greater (k c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. I c = Regions.intv.Greater (k c)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
Regions.valid_region X k I r
c \<in> X
unbounded c (Regions.region X I r)

goal (1 subgoal):
 1. I c = Regions.intv.Greater (k c)
[PROOF STEP]
unfolding unbounded_def
[PROOF STATE]
proof (prove)
using this:
Regions.valid_region X k I r
c \<in> X
\<forall>t. \<exists>u\<in>Regions.region X I r. t < u c

goal (1 subgoal):
 1. I c = Regions.intv.Greater (k c)
[PROOF STEP]
by (auto intro: gt_GreaterD)


[STATEMENT]
lemma iSPEC_rule: "(\<And>x. \<Phi> x \<Longrightarrow> \<Psi> x) \<Longrightarrow> SPEC \<Phi> \<le> SPEC \<Psi>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x. \<Phi> x \<Longrightarrow> \<Psi> x) \<Longrightarrow> SPEC \<Phi> \<le> SPEC \<Psi>
[PROOF STEP]
unfolding iSPEC_eq
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x. \<Phi> x \<Longrightarrow> \<Psi> x) \<Longrightarrow> Sup {return x |x. \<Phi> x} \<le> Sup {return x |x. \<Psi> x}
[PROOF STEP]
by (auto intro: Sup_mono)


[STATEMENT]
lemma betweenI:
  assumes "0 \<le> u" "u \<le> 1" "x = (1 - u) *\<^sub>R a + u *\<^sub>R b"
  shows "between (a, b) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. between (a, b) x
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 \<le> u
u \<le> 1
x = (1 - u) *\<^sub>R a + u *\<^sub>R b

goal (1 subgoal):
 1. between (a, b) x
[PROOF STEP]
unfolding between_def closed_segment_def
[PROOF STATE]
proof (prove)
using this:
0 \<le> u
u \<le> 1
x = (1 - u) *\<^sub>R a + u *\<^sub>R b

goal (1 subgoal):
 1. (case (a, b) of (a, b) \<Rightarrow> \<lambda>x. x \<in> {(1 - u) *\<^sub>R a + u *\<^sub>R b |u. 0 \<le> u \<and> u \<le> 1}) x
[PROOF STEP]
by auto


[STATEMENT]
lemma lc_monom_mult [simp]: "lc (monom_mult c t p) = (c::'b::semiring_no_zero_divisors) * lc p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lc (monom_mult c t p) = c * lc p
[PROOF STEP]
proof (cases "c = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. c = (0::'b) \<Longrightarrow> lc (monom_mult c t p) = c * lc p
 2. c \<noteq> (0::'b) \<Longrightarrow> lc (monom_mult c t p) = c * lc p
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
c = (0::'b)

goal (2 subgoals):
 1. c = (0::'b) \<Longrightarrow> lc (monom_mult c t p) = c * lc p
 2. c \<noteq> (0::'b) \<Longrightarrow> lc (monom_mult c t p) = c * lc p
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
c = (0::'b)

goal (1 subgoal):
 1. lc (monom_mult c t p) = c * lc p
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
lc (monom_mult c t p) = c * lc p

goal (1 subgoal):
 1. c \<noteq> (0::'b) \<Longrightarrow> lc (monom_mult c t p) = c * lc p
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. c \<noteq> (0::'b) \<Longrightarrow> lc (monom_mult c t p) = c * lc p
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
c \<noteq> (0::'b)

goal (1 subgoal):
 1. c \<noteq> (0::'b) \<Longrightarrow> lc (monom_mult c t p) = c * lc p
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lc (monom_mult c t p) = c * lc p
[PROOF STEP]
proof (cases "p = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. p = 0 \<Longrightarrow> lc (monom_mult c t p) = c * lc p
 2. p \<noteq> 0 \<Longrightarrow> lc (monom_mult c t p) = c * lc p
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
p = 0

goal (2 subgoals):
 1. p = 0 \<Longrightarrow> lc (monom_mult c t p) = c * lc p
 2. p \<noteq> 0 \<Longrightarrow> lc (monom_mult c t p) = c * lc p
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
p = 0

goal (1 subgoal):
 1. lc (monom_mult c t p) = c * lc p
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
lc (monom_mult c t p) = c * lc p

goal (1 subgoal):
 1. p \<noteq> 0 \<Longrightarrow> lc (monom_mult c t p) = c * lc p
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. p \<noteq> 0 \<Longrightarrow> lc (monom_mult c t p) = c * lc p
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
p \<noteq> 0

goal (1 subgoal):
 1. p \<noteq> 0 \<Longrightarrow> lc (monom_mult c t p) = c * lc p
[PROOF STEP]
with \<open>c \<noteq> 0\<close>
[PROOF STATE]
proof (chain)
picking this:
c \<noteq> (0::'b)
p \<noteq> 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
c \<noteq> (0::'b)
p \<noteq> 0

goal (1 subgoal):
 1. lc (monom_mult c t p) = c * lc p
[PROOF STEP]
by (simp add: lc_def lt_monom_mult lookup_monom_mult_plus)
[PROOF STATE]
proof (state)
this:
lc (monom_mult c t p) = c * lc p

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
lc (monom_mult c t p) = c * lc p

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma connected_Un: "connected s \<Longrightarrow> connected t \<Longrightarrow> s \<inter> t \<noteq> {} \<Longrightarrow> connected (s \<union> t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>connected s; connected t; s \<inter> t \<noteq> {}\<rbrakk> \<Longrightarrow> connected (s \<union> t)
[PROOF STEP]
using connected_Union [of "{s,t}"]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>sa. sa \<in> {s, t} \<Longrightarrow> connected sa; \<Inter> {s, t} \<noteq> {}\<rbrakk> \<Longrightarrow> connected (\<Union> {s, t})

goal (1 subgoal):
 1. \<lbrakk>connected s; connected t; s \<inter> t \<noteq> {}\<rbrakk> \<Longrightarrow> connected (s \<union> t)
[PROOF STEP]
by auto


[STATEMENT]
lemma set_update_with_aux:
  "distinct (map fst xs) \<Longrightarrow>
    set (update_with_aux v k f xs) =
      (set xs - {k} \<times> UNIV \<union> {(k, f (case map_of xs k of None \<Rightarrow> v | Some v \<Rightarrow> v))})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distinct (map fst xs) \<Longrightarrow> set (update_with_aux v k f xs) = set xs - {k} \<times> UNIV \<union> {(k, f (case map_of xs k of None \<Rightarrow> v | Some v \<Rightarrow> v))}
[PROOF STEP]
by (induct xs) (auto intro: rev_image_eqI)


[STATEMENT]
lemma res_ring_car:
"carrier (Zp_res_ring k) = {0..p ^ k - 1}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. carrier (residue_ring (p ^ k)) = {0..p ^ k - 1}
[PROOF STEP]
unfolding residue_ring_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. carrier \<lparr>carrier = {0..p ^ k - 1}, monoid.mult = \<lambda>x y. x * y mod p ^ k, one = 1, zero = 0, add = \<lambda>x y. (x + y) mod p ^ k\<rparr> = {0..p ^ k - 1}
[PROOF STEP]
by simp


[STATEMENT]
lemma find_min_idx_SomeD_complete:
    "find_min_idx P l = Some i \<Longrightarrow> (P (l!i) \<and> i < length l \<and> (\<forall>j<i. \<not>P (l!j)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. find_min_idx P l = Some i \<Longrightarrow> P (l ! i) \<and> i < length l \<and> (\<forall>j<i. \<not> P (l ! j))
[PROOF STEP]
apply (induction l arbitrary: i)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>i. find_min_idx P [] = Some i \<Longrightarrow> P ([] ! i) \<and> i < length [] \<and> (\<forall>j<i. \<not> P ([] ! j))
 2. \<And>a l i. \<lbrakk>\<And>i. find_min_idx P l = Some i \<Longrightarrow> P (l ! i) \<and> i < length l \<and> (\<forall>j<i. \<not> P (l ! j)); find_min_idx P (a # l) = Some i\<rbrakk> \<Longrightarrow> P ((a # l) ! i) \<and> i < length (a # l) \<and> (\<forall>j<i. \<not> P ((a # l) ! j))
[PROOF STEP]
apply (auto split: if_split_asm)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a l z j. \<lbrakk>\<not> P a; find_min_idx P l = Some z; j < Suc z; P ((a # l) ! j); P (l ! z); z < length l; \<forall>j<z. \<not> P (l ! j)\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply (case_tac j)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a l z j. \<lbrakk>\<not> P a; find_min_idx P l = Some z; j < Suc z; P ((a # l) ! j); P (l ! z); z < length l; \<forall>j<z. \<not> P (l ! j); j = 0\<rbrakk> \<Longrightarrow> False
 2. \<And>a l z j nat. \<lbrakk>\<not> P a; find_min_idx P l = Some z; j < Suc z; P ((a # l) ! j); P (l ! z); z < length l; \<forall>j<z. \<not> P (l ! j); j = Suc nat\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma inv_tr_card_min:
  assumes "inv_translation r"
  shows "card r \<ge> 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 \<le> card r
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 2 \<le> card r
[PROOF STEP]
note [simp] = inv_translation_def
[PROOF STATE]
proof (state)
this:
inv_translation ?r \<equiv> {0..<card ?r} = ?r \<and> {0, 1} \<subseteq> ?r

goal (1 subgoal):
 1. 2 \<le> card r
[PROOF STEP]
have "{0..<x} = r \<Longrightarrow> 2 \<le> x \<longleftrightarrow> 0 \<in> r \<and> 1 \<in> r" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {0..<x} = r \<Longrightarrow> (2 \<le> x) = (0 \<in> r \<and> 1 \<in> r)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{0..<?x} = r \<Longrightarrow> (2 \<le> ?x) = (0 \<in> r \<and> 1 \<in> r)

goal (1 subgoal):
 1. 2 \<le> card r
[PROOF STEP]
thus ge2:"card r\<ge>2"
[PROOF STATE]
proof (prove)
using this:
{0..<?x} = r \<Longrightarrow> (2 \<le> ?x) = (0 \<in> r \<and> 1 \<in> r)

goal (1 subgoal):
 1. 2 \<le> card r
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
{0..<?x} = r \<Longrightarrow> (2 \<le> ?x) = (0 \<in> r \<and> 1 \<in> r)
inv_translation r

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma AbstFormP_subst [simp]:
     "(AbstFormP v i x x')(j::=t) = AbstFormP (subst j t v) (subst j t i) (subst j t x) (subst j t x')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (AbstFormP v i x x')(j::=t) = AbstFormP (subst j t v) (subst j t i) (subst j t x) (subst j t x')
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (AbstFormP v i x x')(j::=t) = AbstFormP (subst j t v) (subst j t i) (subst j t x) (subst j t x')
[PROOF STEP]
obtain s::name and k::name  where "atom s \<sharp> (v,i,x,x',t,j,k)" "atom k \<sharp> (v,i,x,x',t,j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>s k. \<lbrakk>atom s \<sharp> (v, i, x, x', t, j, k); atom k \<sharp> (v, i, x, x', t, j)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis obtain_fresh)
[PROOF STATE]
proof (state)
this:
atom s \<sharp> (v, i, x, x', t, j, k)
atom k \<sharp> (v, i, x, x', t, j)

goal (1 subgoal):
 1. (AbstFormP v i x x')(j::=t) = AbstFormP (subst j t v) (subst j t i) (subst j t x) (subst j t x')
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
atom s \<sharp> (v, i, x, x', t, j, k)
atom k \<sharp> (v, i, x, x', t, j)

goal (1 subgoal):
 1. (AbstFormP v i x x')(j::=t) = AbstFormP (subst j t v) (subst j t i) (subst j t x) (subst j t x')
[PROOF STEP]
by (auto simp: AbstFormP.simps [of s _ _ _ _ k])
[PROOF STATE]
proof (state)
this:
(AbstFormP v i x x')(j::=t) = AbstFormP (subst j t v) (subst j t i) (subst j t x) (subst j t x')

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lists_length_eq_Suc_eq_image_Cons:
  "{xs. set xs \<subseteq> A \<and> length xs = Suc n} = (\<lambda>(x, xs). x#xs) ` (A \<times> {xs. set xs \<subseteq> A \<and> length xs = n})"
  (is "?A = ?B")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {xs. set xs \<subseteq> A \<and> length xs = Suc n} = (\<lambda>(x, xs). x # xs) ` (A \<times> {xs. set xs \<subseteq> A \<and> length xs = n})
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. {xs. set xs \<subseteq> A \<and> length xs = Suc n} \<subseteq> (\<lambda>(x, xs). x # xs) ` (A \<times> {xs. set xs \<subseteq> A \<and> length xs = n})
 2. (\<lambda>(x, xs). x # xs) ` (A \<times> {xs. set xs \<subseteq> A \<and> length xs = n}) \<subseteq> {xs. set xs \<subseteq> A \<and> length xs = Suc n}
[PROOF STEP]
show "?A \<subseteq> ?B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {xs. set xs \<subseteq> A \<and> length xs = Suc n} \<subseteq> (\<lambda>(x, xs). x # xs) ` (A \<times> {xs. set xs \<subseteq> A \<and> length xs = n})
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> {xs. set xs \<subseteq> A \<and> length xs = Suc n} \<Longrightarrow> x \<in> (\<lambda>(x, xs). x # xs) ` (A \<times> {xs. set xs \<subseteq> A \<and> length xs = n})
[PROOF STEP]
fix xs
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> {xs. set xs \<subseteq> A \<and> length xs = Suc n} \<Longrightarrow> x \<in> (\<lambda>(x, xs). x # xs) ` (A \<times> {xs. set xs \<subseteq> A \<and> length xs = n})
[PROOF STEP]
assume "xs \<in> ?A"
[PROOF STATE]
proof (state)
this:
xs \<in> {xs. set xs \<subseteq> A \<and> length xs = Suc n}

goal (1 subgoal):
 1. \<And>x. x \<in> {xs. set xs \<subseteq> A \<and> length xs = Suc n} \<Longrightarrow> x \<in> (\<lambda>(x, xs). x # xs) ` (A \<times> {xs. set xs \<subseteq> A \<and> length xs = n})
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
xs \<in> {xs. set xs \<subseteq> A \<and> length xs = Suc n}
[PROOF STEP]
show "xs \<in> ?B"
[PROOF STATE]
proof (prove)
using this:
xs \<in> {xs. set xs \<subseteq> A \<and> length xs = Suc n}

goal (1 subgoal):
 1. xs \<in> (\<lambda>(x, xs). x # xs) ` (A \<times> {xs. set xs \<subseteq> A \<and> length xs = n})
[PROOF STEP]
by (cases xs) auto
[PROOF STATE]
proof (state)
this:
xs \<in> (\<lambda>(x, xs). x # xs) ` (A \<times> {xs. set xs \<subseteq> A \<and> length xs = n})

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
{xs. set xs \<subseteq> A \<and> length xs = Suc n} \<subseteq> (\<lambda>(x, xs). x # xs) ` (A \<times> {xs. set xs \<subseteq> A \<and> length xs = n})

goal (1 subgoal):
 1. (\<lambda>(x, xs). x # xs) ` (A \<times> {xs. set xs \<subseteq> A \<and> length xs = n}) \<subseteq> {xs. set xs \<subseteq> A \<and> length xs = Suc n}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>(x, xs). x # xs) ` (A \<times> {xs. set xs \<subseteq> A \<and> length xs = n}) \<subseteq> {xs. set xs \<subseteq> A \<and> length xs = Suc n}
[PROOF STEP]
show "?B \<subseteq> ?A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>(x, xs). x # xs) ` (A \<times> {xs. set xs \<subseteq> A \<and> length xs = n}) \<subseteq> {xs. set xs \<subseteq> A \<and> length xs = Suc n}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<lambda>(x, xs). x # xs) ` (A \<times> {xs. set xs \<subseteq> A \<and> length xs = n}) \<subseteq> {xs. set xs \<subseteq> A \<and> length xs = Suc n}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Rdual:
  assumes major: "\<And>S. S \<subseteq> A \<Longrightarrow> \<exists>L. isLub S po L" and "S \<subseteq> A" and "A = pset po"
  shows "\<exists>G. isGlb S po G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>G. isGlb S po G
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. isGlb S po ?G
[PROOF STEP]
show "isGlb S po (lub {y \<in> A. \<forall>k\<in>S. (y, k) \<in> order po} po)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. isGlb S po (lub {y \<in> A. \<forall>k\<in>S. (y, k) \<in> order po} po)
[PROOF STEP]
using major [of "{y. y \<in> A \<and> (\<forall>k \<in> S. (y, k) \<in> order po)}"] \<open>S \<subseteq> A\<close> \<open>A = pset po\<close>
[PROOF STATE]
proof (prove)
using this:
{y \<in> A. \<forall>k\<in>S. (y, k) \<in> order po} \<subseteq> A \<Longrightarrow> \<exists>L. isLub {y \<in> A. \<forall>k\<in>S. (y, k) \<in> order po} po L
S \<subseteq> A
A = pset po

goal (1 subgoal):
 1. isGlb S po (lub {y \<in> A. \<forall>k\<in>S. (y, k) \<in> order po} po)
[PROOF STEP]
apply (simp add: isLub_lub isGlb_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>isLub {y \<in> pset po. \<forall>k\<in>S. (y, k) \<in> order po} po (lub {y \<in> pset po. \<forall>k\<in>S. (y, k) \<in> order po} po); S \<subseteq> pset po; A = pset po\<rbrakk> \<Longrightarrow> lub {y \<in> pset po. \<forall>k\<in>S. (y, k) \<in> order po} po \<in> pset po \<and> (\<forall>y\<in>S. (lub {y \<in> pset po. \<forall>k\<in>S. (y, k) \<in> order po} po, y) \<in> order po) \<and> (\<forall>z\<in>pset po. (\<forall>y\<in>S. (z, y) \<in> order po) \<longrightarrow> (z, lub {y \<in> pset po. \<forall>k\<in>S. (y, k) \<in> order po} po) \<in> order po)
[PROOF STEP]
apply (auto simp add: isLub_def)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
isGlb S po (lub {y \<in> A. \<forall>k\<in>S. (y, k) \<in> order po} po)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lcm_ge_0_int [simp]: "lcm x y \<ge> 0"
  for x y :: int
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> lcm x y
[PROOF STEP]
by (simp only: lcm_int_def)


[STATEMENT]
lemma S_O_S: "S O S \<subseteq> S" "S O S O T \<subseteq> S O T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S O S \<subseteq> S &&& S O S O T \<subseteq> S O T
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. S O S \<subseteq> S
 2. S O S O T \<subseteq> S O T
[PROOF STEP]
show "S O S \<subseteq> S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S O S \<subseteq> S
[PROOF STEP]
by (fact trans_O_subset[OF trans_S])
[PROOF STATE]
proof (state)
this:
S O S \<subseteq> S

goal (1 subgoal):
 1. S O S O T \<subseteq> S O T
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
S O S \<subseteq> S
[PROOF STEP]
show "S O S O T \<subseteq> S O T"
[PROOF STATE]
proof (prove)
using this:
S O S \<subseteq> S

goal (1 subgoal):
 1. S O S O T \<subseteq> S O T
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
S O S O T \<subseteq> S O T

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma natural_eqI:
  "nat_of_natural m = nat_of_natural n \<Longrightarrow> m = n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nat_of_natural m = nat_of_natural n \<Longrightarrow> m = n
[PROOF STEP]
using natural_eq_iff [of m n]
[PROOF STATE]
proof (prove)
using this:
(m = n) = (nat_of_natural m = nat_of_natural n)

goal (1 subgoal):
 1. nat_of_natural m = nat_of_natural n \<Longrightarrow> m = n
[PROOF STEP]
by simp


[STATEMENT]
lemma deriv_f: "deriv s = (\<Union>x. set (map (Pair x) (f [s] x)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. deriv s = (\<Union>x. set (map (Pair x) (f [s] x)))
[PROOF STEP]
using f
[PROOF STATE]
proof (prove)
using this:
\<forall>x. ((?n, x) \<in> deriv ?s) = (x \<in> set (f [?s] ?n))

goal (1 subgoal):
 1. deriv s = (\<Union>x. set (map (Pair x) (f [s] x)))
[PROOF STEP]
by (auto simp add: set_eq_iff)


[STATEMENT]
theorem Cantor: "\<nexists>f :: 'a \<Rightarrow> 'a set. \<forall>A. \<exists>x. A = f x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<nexists>f. \<forall>A. \<exists>x. A = f x
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>f. \<forall>A. \<exists>x. A = f x \<Longrightarrow> False
[PROOF STEP]
assume "\<exists>f :: 'a \<Rightarrow> 'a set. \<forall>A. \<exists>x. A = f x"
[PROOF STATE]
proof (state)
this:
\<exists>f. \<forall>A. \<exists>x. A = f x

goal (1 subgoal):
 1. \<exists>f. \<forall>A. \<exists>x. A = f x \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>f. \<forall>A. \<exists>x. A = f x
[PROOF STEP]
obtain f :: "'a \<Rightarrow> 'a set" where *: "\<forall>A. \<exists>x. A = f x"
[PROOF STATE]
proof (prove)
using this:
\<exists>f. \<forall>A. \<exists>x. A = f x

goal (1 subgoal):
 1. (\<And>f. \<forall>A. \<exists>x. A = f x \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
\<forall>A. \<exists>x. A = f x

goal (1 subgoal):
 1. \<exists>f. \<forall>A. \<exists>x. A = f x \<Longrightarrow> False
[PROOF STEP]
let ?D = "{x. x \<notin> f x}"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>f. \<forall>A. \<exists>x. A = f x \<Longrightarrow> False
[PROOF STEP]
from *
[PROOF STATE]
proof (chain)
picking this:
\<forall>A. \<exists>x. A = f x
[PROOF STEP]
obtain a where "?D = f a"
[PROOF STATE]
proof (prove)
using this:
\<forall>A. \<exists>x. A = f x

goal (1 subgoal):
 1. (\<And>a. {x. x \<notin> f x} = f a \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
{x. x \<notin> f x} = f a

goal (1 subgoal):
 1. \<exists>f. \<forall>A. \<exists>x. A = f x \<Longrightarrow> False
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
{x. x \<notin> f x} = f a

goal (1 subgoal):
 1. \<exists>f. \<forall>A. \<exists>x. A = f x \<Longrightarrow> False
[PROOF STEP]
have "a \<in> ?D \<longleftrightarrow> a \<notin> f a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a \<in> {x. x \<notin> f x}) = (a \<notin> f a)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(a \<in> {x. x \<notin> f x}) = (a \<notin> f a)

goal (1 subgoal):
 1. \<exists>f. \<forall>A. \<exists>x. A = f x \<Longrightarrow> False
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
{x. x \<notin> f x} = f a
(a \<in> {x. x \<notin> f x}) = (a \<notin> f a)
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
{x. x \<notin> f x} = f a
(a \<in> {x. x \<notin> f x}) = (a \<notin> f a)

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fpxs_of_fls_power [simp]: "fpxs_of_fls (f ^ n) = fpxs_of_fls f ^ n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fpxs_of_fls (f ^ n) = fpxs_of_fls f ^ n
[PROOF STEP]
by (induction n) auto


[STATEMENT]
lemma alluopairs_set1: "set (alluopairs xs) \<le> {(x, y). x\<in> set xs \<and> y\<in> set xs}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (alluopairs xs) \<subseteq> {(x, y). x \<in> set xs \<and> y \<in> set xs}
[PROOF STEP]
by (induct xs) auto


[STATEMENT]
lemma pochhammer_minus:
  "pochhammer (- b) k = ((- 1) ^ k :: 'a::comm_ring_1) * pochhammer (b - of_nat k + 1) k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pochhammer (- b) k = (- (1::'a)) ^ k * pochhammer (b - of_nat k + (1::'a)) k
[PROOF STEP]
proof (cases k)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. k = 0 \<Longrightarrow> pochhammer (- b) k = (- (1::'a)) ^ k * pochhammer (b - of_nat k + (1::'a)) k
 2. \<And>nat. k = Suc nat \<Longrightarrow> pochhammer (- b) k = (- (1::'a)) ^ k * pochhammer (b - of_nat k + (1::'a)) k
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:
k = 0

goal (2 subgoals):
 1. k = 0 \<Longrightarrow> pochhammer (- b) k = (- (1::'a)) ^ k * pochhammer (b - of_nat k + (1::'a)) k
 2. \<And>nat. k = Suc nat \<Longrightarrow> pochhammer (- b) k = (- (1::'a)) ^ k * pochhammer (b - of_nat k + (1::'a)) k
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
k = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
k = 0

goal (1 subgoal):
 1. pochhammer (- b) k = (- (1::'a)) ^ k * pochhammer (b - of_nat k + (1::'a)) k
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
pochhammer (- b) k = (- (1::'a)) ^ k * pochhammer (b - of_nat k + (1::'a)) k

goal (1 subgoal):
 1. \<And>nat. k = Suc nat \<Longrightarrow> pochhammer (- b) k = (- (1::'a)) ^ k * pochhammer (b - of_nat k + (1::'a)) k
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>nat. k = Suc nat \<Longrightarrow> pochhammer (- b) k = (- (1::'a)) ^ k * pochhammer (b - of_nat k + (1::'a)) k
[PROOF STEP]
case (Suc h)
[PROOF STATE]
proof (state)
this:
k = Suc h

goal (1 subgoal):
 1. \<And>nat. k = Suc nat \<Longrightarrow> pochhammer (- b) k = (- (1::'a)) ^ k * pochhammer (b - of_nat k + (1::'a)) k
[PROOF STEP]
have eq: "((- 1) ^ Suc h :: 'a) = (\<Prod>i = 0..h. - 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (- (1::'a)) ^ Suc h = (\<Prod>i = 0..h. - (1::'a))
[PROOF STEP]
using prod_constant [where A="{0.. h}" and y="- 1 :: 'a"]
[PROOF STATE]
proof (prove)
using this:
(\<Prod>x = 0..h. - (1::'a)) = (- (1::'a)) ^ card {0..h}

goal (1 subgoal):
 1. (- (1::'a)) ^ Suc h = (\<Prod>i = 0..h. - (1::'a))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(- (1::'a)) ^ Suc h = (\<Prod>i = 0..h. - (1::'a))

goal (1 subgoal):
 1. \<And>nat. k = Suc nat \<Longrightarrow> pochhammer (- b) k = (- (1::'a)) ^ k * pochhammer (b - of_nat k + (1::'a)) k
[PROOF STEP]
with Suc
[PROOF STATE]
proof (chain)
picking this:
k = Suc h
(- (1::'a)) ^ Suc h = (\<Prod>i = 0..h. - (1::'a))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
k = Suc h
(- (1::'a)) ^ Suc h = (\<Prod>i = 0..h. - (1::'a))

goal (1 subgoal):
 1. pochhammer (- b) k = (- (1::'a)) ^ k * pochhammer (b - of_nat k + (1::'a)) k
[PROOF STEP]
using pochhammer_Suc_prod_rev [of "b - of_nat k + 1"]
[PROOF STATE]
proof (prove)
using this:
k = Suc h
(- (1::'a)) ^ Suc h = (\<Prod>i = 0..h. - (1::'a))
pochhammer (b - of_nat k + (1::'a)) (Suc ?n) = (\<Prod>i = 0..?n. b - of_nat k + (1::'a) + of_nat (?n - i))

goal (1 subgoal):
 1. pochhammer (- b) k = (- (1::'a)) ^ k * pochhammer (b - of_nat k + (1::'a)) k
[PROOF STEP]
by (auto simp add: pochhammer_Suc_prod prod.distrib [symmetric] eq of_nat_diff simp del: prod_constant)
[PROOF STATE]
proof (state)
this:
pochhammer (- b) k = (- (1::'a)) ^ k * pochhammer (b - of_nat k + (1::'a)) k

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma metric_LIM_I:
  "(\<And>r. 0 < r \<Longrightarrow> \<exists>s>0. \<forall>x. x \<noteq> a \<and> dist x a < s \<longrightarrow> dist (f x) L < r) \<Longrightarrow> f \<midarrow>a\<rightarrow> L"
  for a :: "'a::metric_space" and L :: "'b::metric_space"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>r. 0 < r \<Longrightarrow> \<exists>s>0. \<forall>x. x \<noteq> a \<and> dist x a < s \<longrightarrow> dist (f x) L < r) \<Longrightarrow> f \<midarrow>a\<rightarrow> L
[PROOF STEP]
by (simp add: LIM_def)


[STATEMENT]
lemma Mapping_lookup_None_intro: "x \<notin> mmap_keys f \<Longrightarrow> mmap_lookup f x = None"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<notin> mmap_keys f \<Longrightarrow> mmap_lookup f x = None
[PROOF STEP]
unfolding mmap_lookup_def mmap_keys_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<notin> set (map fst f) \<Longrightarrow> map_of f x = None
[PROOF STEP]
by (simp add: map_of_eq_None_iff)


[STATEMENT]
lemma poly_translate_correct:
  assumes "num_params p \<le> length x"
  assumes "length x = length v"
  shows "Ipoly x (poly_translate v p) = Ipoly (map2 (+) x v) p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ipoly x (poly_translate v p) = Ipoly (map2 (+) x v) p
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
num_params p \<le> length x
length x = length v

goal (1 subgoal):
 1. Ipoly x (poly_translate v p) = Ipoly (map2 (+) x v) p
[PROOF STEP]
by (induction p, simp_all)


[STATEMENT]
lemma lsl_Sup_closed_var [simp]: "\<nu> (\<Squnion>x \<in> X. \<nu> x) = (\<Squnion>x \<in> X. \<nu> (x::'a::unital_quantale))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<nu> (\<Squnion> (\<nu> ` X)) = \<Squnion> (\<nu> ` X)
[PROOF STEP]
unfolding lsl_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<top> \<cdot> \<Squnion> ((\<cdot>) \<top> ` X) = \<Squnion> ((\<cdot>) \<top> ` X)
[PROOF STEP]
by (metis Sup_distl mult.assoc top_times_top)


[STATEMENT]
lemma connected_Un: "connected s \<Longrightarrow> connected t \<Longrightarrow> s \<inter> t \<noteq> {} \<Longrightarrow> connected (s \<union> t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>connected s; connected t; s \<inter> t \<noteq> {}\<rbrakk> \<Longrightarrow> connected (s \<union> t)
[PROOF STEP]
using connected_Union [of "{s,t}"]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>sa. sa \<in> {s, t} \<Longrightarrow> connected sa; \<Inter> {s, t} \<noteq> {}\<rbrakk> \<Longrightarrow> connected (\<Union> {s, t})

goal (1 subgoal):
 1. \<lbrakk>connected s; connected t; s \<inter> t \<noteq> {}\<rbrakk> \<Longrightarrow> connected (s \<union> t)
[PROOF STEP]
by auto


[STATEMENT]
lemma space_PiM_not_empty[simp]: "space (PiM UNIV M) \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. space (Pi\<^sub>M UNIV M) \<noteq> {}
[PROOF STEP]
unfolding space_PiM_empty_iff
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> (\<exists>i\<in>UNIV. space (M i) = {})
[PROOF STEP]
by auto


[STATEMENT]
lemma prv_scnj_mono_imp:
  assumes "F1 \<subseteq> fmla" "F2 \<subseteq> fmla" "finite F1" "finite F2"
    and "\<forall> \<phi>2 \<in> F2. \<exists> \<phi>1 \<in> F1. prv (imp \<phi>1 \<phi>2)"
  shows "prv (imp (scnj F1) (scnj F2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prv (imp (scnj F1) (scnj F2))
[PROOF STEP]
unfolding scnj_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prv (imp (lcnj (asList F1)) (lcnj (asList F2)))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
F1 \<subseteq> fmla
F2 \<subseteq> fmla
finite F1
finite F2
\<forall>\<phi>2\<in>F2. \<exists>\<phi>1\<in>F1. prv (imp \<phi>1 \<phi>2)

goal (1 subgoal):
 1. prv (imp (lcnj (asList F1)) (lcnj (asList F2)))
[PROOF STEP]
by (intro prv_lcnj_mono_imp) auto


[STATEMENT]
lemma fps_XDp_fps_integral [simp]:
  fixes  a :: "'a::{division_ring,ring_char_0} fps"
  shows  "fps_XDp 0 (fps_integral a c) = fps_X * a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fps_XDp (0::'a) (fps_integral a c) = fps_X * a
[PROOF STEP]
using  fps_deriv_fps_integral[of a c]
[PROOF STATE]
proof (prove)
using this:
fps_deriv (fps_integral a c) = a

goal (1 subgoal):
 1. fps_XDp (0::'a) (fps_integral a c) = fps_X * a
[PROOF STEP]
by     (simp add: fps_XD_def)


[STATEMENT]
lemma llist_inf_simps [simp, code, nitpick_simp]:
  "inf LNil xs = LNil"
  "inf xs LNil = LNil"
  "inf (LCons x xs) (LCons y ys) = (if x = y then LCons x (inf xs ys) else LNil)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LNil \<sqinter> xs = LNil &&& xs \<sqinter> LNil = LNil &&& LCons x xs \<sqinter> LCons y ys = (if x = y then LCons x (xs \<sqinter> ys) else LNil)
[PROOF STEP]
unfolding inf_llist_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unfold_llist (\<lambda>(xs, ys). xs \<noteq> LNil \<longrightarrow> ys \<noteq> LNil \<longrightarrow> lhd xs \<noteq> lhd ys) (lhd \<circ> snd) (map_prod ltl ltl) (LNil, xs) = LNil &&& unfold_llist (\<lambda>(xs, ys). xs \<noteq> LNil \<longrightarrow> ys \<noteq> LNil \<longrightarrow> lhd xs \<noteq> lhd ys) (lhd \<circ> snd) (map_prod ltl ltl) (xs, LNil) = LNil &&& unfold_llist (\<lambda>(xs, ys). xs \<noteq> LNil \<longrightarrow> ys \<noteq> LNil \<longrightarrow> lhd xs \<noteq> lhd ys) (lhd \<circ> snd) (map_prod ltl ltl) (LCons x xs, LCons y ys) = (if x = y then LCons x (unfold_llist (\<lambda>(xs, ys). xs \<noteq> LNil \<longrightarrow> ys \<noteq> LNil \<longrightarrow> lhd xs \<noteq> lhd ys) (lhd \<circ> snd) (map_prod ltl ltl) (xs, ys)) else LNil)
[PROOF STEP]
by simp_all


[STATEMENT]
lemma distinct_finite_subset:
  assumes "finite x"
  shows "finite {ys. set ys \<subseteq> x \<and> distinct ys}" (is "finite ?S")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {ys. set ys \<subseteq> x \<and> distinct ys}
[PROOF STEP]
proof (rule finite_subset)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. {ys. set ys \<subseteq> x \<and> distinct ys} \<subseteq> ?B
 2. finite ?B
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
finite x
[PROOF STEP]
show "?S \<subseteq> {ys. set ys \<subseteq> x \<and> length ys \<le> card x}"
[PROOF STATE]
proof (prove)
using this:
finite x

goal (1 subgoal):
 1. {ys. set ys \<subseteq> x \<and> distinct ys} \<subseteq> {ys. set ys \<subseteq> x \<and> length ys \<le> card x}
[PROOF STEP]
by clarsimp (metis distinct_card card_mono)
[PROOF STATE]
proof (state)
this:
{ys. set ys \<subseteq> x \<and> distinct ys} \<subseteq> {ys. set ys \<subseteq> x \<and> length ys \<le> card x}

goal (1 subgoal):
 1. finite {ys. set ys \<subseteq> x \<and> length ys \<le> card x}
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
finite x
[PROOF STEP]
show "finite ..."
[PROOF STATE]
proof (prove)
using this:
finite x

goal (1 subgoal):
 1. finite {ys. set ys \<subseteq> x \<and> length ys \<le> card x}
[PROOF STEP]
by (rule finite_lists_length_le)
[PROOF STATE]
proof (state)
this:
finite {ys. set ys \<subseteq> x \<and> length ys \<le> card x}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma length_rotate[simp]: "length(rotate n xs) = length xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (rotate n xs) = length xs
[PROOF STEP]
by (induct n arbitrary: xs) (simp_all add:rotate_def)


[STATEMENT]
lemma higher_deriv_lnGamma_stirling:
  assumes m: "m > 0"
  shows   "(\<lambda>x::real. (deriv ^^ j) ln_Gamma x - Polygamma_approx j m x) \<in> O(\<lambda>x. 1 / x ^ (m + j))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. (deriv ^^ j) ln_Gamma x - Polygamma_approx j m x) \<in> O(\<lambda>x. 1 / x ^ (m + j))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>x. (deriv ^^ j) ln_Gamma x - Polygamma_approx j m x) \<in> O(\<lambda>x. 1 / x ^ (m + j))
[PROOF STEP]
have "eventually (\<lambda>x. \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar> =
                          inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>) at_top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar> = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>
[PROOF STEP]
using eventually_gt_at_top[of "0::real"]
[PROOF STATE]
proof (prove)
using this:
eventually ((<) 0) at_top

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar> = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>
[PROOF STEP]
proof eventually_elim
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. 0 < x \<Longrightarrow> \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar> = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>
[PROOF STEP]
case (elim x)
[PROOF STATE]
proof (state)
this:
0 < x

goal (1 subgoal):
 1. \<And>x. 0 < x \<Longrightarrow> \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar> = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>
[PROOF STEP]
note x = this
[PROOF STATE]
proof (state)
this:
0 < x

goal (1 subgoal):
 1. \<And>x. 0 < x \<Longrightarrow> \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar> = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>
[PROOF STEP]
have "\<forall>\<^sub>F y in nhds (complex_of_real x). y \<in> - \<real>\<^sub>\<le>\<^sub>0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F y in nhds (complex_of_real x). y \<in> - \<real>\<^sub>\<le>\<^sub>0
[PROOF STEP]
using elim
[PROOF STATE]
proof (prove)
using this:
0 < x

goal (1 subgoal):
 1. \<forall>\<^sub>F y in nhds (complex_of_real x). y \<in> - \<real>\<^sub>\<le>\<^sub>0
[PROOF STEP]
by (intro eventually_nhds_in_open) auto
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F y in nhds (complex_of_real x). y \<in> - \<real>\<^sub>\<le>\<^sub>0

goal (1 subgoal):
 1. \<And>x. 0 < x \<Longrightarrow> \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar> = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>
[PROOF STEP]
hence "(deriv ^^ j) (\<lambda>x. ln_Gamma x - Polygamma_approx 0 m x) (complex_of_real x) =
            (deriv ^^ j) (\<lambda>x. (-inverse (of_nat m)) * stirling_integral m x) (complex_of_real x)"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F y in nhds (complex_of_real x). y \<in> - \<real>\<^sub>\<le>\<^sub>0

goal (1 subgoal):
 1. (deriv ^^ j) (\<lambda>x. ln_Gamma x - Polygamma_approx 0 m x) (complex_of_real x) = (deriv ^^ j) (\<lambda>x. - inverse (of_nat m) * stirling_integral m x) (complex_of_real x)
[PROOF STEP]
using x m
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F y in nhds (complex_of_real x). y \<in> - \<real>\<^sub>\<le>\<^sub>0
0 < x
0 < m

goal (1 subgoal):
 1. (deriv ^^ j) (\<lambda>x. ln_Gamma x - Polygamma_approx 0 m x) (complex_of_real x) = (deriv ^^ j) (\<lambda>x. - inverse (of_nat m) * stirling_integral m x) (complex_of_real x)
[PROOF STEP]
by (intro higher_deriv_cong_ev refl)
         (auto elim!: eventually_mono simp: ln_Gamma_stirling_complex Polygamma_approx_def
            field_simps open_halfspace_Re_gt stirling_sum_def)
[PROOF STATE]
proof (state)
this:
(deriv ^^ j) (\<lambda>x. ln_Gamma x - Polygamma_approx 0 m x) (complex_of_real x) = (deriv ^^ j) (\<lambda>x. - inverse (of_nat m) * stirling_integral m x) (complex_of_real x)

goal (1 subgoal):
 1. \<And>x. 0 < x \<Longrightarrow> \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar> = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(deriv ^^ j) (\<lambda>x. ln_Gamma x - Polygamma_approx 0 m x) (complex_of_real x) = (deriv ^^ j) (\<lambda>x. - inverse (of_nat m) * stirling_integral m x) (complex_of_real x)

goal (1 subgoal):
 1. \<And>x. 0 < x \<Longrightarrow> \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar> = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>
[PROOF STEP]
have "\<dots> = - inverse (of_nat m) * (deriv ^^ j) (stirling_integral m) (of_real x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (deriv ^^ j) (\<lambda>x. - inverse (of_nat m) * stirling_integral m x) (complex_of_real x) = - inverse (of_nat m) * (deriv ^^ j) (stirling_integral m) (complex_of_real x)
[PROOF STEP]
using x m
[PROOF STATE]
proof (prove)
using this:
0 < x
0 < m

goal (1 subgoal):
 1. (deriv ^^ j) (\<lambda>x. - inverse (of_nat m) * stirling_integral m x) (complex_of_real x) = - inverse (of_nat m) * (deriv ^^ j) (stirling_integral m) (complex_of_real x)
[PROOF STEP]
by (intro higher_deriv_cmult[of _ "-\<real>\<^sub>\<le>\<^sub>0"] stirling_integral_holomorphic)
         (auto simp: open_halfspace_Re_gt)
[PROOF STATE]
proof (state)
this:
(deriv ^^ j) (\<lambda>x. - inverse (of_nat m) * stirling_integral m x) (complex_of_real x) = - inverse (of_nat m) * (deriv ^^ j) (stirling_integral m) (complex_of_real x)

goal (1 subgoal):
 1. \<And>x. 0 < x \<Longrightarrow> \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar> = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(deriv ^^ j) (\<lambda>x. - inverse (of_nat m) * stirling_integral m x) (complex_of_real x) = - inverse (of_nat m) * (deriv ^^ j) (stirling_integral m) (complex_of_real x)

goal (1 subgoal):
 1. \<And>x. 0 < x \<Longrightarrow> \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar> = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>
[PROOF STEP]
have "(deriv ^^ j) (\<lambda>x. ln_Gamma x - Polygamma_approx 0 m x) (complex_of_real x) =
                 (deriv ^^ j) ln_Gamma (of_real x) - (deriv ^^ j) (Polygamma_approx 0 m) (of_real x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (deriv ^^ j) (\<lambda>x. ln_Gamma x - Polygamma_approx 0 m x) (complex_of_real x) = (deriv ^^ j) ln_Gamma (complex_of_real x) - (deriv ^^ j) (Polygamma_approx 0 m) (complex_of_real x)
[PROOF STEP]
using x
[PROOF STATE]
proof (prove)
using this:
0 < x

goal (1 subgoal):
 1. (deriv ^^ j) (\<lambda>x. ln_Gamma x - Polygamma_approx 0 m x) (complex_of_real x) = (deriv ^^ j) ln_Gamma (complex_of_real x) - (deriv ^^ j) (Polygamma_approx 0 m) (complex_of_real x)
[PROOF STEP]
by (intro higher_deriv_diff[of _ "{s. Re s > 0}"])
         (auto intro!: holomorphic_intros elim!: nonpos_Reals_cases simp: open_halfspace_Re_gt)
[PROOF STATE]
proof (state)
this:
(deriv ^^ j) (\<lambda>x. ln_Gamma x - Polygamma_approx 0 m x) (complex_of_real x) = (deriv ^^ j) ln_Gamma (complex_of_real x) - (deriv ^^ j) (Polygamma_approx 0 m) (complex_of_real x)

goal (1 subgoal):
 1. \<And>x. 0 < x \<Longrightarrow> \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar> = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(deriv ^^ j) (\<lambda>x. ln_Gamma x - Polygamma_approx 0 m x) (complex_of_real x) = (deriv ^^ j) ln_Gamma (complex_of_real x) - (deriv ^^ j) (Polygamma_approx 0 m) (complex_of_real x)

goal (1 subgoal):
 1. \<And>x. 0 < x \<Longrightarrow> \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar> = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>
[PROOF STEP]
have "(deriv ^^ j) (Polygamma_approx 0 m) (complex_of_real x) =
                 of_real (Polygamma_approx j m x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (deriv ^^ j) (Polygamma_approx 0 m) (complex_of_real x) = complex_of_real (Polygamma_approx j m x)
[PROOF STEP]
using x m
[PROOF STATE]
proof (prove)
using this:
0 < x
0 < m

goal (1 subgoal):
 1. (deriv ^^ j) (Polygamma_approx 0 m) (complex_of_real x) = complex_of_real (Polygamma_approx j m x)
[PROOF STEP]
by (simp add: Polygamma_approx_complex_of_real)
[PROOF STATE]
proof (state)
this:
(deriv ^^ j) (Polygamma_approx 0 m) (complex_of_real x) = complex_of_real (Polygamma_approx j m x)

goal (1 subgoal):
 1. \<And>x. 0 < x \<Longrightarrow> \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar> = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(deriv ^^ j) (Polygamma_approx 0 m) (complex_of_real x) = complex_of_real (Polygamma_approx j m x)

goal (1 subgoal):
 1. \<And>x. 0 < x \<Longrightarrow> \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar> = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>
[PROOF STEP]
have "norm (- inverse (of_nat m) * (deriv ^^ j) (stirling_integral m) (complex_of_real x)) =
                 inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmod (- inverse (of_nat m) * (deriv ^^ j) (stirling_integral m) (complex_of_real x)) = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>
[PROOF STEP]
using x m
[PROOF STATE]
proof (prove)
using this:
0 < x
0 < m

goal (1 subgoal):
 1. cmod (- inverse (of_nat m) * (deriv ^^ j) (stirling_integral m) (complex_of_real x)) = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>
[PROOF STEP]
by (simp add: norm_mult norm_inverse deriv_stirling_integral_complex_of_real)
[PROOF STATE]
proof (state)
this:
cmod (- inverse (of_nat m) * (deriv ^^ j) (stirling_integral m) (complex_of_real x)) = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>

goal (1 subgoal):
 1. \<And>x. 0 < x \<Longrightarrow> \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar> = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
cmod (- inverse (of_nat m) * (deriv ^^ j) (stirling_integral m) (complex_of_real x)) = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>

goal (1 subgoal):
 1. \<And>x. 0 < x \<Longrightarrow> \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar> = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>
[PROOF STEP]
have "(deriv ^^ j) ln_Gamma (complex_of_real x) = of_real ((deriv ^^ j) ln_Gamma x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (deriv ^^ j) ln_Gamma (complex_of_real x) = complex_of_real ((deriv ^^ j) ln_Gamma x)
[PROOF STEP]
using x
[PROOF STATE]
proof (prove)
using this:
0 < x

goal (1 subgoal):
 1. (deriv ^^ j) ln_Gamma (complex_of_real x) = complex_of_real ((deriv ^^ j) ln_Gamma x)
[PROOF STEP]
by (simp add: higher_deriv_ln_Gamma_complex_of_real)
[PROOF STATE]
proof (state)
this:
(deriv ^^ j) ln_Gamma (complex_of_real x) = complex_of_real ((deriv ^^ j) ln_Gamma x)

goal (1 subgoal):
 1. \<And>x. 0 < x \<Longrightarrow> \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar> = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(deriv ^^ j) ln_Gamma (complex_of_real x) = complex_of_real ((deriv ^^ j) ln_Gamma x)

goal (1 subgoal):
 1. \<And>x. 0 < x \<Longrightarrow> \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar> = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>
[PROOF STEP]
have "norm (\<dots> - of_real (Polygamma_approx j m x)) =
                 \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmod (complex_of_real ((deriv ^^ j) ln_Gamma x) - complex_of_real (Polygamma_approx j m x)) = \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar>
[PROOF STEP]
by (simp only: of_real_diff [symmetric] norm_of_real)
[PROOF STATE]
proof (state)
this:
cmod (complex_of_real ((deriv ^^ j) ln_Gamma x) - complex_of_real (Polygamma_approx j m x)) = \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar>

goal (1 subgoal):
 1. \<And>x. 0 < x \<Longrightarrow> \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar> = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar> = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar> = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>

goal (1 subgoal):
 1. \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar> = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar> = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_top. \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar> = inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>

goal (1 subgoal):
 1. (\<lambda>x. (deriv ^^ j) ln_Gamma x - Polygamma_approx j m x) \<in> O(\<lambda>x. 1 / x ^ (m + j))
[PROOF STEP]
from bigthetaI_cong[OF this] m
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x. \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar>) \<in> \<Theta>(\<lambda>x. inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>)
0 < m
[PROOF STEP]
have "(\<lambda>x::real. (deriv ^^ j) ln_Gamma x - Polygamma_approx j m x) \<in>
             \<Theta>(\<lambda>x. (deriv ^^ j) (stirling_integral m) x)"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. \<bar>(deriv ^^ j) ln_Gamma x - Polygamma_approx j m x\<bar>) \<in> \<Theta>(\<lambda>x. inverse (real m) * \<bar>(deriv ^^ j) (stirling_integral m) x\<bar>)
0 < m

goal (1 subgoal):
 1. (\<lambda>x. (deriv ^^ j) ln_Gamma x - Polygamma_approx j m x) \<in> \<Theta>((deriv ^^ j) (stirling_integral m))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<lambda>x. (deriv ^^ j) ln_Gamma x - Polygamma_approx j m x) \<in> \<Theta>((deriv ^^ j) (stirling_integral m))

goal (1 subgoal):
 1. (\<lambda>x. (deriv ^^ j) ln_Gamma x - Polygamma_approx j m x) \<in> O(\<lambda>x. 1 / x ^ (m + j))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>x. (deriv ^^ j) ln_Gamma x - Polygamma_approx j m x) \<in> \<Theta>((deriv ^^ j) (stirling_integral m))

goal (1 subgoal):
 1. (\<lambda>x. (deriv ^^ j) ln_Gamma x - Polygamma_approx j m x) \<in> O(\<lambda>x. 1 / x ^ (m + j))
[PROOF STEP]
have "(\<lambda>x::real. (deriv ^^ j) (stirling_integral m) x) \<in> O(\<lambda>x. 1 / x ^ (m + j))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (deriv ^^ j) (stirling_integral m) \<in> O(\<lambda>x. 1 / x ^ (m + j))
[PROOF STEP]
using m
[PROOF STATE]
proof (prove)
using this:
0 < m

goal (1 subgoal):
 1. (deriv ^^ j) (stirling_integral m) \<in> O(\<lambda>x. 1 / x ^ (m + j))
[PROOF STEP]
by (rule deriv_stirling_integral_real_bound)
[PROOF STATE]
proof (state)
this:
(deriv ^^ j) (stirling_integral m) \<in> O(\<lambda>x. 1 / x ^ (m + j))

goal (1 subgoal):
 1. (\<lambda>x. (deriv ^^ j) ln_Gamma x - Polygamma_approx j m x) \<in> O(\<lambda>x. 1 / x ^ (m + j))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x. (deriv ^^ j) ln_Gamma x - Polygamma_approx j m x) \<in> O(\<lambda>x. 1 / x ^ (m + j))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. (deriv ^^ j) ln_Gamma x - Polygamma_approx j m x) \<in> O(\<lambda>x. 1 / x ^ (m + j))

goal (1 subgoal):
 1. (\<lambda>x. (deriv ^^ j) ln_Gamma x - Polygamma_approx j m x) \<in> O(\<lambda>x. 1 / x ^ (m + j))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<lambda>x. (deriv ^^ j) ln_Gamma x - Polygamma_approx j m x) \<in> O(\<lambda>x. 1 / x ^ (m + j))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma norm_imp_pos_and_ge:
  fixes x :: "'a::real_normed_vector"
  shows "norm x \<equiv> n \<Longrightarrow> norm x \<ge> 0 \<and> n \<ge> norm x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm x \<equiv> n \<Longrightarrow> 0 \<le> norm x \<and> norm x \<le> n
[PROOF STEP]
by atomize auto