[STATEMENT]
lemma nn_integral_LIMSEQ:
  assumes f: "incseq f" "\<And>i. f i \<in> borel_measurable M"
    and u: "\<And>x. (\<lambda>i. f i x) \<longlonglongrightarrow> u x"
  shows "(\<lambda>n. integral\<^sup>N M (f n)) \<longlonglongrightarrow> integral\<^sup>N M u"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. integral\<^sup>N M (f n)) \<longlonglongrightarrow> integral\<^sup>N M u
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>n. integral\<^sup>N M (f n)) \<longlonglongrightarrow> integral\<^sup>N M u
[PROOF STEP]
have "(\<lambda>n. integral\<^sup>N M (f n)) \<longlonglongrightarrow> (SUP n. integral\<^sup>N M (f n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. integral\<^sup>N M (f n)) \<longlonglongrightarrow> (SUP n. integral\<^sup>N M (f n))
[PROOF STEP]
using f
[PROOF STATE]
proof (prove)
using this:
incseq f
f ?i \<in> borel_measurable M

goal (1 subgoal):
 1. (\<lambda>n. integral\<^sup>N M (f n)) \<longlonglongrightarrow> (SUP n. integral\<^sup>N M (f n))
[PROOF STEP]
by (intro LIMSEQ_SUP[of "\<lambda>n. integral\<^sup>N M (f n)"] incseq_nn_integral)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. integral\<^sup>N M (f n)) \<longlonglongrightarrow> (SUP n. integral\<^sup>N M (f n))

goal (1 subgoal):
 1. (\<lambda>n. integral\<^sup>N M (f n)) \<longlonglongrightarrow> integral\<^sup>N M u
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>n. integral\<^sup>N M (f n)) \<longlonglongrightarrow> (SUP n. integral\<^sup>N M (f n))

goal (1 subgoal):
 1. (\<lambda>n. integral\<^sup>N M (f n)) \<longlonglongrightarrow> integral\<^sup>N M u
[PROOF STEP]
have "(SUP n. integral\<^sup>N M (f n)) = integral\<^sup>N M (\<lambda>x. SUP n. f n x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (SUP n. integral\<^sup>N M (f n)) = \<integral>\<^sup>+ x. (SUP n. f n x) \<partial>M
[PROOF STEP]
using f
[PROOF STATE]
proof (prove)
using this:
incseq f
f ?i \<in> borel_measurable M

goal (1 subgoal):
 1. (SUP n. integral\<^sup>N M (f n)) = \<integral>\<^sup>+ x. (SUP n. f n x) \<partial>M
[PROOF STEP]
by (intro nn_integral_monotone_convergence_SUP[symmetric])
[PROOF STATE]
proof (state)
this:
(SUP n. integral\<^sup>N M (f n)) = \<integral>\<^sup>+ x. (SUP n. f n x) \<partial>M

goal (1 subgoal):
 1. (\<lambda>n. integral\<^sup>N M (f n)) \<longlonglongrightarrow> integral\<^sup>N M u
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(SUP n. integral\<^sup>N M (f n)) = \<integral>\<^sup>+ x. (SUP n. f n x) \<partial>M

goal (1 subgoal):
 1. (\<lambda>n. integral\<^sup>N M (f n)) \<longlonglongrightarrow> integral\<^sup>N M u
[PROOF STEP]
have "integral\<^sup>N M (\<lambda>x. SUP n. f n x) = integral\<^sup>N M (\<lambda>x. u x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+ x. (SUP n. f n x) \<partial>M = integral\<^sup>N M u
[PROOF STEP]
using f
[PROOF STATE]
proof (prove)
using this:
incseq f
f ?i \<in> borel_measurable M

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. (SUP n. f n x) \<partial>M = integral\<^sup>N M u
[PROOF STEP]
by (subst LIMSEQ_SUP[THEN LIMSEQ_unique, OF _ u]) (auto simp: incseq_def le_fun_def)
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. (SUP n. f n x) \<partial>M = integral\<^sup>N M u

goal (1 subgoal):
 1. (\<lambda>n. integral\<^sup>N M (f n)) \<longlonglongrightarrow> integral\<^sup>N M u
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. integral\<^sup>N M (f n)) \<longlonglongrightarrow> integral\<^sup>N M u
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. integral\<^sup>N M (f n)) \<longlonglongrightarrow> integral\<^sup>N M u

goal (1 subgoal):
 1. (\<lambda>n. integral\<^sup>N M (f n)) \<longlonglongrightarrow> integral\<^sup>N M u
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<lambda>n. integral\<^sup>N M (f n)) \<longlonglongrightarrow> integral\<^sup>N M u

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma coplanar_affine_hull_coplanar: "coplanar(affine hull s) \<longleftrightarrow> coplanar s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. coplanar (affine hull s) = coplanar s
[PROOF STEP]
unfolding coplanar_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>u v w. affine hull s \<subseteq> affine hull {u, v, w}) = (\<exists>u v w. s \<subseteq> affine hull {u, v, w})
[PROOF STEP]
by (metis affine_affine_hull subset_hull hull_hull hull_mono)


[STATEMENT]
lemma obtain_subset_with_card_int_n:
  assumes "(n ::int) \<le> of_nat (card S)"
  assumes "(n ::int) \<ge> 0"
  obtains T where "T \<subseteq> S" "of_nat (card T) = (n ::int)" "finite T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>T. \<lbrakk>T \<subseteq> S; int (card T) = n; finite T\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using obtain_subset_with_card_n assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?n \<le> card ?S; \<And>T. \<lbrakk>T \<subseteq> ?S; card T = ?n; finite T\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis
n \<le> int (card S)
0 \<le> n

goal (1 subgoal):
 1. (\<And>T. \<lbrakk>T \<subseteq> S; int (card T) = n; finite T\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis nonneg_int_cases of_nat_le_iff)


[STATEMENT]
lemma bind_spmf_const: "bind_spmf p (\<lambda>x. q) = scale_spmf (weight_spmf p) q" (is "?lhs = ?rhs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p \<bind> (\<lambda>x. q) = scale_spmf (weight_spmf p) q
[PROOF STEP]
proof(rule spmf_eqI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. spmf (p \<bind> (\<lambda>x. q)) i = spmf (scale_spmf (weight_spmf p) q) i
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. spmf (p \<bind> (\<lambda>x. q)) i = spmf (scale_spmf (weight_spmf p) q) i
[PROOF STEP]
have "ennreal (spmf ?lhs x) = ennreal (spmf ?rhs x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ennreal (spmf (p \<bind> (\<lambda>x. q)) x) = ennreal (spmf (scale_spmf (weight_spmf p) q) x)
[PROOF STEP]
using measure_spmf.subprob_measure_le_1[of p "space (measure_spmf p)"]
[PROOF STATE]
proof (prove)
using this:
weight_spmf p \<le> 1

goal (1 subgoal):
 1. ennreal (spmf (p \<bind> (\<lambda>x. q)) x) = ennreal (spmf (scale_spmf (weight_spmf p) q) x)
[PROOF STEP]
by(subst ennreal_spmf_bind)(simp add: spmf_scale_spmf' weight_spmf_le_1 ennreal_mult mult.commute max_def min_def measure_spmf.emeasure_eq_measure)
[PROOF STATE]
proof (state)
this:
ennreal (spmf (p \<bind> (\<lambda>x. q)) x) = ennreal (spmf (scale_spmf (weight_spmf p) q) x)

goal (1 subgoal):
 1. \<And>i. spmf (p \<bind> (\<lambda>x. q)) i = spmf (scale_spmf (weight_spmf p) q) i
[PROOF STEP]
thus "spmf ?lhs x = spmf ?rhs x"
[PROOF STATE]
proof (prove)
using this:
ennreal (spmf (p \<bind> (\<lambda>x. q)) x) = ennreal (spmf (scale_spmf (weight_spmf p) q) x)

goal (1 subgoal):
 1. spmf (p \<bind> (\<lambda>x. q)) x = spmf (scale_spmf (weight_spmf p) q) x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
spmf (p \<bind> (\<lambda>x. q)) x = spmf (scale_spmf (weight_spmf p) q) x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma dist_fps_sym: "dist (a :: 'a fps) b = dist b a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dist a b = dist b a
[PROOF STEP]
by (simp add: dist_fps_def)


[STATEMENT]
lemma (in group) subgroup_Units:
  assumes "subgroup H G" shows "H \<subseteq> Units (G \<lparr> carrier := H \<rparr>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. H \<subseteq> Units (G\<lparr>carrier := H\<rparr>)
[PROOF STEP]
using group.Units[OF subgroup.subgroup_is_group[OF assms group_axioms]]
[PROOF STATE]
proof (prove)
using this:
carrier (G\<lparr>carrier := H\<rparr>) \<subseteq> Units (G\<lparr>carrier := H\<rparr>)

goal (1 subgoal):
 1. H \<subseteq> Units (G\<lparr>carrier := H\<rparr>)
[PROOF STEP]
by simp


[STATEMENT]
lemma while_separate_unfold_below:
  "(y * (x \<star> 1)) \<star> z \<le> (y \<star> z) \<squnion> (y \<star> (y * x * (x \<star> ((y * (x \<star> 1)) \<star> z))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y * (x \<star> (1::'a)) \<star> z \<le> (y \<star> z) \<squnion> (y \<star> y * x * (x \<star> y * (x \<star> (1::'a)) \<star> z))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. y * (x \<star> (1::'a)) \<star> z \<le> (y \<star> z) \<squnion> (y \<star> y * x * (x \<star> y * (x \<star> (1::'a)) \<star> z))
[PROOF STEP]
have "(y * (x \<star> 1)) \<star> z = (y \<star> (y * x * (x \<star> 1))) \<star> (y \<star> z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y * (x \<star> (1::'a)) \<star> z = (y \<star> y * x * (x \<star> (1::'a))) \<star> y \<star> z
[PROOF STEP]
by (metis mult_assoc mult_left_dist_sup mult_1_right while_left_unfold while_sumstar)
[PROOF STATE]
proof (state)
this:
y * (x \<star> (1::'a)) \<star> z = (y \<star> y * x * (x \<star> (1::'a))) \<star> y \<star> z

goal (1 subgoal):
 1. y * (x \<star> (1::'a)) \<star> z \<le> (y \<star> z) \<squnion> (y \<star> y * x * (x \<star> y * (x \<star> (1::'a)) \<star> z))
[PROOF STEP]
hence "(y * (x \<star> 1)) \<star> z = (y \<star> z) \<squnion> (y \<star> (y * x * (x \<star> 1))) * ((y * (x \<star> 1)) \<star> z)"
[PROOF STATE]
proof (prove)
using this:
y * (x \<star> (1::'a)) \<star> z = (y \<star> y * x * (x \<star> (1::'a))) \<star> y \<star> z

goal (1 subgoal):
 1. y * (x \<star> (1::'a)) \<star> z = (y \<star> z) \<squnion> (y \<star> y * x * (x \<star> (1::'a))) * (y * (x \<star> (1::'a)) \<star> z)
[PROOF STEP]
using while_left_unfold
[PROOF STATE]
proof (prove)
using this:
y * (x \<star> (1::'a)) \<star> z = (y \<star> y * x * (x \<star> (1::'a))) \<star> y \<star> z
?x \<star> ?y = ?y \<squnion> ?x * (?x \<star> ?y)

goal (1 subgoal):
 1. y * (x \<star> (1::'a)) \<star> z = (y \<star> z) \<squnion> (y \<star> y * x * (x \<star> (1::'a))) * (y * (x \<star> (1::'a)) \<star> z)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
y * (x \<star> (1::'a)) \<star> z = (y \<star> z) \<squnion> (y \<star> y * x * (x \<star> (1::'a))) * (y * (x \<star> (1::'a)) \<star> z)

goal (1 subgoal):
 1. y * (x \<star> (1::'a)) \<star> z \<le> (y \<star> z) \<squnion> (y \<star> y * x * (x \<star> y * (x \<star> (1::'a)) \<star> z))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
y * (x \<star> (1::'a)) \<star> z = (y \<star> z) \<squnion> (y \<star> y * x * (x \<star> (1::'a))) * (y * (x \<star> (1::'a)) \<star> z)

goal (1 subgoal):
 1. y * (x \<star> (1::'a)) \<star> z \<le> (y \<star> z) \<squnion> (y \<star> y * x * (x \<star> y * (x \<star> (1::'a)) \<star> z))
[PROOF STEP]
have "... \<le> (y \<star> z) \<squnion> (y \<star> (y * x * (x \<star> 1)) * ((y * (x \<star> 1)) \<star> z))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (y \<star> z) \<squnion> (y \<star> y * x * (x \<star> (1::'a))) * (y * (x \<star> (1::'a)) \<star> z) \<le> (y \<star> z) \<squnion> (y \<star> y * x * (x \<star> (1::'a)) * (y * (x \<star> (1::'a)) \<star> z))
[PROOF STEP]
using sup_right_isotone while_sub_associative
[PROOF STATE]
proof (prove)
using this:
?x \<le> ?y \<Longrightarrow> ?z \<squnion> ?x \<le> ?z \<squnion> ?y
(?x \<star> ?y) * ?z \<le> ?x \<star> ?y * ?z

goal (1 subgoal):
 1. (y \<star> z) \<squnion> (y \<star> y * x * (x \<star> (1::'a))) * (y * (x \<star> (1::'a)) \<star> z) \<le> (y \<star> z) \<squnion> (y \<star> y * x * (x \<star> (1::'a)) * (y * (x \<star> (1::'a)) \<star> z))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(y \<star> z) \<squnion> (y \<star> y * x * (x \<star> (1::'a))) * (y * (x \<star> (1::'a)) \<star> z) \<le> (y \<star> z) \<squnion> (y \<star> y * x * (x \<star> (1::'a)) * (y * (x \<star> (1::'a)) \<star> z))

goal (1 subgoal):
 1. y * (x \<star> (1::'a)) \<star> z \<le> (y \<star> z) \<squnion> (y \<star> y * x * (x \<star> y * (x \<star> (1::'a)) \<star> z))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(y \<star> z) \<squnion> (y \<star> y * x * (x \<star> (1::'a))) * (y * (x \<star> (1::'a)) \<star> z) \<le> (y \<star> z) \<squnion> (y \<star> y * x * (x \<star> (1::'a)) * (y * (x \<star> (1::'a)) \<star> z))

