[STATEMENT]
lemma fds_truncate_exp:
  shows "fds_truncate m (fds_exp (fds_truncate m f)) = fds_truncate m (fds_exp f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds_truncate m (fds_exp (fds_truncate m f)) = fds_truncate m (fds_exp f)
[PROOF STEP]
proof (rule fds_truncate_cong, goal_cases)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. \<lbrakk>0 < m; 0 < n; n \<le> m\<rbrakk> \<Longrightarrow> fds_nth (fds_exp (fds_truncate m f)) n = fds_nth (fds_exp f) n
[PROOF STEP]
case (1 n)
[PROOF STATE]
proof (state)
this:
0 < m
0 < n
n \<le> m

goal (1 subgoal):
 1. \<And>n. \<lbrakk>0 < m; 0 < n; n \<le> m\<rbrakk> \<Longrightarrow> fds_nth (fds_exp (fds_truncate m f)) n = fds_nth (fds_exp f) n
[PROOF STEP]
define a where "a = exp (fds_nth f (Suc 0))"
[PROOF STATE]
proof (state)
this:
a = exp (fds_nth f (Suc 0))

goal (1 subgoal):
 1. \<And>n. \<lbrakk>0 < m; 0 < n; n \<le> m\<rbrakk> \<Longrightarrow> fds_nth (fds_exp (fds_truncate m f)) n = fds_nth (fds_exp f) n
[PROOF STEP]
define f' where "f' = fds (\<lambda>n. if n = Suc 0 then 0 else fds_nth f n)"
[PROOF STATE]
proof (state)
this:
f' = fds (\<lambda>n. if n = Suc 0 then 0::'a else fds_nth f n)

goal (1 subgoal):
 1. \<And>n. \<lbrakk>0 < m; 0 < n; n \<le> m\<rbrakk> \<Longrightarrow> fds_nth (fds_exp (fds_truncate m f)) n = fds_nth (fds_exp f) n
[PROOF STEP]
have truncate_f': "fds_truncate m f' = fds (\<lambda>n. if n = Suc 0 then 0 else fds_nth (fds_truncate m f) n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds_truncate m f' = fds (\<lambda>n. if n = Suc 0 then 0::'a else fds_nth (fds_truncate m f) n)
[PROOF STEP]
by (simp add: f'_def fds_eq_iff fds_nth_truncate)
[PROOF STATE]
proof (state)
this:
fds_truncate m f' = fds (\<lambda>n. if n = Suc 0 then 0::'a else fds_nth (fds_truncate m f) n)

goal (1 subgoal):
 1. \<And>n. \<lbrakk>0 < m; 0 < n; n \<le> m\<rbrakk> \<Longrightarrow> fds_nth (fds_exp (fds_truncate m f)) n = fds_nth (fds_exp f) n
[PROOF STEP]
have "fds_nth (fds_exp (fds_truncate m f)) n =
          a * (\<Sum>k. fds_nth (fds_truncate m f' ^ k) n /\<^sub>R fact k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds_nth (fds_exp (fds_truncate m f)) n = a * (\<Sum>k. fds_nth (fds_truncate m f' ^ k) n /\<^sub>R fact k)
[PROOF STEP]
using 1
[PROOF STATE]
proof (prove)
using this:
0 < m
0 < n
n \<le> m

goal (1 subgoal):
 1. fds_nth (fds_exp (fds_truncate m f)) n = a * (\<Sum>k. fds_nth (fds_truncate m f' ^ k) n /\<^sub>R fact k)
[PROOF STEP]
by (simp add: fds_exp_def fds_nth_fds' a_def [symmetric] f'_def [symmetric]
                  fds_nth_truncate truncate_f' [symmetric])
[PROOF STATE]
proof (state)
this:
fds_nth (fds_exp (fds_truncate m f)) n = a * (\<Sum>k. fds_nth (fds_truncate m f' ^ k) n /\<^sub>R fact k)

goal (1 subgoal):
 1. \<And>n. \<lbrakk>0 < m; 0 < n; n \<le> m\<rbrakk> \<Longrightarrow> fds_nth (fds_exp (fds_truncate m f)) n = fds_nth (fds_exp f) n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
fds_nth (fds_exp (fds_truncate m f)) n = a * (\<Sum>k. fds_nth (fds_truncate m f' ^ k) n /\<^sub>R fact k)

goal (1 subgoal):
 1. \<And>n. \<lbrakk>0 < m; 0 < n; n \<le> m\<rbrakk> \<Longrightarrow> fds_nth (fds_exp (fds_truncate m f)) n = fds_nth (fds_exp f) n
[PROOF STEP]
have "(\<lambda>k. fds_nth (fds_truncate m f' ^ k) n) = (\<lambda>k. fds_nth (f' ^ k) n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>k. fds_nth (fds_truncate m f' ^ k) n) = (\<lambda>k. fds_nth (f' ^ k) n)
[PROOF STEP]
proof (rule ext, goal_cases)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>k. fds_nth (fds_truncate m f' ^ k) n = fds_nth (f' ^ k) n
[PROOF STEP]
case (1 k)
[PROOF STATE]
proof (state)
this:

goal (1 subgoal):
 1. \<And>k. fds_nth (fds_truncate m f' ^ k) n = fds_nth (f' ^ k) n
[PROOF STEP]
have "fds_nth (fds_truncate m f' ^ k) n = fds_nth (fds_truncate m (fds_truncate m f' ^ k)) n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds_nth (fds_truncate m f' ^ k) n = fds_nth (fds_truncate m (fds_truncate m f' ^ k)) n
[PROOF STEP]
using \<open>n \<le> m\<close>
[PROOF STATE]
proof (prove)
using this:
n \<le> m

goal (1 subgoal):
 1. fds_nth (fds_truncate m f' ^ k) n = fds_nth (fds_truncate m (fds_truncate m f' ^ k)) n
[PROOF STEP]
by (simp add: fds_nth_truncate)
[PROOF STATE]
proof (state)
this:
fds_nth (fds_truncate m f' ^ k) n = fds_nth (fds_truncate m (fds_truncate m f' ^ k)) n

goal (1 subgoal):
 1. \<And>k. fds_nth (fds_truncate m f' ^ k) n = fds_nth (f' ^ k) n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
fds_nth (fds_truncate m f' ^ k) n = fds_nth (fds_truncate m (fds_truncate m f' ^ k)) n

goal (1 subgoal):
 1. \<And>k. fds_nth (fds_truncate m f' ^ k) n = fds_nth (f' ^ k) n
[PROOF STEP]
have "fds_truncate m (fds_truncate m f' ^ k) = fds_truncate m (f' ^ k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds_truncate m (fds_truncate m f' ^ k) = fds_truncate m (f' ^ k)
[PROOF STEP]
by (simp add: fds_truncate_power)
[PROOF STATE]
proof (state)
this:
fds_truncate m (fds_truncate m f' ^ k) = fds_truncate m (f' ^ k)

goal (1 subgoal):
 1. \<And>k. fds_nth (fds_truncate m f' ^ k) n = fds_nth (f' ^ k) n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
fds_truncate m (fds_truncate m f' ^ k) = fds_truncate m (f' ^ k)

goal (1 subgoal):
 1. \<And>k. fds_nth (fds_truncate m f' ^ k) n = fds_nth (f' ^ k) n
[PROOF STEP]
have "fds_nth \<dots> n = fds_nth (f' ^ k) n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds_nth (fds_truncate m (f' ^ k)) n = fds_nth (f' ^ k) n
[PROOF STEP]
using \<open>n \<le> m\<close>
[PROOF STATE]
proof (prove)
using this:
n \<le> m

goal (1 subgoal):
 1. fds_nth (fds_truncate m (f' ^ k)) n = fds_nth (f' ^ k) n
[PROOF STEP]
by (simp add: fds_nth_truncate)
[PROOF STATE]
proof (state)
this:
fds_nth (fds_truncate m (f' ^ k)) n = fds_nth (f' ^ k) n

goal (1 subgoal):
 1. \<And>k. fds_nth (fds_truncate m f' ^ k) n = fds_nth (f' ^ k) n
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
fds_nth (fds_truncate m f' ^ k) n = fds_nth (f' ^ k) n
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
fds_nth (fds_truncate m f' ^ k) n = fds_nth (f' ^ k) n

goal (1 subgoal):
 1. fds_nth (fds_truncate m f' ^ k) n = fds_nth (f' ^ k) n
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
fds_nth (fds_truncate m f' ^ k) n = fds_nth (f' ^ k) n

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>k. fds_nth (fds_truncate m f' ^ k) n) = (\<lambda>k. fds_nth (f' ^ k) n)

goal (1 subgoal):
 1. \<And>n. \<lbrakk>0 < m; 0 < n; n \<le> m\<rbrakk> \<Longrightarrow> fds_nth (fds_exp (fds_truncate m f)) n = fds_nth (fds_exp f) n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>k. fds_nth (fds_truncate m f' ^ k) n) = (\<lambda>k. fds_nth (f' ^ k) n)

goal (1 subgoal):
 1. \<And>n. \<lbrakk>0 < m; 0 < n; n \<le> m\<rbrakk> \<Longrightarrow> fds_nth (fds_exp (fds_truncate m f)) n = fds_nth (fds_exp f) n
[PROOF STEP]
have "a * (\<Sum>k. \<dots> k /\<^sub>R fact k) = fds_nth (fds_exp f) n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a * (\<Sum>k. fds_nth (f' ^ k) n /\<^sub>R fact k) = fds_nth (fds_exp f) n
[PROOF STEP]
by (simp add: fds_exp_def fds_nth_fds' a_def f'_def)
[PROOF STATE]
proof (state)
this:
a * (\<Sum>k. fds_nth (f' ^ k) n /\<^sub>R fact k) = fds_nth (fds_exp f) n

goal (1 subgoal):
 1. \<And>n. \<lbrakk>0 < m; 0 < n; n \<le> m\<rbrakk> \<Longrightarrow> fds_nth (fds_exp (fds_truncate m f)) n = fds_nth (fds_exp f) n
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
fds_nth (fds_exp (fds_truncate m f)) n = fds_nth (fds_exp f) n
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
fds_nth (fds_exp (fds_truncate m f)) n = fds_nth (fds_exp f) n

goal (1 subgoal):
 1. fds_nth (fds_exp (fds_truncate m f)) n = fds_nth (fds_exp f) n
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
fds_nth (fds_exp (fds_truncate m f)) n = fds_nth (fds_exp f) n

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma primI[intro]: "(\<And> r k. r\<^sup>@k = u \<Longrightarrow> k = 1) \<Longrightarrow> primitive u"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>r k. r \<^sup>@ k = u \<Longrightarrow> k = 1) \<Longrightarrow> primitive u
[PROOF STEP]
by (simp add: primitive_def)


[STATEMENT]
lemma length_not_greater_eq_2_iff [simp]:
  \<open>\<not> 2 \<le> LENGTH('a::len) \<longleftrightarrow> LENGTH('a) = 1\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<not> 2 \<le> LENGTH('a)) = (LENGTH('a) = 1)
[PROOF STEP]
by (auto simp add: not_le dest: less_2_cases)


[STATEMENT]
lemma resultant_mpoly_polys_zero_solution: fixes p :: "complex mpoly"
  assumes nz: "0 \<notin> qs ` N"
  and i: "i \<in> N"
shows
  "mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) \<alpha>
    \<Longrightarrow> \<exists> v. mpoly_polys_zero_solution p qs N (\<alpha>(Suc i := v))"
  "mpoly_polys_zero_solution p qs N \<alpha>
    \<Longrightarrow> mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) (\<alpha>(Suc i := 0))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) \<alpha> \<Longrightarrow> \<exists>v. mpoly_polys_zero_solution p qs N (\<alpha>(Suc i := v))) &&& (mpoly_polys_zero_solution p qs N \<alpha> \<Longrightarrow> mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) (\<alpha>(Suc i := 0)))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) \<alpha> \<Longrightarrow> \<exists>v. mpoly_polys_zero_solution p qs N (\<alpha>(Suc i := v))
 2. mpoly_polys_zero_solution p qs N \<alpha> \<Longrightarrow> mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) (\<alpha>(Suc i := 0))
[PROOF STEP]
assume "mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) \<alpha>"
[PROOF STATE]
proof (state)
this:
mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) \<alpha>

goal (2 subgoals):
 1. mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) \<alpha> \<Longrightarrow> \<exists>v. mpoly_polys_zero_solution p qs N (\<alpha>(Suc i := v))
 2. mpoly_polys_zero_solution p qs N \<alpha> \<Longrightarrow> mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) (\<alpha>(Suc i := 0))
[PROOF STEP]
hence 1: "mpoly_polys_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) \<alpha>" and 2: "(\<forall> i. i \<notin> insert 0 (Suc ` (N - {i})) \<longrightarrow> \<alpha> i = 0)"
[PROOF STATE]
proof (prove)
using this:
mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) \<alpha>

