[STATEMENT]
lemma fps_mult_nth_eq0:
  fixes f g :: "'a::{comm_monoid_add,mult_zero} fps"
  assumes "n < subdegree f + subdegree g"
  shows   "(f*g) $ n = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f * g) $ n = (0::'a)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (f * g) $ n = (0::'a)
[PROOF STEP]
have "\<And>i. i\<in>{0..n} \<Longrightarrow> f$i * g$(n - i) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. i \<in> {0..n} \<Longrightarrow> f $ i * g $ (n - i) = (0::'a)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. i \<in> {0..n} \<Longrightarrow> f $ i * g $ (n - i) = (0::'a)
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. i \<in> {0..n} \<Longrightarrow> f $ i * g $ (n - i) = (0::'a)
[PROOF STEP]
assume i: "i\<in>{0..n}"
[PROOF STATE]
proof (state)
this:
i \<in> {0..n}

goal (1 subgoal):
 1. \<And>i. i \<in> {0..n} \<Longrightarrow> f $ i * g $ (n - i) = (0::'a)
[PROOF STEP]
show "f$i * g$(n - i) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f $ i * g $ (n - i) = (0::'a)
[PROOF STEP]
proof (cases "i < subdegree f \<or> n - i < subdegree g")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. i < subdegree f \<or> n - i < subdegree g \<Longrightarrow> f $ i * g $ (n - i) = (0::'a)
 2. \<not> (i < subdegree f \<or> n - i < subdegree g) \<Longrightarrow> f $ i * g $ (n - i) = (0::'a)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> (i < subdegree f \<or> n - i < subdegree g)

goal (2 subgoals):
 1. i < subdegree f \<or> n - i < subdegree g \<Longrightarrow> f $ i * g $ (n - i) = (0::'a)
 2. \<not> (i < subdegree f \<or> n - i < subdegree g) \<Longrightarrow> f $ i * g $ (n - i) = (0::'a)
[PROOF STEP]
with assms i
[PROOF STATE]
proof (chain)
picking this:
n < subdegree f + subdegree g
i \<in> {0..n}
\<not> (i < subdegree f \<or> n - i < subdegree g)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
n < subdegree f + subdegree g
i \<in> {0..n}
\<not> (i < subdegree f \<or> n - i < subdegree g)

goal (1 subgoal):
 1. f $ i * g $ (n - i) = (0::'a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f $ i * g $ (n - i) = (0::'a)

goal (1 subgoal):
 1. i < subdegree f \<or> n - i < subdegree g \<Longrightarrow> f $ i * g $ (n - i) = (0::'a)
[PROOF STEP]
qed (auto simp: nth_less_subdegree_zero)
[PROOF STATE]
proof (state)
this:
f $ i * g $ (n - i) = (0::'a)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?i \<in> {0..n} \<Longrightarrow> f $ ?i * g $ (n - ?i) = (0::'a)

goal (1 subgoal):
 1. (f * g) $ n = (0::'a)
[PROOF STEP]
thus "(f * g) $ n = 0"
[PROOF STATE]
proof (prove)
using this:
?i \<in> {0..n} \<Longrightarrow> f $ ?i * g $ (n - ?i) = (0::'a)

goal (1 subgoal):
 1. (f * g) $ n = (0::'a)
[PROOF STEP]
by (simp add: fps_mult_nth)
[PROOF STATE]
proof (state)
this:
(f * g) $ n = (0::'a)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma X_not_zero:
  assumes "\<one> \<noteq>\<zero>"
  shows"X \<noteq> \<zero>\<^bsub>P\<^esub>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X_poly R \<noteq> \<zero>\<^bsub>P\<^esub>
[PROOF STEP]
using degree_X assms
[PROOF STATE]
proof (prove)
using this:
\<one> \<noteq> \<zero> \<Longrightarrow> deg R (X_poly R) = 1
\<one> \<noteq> \<zero>

goal (1 subgoal):
 1. X_poly R \<noteq> \<zero>\<^bsub>P\<^esub>
[PROOF STEP]
by force


[STATEMENT]
lemma sphere_translation_subtract:
  "sphere (c - a) r = (\<lambda>x. x - a) ` sphere c r" for a :: "'n::real_normed_vector"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sphere (c - a) r = (\<lambda>x. x - a) ` sphere c r
[PROOF STEP]
using sphere_translation [of "- a" c]
[PROOF STATE]
proof (prove)
using this:
sphere (- a + c) ?r = (+) (- a) ` sphere c ?r

goal (1 subgoal):
 1. sphere (c - a) r = (\<lambda>x. x - a) ` sphere c r
[PROOF STEP]
by (simp cong: image_cong_simp)


[STATEMENT]
lemma app_vrrestriction_def: "r \<restriction>\<^sup>r\<^sub>\<circ> A = set {\<langle>a, b\<rangle> | a b. b \<in>\<^sub>\<circ> A \<and> \<langle>a, b\<rangle> \<in>\<^sub>\<circ> r}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. r \<restriction>\<^sup>r\<^sub>\<circ> A = set {\<langle>a, b\<rangle> |a b. b \<in>\<^sub>\<circ> A \<and> \<langle>a, b\<rangle> \<in>\<^sub>\<circ> r}
[PROOF STEP]
unfolding vrrestriction_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>\<langle>r, A\<rangle>\<in>\<^sub>\<circ>set {\<langle>r, A\<rangle>}. set {\<langle>a, b\<rangle> |a b. b \<in>\<^sub>\<circ> A \<and> \<langle>a, b\<rangle> \<in>\<^sub>\<circ> r})\<lparr>\<langle>r, A\<rangle>\<rparr> = set {\<langle>a, b\<rangle> |a b. b \<in>\<^sub>\<circ> A \<and> \<langle>a, b\<rangle> \<in>\<^sub>\<circ> r}
[PROOF STEP]
by simp


[STATEMENT]
lemma "\<forall>(x::int) y. x < y \<longrightarrow> 2 * x + 1 < 2 * y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x y. x < y \<longrightarrow> 2 * x + 1 < 2 * y
[PROOF STEP]
by cooper


[STATEMENT]
lemma "(3::real) * x + 7 * a < 4 \<and> 3 < 2 * x \<Longrightarrow> a < 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 3 * x + 7 * a < 4 \<and> 3 < 2 * x \<Longrightarrow> a < 0
[PROOF STEP]
by (sos "((R<1 + (((A<1 * R<1) * (R<2 * [1]^2)) + (((A<0 * R<1) * (R<3 * [1]^2)) + ((A<=0 * R<1) * (R<14 * [1]^2))))))")


[STATEMENT]
lemma Max_wrt_among_of_weak_ranking_Cons:
  "Max_wrt_among (of_weak_ranking (x#xs)) A =
     (if x \<inter> A = {} then Max_wrt_among (of_weak_ranking xs) A else x \<inter> A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Max_wrt_among (of_weak_ranking (x # xs)) A = (if x \<inter> A = {} then Max_wrt_among (of_weak_ranking xs) A else x \<inter> A)
[PROOF STEP]
using Max_wrt_among_of_weak_ranking_Cons1 Max_wrt_among_of_weak_ranking_Cons2
[PROOF STATE]
proof (prove)
using this:
x \<inter> ?A = {} \<Longrightarrow> Max_wrt_among (of_weak_ranking (x # xs)) ?A = Max_wrt_among (of_weak_ranking xs) ?A
x \<inter> ?A \<noteq> {} \<Longrightarrow> Max_wrt_among (of_weak_ranking (x # xs)) ?A = x \<inter> ?A

goal (1 subgoal):
 1. Max_wrt_among (of_weak_ranking (x # xs)) A = (if x \<inter> A = {} then Max_wrt_among (of_weak_ranking xs) A else x \<inter> A)
[PROOF STEP]
by simp


[STATEMENT]
lemma gcd_mod_right [simp]:
  "a \<noteq> 0 \<Longrightarrow> gcd a (b mod a) = gcd a b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<noteq> (0::'a) \<Longrightarrow> gcd a (b mod a) = gcd a b
[PROOF STEP]
unfolding gcd.commute [of a b]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<noteq> (0::'a) \<Longrightarrow> gcd a (b mod a) = gcd b a
[PROOF STEP]
by (simp add: gcd_eucl [symmetric] local.gcd_mod)


[STATEMENT]
lemma filter_mset_cong[fundef_cong]:
  assumes "M = M'" "\<And>a. a \<in># M \<Longrightarrow> P a = Q a"
  shows "filter_mset P M = filter_mset Q M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. filter_mset P M = filter_mset Q M
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. filter_mset P M = filter_mset Q M
[PROOF STEP]
have "M - filter_mset Q M = filter_mset (\<lambda>a. \<not>Q a) M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M - filter_mset Q M = {#a \<in># M. \<not> Q a#}
[PROOF STEP]
by (metis multiset_partition add_diff_cancel_left')
[PROOF STATE]
proof (state)
this:
M - filter_mset Q M = {#a \<in># M. \<not> Q a#}

goal (1 subgoal):
 1. filter_mset P M = filter_mset Q M
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
M - filter_mset Q M = {#a \<in># M. \<not> Q a#}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
M - filter_mset Q M = {#a \<in># M. \<not> Q a#}

goal (1 subgoal):
 1. filter_mset P M = filter_mset Q M
[PROOF STEP]
by (auto simp: filter_mset_eq_conv assms)
[PROOF STATE]
proof (state)
this:
filter_mset P M = filter_mset Q M

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma is_unit_pCons_ex_iff:
  fixes p::"'a::field poly"
  shows "is_unit p \<longleftrightarrow> (\<exists>a. a\<noteq>0 \<and> p=[:a:])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_unit p = (\<exists>a. a \<noteq> (0::'a) \<and> p = [:a:])
[PROOF STEP]
using is_unit_poly_iff is_unit_triv
[PROOF STATE]
proof (prove)
using this:
(?p dvd 1) = (\<exists>c. ?p = [:c:] \<and> c dvd (1::?'a))
?a \<noteq> (0::?'a) \<Longrightarrow> is_unit [:?a:]

goal (1 subgoal):
 1. is_unit p = (\<exists>a. a \<noteq> (0::'a) \<and> p = [:a:])
[PROOF STEP]
by (metis is_unit_pCons_iff)


[STATEMENT]
lemma wf_tuple_Suc_fvi_SomeI: "0 \<in> Formula.fvi b \<phi> \<Longrightarrow> wf_tuple n (Formula.fvi (Suc b) \<phi>) v \<Longrightarrow>
  wf_tuple (Suc n) (Formula.fvi b \<phi>) (Some x # v)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 \<in> Formula.fvi b \<phi>; wf_tuple n (Formula.fvi (Suc b) \<phi>) v\<rbrakk> \<Longrightarrow> wf_tuple (Suc n) (Formula.fvi b \<phi>) (Some x # v)
[PROOF STEP]
unfolding wf_tuple_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 \<in> Formula.fvi b \<phi>; length v = n \<and> (\<forall>i<n. (v ! i = None) = (i \<notin> Formula.fvi (Suc b) \<phi>))\<rbrakk> \<Longrightarrow> length (Some x # v) = Suc n \<and> (\<forall>i<Suc n. ((Some x # v) ! i = None) = (i \<notin> Formula.fvi b \<phi>))
[PROOF STEP]
by (auto simp: fvi_Suc less_Suc_eq_0_disj)


[STATEMENT]
lemma delta_min_mono: "set as \<subseteq> set bs \<Longrightarrow> \<delta>_min bs \<le> \<delta>_min as"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set as \<subseteq> set bs \<Longrightarrow> \<delta>_min bs \<le> \<delta>_min as
[PROOF STEP]
proof (induct as)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. set [] \<subseteq> set bs \<Longrightarrow> \<delta>_min bs \<le> \<delta>_min []
 2. \<And>a as. \<lbrakk>set as \<subseteq> set bs \<Longrightarrow> \<delta>_min bs \<le> \<delta>_min as; set (a # as) \<subseteq> set bs\<rbrakk> \<Longrightarrow> \<delta>_min bs \<le> \<delta>_min (a # as)
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:
set [] \<subseteq> set bs

goal (2 subgoals):
 1. set [] \<subseteq> set bs \<Longrightarrow> \<delta>_min bs \<le> \<delta>_min []
 2. \<And>a as. \<lbrakk>set as \<subseteq> set bs \<Longrightarrow> \<delta>_min bs \<le> \<delta>_min as; set (a # as) \<subseteq> set bs\<rbrakk> \<Longrightarrow> \<delta>_min bs \<le> \<delta>_min (a # as)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
set [] \<subseteq> set bs
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
set [] \<subseteq> set bs

goal (1 subgoal):
 1. \<delta>_min bs \<le> \<delta>_min []
[PROOF STEP]
using delta_le_one
[PROOF STATE]
proof (prove)
using this:
set [] \<subseteq> set bs
\<delta>_min ?l \<le> 1

goal (1 subgoal):
 1. \<delta>_min bs \<le> \<delta>_min []
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<delta>_min bs \<le> \<delta>_min []

goal (1 subgoal):
 1. \<And>a as. \<lbrakk>set as \<subseteq> set bs \<Longrightarrow> \<delta>_min bs \<le> \<delta>_min as; set (a # as) \<subseteq> set bs\<rbrakk> \<Longrightarrow> \<delta>_min bs \<le> \<delta>_min (a # as)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a as. \<lbrakk>set as \<subseteq> set bs \<Longrightarrow> \<delta>_min bs \<le> \<delta>_min as; set (a # as) \<subseteq> set bs\<rbrakk> \<Longrightarrow> \<delta>_min bs \<le> \<delta>_min (a # as)
[PROOF STEP]
case (Cons a as)
[PROOF STATE]
proof (state)
this:
set as \<subseteq> set bs \<Longrightarrow> \<delta>_min bs \<le> \<delta>_min as
set (a # as) \<subseteq> set bs

goal (1 subgoal):
 1. \<And>a as. \<lbrakk>set as \<subseteq> set bs \<Longrightarrow> \<delta>_min bs \<le> \<delta>_min as; set (a # as) \<subseteq> set bs\<rbrakk> \<Longrightarrow> \<delta>_min bs \<le> \<delta>_min (a # as)
[PROOF STEP]
from Cons(2)
[PROOF STATE]
proof (chain)
picking this:
set (a # as) \<subseteq> set bs
[PROOF STEP]
have "a \<in> set bs"
[PROOF STATE]
proof (prove)
using this:
set (a # as) \<subseteq> set bs

goal (1 subgoal):
 1. a \<in> set bs
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a \<in> set bs

goal (1 subgoal):
 1. \<And>a as. \<lbrakk>set as \<subseteq> set bs \<Longrightarrow> \<delta>_min bs \<le> \<delta>_min as; set (a # as) \<subseteq> set bs\<rbrakk> \<Longrightarrow> \<delta>_min bs \<le> \<delta>_min (a # as)
[PROOF STEP]
from split_list[OF this]
[PROOF STATE]
proof (chain)
picking this:
\<exists>ys zs. bs = ys @ a # zs
[PROOF STEP]
obtain bs1 bs2 where bs: "bs = bs1 @ [a] @ bs2"
[PROOF STATE]
proof (prove)
using this:
\<exists>ys zs. bs = ys @ a # zs

goal (1 subgoal):
 1. (\<And>bs1 bs2. bs = bs1 @ [a] @ bs2 \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
bs = bs1 @ [a] @ bs2

goal (1 subgoal):
 1. \<And>a as. \<lbrakk>set as \<subseteq> set bs \<Longrightarrow> \<delta>_min bs \<le> \<delta>_min as; set (a # as) \<subseteq> set bs\<rbrakk> \<Longrightarrow> \<delta>_min bs \<le> \<delta>_min (a # as)
[PROOF STEP]
have bs: "\<delta>_min bs = \<delta>_min ([a] @ bs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<delta>_min bs = \<delta>_min ([a] @ bs)
[PROOF STEP]
unfolding bs delta_min_append
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. min (\<delta>_min bs1) (min (\<delta>_min [a]) (\<delta>_min bs2)) = min (\<delta>_min [a]) (min (\<delta>_min bs1) (min (\<delta>_min [a]) (\<delta>_min bs2)))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<delta>_min bs = \<delta>_min ([a] @ bs)

goal (1 subgoal):
 1. \<And>a as. \<lbrakk>set as \<subseteq> set bs \<Longrightarrow> \<delta>_min bs \<le> \<delta>_min as; set (a # as) \<subseteq> set bs\<rbrakk> \<Longrightarrow> \<delta>_min bs \<le> \<delta>_min (a # as)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<delta>_min bs \<le> \<delta>_min (a # as)
[PROOF STEP]
unfolding bs
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<delta>_min ([a] @ bs) \<le> \<delta>_min (a # as)
[PROOF STEP]
using Cons(1-2)
[PROOF STATE]
proof (prove)
using this:
set as \<subseteq> set bs \<Longrightarrow> \<delta>_min bs \<le> \<delta>_min as
set (a # as) \<subseteq> set bs

goal (1 subgoal):
 1. \<delta>_min ([a] @ bs) \<le> \<delta>_min (a # as)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<delta>_min bs \<le> \<delta>_min (a # as)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma moebius_dilatation_uminus [simp]:
  assumes "a > 0"
  shows "- (moebius_dilatation a) = moebius_dilatation (1/a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - moebius_dilatation a = moebius_dilatation (1 / a)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 < a

goal (1 subgoal):
 1. - moebius_dilatation a = moebius_dilatation (1 / a)
[PROOF STEP]
by simp


[STATEMENT]
lemma nc_nc_par [simp]: "nc \<parallel> nc = nc"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nc \<parallel> nc = nc
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. nc \<parallel> nc = nc
[PROOF STEP]
have "nc \<parallel> nc = (nc \<parallel> nc \<sqinter> nc)  + (nc \<parallel> nc) \<cdot> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nc \<parallel> nc = nc \<parallel> nc \<sqinter> nc + nc \<parallel> nc \<cdot> (0::'a)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
nc \<parallel> nc = nc \<parallel> nc \<sqinter> nc + nc \<parallel> nc \<cdot> (0::'a)

goal (1 subgoal):
 1. nc \<parallel> nc = nc
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
nc \<parallel> nc = nc \<parallel> nc \<sqinter> nc + nc \<parallel> nc \<cdot> (0::'a)

goal (1 subgoal):
 1. nc \<parallel> nc = nc
[PROOF STEP]
have "... = nc  + (nc \<cdot> 0) \<parallel> (nc \<cdot> 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nc \<parallel> nc \<sqinter> nc + nc \<parallel> nc \<cdot> (0::'a) = nc + nc \<cdot> (0::'a) \<parallel> (nc \<cdot> (0::'a))
[PROOF STEP]
by (metis local.meet_comm local.inf.absorb_iff1 subidem_par x_zero_interr)
[PROOF STATE]
proof (state)
this:
nc \<parallel> nc \<sqinter> nc + nc \<parallel> nc \<cdot> (0::'a) = nc + nc \<cdot> (0::'a) \<parallel> (nc \<cdot> (0::'a))

goal (1 subgoal):
 1. nc \<parallel> nc = nc
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
nc \<parallel> nc \<sqinter> nc + nc \<parallel> nc \<cdot> (0::'a) = nc + nc \<cdot> (0::'a) \<parallel> (nc \<cdot> (0::'a))

goal (1 subgoal):
 1. nc \<parallel> nc = nc
[PROOF STEP]
have "... = nc + 0 \<parallel> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nc + nc \<cdot> (0::'a) \<parallel> (nc \<cdot> (0::'a)) = nc + (0::'a) \<parallel> (0::'a)
[PROOF STEP]
by (metis local.absorp1 local.meet_comm nc_zero)
[PROOF STATE]
proof (state)
this:
nc + nc \<cdot> (0::'a) \<parallel> (nc \<cdot> (0::'a)) = nc + (0::'a) \<parallel> (0::'a)

goal (1 subgoal):
 1. nc \<parallel> nc = nc
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
nc \<parallel> nc = nc + (0::'a) \<parallel> (0::'a)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
nc \<parallel> nc = nc + (0::'a) \<parallel> (0::'a)

goal (1 subgoal):
 1. nc \<parallel> nc = nc
[PROOF STEP]
by (metis add_commute local.add_zerol local.annil)
[PROOF STATE]
proof (state)
this:
nc \<parallel> nc = nc

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma index_of_const_is_pr: "index_of_const \<in> PrimRec1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. index_of_const \<in> PrimRec1
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. index_of_const \<in> PrimRec1
[PROOF STEP]
have "(\<lambda> x y. c_pair (4::nat) (c_pair (2::nat) y)) \<in> PrimRec2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x y. c_pair 4 (c_pair 2 y)) \<in> PrimRec2
[PROOF STEP]
by (insert const_is_pr_2 [where ?n="(4::nat)"], prec)
[PROOF STATE]
proof (state)
this:
(\<lambda>x y. c_pair 4 (c_pair 2 y)) \<in> PrimRec2

goal (1 subgoal):
 1. index_of_const \<in> PrimRec1
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x y. c_pair 4 (c_pair 2 y)) \<in> PrimRec2
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x y. c_pair 4 (c_pair 2 y)) \<in> PrimRec2

goal (1 subgoal):
 1. index_of_const \<in> PrimRec1
[PROOF STEP]
by (simp add: index_of_const_def pr_rec1)
[PROOF STATE]
proof (state)
this:
index_of_const \<in> PrimRec1

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma DERIV_Si: "(Si has_real_derivative sinc x) (at x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Si has_real_derivative sinc x) (at x)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (Si has_real_derivative sinc x) (at x)
[PROOF STEP]
have "(at x within {min 0 (x - 1)..max 0 (x + 1)}) = at x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. at x within {min 0 (x - 1)..max 0 (x + 1)} = at x
[PROOF STEP]
by (intro at_within_interior) auto
[PROOF STATE]
proof (state)
this:
at x within {min 0 (x - 1)..max 0 (x + 1)} = at x

goal (1 subgoal):
 1. (Si has_real_derivative sinc x) (at x)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
at x within {min 0 (x - 1)..max 0 (x + 1)} = at x

goal (1 subgoal):
 1. (Si has_real_derivative sinc x) (at x)
[PROOF STEP]
have "min 0 (x - 1) \<le> x" "x \<le> max 0 (x + 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. min 0 (x - 1) \<le> x &&& x \<le> max 0 (x + 1)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
min 0 (x - 1) \<le> x
x \<le> max 0 (x + 1)

goal (1 subgoal):
 1. (Si has_real_derivative sinc x) (at x)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
at x within {min 0 (x - 1)..max 0 (x + 1)} = at x
min 0 (x - 1) \<le> x
x \<le> max 0 (x + 1)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
at x within {min 0 (x - 1)..max 0 (x + 1)} = at x
min 0 (x - 1) \<le> x
x \<le> max 0 (x + 1)

goal (1 subgoal):
 1. (Si has_real_derivative sinc x) (at x)
[PROOF STEP]
using interval_integral_FTC2[of "min 0 (x - 1)" 0 "max 0 (x + 1)" sinc x]
[PROOF STATE]
proof (prove)
using this:
at x within {min 0 (x - 1)..max 0 (x + 1)} = at x
min 0 (x - 1) \<le> x
x \<le> max 0 (x + 1)
\<lbrakk>min 0 (x - 1) \<le> 0; 0 \<le> max 0 (x + 1); continuous_on {min 0 (x - 1)..max 0 (x + 1)} sinc; min 0 (x - 1) \<le> x; x \<le> max 0 (x + 1)\<rbrakk> \<Longrightarrow> ((\<lambda>x. interval_lebesgue_integral lborel (ereal 0) (ereal x) sinc) has_vector_derivative sinc x) (at x within {min 0 (x - 1)..max 0 (x + 1)})

goal (1 subgoal):
 1. (Si has_real_derivative sinc x) (at x)
[PROOF STEP]
by (auto simp: continuous_at_imp_continuous_on isCont_sinc Si_alt_def[abs_def] zero_ereal_def
                   has_real_derivative_iff_has_vector_derivative
             split del: if_split)
[PROOF STATE]
proof (state)
this:
(Si has_real_derivative sinc x) (at x)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fSup_distr_var: "\<Squnion>F \<circ> g = (\<Squnion>f \<in> F. f \<circ> g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Squnion> F \<circ> g = (\<Squnion>f\<in>F. f \<circ> g)
[PROOF STEP]
unfolding fun_eq_iff
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x. (\<Squnion> F \<circ> g) x = (\<Squnion>f\<in>F. f \<circ> g) x
[PROOF STEP]
by (simp add: image_comp)


[STATEMENT]
lemma subcocycle_lim_add:
  assumes "subcocycle u" "subcocycle v" "subcocycle_avg_ereal u > -\<infinity>" "subcocycle_avg_ereal v > -\<infinity>"
  shows "subcocycle_avg_ereal (\<lambda>n x. u n x + v n x) > - \<infinity>"
        "AE x in M. subcocycle_lim (\<lambda>n x. u n x + v n x) x = subcocycle_lim u x + subcocycle_lim v x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - \<infinity> < subcocycle_avg_ereal (\<lambda>n x. u n x + v n x) &&& AE x in M. subcocycle_lim (\<lambda>n x. u n x + v n x) x = subcocycle_lim u x + subcocycle_lim v x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. - \<infinity> < subcocycle_avg_ereal (\<lambda>n x. u n x + v n x)
 2. AE x in M. subcocycle_lim (\<lambda>n x. u n x + v n x) x = subcocycle_lim u x + subcocycle_lim v x
[PROOF STEP]
show *: "subcocycle_avg_ereal (\<lambda>n x. u n x + v n x) > - \<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - \<infinity> < subcocycle_avg_ereal (\<lambda>n x. u n x + v n x)
[PROOF STEP]
using subcocycle_avg_add[OF assms(1) assms(2)] assms(3) assms(4)
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>- \<infinity> < subcocycle_avg_ereal u; - \<infinity> < subcocycle_avg_ereal v\<rbrakk> \<Longrightarrow> - \<infinity> < subcocycle_avg_ereal (\<lambda>n x. u n x + v n x)
\<lbrakk>- \<infinity> < subcocycle_avg_ereal u; - \<infinity> < subcocycle_avg_ereal v\<rbrakk> \<Longrightarrow> subcocycle_avg (\<lambda>n x. u n x + v n x) = subcocycle_avg u + subcocycle_avg v
- \<infinity> < subcocycle_avg_ereal u
- \<infinity> < subcocycle_avg_ereal v

goal (1 subgoal):
 1. - \<infinity> < subcocycle_avg_ereal (\<lambda>n x. u n x + v n x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
- \<infinity> < subcocycle_avg_ereal (\<lambda>n x. u n x + v n x)

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. u n x + v n x) x = subcocycle_lim u x + subcocycle_lim v x
[PROOF STEP]
have "AE x in M. (\<lambda>n. (u n x + v n x)/n) \<longlonglongrightarrow> subcocycle_lim (\<lambda>n x. u n x + v n x) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. AE x in M. (\<lambda>n. (u n x + v n x) / real n) \<longlonglongrightarrow> subcocycle_lim (\<lambda>n x. u n x + v n x) x
[PROOF STEP]
by (rule kingman_theorem_nonergodic(1)[OF subcocycle_add[OF assms(1) assms(2)] *])
[PROOF STATE]
proof (state)
this:
AE x in M. (\<lambda>n. (u n x + v n x) / real n) \<longlonglongrightarrow> subcocycle_lim (\<lambda>n x. u n x + v n x) x

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. u n x + v n x) x = subcocycle_lim u x + subcocycle_lim v x
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
AE x in M. (\<lambda>n. (u n x + v n x) / real n) \<longlonglongrightarrow> subcocycle_lim (\<lambda>n x. u n x + v n x) x

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. u n x + v n x) x = subcocycle_lim u x + subcocycle_lim v x
[PROOF STEP]
have "AE x in M. (\<lambda>n. u n x / n) \<longlonglongrightarrow> subcocycle_lim u x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. AE x in M. (\<lambda>n. u n x / real n) \<longlonglongrightarrow> subcocycle_lim u x
[PROOF STEP]
by (rule kingman_theorem_nonergodic[OF assms(1) assms(3)])
[PROOF STATE]
proof (state)
this:
AE x in M. (\<lambda>n. u n x / real n) \<longlonglongrightarrow> subcocycle_lim u x

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. u n x + v n x) x = subcocycle_lim u x + subcocycle_lim v x
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
AE x in M. (\<lambda>n. u n x / real n) \<longlonglongrightarrow> subcocycle_lim u x

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. u n x + v n x) x = subcocycle_lim u x + subcocycle_lim v x
[PROOF STEP]
have "AE x in M. (\<lambda>n. v n x / n) \<longlonglongrightarrow> subcocycle_lim v x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. AE x in M. (\<lambda>n. v n x / real n) \<longlonglongrightarrow> subcocycle_lim v x
[PROOF STEP]
by (rule kingman_theorem_nonergodic[OF assms(2) assms(4)])
[PROOF STATE]
proof (state)
this:
AE x in M. (\<lambda>n. v n x / real n) \<longlonglongrightarrow> subcocycle_lim v x

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. u n x + v n x) x = subcocycle_lim u x + subcocycle_lim v x
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
AE x in M. (\<lambda>n. v n x / real n) \<longlonglongrightarrow> subcocycle_lim v x

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. u n x + v n x) x = subcocycle_lim u x + subcocycle_lim v x
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
AE x in M. (\<lambda>n. v n x / real n) \<longlonglongrightarrow> subcocycle_lim v x

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. u n x + v n x) x = subcocycle_lim u x + subcocycle_lim v x
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. u n x + v n x) x = subcocycle_lim u x + subcocycle_lim v x
[PROOF STEP]
assume H: "(\<lambda>n. (u n x + v n x)/n) \<longlonglongrightarrow> subcocycle_lim (\<lambda>n x. u n x + v n x) x"
                    "(\<lambda>n. u n x / n) \<longlonglongrightarrow> subcocycle_lim u x"
                    "(\<lambda>n. v n x / n) \<longlonglongrightarrow> subcocycle_lim v x"
[PROOF STATE]
proof (state)
this:
(\<lambda>n. (u n x + v n x) / real n) \<longlonglongrightarrow> subcocycle_lim (\<lambda>n x. u n x + v n x) x
(\<lambda>n. u n x / real n) \<longlonglongrightarrow> subcocycle_lim u x
(\<lambda>n. v n x / real n) \<longlonglongrightarrow> subcocycle_lim v x

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. u n x + v n x) x = subcocycle_lim u x + subcocycle_lim v x
[PROOF STEP]
have *: "(u n x + v n x)/n = (u n x / n) + (v n x / n)" for n
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (u n x + v n x) / real n = u n x / real n + v n x / real n
[PROOF STEP]
by (simp add: add_divide_distrib)
[PROOF STATE]
proof (state)
this:
(u ?n3 x + v ?n3 x) / real ?n3 = u ?n3 x / real ?n3 + v ?n3 x / real ?n3

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. u n x + v n x) x = subcocycle_lim u x + subcocycle_lim v x
[PROOF STEP]
have "(\<lambda>n. (u n x + v n x)/n) \<longlonglongrightarrow> subcocycle_lim u x + subcocycle_lim v x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. (u n x + v n x) / real n) \<longlonglongrightarrow> subcocycle_lim u x + subcocycle_lim v x
[PROOF STEP]
unfolding *
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. u n x / real n + v n x / real n) \<longlonglongrightarrow> subcocycle_lim u x + subcocycle_lim v x
[PROOF STEP]
by (intro tendsto_intros H)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. (u n x + v n x) / real n) \<longlonglongrightarrow> subcocycle_lim u x + subcocycle_lim v x

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. u n x + v n x) x = subcocycle_lim u x + subcocycle_lim v x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. (u n x + v n x) / real n) \<longlonglongrightarrow> subcocycle_lim u x + subcocycle_lim v x
[PROOF STEP]
have "subcocycle_lim (\<lambda>n x. u n x + v n x) x = subcocycle_lim u x + subcocycle_lim v x"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. (u n x + v n x) / real n) \<longlonglongrightarrow> subcocycle_lim u x + subcocycle_lim v x

goal (1 subgoal):
 1. subcocycle_lim (\<lambda>n x. u n x + v n x) x = subcocycle_lim u x + subcocycle_lim v x
[PROOF STEP]
using H(1)
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. (u n x + v n x) / real n) \<longlonglongrightarrow> subcocycle_lim u x + subcocycle_lim v x
(\<lambda>n. (u n x + v n x) / real n) \<longlonglongrightarrow> subcocycle_lim (\<lambda>n x. u n x + v n x) x

goal (1 subgoal):
 1. subcocycle_lim (\<lambda>n x. u n x + v n x) x = subcocycle_lim u x + subcocycle_lim v x
[PROOF STEP]
by (simp add: LIMSEQ_unique)
[PROOF STATE]
proof (state)
this:
subcocycle_lim (\<lambda>n x. u n x + v n x) x = subcocycle_lim u x + subcocycle_lim v x

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. u n x + v n x) x = subcocycle_lim u x + subcocycle_lim v x
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<lbrakk>(\<lambda>n. (u n ?x5 + v n ?x5) / real n) \<longlonglongrightarrow> subcocycle_lim (\<lambda>n x. u n x + v n x) ?x5; (\<lambda>n. u n ?x5 / real n) \<longlonglongrightarrow> subcocycle_lim u ?x5; (\<lambda>n. v n ?x5 / real n) \<longlonglongrightarrow> subcocycle_lim v ?x5\<rbrakk> \<Longrightarrow> subcocycle_lim (\<lambda>n x. u n x + v n x) ?x5 = subcocycle_lim u ?x5 + subcocycle_lim v ?x5

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. u n x + v n x) x = subcocycle_lim u x + subcocycle_lim v x
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
AE x in M. (\<lambda>n. (u n x + v n x) / real n) \<longlonglongrightarrow> subcocycle_lim (\<lambda>n x. u n x + v n x) x
AE x in M. (\<lambda>n. u n x / real n) \<longlonglongrightarrow> subcocycle_lim u x
AE x in M. (\<lambda>n. v n x / real n) \<longlonglongrightarrow> subcocycle_lim v x
\<lbrakk>(\<lambda>n. (u n ?x5 + v n ?x5) / real n) \<longlonglongrightarrow> subcocycle_lim (\<lambda>n x. u n x + v n x) ?x5; (\<lambda>n. u n ?x5 / real n) \<longlonglongrightarrow> subcocycle_lim u ?x5; (\<lambda>n. v n ?x5 / real n) \<longlonglongrightarrow> subcocycle_lim v ?x5\<rbrakk> \<Longrightarrow> subcocycle_lim (\<lambda>n x. u n x + v n x) ?x5 = subcocycle_lim u ?x5 + subcocycle_lim v ?x5
[PROOF STEP]
show "AE x in M. subcocycle_lim (\<lambda>n x. u n x + v n x) x
                    = subcocycle_lim u x + subcocycle_lim v x"
[PROOF STATE]
proof (prove)
using this:
AE x in M. (\<lambda>n. (u n x + v n x) / real n) \<longlonglongrightarrow> subcocycle_lim (\<lambda>n x. u n x + v n x) x
AE x in M. (\<lambda>n. u n x / real n) \<longlonglongrightarrow> subcocycle_lim u x
AE x in M. (\<lambda>n. v n x / real n) \<longlonglongrightarrow> subcocycle_lim v x
\<lbrakk>(\<lambda>n. (u n ?x5 + v n ?x5) / real n) \<longlonglongrightarrow> subcocycle_lim (\<lambda>n x. u n x + v n x) ?x5; (\<lambda>n. u n ?x5 / real n) \<longlonglongrightarrow> subcocycle_lim u ?x5; (\<lambda>n. v n ?x5 / real n) \<longlonglongrightarrow> subcocycle_lim v ?x5\<rbrakk> \<Longrightarrow> subcocycle_lim (\<lambda>n x. u n x + v n x) ?x5 = subcocycle_lim u ?x5 + subcocycle_lim v ?x5

goal (1 subgoal):
 1. AE x in M. subcocycle_lim (\<lambda>n x. u n x + v n x) x = subcocycle_lim u x + subcocycle_lim v x
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
AE x in M. subcocycle_lim (\<lambda>n x. u n x + v n x) x = subcocycle_lim u x + subcocycle_lim v x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Vfrom_mono: "\<lbrakk>Ord i; a\<le>b; i\<le>j\<rbrakk> \<Longrightarrow> Vfrom a i \<le> Vfrom b j"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Ord i; a \<le> b; i \<le> j\<rbrakk> \<Longrightarrow> Vfrom a i \<le> Vfrom b j
[PROOF STEP]
by (metis (no_types) Vfrom_mono1 Vfrom_mono2 dual_order.trans sup.absorb_iff2)


[STATEMENT]
lemma LeftDerivation_append:
  "LeftDerivation a (D@E) c = (\<exists> b. LeftDerivation a D b \<and> LeftDerivation b E c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LeftDerivation a (D @ E) c = (\<exists>b. LeftDerivation a D b \<and> LeftDerivation b E c)
[PROOF STEP]
proof(induct D arbitrary: a c E)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>a c E. LeftDerivation a ([] @ E) c = (\<exists>b. LeftDerivation a [] b \<and> LeftDerivation b E c)
 2. \<And>a D aa c E. (\<And>a c E. LeftDerivation a (D @ E) c = (\<exists>b. LeftDerivation a D b \<and> LeftDerivation b E c)) \<Longrightarrow> LeftDerivation aa ((a # D) @ E) c = (\<exists>b. LeftDerivation aa (a # D) b \<and> LeftDerivation b E c)
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. \<And>a c E. LeftDerivation a ([] @ E) c = (\<exists>b. LeftDerivation a [] b \<and> LeftDerivation b E c)
 2. \<And>a D aa c E. (\<And>a c E. LeftDerivation a (D @ E) c = (\<exists>b. LeftDerivation a D b \<and> LeftDerivation b E c)) \<Longrightarrow> LeftDerivation aa ((a # D) @ E) c = (\<exists>b. LeftDerivation aa (a # D) b \<and> LeftDerivation b E c)
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LeftDerivation a ([] @ E) c = (\<exists>b. LeftDerivation a [] b \<and> LeftDerivation b E c)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
LeftDerivation a ([] @ E) c = (\<exists>b. LeftDerivation a [] b \<and> LeftDerivation b E c)

goal (1 subgoal):
 1. \<And>a D aa c E. (\<And>a c E. LeftDerivation a (D @ E) c = (\<exists>b. LeftDerivation a D b \<and> LeftDerivation b E c)) \<Longrightarrow> LeftDerivation aa ((a # D) @ E) c = (\<exists>b. LeftDerivation aa (a # D) b \<and> LeftDerivation b E c)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a D aa c E. (\<And>a c E. LeftDerivation a (D @ E) c = (\<exists>b. LeftDerivation a D b \<and> LeftDerivation b E c)) \<Longrightarrow> LeftDerivation aa ((a # D) @ E) c = (\<exists>b. LeftDerivation aa (a # D) b \<and> LeftDerivation b E c)
[PROOF STEP]
case (Cons d D)
[PROOF STATE]
proof (state)
this:
LeftDerivation ?a (D @ ?E) ?c = (\<exists>b. LeftDerivation ?a D b \<and> LeftDerivation b ?E ?c)

goal (1 subgoal):
 1. \<And>a D aa c E. (\<And>a c E. LeftDerivation a (D @ E) c = (\<exists>b. LeftDerivation a D b \<and> LeftDerivation b E c)) \<Longrightarrow> LeftDerivation aa ((a # D) @ E) c = (\<exists>b. LeftDerivation aa (a # D) b \<and> LeftDerivation b E c)
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
LeftDerivation ?a (D @ ?E) ?c = (\<exists>b. LeftDerivation ?a D b \<and> LeftDerivation b ?E ?c)

goal (1 subgoal):
 1. LeftDerivation a ((d # D) @ E) c = (\<exists>b. LeftDerivation a (d # D) b \<and> LeftDerivation b E c)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
LeftDerivation a ((d # D) @ E) c = (\<exists>b. LeftDerivation a (d # D) b \<and> LeftDerivation b E c)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sup_continuous_compose:
  assumes f: "sup_continuous f" and g: "sup_continuous g"
  shows "sup_continuous (\<lambda>x. f (g x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sup_continuous (\<lambda>x. f (g x))
[PROOF STEP]
unfolding sup_continuous_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>M. incseq M \<longrightarrow> f (g (Sup (range M))) = (SUP i. f (g (M i)))
[PROOF STEP]
proof safe
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>M. incseq M \<Longrightarrow> f (g (Sup (range M))) = (SUP i. f (g (M i)))
[PROOF STEP]
fix M :: "nat \<Rightarrow> 'c"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>M. incseq M \<Longrightarrow> f (g (Sup (range M))) = (SUP i. f (g (M i)))
[PROOF STEP]
assume M: "mono M"
[PROOF STATE]
proof (state)
this:
incseq M

goal (1 subgoal):
 1. \<And>M. incseq M \<Longrightarrow> f (g (Sup (range M))) = (SUP i. f (g (M i)))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
incseq M
[PROOF STEP]
have "mono (\<lambda>i. g (M i))"
[PROOF STATE]
proof (prove)
using this:
incseq M

goal (1 subgoal):
 1. incseq (\<lambda>i. g (M i))
[PROOF STEP]
using sup_continuous_mono[OF g]
[PROOF STATE]
proof (prove)
using this:
incseq M
mono g

goal (1 subgoal):
 1. incseq (\<lambda>i. g (M i))
[PROOF STEP]
by (auto simp: mono_def)
[PROOF STATE]
proof (state)
this:
incseq (\<lambda>i. g (M i))

goal (1 subgoal):
 1. \<And>M. incseq M \<Longrightarrow> f (g (Sup (range M))) = (SUP i. f (g (M i)))
[PROOF STEP]
with M
[PROOF STATE]
proof (chain)
picking this:
incseq M
incseq (\<lambda>i. g (M i))
[PROOF STEP]
show "f (g (Sup (M ` UNIV))) = (SUP i. f (g (M i)))"
[PROOF STATE]
proof (prove)
using this:
incseq M
incseq (\<lambda>i. g (M i))

goal (1 subgoal):
 1. f (g (Sup (range M))) = (SUP i. f (g (M i)))
[PROOF STEP]
by (auto simp: sup_continuous_def g[THEN sup_continuousD] f[THEN sup_continuousD])
[PROOF STATE]
proof (state)
this:
f (g (Sup (range M))) = (SUP i. f (g (M i)))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma has_vector_derivative_mult_left[derivative_intros]:
  fixes a :: "'a::real_normed_algebra"
  shows "(f has_vector_derivative x) F \<Longrightarrow> ((\<lambda>x. f x * a) has_vector_derivative (x * a)) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f has_vector_derivative x) F \<Longrightarrow> ((\<lambda>x. f x * a) has_vector_derivative x * a) F
[PROOF STEP]
by (rule bounded_linear.has_vector_derivative[OF bounded_linear_mult_left])


[STATEMENT]
lemma z_non_zero_proj2_pt: "z_non_zero (proj2_pt v)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z_non_zero (proj2_pt v)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. z_non_zero (proj2_pt v)
[PROOF STEP]
from proj2_pt_scalar
[PROOF STATE]
proof (chain)
picking this:
\<exists>c. c \<noteq> 0 \<and> proj2_rep (proj2_pt ?v) = c *\<^sub>R vector2_append1 ?v
[PROOF STEP]
obtain c where "c \<noteq> 0" and "proj2_rep (proj2_pt v) = c *\<^sub>R (vector2_append1 v)"
[PROOF STATE]
proof (prove)
using this:
\<exists>c. c \<noteq> 0 \<and> proj2_rep (proj2_pt ?v) = c *\<^sub>R vector2_append1 ?v

goal (1 subgoal):
 1. (\<And>c. \<lbrakk>c \<noteq> 0; proj2_rep (proj2_pt v) = c *\<^sub>R vector2_append1 v\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
c \<noteq> 0
proj2_rep (proj2_pt v) = c *\<^sub>R vector2_append1 v

goal (1 subgoal):
 1. z_non_zero (proj2_pt v)
[PROOF STEP]
from \<open>proj2_rep (proj2_pt v) = c *\<^sub>R (vector2_append1 v)\<close>
[PROOF STATE]
proof (chain)
picking this:
proj2_rep (proj2_pt v) = c *\<^sub>R vector2_append1 v
[PROOF STEP]
have "(proj2_rep (proj2_pt v))$3 = c"
[PROOF STATE]
proof (prove)
using this:
proj2_rep (proj2_pt v) = c *\<^sub>R vector2_append1 v

goal (1 subgoal):
 1. proj2_rep (proj2_pt v) $ 3 = c
[PROOF STEP]
unfolding vector2_append1_def and vector_def
[PROOF STATE]
proof (prove)
using this:
proj2_rep (proj2_pt v) = c *\<^sub>R vec_lambda (foldr (\<lambda>x f n. (f (n + 1))(n := x)) [v $ 1, v $ 2, 1] (\<lambda>n x. 0) 1)

goal (1 subgoal):
 1. proj2_rep (proj2_pt v) $ 3 = c
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
proj2_rep (proj2_pt v) $ 3 = c

goal (1 subgoal):
 1. z_non_zero (proj2_pt v)
[PROOF STEP]
with \<open>c \<noteq> 0\<close>
[PROOF STATE]
proof (chain)
picking this:
c \<noteq> 0
proj2_rep (proj2_pt v) $ 3 = c
[PROOF STEP]
show "z_non_zero (proj2_pt v)"
[PROOF STATE]
proof (prove)
using this:
c \<noteq> 0
proj2_rep (proj2_pt v) $ 3 = c

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in encoding) fully_abstract_wrt_trans_closure_of_source_relation:
  fixes RelS :: "('procS \<times> 'procS) set"
  assumes encRelS: "\<forall>S1 S2. \<lbrakk>S1\<rbrakk> = \<lbrakk>S2\<rbrakk> \<longrightarrow> (S1, S2) \<in> RelS\<^sup>+"
  shows "\<exists>RelT. fully_abstract (RelS\<^sup>+) RelT"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>RelT. \<forall>S1 S2. ((S1, S2) \<in> RelS\<^sup>+) = ((\<lbrakk>S1\<rbrakk>, \<lbrakk>S2\<rbrakk>) \<in> RelT)
[PROOF STEP]
using encRelS trans_trancl[of RelS]
            fully_abstract_wrt_trans_source_relation[where RelS="RelS\<^sup>+"]
[PROOF STATE]
proof (prove)
using this:
\<forall>S1 S2. \<lbrakk>S1\<rbrakk> = \<lbrakk>S2\<rbrakk> \<longrightarrow> (S1, S2) \<in> RelS\<^sup>+
trans (RelS\<^sup>+)
(\<forall>S1 S2. \<lbrakk>S1\<rbrakk> = \<lbrakk>S2\<rbrakk> \<longrightarrow> (S1, S2) \<in> RelS\<^sup>+) \<and> trans (RelS\<^sup>+) \<Longrightarrow> \<exists>RelT. \<forall>S1 S2. ((S1, S2) \<in> RelS\<^sup>+) = ((\<lbrakk>S1\<rbrakk>, \<lbrakk>S2\<rbrakk>) \<in> RelT)

goal (1 subgoal):
 1. \<exists>RelT. \<forall>S1 S2. ((S1, S2) \<in> RelS\<^sup>+) = ((\<lbrakk>S1\<rbrakk>, \<lbrakk>S2\<rbrakk>) \<in> RelT)
[PROOF STEP]
by blast


[STATEMENT]
lemma continuous_on_A[continuous_intros]:
  assumes "continuous_on S a"
  assumes "continuous_on S b"
  assumes "\<And>s. s \<in> S \<Longrightarrow> a s \<in> X"
  assumes "\<And>s. s \<in> S \<Longrightarrow> b s \<in> existence_ivl0 (a s)"
  shows "continuous_on S (\<lambda>s. vareq (a s) (b s))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on S (\<lambda>s. vareq (a s) (b s))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. continuous_on S (\<lambda>s. vareq (a s) (b s))
[PROOF STEP]
have "continuous_on S (\<lambda>x. f' (flow0 (a x) (b x)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on S (\<lambda>x. f' (flow0 (a x) (b x)))
[PROOF STEP]
by (auto intro!: continuous_intros assms flow_in_domain)
[PROOF STATE]
proof (state)
this:
continuous_on S (\<lambda>x. f' (flow0 (a x) (b x)))

goal (1 subgoal):
 1. continuous_on S (\<lambda>s. vareq (a s) (b s))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
continuous_on S (\<lambda>x. f' (flow0 (a x) (b x)))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
continuous_on S (\<lambda>x. f' (flow0 (a x) (b x)))

goal (1 subgoal):
 1. continuous_on S (\<lambda>s. vareq (a s) (b s))
[PROOF STEP]
by (rule continuous_on_eq) (auto simp: assms vareq_def)
[PROOF STATE]
proof (state)
this:
continuous_on S (\<lambda>s. vareq (a s) (b s))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma "pop (p, D, pE) \<equiv> (butlast p, last p \<union> D, pE)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pop (p, D, pE) \<equiv> (butlast p, last p \<union> D, pE)
[PROOF STEP]
unfolding pop_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. let (p, D, pE) = (p, D, pE); (p, V) = (butlast p, last p); D = V \<union> D in (p, D, pE) \<equiv> (butlast p, last p \<union> D, pE)
[PROOF STEP]
by auto


[STATEMENT]
lemma (in Corps) valuation_equivTr1:"\<lbrakk>valuation K v; valuation K v';
 \<forall>x\<in>carrier K. 0 \<le> (v x) \<longrightarrow> 0 \<le> (v' x)\<rbrakk> \<Longrightarrow>
                carrier (Vr K v) \<subseteq> carrier (Vr K v')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>valuation K v; valuation K v'; \<forall>x\<in>carrier K. 0 \<le> v x \<longrightarrow> 0 \<le> v' x\<rbrakk> \<Longrightarrow> carrier (Vr K v) \<subseteq> carrier (Vr K v')
[PROOF STEP]
apply (frule Vr_ring[of  "v"],
       frule Vr_ring[of  "v'"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>valuation K v; valuation K v'; \<forall>x\<in>carrier K. 0 \<le> v x \<longrightarrow> 0 \<le> v' x; Ring (Vr K v); Ring (Vr K v')\<rbrakk> \<Longrightarrow> carrier (Vr K v) \<subseteq> carrier (Vr K v')
[PROOF STEP]
apply (rule subsetI,
       case_tac "x = \<zero>\<^bsub>K\<^esub>", simp, simp add:Vr_def Sr_def,
       frule_tac x1 = x in val_pos_mem_Vr[THEN sym, of "v"],
       frule_tac x = x in Vr_mem_f_mem[of "v"],
       simp, frule_tac x = x in Vr_mem_f_mem[of "v"], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>valuation K v; valuation K v'; \<forall>x\<in>carrier K. 0 \<le> v x \<longrightarrow> 0 \<le> v' x; Ring (Vr K v); Ring (Vr K v'); x \<in> carrier (Vr K v); x \<noteq> \<zero>; (x \<in> carrier (Vr K v)) = (0 \<le> v x)\<rbrakk> \<Longrightarrow> x \<in> carrier (Vr K v')
[PROOF STEP]
apply (drule_tac x = x in bspec, simp add:Vr_mem_f_mem)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>valuation K v; valuation K v'; Ring (Vr K v); Ring (Vr K v'); x \<in> carrier (Vr K v); x \<noteq> \<zero>; (x \<in> carrier (Vr K v)) = (0 \<le> v x); 0 \<le> v x \<longrightarrow> 0 \<le> v' x\<rbrakk> \<Longrightarrow> x \<in> carrier (Vr K v')
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>valuation K v; valuation K v'; Ring (Vr K v); Ring (Vr K v'); 0 \<le> v x; x \<noteq> \<zero>; x \<in> carrier (Vr K v); 0 \<le> v' x\<rbrakk> \<Longrightarrow> x \<in> carrier (Vr K v')
[PROOF STEP]
apply (subst val_pos_mem_Vr[THEN sym, of v'], assumption+,
       simp add:Vr_mem_f_mem, assumption+)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma convex_halfspace_le: "convex {x. inner a x \<le> b}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. convex {x. a \<bullet> x \<le> b}
[PROOF STEP]
unfolding convex_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<in>{x. a \<bullet> x \<le> b}. \<forall>y\<in>{x. a \<bullet> x \<le> b}. \<forall>u\<ge>0. \<forall>v\<ge>0. u + v = 1 \<longrightarrow> u *\<^sub>R x + v *\<^sub>R y \<in> {x. a \<bullet> x \<le> b}
[PROOF STEP]
by (auto simp: inner_add intro!: convex_bound_le)


[STATEMENT]
lemma zmset_of_add_mset[simp]: "zmset_of (add_mset x M) = add_zmset x (zmset_of M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. zmset_of (add_mset x M) = add_zmset x (zmset_of M)
[PROOF STEP]
by transfer (auto simp: equiv_zmset_def add_mset_def cong: if_cong)


[STATEMENT]
lemma converse_ordermap_le_mono:
  assumes "ordermap A r y \<le> ordermap A r x" "wf r" "total r"  "x \<in> A" "small A"
  shows "(y, x) \<in> r \<or> y=x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (y, x) \<in> r \<or> y = x
[PROOF STEP]
by (meson UNIV_I assms mem_not_refl ordermap_mono total_on_def vsubsetD)


[STATEMENT]
lemma subset_inext_closed: "\<lbrakk> n \<in> B; A \<subseteq> B \<rbrakk> \<Longrightarrow> inext n A \<in> B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>n \<in> B; A \<subseteq> B\<rbrakk> \<Longrightarrow> inext n A \<in> B
[PROOF STEP]
apply (case_tac "n \<in> A")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>n \<in> B; A \<subseteq> B; n \<in> A\<rbrakk> \<Longrightarrow> inext n A \<in> B
 2. \<lbrakk>n \<in> B; A \<subseteq> B; n \<notin> A\<rbrakk> \<Longrightarrow> inext n A \<in> B
[PROOF STEP]
apply (fastforce simp: inext_closed)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>n \<in> B; A \<subseteq> B; n \<notin> A\<rbrakk> \<Longrightarrow> inext n A \<in> B
[PROOF STEP]
apply (simp add: not_in_inext_fix)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma smcf_cn_cov_comp_ArrMap_app[smc_cn_cs_simps]:
  assumes "\<GG> : \<BB> \<^sub>S\<^sub>M\<^sub>C\<mapsto>\<mapsto>\<^bsub>\<alpha>\<^esub> \<CC>" and "\<FF> : \<AA> \<mapsto>\<mapsto>\<^sub>S\<^sub>M\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>" and "f \<in>\<^sub>\<circ> \<AA>\<lparr>Arr\<rparr>"
  shows "(\<GG> \<^sub>S\<^sub>M\<^sub>C\<^sub>F\<circ> \<FF>)\<lparr>ArrMap\<rparr>\<lparr>f\<rparr> = \<GG>\<lparr>ArrMap\<rparr>\<lparr>\<FF>\<lparr>ArrMap\<rparr>\<lparr>f\<rparr>\<rparr>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<GG> \<^sub>S\<^sub>M\<^sub>C\<^sub>F\<circ> \<FF>)\<lparr>ArrMap\<rparr>\<lparr>f\<rparr> = \<GG>\<lparr>ArrMap\<rparr>\<lparr>\<FF>\<lparr>ArrMap\<rparr>\<lparr>f\<rparr>\<rparr>
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<GG> \<^sub>S\<^sub>M\<^sub>C\<^sub>F\<circ> \<FF>)\<lparr>ArrMap\<rparr>\<lparr>f\<rparr> = \<GG>\<lparr>ArrMap\<rparr>\<lparr>\<FF>\<lparr>ArrMap\<rparr>\<lparr>f\<rparr>\<rparr>
[PROOF STEP]
interpret L: is_semifunctor \<alpha> \<open>op_smc \<BB>\<close> \<CC> \<GG>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<GG> : op_smc \<BB> \<mapsto>\<mapsto>\<^sub>S\<^sub>M\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>
[PROOF STEP]
by (rule assms(1))
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<GG> \<^sub>S\<^sub>M\<^sub>C\<^sub>F\<circ> \<FF>)\<lparr>ArrMap\<rparr>\<lparr>f\<rparr> = \<GG>\<lparr>ArrMap\<rparr>\<lparr>\<FF>\<lparr>ArrMap\<rparr>\<lparr>f\<rparr>\<rparr>
[PROOF STEP]
interpret R: is_semifunctor \<alpha> \<AA> \<BB> \<FF>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<FF> : \<AA> \<mapsto>\<mapsto>\<^sub>S\<^sub>M\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>
[PROOF STEP]
by (rule assms(2))
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<GG> \<^sub>S\<^sub>M\<^sub>C\<^sub>F\<circ> \<FF>)\<lparr>ArrMap\<rparr>\<lparr>f\<rparr> = \<GG>\<lparr>ArrMap\<rparr>\<lparr>\<FF>\<lparr>ArrMap\<rparr>\<lparr>f\<rparr>\<rparr>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<GG> \<^sub>S\<^sub>M\<^sub>C\<^sub>F\<circ> \<FF>)\<lparr>ArrMap\<rparr>\<lparr>f\<rparr> = \<GG>\<lparr>ArrMap\<rparr>\<lparr>\<FF>\<lparr>ArrMap\<rparr>\<lparr>f\<rparr>\<rparr>
[PROOF STEP]
by
      (
        rule dghm_cn_cov_comp_ArrMap_app
          [
            OF
              L.smcf_is_dghm[unfolded slicing_commute[symmetric]]
              R.smcf_is_dghm,
            unfolded slicing_commute slicing_simps,
            OF assms(3)
          ]
      )
[PROOF STATE]
proof (state)
this:
(\<GG> \<^sub>S\<^sub>M\<^sub>C\<^sub>F\<circ> \<FF>)\<lparr>ArrMap\<rparr>\<lparr>f\<rparr> = \<GG>\<lparr>ArrMap\<rparr>\<lparr>\<FF>\<lparr>ArrMap\<rparr>\<lparr>f\<rparr>\<rparr>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma reflp_on_restrict_to_rtranclp:
  assumes "reflp_on P A" and "transp_on P A"
    and "x \<in> A" and "y \<in> A"
  shows "(restrict_to P A)\<^sup>*\<^sup>* x y \<longleftrightarrow> P x y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (restrict_to P A)\<^sup>*\<^sup>* x y = P x y
[PROOF STEP]
unfolding restrict_to_rtranclp [OF assms(2-)]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P\<^sup>=\<^sup>= x y = P x y
[PROOF STEP]
unfolding reflp_on_reflclp_simp [OF assms(1, 3-)]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P x y = P x y
[PROOF STEP]
..


[STATEMENT]
lemma filtermap_Nil_never: "filtermap pred func tr = [] \<longleftrightarrow> never pred tr"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Filtermap.filtermap pred func tr = []) = never pred tr
[PROOF STEP]
proof(induction tr)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (Filtermap.filtermap pred func [] = []) = never pred []
 2. \<And>a tr. (Filtermap.filtermap pred func tr = []) = never pred tr \<Longrightarrow> (Filtermap.filtermap pred func (a # tr) = []) = never pred (a # tr)
[PROOF STEP]
case (Cons trn tr)
[PROOF STATE]
proof (state)
this:
(Filtermap.filtermap pred func tr = []) = never pred tr

goal (2 subgoals):
 1. (Filtermap.filtermap pred func [] = []) = never pred []
 2. \<And>a tr. (Filtermap.filtermap pred func tr = []) = never pred tr \<Longrightarrow> (Filtermap.filtermap pred func (a # tr) = []) = never pred (a # tr)
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
(Filtermap.filtermap pred func tr = []) = never pred tr

goal (1 subgoal):
 1. (Filtermap.filtermap pred func (trn # tr) = []) = never pred (trn # tr)
[PROOF STEP]
by (cases "pred trn") auto
[PROOF STATE]
proof (state)
this:
(Filtermap.filtermap pred func (trn # tr) = []) = never pred (trn # tr)

goal (1 subgoal):
 1. (Filtermap.filtermap pred func [] = []) = never pred []
[PROOF STEP]
qed auto


[STATEMENT]
theorem Beta_plus1_plus1:
  assumes "x \<notin> \<int>\<^sub>\<le>\<^sub>0" "y \<notin> \<int>\<^sub>\<le>\<^sub>0"
  shows   "Beta (x + 1) y + Beta x (y + 1) = Beta x y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Beta (x + (1::'a)) y + Beta x (y + (1::'a)) = Beta x y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Beta (x + (1::'a)) y + Beta x (y + (1::'a)) = Beta x y
[PROOF STEP]
have "Beta (x + 1) y + Beta x (y + 1) =
            (Gamma (x + 1) * Gamma y + Gamma x * Gamma (y + 1)) * rGamma ((x + y) + 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Beta (x + (1::'a)) y + Beta x (y + (1::'a)) = (Gamma (x + (1::'a)) * Gamma y + Gamma x * Gamma (y + (1::'a))) * rGamma (x + y + (1::'a))
[PROOF STEP]
by (simp add: Beta_altdef add_divide_distrib algebra_simps)
[PROOF STATE]
proof (state)
this:
Beta (x + (1::'a)) y + Beta x (y + (1::'a)) = (Gamma (x + (1::'a)) * Gamma y + Gamma x * Gamma (y + (1::'a))) * rGamma (x + y + (1::'a))

goal (1 subgoal):
 1. Beta (x + (1::'a)) y + Beta x (y + (1::'a)) = Beta x y
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Beta (x + (1::'a)) y + Beta x (y + (1::'a)) = (Gamma (x + (1::'a)) * Gamma y + Gamma x * Gamma (y + (1::'a))) * rGamma (x + y + (1::'a))

goal (1 subgoal):
 1. Beta (x + (1::'a)) y + Beta x (y + (1::'a)) = Beta x y
[PROOF STEP]
have "\<dots> = (Gamma x * Gamma y) * ((x + y) * rGamma ((x + y) + 1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Gamma (x + (1::'a)) * Gamma y + Gamma x * Gamma (y + (1::'a))) * rGamma (x + y + (1::'a)) = Gamma x * Gamma y * ((x + y) * rGamma (x + y + (1::'a)))
[PROOF STEP]
by (subst assms[THEN Gamma_plus1])+ (simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
(Gamma (x + (1::'a)) * Gamma y + Gamma x * Gamma (y + (1::'a))) * rGamma (x + y + (1::'a)) = Gamma x * Gamma y * ((x + y) * rGamma (x + y + (1::'a)))

goal (1 subgoal):
 1. Beta (x + (1::'a)) y + Beta x (y + (1::'a)) = Beta x y
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(Gamma (x + (1::'a)) * Gamma y + Gamma x * Gamma (y + (1::'a))) * rGamma (x + y + (1::'a)) = Gamma x * Gamma y * ((x + y) * rGamma (x + y + (1::'a)))

goal (1 subgoal):
 1. Beta (x + (1::'a)) y + Beta x (y + (1::'a)) = Beta x y
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
x \<notin> \<int>\<^sub>\<le>\<^sub>0
y \<notin> \<int>\<^sub>\<le>\<^sub>0
[PROOF STEP]
have "\<dots> = Beta x y"
[PROOF STATE]
proof (prove)
using this:
x \<notin> \<int>\<^sub>\<le>\<^sub>0
y \<notin> \<int>\<^sub>\<le>\<^sub>0

goal (1 subgoal):
 1. Gamma x * Gamma y * ((x + y) * rGamma (x + y + (1::'a))) = Beta x y
[PROOF STEP]
unfolding Beta_altdef
[PROOF STATE]
proof (prove)
using this:
x \<notin> \<int>\<^sub>\<le>\<^sub>0
y \<notin> \<int>\<^sub>\<le>\<^sub>0

goal (1 subgoal):
 1. Gamma x * Gamma y * ((x + y) * rGamma (x + y + (1::'a))) = Gamma x * Gamma y * rGamma (x + y)
[PROOF STEP]
by (subst rGamma_plus1) simp
[PROOF STATE]
proof (state)
this:
Gamma x * Gamma y * ((x + y) * rGamma (x + y + (1::'a))) = Beta x y

goal (1 subgoal):
 1. Beta (x + (1::'a)) y + Beta x (y + (1::'a)) = Beta x y
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
Beta (x + (1::'a)) y + Beta x (y + (1::'a)) = Beta x y
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Beta (x + (1::'a)) y + Beta x (y + (1::'a)) = Beta x y

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma increasing_union:
    "[| F \<in> increasing f;  F \<in> increasing g |]
     ==> F \<in> increasing (%s. (f s) + (g s :: ('a::order) multiset))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>F \<in> increasing f; F \<in> increasing g\<rbrakk> \<Longrightarrow> F \<in> increasing (\<lambda>s. f s + g s)
[PROOF STEP]
apply (simp add: increasing_def stable_def constrains_def, auto)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x act xa xb. \<lbrakk>\<forall>x. \<forall>act\<in>Acts F. act `` {s. x \<le> f s} \<subseteq> {s. x \<le> f s}; \<forall>x. \<forall>act\<in>Acts F. act `` {s. x \<le> g s} \<subseteq> {s. x \<le> g s}; act \<in> Acts F; (xb, xa) \<in> act; x \<le> f xb + g xb\<rbrakk> \<Longrightarrow> x \<le> f xa + g xa
[PROOF STEP]
apply (drule_tac x = "f xb" in spec)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x act xa xb. \<lbrakk>\<forall>x. \<forall>act\<in>Acts F. act `` {s. x \<le> g s} \<subseteq> {s. x \<le> g s}; act \<in> Acts F; (xb, xa) \<in> act; x \<le> f xb + g xb; \<forall>act\<in>Acts F. act `` {s. f xb \<le> f s} \<subseteq> {s. f xb \<le> f s}\<rbrakk> \<Longrightarrow> x \<le> f xa + g xa
[PROOF STEP]
apply (drule_tac x = "g xb" in spec)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x act xa xb. \<lbrakk>act \<in> Acts F; (xb, xa) \<in> act; x \<le> f xb + g xb; \<forall>act\<in>Acts F. act `` {s. f xb \<le> f s} \<subseteq> {s. f xb \<le> f s}; \<forall>act\<in>Acts F. act `` {s. g xb \<le> g s} \<subseteq> {s. g xb \<le> g s}\<rbrakk> \<Longrightarrow> x \<le> f xa + g xa
[PROOF STEP]
apply (drule bspec, assumption)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x act xa xb. \<lbrakk>act \<in> Acts F; (xb, xa) \<in> act; x \<le> f xb + g xb; \<forall>act\<in>Acts F. act `` {s. g xb \<le> g s} \<subseteq> {s. g xb \<le> g s}; act `` {s. f xb \<le> f s} \<subseteq> {s. f xb \<le> f s}\<rbrakk> \<Longrightarrow> x \<le> f xa + g xa
[PROOF STEP]
apply (blast intro: add_mono order_trans)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma arbitrary_intersection_of_Inter:
   "(\<And>S. S \<in> \<U> \<Longrightarrow> (arbitrary intersection_of P) S) \<Longrightarrow> (arbitrary intersection_of P) (\<Inter>\<U>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>S. S \<in> \<U> \<Longrightarrow> (arbitrary intersection_of P) S) \<Longrightarrow> (arbitrary intersection_of P) (\<Inter> \<U>)
[PROOF STEP]
by (metis intersection_of_def arbitrary_def arbitrary_intersection_of_idempot mem_Collect_eq subsetI)


[STATEMENT]
lemma inner_prod_with_row_bra_vec [simp]:
  assumes "dim_vec u = dim_vec v"
  shows "\<langle>u|v\<rangle> = row (bra_vec u) 0 \<bullet> v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<langle>u|v\<rangle> = row (bra_vec u) 0 \<bullet> v
[PROOF STEP]
using assms inner_prod_def scalar_prod_def row_bra_vec index_vec
[PROOF STATE]
proof (prove)
using this:
dim_vec u = dim_vec v
\<langle>?u|?v\<rangle> \<equiv> \<Sum>i = 0..<dim_vec ?v. cnj (?u $ i) * ?v $ i
?v \<bullet> ?w \<equiv> \<Sum>i = 0..<dim_vec ?w. ?v $ i * ?w $ i
row (bra_vec ?v) 0 = vec (dim_vec ?v) (\<lambda>i. cnj (?v $ i))
?i < ?n \<Longrightarrow> vec ?n ?f $ ?i = ?f ?i

goal (1 subgoal):
 1. \<langle>u|v\<rangle> = row (bra_vec u) 0 \<bullet> v
[PROOF STEP]
by (smt lessThan_atLeast0 lessThan_iff sum.cong)


[STATEMENT]
lemma vunion_def: "A \<union>\<^sub>\<circ> B = set {x. x \<in>\<^sub>\<circ> A \<or> x \<in>\<^sub>\<circ> B}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<union>\<^sub>\<circ> B = set {x. x \<in>\<^sub>\<circ> A \<or> x \<in>\<^sub>\<circ> B}
[PROOF STEP]
unfolding Un_def sup_V_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set {x. x \<in>\<^sub>\<circ> A \<or> x \<in>\<^sub>\<circ> B} = set {x. x \<in>\<^sub>\<circ> A \<or> x \<in>\<^sub>\<circ> B}
[PROOF STEP]
by simp


[STATEMENT]
lemma large_mod_0: assumes "(n :: int) > 1" "\<bar>k\<bar> < n" "k mod n = 0" shows "k = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k = 0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. k = 0
[PROOF STEP]
from \<open>k mod n = 0\<close>
[PROOF STATE]
proof (chain)
picking this:
k mod n = 0
[PROOF STEP]
have "n dvd k"
[PROOF STATE]
proof (prove)
using this:
k mod n = 0

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

goal (1 subgoal):
 1. k = 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n dvd k
[PROOF STEP]
obtain m where "k = n * m"
[PROOF STATE]
proof (prove)
using this:
n dvd k

goal (1 subgoal):
 1. (\<And>m. k = n * m \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
k = n * m

goal (1 subgoal):
 1. k = 0
[PROOF STEP]
with \<open>n > 1\<close> \<open>\<bar>k\<bar> < n\<close>
[PROOF STATE]
proof (chain)
picking this:
1 < n
\<bar>k\<bar> < n
k = n * m
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
1 < n
\<bar>k\<bar> < n
k = n * m

goal (1 subgoal):
 1. k = 0
[PROOF STEP]
by (auto simp add: abs_mult)
[PROOF STATE]
proof (state)
this:
k = 0

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma VInter_vempty[simp]: "\<Inter>\<^sub>\<circ> 0 = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Inter>\<^sub>\<circ> 0 = 0
[PROOF STEP]
using VInter0I
[PROOF STATE]
proof (prove)
using this:
?A = 0 \<Longrightarrow> \<Inter>\<^sub>\<circ> ?A = 0

goal (1 subgoal):
 1. \<Inter>\<^sub>\<circ> 0 = 0
[PROOF STEP]
by auto


[STATEMENT]
lemma real_interval_max_interval[simp]:
  "real_interval (max_interval a b) = max_interval (real_interval a) (real_interval b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_interval (max_interval a b) = max_interval (real_interval a) (real_interval b)
[PROOF STEP]
by (auto simp: interval_eq_set_of_iff set_of_eq real_of_float_max)


[STATEMENT]
lemma ennreal_le_of_nat_iff[simp]: "ennreal r \<le> of_nat i \<longleftrightarrow> r \<le> of_nat i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (ennreal r \<le> of_nat i) = (r \<le> real i)
[PROOF STEP]
by (simp add: ennreal_of_nat_eq_real_of_nat)


[STATEMENT]
lemma (in monoid) isgcd_divides_l:
  assumes "a divides b"
    and "a \<in> carrier G"  "b \<in> carrier G"
  shows "a gcdof a b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a gcdof a b
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
a divides b
a \<in> carrier G
b \<in> carrier G

goal (1 subgoal):
 1. a gcdof a b
[PROOF STEP]
unfolding isgcd_def
[PROOF STATE]
proof (prove)
using this:
a divides b
a \<in> carrier G
b \<in> carrier G

goal (1 subgoal):
 1. a divides a \<and> a divides b \<and> (\<forall>y\<in>carrier G. y divides a \<and> y divides b \<longrightarrow> y divides a)
[PROOF STEP]
by fast


[STATEMENT]
lemma supp_fin_insert:
  fixes X::"('a set)"
  and   x::"'a"
  assumes pt: "pt TYPE('a) TYPE('x)"
  and     at: "at TYPE('x)"
  and     fs: "fs TYPE('a) TYPE('x)"
  and     f:  "finite X"
  shows "(supp (insert x X)) = (supp x)\<union>((supp X)::'x set)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. supp (insert x X) = supp x \<union> supp X
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. supp (insert x X) = supp x \<union> supp X
[PROOF STEP]
have "(supp (insert x X)) = ((supp ({x}\<union>(X::'a set)))::'x set)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. supp (insert x X) = supp ({x} \<union> X)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
supp (insert x X) = supp ({x} \<union> X)

goal (1 subgoal):
 1. supp (insert x X) = supp x \<union> supp X
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
supp (insert x X) = supp ({x} \<union> X)

goal (1 subgoal):
 1. supp (insert x X) = supp x \<union> supp X
[PROOF STEP]
have "\<dots> = (supp {x})\<union>(supp X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. supp ({x} \<union> X) = supp {x} \<union> supp X
[PROOF STEP]
by (rule supp_fin_union[OF pt, OF at, OF fs], simp_all add: f)
[PROOF STATE]
proof (state)
this:
supp ({x} \<union> X) = supp {x} \<union> supp X

goal (1 subgoal):
 1. supp (insert x X) = supp x \<union> supp X
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
supp (insert x X) = supp {x} \<union> supp X
[PROOF STEP]
show "(supp (insert x X)) = (supp x)\<union>((supp X)::'x set)"
[PROOF STATE]
proof (prove)
using this:
supp (insert x X) = supp {x} \<union> supp X

goal (1 subgoal):
 1. supp (insert x X) = supp x \<union> supp X
[PROOF STEP]
by (simp add: supp_singleton)
[PROOF STATE]
proof (state)
this:
supp (insert x X) = supp x \<union> supp X

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Lcm_fin_mult:
  "Lcm\<^sub>f\<^sub>i\<^sub>n (image (times b) A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)" if "A \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
[PROOF STEP]
proof (cases "b = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. b = (0::'a) \<Longrightarrow> Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
 2. b \<noteq> (0::'a) \<Longrightarrow> Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
b = (0::'a)

goal (2 subgoals):
 1. b = (0::'a) \<Longrightarrow> Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
 2. b \<noteq> (0::'a) \<Longrightarrow> Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
b = (0::'a)

goal (2 subgoals):
 1. b = (0::'a) \<Longrightarrow> Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
 2. b \<noteq> (0::'a) \<Longrightarrow> Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
[PROOF STEP]
from that
[PROOF STATE]
proof (chain)
picking this:
A \<noteq> {}
[PROOF STEP]
have "times 0 ` A = {0}"
[PROOF STATE]
proof (prove)
using this:
A \<noteq> {}

goal (1 subgoal):
 1. (*) (0::'a) ` A = {0::'a}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(*) (0::'a) ` A = {0::'a}

goal (2 subgoals):
 1. b = (0::'a) \<Longrightarrow> Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
 2. b \<noteq> (0::'a) \<Longrightarrow> Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
b = (0::'a)
(*) (0::'a) ` A = {0::'a}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
b = (0::'a)
(*) (0::'a) ` A = {0::'a}

goal (1 subgoal):
 1. Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)

goal (1 subgoal):
 1. b \<noteq> (0::'a) \<Longrightarrow> Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. b \<noteq> (0::'a) \<Longrightarrow> Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
b \<noteq> (0::'a)

goal (1 subgoal):
 1. b \<noteq> (0::'a) \<Longrightarrow> Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
[PROOF STEP]
proof (cases "finite A")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. finite A \<Longrightarrow> Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
 2. infinite A \<Longrightarrow> Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
infinite A

goal (2 subgoals):
 1. finite A \<Longrightarrow> Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
 2. infinite A \<Longrightarrow> Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
infinite A

goal (2 subgoals):
 1. finite A \<Longrightarrow> Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
 2. infinite A \<Longrightarrow> Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
[PROOF STEP]
have "inj_on (times b) A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on ((*) b) A
[PROOF STEP]
using \<open>b \<noteq> 0\<close>
[PROOF STATE]
proof (prove)
using this:
b \<noteq> (0::'a)

goal (1 subgoal):
 1. inj_on ((*) b) A
[PROOF STEP]
by (rule inj_on_mult)
[PROOF STATE]
proof (state)
this:
inj_on ((*) b) A

goal (2 subgoals):
 1. finite A \<Longrightarrow> Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
 2. infinite A \<Longrightarrow> Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
infinite A
inj_on ((*) b) A
[PROOF STEP]
have "infinite (times b ` A)"
[PROOF STATE]
proof (prove)
using this:
infinite A
inj_on ((*) b) A

goal (1 subgoal):
 1. infinite ((*) b ` A)
[PROOF STEP]
by (simp add: finite_image_iff)
[PROOF STATE]
proof (state)
this:
infinite ((*) b ` A)

goal (2 subgoals):
 1. finite A \<Longrightarrow> Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
 2. infinite A \<Longrightarrow> Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
[PROOF STEP]
with False
[PROOF STATE]
proof (chain)
picking this:
infinite A
infinite ((*) b ` A)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
infinite A
infinite ((*) b ` A)

goal (1 subgoal):
 1. Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)

goal (1 subgoal):
 1. finite A \<Longrightarrow> Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite A \<Longrightarrow> Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
finite A

goal (1 subgoal):
 1. finite A \<Longrightarrow> Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite A
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
finite A

goal (1 subgoal):
 1. Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
finite A
A \<noteq> {}

goal (1 subgoal):
 1. Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)
[PROOF STEP]
by (induct A rule: finite_ne_induct) (auto simp: lcm_mult_left)
[PROOF STATE]
proof (state)
this:
Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Lcm\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Lcm\<^sub>f\<^sub>i\<^sub>n A)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma scaleC_nonpos_nonneg: "a \<le> 0 \<Longrightarrow> 0 \<le> x \<Longrightarrow> a *\<^sub>C x \<le> 0"
  for x :: "'a::ordered_complex_vector"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<le> 0; (0::'a) \<le> x\<rbrakk> \<Longrightarrow> a *\<^sub>C x \<le> (0::'a)
[PROOF STEP]
using scaleC_right_mono [of a 0 x]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>a \<le> 0; (0::'a) \<le> x\<rbrakk> \<Longrightarrow> a *\<^sub>C x \<le> 0 *\<^sub>C x

goal (1 subgoal):
 1. \<lbrakk>a \<le> 0; (0::'a) \<le> x\<rbrakk> \<Longrightarrow> a *\<^sub>C x \<le> (0::'a)
[PROOF STEP]
by simp


[STATEMENT]
lemma elements_mat_h_def': "elements_mat_h A = {A $h i $h j | i j. True}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. elements_mat_h A = {A $h i $h j |i j. True}
[PROOF STEP]
unfolding elements_mat_h_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. range (\<lambda>(i, y). A $h i $h y) = {A $h i $h j |i j. True}
[PROOF STEP]
by auto


[STATEMENT]
lemma hcomplex_hcnj_pow: "\<And>z. hcnj (z ^ n) = hcnj z ^ n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>z. hcnj (z ^ n) = hcnj z ^ n
[PROOF STEP]
by transfer (rule complex_cnj_power)


[STATEMENT]
lemma lzip_llist_of [simp]:
  "lzip (llist_of xs) (llist_of ys) = llist_of (zip xs ys)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lzip (llist_of xs) (llist_of ys) = llist_of (zip xs ys)
[PROOF STEP]
proof(induct xs arbitrary: ys)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>ys. lzip (llist_of []) (llist_of ys) = llist_of (zip [] ys)
 2. \<And>a xs ys. (\<And>ys. lzip (llist_of xs) (llist_of ys) = llist_of (zip xs ys)) \<Longrightarrow> lzip (llist_of (a # xs)) (llist_of ys) = llist_of (zip (a # xs) ys)
[PROOF STEP]
case (Cons x xs')
[PROOF STATE]
proof (state)
this:
lzip (llist_of xs') (llist_of ?ys) = llist_of (zip xs' ?ys)

goal (2 subgoals):
 1. \<And>ys. lzip (llist_of []) (llist_of ys) = llist_of (zip [] ys)
 2. \<And>a xs ys. (\<And>ys. lzip (llist_of xs) (llist_of ys) = llist_of (zip xs ys)) \<Longrightarrow> lzip (llist_of (a # xs)) (llist_of ys) = llist_of (zip (a # xs) ys)
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
lzip (llist_of xs') (llist_of ?ys) = llist_of (zip xs' ?ys)

goal (1 subgoal):
 1. lzip (llist_of (x # xs')) (llist_of ys) = llist_of (zip (x # xs') ys)
[PROOF STEP]
by(cases ys) simp_all
[PROOF STATE]
proof (state)
this:
lzip (llist_of (x # xs')) (llist_of ys) = llist_of (zip (x # xs') ys)

goal (1 subgoal):
 1. \<And>ys. lzip (llist_of []) (llist_of ys) = llist_of (zip [] ys)
[PROOF STEP]
qed simp


[STATEMENT]
lemma fct_gen_subalgebra_sets:
  shows "sets (fct_gen_subalgebra M N X) = sigma_sets (space M) {X -` B \<inter> space M |B. B \<in> sets N}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sets (fct_gen_subalgebra M N X) = sigma_sets (space M) {X -` B \<inter> space M |B. B \<in> sets N}
[PROOF STEP]
unfolding fct_gen_subalgebra_def gen_subalgebra_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sets (sigma (space M) (sigma_sets (space M) {X -` B \<inter> space M |B. B \<in> sets N})) = sigma_sets (space M) {X -` B \<inter> space M |B. B \<in> sets N}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sets (sigma (space M) (sigma_sets (space M) {X -` B \<inter> space M |B. B \<in> sets N})) = sigma_sets (space M) {X -` B \<inter> space M |B. B \<in> sets N}
[PROOF STEP]
have "{X -` B \<inter> space M |B. B \<in> sets N} \<subseteq> Pow (space M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {X -` B \<inter> space M |B. B \<in> sets N} \<subseteq> Pow (space M)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
{X -` B \<inter> space M |B. B \<in> sets N} \<subseteq> Pow (space M)

goal (1 subgoal):
 1. sets (sigma (space M) (sigma_sets (space M) {X -` B \<inter> space M |B. B \<in> sets N})) = sigma_sets (space M) {X -` B \<inter> space M |B. B \<in> sets N}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
{X -` B \<inter> space M |B. B \<in> sets N} \<subseteq> Pow (space M)
[PROOF STEP]
show "sets (sigma (space M) (sigma_sets (space M) {X -` B \<inter> space M |B. B \<in> sets N})) = sigma_sets (space M) {X -` B \<inter> space M |B. B \<in> sets N}"
[PROOF STATE]
proof (prove)
using this:
{X -` B \<inter> space M |B. B \<in> sets N} \<subseteq> Pow (space M)

goal (1 subgoal):
 1. sets (sigma (space M) (sigma_sets (space M) {X -` B \<inter> space M |B. B \<in> sets N})) = sigma_sets (space M) {X -` B \<inter> space M |B. B \<in> sets N}
[PROOF STEP]
by (meson sigma_algebra.sets_measure_of_eq sigma_algebra_sigma_sets)
[PROOF STATE]
proof (state)
this:
sets (sigma (space M) (sigma_sets (space M) {X -` B \<inter> space M |B. B \<in> sets N})) = sigma_sets (space M) {X -` B \<inter> space M |B. B \<in> sets N}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma nat_to_string___is_strong_nat_string:
  "is_strong_nat_string (nat_to_string n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_strong_nat_string (nat_to_string n)
[PROOF STEP]
proof (cases "is_digit n")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. is_digit n \<Longrightarrow> is_strong_nat_string (nat_to_string n)
 2. \<not> is_digit n \<Longrightarrow> is_strong_nat_string (nat_to_string n)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
is_digit n

goal (2 subgoals):
 1. is_digit n \<Longrightarrow> is_strong_nat_string (nat_to_string n)
 2. \<not> is_digit n \<Longrightarrow> is_strong_nat_string (nat_to_string n)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
is_digit n

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

goal (1 subgoal):
 1. \<not> is_digit n \<Longrightarrow> is_strong_nat_string (nat_to_string n)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> is_digit n \<Longrightarrow> is_strong_nat_string (nat_to_string n)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> is_digit n

goal (1 subgoal):
 1. \<not> is_digit n \<Longrightarrow> is_strong_nat_string (nat_to_string n)
[PROOF STEP]
note not_digit = this
[PROOF STATE]
proof (state)
this:
\<not> is_digit n

goal (1 subgoal):
 1. \<not> is_digit n \<Longrightarrow> is_strong_nat_string (nat_to_string n)
[PROOF STEP]
obtain c s' where ns_eq: "nat_to_string n = c # s'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>c s'. nat_to_string n = c # s' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (cases "nat_to_string n") auto
[PROOF STATE]
proof (state)
this:
nat_to_string n = c # s'

goal (1 subgoal):
 1. \<not> is_digit n \<Longrightarrow> is_strong_nat_string (nat_to_string n)
[PROOF STEP]
from not_digit
[PROOF STATE]
proof (chain)
picking this:
\<not> is_digit n
[PROOF STEP]
have "0 < n"
[PROOF STATE]
proof (prove)
using this:
\<not> is_digit n

goal (1 subgoal):
 1. 0 < n
[PROOF STEP]
unfolding is_digit_def
[PROOF STATE]
proof (prove)
using this:
\<not> n < 10

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

goal (1 subgoal):
 1. \<not> is_digit n \<Longrightarrow> is_strong_nat_string (nat_to_string n)
[PROOF STEP]
with ns_eq
[PROOF STATE]
proof (chain)
picking this:
nat_to_string n = c # s'
0 < n
[PROOF STEP]
have c_neq: "c \<noteq> CHR ''0''"
[PROOF STATE]
proof (prove)
using this:
nat_to_string n = c # s'
0 < n

goal (1 subgoal):
 1. c \<noteq> CHR ''0''
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
c \<noteq> CHR ''0''

goal (1 subgoal):
 1. \<not> is_digit n \<Longrightarrow> is_strong_nat_string (nat_to_string n)
[PROOF STEP]
hence "hd (nat_to_string n) \<noteq> CHR ''0''"
[PROOF STATE]
proof (prove)
using this:
c \<noteq> CHR ''0''

goal (1 subgoal):
 1. hd (nat_to_string n) \<noteq> CHR ''0''
[PROOF STEP]
unfolding ns_eq
[PROOF STATE]
proof (prove)
using this:
c \<noteq> CHR ''0''

goal (1 subgoal):
 1. hd (c # s') \<noteq> CHR ''0''
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
hd (nat_to_string n) \<noteq> CHR ''0''

goal (1 subgoal):
 1. \<not> is_digit n \<Longrightarrow> is_strong_nat_string (nat_to_string n)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
hd (nat_to_string n) \<noteq> CHR ''0''

goal (1 subgoal):
 1. is_strong_nat_string (nat_to_string n)
[PROOF STEP]
unfolding is_strong_nat_string_def
[PROOF STATE]
proof (prove)
using this:
hd (nat_to_string n) \<noteq> CHR ''0''

goal (1 subgoal):
 1. is_nat_string (nat_to_string n) \<and> nat_to_string n \<noteq> [] \<and> (hd (nat_to_string n) = CHR ''0'' \<longrightarrow> length (nat_to_string n) = 1)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
is_strong_nat_string (nat_to_string n)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma pair_o_assoc[simp]:
  assumes [simp]: \<open>compatible F G\<close> \<open>compatible G H\<close> \<open>compatible F H\<close>
  shows \<open>(F; (G; H)) \<circ> assoc = ((F; G); H)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (F;(G;H)) \<circ> assoc = ((F;G);H)
[PROOF STEP]
proof (rule tensor_extensionality3')
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. register ((F;(G;H)) \<circ> assoc)
 2. register ((F;G);H)
 3. \<And>f g h. ((F;(G;H)) \<circ> assoc) ((f \<otimes>\<^sub>u g) \<otimes>\<^sub>u h) = ((F;G);H) ((f \<otimes>\<^sub>u g) \<otimes>\<^sub>u h)
[PROOF STEP]
show \<open>register ((F; (G; H)) \<circ> assoc)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. register ((F;(G;H)) \<circ> assoc)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
register ((F;(G;H)) \<circ> assoc)

goal (2 subgoals):
 1. register ((F;G);H)
 2. \<And>f g h. ((F;(G;H)) \<circ> assoc) ((f \<otimes>\<^sub>u g) \<otimes>\<^sub>u h) = ((F;G);H) ((f \<otimes>\<^sub>u g) \<otimes>\<^sub>u h)
[PROOF STEP]
show \<open>register ((F; G); H)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. register ((F;G);H)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
register ((F;G);H)

goal (1 subgoal):
 1. \<And>f g h. ((F;(G;H)) \<circ> assoc) ((f \<otimes>\<^sub>u g) \<otimes>\<^sub>u h) = ((F;G);H) ((f \<otimes>\<^sub>u g) \<otimes>\<^sub>u h)
[PROOF STEP]
show \<open>((F; (G; H)) \<circ> assoc) ((f \<otimes>\<^sub>u g) \<otimes>\<^sub>u h) = ((F; G); H) ((f \<otimes>\<^sub>u g) \<otimes>\<^sub>u h)\<close> for f g h
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((F;(G;H)) \<circ> assoc) ((f \<otimes>\<^sub>u g) \<otimes>\<^sub>u h) = ((F;G);H) ((f \<otimes>\<^sub>u g) \<otimes>\<^sub>u h)
[PROOF STEP]
by (simp add: register_pair_apply assoc_apply comp_update_assoc)
[PROOF STATE]
proof (state)
this:
((F;(G;H)) \<circ> assoc) ((?f \<otimes>\<^sub>u ?g) \<otimes>\<^sub>u ?h) = ((F;G);H) ((?f \<otimes>\<^sub>u ?g) \<otimes>\<^sub>u ?h)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma prod_mset_primes_finite_divisor_powers:
  assumes A: "\<And>x. x \<in># A \<Longrightarrow> prime x"
  assumes B: "\<And>x. x \<in># B \<Longrightarrow> prime x"
  assumes "A \<noteq> {#}"
  shows   "finite {n. prod_mset A ^ n dvd prod_mset B}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {n. \<Prod>\<^sub># A ^ n dvd \<Prod>\<^sub># B}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite {n. \<Prod>\<^sub># A ^ n dvd \<Prod>\<^sub># B}
[PROOF STEP]
from \<open>A \<noteq> {#}\<close>
[PROOF STATE]
proof (chain)
picking this:
A \<noteq> {#}
[PROOF STEP]
obtain x where x: "x \<in># A"
[PROOF STATE]
proof (prove)
using this:
A \<noteq> {#}

goal (1 subgoal):
 1. (\<And>x. x \<in># A \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<in># A

goal (1 subgoal):
 1. finite {n. \<Prod>\<^sub># A ^ n dvd \<Prod>\<^sub># B}
[PROOF STEP]
define m where "m = count B x"
[PROOF STATE]
proof (state)
this:
m = count B x

goal (1 subgoal):
 1. finite {n. \<Prod>\<^sub># A ^ n dvd \<Prod>\<^sub># B}
[PROOF STEP]
have "{n. prod_mset A ^ n dvd prod_mset B} \<subseteq> {..m}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {n. \<Prod>\<^sub># A ^ n dvd \<Prod>\<^sub># B} \<subseteq> {..m}
[PROOF STEP]
proof safe
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<Prod>\<^sub># A ^ x dvd \<Prod>\<^sub># B \<Longrightarrow> x \<le> m
[PROOF STEP]
fix n
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<Prod>\<^sub># A ^ x dvd \<Prod>\<^sub># B \<Longrightarrow> x \<le> m
[PROOF STEP]
assume dvd: "prod_mset A ^ n dvd prod_mset B"
[PROOF STATE]
proof (state)
this:
\<Prod>\<^sub># A ^ n dvd \<Prod>\<^sub># B

goal (1 subgoal):
 1. \<And>x. \<Prod>\<^sub># A ^ x dvd \<Prod>\<^sub># B \<Longrightarrow> x \<le> m
[PROOF STEP]
from x
[PROOF STATE]
proof (chain)
picking this:
x \<in># A
[PROOF STEP]
have "x ^ n dvd prod_mset A ^ n"
[PROOF STATE]
proof (prove)
using this:
x \<in># A

goal (1 subgoal):
 1. x ^ n dvd \<Prod>\<^sub># A ^ n
[PROOF STEP]
by (intro dvd_power_same dvd_prod_mset)
[PROOF STATE]
proof (state)
this:
x ^ n dvd \<Prod>\<^sub># A ^ n

goal (1 subgoal):
 1. \<And>x. \<Prod>\<^sub># A ^ x dvd \<Prod>\<^sub># B \<Longrightarrow> x \<le> m
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x ^ n dvd \<Prod>\<^sub># A ^ n

goal (1 subgoal):
 1. \<And>x. \<Prod>\<^sub># A ^ x dvd \<Prod>\<^sub># B \<Longrightarrow> x \<le> m
[PROOF STEP]
note dvd
[PROOF STATE]
proof (state)
this:
\<Prod>\<^sub># A ^ n dvd \<Prod>\<^sub># B

goal (1 subgoal):
 1. \<And>x. \<Prod>\<^sub># A ^ x dvd \<Prod>\<^sub># B \<Longrightarrow> x \<le> m
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<Prod>\<^sub># A ^ n dvd \<Prod>\<^sub># B

goal (1 subgoal):
 1. \<And>x. \<Prod>\<^sub># A ^ x dvd \<Prod>\<^sub># B \<Longrightarrow> x \<le> m
[PROOF STEP]
have "x ^ n = prod_mset (replicate_mset n x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x ^ n = \<Prod>\<^sub># (replicate_mset n x)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x ^ n = \<Prod>\<^sub># (replicate_mset n x)

goal (1 subgoal):
 1. \<And>x. \<Prod>\<^sub># A ^ x dvd \<Prod>\<^sub># B \<Longrightarrow> x \<le> m
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<Prod>\<^sub># (replicate_mset n x) dvd \<Prod>\<^sub># B
[PROOF STEP]
have "replicate_mset n x \<subseteq># B"
[PROOF STATE]
proof (prove)
using this:
\<Prod>\<^sub># (replicate_mset n x) dvd \<Prod>\<^sub># B

goal (1 subgoal):
 1. replicate_mset n x \<subseteq># B
[PROOF STEP]
by (rule prod_mset_primes_dvd_imp_subset) (insert A B x, simp_all split: if_splits)
[PROOF STATE]
proof (state)
this:
replicate_mset n x \<subseteq># B

goal (1 subgoal):
 1. \<And>x. \<Prod>\<^sub># A ^ x dvd \<Prod>\<^sub># B \<Longrightarrow> x \<le> m
[PROOF STEP]
thus "n \<le> m"
[PROOF STATE]
proof (prove)
using this:
replicate_mset n x \<subseteq># B

goal (1 subgoal):
 1. n \<le> m
[PROOF STEP]
by (simp add: count_le_replicate_mset_subset_eq m_def)
[PROOF STATE]
proof (state)
this:
n \<le> m

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
{n. \<Prod>\<^sub># A ^ n dvd \<Prod>\<^sub># B} \<subseteq> {..m}

goal (1 subgoal):
 1. finite {n. \<Prod>\<^sub># A ^ n dvd \<Prod>\<^sub># B}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
{n. \<Prod>\<^sub># A ^ n dvd \<Prod>\<^sub># B} \<subseteq> {..m}

goal (1 subgoal):
 1. finite {n. \<Prod>\<^sub># A ^ n dvd \<Prod>\<^sub># B}
[PROOF STEP]
have "finite {..m}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {..m}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
finite {..m}

goal (1 subgoal):
 1. finite {n. \<Prod>\<^sub># A ^ n dvd \<Prod>\<^sub># B}
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
{n. \<Prod>\<^sub># A ^ n dvd \<Prod>\<^sub># B} \<subseteq> {..m}
finite {..m}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
{n. \<Prod>\<^sub># A ^ n dvd \<Prod>\<^sub># B} \<subseteq> {..m}
finite {..m}

goal (1 subgoal):
 1. finite {n. \<Prod>\<^sub># A ^ n dvd \<Prod>\<^sub># B}
[PROOF STEP]
by (rule finite_subset)
[PROOF STATE]
proof (state)
this:
finite {n. \<Prod>\<^sub># A ^ n dvd \<Prod>\<^sub># B}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma util_imp_total: "total_on carrier relation"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. total_on carrier relation
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier; y \<in> carrier; x \<noteq> y\<rbrakk> \<Longrightarrow> x \<succeq>[relation] y \<or> y \<succeq>[relation] x
[PROOF STEP]
fix x and y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier; y \<in> carrier; x \<noteq> y\<rbrakk> \<Longrightarrow> x \<succeq>[relation] y \<or> y \<succeq>[relation] x
[PROOF STEP]
assume x_inc: "x \<in> carrier" and y_inc : "y \<in> carrier"
[PROOF STATE]
proof (state)
this:
x \<in> carrier
y \<in> carrier

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier; y \<in> carrier; x \<noteq> y\<rbrakk> \<Longrightarrow> x \<succeq>[relation] y \<or> y \<succeq>[relation] x
[PROOF STEP]
have fst : "u x \<ge> u y \<or> u y \<ge> u x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. u y \<le> u x \<or> u x \<le> u y
[PROOF STEP]
using util_def
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?x \<in> carrier; ?y \<in> carrier\<rbrakk> \<Longrightarrow> ?x \<succeq>[relation] ?y = (u ?y \<le> u ?x)

goal (1 subgoal):
 1. u y \<le> u x \<or> u x \<le> u y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
u y \<le> u x \<or> u x \<le> u y

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier; y \<in> carrier; x \<noteq> y\<rbrakk> \<Longrightarrow> x \<succeq>[relation] y \<or> y \<succeq>[relation] x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
u y \<le> u x \<or> u x \<le> u y
[PROOF STEP]
show  "x \<succeq>[relation] y \<or> y \<succeq>[relation] x"
[PROOF STATE]
proof (prove)
using this:
u y \<le> u x \<or> u x \<le> u y

goal (1 subgoal):
 1. x \<succeq>[relation] y \<or> y \<succeq>[relation] x
[PROOF STEP]
by (simp add: x_inc y_inc)
[PROOF STATE]
proof (state)
this:
x \<succeq>[relation] y \<or> y \<succeq>[relation] x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in algebra) lambda_system_additive: "additive (lambda_system \<Omega> M f) f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Measure_Space.additive (lambda_system \<Omega> M f) f
[PROOF STEP]
proof (auto simp add: additive_def)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> lambda_system \<Omega> M f; y \<in> lambda_system \<Omega> M f; x \<inter> y = {}\<rbrakk> \<Longrightarrow> f (x \<union> y) = f x + f y
[PROOF STEP]
fix x and y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> lambda_system \<Omega> M f; y \<in> lambda_system \<Omega> M f; x \<inter> y = {}\<rbrakk> \<Longrightarrow> f (x \<union> y) = f x + f y
[PROOF STEP]
assume disj: "x \<inter> y = {}"
     and xl: "x \<in> lambda_system \<Omega> M f" and yl: "y \<in> lambda_system \<Omega> M f"
[PROOF STATE]
proof (state)
this:
x \<inter> y = {}
x \<in> lambda_system \<Omega> M f
y \<in> lambda_system \<Omega> M f

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> lambda_system \<Omega> M f; y \<in> lambda_system \<Omega> M f; x \<inter> y = {}\<rbrakk> \<Longrightarrow> f (x \<union> y) = f x + f y
[PROOF STEP]
hence  "x \<in> M" "y \<in> M"
[PROOF STATE]
proof (prove)
using this:
x \<inter> y = {}
x \<in> lambda_system \<Omega> M f
y \<in> lambda_system \<Omega> M f

goal (1 subgoal):
 1. x \<in> M &&& y \<in> M
[PROOF STEP]
by (blast intro: lambda_system_sets)+
[PROOF STATE]
proof (state)
this:
x \<in> M
y \<in> M

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> lambda_system \<Omega> M f; y \<in> lambda_system \<Omega> M f; x \<inter> y = {}\<rbrakk> \<Longrightarrow> f (x \<union> y) = f x + f y
[PROOF STEP]
thus "f (x \<union> y) = f x + f y"
[PROOF STATE]
proof (prove)
using this:
x \<in> M
y \<in> M

goal (1 subgoal):
 1. f (x \<union> y) = f x + f y
[PROOF STEP]
using lambda_system_strong_additive [OF top disj xl yl]
[PROOF STATE]
proof (prove)
using this:
x \<in> M
y \<in> M
f (\<Omega> \<inter> (x \<union> y)) = f (\<Omega> \<inter> x) + f (\<Omega> \<inter> y)

goal (1 subgoal):
 1. f (x \<union> y) = f x + f y
[PROOF STEP]
by (simp add: Un)
[PROOF STATE]
proof (state)
this:
f (x \<union> y) = f x + f y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma returns_to_return_time_pos:
  assumes "closed P"
  shows "returns_to P x \<longleftrightarrow> return_time P x > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. returns_to P x = (0 < return_time P x)
[PROOF STEP]
by (auto intro!: return_time_pos assms) (auto simp: return_time_def split: if_splits)


[STATEMENT]
lemma (in Ring) sum_of_prideals0:
      "\<forall>f. (\<forall>l \<le> n. f l \<in> carrier R) \<longrightarrow> ideal R (sum_pr_ideals R f n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>f. (\<forall>l\<le>n. f l \<in> carrier R) \<longrightarrow> ideal R (sum_pr_ideals R f n)
[PROOF STEP]
apply (induct_tac n)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<forall>f. (\<forall>l\<le>0. f l \<in> carrier R) \<longrightarrow> ideal R (sum_pr_ideals R f 0)
 2. \<And>n. \<forall>f. (\<forall>l\<le>n. f l \<in> carrier R) \<longrightarrow> ideal R (sum_pr_ideals R f n) \<Longrightarrow> \<forall>f. (\<forall>l\<le>Suc n. f l \<in> carrier R) \<longrightarrow> ideal R (sum_pr_ideals R f (Suc n))
[PROOF STEP]
apply (rule allI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>f. (\<forall>l\<le>0. f l \<in> carrier R) \<longrightarrow> ideal R (sum_pr_ideals R f 0)
 2. \<And>n. \<forall>f. (\<forall>l\<le>n. f l \<in> carrier R) \<longrightarrow> ideal R (sum_pr_ideals R f n) \<Longrightarrow> \<forall>f. (\<forall>l\<le>Suc n. f l \<in> carrier R) \<longrightarrow> ideal R (sum_pr_ideals R f (Suc n))
[PROOF STEP]
apply (rule impI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>f. \<forall>l\<le>0. f l \<in> carrier R \<Longrightarrow> ideal R (sum_pr_ideals R f 0)
 2. \<And>n. \<forall>f. (\<forall>l\<le>n. f l \<in> carrier R) \<longrightarrow> ideal R (sum_pr_ideals R f n) \<Longrightarrow> \<forall>f. (\<forall>l\<le>Suc n. f l \<in> carrier R) \<longrightarrow> ideal R (sum_pr_ideals R f (Suc n))
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>f. f 0 \<in> carrier R \<Longrightarrow> ideal R (R \<diamondsuit>\<^sub>p f 0)
 2. \<And>n. \<forall>f. (\<forall>l\<le>n. f l \<in> carrier R) \<longrightarrow> ideal R (sum_pr_ideals R f n) \<Longrightarrow> \<forall>f. (\<forall>l\<le>Suc n. f l \<in> carrier R) \<longrightarrow> ideal R (sum_pr_ideals R f (Suc n))
[PROOF STEP]
apply (rule Ring.principal_ideal, rule Ring_axioms, assumption)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n. \<forall>f. (\<forall>l\<le>n. f l \<in> carrier R) \<longrightarrow> ideal R (sum_pr_ideals R f n) \<Longrightarrow> \<forall>f. (\<forall>l\<le>Suc n. f l \<in> carrier R) \<longrightarrow> ideal R (sum_pr_ideals R f (Suc n))
[PROOF STEP]
(** case n **)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n. \<forall>f. (\<forall>l\<le>n. f l \<in> carrier R) \<longrightarrow> ideal R (sum_pr_ideals R f n) \<Longrightarrow> \<forall>f. (\<forall>l\<le>Suc n. f l \<in> carrier R) \<longrightarrow> ideal R (sum_pr_ideals R f (Suc n))
[PROOF STEP]
apply (rule allI, rule impI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<forall>f. (\<forall>l\<le>n. f l \<in> carrier R) \<longrightarrow> ideal R (sum_pr_ideals R f n); \<forall>l\<le>Suc n. f l \<in> carrier R\<rbrakk> \<Longrightarrow> ideal R (sum_pr_ideals R f (Suc n))
[PROOF STEP]
apply (frule_tac x = f in spec,
        thin_tac "\<forall>f. (\<forall>l \<le> n. f l \<in> carrier R) \<longrightarrow>
               ideal R (sum_pr_ideals R f n)")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<forall>l\<le>Suc n. f l \<in> carrier R; (\<forall>l\<le>n. f l \<in> carrier R) \<longrightarrow> ideal R (sum_pr_ideals R f n)\<rbrakk> \<Longrightarrow> ideal R (sum_pr_ideals R f (Suc n))
[PROOF STEP]
apply (cut_tac n = n in Nsetn_sub_mem1, simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<forall>l\<le>Suc n. f l \<in> carrier R; ideal R (sum_pr_ideals R f n)\<rbrakk> \<Longrightarrow> ideal R (R \<diamondsuit>\<^sub>p f (Suc n) \<minusplus> sum_pr_ideals R f n)
[PROOF STEP]
apply (cut_tac a = "f (Suc n)" in  principal_ideal,
       simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n f. \<lbrakk>\<forall>l\<le>Suc n. f l \<in> carrier R; ideal R (sum_pr_ideals R f n); ideal R (R \<diamondsuit>\<^sub>p f (Suc n))\<rbrakk> \<Longrightarrow> ideal R (R \<diamondsuit>\<^sub>p f (Suc n) \<minusplus> sum_pr_ideals R f n)
[PROOF STEP]
apply (rule_tac ?I1.0 = "Rxa R (f (Suc n))" and
        ?I2.0 = "sum_pr_ideals R f n" in Ring.sum_ideals, rule Ring_axioms, assumption+)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma finite_ta_reachable [simp]:
  "finite {q. \<exists>t. ground t \<and> q |\<in>| ta_der \<A> t}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {q. \<exists>t. ground t \<and> q |\<in>| ta_der \<A> t}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite {q. \<exists>t. ground t \<and> q |\<in>| ta_der \<A> t}
[PROOF STEP]
have "{q. \<exists>t. ground t \<and> q |\<in>| ta_der \<A> t} \<subseteq> fset (\<Q> \<A>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {q. \<exists>t. ground t \<and> q |\<in>| ta_der \<A> t} \<subseteq> fset (\<Q> \<A>)
[PROOF STEP]
using ground_ta_der_states[of _ \<A>]
[PROOF STATE]
proof (prove)
using this:
ground ?t \<Longrightarrow> ta_der \<A> ?t |\<subseteq>| \<Q> \<A>

goal (1 subgoal):
 1. {q. \<exists>t. ground t \<and> q |\<in>| ta_der \<A> t} \<subseteq> fset (\<Q> \<A>)
[PROOF STEP]
by auto (metis fsubsetD notin_fset)
[PROOF STATE]
proof (state)
this:
{q. \<exists>t. ground t \<and> q |\<in>| ta_der \<A> t} \<subseteq> fset (\<Q> \<A>)

goal (1 subgoal):
 1. finite {q. \<exists>t. ground t \<and> q |\<in>| ta_der \<A> t}
[PROOF STEP]
from finite_subset[OF this]
[PROOF STATE]
proof (chain)
picking this:
finite (fset (\<Q> \<A>)) \<Longrightarrow> finite {q. \<exists>t. ground t \<and> q |\<in>| ta_der \<A> t}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
finite (fset (\<Q> \<A>)) \<Longrightarrow> finite {q. \<exists>t. ground t \<and> q |\<in>| ta_der \<A> t}

goal (1 subgoal):
 1. finite {q. \<exists>t. ground t \<and> q |\<in>| ta_der \<A> t}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite {q. \<exists>t. ground t \<and> q |\<in>| ta_der \<A> t}

goal:
No subgoals!
[PROOF STEP]
qed