goal (1 subgoal):
 1. y * (x \<star> (1::'a)) \<star> z \<le> (y \<star> z) \<squnion> (y \<star> y * x * (x \<star> y * (x \<star> (1::'a)) \<star> z))
[PROOF STEP]
have "... \<le> (y \<star> z) \<squnion> (y \<star> (y * x * (x \<star> ((y * (x \<star> 1)) \<star> z))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (y \<star> z) \<squnion> (y \<star> y * x * (x \<star> (1::'a)) * (y * (x \<star> (1::'a)) \<star> z)) \<le> (y \<star> z) \<squnion> (y \<star> y * x * (x \<star> y * (x \<star> (1::'a)) \<star> z))
[PROOF STEP]
by (smt sup_right_isotone mult_assoc mult_right_isotone while_one_mult_below while_right_isotone)
[PROOF STATE]
proof (state)
this:
(y \<star> z) \<squnion> (y \<star> y * x * (x \<star> (1::'a)) * (y * (x \<star> (1::'a)) \<star> z)) \<le> (y \<star> z) \<squnion> (y \<star> y * x * (x \<star> y * (x \<star> (1::'a)) \<star> z))

goal (1 subgoal):
 1. y * (x \<star> (1::'a)) \<star> z \<le> (y \<star> z) \<squnion> (y \<star> y * x * (x \<star> y * (x \<star> (1::'a)) \<star> z))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
y * (x \<star> (1::'a)) \<star> z \<le> (y \<star> z) \<squnion> (y \<star> y * x * (x \<star> y * (x \<star> (1::'a)) \<star> z))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
y * (x \<star> (1::'a)) \<star> z \<le> (y \<star> z) \<squnion> (y \<star> y * x * (x \<star> y * (x \<star> (1::'a)) \<star> z))

goal (1 subgoal):
 1. y * (x \<star> (1::'a)) \<star> z \<le> (y \<star> z) \<squnion> (y \<star> y * x * (x \<star> y * (x \<star> (1::'a)) \<star> z))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
y * (x \<star> (1::'a)) \<star> z \<le> (y \<star> z) \<squnion> (y \<star> y * x * (x \<star> y * (x \<star> (1::'a)) \<star> z))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma integrable_eq: "\<lbrakk>f integrable_on s; \<And>x. x \<in> s \<Longrightarrow> f x = g x\<rbrakk> \<Longrightarrow> g integrable_on s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f integrable_on s; \<And>x. x \<in> s \<Longrightarrow> f x = g x\<rbrakk> \<Longrightarrow> g integrable_on s
[PROOF STEP]
unfolding integrable_on_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<exists>y. (f has_integral y) s; \<And>x. x \<in> s \<Longrightarrow> f x = g x\<rbrakk> \<Longrightarrow> \<exists>y. (g has_integral y) s
[PROOF STEP]
using has_integral_eq[of s f g] has_integral_eq
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>x. x \<in> s \<Longrightarrow> f x = g x; (f has_integral ?k) s\<rbrakk> \<Longrightarrow> (g has_integral ?k) s
\<lbrakk>\<And>x. x \<in> ?s \<Longrightarrow> ?f x = ?g x; (?f has_integral ?k) ?s\<rbrakk> \<Longrightarrow> (?g has_integral ?k) ?s

goal (1 subgoal):
 1. \<lbrakk>\<exists>y. (f has_integral y) s; \<And>x. x \<in> s \<Longrightarrow> f x = g x\<rbrakk> \<Longrightarrow> \<exists>y. (g has_integral y) s
[PROOF STEP]
by blast


[STATEMENT]
theorem E6:  "\<turnstile> \<box>F \<longrightarrow> \<diamond>\<box>F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> \<box>F \<longrightarrow> \<diamond>\<box>F
[PROOF STEP]
using E4[of "TEMP \<box>F"]
[PROOF STATE]
proof (prove)
using this:
\<turnstile> \<box>\<box>F \<longrightarrow> \<diamond>\<box>F

goal (1 subgoal):
 1. \<turnstile> \<box>F \<longrightarrow> \<diamond>\<box>F
[PROOF STEP]
by simp


[STATEMENT]
lemma DropToShift:
fixes
  l i list
assumes
  "l + i < length list"
shows
  "(drop l list) ! i = list ! (l + i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. drop l list ! i = list ! (l + i)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
l + i < length list

goal (1 subgoal):
 1. drop l list ! i = list ! (l + i)
[PROOF STEP]
by (induct l, auto)


[STATEMENT]
lemma psubst_neg[simp]:
  assumes "\<phi> \<in> fmla"
    and "snd ` (set txs) \<subseteq> var" "fst ` (set txs) \<subseteq> trm"
    and "distinct (map snd txs)"
  shows "psubst (neg \<phi>) txs = neg (psubst \<phi> txs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. psubst (neg \<phi>) txs = neg (psubst \<phi> txs)
[PROOF STEP]
unfolding neg_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. psubst (imp \<phi> fls) txs = imp (psubst \<phi> txs) fls
[PROOF STEP]
using assms psubst_imp psubst_fls
[PROOF STATE]
proof (prove)
using this:
\<phi> \<in> fmla
snd ` set txs \<subseteq> var
fst ` set txs \<subseteq> trm
distinct (map snd txs)
\<lbrakk>?\<phi>1.0 \<in> fmla; ?\<phi>2.0 \<in> fmla; snd ` set ?txs \<subseteq> var; fst ` set ?txs \<subseteq> trm; distinct (map snd ?txs)\<rbrakk> \<Longrightarrow> psubst (imp ?\<phi>1.0 ?\<phi>2.0) ?txs = imp (psubst ?\<phi>1.0 ?txs) (psubst ?\<phi>2.0 ?txs)
\<lbrakk>snd ` set ?txs \<subseteq> var; fst ` set ?txs \<subseteq> trm\<rbrakk> \<Longrightarrow> psubst fls ?txs = fls

goal (1 subgoal):
 1. psubst (imp \<phi> fls) txs = imp (psubst \<phi> txs) fls
[PROOF STEP]
by auto


[STATEMENT]
lemma image_add_cball [simp]:
  fixes a :: "'a::real_normed_vector"
  shows "(+) b ` cball a r = cball (a+b) r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (+) b ` cball a r = cball (a + b) r
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (+) b ` cball a r = cball (a + b) r
[PROOF STEP]
have "\<And>x. dist (a + b) x \<le> r \<Longrightarrow> \<exists>y\<in>cball a r. x = b + y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. dist (a + b) x \<le> r \<Longrightarrow> \<exists>y\<in>cball a r. x = b + y
[PROOF STEP]
by (metis (no_types) add.commute diff_add_cancel dist_add_cancel2 mem_cball)
[PROOF STATE]
proof (state)
this:
dist (a + b) ?x \<le> r \<Longrightarrow> \<exists>y\<in>cball a r. ?x = b + y

goal (1 subgoal):
 1. (+) b ` cball a r = cball (a + b) r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
dist (a + b) ?x \<le> r \<Longrightarrow> \<exists>y\<in>cball a r. ?x = b + y
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
dist (a + b) ?x \<le> r \<Longrightarrow> \<exists>y\<in>cball a r. ?x = b + y

goal (1 subgoal):
 1. (+) b ` cball a r = cball (a + b) r
[PROOF STEP]
by (force simp: add.commute)
[PROOF STATE]
proof (state)
this:
(+) b ` cball a r = cball (a + b) r

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma subst_typ'_subst_bv1: "subst_typ' insts (subst_bv1 t n u)
  = subst_bv1 (subst_typ' insts t) n (subst_typ' insts u)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subst_typ' insts (subst_bv1 t n u) = subst_bv1 (subst_typ' insts t) n (subst_typ' insts u)
[PROOF STEP]
by (induction t n u rule: subst_bv1.induct) (auto simp add: subst_typ'_incr_boundvars)


[STATEMENT]
lemma path_is_rtrancl:
  assumes "path E u l v"
  shows "(u,v)\<in>E\<^sup>*"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (u, v) \<in> E\<^sup>*
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
path E u l v

goal (1 subgoal):
 1. (u, v) \<in> E\<^sup>*
[PROOF STEP]
by induct auto


[STATEMENT]
lemma cong_less_imp_eq_int: "0 \<le> a \<Longrightarrow> a < m \<Longrightarrow> 0 \<le> b \<Longrightarrow> b < m \<Longrightarrow> [a = b] (mod m) \<Longrightarrow> a = b"
  for a b :: int
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 \<le> a; a < m; 0 \<le> b; b < m; [a = b] (mod m)\<rbrakk> \<Longrightarrow> a = b
[PROOF STEP]
by (auto simp add: cong_def)


[STATEMENT]
lemma lower_circle_map:
  "{x::complex. 1 / x \<in> (\<lambda>x. x + 1) ` {x. Im x > - sqrt 3 * Re x}} = lower_circle_01"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. - sqrt 3 * Re x < Im x}} = lower_circle_01
[PROOF STEP]
proof (subst cnj_upper_circle_01[symmetric], subst upper_circle_map[symmetric])
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. - sqrt 3 * Re x < Im x}} = cnj ` {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}}
[PROOF STEP]
have "{x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. - sqrt 3 * Re x < Im x}} =
        {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. sqrt 3 * Re (cnj x) > Im (cnj x)}}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. - sqrt 3 * Re x < Im x}} = {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. Im (cnj x) < sqrt 3 * Re (cnj x)}}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. - sqrt 3 * Re x < Im x}} = {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. Im (cnj x) < sqrt 3 * Re (cnj x)}}

goal (1 subgoal):
 1. {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. - sqrt 3 * Re x < Im x}} = cnj ` {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
{x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. - sqrt 3 * Re x < Im x}} = {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. Im (cnj x) < sqrt 3 * Re (cnj x)}}

goal (1 subgoal):
 1. {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. - sqrt 3 * Re x < Im x}} = cnj ` {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}}
[PROOF STEP]
have "... = {x. 1 / x \<in> (\<lambda>x. x + 1) ` cnj ` {x. sqrt 3 * Re x > Im x}}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. Im (cnj x) < sqrt 3 * Re (cnj x)}} = {x. 1 / x \<in> (\<lambda>x. x + 1) ` cnj ` {x. Im x < sqrt 3 * Re x}}
[PROOF STEP]
apply (subst(2) bij_image_Collect_eq)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. bij cnj
 2. {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. Im (cnj x) < sqrt 3 * Re (cnj x)}} = {x. 1 / x \<in> (\<lambda>x. x + 1) ` {y. Im (inv cnj y) < sqrt 3 * Re (inv cnj y)}}
[PROOF STEP]
apply (metis bijI' complex_cnj_cnj)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. Im (cnj x) < sqrt 3 * Re (cnj x)}} = {x. 1 / x \<in> (\<lambda>x. x + 1) ` {y. Im (inv cnj y) < sqrt 3 * Re (inv cnj y)}}
[PROOF STEP]
by (auto simp: inj_def inj_imp_inv_eq[of _ cnj])
[PROOF STATE]
proof (state)
this:
{x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. Im (cnj x) < sqrt 3 * Re (cnj x)}} = {x. 1 / x \<in> (\<lambda>x. x + 1) ` cnj ` {x. Im x < sqrt 3 * Re x}}

goal (1 subgoal):
 1. {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. - sqrt 3 * Re x < Im x}} = cnj ` {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
{x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. Im (cnj x) < sqrt 3 * Re (cnj x)}} = {x. 1 / x \<in> (\<lambda>x. x + 1) ` cnj ` {x. Im x < sqrt 3 * Re x}}

goal (1 subgoal):
 1. {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. - sqrt 3 * Re x < Im x}} = cnj ` {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}}