goal (1 subgoal):
 1. mpoly_polys_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) \<alpha> &&& \<forall>i. i \<notin> insert 0 (Suc ` (N - {i})) \<longrightarrow> \<alpha> i = 0
[PROOF STEP]
unfolding mpoly_polys_zero_solution_def
[PROOF STATE]
proof (prove)
using this:
mpoly_polys_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) \<alpha> \<and> (\<forall>ia. ia \<notin> insert 0 (Suc ` (N - {i})) \<longrightarrow> \<alpha> ia = 0)

goal (1 subgoal):
 1. mpoly_polys_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) \<alpha> &&& \<forall>i. i \<notin> insert 0 (Suc ` (N - {i})) \<longrightarrow> \<alpha> i = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mpoly_polys_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) \<alpha>
\<forall>i. i \<notin> insert 0 (Suc ` (N - {i})) \<longrightarrow> \<alpha> i = 0

goal (2 subgoals):
 1. mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) \<alpha> \<Longrightarrow> \<exists>v. mpoly_polys_zero_solution p qs N (\<alpha>(Suc i := v))
 2. mpoly_polys_zero_solution p qs N \<alpha> \<Longrightarrow> mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) (\<alpha>(Suc i := 0))
[PROOF STEP]
from resultant_mpoly_polys_solution[of qs N _ p \<alpha>, OF nz i] 1
[PROOF STATE]
proof (chain)
picking this:
mpoly_polys_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) \<alpha> = (\<exists>v. mpoly_polys_solution p qs N (\<alpha>(Suc i := v)))
mpoly_polys_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) \<alpha>
[PROOF STEP]
obtain v where "mpoly_polys_solution p qs N (\<alpha>(Suc i := v))"
[PROOF STATE]
proof (prove)
using this:
mpoly_polys_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) \<alpha> = (\<exists>v. mpoly_polys_solution p qs N (\<alpha>(Suc i := v)))
mpoly_polys_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) \<alpha>

goal (1 subgoal):
 1. (\<And>v. mpoly_polys_solution p qs N (\<alpha>(Suc i := v)) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mpoly_polys_solution p qs N (\<alpha>(Suc i := v))

goal (2 subgoals):
 1. mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) \<alpha> \<Longrightarrow> \<exists>v. mpoly_polys_zero_solution p qs N (\<alpha>(Suc i := v))
 2. mpoly_polys_zero_solution p qs N \<alpha> \<Longrightarrow> mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) (\<alpha>(Suc i := 0))
[PROOF STEP]
with 2
[PROOF STATE]
proof (chain)
picking this:
\<forall>i. i \<notin> insert 0 (Suc ` (N - {i})) \<longrightarrow> \<alpha> i = 0
mpoly_polys_solution p qs N (\<alpha>(Suc i := v))
[PROOF STEP]
have "mpoly_polys_zero_solution p qs N (\<alpha>(Suc i := v))"
[PROOF STATE]
proof (prove)
using this:
\<forall>i. i \<notin> insert 0 (Suc ` (N - {i})) \<longrightarrow> \<alpha> i = 0
mpoly_polys_solution p qs N (\<alpha>(Suc i := v))

goal (1 subgoal):
 1. mpoly_polys_zero_solution p qs N (\<alpha>(Suc i := v))
[PROOF STEP]
using i
[PROOF STATE]
proof (prove)
using this:
\<forall>i. i \<notin> insert 0 (Suc ` (N - {i})) \<longrightarrow> \<alpha> i = 0
mpoly_polys_solution p qs N (\<alpha>(Suc i := v))
i \<in> N

goal (1 subgoal):
 1. mpoly_polys_zero_solution p qs N (\<alpha>(Suc i := v))
[PROOF STEP]
unfolding mpoly_polys_zero_solution_def
[PROOF STATE]
proof (prove)
using this:
\<forall>i. i \<notin> insert 0 (Suc ` (N - {i})) \<longrightarrow> \<alpha> i = 0
mpoly_polys_solution p qs N (\<alpha>(Suc i := v))
i \<in> N

goal (1 subgoal):
 1. mpoly_polys_solution p qs N (\<alpha>(Suc i := v)) \<and> (\<forall>ia. ia \<notin> insert 0 (Suc ` N) \<longrightarrow> (\<alpha>(Suc i := v)) ia = 0)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mpoly_polys_zero_solution p qs N (\<alpha>(Suc i := v))

goal (2 subgoals):
 1. mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) \<alpha> \<Longrightarrow> \<exists>v. mpoly_polys_zero_solution p qs N (\<alpha>(Suc i := v))
 2. mpoly_polys_zero_solution p qs N \<alpha> \<Longrightarrow> mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) (\<alpha>(Suc i := 0))
[PROOF STEP]
thus "\<exists> v. mpoly_polys_zero_solution p qs N (\<alpha>(Suc i := v))"
[PROOF STATE]
proof (prove)
using this:
mpoly_polys_zero_solution p qs N (\<alpha>(Suc i := v))

goal (1 subgoal):
 1. \<exists>v. mpoly_polys_zero_solution p qs N (\<alpha>(Suc i := v))
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
\<exists>v. mpoly_polys_zero_solution p qs N (\<alpha>(Suc i := v))

goal (1 subgoal):
 1. mpoly_polys_zero_solution p qs N \<alpha> \<Longrightarrow> mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) (\<alpha>(Suc i := 0))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. mpoly_polys_zero_solution p qs N \<alpha> \<Longrightarrow> mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) (\<alpha>(Suc i := 0))
[PROOF STEP]
assume "mpoly_polys_zero_solution p qs N \<alpha>"
[PROOF STATE]
proof (state)
this:
mpoly_polys_zero_solution p qs N \<alpha>

goal (1 subgoal):
 1. mpoly_polys_zero_solution p qs N \<alpha> \<Longrightarrow> mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) (\<alpha>(Suc i := 0))
[PROOF STEP]
from this[unfolded mpoly_polys_zero_solution_def]
[PROOF STATE]
proof (chain)
picking this:
mpoly_polys_solution p qs N \<alpha> \<and> (\<forall>i. i \<notin> insert 0 (Suc ` N) \<longrightarrow> \<alpha> i = 0)
[PROOF STEP]
have 1: "mpoly_polys_solution p qs N \<alpha>" and 2: "\<forall>i. i \<notin> insert 0 (Suc ` N) \<longrightarrow> \<alpha> i = 0"
[PROOF STATE]
proof (prove)
using this:
mpoly_polys_solution p qs N \<alpha> \<and> (\<forall>i. i \<notin> insert 0 (Suc ` N) \<longrightarrow> \<alpha> i = 0)

goal (1 subgoal):
 1. mpoly_polys_solution p qs N \<alpha> &&& \<forall>i. i \<notin> insert 0 (Suc ` N) \<longrightarrow> \<alpha> i = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mpoly_polys_solution p qs N \<alpha>
\<forall>i. i \<notin> insert 0 (Suc ` N) \<longrightarrow> \<alpha> i = 0

goal (1 subgoal):
 1. mpoly_polys_zero_solution p qs N \<alpha> \<Longrightarrow> mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) (\<alpha>(Suc i := 0))
[PROOF STEP]
from 1
[PROOF STATE]
proof (chain)
picking this:
mpoly_polys_solution p qs N \<alpha>
[PROOF STEP]
have "mpoly_polys_solution p qs N (\<alpha>(Suc i := \<alpha> (Suc i)))"
[PROOF STATE]
proof (prove)
using this:
mpoly_polys_solution p qs N \<alpha>

goal (1 subgoal):
 1. mpoly_polys_solution p qs N (\<alpha>(Suc i := \<alpha> (Suc i)))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mpoly_polys_solution p qs N (\<alpha>(Suc i := \<alpha> (Suc i)))

goal (1 subgoal):
 1. mpoly_polys_zero_solution p qs N \<alpha> \<Longrightarrow> mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) (\<alpha>(Suc i := 0))
[PROOF STEP]
hence "\<exists> v. mpoly_polys_solution p qs N (\<alpha>(Suc i := v))"
[PROOF STATE]
proof (prove)
using this:
mpoly_polys_solution p qs N (\<alpha>(Suc i := \<alpha> (Suc i)))

goal (1 subgoal):
 1. \<exists>v. mpoly_polys_solution p qs N (\<alpha>(Suc i := v))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>v. mpoly_polys_solution p qs N (\<alpha>(Suc i := v))

goal (1 subgoal):
 1. mpoly_polys_zero_solution p qs N \<alpha> \<Longrightarrow> mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) (\<alpha>(Suc i := 0))
[PROOF STEP]
with resultant_mpoly_polys_solution[of qs N _ p \<alpha>, OF nz i]
[PROOF STATE]
proof (chain)
picking this:
mpoly_polys_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) \<alpha> = (\<exists>v. mpoly_polys_solution p qs N (\<alpha>(Suc i := v)))
\<exists>v. mpoly_polys_solution p qs N (\<alpha>(Suc i := v))
[PROOF STEP]
have "mpoly_polys_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) \<alpha>"
[PROOF STATE]
proof (prove)
using this:
mpoly_polys_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) \<alpha> = (\<exists>v. mpoly_polys_solution p qs N (\<alpha>(Suc i := v)))
\<exists>v. mpoly_polys_solution p qs N (\<alpha>(Suc i := v))

goal (1 subgoal):
 1. mpoly_polys_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) \<alpha>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mpoly_polys_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) \<alpha>

goal (1 subgoal):
 1. mpoly_polys_zero_solution p qs N \<alpha> \<Longrightarrow> mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) (\<alpha>(Suc i := 0))
[PROOF STEP]
hence "mpoly_polys_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) (\<alpha> (Suc i := 0))"
[PROOF STATE]
proof (prove)
using this:
mpoly_polys_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) \<alpha>

goal (1 subgoal):
 1. mpoly_polys_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) (\<alpha>(Suc i := 0))
[PROOF STEP]
unfolding mpoly_polys_solution_def
[PROOF STATE]
proof (prove)
using this:
insertion \<alpha> (resultant_mpoly_poly (Suc i) p (qs i)) = 0 \<and> (\<forall>i\<in>N - {i}. poly (qs i) (\<alpha> (Suc i)) = 0)

goal (1 subgoal):
 1. insertion (\<alpha>(Suc i := 0)) (resultant_mpoly_poly (Suc i) p (qs i)) = 0 \<and> (\<forall>ia\<in>N - {i}. poly (qs ia) ((\<alpha>(Suc i := 0)) (Suc ia)) = 0)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. insertion \<alpha> (resultant_mpoly_poly (Suc i) p (qs i)) = 0 \<and> (\<forall>i\<in>N - {i}. poly (qs i) (\<alpha> (Suc i)) = 0) \<Longrightarrow> insertion (\<alpha>(Suc i := 0)) (resultant_mpoly_poly (Suc i) p (qs i)) = 0
[PROOF STEP]
apply (subst insertion_irrelevant_vars[of _ _ \<alpha>])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>v. \<lbrakk>insertion \<alpha> (resultant_mpoly_poly (Suc i) p (qs i)) = 0 \<and> (\<forall>i\<in>N - {i}. poly (qs i) (\<alpha> (Suc i)) = 0); v \<in> vars (resultant_mpoly_poly (Suc i) p (qs i))\<rbrakk> \<Longrightarrow> (\<alpha>(Suc i := 0)) v = \<alpha> v
 2. insertion \<alpha> (resultant_mpoly_poly (Suc i) p (qs i)) = 0 \<and> (\<forall>i\<in>N - {i}. poly (qs i) (\<alpha> (Suc i)) = 0) \<Longrightarrow> insertion \<alpha> (resultant_mpoly_poly (Suc i) p (qs i)) = 0
[PROOF STEP]
by (insert vars_resultant_mpoly_poly, auto)
[PROOF STATE]
proof (state)
this:
mpoly_polys_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) (\<alpha>(Suc i := 0))

goal (1 subgoal):
 1. mpoly_polys_zero_solution p qs N \<alpha> \<Longrightarrow> mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) (\<alpha>(Suc i := 0))
[PROOF STEP]
thus "mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) (\<alpha>(Suc i := 0))"
[PROOF STATE]
proof (prove)
using this:
mpoly_polys_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) (\<alpha>(Suc i := 0))

goal (1 subgoal):
 1. mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) (\<alpha>(Suc i := 0))
[PROOF STEP]
unfolding mpoly_polys_zero_solution_def
[PROOF STATE]
proof (prove)
using this:
mpoly_polys_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) (\<alpha>(Suc i := 0))

goal (1 subgoal):
 1. mpoly_polys_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) (\<alpha>(Suc i := 0)) \<and> (\<forall>ia. ia \<notin> insert 0 (Suc ` (N - {i})) \<longrightarrow> (\<alpha>(Suc i := 0)) ia = 0)