[PROOF STEP]
have "... = {x. 1 / x \<in> cnj ` (\<lambda>x. x + 1) ` {x. sqrt 3 * Re x > Im x}}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x. 1 / x \<in> (\<lambda>x. x + 1) ` cnj ` {x. Im x < sqrt 3 * Re x}} = {x. 1 / x \<in> cnj ` (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}}
[PROOF STEP]
by (auto simp: image_image)
[PROOF STATE]
proof (state)
this:
{x. 1 / x \<in> (\<lambda>x. x + 1) ` cnj ` {x. Im x < sqrt 3 * Re x}} = {x. 1 / x \<in> cnj ` (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}}

goal (1 subgoal):
 1. {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. - sqrt 3 * Re x < Im x}} = cnj ` {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
{x. 1 / x \<in> (\<lambda>x. x + 1) ` cnj ` {x. Im x < sqrt 3 * Re x}} = {x. 1 / x \<in> cnj ` (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}}

goal (1 subgoal):
 1. {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. - sqrt 3 * Re x < Im x}} = cnj ` {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}}
[PROOF STEP]
have "... = {x. cnj (1 / x) \<in> (\<lambda>x. x + 1) ` {x. sqrt 3 * Re x > Im x}}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x. 1 / x \<in> cnj ` (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}} = {x. cnj (1 / x) \<in> (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}}
[PROOF STEP]
by (metis (no_types, lifting) complex_cnj_cnj image_iff)
[PROOF STATE]
proof (state)
this:
{x. 1 / x \<in> cnj ` (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}} = {x. cnj (1 / x) \<in> (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}}

goal (1 subgoal):
 1. {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. - sqrt 3 * Re x < Im x}} = cnj ` {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
{x. 1 / x \<in> cnj ` (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}} = {x. cnj (1 / x) \<in> (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}}

goal (1 subgoal):
 1. {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. - sqrt 3 * Re x < Im x}} = cnj ` {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}}
[PROOF STEP]
have "... = cnj ` {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. sqrt 3 * Re x > Im x}}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x. cnj (1 / x) \<in> (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}} = cnj ` {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}}
[PROOF STEP]
apply (subst(2) bij_image_Collect_eq)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. bij cnj
 2. {x. cnj (1 / x) \<in> (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}} = {y. 1 / inv cnj y \<in> (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}}
[PROOF STEP]
apply (metis bijI' complex_cnj_cnj)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x. cnj (1 / x) \<in> (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}} = {y. 1 / inv cnj y \<in> (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}}
[PROOF STEP]
by (auto simp: inj_def inj_imp_inv_eq[of _ cnj])
[PROOF STATE]
proof (state)
this:
{x. cnj (1 / x) \<in> (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}} = cnj ` {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}}

goal (1 subgoal):
 1. {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. - sqrt 3 * Re x < Im x}} = cnj ` {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}}
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
{x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. - sqrt 3 * Re x < Im x}} = cnj ` {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}}
[PROOF STEP]
show "{x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. - sqrt 3 * Re x < Im x}} =
          cnj ` {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}}"
[PROOF STATE]
proof (prove)
using this:
{x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. - sqrt 3 * Re x < Im x}} = cnj ` {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}}

goal (1 subgoal):
 1. {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. - sqrt 3 * Re x < Im x}} = cnj ` {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}}
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
{x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. - sqrt 3 * Re x < Im x}} = cnj ` {x. 1 / x \<in> (\<lambda>x. x + 1) ` {x. Im x < sqrt 3 * Re x}}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma max_list_in_Cons: \<open>xs \<noteq> [] \<Longrightarrow> max_list xs \<in> set xs\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. xs \<noteq> [] \<Longrightarrow> max_list xs \<in> set xs
[PROOF STEP]
proof (induct xs)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. [] \<noteq> [] \<Longrightarrow> max_list [] \<in> set []
 2. \<And>a xs. \<lbrakk>xs \<noteq> [] \<Longrightarrow> max_list xs \<in> set xs; a # xs \<noteq> []\<rbrakk> \<Longrightarrow> max_list (a # xs) \<in> set (a # xs)
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:
[] \<noteq> []

goal (2 subgoals):
 1. [] \<noteq> [] \<Longrightarrow> max_list [] \<in> set []
 2. \<And>a xs. \<lbrakk>xs \<noteq> [] \<Longrightarrow> max_list xs \<in> set xs; a # xs \<noteq> []\<rbrakk> \<Longrightarrow> max_list (a # xs) \<in> set (a # xs)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[] \<noteq> []
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
[] \<noteq> []

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

goal (1 subgoal):
 1. \<And>a xs. \<lbrakk>xs \<noteq> [] \<Longrightarrow> max_list xs \<in> set xs; a # xs \<noteq> []\<rbrakk> \<Longrightarrow> max_list (a # xs) \<in> set (a # xs)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a xs. \<lbrakk>xs \<noteq> [] \<Longrightarrow> max_list xs \<in> set xs; a # xs \<noteq> []\<rbrakk> \<Longrightarrow> max_list (a # xs) \<in> set (a # xs)
[PROOF STEP]
case (Cons x xs)
[PROOF STATE]
proof (state)
this:
xs \<noteq> [] \<Longrightarrow> max_list xs \<in> set xs
x # xs \<noteq> []

goal (1 subgoal):
 1. \<And>a xs. \<lbrakk>xs \<noteq> [] \<Longrightarrow> max_list xs \<in> set xs; a # xs \<noteq> []\<rbrakk> \<Longrightarrow> max_list (a # xs) \<in> set (a # xs)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
xs \<noteq> [] \<Longrightarrow> max_list xs \<in> set xs
x # xs \<noteq> []
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
xs \<noteq> [] \<Longrightarrow> max_list xs \<in> set xs
x # xs \<noteq> []

goal (1 subgoal):
 1. max_list (x # xs) \<in> set (x # xs)
[PROOF STEP]
by (metis linorder_not_less list.set_intros(1-2) max.absorb2 max.absorb3
        max_list.simps(1-2) max_nat.right_neutral)
[PROOF STATE]
proof (state)
this:
max_list (x # xs) \<in> set (x # xs)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma valid_weight_repr_simps:
  "valid_weight_repr []"
  "valid_weight_repr (((u,v),w)#xs)
    \<longleftrightarrow> uedge (u,v)\<notin>uedge`fst`set xs \<and> valid_weight_repr xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valid_weight_repr [] &&& valid_weight_repr (((u, v), w) # xs) = (uedge (u, v) \<notin> uedge ` fst ` set xs \<and> valid_weight_repr xs)
[PROOF STEP]
unfolding valid_weight_repr_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distinct (map (uedge \<circ> fst) []) &&& distinct (map (uedge \<circ> fst) (((u, v), w) # xs)) = (uedge (u, v) \<notin> uedge ` fst ` set xs \<and> distinct (map (uedge \<circ> fst) xs))
[PROOF STEP]
by (force simp: uedge_def doubleton_eq_iff)+


[STATEMENT]
lemma bigomega_iff_bigo: "g \<in> \<Omega>[F](f) \<longleftrightarrow> f \<in> O[F](g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (g \<in> \<Omega>[F](f)) = (f \<in> O[F](g))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. g \<in> \<Omega>[F](f) \<Longrightarrow> f \<in> O[F](g)
 2. f \<in> O[F](g) \<Longrightarrow> g \<in> \<Omega>[F](f)
[PROOF STEP]
assume "f \<in> O[F](g)"
[PROOF STATE]
proof (state)
this:
f \<in> O[F](g)

goal (2 subgoals):
 1. g \<in> \<Omega>[F](f) \<Longrightarrow> f \<in> O[F](g)
 2. f \<in> O[F](g) \<Longrightarrow> g \<in> \<Omega>[F](f)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
f \<in> O[F](g)
[PROOF STEP]
obtain c where "0 < c" "\<forall>\<^sub>F x in F. norm (f x) \<le> c * norm (g x)"
[PROOF STATE]
proof (prove)
using this:
f \<in> O[F](g)

goal (1 subgoal):
 1. (\<And>c. \<lbrakk>0 < c; \<forall>\<^sub>F x in F. norm (f x) \<le> c * norm (g x)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (rule landau_o.bigE)
[PROOF STATE]
proof (state)
this:
0 < c
\<forall>\<^sub>F x in F. norm (f x) \<le> c * norm (g x)

goal (2 subgoals):
 1. g \<in> \<Omega>[F](f) \<Longrightarrow> f \<in> O[F](g)
 2. f \<in> O[F](g) \<Longrightarrow> g \<in> \<Omega>[F](f)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 < c
\<forall>\<^sub>F x in F. norm (f x) \<le> c * norm (g x)
[PROOF STEP]
show "g \<in> \<Omega>[F](f)"
[PROOF STATE]
proof (prove)
using this:
0 < c
\<forall>\<^sub>F x in F. norm (f x) \<le> c * norm (g x)

goal (1 subgoal):
 1. g \<in> \<Omega>[F](f)
[PROOF STEP]
by (intro landau_omega.bigI[of "inverse c"]) (simp_all add: field_simps)
[PROOF STATE]
proof (state)
this:
g \<in> \<Omega>[F](f)

goal (1 subgoal):
 1. g \<in> \<Omega>[F](f) \<Longrightarrow> f \<in> O[F](g)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. g \<in> \<Omega>[F](f) \<Longrightarrow> f \<in> O[F](g)
[PROOF STEP]
assume "g \<in> \<Omega>[F](f)"
[PROOF STATE]
proof (state)
this:
g \<in> \<Omega>[F](f)

goal (1 subgoal):
 1. g \<in> \<Omega>[F](f) \<Longrightarrow> f \<in> O[F](g)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
g \<in> \<Omega>[F](f)
[PROOF STEP]
obtain c where "0 < c" "\<forall>\<^sub>F x in F. c * norm (f x) \<le> norm (g x)"
[PROOF STATE]
proof (prove)
using this:
g \<in> \<Omega>[F](f)

goal (1 subgoal):
 1. (\<And>c. \<lbrakk>0 < c; \<forall>\<^sub>F x in F. c * norm (f x) \<le> norm (g x)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (rule landau_omega.bigE)
[PROOF STATE]
proof (state)
this:
0 < c
\<forall>\<^sub>F x in F. c * norm (f x) \<le> norm (g x)

goal (1 subgoal):
 1. g \<in> \<Omega>[F](f) \<Longrightarrow> f \<in> O[F](g)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 < c
\<forall>\<^sub>F x in F. c * norm (f x) \<le> norm (g x)
[PROOF STEP]
show "f \<in> O[F](g)"
[PROOF STATE]
proof (prove)
using this:
0 < c
\<forall>\<^sub>F x in F. c * norm (f x) \<le> norm (g x)

goal (1 subgoal):
 1. f \<in> O[F](g)
[PROOF STEP]
by (intro landau_o.bigI[of "inverse c"]) (simp_all add: field_simps)
[PROOF STATE]
proof (state)
this:
f \<in> O[F](g)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ex_one_point_gen:
  "\<lbrakk>\<And>h x. h\<Turnstile>P x \<Longrightarrow> x=v\<rbrakk> \<Longrightarrow> (\<exists>\<^sub>Ax. P x) = (P v)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>h x. h \<Turnstile> P x \<Longrightarrow> x = v) \<Longrightarrow> (\<exists>\<^sub>Ax. P x) = P v
[PROOF STEP]
unfolding ex_assn_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>h x. h \<Turnstile> P x \<Longrightarrow> x = v) \<Longrightarrow> Abs_assn (\<lambda>h. \<exists>x. h \<Turnstile> P x) = P v
[PROOF STEP]
apply rule
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>h. (\<And>h x. h \<Turnstile> P x \<Longrightarrow> x = v) \<Longrightarrow> (\<exists>x. h \<Turnstile> P x) = (h \<Turnstile> P v)
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma open_union' [intro]: "\<And>F::('a set) set. (\<And>x. x \<in> F \<Longrightarrow> is_open x) \<Longrightarrow> is_open (\<Union>F)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>F. (\<And>x. x \<in> F \<Longrightarrow> is_open x) \<Longrightarrow> is_open (\<Union> F)
[PROOF STEP]
using open_union
[PROOF STATE]
proof (prove)
using this:
(\<And>x. x \<in> ?F \<Longrightarrow> is_open x) \<Longrightarrow> is_open (\<Union>x\<in>?F. x)

goal (1 subgoal):
 1. \<And>F. (\<And>x. x \<in> F \<Longrightarrow> is_open x) \<Longrightarrow> is_open (\<Union> F)
[PROOF STEP]
by auto


[STATEMENT]
lemma alternating_sum_list_conv_nataction:
  "sum_list (alternating_list (2*n) s t) = (s+t)+^n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum_list (alternating_list (2 * n) s t) = (s + t) +^ n
[PROOF STEP]
by (induct n) (auto simp add: nataction_Suc2[THEN sym])


[STATEMENT]
lemma irrefl_tranclI': "r\<inverse> \<inter> r\<^sup>+ = {} \<Longrightarrow> \<forall>x. (x, x) \<notin> r\<^sup>+"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. r\<inverse> \<inter> r\<^sup>+ = {} \<Longrightarrow> \<forall>x. (x, x) \<notin> r\<^sup>+
[PROOF STEP]
by(blast elim: tranclE dest: trancl_into_rtrancl)


[STATEMENT]
lemma of_real_poly_map_plus[simp]: "map_poly of_real (p + q) = map_poly of_real p +  map_poly of_real q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_poly of_real (p + q) = map_poly of_real p + map_poly of_real q
[PROOF STEP]
apply (rule poly_eqI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n. coeff (map_poly of_real (p + q)) n = coeff (map_poly of_real p + map_poly of_real q) n
[PROOF STEP]
by (auto simp add: coeff_map_poly)


[STATEMENT]
lemma dord_pm_degD:
  assumes "dord_pm ord s t"
  shows "deg_pm s \<le> deg_pm t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. deg_pm s \<le> deg_pm t
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
dord_pm ord s t

goal (1 subgoal):
 1. deg_pm s \<le> deg_pm t
[PROOF STEP]
by (simp only: dord_pm.rep_eq deg_pm.rep_eq, elim dord_fun_degD)


[STATEMENT]
lemma finite_UNIV_dir[simp, intro]: "finite (UNIV :: dir set)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite UNIV
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite UNIV
[PROOF STEP]
have id: "UNIV = {L,R,N}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. UNIV = {L, R, N}
[PROOF STEP]
using dir.exhaust
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?y = R \<Longrightarrow> ?P; ?y = L \<Longrightarrow> ?P; ?y = N \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P

goal (1 subgoal):
 1. UNIV = {L, R, N}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
UNIV = {L, R, N}

goal (1 subgoal):
 1. finite UNIV
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite UNIV
[PROOF STEP]
unfolding id
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {L, R, N}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite UNIV

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma down_set_lax_morph: "(\<down> \<circ> Sup) (X::'a::quantale set) \<cdot> (\<down> \<circ> Sup) Y \<subseteq> (\<down> \<circ> Sup) (X \<cdot> Y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<down> \<circ> Sup) X \<cdot> (\<down> \<circ> Sup) Y \<subseteq> (\<down> \<circ> Sup) (X \<cdot> Y)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<down> \<circ> Sup) X \<cdot> (\<down> \<circ> Sup) Y \<subseteq> (\<down> \<circ> Sup) (X \<cdot> Y)
[PROOF STEP]
have "\<Squnion>((\<down> \<circ> Sup) X \<cdot> (\<down> \<circ> Sup) Y) = \<Squnion>(X \<cdot> Y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Squnion> ((\<down> \<circ> Sup) X \<cdot> (\<down> \<circ> Sup) Y) = \<Squnion> (X \<cdot> Y)
[PROOF STEP]
by (smt Sup_downset_adj adj_cancel_eq1 comp_apply comp_dist_mix)
[PROOF STATE]
proof (state)
this:
\<Squnion> ((\<down> \<circ> Sup) X \<cdot> (\<down> \<circ> Sup) Y) = \<Squnion> (X \<cdot> Y)

goal (1 subgoal):
 1. (\<down> \<circ> Sup) X \<cdot> (\<down> \<circ> Sup) Y \<subseteq> (\<down> \<circ> Sup) (X \<cdot> Y)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<Squnion> ((\<down> \<circ> Sup) X \<cdot> (\<down> \<circ> Sup) Y) = \<Squnion> (X \<cdot> Y)

goal (1 subgoal):
 1. (\<down> \<circ> Sup) X \<cdot> (\<down> \<circ> Sup) Y \<subseteq> (\<down> \<circ> Sup) (X \<cdot> Y)
[PROOF STEP]
by (simp add: Sup_downset_adj_var eq_iff)
[PROOF STATE]
proof (state)
this:
(\<down> \<circ> Sup) X \<cdot> (\<down> \<circ> Sup) Y \<subseteq> (\<down> \<circ> Sup) (X \<cdot> Y)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma PC_fixed:
  assumes wpa: "P \<tturnstile> a ab R"
      and wpb: "Q \<tturnstile> b ab R"
      and np: "0 \<le> p" and bp: "p \<le> 1"
  shows "(\<lambda>s. p * P s + (1 - p) * Q s) \<tturnstile> (a \<^bsub>(\<lambda>s. p)\<^esub>\<oplus> b) ab R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lambda>s. p * P s + (1 - p) * Q s \<tturnstile> (a \<^bsub>(\<lambda>s. p)\<^esub>\<oplus> b) ab R
[PROOF STEP]
unfolding PC_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lambda>s. p * P s + (1 - p) * Q s \<tturnstile> \<lambda>s. p * a ab R s + (1 - p) * b ab R s
[PROOF STEP]
proof(rule le_funI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. p * P x + (1 - p) * Q x \<le> p * a ab R x + (1 - p) * b ab R x
[PROOF STEP]
fix s
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. p * P x + (1 - p) * Q x \<le> p * a ab R x + (1 - p) * b ab R x
[PROOF STEP]
from wpa and np
[PROOF STATE]
proof (chain)
picking this:
P \<tturnstile> a ab R
0 \<le> p
[PROOF STEP]
have "p * P s \<le> p * a ab R s"
[PROOF STATE]
proof (prove)
using this:
P \<tturnstile> a ab R
0 \<le> p

goal (1 subgoal):
 1. p * P s \<le> p * a ab R s
[PROOF STEP]
by(auto intro:mult_left_mono)
[PROOF STATE]
proof (state)
this:
p * P s \<le> p * a ab R s

goal (1 subgoal):
 1. \<And>x. p * P x + (1 - p) * Q x \<le> p * a ab R x + (1 - p) * b ab R x
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
p * P s \<le> p * a ab R s

goal (1 subgoal):
 1. \<And>x. p * P x + (1 - p) * Q x \<le> p * a ab R x + (1 - p) * b ab R x
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
p * P s \<le> p * a ab R s

goal (1 subgoal):
 1. \<And>x. p * P x + (1 - p) * Q x \<le> p * a ab R x + (1 - p) * b ab R x
[PROOF STEP]
from bp
[PROOF STATE]
proof (chain)
picking this:
p \<le> 1
[PROOF STEP]
have "0 \<le> 1 - p"
[PROOF STATE]
proof (prove)
using this:
p \<le> 1

goal (1 subgoal):
 1. 0 \<le> 1 - p
[PROOF STEP]
by(simp)
[PROOF STATE]
proof (state)
this:
0 \<le> 1 - p

goal (1 subgoal):
 1. \<And>x. p * P x + (1 - p) * Q x \<le> p * a ab R x + (1 - p) * b ab R x
[PROOF STEP]
with wpb
[PROOF STATE]
proof (chain)
picking this:
Q \<tturnstile> b ab R
0 \<le> 1 - p
[PROOF STEP]
have "(1 - p) * Q s \<le> (1 - p) * b ab R s"
[PROOF STATE]
proof (prove)
using this:
Q \<tturnstile> b ab R
0 \<le> 1 - p

goal (1 subgoal):
 1. (1 - p) * Q s \<le> (1 - p) * b ab R s
[PROOF STEP]
by(auto intro:mult_left_mono)
[PROOF STATE]
proof (state)
this:
(1 - p) * Q s \<le> (1 - p) * b ab R s

goal (1 subgoal):
 1. \<And>x. p * P x + (1 - p) * Q x \<le> p * a ab R x + (1 - p) * b ab R x
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
(1 - p) * Q s \<le> (1 - p) * b ab R s

goal (1 subgoal):
 1. \<And>x. p * P x + (1 - p) * Q x \<le> p * a ab R x + (1 - p) * b ab R x
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
p * P s \<le> p * a ab R s
(1 - p) * Q s \<le> (1 - p) * b ab R s
[PROOF STEP]
show "p * P s + (1 - p) * Q s \<le>
                   p * a ab R s + (1 - p) * b ab R s"
[PROOF STATE]
proof (prove)
using this:
p * P s \<le> p * a ab R s
(1 - p) * Q s \<le> (1 - p) * b ab R s

goal (1 subgoal):
 1. p * P s + (1 - p) * Q s \<le> p * a ab R s + (1 - p) * b ab R s
[PROOF STEP]
by(rule add_mono)
[PROOF STATE]
proof (state)
this:
p * P s + (1 - p) * Q s \<le> p * a ab R s + (1 - p) * b ab R s

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma concat_map_hd_tl_elem:
  assumes "hd cs \<in> set P1"
  and     "tl cs \<in> set P2"
  and     "length cs > 0"
shows "cs \<in> set (concat (map (\<lambda> xy' . map (\<lambda> xys' . xy' # xys') P2) P1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cs \<in> set (concat (map (\<lambda>xy'. map ((#) xy') P2) P1))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. cs \<in> set (concat (map (\<lambda>xy'. map ((#) xy') P2) P1))
[PROOF STEP]
have "hd cs # tl cs = cs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hd cs # tl cs = cs
[PROOF STEP]
using assms(3)
[PROOF STATE]
proof (prove)
using this:
0 < length cs

goal (1 subgoal):
 1. hd cs # tl cs = cs
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
hd cs # tl cs = cs

goal (1 subgoal):
 1. cs \<in> set (concat (map (\<lambda>xy'. map ((#) xy') P2) P1))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
hd cs # tl cs = cs

goal (1 subgoal):
 1. cs \<in> set (concat (map (\<lambda>xy'. map ((#) xy') P2) P1))
[PROOF STEP]
have "hd cs # tl cs \<in> set (concat (map (\<lambda> xy' . map (\<lambda> xys' . xy' # xys') P2) P1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hd cs # tl cs \<in> set (concat (map (\<lambda>xy'. map ((#) xy') P2) P1))
[PROOF STEP]
using assms(1,2)
[PROOF STATE]
proof (prove)
using this:
hd cs \<in> set P1
tl cs \<in> set P2

goal (1 subgoal):
 1. hd cs # tl cs \<in> set (concat (map (\<lambda>xy'. map ((#) xy') P2) P1))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
hd cs # tl cs \<in> set (concat (map (\<lambda>xy'. map ((#) xy') P2) P1))

goal (1 subgoal):
 1. cs \<in> set (concat (map (\<lambda>xy'. map ((#) xy') P2) P1))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
hd cs # tl cs = cs
hd cs # tl cs \<in> set (concat (map (\<lambda>xy'. map ((#) xy') P2) P1))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
hd cs # tl cs = cs
hd cs # tl cs \<in> set (concat (map (\<lambda>xy'. map ((#) xy') P2) P1))

goal (1 subgoal):
 1. cs \<in> set (concat (map (\<lambda>xy'. map ((#) xy') P2) P1))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
cs \<in> set (concat (map (\<lambda>xy'. map ((#) xy') P2) P1))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ct_suffix_extend_ct_list_eq:
  assumes "ct_suffix xs ys"
          "ct_list_eq xs' ys'"
  shows "ct_suffix (xs@xs') (ys@ys')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ct_suffix (xs @ xs') (ys @ ys')
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
ct_suffix xs ys
ct_list_eq xs' ys'

goal (1 subgoal):
 1. ct_suffix (xs @ xs') (ys @ ys')
[PROOF STEP]
unfolding ct_suffix_def ct_list_eq_def
[PROOF STATE]
proof (prove)
using this:
\<exists>as bs. ys = as @ bs \<and> list_all2 ct_eq bs xs
list_all2 ct_eq xs' ys'

goal (1 subgoal):
 1. \<exists>as bs. ys @ ys' = as @ bs \<and> list_all2 ct_eq bs (xs @ xs')
[PROOF STEP]
by (meson append.assoc ct_list_eq_commute ct_list_eq_def list_all2_appendI)


[STATEMENT]
lemma power_Sum_any:
  assumes "finite {a. f a \<noteq> 0}"
  shows "c ^ (\<Sum>a. f a) = (\<Prod>a. c ^ f a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c ^ Sum_any f = (\<Prod>a. c ^ f a)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. c ^ Sum_any f = (\<Prod>a. c ^ f a)
[PROOF STEP]
have "{a. c ^ f a \<noteq> 1} \<subseteq> {a. f a \<noteq> 0}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {a. c ^ f a \<noteq> (1::'b)} \<subseteq> {a. f a \<noteq> 0}
[PROOF STEP]
by (auto intro: ccontr)
[PROOF STATE]
proof (state)
this:
{a. c ^ f a \<noteq> (1::'b)} \<subseteq> {a. f a \<noteq> 0}

goal (1 subgoal):
 1. c ^ Sum_any f = (\<Prod>a. c ^ f a)
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
finite {a. f a \<noteq> 0}
{a. c ^ f a \<noteq> (1::'b)} \<subseteq> {a. f a \<noteq> 0}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
finite {a. f a \<noteq> 0}
{a. c ^ f a \<noteq> (1::'b)} \<subseteq> {a. f a \<noteq> 0}

goal (1 subgoal):
 1. c ^ Sum_any f = (\<Prod>a. c ^ f a)
[PROOF STEP]
by (simp add: Sum_any.expand_set Prod_any.expand_superset power_sum)
[PROOF STATE]
proof (state)
this:
c ^ Sum_any f = (\<Prod>a. c ^ f a)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma vec_cbox_1_eq [simp]:
  shows "vec ` cbox u v = cbox (vec u) (vec v ::real^1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vec ` cbox u v = cbox (vec u) (vec v)
[PROOF STEP]
by (force simp: Basis_vec_def cart_eq_inner_axis [symmetric] mem_box)


[STATEMENT]
lemma pullback_commutes':
    assumes "cospan f g"
    shows "f \<cdot> \<p>\<^sub>1[f, g] = g \<cdot> \<p>\<^sub>0[f, g]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<cdot> \<p>\<^sub>1[f, g] = g \<cdot> \<p>\<^sub>0[f, g]
[PROOF STEP]
using assms commutative_square_def
[PROOF STATE]
proof (prove)
using this:
cospan f g
commutative_square ?f ?g ?h ?k \<equiv> cospan ?f ?g \<and> span ?h ?k \<and> local.dom ?f = cod ?h \<and> ?f \<cdot> ?h = ?g \<cdot> ?k

goal (1 subgoal):
 1. f \<cdot> \<p>\<^sub>1[f, g] = g \<cdot> \<p>\<^sub>0[f, g]
[PROOF STEP]
by blast


[STATEMENT]
lemma redundant_if: "(if P then (if P then x else z) else y) = (if P then x else y)"
  "(if P then x else (if P then z else y)) = (if P then x else y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (if P then if P then x else z else y) = (if P then x else y) &&& (if P then x else if P then z else y) = (if P then x else y)
[PROOF STEP]
by auto


[STATEMENT]
lemma reachable_states_finite : "finite (reachable_states M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (reachable_states M)
[PROOF STEP]
using fsm_states_finite[of M] reachable_state_is_state[of _ M]
[PROOF STATE]
proof (prove)
using this:
finite (FSM.states M)
?q \<in> reachable_states M \<Longrightarrow> ?q \<in> FSM.states M

goal (1 subgoal):
 1. finite (reachable_states M)
[PROOF STEP]
by (meson finite_subset subset_eq)


[STATEMENT]
lemma scale_ms_aux'_MSLCons [simp]:
  "scale_ms_aux' C (MSLCons (C', e) xs) = MSLCons (C * C', e) (scale_ms_aux' C xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. scale_ms_aux' C (MSLCons (C', e) xs) = MSLCons (C * C', e) (scale_ms_aux' C xs)
[PROOF STEP]
by (simp add: scale_ms_aux'_def scale_shift_ms_aux_MSLCons)


[STATEMENT]
lemma coclop_bot:
  fixes f :: "'a::complete_lattice_with_dual \<Rightarrow> 'a"
  shows "coclop f \<Longrightarrow> f \<bottom> = \<bottom>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. coclop f \<Longrightarrow> bot_pres f
[PROOF STEP]
by (simp add: bot.extremum_uniqueI coclop_coextensive_var)


[STATEMENT]
lemma d_IN_split_Edge [simp]: "d_IN (split f) (Edge x y) = max 0 (f (x, y))" (is "?lhs = ?rhs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_IN (split f) (Edge x y) = max 0 (f (x, y))
[PROOF STEP]
proof(rule trans)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. d_IN (split f) (Edge x y) = ?s
 2. ?s = max 0 (f (x, y))
[PROOF STEP]
show "?lhs = (\<Sum>\<^sup>+ v'. split f (v', Edge x y) * indicator {Vertex x} v')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_IN (split f) (Edge x y) = \<integral>\<^sup>+v'\<in>{Vertex x}. split f (v', Edge x y)\<partial>count_space UNIV
[PROOF STEP]
unfolding d_IN_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>\<^sup>+ xa. split f (xa, Edge x y)) = \<integral>\<^sup>+v'\<in>{Vertex x}. split f (v', Edge x y)\<partial>count_space UNIV
[PROOF STEP]
by(rule nn_integral_cong)(simp add: split_Edge2_eq_0I split: split_indicator)
[PROOF STATE]
proof (state)
this:
d_IN (split f) (Edge x y) = \<integral>\<^sup>+v'\<in>{Vertex x}. split f (v', Edge x y)\<partial>count_space UNIV

goal (1 subgoal):
 1. \<integral>\<^sup>+v'\<in>{Vertex x}. split f (v', Edge x y)\<partial>count_space UNIV = max 0 (f (x, y))
[PROOF STEP]
show "\<dots> = ?rhs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+v'\<in>{Vertex x}. split f (v', Edge x y)\<partial>count_space UNIV = max 0 (f (x, y))
[PROOF STEP]
by(simp add: max_def)
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+v'\<in>{Vertex x}. split f (v', Edge x y)\<partial>count_space UNIV = max 0 (f (x, y))

goal:
No subgoals!
[PROOF STEP]
qed


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

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


[STATEMENT]
lemma alg_tOps_lookup_update[simp]:
  "\<lbrakk> k_isNode (fst k); k_isNode (fst k') \<rbrakk> \<Longrightarrow> lookup tOps (update tOps k e M) k' = (if (simAbs (fst k'), snd k') = (simAbs (fst k), snd k) then Some e else lookup tOps M k')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>k_isNode (fst k); k_isNode (fst k')\<rbrakk> \<Longrightarrow> lookup tOps (update tOps k e M) k' = (if (simAbs (fst k'), snd k') = (simAbs (fst k), snd k) then Some e else lookup tOps M k')
[PROOF STEP]
unfolding k_isNode_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>simAbs (fst k) \<in> sim_equiv_class a ` jkbpC; simAbs (fst k') \<in> sim_equiv_class a ` jkbpC\<rbrakk> \<Longrightarrow> lookup tOps (update tOps k e M) k' = (if (simAbs (fst k'), snd k') = (simAbs (fst k), snd k) then Some e else lookup tOps M k')
[PROOF STEP]
using MapOps_lookup_updateD[OF _ _ tOps]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>(simAbs (fst ?k), snd ?k) \<in> (\<Union>a. sim_equiv_class a ` jkbpC) \<times> UNIV; (simAbs (fst ?k'), snd ?k') \<in> (\<Union>a. sim_equiv_class a ` jkbpC) \<times> UNIV\<rbrakk> \<Longrightarrow> lookup tOps (update tOps ?k ?e ?M) ?k' = (if (simAbs (fst ?k'), snd ?k') = (simAbs (fst ?k), snd ?k) then Some ?e else lookup tOps ?M ?k')