[PROOF STEP]
using 2
[PROOF STATE]
proof (prove)
using this:
mpoly_polys_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) (\<alpha>(Suc i := 0))
\<forall>i. i \<notin> insert 0 (Suc ` N) \<longrightarrow> \<alpha> i = 0

goal (1 subgoal):
 1. mpoly_polys_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) (\<alpha>(Suc i := 0)) \<and> (\<forall>ia. ia \<notin> insert 0 (Suc ` (N - {i})) \<longrightarrow> (\<alpha>(Suc i := 0)) ia = 0)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mpoly_polys_zero_solution (resultant_mpoly_poly (Suc i) p (qs i)) qs (N - {i}) (\<alpha>(Suc i := 0))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma [simp]:
      assumes "\<And> m. m \<in> S \<Longrightarrow> x \<notin> dom m"
      shows "inj_on (\<lambda> m. m (x \<mapsto> y)) S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on (\<lambda>m. m(x \<mapsto> y)) S
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
?m \<in> S \<Longrightarrow> x \<notin> dom ?m

goal (1 subgoal):
 1. inj_on (\<lambda>m. m(x \<mapsto> y)) S
[PROOF STEP]
unfolding dom_def inj_on_def
[PROOF STATE]
proof (prove)
using this:
?m \<in> S \<Longrightarrow> x \<notin> {a. ?m a \<noteq> None}

goal (1 subgoal):
 1. \<forall>xa\<in>S. \<forall>ya\<in>S. xa(x \<mapsto> y) = ya(x \<mapsto> y) \<longrightarrow> xa = ya
[PROOF STEP]
by (auto) (metis fun_upd_triv fun_upd_upd)


[STATEMENT]
lemma cos_x_cos_y:
  fixes x :: "'a::{real_normed_field,banach}"
  shows
    "(\<lambda>p. \<Sum>n\<le>p.
        if even p \<and> even n
        then ((-1) ^ (p div 2) * (p choose n) / (fact p)) *\<^sub>R (x^n) * y^(p-n) else 0)
      sums (cos x * cos y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>p. \<Sum>n\<le>p. if even p \<and> even n then (real_of_int ((- 1) ^ (p div 2) * int (p choose n)) / fact p) *\<^sub>R x ^ n * y ^ (p - n) else (0::'a)) sums (cos x * cos y)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>p. \<Sum>n\<le>p. if even p \<and> even n then (real_of_int ((- 1) ^ (p div 2) * int (p choose n)) / fact p) *\<^sub>R x ^ n * y ^ (p - n) else (0::'a)) sums (cos x * cos y)
[PROOF STEP]
have "(cos_coeff n * cos_coeff (p - n)) *\<^sub>R (x^n * y^(p - n)) =
    (if even p \<and> even n then ((-1) ^ (p div 2) * (p choose n) / (fact p)) *\<^sub>R (x^n) * y^(p - n)
     else 0)"
    if "n \<le> p" for n p :: nat
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (cos_coeff n * cos_coeff (p - n)) *\<^sub>R (x ^ n * y ^ (p - n)) = (if even p \<and> even n then (real_of_int ((- 1) ^ (p div 2) * int (p choose n)) / fact p) *\<^sub>R x ^ n * y ^ (p - n) else (0::'a))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (cos_coeff n * cos_coeff (p - n)) *\<^sub>R (x ^ n * y ^ (p - n)) = (if even p \<and> even n then (real_of_int ((- 1) ^ (p div 2) * int (p choose n)) / fact p) *\<^sub>R x ^ n * y ^ (p - n) else (0::'a))
[PROOF STEP]
from that
[PROOF STATE]
proof (chain)
picking this:
n \<le> p
[PROOF STEP]
have *: "even n \<Longrightarrow> even p \<Longrightarrow>
        (-1) ^ (n div 2) * (-1) ^ ((p - n) div 2) = (-1 :: real) ^ (p div 2)"
[PROOF STATE]
proof (prove)
using this:
n \<le> p

goal (1 subgoal):
 1. \<lbrakk>even n; even p\<rbrakk> \<Longrightarrow> (- 1) ^ (n div 2) * (- 1) ^ ((p - n) div 2) = (- 1) ^ (p div 2)
[PROOF STEP]
by (metis div_add power_add le_add_diff_inverse odd_add)
[PROOF STATE]
proof (state)
this:
\<lbrakk>even n; even p\<rbrakk> \<Longrightarrow> (- 1) ^ (n div 2) * (- 1) ^ ((p - n) div 2) = (- 1) ^ (p div 2)