goal (1 subgoal):
 1. \<lbrakk>simAbs (fst k) \<in> sim_equiv_class a ` jkbpC; simAbs (fst k') \<in> sim_equiv_class a ` jkbpC\<rbrakk> \<Longrightarrow> lookup tOps (update tOps k e M) k' = (if (simAbs (fst k'), snd k') = (simAbs (fst k), snd k) then Some e else lookup tOps M k')
[PROOF STEP]
by blast


[STATEMENT]
lemma SWF_SDF:
  assumes finiteA: "finite A"
  shows "SWF scf A Is universal_domain \<Longrightarrow> SDF scf A Is universal_domain"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. SWF scf A Is universal_domain \<Longrightarrow> SDF scf A Is universal_domain
[PROOF STEP]
unfolding SDF_def SWF_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>P. universal_domain A Is P \<longrightarrow> rpr A (scf P) \<Longrightarrow> \<forall>P. universal_domain A Is P \<longrightarrow> choiceFn A (scf P)
[PROOF STEP]
by (blast dest: rpr_choiceFn[OF finiteA])


[STATEMENT]
lemma eval_powr_primfun:
  "eval_primfun (powr_primfun f e) x = eval_primfun f x powr e"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eval_primfun (powr_primfun f e) x = eval_primfun f x powr e
[PROOF STEP]
by (induction f e rule: powr_primfun.induct) (simp_all add: powr_powr mult.commute)


[STATEMENT]
lemma norm_powr_real_powr:
  "w \<in> \<real> \<Longrightarrow> 0 \<le> Re w \<Longrightarrow> cmod (w powr z) = Re w powr Re z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>w \<in> \<real>; 0 \<le> Re w\<rbrakk> \<Longrightarrow> cmod (w powr z) = Re w powr Re z
[PROOF STEP]
by (metis dual_order.order_iff_strict norm_powr_real norm_zero of_real_0 of_real_Re powr_def)


[STATEMENT]
lemma word_and_1_shiftl:
  "x AND (1 << n) = (if bit x n then (1 << n) else 0)" for x :: "'a :: len word"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x AND (1 << n) = (if bit x n then 1 << n else 0)
[PROOF STEP]
by word_eqI_solve


[STATEMENT]
lemma M_to_int_mod_ring: "M (to_int_mod_ring (x :: 'a mod_ring)) = to_int_mod_ring x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M (to_int_mod_ring x) = to_int_mod_ring x
[PROOF STEP]
unfolding M_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. to_int_mod_ring x mod m = to_int_mod_ring x
[PROOF STEP]
unfolding m
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. to_int_mod_ring x mod int CARD('a) = to_int_mod_ring x
[PROOF STEP]
by (transfer, auto)


[STATEMENT]
lemma span_zero: "zero V : span U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<zero>\<^bsub>V\<^esub> \<in> span U
[PROOF STEP]
unfolding span_def lincomb_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<zero>\<^bsub>V\<^esub> \<in> {\<Oplus>\<^bsub>V\<^esub>v\<in>A. a v \<odot>\<^bsub>V\<^esub> v |a A. finite A \<and> A \<subseteq> U \<and> a \<in> A \<rightarrow> carrier K}
[PROOF STEP]
by force


[STATEMENT]
lemma mod_less_imp_diff_div_conv: "
  \<lbrakk> n mod m < r; r \<le> m + n mod m\<rbrakk> \<Longrightarrow> (n - r) div m = n div m - Suc 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>n mod m < r; r \<le> m + n mod m\<rbrakk> \<Longrightarrow> (n - r) div m = n div m - Suc 0
[PROOF STEP]
apply (case_tac "m = 0", simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>n mod m < r; r \<le> m + n mod m; m \<noteq> 0\<rbrakk> \<Longrightarrow> (n - r) div m = n div m - Suc 0
[PROOF STEP]
apply (simp only: neq0_conv)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>n mod m < r; r \<le> m + n mod m; 0 < m\<rbrakk> \<Longrightarrow> (n - r) div m = n div m - Suc 0
[PROOF STEP]
apply (case_tac "n < m", simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>n mod m < r; r \<le> m + n mod m; 0 < m; \<not> n < m\<rbrakk> \<Longrightarrow> (n - r) div m = n div m - Suc 0
[PROOF STEP]
apply (simp only: linorder_not_less)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>n mod m < r; r \<le> m + n mod m; 0 < m; m \<le> n\<rbrakk> \<Longrightarrow> (n - r) div m = n div m - Suc 0
[PROOF STEP]
apply (rule div_nat_eqI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>n mod m < r; r \<le> m + n mod m; 0 < m; m \<le> n\<rbrakk> \<Longrightarrow> m * (n div m - Suc 0) \<le> n - r
 2. \<lbrakk>n mod m < r; r \<le> m + n mod m; 0 < m; m \<le> n\<rbrakk> \<Longrightarrow> n - r < m * Suc (n div m - Suc 0)
[PROOF STEP]
apply (simp_all add: algebra_simps minus_mod_eq_mult_div [symmetric])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma higher_deriv_comp_lemma:
    assumes s: "open s" and holf: "f holomorphic_on s"
        and "z \<in> s"
        and t: "open t" and holg: "g holomorphic_on t"
        and fst: "f ` s \<subseteq> t"
        and n: "i \<le> n"
        and dfz: "deriv f z = 1" and zero: "\<And>i. \<lbrakk>1 < i; i \<le> n\<rbrakk> \<Longrightarrow> (deriv ^^ i) f z = 0"
      shows "(deriv ^^ i) (g o f) z = (deriv ^^ i) g (f z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (deriv ^^ i) (g \<circ> f) z = (deriv ^^ i) g (f z)
[PROOF STEP]
using n holg
[PROOF STATE]
proof (prove)
using this:
i \<le> n
g holomorphic_on t

goal (1 subgoal):
 1. (deriv ^^ i) (g \<circ> f) z = (deriv ^^ i) g (f z)
[PROOF STEP]
proof (induction i arbitrary: g)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>g. \<lbrakk>0 \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ 0) (g \<circ> f) z = (deriv ^^ 0) g (f z)
 2. \<And>i g. \<lbrakk>\<And>g. \<lbrakk>i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ i) (g \<circ> f) z = (deriv ^^ i) g (f z); Suc i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ Suc i) (g \<circ> f) z = (deriv ^^ Suc i) g (f z)
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:
0 \<le> n
g holomorphic_on t

goal (2 subgoals):
 1. \<And>g. \<lbrakk>0 \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ 0) (g \<circ> f) z = (deriv ^^ 0) g (f z)
 2. \<And>i g. \<lbrakk>\<And>g. \<lbrakk>i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ i) (g \<circ> f) z = (deriv ^^ i) g (f z); Suc i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ Suc i) (g \<circ> f) z = (deriv ^^ Suc i) g (f z)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 \<le> n
g holomorphic_on t
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
0 \<le> n
g holomorphic_on t

goal (1 subgoal):
 1. (deriv ^^ 0) (g \<circ> f) z = (deriv ^^ 0) g (f z)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(deriv ^^ 0) (g \<circ> f) z = (deriv ^^ 0) g (f z)

goal (1 subgoal):
 1. \<And>i g. \<lbrakk>\<And>g. \<lbrakk>i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ i) (g \<circ> f) z = (deriv ^^ i) g (f z); Suc i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ Suc i) (g \<circ> f) z = (deriv ^^ Suc i) g (f z)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i g. \<lbrakk>\<And>g. \<lbrakk>i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ i) (g \<circ> f) z = (deriv ^^ i) g (f z); Suc i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ Suc i) (g \<circ> f) z = (deriv ^^ Suc i) g (f z)
[PROOF STEP]
case (Suc i)
[PROOF STATE]
proof (state)
this:
\<lbrakk>i \<le> n; ?g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ i) (?g \<circ> f) z = (deriv ^^ i) ?g (f z)
Suc i \<le> n
g holomorphic_on t

goal (1 subgoal):
 1. \<And>i g. \<lbrakk>\<And>g. \<lbrakk>i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ i) (g \<circ> f) z = (deriv ^^ i) g (f z); Suc i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ Suc i) (g \<circ> f) z = (deriv ^^ Suc i) g (f z)
[PROOF STEP]
have "g \<circ> f holomorphic_on s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g \<circ> f holomorphic_on s
[PROOF STEP]
using "Suc.prems" holf
[PROOF STATE]
proof (prove)
using this:
Suc i \<le> n
g holomorphic_on t
f holomorphic_on s

goal (1 subgoal):
 1. g \<circ> f holomorphic_on s
[PROOF STEP]
using fst
[PROOF STATE]
proof (prove)
using this:
Suc i \<le> n
g holomorphic_on t
f holomorphic_on s
f ` s \<subseteq> t

goal (1 subgoal):
 1. g \<circ> f holomorphic_on s
[PROOF STEP]
by (simp add: holomorphic_on_compose_gen image_subset_iff)
[PROOF STATE]
proof (state)
this:
g \<circ> f holomorphic_on s

goal (1 subgoal):
 1. \<And>i g. \<lbrakk>\<And>g. \<lbrakk>i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ i) (g \<circ> f) z = (deriv ^^ i) g (f z); Suc i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ Suc i) (g \<circ> f) z = (deriv ^^ Suc i) g (f z)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
g \<circ> f holomorphic_on s
[PROOF STEP]
have 1: "deriv (g \<circ> f) holomorphic_on s"
[PROOF STATE]
proof (prove)
using this:
g \<circ> f holomorphic_on s

goal (1 subgoal):
 1. deriv (g \<circ> f) holomorphic_on s
[PROOF STEP]
by (simp add: holomorphic_deriv s)
[PROOF STATE]
proof (state)
this:
deriv (g \<circ> f) holomorphic_on s

goal (1 subgoal):
 1. \<And>i g. \<lbrakk>\<And>g. \<lbrakk>i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ i) (g \<circ> f) z = (deriv ^^ i) g (f z); Suc i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ Suc i) (g \<circ> f) z = (deriv ^^ Suc i) g (f z)
[PROOF STEP]
have dg: "deriv g holomorphic_on t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. deriv g holomorphic_on t
[PROOF STEP]
using Suc.prems
[PROOF STATE]
proof (prove)
using this:
Suc i \<le> n
g holomorphic_on t

goal (1 subgoal):
 1. deriv g holomorphic_on t
[PROOF STEP]
by (simp add: Suc.prems(2) holomorphic_deriv t)
[PROOF STATE]
proof (state)
this:
deriv g holomorphic_on t

goal (1 subgoal):
 1. \<And>i g. \<lbrakk>\<And>g. \<lbrakk>i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ i) (g \<circ> f) z = (deriv ^^ i) g (f z); Suc i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ Suc i) (g \<circ> f) z = (deriv ^^ Suc i) g (f z)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
deriv g holomorphic_on t
[PROOF STEP]
have "deriv g holomorphic_on f ` s"
[PROOF STATE]
proof (prove)
using this:
deriv g holomorphic_on t

goal (1 subgoal):
 1. deriv g holomorphic_on f ` s
[PROOF STEP]
using fst
[PROOF STATE]
proof (prove)
using this:
deriv g holomorphic_on t
f ` s \<subseteq> t

goal (1 subgoal):
 1. deriv g holomorphic_on f ` s
[PROOF STEP]
by (simp add: holomorphic_on_subset image_subset_iff)
[PROOF STATE]
proof (state)
this:
deriv g holomorphic_on f ` s

goal (1 subgoal):
 1. \<And>i g. \<lbrakk>\<And>g. \<lbrakk>i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ i) (g \<circ> f) z = (deriv ^^ i) g (f z); Suc i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ Suc i) (g \<circ> f) z = (deriv ^^ Suc i) g (f z)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
deriv g holomorphic_on f ` s
[PROOF STEP]
have dgf: "(deriv g o f) holomorphic_on s"
[PROOF STATE]
proof (prove)
using this:
deriv g holomorphic_on f ` s

goal (1 subgoal):
 1. deriv g \<circ> f holomorphic_on s
[PROOF STEP]
by (simp add: holf holomorphic_on_compose)
[PROOF STATE]
proof (state)
this:
deriv g \<circ> f holomorphic_on s

goal (1 subgoal):
 1. \<And>i g. \<lbrakk>\<And>g. \<lbrakk>i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ i) (g \<circ> f) z = (deriv ^^ i) g (f z); Suc i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ Suc i) (g \<circ> f) z = (deriv ^^ Suc i) g (f z)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
deriv g \<circ> f holomorphic_on s
[PROOF STEP]
have 2: "(\<lambda>w. (deriv g o f) w * deriv f w) holomorphic_on s"
[PROOF STATE]
proof (prove)
using this:
deriv g \<circ> f holomorphic_on s

goal (1 subgoal):
 1. (\<lambda>w. (deriv g \<circ> f) w * deriv f w) holomorphic_on s
[PROOF STEP]
by (blast intro: holomorphic_intros holomorphic_on_compose holf s)
[PROOF STATE]
proof (state)
this:
(\<lambda>w. (deriv g \<circ> f) w * deriv f w) holomorphic_on s

goal (1 subgoal):
 1. \<And>i g. \<lbrakk>\<And>g. \<lbrakk>i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ i) (g \<circ> f) z = (deriv ^^ i) g (f z); Suc i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ Suc i) (g \<circ> f) z = (deriv ^^ Suc i) g (f z)
[PROOF STEP]
have "(deriv ^^ i) (deriv (g o f)) z = (deriv ^^ i) (\<lambda>w. deriv g (f w) * deriv f w) z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (deriv ^^ i) (deriv (g \<circ> f)) z = (deriv ^^ i) (\<lambda>w. deriv g (f w) * deriv f w) z
[PROOF STEP]
apply (rule higher_deriv_transform_within_open [OF 1 2 [unfolded o_def] s \<open>z \<in> s\<close>])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>w. w \<in> s \<Longrightarrow> deriv (g \<circ> f) w = deriv g (f w) * deriv f w
[PROOF STEP]
apply (rule deriv_chain)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>w. w \<in> s \<Longrightarrow> f field_differentiable at w
 2. \<And>w. w \<in> s \<Longrightarrow> g field_differentiable at (f w)
[PROOF STEP]
using holf Suc.prems fst
[PROOF STATE]
proof (prove)
using this:
f holomorphic_on s
Suc i \<le> n
g holomorphic_on t
f ` s \<subseteq> t

goal (2 subgoals):
 1. \<And>w. w \<in> s \<Longrightarrow> f field_differentiable at w
 2. \<And>w. w \<in> s \<Longrightarrow> g field_differentiable at (f w)
[PROOF STEP]
apply (auto simp: holomorphic_on_imp_differentiable_at s t)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
(deriv ^^ i) (deriv (g \<circ> f)) z = (deriv ^^ i) (\<lambda>w. deriv g (f w) * deriv f w) z

goal (1 subgoal):
 1. \<And>i g. \<lbrakk>\<And>g. \<lbrakk>i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ i) (g \<circ> f) z = (deriv ^^ i) g (f z); Suc i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ Suc i) (g \<circ> f) z = (deriv ^^ Suc i) g (f z)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(deriv ^^ i) (deriv (g \<circ> f)) z = (deriv ^^ i) (\<lambda>w. deriv g (f w) * deriv f w) z

goal (1 subgoal):
 1. \<And>i g. \<lbrakk>\<And>g. \<lbrakk>i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ i) (g \<circ> f) z = (deriv ^^ i) g (f z); Suc i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ Suc i) (g \<circ> f) z = (deriv ^^ Suc i) g (f z)
[PROOF STEP]
have "... = (\<Sum>j=0..i. of_nat(i choose j) * (deriv ^^ j) (\<lambda>w. deriv g (f w)) z * (deriv ^^ (i - j)) (deriv f) z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (deriv ^^ i) (\<lambda>w. deriv g (f w) * deriv f w) z = (\<Sum>j = 0..i. of_nat (i choose j) * (deriv ^^ j) (\<lambda>w. deriv g (f w)) z * (deriv ^^ (i - j)) (deriv f) z)
[PROOF STEP]
apply (rule higher_deriv_mult [OF dgf [unfolded o_def] _ s \<open>z \<in> s\<close>])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. deriv f holomorphic_on s
[PROOF STEP]
by (simp add: holf holomorphic_deriv s)
[PROOF STATE]
proof (state)
this:
(deriv ^^ i) (\<lambda>w. deriv g (f w) * deriv f w) z = (\<Sum>j = 0..i. of_nat (i choose j) * (deriv ^^ j) (\<lambda>w. deriv g (f w)) z * (deriv ^^ (i - j)) (deriv f) z)

goal (1 subgoal):
 1. \<And>i g. \<lbrakk>\<And>g. \<lbrakk>i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ i) (g \<circ> f) z = (deriv ^^ i) g (f z); Suc i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ Suc i) (g \<circ> f) z = (deriv ^^ Suc i) g (f z)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(deriv ^^ i) (\<lambda>w. deriv g (f w) * deriv f w) z = (\<Sum>j = 0..i. of_nat (i choose j) * (deriv ^^ j) (\<lambda>w. deriv g (f w)) z * (deriv ^^ (i - j)) (deriv f) z)

goal (1 subgoal):
 1. \<And>i g. \<lbrakk>\<And>g. \<lbrakk>i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ i) (g \<circ> f) z = (deriv ^^ i) g (f z); Suc i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ Suc i) (g \<circ> f) z = (deriv ^^ Suc i) g (f z)
[PROOF STEP]
have "... = (\<Sum>j=i..i. of_nat(i choose j) * (deriv ^^ j) (\<lambda>w. deriv g (f w)) z * (deriv ^^ Suc (i - j)) f z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>j = 0..i. of_nat (i choose j) * (deriv ^^ j) (\<lambda>w. deriv g (f w)) z * (deriv ^^ (i - j)) (deriv f) z) = (\<Sum>j = i..i. of_nat (i choose j) * (deriv ^^ j) (\<lambda>w. deriv g (f w)) z * (deriv ^^ Suc (i - j)) f z)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>j = 0..i. of_nat (i choose j) * (deriv ^^ j) (\<lambda>w. deriv g (f w)) z * (deriv ^^ (i - j)) (deriv f) z) = (\<Sum>j = i..i. of_nat (i choose j) * (deriv ^^ j) (\<lambda>w. deriv g (f w)) z * (deriv ^^ Suc (i - j)) f z)
[PROOF STEP]
have *: "(deriv ^^ j) (\<lambda>w. deriv g (f w)) z = 0"  if "j < i" and nz: "(deriv ^^ (i - j)) (deriv f) z \<noteq> 0" for j
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (deriv ^^ j) (\<lambda>w. deriv g (f w)) z = 0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (deriv ^^ j) (\<lambda>w. deriv g (f w)) z = 0
[PROOF STEP]
have "1 < Suc (i - j)" "Suc (i - j) \<le> n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 < Suc (i - j) &&& Suc (i - j) \<le> n
[PROOF STEP]
using \<open>j < i\<close> \<open>Suc i \<le> n\<close>
[PROOF STATE]
proof (prove)
using this:
j < i
Suc i \<le> n

goal (1 subgoal):
 1. 1 < Suc (i - j) &&& Suc (i - j) \<le> n
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
1 < Suc (i - j)
Suc (i - j) \<le> n

goal (1 subgoal):
 1. (deriv ^^ j) (\<lambda>w. deriv g (f w)) z = 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
1 < Suc (i - j)
Suc (i - j) \<le> n
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
1 < Suc (i - j)
Suc (i - j) \<le> n

goal (1 subgoal):
 1. (deriv ^^ j) (\<lambda>w. deriv g (f w)) z = 0
[PROOF STEP]
by (metis comp_def funpow.simps(2) funpow_swap1 zero nz)
[PROOF STATE]
proof (state)
this:
(deriv ^^ j) (\<lambda>w. deriv g (f w)) z = 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>?j < i; (deriv ^^ (i - ?j)) (deriv f) z \<noteq> 0\<rbrakk> \<Longrightarrow> (deriv ^^ ?j) (\<lambda>w. deriv g (f w)) z = 0

goal (1 subgoal):
 1. (\<Sum>j = 0..i. of_nat (i choose j) * (deriv ^^ j) (\<lambda>w. deriv g (f w)) z * (deriv ^^ (i - j)) (deriv f) z) = (\<Sum>j = i..i. of_nat (i choose j) * (deriv ^^ j) (\<lambda>w. deriv g (f w)) z * (deriv ^^ Suc (i - j)) f z)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?j < i; (deriv ^^ (i - ?j)) (deriv f) z \<noteq> 0\<rbrakk> \<Longrightarrow> (deriv ^^ ?j) (\<lambda>w. deriv g (f w)) z = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?j < i; (deriv ^^ (i - ?j)) (deriv f) z \<noteq> 0\<rbrakk> \<Longrightarrow> (deriv ^^ ?j) (\<lambda>w. deriv g (f w)) z = 0

goal (1 subgoal):
 1. (\<Sum>j = 0..i. of_nat (i choose j) * (deriv ^^ j) (\<lambda>w. deriv g (f w)) z * (deriv ^^ (i - j)) (deriv f) z) = (\<Sum>j = i..i. of_nat (i choose j) * (deriv ^^ j) (\<lambda>w. deriv g (f w)) z * (deriv ^^ Suc (i - j)) f z)
[PROOF STEP]
apply (simp only: funpow_Suc_right o_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>j. \<lbrakk>j < i; (deriv ^^ (i - j)) (deriv f) z \<noteq> 0\<rbrakk> \<Longrightarrow> (deriv ^^ j) (\<lambda>w. deriv g (f w)) z = 0) \<Longrightarrow> (\<Sum>j = 0..i. of_nat (i choose j) * (deriv ^^ j) (\<lambda>w. deriv g (f w)) z * (deriv ^^ (i - j)) (deriv f) z) = (\<Sum>j = i..i. of_nat (i choose j) * (deriv ^^ j) (\<lambda>w. deriv g (f w)) z * (deriv ^^ (i - j)) (deriv f) z)
[PROOF STEP]
apply (rule comm_monoid_add_class.sum.mono_neutral_right, auto)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
(\<Sum>j = 0..i. of_nat (i choose j) * (deriv ^^ j) (\<lambda>w. deriv g (f w)) z * (deriv ^^ (i - j)) (deriv f) z) = (\<Sum>j = i..i. of_nat (i choose j) * (deriv ^^ j) (\<lambda>w. deriv g (f w)) z * (deriv ^^ Suc (i - j)) f z)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>j = 0..i. of_nat (i choose j) * (deriv ^^ j) (\<lambda>w. deriv g (f w)) z * (deriv ^^ (i - j)) (deriv f) z) = (\<Sum>j = i..i. of_nat (i choose j) * (deriv ^^ j) (\<lambda>w. deriv g (f w)) z * (deriv ^^ Suc (i - j)) f z)

goal (1 subgoal):
 1. \<And>i g. \<lbrakk>\<And>g. \<lbrakk>i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ i) (g \<circ> f) z = (deriv ^^ i) g (f z); Suc i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ Suc i) (g \<circ> f) z = (deriv ^^ Suc i) g (f z)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>j = 0..i. of_nat (i choose j) * (deriv ^^ j) (\<lambda>w. deriv g (f w)) z * (deriv ^^ (i - j)) (deriv f) z) = (\<Sum>j = i..i. of_nat (i choose j) * (deriv ^^ j) (\<lambda>w. deriv g (f w)) z * (deriv ^^ Suc (i - j)) f z)

goal (1 subgoal):
 1. \<And>i g. \<lbrakk>\<And>g. \<lbrakk>i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ i) (g \<circ> f) z = (deriv ^^ i) g (f z); Suc i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ Suc i) (g \<circ> f) z = (deriv ^^ Suc i) g (f z)
[PROOF STEP]
have "... = (deriv ^^ i) (deriv g) (f z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>j = i..i. of_nat (i choose j) * (deriv ^^ j) (\<lambda>w. deriv g (f w)) z * (deriv ^^ Suc (i - j)) f z) = (deriv ^^ i) (deriv g) (f z)
[PROOF STEP]
using Suc.IH [OF _ dg] Suc.prems
[PROOF STATE]
proof (prove)
using this:
i \<le> n \<Longrightarrow> (deriv ^^ i) (deriv g \<circ> f) z = (deriv ^^ i) (deriv g) (f z)
Suc i \<le> n
g holomorphic_on t

goal (1 subgoal):
 1. (\<Sum>j = i..i. of_nat (i choose j) * (deriv ^^ j) (\<lambda>w. deriv g (f w)) z * (deriv ^^ Suc (i - j)) f z) = (deriv ^^ i) (deriv g) (f z)
[PROOF STEP]
by (simp add: dfz)
[PROOF STATE]
proof (state)
this:
(\<Sum>j = i..i. of_nat (i choose j) * (deriv ^^ j) (\<lambda>w. deriv g (f w)) z * (deriv ^^ Suc (i - j)) f z) = (deriv ^^ i) (deriv g) (f z)

goal (1 subgoal):
 1. \<And>i g. \<lbrakk>\<And>g. \<lbrakk>i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ i) (g \<circ> f) z = (deriv ^^ i) g (f z); Suc i \<le> n; g holomorphic_on t\<rbrakk> \<Longrightarrow> (deriv ^^ Suc i) (g \<circ> f) z = (deriv ^^ Suc i) g (f z)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(deriv ^^ i) (deriv (g \<circ> f)) z = (deriv ^^ i) (deriv g) (f z)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
(deriv ^^ i) (deriv (g \<circ> f)) z = (deriv ^^ i) (deriv g) (f z)

goal (1 subgoal):
 1. (deriv ^^ Suc i) (g \<circ> f) z = (deriv ^^ Suc i) g (f z)
[PROOF STEP]
by (simp only: funpow_Suc_right o_def)
[PROOF STATE]
proof (state)
this:
(deriv ^^ Suc i) (g \<circ> f) z = (deriv ^^ Suc i) g (f z)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Inf_if_Inf_from: "\<iota> \<in> Inf_from N \<Longrightarrow> \<iota> \<in> Inf"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<iota> \<in> Inf_from N \<Longrightarrow> \<iota> \<in> Inf
[PROOF STEP]
unfolding Inf_from_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<iota> \<in> {\<iota> \<in> Inf. set (prems_of \<iota>) \<subseteq> N} \<Longrightarrow> \<iota> \<in> Inf
[PROOF STEP]
by simp


[STATEMENT]
lemma atoms_pltl_OR [simp]:
  assumes fin: "finite (\<Phi>::'a pltl set)"
  shows "atoms_pltl (OR \<Phi>) = (\<Union>\<phi>\<in>\<Phi>. atoms_pltl \<phi>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. atoms_pltl (OR \<Phi>) = \<Union> (atoms_pltl ` \<Phi>)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. atoms_pltl (OR \<Phi>) = \<Union> (atoms_pltl ` \<Phi>)
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. atoms_pltl (OR \<Phi>) = \<Union> (atoms_pltl ` \<Phi>)
[PROOF STEP]
fix \<psi>::"'a pltl"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. atoms_pltl (OR \<Phi>) = \<Union> (atoms_pltl ` \<Phi>)
[PROOF STEP]
assume "fold_graph Or_ltlp False_ltlp \<Phi> \<psi>"
[PROOF STATE]
proof (state)
this:
fold_graph Or_ltlp false\<^sub>p \<Phi> \<psi>

goal (1 subgoal):
 1. atoms_pltl (OR \<Phi>) = \<Union> (atoms_pltl ` \<Phi>)