goal (1 subgoal):
 1. (cos_coeff n * cos_coeff (p - n)) *\<^sub>R (x ^ n * y ^ (p - n)) = (if even p \<and> even n then (real_of_int ((- 1) ^ (p div 2) * int (p choose n)) / fact p) *\<^sub>R x ^ n * y ^ (p - n) else (0::'a))
[PROOF STEP]
with that
[PROOF STATE]
proof (chain)
picking this:
n \<le> p
\<lbrakk>even n; even p\<rbrakk> \<Longrightarrow> (- 1) ^ (n div 2) * (- 1) ^ ((p - n) div 2) = (- 1) ^ (p div 2)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
n \<le> p
\<lbrakk>even n; even p\<rbrakk> \<Longrightarrow> (- 1) ^ (n div 2) * (- 1) ^ ((p - n) div 2) = (- 1) ^ (p div 2)

goal (1 subgoal):
 1. (cos_coeff n * cos_coeff (p - n)) *\<^sub>R (x ^ n * y ^ (p - n)) = (if even p \<and> even n then (real_of_int ((- 1) ^ (p div 2) * int (p choose n)) / fact p) *\<^sub>R x ^ n * y ^ (p - n) else (0::'a))
[PROOF STEP]
by (auto simp: algebra_simps cos_coeff_def binomial_fact)
[PROOF STATE]
proof (state)
this:
(cos_coeff n * cos_coeff (p - n)) *\<^sub>R (x ^ n * y ^ (p - n)) = (if even p \<and> even n then (real_of_int ((- 1) ^ (p div 2) * int (p choose n)) / fact p) *\<^sub>R x ^ n * y ^ (p - n) else (0::'a))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?n \<le> ?p \<Longrightarrow> (cos_coeff ?n * cos_coeff (?p - ?n)) *\<^sub>R (x ^ ?n * y ^ (?p - ?n)) = (if even ?p \<and> even ?n then (real_of_int ((- 1) ^ (?p div 2) * int (?p choose ?n)) / fact ?p) *\<^sub>R x ^ ?n * y ^ (?p - ?n) else (0::'a))

goal (1 subgoal):
 1. (\<lambda>p. \<Sum>n\<le>p. if even p \<and> even n then (real_of_int ((- 1) ^ (p div 2) * int (p choose n)) / fact p) *\<^sub>R x ^ n * y ^ (p - n) else (0::'a)) sums (cos x * cos y)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?n \<le> ?p \<Longrightarrow> (cos_coeff ?n * cos_coeff (?p - ?n)) *\<^sub>R (x ^ ?n * y ^ (?p - ?n)) = (if even ?p \<and> even ?n then (real_of_int ((- 1) ^ (?p div 2) * int (?p choose ?n)) / fact ?p) *\<^sub>R x ^ ?n * y ^ (?p - ?n) else (0::'a))
[PROOF STEP]
have "(\<lambda>p. \<Sum>n\<le>p. if even p \<and> even n
                  then ((-1) ^ (p div 2) * (p choose n) / (fact p)) *\<^sub>R (x^n) * y^(p-n) else 0) =
             (\<lambda>p. \<Sum>n\<le>p. (cos_coeff n * cos_coeff (p - n)) *\<^sub>R (x^n * y^(p-n)))"
[PROOF STATE]
proof (prove)
using this:
?n \<le> ?p \<Longrightarrow> (cos_coeff ?n * cos_coeff (?p - ?n)) *\<^sub>R (x ^ ?n * y ^ (?p - ?n)) = (if even ?p \<and> even ?n then (real_of_int ((- 1) ^ (?p div 2) * int (?p choose ?n)) / fact ?p) *\<^sub>R x ^ ?n * y ^ (?p - ?n) else (0::'a))

goal (1 subgoal):
 1. (\<lambda>p. \<Sum>n\<le>p. if even p \<and> even n then (real_of_int ((- 1) ^ (p div 2) * int (p choose n)) / fact p) *\<^sub>R x ^ n * y ^ (p - n) else (0::'a)) = (\<lambda>p. \<Sum>n\<le>p. (cos_coeff n * cos_coeff (p - n)) *\<^sub>R (x ^ n * y ^ (p - n)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<lambda>p. \<Sum>n\<le>p. if even p \<and> even n then (real_of_int ((- 1) ^ (p div 2) * int (p choose n)) / fact p) *\<^sub>R x ^ n * y ^ (p - n) else (0::'a)) = (\<lambda>p. \<Sum>n\<le>p. (cos_coeff n * cos_coeff (p - n)) *\<^sub>R (x ^ n * y ^ (p - n)))

goal (1 subgoal):
 1. (\<lambda>p. \<Sum>n\<le>p. if even p \<and> even n then (real_of_int ((- 1) ^ (p div 2) * int (p choose n)) / fact p) *\<^sub>R x ^ n * y ^ (p - n) else (0::'a)) sums (cos x * cos y)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>p. \<Sum>n\<le>p. if even p \<and> even n then (real_of_int ((- 1) ^ (p div 2) * int (p choose n)) / fact p) *\<^sub>R x ^ n * y ^ (p - n) else (0::'a)) = (\<lambda>p. \<Sum>n\<le>p. (cos_coeff n * cos_coeff (p - n)) *\<^sub>R (x ^ n * y ^ (p - n)))

goal (1 subgoal):
 1. (\<lambda>p. \<Sum>n\<le>p. if even p \<and> even n then (real_of_int ((- 1) ^ (p div 2) * int (p choose n)) / fact p) *\<^sub>R x ^ n * y ^ (p - n) else (0::'a)) sums (cos x * cos y)
[PROOF STEP]
have "\<dots> = (\<lambda>p. \<Sum>n\<le>p. (cos_coeff n *\<^sub>R x^n) * (cos_coeff (p - n) *\<^sub>R y^(p-n)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>p. \<Sum>n\<le>p. (cos_coeff n * cos_coeff (p - n)) *\<^sub>R (x ^ n * y ^ (p - n))) = (\<lambda>p. \<Sum>n\<le>p. cos_coeff n *\<^sub>R x ^ n * cos_coeff (p - n) *\<^sub>R y ^ (p - n))
[PROOF STEP]
by (simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
(\<lambda>p. \<Sum>n\<le>p. (cos_coeff n * cos_coeff (p - n)) *\<^sub>R (x ^ n * y ^ (p - n))) = (\<lambda>p. \<Sum>n\<le>p. cos_coeff n *\<^sub>R x ^ n * cos_coeff (p - n) *\<^sub>R y ^ (p - n))

goal (1 subgoal):
 1. (\<lambda>p. \<Sum>n\<le>p. if even p \<and> even n then (real_of_int ((- 1) ^ (p div 2) * int (p choose n)) / fact p) *\<^sub>R x ^ n * y ^ (p - n) else (0::'a)) sums (cos x * cos y)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>p. \<Sum>n\<le>p. (cos_coeff n * cos_coeff (p - n)) *\<^sub>R (x ^ n * y ^ (p - n))) = (\<lambda>p. \<Sum>n\<le>p. cos_coeff n *\<^sub>R x ^ n * cos_coeff (p - n) *\<^sub>R y ^ (p - n))

goal (1 subgoal):
 1. (\<lambda>p. \<Sum>n\<le>p. if even p \<and> even n then (real_of_int ((- 1) ^ (p div 2) * int (p choose n)) / fact p) *\<^sub>R x ^ n * y ^ (p - n) else (0::'a)) sums (cos x * cos y)
[PROOF STEP]
have "\<dots> sums (cos x * cos y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>p. \<Sum>n\<le>p. cos_coeff n *\<^sub>R x ^ n * cos_coeff (p - n) *\<^sub>R y ^ (p - n)) sums (cos x * cos y)
[PROOF STEP]
using summable_norm_cos
[PROOF STATE]
proof (prove)
using this:
summable (\<lambda>n. norm (cos_coeff n *\<^sub>R ?x ^ n))

goal (1 subgoal):
 1. (\<lambda>p. \<Sum>n\<le>p. cos_coeff n *\<^sub>R x ^ n * cos_coeff (p - n) *\<^sub>R y ^ (p - n)) sums (cos x * cos y)
[PROOF STEP]
by (auto simp: cos_def scaleR_conv_of_real intro!: Cauchy_product_sums)
[PROOF STATE]
proof (state)
this:
(\<lambda>p. \<Sum>n\<le>p. cos_coeff n *\<^sub>R x ^ n * cos_coeff (p - n) *\<^sub>R y ^ (p - n)) sums (cos x * cos y)

goal (1 subgoal):
 1. (\<lambda>p. \<Sum>n\<le>p. if even p \<and> even n then (real_of_int ((- 1) ^ (p div 2) * int (p choose n)) / fact p) *\<^sub>R x ^ n * y ^ (p - n) else (0::'a)) sums (cos x * cos y)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>p. \<Sum>n\<le>p. if even p \<and> even n then (real_of_int ((- 1) ^ (p div 2) * int (p choose n)) / fact p) *\<^sub>R x ^ n * y ^ (p - n) else (0::'a)) sums (cos x * cos y)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>p. \<Sum>n\<le>p. if even p \<and> even n then (real_of_int ((- 1) ^ (p div 2) * int (p choose n)) / fact p) *\<^sub>R x ^ n * y ^ (p - n) else (0::'a)) sums (cos x * cos y)

goal (1 subgoal):
 1. (\<lambda>p. \<Sum>n\<le>p. if even p \<and> even n then (real_of_int ((- 1) ^ (p div 2) * int (p choose n)) / fact p) *\<^sub>R x ^ n * y ^ (p - n) else (0::'a)) sums (cos x * cos y)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<lambda>p. \<Sum>n\<le>p. if even p \<and> even n then (real_of_int ((- 1) ^ (p div 2) * int (p choose n)) / fact p) *\<^sub>R x ^ n * y ^ (p - n) else (0::'a)) sums (cos x * cos y)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma star_inductl': "z \<squnion> x \<cdot> y \<le> y \<Longrightarrow> (star x) \<cdot> z \<le> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z \<squnion> x \<cdot> y \<le> y \<Longrightarrow> quantale_class.star x \<cdot> z \<le> y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. z \<squnion> x \<cdot> y \<le> y \<Longrightarrow> quantale_class.star x \<cdot> z \<le> y
[PROOF STEP]
assume "z \<squnion> x \<cdot> y \<le> y"
[PROOF STATE]
proof (state)
this:
z \<squnion> x \<cdot> y \<le> y

goal (1 subgoal):
 1. z \<squnion> x \<cdot> y \<le> y \<Longrightarrow> quantale_class.star x \<cdot> z \<le> y
[PROOF STEP]
hence "\<forall>i. x ^ i \<cdot> z \<le> y"
[PROOF STATE]
proof (prove)
using this:
z \<squnion> x \<cdot> y \<le> y

goal (1 subgoal):
 1. \<forall>i. x ^ i \<cdot> z \<le> y
[PROOF STEP]
by (simp add: power_inductl)
[PROOF STATE]
proof (state)
this:
\<forall>i. x ^ i \<cdot> z \<le> y

goal (1 subgoal):
 1. z \<squnion> x \<cdot> y \<le> y \<Longrightarrow> quantale_class.star x \<cdot> z \<le> y
[PROOF STEP]
hence "Sup{w. \<exists>i. w = x ^ i \<cdot> z} \<le> y"
[PROOF STATE]
proof (prove)
using this:
\<forall>i. x ^ i \<cdot> z \<le> y

goal (1 subgoal):
 1. Sup {w. \<exists>i. w = x ^ i \<cdot> z} \<le> y
[PROOF STEP]
by (intro Sup_least, fast)
[PROOF STATE]
proof (state)
this:
Sup {w. \<exists>i. w = x ^ i \<cdot> z} \<le> y

goal (1 subgoal):
 1. z \<squnion> x \<cdot> y \<le> y \<Longrightarrow> quantale_class.star x \<cdot> z \<le> y
[PROOF STEP]
hence "Sup{w. \<exists>i. w = x ^ i} \<cdot> z \<le> y"
[PROOF STATE]
proof (prove)
using this:
Sup {w. \<exists>i. w = x ^ i \<cdot> z} \<le> y

goal (1 subgoal):
 1. Sup {w. \<exists>i. w = x ^ i} \<cdot> z \<le> y
[PROOF STEP]
using Sup_distr Sup_le_iff
[PROOF STATE]
proof (prove)
using this:
Sup {w. \<exists>i. w = x ^ i \<cdot> z} \<le> y
Sup ?X \<cdot> ?y = Sup {z. \<exists>x\<in>?X. z = x \<cdot> ?y}
(Sup ?A \<le> ?b) = (\<forall>a\<in>?A. a \<le> ?b)

goal (1 subgoal):
 1. Sup {w. \<exists>i. w = x ^ i} \<cdot> z \<le> y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Sup {w. \<exists>i. w = x ^ i} \<cdot> z \<le> y

goal (1 subgoal):
 1. z \<squnion> x \<cdot> y \<le> y \<Longrightarrow> quantale_class.star x \<cdot> z \<le> y
[PROOF STEP]
thus "(star x) \<cdot> z \<le> y"
[PROOF STATE]
proof (prove)
using this:
Sup {w. \<exists>i. w = x ^ i} \<cdot> z \<le> y

goal (1 subgoal):
 1. quantale_class.star x \<cdot> z \<le> y
[PROOF STEP]
by (simp add: star_def_var1)
[PROOF STATE]
proof (state)
this:
quantale_class.star x \<cdot> z \<le> y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma series_and_derivative_comparison_complex:
  fixes S :: "complex set"
  assumes S: "open S"
      and hfd: "\<And>n x. x \<in> S \<Longrightarrow> (f n has_field_derivative f' n x) (at x)"
      and to_g: "\<And>x. x \<in> S \<Longrightarrow> \<exists>d h. 0 < d \<and> summable h \<and> range h \<subseteq> \<real>\<^sub>\<ge>\<^sub>0 \<and> (\<forall>\<^sub>F n in sequentially. \<forall>y\<in>ball x d \<inter> S. cmod(f n y) \<le> cmod (h n))"
  shows "\<exists>g g'. \<forall>x \<in> S. ((\<lambda>n. f n x) sums g x) \<and> ((\<lambda>n. f' n x) sums g' x) \<and> (g has_field_derivative g' x) (at x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>g g'. \<forall>x\<in>S. (\<lambda>n. f n x) sums g x \<and> (\<lambda>n. f' n x) sums g' x \<and> (g has_field_derivative g' x) (at x)
[PROOF STEP]
apply (rule series_and_derivative_comparison_local [OF S hfd], assumption)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> S \<Longrightarrow> \<exists>d h. 0 < d \<and> summable h \<and> (\<forall>\<^sub>F n in sequentially. \<forall>y\<in>ball x d \<inter> S. cmod (f n y) \<le> h n)
[PROOF STEP]
apply (rule ex_forward [OF to_g], assumption)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x d. \<lbrakk>x \<in> S; \<exists>h. 0 < d \<and> summable h \<and> range h \<subseteq> \<real>\<^sub>\<ge>\<^sub>0 \<and> (\<forall>\<^sub>F n in sequentially. \<forall>y\<in>ball x d \<inter> S. cmod (f n y) \<le> cmod (h n))\<rbrakk> \<Longrightarrow> \<exists>h. 0 < d \<and> summable h \<and> (\<forall>\<^sub>F n in sequentially. \<forall>y\<in>ball x d \<inter> S. cmod (f n y) \<le> h n)
[PROOF STEP]
apply (erule exE)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x d h. \<lbrakk>x \<in> S; 0 < d \<and> summable h \<and> range h \<subseteq> \<real>\<^sub>\<ge>\<^sub>0 \<and> (\<forall>\<^sub>F n in sequentially. \<forall>y\<in>ball x d \<inter> S. cmod (f n y) \<le> cmod (h n))\<rbrakk> \<Longrightarrow> \<exists>h. 0 < d \<and> summable h \<and> (\<forall>\<^sub>F n in sequentially. \<forall>y\<in>ball x d \<inter> S. cmod (f n y) \<le> h n)
[PROOF STEP]
apply (rule_tac x="Re \<circ> h" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x d h. \<lbrakk>x \<in> S; 0 < d \<and> summable h \<and> range h \<subseteq> \<real>\<^sub>\<ge>\<^sub>0 \<and> (\<forall>\<^sub>F n in sequentially. \<forall>y\<in>ball x d \<inter> S. cmod (f n y) \<le> cmod (h n))\<rbrakk> \<Longrightarrow> 0 < d \<and> summable (Re \<circ> h) \<and> (\<forall>\<^sub>F n in sequentially. \<forall>y\<in>ball x d \<inter> S. cmod (f n y) \<le> (Re \<circ> h) n)
[PROOF STEP]
apply (force simp: summable_Re o_def nonneg_Reals_cmod_eq_Re image_subset_iff)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma bf_from_sc:
  assumes sc: "simplicial_complex.simplicial_complex n K"
  shows "simplicial_complex_induced_by_monotone_boolean_function n (bf_from_sc K) = K"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. simplicial_complex_induced_by_monotone_boolean_function n (bf_from_sc K) = K
[PROOF STEP]
unfolding bf_from_sc_def simplicial_complex_induced_by_monotone_boolean_function_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {y. \<exists>x. dim_vec x = n \<and> {i. i < dim_vec x \<and> \<not> x $ i} \<in> K \<and> ceros_of_boolean_input x = y} = K
[PROOF STEP]
using sc
[PROOF STATE]
proof (prove)
using this:
simplicial_complex.simplicial_complex n K

goal (1 subgoal):
 1. {y. \<exists>x. dim_vec x = n \<and> {i. i < dim_vec x \<and> \<not> x $ i} \<in> K \<and> ceros_of_boolean_input x = y} = K
[PROOF STEP]
unfolding simplicial_complex.simplicial_complex_def
[PROOF STATE]
proof (prove)
using this:
\<forall>\<sigma>\<in>K. \<sigma> \<in> simplicial_complex.simplices n \<and> Pow \<sigma> \<subseteq> K

goal (1 subgoal):
 1. {y. \<exists>x. dim_vec x = n \<and> {i. i < dim_vec x \<and> \<not> x $ i} \<in> K \<and> ceros_of_boolean_input x = y} = K
[PROOF STEP]
unfolding simplicial_complex.simplices_def
[PROOF STATE]
proof (prove)
using this:
\<forall>\<sigma>\<in>K. \<sigma> \<in> Pow {0..<n} \<and> Pow \<sigma> \<subseteq> K

goal (1 subgoal):
 1. {y. \<exists>x. dim_vec x = n \<and> {i. i < dim_vec x \<and> \<not> x $ i} \<in> K \<and> ceros_of_boolean_input x = y} = K
[PROOF STEP]
unfolding ceros_of_boolean_input_def
[PROOF STATE]
proof (prove)
using this:
\<forall>\<sigma>\<in>K. \<sigma> \<in> Pow {0..<n} \<and> Pow \<sigma> \<subseteq> K

goal (1 subgoal):
 1. {y. \<exists>x. dim_vec x = n \<and> {i. i < dim_vec x \<and> \<not> x $ i} \<in> K \<and> {xa. xa < dim_vec x \<and> x $ xa = False} = y} = K
[PROOF STEP]
by auto (metis ceros_of_boolean_input_def dim_vec sc
      simplicial_complex.ceros_of_boolean_input_in_set simplicial_complex.simplicial_complex_def)


[STATEMENT]
lemma Keys_badI:
  "\<lbrakk> IK \<inter> range LtK \<subseteq> range pubK \<union> priK`Bad \<union> {shrK A B | A B. A \<in> Bad \<or> B \<in> Bad};
     range pubK \<subseteq> IK  \<rbrakk>
 \<Longrightarrow> Keys_bad IK Bad"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>IK \<inter> range LtK \<subseteq> range pubK \<union> priK ` Bad \<union> {shrK A B |A B. A \<in> Bad \<or> B \<in> Bad}; range pubK \<subseteq> IK\<rbrakk> \<Longrightarrow> Keys_bad IK Bad
[PROOF STEP]
by (auto simp add: Keys_bad_def)


[STATEMENT]
lemma ESPEC_rule_iff: "ESPEC \<Phi> \<Psi> \<le> ESPEC \<Phi>' \<Psi>' \<longleftrightarrow> (\<forall>e. \<Phi> e \<longrightarrow> \<Phi>' e) \<and> (\<forall>x. \<Psi> x \<longrightarrow> \<Psi>' x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (ESPEC \<Phi> \<Psi> \<le> ESPEC \<Phi>' \<Psi>') = ((\<forall>e. \<Phi> e \<longrightarrow> \<Phi>' e) \<and> (\<forall>x. \<Psi> x \<longrightarrow> \<Psi>' x))
[PROOF STEP]
by (auto simp: pw_ele_iff refine_pw_simps)


[STATEMENT]
lemma map_vec_mat_rows: "map (map_vec f) (rows M) = rows ((map_mat f) M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map (map_vec f) (rows M) = rows (map_mat f M)
[PROOF STEP]
by (simp add: map_nth_eq_conv)


[STATEMENT]
lemma valid_step_neq: "valid_step s\<^sub>i s\<^sub>j \<Longrightarrow> s\<^sub>i \<noteq> s\<^sub>j"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valid_step s\<^sub>i s\<^sub>j \<Longrightarrow> s\<^sub>i \<noteq> s\<^sub>j
[PROOF STEP]
unfolding valid_step_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. case s\<^sub>i of (i, j) \<Rightarrow> s\<^sub>j \<in> {(i + 1, j + 2), (i - 1, j + 2), (i + 1, j - 2), (i - 1, j - 2), (i + 2, j + 1), (i - 2, j + 1), (i + 2, j - 1), (i - 2, j - 1)} \<Longrightarrow> s\<^sub>i \<noteq> s\<^sub>j
[PROOF STEP]
by auto


[STATEMENT]
lemma iso_point_subset_block_iff: "p \<subseteq> \<V> \<Longrightarrow> bl \<in># \<B> \<Longrightarrow> p \<subseteq> bl \<longleftrightarrow> (\<pi> ` p) \<subseteq> (\<pi> ` bl)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>p \<subseteq> \<V>; bl \<in># \<B>\<rbrakk> \<Longrightarrow> (p \<subseteq> bl) = (\<pi> ` p \<subseteq> \<pi> ` bl)
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>p \<subseteq> \<V>; bl \<in># \<B>; \<pi> ` p \<subseteq> \<pi> ` bl; x \<in> p\<rbrakk> \<Longrightarrow> x \<in> bl
[PROOF STEP]
using image_subset_iff iso_point_in_block_img_iff subset_iff
[PROOF STATE]
proof (prove)
using this:
(?f ` ?A \<subseteq> ?B) = (\<forall>x\<in>?A. ?f x \<in> ?B)
\<lbrakk>?p \<in> \<V>; ?bl \<in># \<B>\<rbrakk> \<Longrightarrow> (?p \<in> ?bl) = (\<pi> ?p \<in> \<pi> ` ?bl)
(?A \<subseteq> ?B) = (\<forall>t. t \<in> ?A \<longrightarrow> t \<in> ?B)

goal (1 subgoal):
 1. \<And>x. \<lbrakk>p \<subseteq> \<V>; bl \<in># \<B>; \<pi> ` p \<subseteq> \<pi> ` bl; x \<in> p\<rbrakk> \<Longrightarrow> x \<in> bl
[PROOF STEP]
by metis


[STATEMENT]
lemma fds_mangoldt_times_zeta: "fds mangoldt * fds_zeta = fds (\<lambda>x. of_real (ln (real x)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds mangoldt * fds_zeta = fds (\<lambda>x. of_real (ln (real x)))
[PROOF STEP]
by (rule fds_eqI) (simp add: fds_nth_mult dirichlet_prod_def mangoldt_sum)


[STATEMENT]
lemma abs_fun_supp:
  fixes a :: "'x"
  and   x :: "'a"
  assumes pt: "pt TYPE('a) TYPE('x)"
  and     at: "at TYPE('x)"
  and     f: "finite ((supp x)::'x set)"
  shows "supp ([a].x) = (supp x)-{a}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. supp ([a].x) = supp x - {a}
[PROOF STEP]
by (force simp add: supp_fresh_iff fresh_abs_fun_iff[OF pt, OF at, OF f])


[STATEMENT]
lemma apply_zero_matrix_def[simp]: "apply_matrix (% x. 0) A = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. apply_matrix (\<lambda>x. 0::'a) A = 0
[PROOF STEP]
apply (simp add: apply_matrix_def apply_infmatrix_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Abs_matrix (\<lambda>j i. 0::'a) = 0
[PROOF STEP]
by (simp add: zero_matrix_def)


[STATEMENT]
lemma outside_subset_convex:
  fixes S :: "'a :: {real_normed_vector, perfect_space} set"
  shows "\<lbrakk>convex T; S \<subseteq> T\<rbrakk> \<Longrightarrow> - T \<subseteq> outside S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>convex T; S \<subseteq> T\<rbrakk> \<Longrightarrow> - T \<subseteq> outside S
[PROOF STEP]
using outside_convex outside_mono
[PROOF STATE]
proof (prove)
using this:
convex ?S \<Longrightarrow> outside ?S = - ?S
?S \<subseteq> ?T \<Longrightarrow> outside ?T \<subseteq> outside ?S

goal (1 subgoal):
 1. \<lbrakk>convex T; S \<subseteq> T\<rbrakk> \<Longrightarrow> - T \<subseteq> outside S
[PROOF STEP]
by blast


[STATEMENT]
lemma shunting_p:
  "x \<sqinter> y \<le> -z \<longleftrightarrow> x \<le> -z \<squnion> -y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<sqinter> y \<le> - z) = (x \<le> - z \<squnion> - y)
[PROOF STEP]
by (metis inf.assoc p_dist_inf p_shunting_swap pseudo_complement)


[STATEMENT]
lemma sum_eq_if_same_subterms:
  fixes
    i :: nat
  shows
    "\<forall>k. i \<le> k \<and> k < j \<longrightarrow> f k = f' k \<Longrightarrow> sum f {i..<j} = sum f' {i..<j}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>k. i \<le> k \<and> k < j \<longrightarrow> f k = f' k \<Longrightarrow> sum f {i..<j} = sum f' {i..<j}
[PROOF STEP]
by auto


[STATEMENT]
lemma lm117:
  assumes "P -` {True} \<inter> set l \<noteq> {}"
  shows "\<exists> n \<in> {0..<size l}. P (l!n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>n\<in>{0..<length l}. P (l ! n)
[PROOF STEP]
using assms lm116
[PROOF STATE]
proof (prove)
using this:
P -` {True} \<inter> set l \<noteq> {}
?ll \<in> set ?l \<Longrightarrow> \<exists>n. ?ll = ?l ! n \<and> n < length ?l \<and> 0 \<le> n

goal (1 subgoal):
 1. \<exists>n\<in>{0..<length l}. P (l ! n)
[PROOF STEP]
by fastforce


[STATEMENT]
lemma map_graph_functional[simp]: "functional (map_graph f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. functional (map_graph f)
[PROOF STEP]
by (simp add:functional_def map_graph_def inj_on_def)


[STATEMENT]
lemma path_connected_2DIM_I:
  fixes a :: "'N::euclidean_space"
  assumes 2: "2 \<le> DIM('N)" and pc: "path_connected {r. 0 \<le> r \<and> P r}"
  shows "path_connected {x. P(norm(x - a))}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_connected {x. P (norm (x - a))}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. path_connected {x. P (norm (x - a))}
[PROOF STEP]
have "{x. P(norm(x - a))} = (+) a ` {x. P(norm x)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x. P (norm (x - a))} = (+) a ` {x. P (norm x)}
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
{x. P (norm (x - a))} = (+) a ` {x. P (norm x)}

goal (1 subgoal):
 1. path_connected {x. P (norm (x - a))}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
{x. P (norm (x - a))} = (+) a ` {x. P (norm x)}

goal (1 subgoal):
 1. path_connected {x. P (norm (x - a))}
[PROOF STEP]
have "path_connected {x::'N. P(norm x)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_connected {x. P (norm x)}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. path_connected {x. P (norm x)}
[PROOF STEP]
let ?D = "{x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. path_connected {x. P (norm x)}
[PROOF STEP]
have "x \<in> (\<lambda>z. fst z *\<^sub>R snd z) ` ?D"
      if "P (norm x)" for x::'N
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> (\<lambda>z. fst z *\<^sub>R snd z) ` ({x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1)
[PROOF STEP]
proof (cases "x=0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x = (0::'N) \<Longrightarrow> x \<in> (\<lambda>z. fst z *\<^sub>R snd z) ` ({x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1)
 2. x \<noteq> (0::'N) \<Longrightarrow> x \<in> (\<lambda>z. fst z *\<^sub>R snd z) ` ({x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
x = (0::'N)

goal (2 subgoals):
 1. x = (0::'N) \<Longrightarrow> x \<in> (\<lambda>z. fst z *\<^sub>R snd z) ` ({x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1)
 2. x \<noteq> (0::'N) \<Longrightarrow> x \<in> (\<lambda>z. fst z *\<^sub>R snd z) ` ({x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1)
[PROOF STEP]
with that
[PROOF STATE]
proof (chain)
picking this:
P (norm x)
x = (0::'N)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P (norm x)
x = (0::'N)

goal (1 subgoal):
 1. x \<in> (\<lambda>z. fst z *\<^sub>R snd z) ` ({x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1)
[PROOF STEP]
apply (simp add: image_iff)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>P 0; x = (0::'N)\<rbrakk> \<Longrightarrow> \<exists>x\<ge>0. P x \<and> (\<exists>y\<in>sphere (0::'N) 1. x = 0 \<or> y = (0::'N))
[PROOF STEP]
by (metis (no_types) mem_sphere_0 order_refl vector_choose_size zero_le_one)
[PROOF STATE]
proof (state)
this:
x \<in> (\<lambda>z. fst z *\<^sub>R snd z) ` ({x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1)

goal (1 subgoal):
 1. x \<noteq> (0::'N) \<Longrightarrow> x \<in> (\<lambda>z. fst z *\<^sub>R snd z) ` ({x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x \<noteq> (0::'N) \<Longrightarrow> x \<in> (\<lambda>z. fst z *\<^sub>R snd z) ` ({x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
x \<noteq> (0::'N)

goal (1 subgoal):
 1. x \<noteq> (0::'N) \<Longrightarrow> x \<in> (\<lambda>z. fst z *\<^sub>R snd z) ` ({x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1)
[PROOF STEP]
with that
[PROOF STATE]
proof (chain)
picking this:
P (norm x)
x \<noteq> (0::'N)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P (norm x)
x \<noteq> (0::'N)

goal (1 subgoal):
 1. x \<in> (\<lambda>z. fst z *\<^sub>R snd z) ` ({x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1)
[PROOF STEP]
by (rule_tac x="(norm x, x /\<^sub>R norm x)" in image_eqI) auto
[PROOF STATE]
proof (state)
this:
x \<in> (\<lambda>z. fst z *\<^sub>R snd z) ` ({x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P (norm ?x) \<Longrightarrow> ?x \<in> (\<lambda>z. fst z *\<^sub>R snd z) ` ({x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1)

goal (1 subgoal):
 1. path_connected {x. P (norm x)}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
P (norm ?x) \<Longrightarrow> ?x \<in> (\<lambda>z. fst z *\<^sub>R snd z) ` ({x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1)
[PROOF STEP]
have *: "{x::'N. P(norm x)} =  (\<lambda>z. fst z *\<^sub>R snd z) ` ?D"
[PROOF STATE]
proof (prove)
using this:
P (norm ?x) \<Longrightarrow> ?x \<in> (\<lambda>z. fst z *\<^sub>R snd z) ` ({x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1)

goal (1 subgoal):
 1. {x. P (norm x)} = (\<lambda>z. fst z *\<^sub>R snd z) ` ({x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{x. P (norm x)} = (\<lambda>z. fst z *\<^sub>R snd z) ` ({x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1)

goal (1 subgoal):
 1. path_connected {x. P (norm x)}
[PROOF STEP]
have "continuous_on ?D (\<lambda>z:: real\<times>'N. fst z *\<^sub>R snd z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on ({x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1) (\<lambda>z. fst z *\<^sub>R snd z)
[PROOF STEP]
by (intro continuous_intros)
[PROOF STATE]
proof (state)
this:
continuous_on ({x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1) (\<lambda>z. fst z *\<^sub>R snd z)

goal (1 subgoal):
 1. path_connected {x. P (norm x)}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
continuous_on ({x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1) (\<lambda>z. fst z *\<^sub>R snd z)

goal (1 subgoal):
 1. path_connected {x. P (norm x)}
[PROOF STEP]
have "path_connected ?D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_connected ({x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1)
[PROOF STEP]
by (metis path_connected_Times [OF pc] path_connected_sphere 2)
[PROOF STATE]
proof (state)
this:
path_connected ({x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1)

goal (1 subgoal):
 1. path_connected {x. P (norm x)}
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
continuous_on ({x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1) (\<lambda>z. fst z *\<^sub>R snd z)
path_connected ({x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
continuous_on ({x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1) (\<lambda>z. fst z *\<^sub>R snd z)
path_connected ({x. 0 \<le> x \<and> P x} \<times> sphere (0::'N) 1)

goal (1 subgoal):
 1. path_connected {x. P (norm x)}
[PROOF STEP]
by (simp add: "*" path_connected_continuous_image)
[PROOF STATE]
proof (state)
this:
path_connected {x. P (norm x)}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
path_connected {x. P (norm x)}

goal (1 subgoal):
 1. path_connected {x. P (norm (x - a))}
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
{x. P (norm (x - a))} = (+) a ` {x. P (norm x)}
path_connected {x. P (norm x)}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
{x. P (norm (x - a))} = (+) a ` {x. P (norm x)}
path_connected {x. P (norm x)}

goal (1 subgoal):
 1. path_connected {x. P (norm (x - a))}
[PROOF STEP]
using path_connected_translation
[PROOF STATE]
proof (prove)
using this:
{x. P (norm (x - a))} = (+) a ` {x. P (norm x)}
path_connected {x. P (norm x)}
path_connected ((+) ?a ` ?S) = path_connected ?S

goal (1 subgoal):
 1. path_connected {x. P (norm (x - a))}
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
path_connected {x. P (norm (x - a))}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma neg_lincomb :
  "set rs \<subseteq> R \<Longrightarrow> set ms \<subseteq> M \<Longrightarrow> - (rs \<bullet>\<cdot> ms) = [-r. r\<leftarrow>rs] \<bullet>\<cdot> ms"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>set rs \<subseteq> R; set ms \<subseteq> M\<rbrakk> \<Longrightarrow> - (rs \<bullet>\<cdot> ms) = map uminus rs \<bullet>\<cdot> ms
[PROOF STEP]
using lincomb_closed neg_eq_neg1_smult one_closed R_scalars.neg_closed[of 1]
        smult_lincomb[of rs "- 1"] map_times_neg1_eq_map_uminus
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>set ?rs \<subseteq> R; set ?ms \<subseteq> M\<rbrakk> \<Longrightarrow> ?rs \<bullet>\<cdot> ?ms \<in> M
?m \<in> M \<Longrightarrow> - (1::'r) \<cdot> ?m = - ?m
(1::'r) \<in> R
(1::'r) \<in> R \<Longrightarrow> - (1::'r) \<in> R
\<lbrakk>set rs \<subseteq> R; - (1::'r) \<in> R; set ?ms \<subseteq> M\<rbrakk> \<Longrightarrow> - (1::'r) \<cdot> rs \<bullet>\<cdot> ?ms = map ((*) (- (1::'r))) rs \<bullet>\<cdot> ?ms
map ((*) (- (1::?'a))) ?rs = map uminus ?rs

goal (1 subgoal):
 1. \<lbrakk>set rs \<subseteq> R; set ms \<subseteq> M\<rbrakk> \<Longrightarrow> - (rs \<bullet>\<cdot> ms) = map uminus rs \<bullet>\<cdot> ms
[PROOF STEP]
by    auto


[STATEMENT]
lemma llist_all2_llength_ltakeWhileD:
  assumes major: "llist_all2 P xs ys"
  and Q: "\<And>x y. P x y \<Longrightarrow> Q1 x \<longleftrightarrow> Q2 y"
  shows "llength (ltakeWhile Q1 xs) = llength (ltakeWhile Q2 ys)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. llength (ltakeWhile Q1 xs) = llength (ltakeWhile Q2 ys)
[PROOF STEP]
using major
[PROOF STATE]
proof (prove)
using this:
llist_all2 P xs ys

goal (1 subgoal):
 1. llength (ltakeWhile Q1 xs) = llength (ltakeWhile Q2 ys)
[PROOF STEP]
by(coinduction arbitrary: xs ys rule: enat_coinduct)(auto 4 3 simp add: not_lnull_conv llist_all2_LCons1 llist_all2_LCons2 dest!: Q)


[STATEMENT]
lemma cong_4312:
  assumes "Cong A B C D"
  shows "Cong D C A B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Cong D C A B
[PROOF STEP]
using assms cong_left_commutativity cong_symmetry
[PROOF STATE]
proof (prove)
using this:
Cong A B C D
Cong ?A ?B ?C ?D \<Longrightarrow> Cong ?B ?A ?C ?D
Cong ?A ?B ?C ?D \<Longrightarrow> Cong ?C ?D ?A ?B

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


[STATEMENT]
lemma urel_integer_plus: assumes "urel_integer x y" "urel_integer x' y'"
  shows "urel_integer (plus_p_integer pp x x') (plus_p p y y')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. urel_integer (plus_p_integer pp x x') (plus_p p y y')
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. urel_integer (plus_p_integer pp x x') (plus_p p y y')
[PROOF STEP]
let ?x = "int_of_integer x"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. urel_integer (plus_p_integer pp x x') (plus_p p y y')
[PROOF STEP]
let ?x' = "int_of_integer x'"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. urel_integer (plus_p_integer pp x x') (plus_p p y y')
[PROOF STEP]
let ?p = "int_of_integer pp"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. urel_integer (plus_p_integer pp x x') (plus_p p y y')
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
urel_integer x y
urel_integer x' y'
[PROOF STEP]
have id: "y = ?x" "y' = ?x'"
    and rel: "0 \<le> ?x" "?x < p"
      "0 \<le> ?x'" "?x' \<le> p"
[PROOF STATE]
proof (prove)
using this:
urel_integer x y
urel_integer x' y'

goal (1 subgoal):
 1. (y = int_of_integer x &&& y' = int_of_integer x') &&& (0 \<le> int_of_integer x &&& int_of_integer x < p) &&& 0 \<le> int_of_integer x' &&& int_of_integer x' \<le> p
[PROOF STEP]
unfolding urel_integer_def
[PROOF STATE]
proof (prove)
using this:
y = int_of_integer x \<and> 0 \<le> y \<and> y < p
y' = int_of_integer x' \<and> 0 \<le> y' \<and> y' < p

goal (1 subgoal):
 1. (y = int_of_integer x &&& y' = int_of_integer x') &&& (0 \<le> int_of_integer x &&& int_of_integer x < p) &&& 0 \<le> int_of_integer x' &&& int_of_integer x' \<le> p
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
y = int_of_integer x
y' = int_of_integer x'
0 \<le> int_of_integer x
int_of_integer x < p
0 \<le> int_of_integer x'
int_of_integer x' \<le> p

goal (1 subgoal):
 1. urel_integer (plus_p_integer pp x x') (plus_p p y y')
[PROOF STEP]
have le: "(pp \<le> x + x') = (?p \<le> ?x + ?x')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (pp \<le> x + x') = (int_of_integer pp \<le> int_of_integer x + int_of_integer x')
[PROOF STEP]
unfolding le_int_of_integer
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (int_of_integer pp \<le> int_of_integer (x + x')) = (int_of_integer pp \<le> int_of_integer x + int_of_integer x')
[PROOF STEP]
using rel
[PROOF STATE]
proof (prove)
using this:
0 \<le> int_of_integer x
int_of_integer x < p
0 \<le> int_of_integer x'
int_of_integer x' \<le> p

goal (1 subgoal):
 1. (int_of_integer pp \<le> int_of_integer (x + x')) = (int_of_integer pp \<le> int_of_integer x + int_of_integer x')
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(pp \<le> x + x') = (int_of_integer pp \<le> int_of_integer x + int_of_integer x')

goal (1 subgoal):
 1. urel_integer (plus_p_integer pp x x') (plus_p p y y')
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. urel_integer (plus_p_integer pp x x') (plus_p p y y')
[PROOF STEP]
proof (cases "?p \<le> ?x + ?x'")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. int_of_integer pp \<le> int_of_integer x + int_of_integer x' \<Longrightarrow> urel_integer (plus_p_integer pp x x') (plus_p p y y')
 2. \<not> int_of_integer pp \<le> int_of_integer x + int_of_integer x' \<Longrightarrow> urel_integer (plus_p_integer pp x x') (plus_p p y y')
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
int_of_integer pp \<le> int_of_integer x + int_of_integer x'

goal (2 subgoals):
 1. int_of_integer pp \<le> int_of_integer x + int_of_integer x' \<Longrightarrow> urel_integer (plus_p_integer pp x x') (plus_p p y y')
 2. \<not> int_of_integer pp \<le> int_of_integer x + int_of_integer x' \<Longrightarrow> urel_integer (plus_p_integer pp x x') (plus_p p y y')
[PROOF STEP]
hence True: "(?p \<le> ?x + ?x') = True"
[PROOF STATE]
proof (prove)
using this:
int_of_integer pp \<le> int_of_integer x + int_of_integer x'

goal (1 subgoal):
 1. (int_of_integer pp \<le> int_of_integer x + int_of_integer x') = True
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(int_of_integer pp \<le> int_of_integer x + int_of_integer x') = True

goal (2 subgoals):
 1. int_of_integer pp \<le> int_of_integer x + int_of_integer x' \<Longrightarrow> urel_integer (plus_p_integer pp x x') (plus_p p y y')
 2. \<not> int_of_integer pp \<le> int_of_integer x + int_of_integer x' \<Longrightarrow> urel_integer (plus_p_integer pp x x') (plus_p p y y')
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. urel_integer (plus_p_integer pp x x') (plus_p p y y')
[PROOF STEP]
unfolding id
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. urel_integer (plus_p_integer pp x x') (plus_p p (int_of_integer x) (int_of_integer x'))
[PROOF STEP]
using rel
[PROOF STATE]
proof (prove)
using this:
0 \<le> int_of_integer x
int_of_integer x < p
0 \<le> int_of_integer x'
int_of_integer x' \<le> p

goal (1 subgoal):
 1. urel_integer (plus_p_integer pp x x') (plus_p p (int_of_integer x) (int_of_integer x'))
[PROOF STEP]
unfolding plus_p_integer_def plus_p_def Let_def urel_integer_def
[PROOF STATE]
proof (prove)
using this:
0 \<le> int_of_integer x
int_of_integer x < p
0 \<le> int_of_integer x'
int_of_integer x' \<le> p

goal (1 subgoal):
 1. (if p \<le> int_of_integer x + int_of_integer x' then int_of_integer x + int_of_integer x' - p else int_of_integer x + int_of_integer x') = int_of_integer (if pp \<le> x + x' then x + x' - pp else x + x') \<and> 0 \<le> (if p \<le> int_of_integer x + int_of_integer x' then int_of_integer x + int_of_integer x' - p else int_of_integer x + int_of_integer x') \<and> (if p \<le> int_of_integer x + int_of_integer x' then int_of_integer x + int_of_integer x' - p else int_of_integer x + int_of_integer x') < p
[PROOF STEP]
unfolding ppp le True if_True
[PROOF STATE]
proof (prove)
using this:
0 \<le> int_of_integer x
int_of_integer x < int_of_integer pp
0 \<le> int_of_integer x'
int_of_integer x' \<le> int_of_integer pp

goal (1 subgoal):
 1. int_of_integer x + int_of_integer x' - int_of_integer pp = int_of_integer (x + x' - pp) \<and> 0 \<le> int_of_integer x + int_of_integer x' - int_of_integer pp \<and> int_of_integer x + int_of_integer x' - int_of_integer pp < int_of_integer pp
[PROOF STEP]
using True
[PROOF STATE]
proof (prove)
using this:
0 \<le> int_of_integer x
int_of_integer x < int_of_integer pp
0 \<le> int_of_integer x'
int_of_integer x' \<le> int_of_integer pp
(int_of_integer pp \<le> int_of_integer x + int_of_integer x') = True

goal (1 subgoal):
 1. int_of_integer x + int_of_integer x' - int_of_integer pp = int_of_integer (x + x' - pp) \<and> 0 \<le> int_of_integer x + int_of_integer x' - int_of_integer pp \<and> int_of_integer x + int_of_integer x' - int_of_integer pp < int_of_integer pp
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
urel_integer (plus_p_integer pp x x') (plus_p p y y')

goal (1 subgoal):
 1. \<not> int_of_integer pp \<le> int_of_integer x + int_of_integer x' \<Longrightarrow> urel_integer (plus_p_integer pp x x') (plus_p p y y')
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> int_of_integer pp \<le> int_of_integer x + int_of_integer x' \<Longrightarrow> urel_integer (plus_p_integer pp x x') (plus_p p y y')
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> int_of_integer pp \<le> int_of_integer x + int_of_integer x'

goal (1 subgoal):
 1. \<not> int_of_integer pp \<le> int_of_integer x + int_of_integer x' \<Longrightarrow> urel_integer (plus_p_integer pp x x') (plus_p p y y')
[PROOF STEP]
hence False: "(?p \<le> ?x + ?x') = False"
[PROOF STATE]
proof (prove)
using this:
\<not> int_of_integer pp \<le> int_of_integer x + int_of_integer x'

goal (1 subgoal):
 1. (int_of_integer pp \<le> int_of_integer x + int_of_integer x') = False
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(int_of_integer pp \<le> int_of_integer x + int_of_integer x') = False

goal (1 subgoal):
 1. \<not> int_of_integer pp \<le> int_of_integer x + int_of_integer x' \<Longrightarrow> urel_integer (plus_p_integer pp x x') (plus_p p y y')
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. urel_integer (plus_p_integer pp x x') (plus_p p y y')
[PROOF STEP]
unfolding id
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. urel_integer (plus_p_integer pp x x') (plus_p p (int_of_integer x) (int_of_integer x'))
[PROOF STEP]
using rel
[PROOF STATE]
proof (prove)
using this:
0 \<le> int_of_integer x
int_of_integer x < p
0 \<le> int_of_integer x'
int_of_integer x' \<le> p

goal (1 subgoal):
 1. urel_integer (plus_p_integer pp x x') (plus_p p (int_of_integer x) (int_of_integer x'))
[PROOF STEP]
unfolding plus_p_integer_def plus_p_def Let_def urel_integer_def
[PROOF STATE]
proof (prove)
using this:
0 \<le> int_of_integer x
int_of_integer x < p
0 \<le> int_of_integer x'
int_of_integer x' \<le> p

goal (1 subgoal):
 1. (if p \<le> int_of_integer x + int_of_integer x' then int_of_integer x + int_of_integer x' - p else int_of_integer x + int_of_integer x') = int_of_integer (if pp \<le> x + x' then x + x' - pp else x + x') \<and> 0 \<le> (if p \<le> int_of_integer x + int_of_integer x' then int_of_integer x + int_of_integer x' - p else int_of_integer x + int_of_integer x') \<and> (if p \<le> int_of_integer x + int_of_integer x' then int_of_integer x + int_of_integer x' - p else int_of_integer x + int_of_integer x') < p
[PROOF STEP]
unfolding ppp le False if_False
[PROOF STATE]
proof (prove)
using this:
0 \<le> int_of_integer x
int_of_integer x < int_of_integer pp
0 \<le> int_of_integer x'
int_of_integer x' \<le> int_of_integer pp

goal (1 subgoal):
 1. int_of_integer x + int_of_integer x' = int_of_integer (x + x') \<and> 0 \<le> int_of_integer x + int_of_integer x' \<and> int_of_integer x + int_of_integer x' < int_of_integer pp
[PROOF STEP]
using False
[PROOF STATE]
proof (prove)
using this:
0 \<le> int_of_integer x
int_of_integer x < int_of_integer pp
0 \<le> int_of_integer x'
int_of_integer x' \<le> int_of_integer pp
(int_of_integer pp \<le> int_of_integer x + int_of_integer x') = False

goal (1 subgoal):
 1. int_of_integer x + int_of_integer x' = int_of_integer (x + x') \<and> 0 \<le> int_of_integer x + int_of_integer x' \<and> int_of_integer x + int_of_integer x' < int_of_integer pp
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
urel_integer (plus_p_integer pp x x') (plus_p p y y')

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
urel_integer (plus_p_integer pp x x') (plus_p p y y')

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ntcf_arrows_subset_Vset:
  assumes "\<Z> \<beta>" and "\<alpha> \<in>\<^sub>\<circ> \<beta>"
  shows
    "{ntcf_arrow \<NN> | \<NN>. \<exists>\<FF> \<GG>. \<NN> : \<FF> \<mapsto>\<^sub>C\<^sub>F \<GG> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>} \<subseteq> elts (Vset \<beta>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {ntcf_arrow \<NN> |\<NN>. \<exists>\<FF> \<GG>. \<NN> : \<FF> \<mapsto>\<^sub>C\<^sub>F \<GG> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>} \<subseteq> elts (Vset \<beta>)
[PROOF STEP]
proof(intro subsetI, unfold mem_Collect_eq, elim exE conjE)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x \<NN> \<FF> \<GG>. \<lbrakk>x = ntcf_arrow \<NN>; \<NN> : \<FF> \<mapsto>\<^sub>C\<^sub>F \<GG> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>\<rbrakk> \<Longrightarrow> x \<in>\<^sub>\<circ> Vset \<beta>
[PROOF STEP]
fix x \<NN> \<FF> \<GG>
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x \<NN> \<FF> \<GG>. \<lbrakk>x = ntcf_arrow \<NN>; \<NN> : \<FF> \<mapsto>\<^sub>C\<^sub>F \<GG> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>\<rbrakk> \<Longrightarrow> x \<in>\<^sub>\<circ> Vset \<beta>
[PROOF STEP]
assume x_def: "x = ntcf_arrow \<NN>"
    and \<NN>: "\<NN> : \<FF> \<mapsto>\<^sub>C\<^sub>F \<GG> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>"
[PROOF STATE]
proof (state)
this:
x = ntcf_arrow \<NN>
\<NN> : \<FF> \<mapsto>\<^sub>C\<^sub>F \<GG> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>

goal (1 subgoal):
 1. \<And>x \<NN> \<FF> \<GG>. \<lbrakk>x = ntcf_arrow \<NN>; \<NN> : \<FF> \<mapsto>\<^sub>C\<^sub>F \<GG> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>\<rbrakk> \<Longrightarrow> x \<in>\<^sub>\<circ> Vset \<beta>
[PROOF STEP]
interpret is_ntcf \<alpha> \<AA> \<BB> \<FF> \<GG> \<NN>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<NN> : \<FF> \<mapsto>\<^sub>C\<^sub>F \<GG> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>
[PROOF STEP]
by (rule \<NN>)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x \<NN> \<FF> \<GG>. \<lbrakk>x = ntcf_arrow \<NN>; \<NN> : \<FF> \<mapsto>\<^sub>C\<^sub>F \<GG> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>\<rbrakk> \<Longrightarrow> x \<in>\<^sub>\<circ> Vset \<beta>
[PROOF STEP]
show "x \<in>\<^sub>\<circ> Vset \<beta>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in>\<^sub>\<circ> Vset \<beta>
[PROOF STEP]
unfolding x_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ntcf_arrow \<NN> \<in>\<^sub>\<circ> Vset \<beta>
[PROOF STEP]
by (rule ntcf_arrow_in_Vset[OF assms])
[PROOF STATE]
proof (state)
this:
x \<in>\<^sub>\<circ> Vset \<beta>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma and_mask_less_size: "n < size x \<Longrightarrow> x AND mask n < 2 ^ n"
  for x :: \<open>'a::len word\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n < size x \<Longrightarrow> x AND mask n < 2 ^ n
[PROOF STEP]
unfolding word_size
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n < LENGTH('a) \<Longrightarrow> x AND mask n < 2 ^ n
[PROOF STEP]
by (erule and_mask_less')


[STATEMENT]
lemma lookup_None_iff_find_None: "lookup P xs = None \<longleftrightarrow> List.find (\<lambda>(k,_). P k) xs = None"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (lookup P xs = None) = (List.find (\<lambda>(k, uu_). P k) xs = None)
[PROOF STEP]
by (induction xs) auto


[STATEMENT]
lemma tnth_tdropn [simp]: "enat (n + m) < tlength xs \<Longrightarrow> tnth (tdropn n xs) m = tnth xs (m + n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. enat (n + m) < tlength xs \<Longrightarrow> tnth (tdropn n xs) m = tnth xs (m + n)
[PROOF STEP]
by transfer auto


[STATEMENT]
lemma image_ring_truncate: "monoid.truncate (image_ring f R) = image_group f R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. monoid.truncate (image_ring f R) = image_group f R
[PROOF STEP]
by (simp add: image_ring_def monoid.defs)


[STATEMENT]
lemma x_c_par_idem [simp]: "(x \<cdot> 1\<^sub>\<pi>) \<parallel> (x \<cdot> 1\<^sub>\<pi>) = x \<cdot> 1\<^sub>\<pi>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<cdot> 1\<^sub>\<pi> \<parallel> (x \<cdot> 1\<^sub>\<pi>) = x \<cdot> 1\<^sub>\<pi>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x \<cdot> 1\<^sub>\<pi> \<parallel> (x \<cdot> 1\<^sub>\<pi>) = x \<cdot> 1\<^sub>\<pi>
[PROOF STEP]
have "(x \<cdot> 1\<^sub>\<pi>) \<parallel> (x \<cdot> 1\<^sub>\<pi>) = d x \<cdot> (x \<cdot> 1\<^sub>\<pi>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<cdot> 1\<^sub>\<pi> \<parallel> (x \<cdot> 1\<^sub>\<pi>) = d x \<cdot> (x \<cdot> 1\<^sub>\<pi>)
[PROOF STEP]
using c2_d
[PROOF STATE]
proof (prove)
using this:
d ?x \<cdot> ?y = ?x \<cdot> 1\<^sub>\<pi> \<parallel> ?y

goal (1 subgoal):
 1. x \<cdot> 1\<^sub>\<pi> \<parallel> (x \<cdot> 1\<^sub>\<pi>) = d x \<cdot> (x \<cdot> 1\<^sub>\<pi>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x \<cdot> 1\<^sub>\<pi> \<parallel> (x \<cdot> 1\<^sub>\<pi>) = d x \<cdot> (x \<cdot> 1\<^sub>\<pi>)

goal (1 subgoal):
 1. x \<cdot> 1\<^sub>\<pi> \<parallel> (x \<cdot> 1\<^sub>\<pi>) = x \<cdot> 1\<^sub>\<pi>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x \<cdot> 1\<^sub>\<pi> \<parallel> (x \<cdot> 1\<^sub>\<pi>) = d x \<cdot> (x \<cdot> 1\<^sub>\<pi>)

goal (1 subgoal):
 1. x \<cdot> 1\<^sub>\<pi> \<parallel> (x \<cdot> 1\<^sub>\<pi>) = x \<cdot> 1\<^sub>\<pi>
[PROOF STEP]
have "... = d (x \<cdot> 1\<^sub>\<pi>) \<cdot> (x \<cdot> 1\<^sub>\<pi>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d x \<cdot> (x \<cdot> 1\<^sub>\<pi>) = d (x \<cdot> 1\<^sub>\<pi>) \<cdot> (x \<cdot> 1\<^sub>\<pi>)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
d x \<cdot> (x \<cdot> 1\<^sub>\<pi>) = d (x \<cdot> 1\<^sub>\<pi>) \<cdot> (x \<cdot> 1\<^sub>\<pi>)

goal (1 subgoal):
 1. x \<cdot> 1\<^sub>\<pi> \<parallel> (x \<cdot> 1\<^sub>\<pi>) = x \<cdot> 1\<^sub>\<pi>
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
x \<cdot> 1\<^sub>\<pi> \<parallel> (x \<cdot> 1\<^sub>\<pi>) = d (x \<cdot> 1\<^sub>\<pi>) \<cdot> (x \<cdot> 1\<^sub>\<pi>)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x \<cdot> 1\<^sub>\<pi> \<parallel> (x \<cdot> 1\<^sub>\<pi>) = d (x \<cdot> 1\<^sub>\<pi>) \<cdot> (x \<cdot> 1\<^sub>\<pi>)

goal (1 subgoal):
 1. x \<cdot> 1\<^sub>\<pi> \<parallel> (x \<cdot> 1\<^sub>\<pi>) = x \<cdot> 1\<^sub>\<pi>
[PROOF STEP]
using d_rest_ax
[PROOF STATE]
proof (prove)
using this:
x \<cdot> 1\<^sub>\<pi> \<parallel> (x \<cdot> 1\<^sub>\<pi>) = d (x \<cdot> 1\<^sub>\<pi>) \<cdot> (x \<cdot> 1\<^sub>\<pi>)
d ?x \<cdot> ?x = ?x

goal (1 subgoal):
 1. x \<cdot> 1\<^sub>\<pi> \<parallel> (x \<cdot> 1\<^sub>\<pi>) = x \<cdot> 1\<^sub>\<pi>
[PROOF STEP]
by presburger
[PROOF STATE]
proof (state)
this:
x \<cdot> 1\<^sub>\<pi> \<parallel> (x \<cdot> 1\<^sub>\<pi>) = x \<cdot> 1\<^sub>\<pi>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fls_pow_nth_below_subdegree:
  "k < n * fls_subdegree f \<Longrightarrow> (f^n) $$ k = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k < int n * fls_subdegree f \<Longrightarrow> f ^ n $$ k = (0::'a)
[PROOF STEP]
using fls_pow_subdegree_ge[of f n]
[PROOF STATE]
proof (prove)
using this:
f ^ n \<noteq> 0 \<Longrightarrow> int n * fls_subdegree f \<le> fls_subdegree (f ^ n)

goal (1 subgoal):
 1. k < int n * fls_subdegree f \<Longrightarrow> f ^ n $$ k = (0::'a)
[PROOF STEP]
by (cases "f^n = 0") auto


[STATEMENT]
lemma COMP_assoc: "F oo (f o g) \<equiv> (F oo f) oo g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F oo (f \<circ> g) \<equiv> F oo f oo g
[PROOF STEP]
unfolding COMP_def o_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lambda>x. PROP F (f (g x)) \<equiv> \<lambda>x. PROP F (f (g x))
[PROOF STEP]
.


[STATEMENT]
lemma aval_eq_on_fv: "(\<forall>x\<in>fv_aexp a. s x = s' x) \<Longrightarrow> aval a s = aval a s'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<in>fv_aexp a. s x = s' x \<Longrightarrow> aval a s = aval a s'
[PROOF STEP]
by (induction a) auto


[STATEMENT]
lemma bisumTail_is_map_zip:
  "(\<Sum>x\<leftarrow>zip (v # l1) (l1 @ [0]). f x) = bisumTail (\<lambda>x y .f (x,y))  (v#l1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum_list (map f (zip (v # l1) (l1 @ [0::'b]))) = bisumTail (\<lambda>x y. f (x, y)) (v # l1)
[PROOF STEP]
by(induct l1 arbitrary:v,auto)


[STATEMENT]
lemma nth_prefix_length:
  "(\<exists>x\<in>set xs. \<not>P x) \<Longrightarrow> \<not>P (xs ! prefix_length P xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x\<in>set xs. \<not> P x \<Longrightarrow> \<not> P (xs ! prefix_length P xs)
[PROOF STEP]
by (induction xs) (simp_all add: prefix_length_def)


[STATEMENT]
lemma n_inj_polymap_times :
  "\<not> inj_on (polymap (p * q)) V
        \<Longrightarrow> \<not> inj_on (polymap p) V \<or> \<not> inj_on (polymap q) V"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> inj_on (polymap (p * q)) V \<Longrightarrow> \<not> inj_on (polymap p) V \<or> \<not> inj_on (polymap q) V
[PROOF STEP]
using polymap_times VEnd_polymap n_inj_comp_end
[PROOF STATE]
proof (prove)
using this:
polymap (?p * ?q) = polymap ?p \<circ> polymap ?q
VEnd (polymap ?p)
\<lbrakk>VEnd ?S; VEnd ?T; \<not> inj_on (?S \<circ> ?T) V\<rbrakk> \<Longrightarrow> \<not> inj_on ?S V \<or> \<not> inj_on ?T V

goal (1 subgoal):
 1. \<not> inj_on (polymap (p * q)) V \<Longrightarrow> \<not> inj_on (polymap p) V \<or> \<not> inj_on (polymap q) V
[PROOF STEP]
by fastforce


[STATEMENT]
lemma integrable_neg_iff: "(\<lambda>x. -f(x)) integrable_on S \<longleftrightarrow> f integrable_on S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. - f x) integrable_on S) = (f integrable_on S)
[PROOF STEP]
using integrable_neg
[PROOF STATE]
proof (prove)
using this:
?f integrable_on ?S \<Longrightarrow> (\<lambda>x. - ?f x) integrable_on ?S

goal (1 subgoal):
 1. ((\<lambda>x. - f x) integrable_on S) = (f integrable_on S)
[PROOF STEP]
by fastforce


[STATEMENT]
lemma CollInt_iff: "{s. P s} \<inter> {s. Q s} = {s. P s \<and> Q s}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {s. P s} \<inter> {s. Q s} = {s. P s \<and> Q s}
[PROOF STEP]
by auto


[STATEMENT]
lemma per_init_of_nat_range: "per_init {i. i<N} = per_init' N"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. per_init {i. i < N} = per_init' N
[PROOF STEP]
by (auto simp: per_init_def per_init'_def)


[STATEMENT]
lemma span_tree_split:
  assumes "vector r"
    shows "t \<le> (component g r)\<^sup>T * (component g r) \<sqinter> --g \<longleftrightarrow> (t \<le> (component g r)\<^sup>T \<and> t \<le> component g r \<and> t \<le> --g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (t \<le> component g r\<^sup>T * component g r \<sqinter> - - g) = (t \<le> component g r\<^sup>T \<and> t \<le> component g r \<and> t \<le> - - g)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (t \<le> component g r\<^sup>T * component g r \<sqinter> - - g) = (t \<le> component g r\<^sup>T \<and> t \<le> component g r \<and> t \<le> - - g)
[PROOF STEP]
have "(component g r)\<^sup>T * (component g r) = (component g r)\<^sup>T \<sqinter> component g r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. component g r\<^sup>T * component g r = component g r\<^sup>T \<sqinter> component g r
[PROOF STEP]
by (metis assms conv_involutive covector_mult_closed vector_conv_covector vector_covector)
[PROOF STATE]
proof (state)
this:
component g r\<^sup>T * component g r = component g r\<^sup>T \<sqinter> component g r

goal (1 subgoal):
 1. (t \<le> component g r\<^sup>T * component g r \<sqinter> - - g) = (t \<le> component g r\<^sup>T \<and> t \<le> component g r \<and> t \<le> - - g)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
component g r\<^sup>T * component g r = component g r\<^sup>T \<sqinter> component g r

goal (1 subgoal):
 1. (t \<le> component g r\<^sup>T * component g r \<sqinter> - - g) = (t \<le> component g r\<^sup>T \<and> t \<le> component g r \<and> t \<le> - - g)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(t \<le> component g r\<^sup>T * component g r \<sqinter> - - g) = (t \<le> component g r\<^sup>T \<and> t \<le> component g r \<and> t \<le> - - g)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma unfold_le_opt:
  "o\<^sub>1 \<sqsubseteq>\<^bsub>le r\<^esub> o\<^sub>2 =
  (case o\<^sub>2 of None \<Rightarrow> o\<^sub>1=None |
              Some y \<Rightarrow> (case o\<^sub>1 of None \<Rightarrow> True | Some x \<Rightarrow> x \<sqsubseteq>\<^sub>r y))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (o\<^sub>1 \<sqsubseteq>\<^bsub>Opt.le r\<^esub> o\<^sub>2) = (case o\<^sub>2 of None \<Rightarrow> o\<^sub>1 = None | Some y \<Rightarrow> case o\<^sub>1 of None \<Rightarrow> True | Some x \<Rightarrow> x \<sqsubseteq>\<^bsub>r\<^esub> y)
[PROOF STEP]
(*<*)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (o\<^sub>1 \<sqsubseteq>\<^bsub>Opt.le r\<^esub> o\<^sub>2) = (case o\<^sub>2 of None \<Rightarrow> o\<^sub>1 = None | Some y \<Rightarrow> case o\<^sub>1 of None \<Rightarrow> True | Some x \<Rightarrow> x \<sqsubseteq>\<^bsub>r\<^esub> y)
[PROOF STEP]
apply (unfold lesub_def le_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (case o\<^sub>2 of None \<Rightarrow> o\<^sub>1 = None | Some y \<Rightarrow> case o\<^sub>1 of None \<Rightarrow> True | Some x \<Rightarrow> r x y) = (case o\<^sub>2 of None \<Rightarrow> o\<^sub>1 = None | Some y \<Rightarrow> case o\<^sub>1 of None \<Rightarrow> True | Some x \<Rightarrow> r x y)
[PROOF STEP]
apply (rule refl)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma fix_argument_promote_fun:
  fixes g :: "'a::type \<Rightarrow> 'b::pcpo \<rightarrow> 'b"
  shows "(\<lambda>x. fix\<cdot>(g x)) = (\<mu> f. (\<lambda>x. g x\<cdot>(f x)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. fix\<cdot>(g x)) = (\<mu> x. (\<lambda>xa. g xa\<cdot>(x xa)))
[PROOF STEP]
proof(rule below_antisym)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<lambda>x. fix\<cdot>(g x)) \<sqsubseteq> (\<mu> x. (\<lambda>xa. g xa\<cdot>(x xa)))
 2. (\<mu> x. (\<lambda>xa. g xa\<cdot>(x xa))) \<sqsubseteq> (\<lambda>x. fix\<cdot>(g x))
[PROOF STEP]
have "(\<lambda>x. g x\<cdot>(fix\<cdot>(g x))) = (\<lambda>x. fix\<cdot>(g x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. g x\<cdot>(fix\<cdot>(g x))) = (\<lambda>x. fix\<cdot>(g x))
[PROOF STEP]
by (subst fix_eq) simp
[PROOF STATE]
proof (state)
this:
(\<lambda>x. g x\<cdot>(fix\<cdot>(g x))) = (\<lambda>x. fix\<cdot>(g x))

goal (2 subgoals):
 1. (\<lambda>x. fix\<cdot>(g x)) \<sqsubseteq> (\<mu> x. (\<lambda>xa. g xa\<cdot>(x xa)))
 2. (\<mu> x. (\<lambda>xa. g xa\<cdot>(x xa))) \<sqsubseteq> (\<lambda>x. fix\<cdot>(g x))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x. g x\<cdot>(fix\<cdot>(g x))) = (\<lambda>x. fix\<cdot>(g x))
[PROOF STEP]
show "(\<mu> f. (\<lambda>x. g x\<cdot>(f x))) \<sqsubseteq> (\<lambda>x. fix\<cdot>(g x))"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. g x\<cdot>(fix\<cdot>(g x))) = (\<lambda>x. fix\<cdot>(g x))

goal (1 subgoal):
 1. (\<mu> x. (\<lambda>xa. g xa\<cdot>(x xa))) \<sqsubseteq> (\<lambda>x. fix\<cdot>(g x))
[PROOF STEP]
by (simp add: fix_least cont_fun)
[PROOF STATE]
proof (state)
this:
(\<mu> x. (\<lambda>xa. g xa\<cdot>(x xa))) \<sqsubseteq> (\<lambda>x. fix\<cdot>(g x))

goal (1 subgoal):
 1. (\<lambda>x. fix\<cdot>(g x)) \<sqsubseteq> (\<mu> x. (\<lambda>xa. g xa\<cdot>(x xa)))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>x. fix\<cdot>(g x)) \<sqsubseteq> (\<mu> x. (\<lambda>xa. g xa\<cdot>(x xa)))
[PROOF STEP]
show "(\<lambda>x. fix\<cdot>(g x)) \<sqsubseteq> (\<mu> f. (\<lambda>x. g x\<cdot>(f x)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. fix\<cdot>(g x)) \<sqsubseteq> (\<mu> x. (\<lambda>xa. g xa\<cdot>(x xa)))
[PROOF STEP]
proof(rule fun_belowI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. fix\<cdot>(g x) \<sqsubseteq> (\<mu> x. (\<lambda>xa. g xa\<cdot>(x xa))) x
[PROOF STEP]
fix y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. fix\<cdot>(g x) \<sqsubseteq> (\<mu> x. (\<lambda>xa. g xa\<cdot>(x xa))) x
[PROOF STEP]
have "g y\<cdot>((\<mu> f. (\<lambda>x. g x\<cdot>(f x))) y) = (\<mu> f. (\<lambda>x. g x\<cdot>(f x))) y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g y\<cdot>((\<mu> x. (\<lambda>xa. g xa\<cdot>(x xa))) y) = (\<mu> x. (\<lambda>xa. g xa\<cdot>(x xa))) y
[PROOF STEP]
by (subst fix_eq, simp add: cont_fun)
[PROOF STATE]
proof (state)
this:
g y\<cdot>((\<mu> x. (\<lambda>xa. g xa\<cdot>(x xa))) y) = (\<mu> x. (\<lambda>xa. g xa\<cdot>(x xa))) y

goal (1 subgoal):
 1. \<And>x. fix\<cdot>(g x) \<sqsubseteq> (\<mu> x. (\<lambda>xa. g xa\<cdot>(x xa))) x
[PROOF STEP]
thus "fix\<cdot>(g y) \<sqsubseteq> (\<mu> f. (\<lambda>x. g x\<cdot>(f x))) y"
[PROOF STATE]
proof (prove)
using this:
g y\<cdot>((\<mu> x. (\<lambda>xa. g xa\<cdot>(x xa))) y) = (\<mu> x. (\<lambda>xa. g xa\<cdot>(x xa))) y

goal (1 subgoal):
 1. fix\<cdot>(g y) \<sqsubseteq> (\<mu> x. (\<lambda>xa. g xa\<cdot>(x xa))) y
[PROOF STEP]
by (simp add: fix_least)
[PROOF STATE]
proof (state)
this:
fix\<cdot>(g y) \<sqsubseteq> (\<mu> x. (\<lambda>xa. g xa\<cdot>(x xa))) y

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>x. fix\<cdot>(g x)) \<sqsubseteq> (\<mu> x. (\<lambda>xa. g xa\<cdot>(x xa)))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma nat_mirror_le: "a \<le> b \<Longrightarrow> nat_mirror b l r \<le> nat_mirror a l r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<le> b \<Longrightarrow> nat_mirror b l r \<le> nat_mirror a l r
[PROOF STEP]
unfolding nat_mirror_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<le> b \<Longrightarrow> l + r - b \<le> l + r - a
[PROOF STEP]
by simp


[STATEMENT]
lemma Gen_Shleg_1 [simp]: "k < n \<Longrightarrow> Gen_Shleg k 1 = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k < n \<Longrightarrow> local.Gen_Shleg k 1 = 0
[PROOF STEP]
by (simp add: Gen_Shleg_altdef zero_power)


[STATEMENT]
lemma openin_INT [intro]:
  assumes "finite I"
          "\<And>i. i \<in> I \<Longrightarrow> openin T (U i)"
  shows "openin T ((\<Inter>i \<in> I. U i) \<inter> topspace T)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. openin T (\<Inter> (U ` I) \<inter> topspace T)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite I
?i \<in> I \<Longrightarrow> openin T (U ?i)

goal (1 subgoal):
 1. openin T (\<Inter> (U ` I) \<inter> topspace T)
[PROOF STEP]
by (induct, auto simp: inf_sup_aci(2) openin_Int)