[PROOF STEP]
hence "atoms_pltl \<psi> = (\<Union>\<phi>\<in>\<Phi>. atoms_pltl \<phi>)"
[PROOF STATE]
proof (prove)
using this:
fold_graph Or_ltlp false\<^sub>p \<Phi> \<psi>

goal (1 subgoal):
 1. atoms_pltl \<psi> = \<Union> (atoms_pltl ` \<Phi>)
[PROOF STEP]
by (rule fold_graph.induct) auto
[PROOF STATE]
proof (state)
this:
atoms_pltl \<psi> = \<Union> (atoms_pltl ` \<Phi>)

goal (1 subgoal):
 1. atoms_pltl (OR \<Phi>) = \<Union> (atoms_pltl ` \<Phi>)
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
fold_graph Or_ltlp false\<^sub>p \<Phi> ?\<psi>2 \<Longrightarrow> atoms_pltl ?\<psi>2 = \<Union> (atoms_pltl ` \<Phi>)

goal (1 subgoal):
 1. atoms_pltl (OR \<Phi>) = \<Union> (atoms_pltl ` \<Phi>)
[PROOF STEP]
with fold_graph_OR[OF fin]
[PROOF STATE]
proof (chain)
picking this:
fold_graph Or_ltlp false\<^sub>p \<Phi> (OR \<Phi>)
fold_graph Or_ltlp false\<^sub>p \<Phi> ?\<psi>2 \<Longrightarrow> atoms_pltl ?\<psi>2 = \<Union> (atoms_pltl ` \<Phi>)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
fold_graph Or_ltlp false\<^sub>p \<Phi> (OR \<Phi>)
fold_graph Or_ltlp false\<^sub>p \<Phi> ?\<psi>2 \<Longrightarrow> atoms_pltl ?\<psi>2 = \<Union> (atoms_pltl ` \<Phi>)

goal (1 subgoal):
 1. atoms_pltl (OR \<Phi>) = \<Union> (atoms_pltl ` \<Phi>)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
atoms_pltl (OR \<Phi>) = \<Union> (atoms_pltl ` \<Phi>)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma monom_mult_dist_left: "monom_mult (c + d) t p = (monom_mult c t p) + (monom_mult d t p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. monom_mult (c + d) t p = monom_mult c t p + monom_mult d t p
[PROOF STEP]
by (rule poly_mapping_eqI, simp add: lookup_monom_mult lookup_add algebra_simps)


[STATEMENT]
lemma pow_four_block_mat: assumes A: "A \<in> carrier_mat n n"
  and B: "B \<in> carrier_mat m m"
  shows "(four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B) ^\<^sub>m k =
    four_block_mat (A ^\<^sub>m k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m k = four_block_mat (A ^\<^sub>m k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m k)
[PROOF STEP]
proof (induct k)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m 0 = four_block_mat (A ^\<^sub>m 0) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m 0)
 2. \<And>k. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m k = four_block_mat (A ^\<^sub>m k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m k) \<Longrightarrow> four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m Suc k = four_block_mat (A ^\<^sub>m Suc k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m Suc k)
[PROOF STEP]
case (Suc k)
[PROOF STATE]
proof (state)
this:
four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m k = four_block_mat (A ^\<^sub>m k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m k)

goal (2 subgoals):
 1. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m 0 = four_block_mat (A ^\<^sub>m 0) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m 0)
 2. \<And>k. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m k = four_block_mat (A ^\<^sub>m k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m k) \<Longrightarrow> four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m Suc k = four_block_mat (A ^\<^sub>m Suc k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m Suc k)
[PROOF STEP]
let ?FB = "\<lambda> A B. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m 0 = four_block_mat (A ^\<^sub>m 0) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m 0)
 2. \<And>k. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m k = four_block_mat (A ^\<^sub>m k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m k) \<Longrightarrow> four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m Suc k = four_block_mat (A ^\<^sub>m Suc k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m Suc k)
[PROOF STEP]
let ?A = "?FB A B"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m 0 = four_block_mat (A ^\<^sub>m 0) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m 0)
 2. \<And>k. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m k = four_block_mat (A ^\<^sub>m k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m k) \<Longrightarrow> four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m Suc k = four_block_mat (A ^\<^sub>m Suc k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m Suc k)
[PROOF STEP]
let ?B = "?FB (A ^\<^sub>m k) (B ^\<^sub>m k)"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m 0 = four_block_mat (A ^\<^sub>m 0) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m 0)
 2. \<And>k. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m k = four_block_mat (A ^\<^sub>m k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m k) \<Longrightarrow> four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m Suc k = four_block_mat (A ^\<^sub>m Suc k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m Suc k)
[PROOF STEP]
from A B
[PROOF STATE]
proof (chain)
picking this:
A \<in> carrier_mat n n
B \<in> carrier_mat m m
[PROOF STEP]
have Ak: "A ^\<^sub>m k \<in> carrier_mat n n" and Bk: "B ^\<^sub>m k \<in> carrier_mat m m"
[PROOF STATE]
proof (prove)
using this:
A \<in> carrier_mat n n
B \<in> carrier_mat m m

goal (1 subgoal):
 1. A ^\<^sub>m k \<in> carrier_mat n n &&& B ^\<^sub>m k \<in> carrier_mat m m
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
A ^\<^sub>m k \<in> carrier_mat n n
B ^\<^sub>m k \<in> carrier_mat m m

goal (2 subgoals):
 1. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m 0 = four_block_mat (A ^\<^sub>m 0) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m 0)
 2. \<And>k. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m k = four_block_mat (A ^\<^sub>m k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m k) \<Longrightarrow> four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m Suc k = four_block_mat (A ^\<^sub>m Suc k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m Suc k)
[PROOF STEP]
have "?A ^\<^sub>m Suc k = ?A ^\<^sub>m k * ?A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m Suc k = four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m k * four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m Suc k = four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m k * four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B

goal (2 subgoals):
 1. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m 0 = four_block_mat (A ^\<^sub>m 0) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m 0)
 2. \<And>k. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m k = four_block_mat (A ^\<^sub>m k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m k) \<Longrightarrow> four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m Suc k = four_block_mat (A ^\<^sub>m Suc k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m Suc k)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m Suc k = four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m k * four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B

goal (2 subgoals):
 1. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m 0 = four_block_mat (A ^\<^sub>m 0) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m 0)
 2. \<And>k. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m k = four_block_mat (A ^\<^sub>m k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m k) \<Longrightarrow> four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m Suc k = four_block_mat (A ^\<^sub>m Suc k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m Suc k)
[PROOF STEP]
have "?A ^\<^sub>m k = ?B "
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m k = four_block_mat (A ^\<^sub>m k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m k)
[PROOF STEP]
by (rule Suc)
[PROOF STATE]
proof (state)
this:
four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m k = four_block_mat (A ^\<^sub>m k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m k)

goal (2 subgoals):
 1. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m 0 = four_block_mat (A ^\<^sub>m 0) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m 0)
 2. \<And>k. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m k = four_block_mat (A ^\<^sub>m k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m k) \<Longrightarrow> four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m Suc k = four_block_mat (A ^\<^sub>m Suc k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m Suc k)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m k = four_block_mat (A ^\<^sub>m k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m k)

goal (2 subgoals):
 1. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m 0 = four_block_mat (A ^\<^sub>m 0) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m 0)
 2. \<And>k. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m k = four_block_mat (A ^\<^sub>m k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m k) \<Longrightarrow> four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m Suc k = four_block_mat (A ^\<^sub>m Suc k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m Suc k)
[PROOF STEP]
have "?B * ?A = ?FB (A ^\<^sub>m Suc k) (B ^\<^sub>m Suc k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. four_block_mat (A ^\<^sub>m k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m k) * four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B = four_block_mat (A ^\<^sub>m Suc k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m Suc k)
[PROOF STEP]
by (subst mult_four_block_mat[OF Ak _ _ Bk A _ _ B], insert A B, auto)
[PROOF STATE]
proof (state)
this:
four_block_mat (A ^\<^sub>m k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m k) * four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B = four_block_mat (A ^\<^sub>m Suc k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m Suc k)

goal (2 subgoals):
 1. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m 0 = four_block_mat (A ^\<^sub>m 0) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m 0)
 2. \<And>k. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m k = four_block_mat (A ^\<^sub>m k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m k) \<Longrightarrow> four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m Suc k = four_block_mat (A ^\<^sub>m Suc k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m Suc k)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m Suc k = four_block_mat (A ^\<^sub>m Suc k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m Suc k)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m Suc k = four_block_mat (A ^\<^sub>m Suc k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m Suc k)

goal (1 subgoal):
 1. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m Suc k = four_block_mat (A ^\<^sub>m Suc k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m Suc k)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m Suc k = four_block_mat (A ^\<^sub>m Suc k) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m Suc k)

goal (1 subgoal):
 1. four_block_mat A (0\<^sub>m n m) (0\<^sub>m m n) B ^\<^sub>m 0 = four_block_mat (A ^\<^sub>m 0) (0\<^sub>m n m) (0\<^sub>m m n) (B ^\<^sub>m 0)
[PROOF STEP]
qed (insert A B, auto)


[STATEMENT]
lemma closed_ML_subst_ML:
  "\<forall>i. closed\<^sub>M\<^sub>L k (\<sigma> i) \<Longrightarrow> closed\<^sub>M\<^sub>L k (subst\<^sub>M\<^sub>L \<sigma> v)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i. closed\<^sub>M\<^sub>L k (\<sigma> i) \<Longrightarrow> closed\<^sub>M\<^sub>L k (subst\<^sub>M\<^sub>L \<sigma> v)
[PROOF STEP]
by(induct \<sigma> v arbitrary: k rule: subst_ML.induct) (auto simp: closed_ML_Suc)


[STATEMENT]
lemma rectangle_eq [simp]: "is_rectangle x \<longleftrightarrow> x ; 1 ; x = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_rectangle x = (x ; 1 ; x = x)
[PROOF STEP]
by (metis conv_one dedekind order.eq_iff inf_top_left mult.assoc one_idem_mult is_rectangle_def)


[STATEMENT]
lemma nuc_inf_closed_var: "nucleus f \<Longrightarrow> f (f x \<sqinter> f y) = f x \<sqinter> f y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nucleus f \<Longrightarrow> f (f x \<sqinter> f y) = f x \<sqinter> f y
[PROOF STEP]
by (smt antisym_conv clop_alt clop_extensive_var inf_le2 inf_sup_ord(1) le_inf_iff nucleus_def)


[STATEMENT]
lemma raw_has_prod_Suc_iff: "raw_has_prod f M (a * f M) \<longleftrightarrow> raw_has_prod (\<lambda>n. f (Suc n)) M a \<and> f M \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. raw_has_prod f M (a * f M) = (raw_has_prod (\<lambda>n. f (Suc n)) M a \<and> f M \<noteq> (0::'a))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. raw_has_prod f M (a * f M) = (raw_has_prod (\<lambda>n. f (Suc n)) M a \<and> f M \<noteq> (0::'a))
[PROOF STEP]
have "raw_has_prod f M (a * f M) \<longleftrightarrow> (\<lambda>i. \<Prod>j\<le>Suc i. f (j+M)) \<longlonglongrightarrow> a * f M \<and> a * f M \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. raw_has_prod f M (a * f M) = ((\<lambda>i. \<Prod>j\<le>Suc i. f (j + M)) \<longlonglongrightarrow> a * f M \<and> a * f M \<noteq> (0::'a))
[PROOF STEP]
by (subst filterlim_sequentially_Suc) (simp add: raw_has_prod_def)
[PROOF STATE]
proof (state)
this:
raw_has_prod f M (a * f M) = ((\<lambda>i. \<Prod>j\<le>Suc i. f (j + M)) \<longlonglongrightarrow> a * f M \<and> a * f M \<noteq> (0::'a))

goal (1 subgoal):
 1. raw_has_prod f M (a * f M) = (raw_has_prod (\<lambda>n. f (Suc n)) M a \<and> f M \<noteq> (0::'a))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
raw_has_prod f M (a * f M) = ((\<lambda>i. \<Prod>j\<le>Suc i. f (j + M)) \<longlonglongrightarrow> a * f M \<and> a * f M \<noteq> (0::'a))

goal (1 subgoal):
 1. raw_has_prod f M (a * f M) = (raw_has_prod (\<lambda>n. f (Suc n)) M a \<and> f M \<noteq> (0::'a))
[PROOF STEP]
have "\<dots> \<longleftrightarrow> (\<lambda>i. (\<Prod>j\<le>i. f (Suc j + M)) * f M) \<longlonglongrightarrow> a * f M \<and> a * f M \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>i. \<Prod>j\<le>Suc i. f (j + M)) \<longlonglongrightarrow> a * f M \<and> a * f M \<noteq> (0::'a)) = ((\<lambda>i. (\<Prod>j\<le>i. f (Suc j + M)) * f M) \<longlonglongrightarrow> a * f M \<and> a * f M \<noteq> (0::'a))
[PROOF STEP]
by (simp add: ac_simps atMost_Suc_eq_insert_0 image_Suc_atMost prod.atLeast1_atMost_eq lessThan_Suc_atMost
                  del: prod.cl_ivl_Suc)
[PROOF STATE]
proof (state)
this:
((\<lambda>i. \<Prod>j\<le>Suc i. f (j + M)) \<longlonglongrightarrow> a * f M \<and> a * f M \<noteq> (0::'a)) = ((\<lambda>i. (\<Prod>j\<le>i. f (Suc j + M)) * f M) \<longlonglongrightarrow> a * f M \<and> a * f M \<noteq> (0::'a))

goal (1 subgoal):
 1. raw_has_prod f M (a * f M) = (raw_has_prod (\<lambda>n. f (Suc n)) M a \<and> f M \<noteq> (0::'a))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
((\<lambda>i. \<Prod>j\<le>Suc i. f (j + M)) \<longlonglongrightarrow> a * f M \<and> a * f M \<noteq> (0::'a)) = ((\<lambda>i. (\<Prod>j\<le>i. f (Suc j + M)) * f M) \<longlonglongrightarrow> a * f M \<and> a * f M \<noteq> (0::'a))

goal (1 subgoal):
 1. raw_has_prod f M (a * f M) = (raw_has_prod (\<lambda>n. f (Suc n)) M a \<and> f M \<noteq> (0::'a))
[PROOF STEP]
have "\<dots> \<longleftrightarrow> raw_has_prod (\<lambda>n. f (Suc n)) M a \<and> f M \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>i. (\<Prod>j\<le>i. f (Suc j + M)) * f M) \<longlonglongrightarrow> a * f M \<and> a * f M \<noteq> (0::'a)) = (raw_has_prod (\<lambda>n. f (Suc n)) M a \<and> f M \<noteq> (0::'a))
[PROOF STEP]
proof safe
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<lbrakk>(\<lambda>i. (\<Prod>j\<le>i. f (Suc j + M)) * f M) \<longlonglongrightarrow> a * f M; a * f M \<noteq> (0::'a)\<rbrakk> \<Longrightarrow> raw_has_prod (\<lambda>n. f (Suc n)) M a
 2. \<lbrakk>(\<lambda>i. (\<Prod>j\<le>i. f (Suc j + M)) * f M) \<longlonglongrightarrow> a * f M; a * f M \<noteq> (0::'a); f M = (0::'a)\<rbrakk> \<Longrightarrow> False
 3. \<lbrakk>raw_has_prod (\<lambda>n. f (Suc n)) M a; f M \<noteq> (0::'a)\<rbrakk> \<Longrightarrow> (\<lambda>i. (\<Prod>j\<le>i. f (Suc j + M)) * f M) \<longlonglongrightarrow> a * f M
 4. \<lbrakk>raw_has_prod (\<lambda>n. f (Suc n)) M a; f M \<noteq> (0::'a); a * f M = (0::'a)\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
assume tends: "(\<lambda>i. (\<Prod>j\<le>i. f (Suc j + M)) * f M) \<longlonglongrightarrow> a * f M" and 0: "a * f M \<noteq> 0"
[PROOF STATE]
proof (state)
this:
(\<lambda>i. (\<Prod>j\<le>i. f (Suc j + M)) * f M) \<longlonglongrightarrow> a * f M
a * f M \<noteq> (0::'a)

goal (4 subgoals):
 1. \<lbrakk>(\<lambda>i. (\<Prod>j\<le>i. f (Suc j + M)) * f M) \<longlonglongrightarrow> a * f M; a * f M \<noteq> (0::'a)\<rbrakk> \<Longrightarrow> raw_has_prod (\<lambda>n. f (Suc n)) M a
 2. \<lbrakk>(\<lambda>i. (\<Prod>j\<le>i. f (Suc j + M)) * f M) \<longlonglongrightarrow> a * f M; a * f M \<noteq> (0::'a); f M = (0::'a)\<rbrakk> \<Longrightarrow> False
 3. \<lbrakk>raw_has_prod (\<lambda>n. f (Suc n)) M a; f M \<noteq> (0::'a)\<rbrakk> \<Longrightarrow> (\<lambda>i. (\<Prod>j\<le>i. f (Suc j + M)) * f M) \<longlonglongrightarrow> a * f M
 4. \<lbrakk>raw_has_prod (\<lambda>n. f (Suc n)) M a; f M \<noteq> (0::'a); a * f M = (0::'a)\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
with tendsto_divide[OF tends tendsto_const, of "f M"]
[PROOF STATE]
proof (chain)
picking this:
f M \<noteq> (0::'a) \<Longrightarrow> (\<lambda>x. (\<Prod>j\<le>x. f (Suc j + M)) * f M / f M) \<longlonglongrightarrow> a * f M / f M
(\<lambda>i. (\<Prod>j\<le>i. f (Suc j + M)) * f M) \<longlonglongrightarrow> a * f M
a * f M \<noteq> (0::'a)
[PROOF STEP]
show "raw_has_prod (\<lambda>n. f (Suc n)) M a"
[PROOF STATE]
proof (prove)
using this:
f M \<noteq> (0::'a) \<Longrightarrow> (\<lambda>x. (\<Prod>j\<le>x. f (Suc j + M)) * f M / f M) \<longlonglongrightarrow> a * f M / f M
(\<lambda>i. (\<Prod>j\<le>i. f (Suc j + M)) * f M) \<longlonglongrightarrow> a * f M
a * f M \<noteq> (0::'a)

goal (1 subgoal):
 1. raw_has_prod (\<lambda>n. f (Suc n)) M a
[PROOF STEP]
by (simp add: raw_has_prod_def)
[PROOF STATE]
proof (state)
this:
raw_has_prod (\<lambda>n. f (Suc n)) M a

goal (3 subgoals):
 1. \<lbrakk>(\<lambda>i. (\<Prod>j\<le>i. f (Suc j + M)) * f M) \<longlonglongrightarrow> a * f M; a * f M \<noteq> (0::'a); f M = (0::'a)\<rbrakk> \<Longrightarrow> False
 2. \<lbrakk>raw_has_prod (\<lambda>n. f (Suc n)) M a; f M \<noteq> (0::'a)\<rbrakk> \<Longrightarrow> (\<lambda>i. (\<Prod>j\<le>i. f (Suc j + M)) * f M) \<longlonglongrightarrow> a * f M
 3. \<lbrakk>raw_has_prod (\<lambda>n. f (Suc n)) M a; f M \<noteq> (0::'a); a * f M = (0::'a)\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
qed (auto intro: tendsto_mult_right simp:  raw_has_prod_def)
[PROOF STATE]
proof (state)
this:
((\<lambda>i. (\<Prod>j\<le>i. f (Suc j + M)) * f M) \<longlonglongrightarrow> a * f M \<and> a * f M \<noteq> (0::'a)) = (raw_has_prod (\<lambda>n. f (Suc n)) M a \<and> f M \<noteq> (0::'a))

goal (1 subgoal):
 1. raw_has_prod f M (a * f M) = (raw_has_prod (\<lambda>n. f (Suc n)) M a \<and> f M \<noteq> (0::'a))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
raw_has_prod f M (a * f M) = (raw_has_prod (\<lambda>n. f (Suc n)) M a \<and> f M \<noteq> (0::'a))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
raw_has_prod f M (a * f M) = (raw_has_prod (\<lambda>n. f (Suc n)) M a \<and> f M \<noteq> (0::'a))

goal (1 subgoal):
 1. raw_has_prod f M (a * f M) = (raw_has_prod (\<lambda>n. f (Suc n)) M a \<and> f M \<noteq> (0::'a))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
raw_has_prod f M (a * f M) = (raw_has_prod (\<lambda>n. f (Suc n)) M a \<and> f M \<noteq> (0::'a))

goal:
No subgoals!
[PROOF STEP]
qed