[STATEMENT]
lemma bilinear_bounded:
  fixes h :: "'m::euclidean_space \<Rightarrow> 'n::euclidean_space \<Rightarrow> 'k::real_normed_vector"
  assumes bh: "bilinear h"
  shows "\<exists>B. \<forall>x y. norm (h x y) \<le> B * norm x * norm y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>B. \<forall>x y. norm (h x y) \<le> B * norm x * norm y
[PROOF STEP]
proof (clarify intro!: exI[of _ "\<Sum>i\<in>Basis. \<Sum>j\<in>Basis. norm (h i j)"])
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. norm (h x y) \<le> (\<Sum>i\<in>Basis. \<Sum>j\<in>Basis. norm (h i j)) * norm x * norm y
[PROOF STEP]
fix x :: 'm
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. norm (h x y) \<le> (\<Sum>i\<in>Basis. \<Sum>j\<in>Basis. norm (h i j)) * norm x * norm y
[PROOF STEP]
fix y :: 'n
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. norm (h x y) \<le> (\<Sum>i\<in>Basis. \<Sum>j\<in>Basis. norm (h i j)) * norm x * norm y
[PROOF STEP]
have "norm (h x y) = norm (h (sum (\<lambda>i. (x \<bullet> i) *\<^sub>R i) Basis) (sum (\<lambda>i. (y \<bullet> i) *\<^sub>R i) Basis))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (h x y) = norm (h (\<Sum>i\<in>Basis. (x \<bullet> i) *\<^sub>R i) (\<Sum>i\<in>Basis. (y \<bullet> i) *\<^sub>R i))
[PROOF STEP]
by (simp add: euclidean_representation)
[PROOF STATE]
proof (state)
this:
norm (h x y) = norm (h (\<Sum>i\<in>Basis. (x \<bullet> i) *\<^sub>R i) (\<Sum>i\<in>Basis. (y \<bullet> i) *\<^sub>R i))

goal (1 subgoal):
 1. \<And>x y. norm (h x y) \<le> (\<Sum>i\<in>Basis. \<Sum>j\<in>Basis. norm (h i j)) * norm x * norm y
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
norm (h x y) = norm (h (\<Sum>i\<in>Basis. (x \<bullet> i) *\<^sub>R i) (\<Sum>i\<in>Basis. (y \<bullet> i) *\<^sub>R i))

goal (1 subgoal):
 1. \<And>x y. norm (h x y) \<le> (\<Sum>i\<in>Basis. \<Sum>j\<in>Basis. norm (h i j)) * norm x * norm y
[PROOF STEP]
have "\<dots> = norm (sum (\<lambda> (i,j). h ((x \<bullet> i) *\<^sub>R i) ((y \<bullet> j) *\<^sub>R j)) (Basis \<times> Basis))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (h (\<Sum>i\<in>Basis. (x \<bullet> i) *\<^sub>R i) (\<Sum>i\<in>Basis. (y \<bullet> i) *\<^sub>R i)) = norm (\<Sum>(i, j)\<in>Basis \<times> Basis. h ((x \<bullet> i) *\<^sub>R i) ((y \<bullet> j) *\<^sub>R j))
[PROOF STEP]
unfolding bilinear_sum[OF bh]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (\<Sum>(i, j)\<in>Basis \<times> Basis. h ((x \<bullet> i) *\<^sub>R i) ((y \<bullet> j) *\<^sub>R j)) = norm (\<Sum>(i, j)\<in>Basis \<times> Basis. h ((x \<bullet> i) *\<^sub>R i) ((y \<bullet> j) *\<^sub>R j))
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
norm (h (\<Sum>i\<in>Basis. (x \<bullet> i) *\<^sub>R i) (\<Sum>i\<in>Basis. (y \<bullet> i) *\<^sub>R i)) = norm (\<Sum>(i, j)\<in>Basis \<times> Basis. h ((x \<bullet> i) *\<^sub>R i) ((y \<bullet> j) *\<^sub>R j))

goal (1 subgoal):
 1. \<And>x y. norm (h x y) \<le> (\<Sum>i\<in>Basis. \<Sum>j\<in>Basis. norm (h i j)) * norm x * norm y
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
norm (h x y) = norm (\<Sum>(i, j)\<in>Basis \<times> Basis. h ((x \<bullet> i) *\<^sub>R i) ((y \<bullet> j) *\<^sub>R j))
[PROOF STEP]
have th: "norm (h x y) = \<dots>"
[PROOF STATE]
proof (prove)
using this:
norm (h x y) = norm (\<Sum>(i, j)\<in>Basis \<times> Basis. h ((x \<bullet> i) *\<^sub>R i) ((y \<bullet> j) *\<^sub>R j))

goal (1 subgoal):
 1. norm (h x y) = norm (\<Sum>(i, j)\<in>Basis \<times> Basis. h ((x \<bullet> i) *\<^sub>R i) ((y \<bullet> j) *\<^sub>R j))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
norm (h x y) = norm (\<Sum>(i, j)\<in>Basis \<times> Basis. h ((x \<bullet> i) *\<^sub>R i) ((y \<bullet> j) *\<^sub>R j))

goal (1 subgoal):
 1. \<And>x y. norm (h x y) \<le> (\<Sum>i\<in>Basis. \<Sum>j\<in>Basis. norm (h i j)) * norm x * norm y
[PROOF STEP]
have "\<And>i j. \<lbrakk>i \<in> Basis; j \<in> Basis\<rbrakk>
           \<Longrightarrow> \<bar>x \<bullet> i\<bar> * (\<bar>y \<bullet> j\<bar> * norm (h i j)) \<le> norm x * (norm y * norm (h i j))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i j. \<lbrakk>i \<in> Basis; j \<in> Basis\<rbrakk> \<Longrightarrow> \<bar>x \<bullet> i\<bar> * (\<bar>y \<bullet> j\<bar> * norm (h i j)) \<le> norm x * (norm y * norm (h i j))
[PROOF STEP]
by (auto simp add: zero_le_mult_iff Basis_le_norm mult_mono)
[PROOF STATE]
proof (state)
this:
\<lbrakk>?i \<in> Basis; ?j \<in> Basis\<rbrakk> \<Longrightarrow> \<bar>x \<bullet> ?i\<bar> * (\<bar>y \<bullet> ?j\<bar> * norm (h ?i ?j)) \<le> norm x * (norm y * norm (h ?i ?j))

goal (1 subgoal):
 1. \<And>x y. norm (h x y) \<le> (\<Sum>i\<in>Basis. \<Sum>j\<in>Basis. norm (h i j)) * norm x * norm y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?i \<in> Basis; ?j \<in> Basis\<rbrakk> \<Longrightarrow> \<bar>x \<bullet> ?i\<bar> * (\<bar>y \<bullet> ?j\<bar> * norm (h ?i ?j)) \<le> norm x * (norm y * norm (h ?i ?j))
[PROOF STEP]
show "norm (h x y) \<le> (\<Sum>i\<in>Basis. \<Sum>j\<in>Basis. norm (h i j)) * norm x * norm y"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?i \<in> Basis; ?j \<in> Basis\<rbrakk> \<Longrightarrow> \<bar>x \<bullet> ?i\<bar> * (\<bar>y \<bullet> ?j\<bar> * norm (h ?i ?j)) \<le> norm x * (norm y * norm (h ?i ?j))

goal (1 subgoal):
 1. norm (h x y) \<le> (\<Sum>i\<in>Basis. \<Sum>j\<in>Basis. norm (h i j)) * norm x * norm y
[PROOF STEP]
unfolding sum_distrib_right th sum.cartesian_product
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?i \<in> Basis; ?j \<in> Basis\<rbrakk> \<Longrightarrow> \<bar>x \<bullet> ?i\<bar> * (\<bar>y \<bullet> ?j\<bar> * norm (h ?i ?j)) \<le> norm x * (norm y * norm (h ?i ?j))

goal (1 subgoal):
 1. norm (\<Sum>(i, j)\<in>Basis \<times> Basis. h ((x \<bullet> i) *\<^sub>R i) ((y \<bullet> j) *\<^sub>R j)) \<le> (\<Sum>n\<in>Basis \<times> Basis. (case n of (i, j) \<Rightarrow> norm (h i j)) * norm x * norm y)
[PROOF STEP]
by (clarsimp simp add: bilinear_rmul[OF bh] bilinear_lmul[OF bh]
      field_simps simp del: scaleR_scaleR intro!: sum_norm_le)
[PROOF STATE]
proof (state)
this:
norm (h x y) \<le> (\<Sum>i\<in>Basis. \<Sum>j\<in>Basis. norm (h i j)) * norm x * norm y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma mset_union_subset: "(A::'a multiset)+B \<subseteq># C \<Longrightarrow> A\<subseteq>#C \<and> B\<subseteq>#C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A + B \<subseteq># C \<Longrightarrow> A \<subseteq># C \<and> B \<subseteq># C
[PROOF STEP]
by (auto dest: mset_le_decr_left)


[STATEMENT]
lemma Im5_tendsto_upperbound:
   "\<lbrakk>(f \<longlongrightarrow> limit) net; \<forall>\<^sub>F x in net. Im5 (f x) \<le> b; net \<noteq> bot\<rbrakk> \<Longrightarrow> Im5 limit \<le> b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(f \<longlongrightarrow> limit) net; \<forall>\<^sub>F x in net. Im5 (f x) \<le> b; net \<noteq> bot\<rbrakk> \<Longrightarrow> Im5 limit \<le> b
[PROOF STEP]
by (blast intro: tendsto_upperbound [OF tendsto_Im5])


[STATEMENT]
lemma nth_remove_nth_conv:
  assumes "i < length (remove_nth n xs)"
  shows "remove_nth n xs ! i = xs ! (if i < n then i else Suc i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. remove_nth n xs ! i = xs ! (if i < n then i else Suc i)
[PROOF STEP]
using assms remove_nth_sound_l remove_nth_sound_r[of n i xs]
[PROOF STATE]
proof (prove)
using this:
i < length (remove_nth n xs)
?p < ?n \<Longrightarrow> remove_nth ?n ?xs ! ?p = ?xs ! ?p
\<lbrakk>n \<le> i; i < length xs\<rbrakk> \<Longrightarrow> remove_nth n xs ! i = xs ! Suc i

goal (1 subgoal):
 1. remove_nth n xs ! i = xs ! (if i < n then i else Suc i)
[PROOF STEP]
by auto


[STATEMENT]
lemma not_on_closed_segmentI_complex:
  fixes z::"complex"
  assumes "(Re b - Re z) * (Im z - Im a) \<noteq> (Im b - Im z) * (Re z - Re a)"
  shows "z \<notin> closed_segment a b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z \<notin> closed_segment a b
[PROOF STEP]
proof (cases "z\<noteq>a \<and> z\<noteq>b")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. z \<noteq> a \<and> z \<noteq> b \<Longrightarrow> z \<notin> closed_segment a b
 2. \<not> (z \<noteq> a \<and> z \<noteq> b) \<Longrightarrow> z \<notin> closed_segment a b
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
z \<noteq> a \<and> z \<noteq> b

goal (2 subgoals):
 1. z \<noteq> a \<and> z \<noteq> b \<Longrightarrow> z \<notin> closed_segment a b
 2. \<not> (z \<noteq> a \<and> z \<noteq> b) \<Longrightarrow> z \<notin> closed_segment a b
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
z \<noteq> a \<and> z \<noteq> b
[PROOF STEP]
have "cmod (z - a)\<noteq>0" "cmod (b - z)\<noteq>0"
[PROOF STATE]
proof (prove)
using this:
z \<noteq> a \<and> z \<noteq> b

goal (1 subgoal):
 1. cmod (z - a) \<noteq> 0 &&& cmod (b - z) \<noteq> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
cmod (z - a) \<noteq> 0
cmod (b - z) \<noteq> 0

goal (2 subgoals):
 1. z \<noteq> a \<and> z \<noteq> b \<Longrightarrow> z \<notin> closed_segment a b
 2. \<not> (z \<noteq> a \<and> z \<noteq> b) \<Longrightarrow> z \<notin> closed_segment a b
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
cmod (z - a) \<noteq> 0
cmod (b - z) \<noteq> 0
[PROOF STEP]
have "(Re b - Re z) * (Im z - Im a) = (Im b - Im z) * (Re z - Re a)" when
    "cmod (z - a) * (Re b - Re z) = cmod (b - z) * (Re z - Re a)"
    "cmod (z - a) * (Im b - Im z) = cmod (b - z) * (Im z - Im a)"
[PROOF STATE]
proof (prove)
using this:
cmod (z - a) \<noteq> 0
cmod (b - z) \<noteq> 0

goal (1 subgoal):
 1. (Re b - Re z) * (Im z - Im a) = (Im b - Im z) * (Re z - Re a)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
cmod (z - a) \<noteq> 0
cmod (b - z) \<noteq> 0
cmod (z - a) * (Re b - Re z) = cmod (b - z) * (Re z - Re a)
cmod (z - a) * (Im b - Im z) = cmod (b - z) * (Im z - Im a)

goal (1 subgoal):
 1. (Re b - Re z) * (Im z - Im a) = (Im b - Im z) * (Re z - Re a)
[PROOF STEP]
by algebra
[PROOF STATE]
proof (state)
this:
\<lbrakk>cmod (z - a) * (Re b - Re z) = cmod (b - z) * (Re z - Re a); cmod (z - a) * (Im b - Im z) = cmod (b - z) * (Im z - Im a)\<rbrakk> \<Longrightarrow> (Re b - Re z) * (Im z - Im a) = (Im b - Im z) * (Re z - Re a)

goal (2 subgoals):
 1. z \<noteq> a \<and> z \<noteq> b \<Longrightarrow> z \<notin> closed_segment a b
 2. \<not> (z \<noteq> a \<and> z \<noteq> b) \<Longrightarrow> z \<notin> closed_segment a b
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>cmod (z - a) * (Re b - Re z) = cmod (b - z) * (Re z - Re a); cmod (z - a) * (Im b - Im z) = cmod (b - z) * (Im z - Im a)\<rbrakk> \<Longrightarrow> (Re b - Re z) * (Im z - Im a) = (Im b - Im z) * (Re z - Re a)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>cmod (z - a) * (Re b - Re z) = cmod (b - z) * (Re z - Re a); cmod (z - a) * (Im b - Im z) = cmod (b - z) * (Im z - Im a)\<rbrakk> \<Longrightarrow> (Re b - Re z) * (Im z - Im a) = (Im b - Im z) * (Re z - Re a)

goal (1 subgoal):
 1. z \<notin> closed_segment a b
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>cmod (z - a) * (Re b - Re z) = cmod (b - z) * (Re z - Re a); cmod (z - a) * (Im b - Im z) = cmod (b - z) * (Im z - Im a)\<rbrakk> \<Longrightarrow> (Re b - Re z) * (Im z - Im a) = (Im b - Im z) * (Re z - Re a)
(Re b - Re z) * (Im z - Im a) \<noteq> (Im b - Im z) * (Re z - Re a)

goal (1 subgoal):
 1. z \<notin> closed_segment a b
[PROOF STEP]
apply (intro not_on_closed_segmentI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<lbrakk>cmod (z - a) * (Re b - Re z) = cmod (b - z) * (Re z - Re a); cmod (z - a) * (Im b - Im z) = cmod (b - z) * (Im z - Im a)\<rbrakk> \<Longrightarrow> (Re b - Re z) * (Im z - Im a) = (Im b - Im z) * (Re z - Re a); (Re b - Re z) * (Im z - Im a) \<noteq> (Im b - Im z) * (Re z - Re a)\<rbrakk> \<Longrightarrow> cmod (z - a) *\<^sub>R (b - z) \<noteq> cmod (b - z) *\<^sub>R (z - a)
[PROOF STEP]
by (auto simp add:scaleR_complex.ctr simp del:Complex_eq)
[PROOF STATE]
proof (state)
this:
z \<notin> closed_segment a b

goal (1 subgoal):
 1. \<not> (z \<noteq> a \<and> z \<noteq> b) \<Longrightarrow> z \<notin> closed_segment a b
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (z \<noteq> a \<and> z \<noteq> b) \<Longrightarrow> z \<notin> closed_segment a b
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> (z \<noteq> a \<and> z \<noteq> b)

goal (1 subgoal):
 1. \<not> (z \<noteq> a \<and> z \<noteq> b) \<Longrightarrow> z \<notin> closed_segment a b
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> (z \<noteq> a \<and> z \<noteq> b)
[PROOF STEP]
have "(Re b - Re z) * (Im z - Im a) = (Im b - Im z) * (Re z - Re a)"
[PROOF STATE]
proof (prove)
using this:
\<not> (z \<noteq> a \<and> z \<noteq> b)

goal (1 subgoal):
 1. (Re b - Re z) * (Im z - Im a) = (Im b - Im z) * (Re z - Re a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(Re b - Re z) * (Im z - Im a) = (Im b - Im z) * (Re z - Re a)

goal (1 subgoal):
 1. \<not> (z \<noteq> a \<and> z \<noteq> b) \<Longrightarrow> z \<notin> closed_segment a b
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(Re b - Re z) * (Im z - Im a) = (Im b - Im z) * (Re z - Re a)
[PROOF STEP]
have False
[PROOF STATE]
proof (prove)
using this:
(Re b - Re z) * (Im z - Im a) = (Im b - Im z) * (Re z - Re a)

goal (1 subgoal):
 1. False
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
(Re b - Re z) * (Im z - Im a) = (Im b - Im z) * (Re z - Re a)
(Re b - Re z) * (Im z - Im a) \<noteq> (Im b - Im z) * (Re z - Re a)

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

goal (1 subgoal):
 1. \<not> (z \<noteq> a \<and> z \<noteq> b) \<Longrightarrow> z \<notin> closed_segment a b
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
False
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
False

goal (1 subgoal):
 1. z \<notin> closed_segment a b
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
z \<notin> closed_segment a b

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma idempotent_conv_closed:
  "idempotent x \<Longrightarrow> idempotent (x\<^sup>T)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. idempotent x \<Longrightarrow> idempotent (x\<^sup>T)
[PROOF STEP]
by (metis conv_dist_comp)


[STATEMENT]
lemma rtranclp_unfold[nitpick_unfold]: "rtranclp r a b \<equiv> (a = b \<or> tranclp r a b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. r\<^sup>*\<^sup>* a b \<equiv> a = b \<or> r\<^sup>+\<^sup>+ a b
[PROOF STEP]
by (rule eq_reflection) (auto dest: rtranclpD)


[STATEMENT]
lemma span_breakdown_eq: "x \<in> span (insert a S) \<longleftrightarrow> (\<exists>k. x - k *s a \<in> span S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<in> span (insert a S)) = (\<exists>k. x - k *s a \<in> span S)
[PROOF STEP]
by (simp add: span_insert)


[STATEMENT]
lemma disjoint_ballI: "dist x y \<ge> r+s \<Longrightarrow> ball x r \<inter> ball y s = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. r + s \<le> dist x y \<Longrightarrow> ball x r \<inter> ball y s = {}
[PROOF STEP]
using dist_triangle_less_add not_le
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>dist ?x1.0 ?y < ?e1.0; dist ?x2.0 ?y < ?e2.0\<rbrakk> \<Longrightarrow> dist ?x1.0 ?x2.0 < ?e1.0 + ?e2.0
(\<not> ?x \<le> ?y) = (?y < ?x)

goal (1 subgoal):
 1. r + s \<le> dist x y \<Longrightarrow> ball x r \<inter> ball y s = {}
[PROOF STEP]
by fastforce


[STATEMENT]
lemma lift0: "(liftPoly i j 0) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. liftPoly i j 0 = 0
[PROOF STEP]
by (simp add: coeff_liftPoly mpoly_eq_iff)


[STATEMENT]
lemma walk_length_conv: "walk_length p = length p - 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. walk_length p = length p - 1
[PROOF STEP]
by (induct p rule: walk_edges.induct) (auto simp: walk_length_def)


[STATEMENT]
lemma higher_deriv_id [simp]:
     "(deriv ^^ n) id z = (if n = 0 then z else if n = 1 then 1 else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (deriv ^^ n) id z = (if n = 0 then z else if n = 1 then 1::'a else (0::'a))
[PROOF STEP]
by (simp add: id_def)


[STATEMENT]
lemma [code]:
  "all_n_lists P n \<longleftrightarrow> (if n = 0 then P [] else enum_all (%x. all_n_lists (%xs. P (x # xs)) (n - 1)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. all_n_lists P n = (if n = 0 then P [] else enum_all (\<lambda>x. all_n_lists (\<lambda>xs. P (x # xs)) (n - 1)))
[PROOF STEP]
unfolding all_n_lists_def enum_all
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ball (set (List.n_lists n enum)) P = (if n = 0 then P [] else \<forall>x. \<forall>xs\<in>set (List.n_lists (n - 1) enum). P (x # xs))
[PROOF STEP]
by (cases n) (auto simp add: enum_UNIV)


[STATEMENT]
lemma ideal_minus:
  assumes "ideal I"
  and "a\<in>I" and "b\<in>I"
  shows "a - b \<in> I"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a - b \<in> I
[PROOF STEP]
by (metis assms(1) assms(2) assms(3) ideal_def right_ideal_minus)


[STATEMENT]
lemma per_union_subs: "x \<in> S \<Longrightarrow> y\<in>S \<Longrightarrow> R\<subseteq>S \<times> S \<Longrightarrow> per_union R x y \<subseteq> S \<times> S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> S; y \<in> S; R \<subseteq> S \<times> S\<rbrakk> \<Longrightarrow> per_union R x y \<subseteq> S \<times> S
[PROOF STEP]
unfolding per_union_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> S; y \<in> S; R \<subseteq> S \<times> S\<rbrakk> \<Longrightarrow> R \<union> {(xa, ya). (xa, x) \<in> R \<and> (ya, y) \<in> R} \<union> {(ya, xa). (xa, x) \<in> R \<and> (ya, y) \<in> R} \<subseteq> S \<times> S
[PROOF STEP]
by auto


[STATEMENT]
lemma exp_times_self_strict_antimono:
  assumes "y \<le> -1" "x < (y :: real)"
  shows   "x * exp x > y * exp y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y * exp y < x * exp x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. y * exp y < x * exp x
[PROOF STEP]
have "-x * exp x < -y * exp y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - x * exp x < - y * exp y
[PROOF STEP]
using assms(2)
[PROOF STATE]
proof (prove)
using this:
x < y

goal (1 subgoal):
 1. - x * exp x < - y * exp y
[PROOF STEP]
proof (rule DERIV_pos_imp_increasing_open)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>xa. \<lbrakk>x < xa; xa < y\<rbrakk> \<Longrightarrow> \<exists>y. ((\<lambda>a. - a * exp a) has_real_derivative y) (at xa) \<and> 0 < y
 2. continuous_on {x..y} (\<lambda>a. - a * exp a)
[PROOF STEP]
fix t
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>xa. \<lbrakk>x < xa; xa < y\<rbrakk> \<Longrightarrow> \<exists>y. ((\<lambda>a. - a * exp a) has_real_derivative y) (at xa) \<and> 0 < y
 2. continuous_on {x..y} (\<lambda>a. - a * exp a)
[PROOF STEP]
assume t: "x < t" "t < y"
[PROOF STATE]
proof (state)
this:
x < t
t < y

goal (2 subgoals):
 1. \<And>xa. \<lbrakk>x < xa; xa < y\<rbrakk> \<Longrightarrow> \<exists>y. ((\<lambda>a. - a * exp a) has_real_derivative y) (at xa) \<and> 0 < y
 2. continuous_on {x..y} (\<lambda>a. - a * exp a)
[PROOF STEP]
have "((\<lambda>x. -x * exp x) has_real_derivative (-(t + 1)) * exp t) (at t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. - x * exp x) has_real_derivative - (t + 1) * exp t) (at t)
[PROOF STEP]
by (auto intro!: derivative_eq_intros simp: algebra_simps)
[PROOF STATE]
proof (state)
this:
((\<lambda>x. - x * exp x) has_real_derivative - (t + 1) * exp t) (at t)

goal (2 subgoals):
 1. \<And>xa. \<lbrakk>x < xa; xa < y\<rbrakk> \<Longrightarrow> \<exists>y. ((\<lambda>a. - a * exp a) has_real_derivative y) (at xa) \<and> 0 < y
 2. continuous_on {x..y} (\<lambda>a. - a * exp a)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
((\<lambda>x. - x * exp x) has_real_derivative - (t + 1) * exp t) (at t)

goal (2 subgoals):
 1. \<And>xa. \<lbrakk>x < xa; xa < y\<rbrakk> \<Longrightarrow> \<exists>y. ((\<lambda>a. - a * exp a) has_real_derivative y) (at xa) \<and> 0 < y
 2. continuous_on {x..y} (\<lambda>a. - a * exp a)
[PROOF STEP]
have "(-(t + 1)) * exp t > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < - (t + 1) * exp t
[PROOF STEP]
using t assms
[PROOF STATE]
proof (prove)
using this:
x < t
t < y
y \<le> - 1
x < y

goal (1 subgoal):
 1. 0 < - (t + 1) * exp t
[PROOF STEP]
by (intro mult_pos_pos) auto
[PROOF STATE]
proof (state)
this:
0 < - (t + 1) * exp t

goal (2 subgoals):
 1. \<And>xa. \<lbrakk>x < xa; xa < y\<rbrakk> \<Longrightarrow> \<exists>y. ((\<lambda>a. - a * exp a) has_real_derivative y) (at xa) \<and> 0 < y
 2. continuous_on {x..y} (\<lambda>a. - a * exp a)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>x. - x * exp x) has_real_derivative - (t + 1) * exp t) (at t)
0 < - (t + 1) * exp t
[PROOF STEP]
show "\<exists>y. ((\<lambda>a. -a * exp a) has_real_derivative y) (at t) \<and> 0 < y"
[PROOF STATE]
proof (prove)
using this:
((\<lambda>x. - x * exp x) has_real_derivative - (t + 1) * exp t) (at t)
0 < - (t + 1) * exp t

goal (1 subgoal):
 1. \<exists>y. ((\<lambda>a. - a * exp a) has_real_derivative y) (at t) \<and> 0 < y
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>y. ((\<lambda>a. - a * exp a) has_real_derivative y) (at t) \<and> 0 < y

goal (1 subgoal):
 1. continuous_on {x..y} (\<lambda>a. - a * exp a)
[PROOF STEP]
qed (auto intro!: continuous_intros)
[PROOF STATE]
proof (state)
this:
- x * exp x < - y * exp y

goal (1 subgoal):
 1. y * exp y < x * exp x
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
- x * exp x < - y * exp y

goal (1 subgoal):
 1. y * exp y < x * exp x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
y * exp y < x * exp x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma trans_fm_Conj [simp]: "trans_fm e (Conj A B) = DBConj (trans_fm e A) (trans_fm e B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. trans_fm e (A AND B) = DBConj (trans_fm e A) (trans_fm e B)
[PROOF STEP]
by (simp add: Conj_def)


[STATEMENT]
lemma real_lim:
  fixes l::complex
  assumes "(f \<longlongrightarrow> l) F" and "\<not> trivial_limit F" and "eventually P F" and "\<And>a. P a \<Longrightarrow> f a \<in> \<real>"
  shows  "l \<in> \<real>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. l \<in> \<real>
[PROOF STEP]
proof (rule Lim_in_closed_set[OF closed_complex_Reals _ assms(2,1)])
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in F. f x \<in> \<real>
[PROOF STEP]
show "eventually (\<lambda>x. f x \<in> \<real>) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in F. f x \<in> \<real>
[PROOF STEP]
using assms(3, 4)
[PROOF STATE]
proof (prove)
using this:
eventually P F
P ?a \<Longrightarrow> f ?a \<in> \<real>

goal (1 subgoal):
 1. \<forall>\<^sub>F x in F. f x \<in> \<real>
[PROOF STEP]
by (auto intro: eventually_mono)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in F. f x \<in> \<real>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ldeep_eq_rdeep: "left_deep t = right_deep (mirror t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. left_deep t = right_deep (mirror t)
[PROOF STEP]
by(induction t rule: left_deep.induct) (auto)


[STATEMENT]
lemma SComplex_minus_iff [simp]: "(-x \<in> SComplex) = (x \<in> SComplex)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (- x \<in> SComplex) = (x \<in> SComplex)
[PROOF STEP]
using Standard_minus
[PROOF STATE]
proof (prove)
using this:
?x \<in> Standard \<Longrightarrow> - ?x \<in> Standard

goal (1 subgoal):
 1. (- x \<in> SComplex) = (x \<in> SComplex)
[PROOF STEP]
by fastforce


[STATEMENT]
lemma fst_set_fst_f4_red: "fst ` set (fst (f4_red gs bs ps sps data)) = set (f4_red_aux (gs @ bs) sps)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fst ` set (fst (f4_red gs bs ps sps data)) = set (f4_red_aux (gs @ bs) sps)
[PROOF STEP]
by (simp add: f4_red_def, force)


[STATEMENT]
lemma hypnat_diff_0_eq_0 [simp]: "\<And>n::hypnat. 0 - n = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n. 0 - n = 0
[PROOF STEP]
by transfer (rule diff_0_eq_0)


[STATEMENT]
lemma foldr_compat_dist:
  "pairwise (##\<^sub>S) (set as) \<Longrightarrow> foldr (\<squnion>\<^sub>S) (map (\<lambda>a. a ;\<^sub>S x) as) \<bottom>\<^sub>S = \<Squnion>\<^sub>S as ;\<^sub>S x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pairwise (##\<^sub>S) (set as) \<Longrightarrow> \<Squnion>\<^sub>S (map (\<lambda>a. a ;\<^sub>S x) as) = \<Squnion>\<^sub>S as ;\<^sub>S x
[PROOF STEP]
apply (induct as)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. pairwise (##\<^sub>S) (set []) \<Longrightarrow> \<Squnion>\<^sub>S (map (\<lambda>a. a ;\<^sub>S x) []) = \<Squnion>\<^sub>S [] ;\<^sub>S x
 2. \<And>a as. \<lbrakk>pairwise (##\<^sub>S) (set as) \<Longrightarrow> \<Squnion>\<^sub>S (map (\<lambda>a. a ;\<^sub>S x) as) = \<Squnion>\<^sub>S as ;\<^sub>S x; pairwise (##\<^sub>S) (set (a # as))\<rbrakk> \<Longrightarrow> \<Squnion>\<^sub>S (map (\<lambda>a. a ;\<^sub>S x) (a # as)) = \<Squnion>\<^sub>S (a # as) ;\<^sub>S x
[PROOF STEP]
apply (simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a as. \<lbrakk>pairwise (##\<^sub>S) (set as) \<Longrightarrow> \<Squnion>\<^sub>S (map (\<lambda>a. a ;\<^sub>S x) as) = \<Squnion>\<^sub>S as ;\<^sub>S x; pairwise (##\<^sub>S) (set (a # as))\<rbrakk> \<Longrightarrow> \<Squnion>\<^sub>S (map (\<lambda>a. a ;\<^sub>S x) (a # as)) = \<Squnion>\<^sub>S (a # as) ;\<^sub>S x
[PROOF STEP]
apply (auto simp add: pairwise_insert)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a as. \<lbrakk>\<Squnion>\<^sub>S (map (\<lambda>a. a ;\<^sub>S x) as) = \<Squnion>\<^sub>S as ;\<^sub>S x; \<forall>y. y \<in> set as \<and> y \<noteq> a \<longrightarrow> a ##\<^sub>S y \<and> y ##\<^sub>S a; pairwise (##\<^sub>S) (set as)\<rbrakk> \<Longrightarrow> a ;\<^sub>S x \<squnion>\<^sub>S \<Squnion>\<^sub>S as ;\<^sub>S x = (a \<squnion>\<^sub>S \<Squnion>\<^sub>S as) ;\<^sub>S x
[PROOF STEP]
apply (metis pairwise_compat_foldr scene_compat_refl scene_union_comp_distl)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma homologous_rel_sym:
   "homologous_rel p X S a b = homologous_rel p X S b a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. homologous_rel p X S a b = homologous_rel p X S b a
[PROOF STEP]
unfolding homologous_rel_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. singular_relboundary p X S (a - b) = singular_relboundary p X S (b - a)
[PROOF STEP]
using singular_relboundary_minus
[PROOF STATE]
proof (prove)
using this:
singular_relboundary ?p ?X ?S (- ?c) = singular_relboundary ?p ?X ?S ?c

goal (1 subgoal):
 1. singular_relboundary p X S (a - b) = singular_relboundary p X S (b - a)
[PROOF STEP]
by fastforce


[STATEMENT]
theorem p39: "\<not>(\<exists>x. \<forall>y. F(y,x) \<longleftrightarrow> \<not>F(y,y))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<nexists>x. \<forall>y. F (y, x) = (\<not> F (y, y))
[PROOF STEP]
@proof
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<nexists>x. \<forall>y. F (y, x) = (\<not> F (y, y))
[PROOF STEP]
@contradiction
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<nexists>x. \<forall>y. F (y, x) = (\<not> F (y, y))
[PROOF STEP]
@obtain x where "\<forall>y. F(y,x) \<longleftrightarrow> \<not>F(y,y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<nexists>x. \<forall>y. F (y, x) = (\<not> F (y, y))
[PROOF STEP]
@case "F(x,x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<nexists>x. \<forall>y. F (y, x) = (\<not> F (y, y))
[PROOF STEP]
@qed


[STATEMENT]
lemma fcard_Suc_fminus1:
  "x |\<in>| A \<Longrightarrow> Suc (fcard (A |-| {|x|})) = fcard A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x |\<in>| A \<Longrightarrow> Suc (fcard (A |-| {|x|})) = fcard A
[PROOF STEP]
by transfer (rule card_Suc_Diff1)


[STATEMENT]
lemma sums_ennreal[simp]: "(\<And>i. 0 \<le> f i) \<Longrightarrow> 0 \<le> x \<Longrightarrow> (\<lambda>i. ennreal (f i)) sums ennreal x \<longleftrightarrow> f sums x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>i. 0 \<le> f i; 0 \<le> x\<rbrakk> \<Longrightarrow> (\<lambda>i. ennreal (f i)) sums ennreal x = f sums x
[PROOF STEP]
unfolding sums_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>i. 0 \<le> f i; 0 \<le> x\<rbrakk> \<Longrightarrow> (\<lambda>n. \<Sum>i<n. ennreal (f i)) \<longlonglongrightarrow> ennreal x = (\<lambda>n. sum f {..<n}) \<longlonglongrightarrow> x
[PROOF STEP]
by (simp add: always_eventually sum_nonneg)


[STATEMENT]
theorem "\<not>(turing_computable_partial (chi_fun K1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> turing_computable_partial (chi_fun K1)
[PROOF STEP]
using not_Turing_decidable_K1 turing_computable_partial_imp_turing_decidable
[PROOF STATE]
proof (prove)
using this:
\<not> turing_decidable K1
turing_computable_partial (chi_fun ?A) \<Longrightarrow> turing_decidable ?A

goal (1 subgoal):
 1. \<not> turing_computable_partial (chi_fun K1)
[PROOF STEP]
by blast


[STATEMENT]
lemma is_finite_uminus[simp]: "is_finite (- a) \<longleftrightarrow> is_finite a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_finite (- a) = is_finite a
[PROOF STEP]
by (simp add: is_finite_def)


[STATEMENT]
theorem cauchy_product:
  assumes bf: "bound \<zero> n f" and bg: "bound \<zero> m g"
    and Rf: "f \<in> {..n} \<rightarrow> carrier R" and Rg: "g \<in> {..m} \<rightarrow> carrier R"
  shows "(\<Oplus>k \<in> {..n + m}. \<Oplus>i \<in> {..k}. f i \<otimes> g (k - i)) =
    (\<Oplus>i \<in> {..n}. f i) \<otimes> (\<Oplus>i \<in> {..m}. g i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..k}. f i \<otimes> g (k - i)) = finsum R f {..n} \<otimes> finsum R g {..m}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..k}. f i \<otimes> g (k - i)) = finsum R f {..n} \<otimes> finsum R g {..m}
[PROOF STEP]
have f: "!!x. f x \<in> carrier R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. f x \<in> carrier R
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. f x \<in> carrier R
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. f x \<in> carrier R
[PROOF STEP]
show "f x \<in> carrier R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f x \<in> carrier R
[PROOF STEP]
using Rf bf boundD_carrier
[PROOF STATE]
proof (prove)
using this:
f \<in> {..n} \<rightarrow> carrier R
bound \<zero> n f
\<lbrakk>bound \<zero> ?n ?f; ?n < ?m\<rbrakk> \<Longrightarrow> ?f ?m \<in> carrier R

goal (1 subgoal):
 1. f x \<in> carrier R
[PROOF STEP]
by (cases "x <= n") (auto simp: Pi_def)
[PROOF STATE]
proof (state)
this:
f x \<in> carrier R

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
f ?x \<in> carrier R

goal (1 subgoal):
 1. (\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..k}. f i \<otimes> g (k - i)) = finsum R f {..n} \<otimes> finsum R g {..m}
[PROOF STEP]
have g: "!!x. g x \<in> carrier R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. g x \<in> carrier R
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. g x \<in> carrier R
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. g x \<in> carrier R
[PROOF STEP]
show "g x \<in> carrier R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g x \<in> carrier R
[PROOF STEP]
using Rg bg boundD_carrier
[PROOF STATE]
proof (prove)
using this:
g \<in> {..m} \<rightarrow> carrier R
bound \<zero> m g
\<lbrakk>bound \<zero> ?n ?f; ?n < ?m\<rbrakk> \<Longrightarrow> ?f ?m \<in> carrier R

goal (1 subgoal):
 1. g x \<in> carrier R
[PROOF STEP]
by (cases "x <= m") (auto simp: Pi_def)
[PROOF STATE]
proof (state)
this:
g x \<in> carrier R

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
g ?x \<in> carrier R

goal (1 subgoal):
 1. (\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..k}. f i \<otimes> g (k - i)) = finsum R f {..n} \<otimes> finsum R g {..m}
[PROOF STEP]
from f g
[PROOF STATE]
proof (chain)
picking this:
f ?x \<in> carrier R
g ?x \<in> carrier R
[PROOF STEP]
have "(\<Oplus>k \<in> {..n + m}. \<Oplus>i \<in> {..k}. f i \<otimes> g (k - i)) =
      (\<Oplus>k \<in> {..n + m}. \<Oplus>i \<in> {..n + m - k}. f k \<otimes> g i)"
[PROOF STATE]
proof (prove)
using this:
f ?x \<in> carrier R
g ?x \<in> carrier R

goal (1 subgoal):
 1. (\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..k}. f i \<otimes> g (k - i)) = (\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..n + m - k}. f k \<otimes> g i)
[PROOF STEP]
by (simp add: diagonal_sum Pi_def)
[PROOF STATE]
proof (state)
this:
(\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..k}. f i \<otimes> g (k - i)) = (\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..n + m - k}. f k \<otimes> g i)

goal (1 subgoal):
 1. (\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..k}. f i \<otimes> g (k - i)) = finsum R f {..n} \<otimes> finsum R g {..m}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..k}. f i \<otimes> g (k - i)) = (\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..n + m - k}. f k \<otimes> g i)

goal (1 subgoal):
 1. (\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..k}. f i \<otimes> g (k - i)) = finsum R f {..n} \<otimes> finsum R g {..m}
[PROOF STEP]
have "... = (\<Oplus>k \<in> {..n} \<union> {n<..n + m}. \<Oplus>i \<in> {..n + m - k}. f k \<otimes> g i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..n + m - k}. f k \<otimes> g i) = (\<Oplus>k\<in>{..n} \<union> {n<..n + m}. \<Oplus>i\<in>{..n + m - k}. f k \<otimes> g i)
[PROOF STEP]
by (simp only: ivl_disj_un_one)
[PROOF STATE]
proof (state)
this:
(\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..n + m - k}. f k \<otimes> g i) = (\<Oplus>k\<in>{..n} \<union> {n<..n + m}. \<Oplus>i\<in>{..n + m - k}. f k \<otimes> g i)

goal (1 subgoal):
 1. (\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..k}. f i \<otimes> g (k - i)) = finsum R f {..n} \<otimes> finsum R g {..m}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..n + m - k}. f k \<otimes> g i) = (\<Oplus>k\<in>{..n} \<union> {n<..n + m}. \<Oplus>i\<in>{..n + m - k}. f k \<otimes> g i)

goal (1 subgoal):
 1. (\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..k}. f i \<otimes> g (k - i)) = finsum R f {..n} \<otimes> finsum R g {..m}
[PROOF STEP]
from f g
[PROOF STATE]
proof (chain)
picking this:
f ?x \<in> carrier R
g ?x \<in> carrier R
[PROOF STEP]
have "... = (\<Oplus>k \<in> {..n}. \<Oplus>i \<in> {..n + m - k}. f k \<otimes> g i)"
[PROOF STATE]
proof (prove)
using this:
f ?x \<in> carrier R
g ?x \<in> carrier R

goal (1 subgoal):
 1. (\<Oplus>k\<in>{..n} \<union> {n<..n + m}. \<Oplus>i\<in>{..n + m - k}. f k \<otimes> g i) = (\<Oplus>k\<in>{..n}. \<Oplus>i\<in>{..n + m - k}. f k \<otimes> g i)
[PROOF STEP]
by (simp cong: finsum_cong
      add: bound.bound [OF bf] finsum_Un_disjoint ivl_disj_int_one Pi_def)
[PROOF STATE]
proof (state)
this:
(\<Oplus>k\<in>{..n} \<union> {n<..n + m}. \<Oplus>i\<in>{..n + m - k}. f k \<otimes> g i) = (\<Oplus>k\<in>{..n}. \<Oplus>i\<in>{..n + m - k}. f k \<otimes> g i)

goal (1 subgoal):
 1. (\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..k}. f i \<otimes> g (k - i)) = finsum R f {..n} \<otimes> finsum R g {..m}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Oplus>k\<in>{..n} \<union> {n<..n + m}. \<Oplus>i\<in>{..n + m - k}. f k \<otimes> g i) = (\<Oplus>k\<in>{..n}. \<Oplus>i\<in>{..n + m - k}. f k \<otimes> g i)

goal (1 subgoal):
 1. (\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..k}. f i \<otimes> g (k - i)) = finsum R f {..n} \<otimes> finsum R g {..m}
[PROOF STEP]
from f g
[PROOF STATE]
proof (chain)
picking this:
f ?x \<in> carrier R
g ?x \<in> carrier R
[PROOF STEP]
have "... = (\<Oplus>k \<in> {..n}. \<Oplus>i \<in> {..m} \<union> {m<..n + m - k}. f k \<otimes> g i)"
[PROOF STATE]
proof (prove)
using this:
f ?x \<in> carrier R
g ?x \<in> carrier R

goal (1 subgoal):
 1. (\<Oplus>k\<in>{..n}. \<Oplus>i\<in>{..n + m - k}. f k \<otimes> g i) = (\<Oplus>k\<in>{..n}. \<Oplus>i\<in>{..m} \<union> {m<..n + m - k}. f k \<otimes> g i)
[PROOF STEP]
by (simp cong: finsum_cong add: ivl_disj_un_one le_add_diff Pi_def)
[PROOF STATE]
proof (state)
this:
(\<Oplus>k\<in>{..n}. \<Oplus>i\<in>{..n + m - k}. f k \<otimes> g i) = (\<Oplus>k\<in>{..n}. \<Oplus>i\<in>{..m} \<union> {m<..n + m - k}. f k \<otimes> g i)

goal (1 subgoal):
 1. (\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..k}. f i \<otimes> g (k - i)) = finsum R f {..n} \<otimes> finsum R g {..m}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Oplus>k\<in>{..n}. \<Oplus>i\<in>{..n + m - k}. f k \<otimes> g i) = (\<Oplus>k\<in>{..n}. \<Oplus>i\<in>{..m} \<union> {m<..n + m - k}. f k \<otimes> g i)

goal (1 subgoal):
 1. (\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..k}. f i \<otimes> g (k - i)) = finsum R f {..n} \<otimes> finsum R g {..m}
[PROOF STEP]
from f g
[PROOF STATE]
proof (chain)
picking this:
f ?x \<in> carrier R
g ?x \<in> carrier R
[PROOF STEP]
have "... = (\<Oplus>k \<in> {..n}. \<Oplus>i \<in> {..m}. f k \<otimes> g i)"
[PROOF STATE]
proof (prove)
using this:
f ?x \<in> carrier R
g ?x \<in> carrier R

goal (1 subgoal):
 1. (\<Oplus>k\<in>{..n}. \<Oplus>i\<in>{..m} \<union> {m<..n + m - k}. f k \<otimes> g i) = (\<Oplus>k\<in>{..n}. \<Oplus>i\<in>{..m}. f k \<otimes> g i)
[PROOF STEP]
by (simp cong: finsum_cong
      add: bound.bound [OF bg] finsum_Un_disjoint ivl_disj_int_one Pi_def)
[PROOF STATE]
proof (state)
this:
(\<Oplus>k\<in>{..n}. \<Oplus>i\<in>{..m} \<union> {m<..n + m - k}. f k \<otimes> g i) = (\<Oplus>k\<in>{..n}. \<Oplus>i\<in>{..m}. f k \<otimes> g i)

goal (1 subgoal):
 1. (\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..k}. f i \<otimes> g (k - i)) = finsum R f {..n} \<otimes> finsum R g {..m}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Oplus>k\<in>{..n}. \<Oplus>i\<in>{..m} \<union> {m<..n + m - k}. f k \<otimes> g i) = (\<Oplus>k\<in>{..n}. \<Oplus>i\<in>{..m}. f k \<otimes> g i)

goal (1 subgoal):
 1. (\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..k}. f i \<otimes> g (k - i)) = finsum R f {..n} \<otimes> finsum R g {..m}
[PROOF STEP]
from f g
[PROOF STATE]
proof (chain)
picking this:
f ?x \<in> carrier R
g ?x \<in> carrier R
[PROOF STEP]
have "... = (\<Oplus>i \<in> {..n}. f i) \<otimes> (\<Oplus>i \<in> {..m}. g i)"
[PROOF STATE]
proof (prove)
using this:
f ?x \<in> carrier R
g ?x \<in> carrier R

goal (1 subgoal):
 1. (\<Oplus>k\<in>{..n}. \<Oplus>i\<in>{..m}. f k \<otimes> g i) = finsum R f {..n} \<otimes> finsum R g {..m}
[PROOF STEP]
by (simp add: finsum_ldistr diagonal_sum Pi_def,
      simp cong: finsum_cong add: finsum_rdistr Pi_def)
[PROOF STATE]
proof (state)
this:
(\<Oplus>k\<in>{..n}. \<Oplus>i\<in>{..m}. f k \<otimes> g i) = finsum R f {..n} \<otimes> finsum R g {..m}

goal (1 subgoal):
 1. (\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..k}. f i \<otimes> g (k - i)) = finsum R f {..n} \<otimes> finsum R g {..m}
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..k}. f i \<otimes> g (k - i)) = finsum R f {..n} \<otimes> finsum R g {..m}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..k}. f i \<otimes> g (k - i)) = finsum R f {..n} \<otimes> finsum R g {..m}

goal (1 subgoal):
 1. (\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..k}. f i \<otimes> g (k - i)) = finsum R f {..n} \<otimes> finsum R g {..m}
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<Oplus>k\<in>{..n + m}. \<Oplus>i\<in>{..k}. f i \<otimes> g (k - i)) = finsum R f {..n} \<otimes> finsum R g {..m}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma atom_sup_iff: "atom x = (x \<noteq> \<bottom> \<and> (\<forall>y z. (x \<le> y \<or> x \<le> z) = (x \<le> y \<squnion> z)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. atom x = (x \<noteq> \<bottom> \<and> (\<forall>y z. (x \<le> y \<or> x \<le> z) = (x \<le> y \<squnion> z)))
[PROOF STEP]
by rule (auto simp add: atom_neg atom_sup sup_atom)


[STATEMENT]
lemma abs_disc_eq[simp]: "\<bar>l ^ i * x\<bar> = l ^ i * \<bar>x\<bar>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>l ^ i * x\<bar> = l ^ i * \<bar>x\<bar>
[PROOF STEP]
by (auto simp: abs_mult)


[STATEMENT]
lemma gx3_ge_x1: "gx3 \<ge> x\<^sub>1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x\<^sub>1 \<le> gx3
[PROOF STEP]
unfolding gx3_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x\<^sub>1 \<le> max x\<^sub>1 (SOME gx0. \<forall>x\<ge>gx0. g x \<le> gc1 * g' (real x))
[PROOF STEP]
by simp


[STATEMENT]
lemma open_subopen: "open S \<longleftrightarrow> (\<forall>x\<in>S. \<exists>T. open T \<and> x \<in> T \<and> T \<subseteq> S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. open S = (\<forall>x\<in>S. \<exists>T. open T \<and> x \<in> T \<and> T \<subseteq> S)
[PROOF STEP]
by (auto intro: openI)


[STATEMENT]
lemma upright_alt:  "upright a \<longleftrightarrow> (\<forall>t. zcount a t > 0 \<longrightarrow> supported_strong a t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. upright a = (\<forall>t. 0 < zcount a t \<longrightarrow> supported_strong a t)
[PROOF STEP]
unfolding upright_def supported_def supported_strong_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>t. 0 < zcount a t \<longrightarrow> (\<exists>s<t. zcount a s < 0)) = (\<forall>t. 0 < zcount a t \<longrightarrow> (\<exists>s<t. zcount a s < 0 \<and> nonpos_upto a s))
[PROOF STEP]
by (rule iffI) (meson order.strict_trans2 order.strict_trans1 order_zmset_exists_foundation')+


[STATEMENT]
lemma length_map_ran [simp]: "length (map_ran f xs) = length xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (map_ran f xs) = length xs
[PROOF STEP]
by(induct xs) simp_all


[STATEMENT]
lemma power_ms_aux_MSLCons: "power_ms_aux abort (MSLCons (C, e) xs) n =
  scale_shift_ms_aux (power_expansion abort C n, e * real n)
     (powser_ms_aux (gbinomial_series abort (real n))
       (scale_shift_ms_aux (inverse C, - e) xs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. power_ms_aux abort (MSLCons (C, e) xs) n = scale_shift_ms_aux (power_expansion abort C n, e * real n) (powser_ms_aux (gbinomial_series abort (real n)) (scale_shift_ms_aux (inverse C, - e) xs))
[PROOF STEP]
by simp


[STATEMENT]
lemma (in group) normalI:
  "subgroup H G \<Longrightarrow> (\<forall>x \<in> carrier G. H #> x = x <# H) \<Longrightarrow> H \<lhd> G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>subgroup H G; \<forall>x\<in>carrier G. H #> x = x <# H\<rbrakk> \<Longrightarrow> H \<lhd> G
[PROOF STEP]
by (simp add: normal_def normal_axioms_def is_group)


[STATEMENT]
lemma fconverse_vintersection: "(r \<inter>\<^sub>\<circ> s)\<inverse>\<^sub>\<bullet> = r\<inverse>\<^sub>\<bullet> \<inter>\<^sub>\<circ> s\<inverse>\<^sub>\<bullet>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (r \<inter>\<^sub>\<circ> s)\<inverse>\<^sub>\<bullet> = r\<inverse>\<^sub>\<bullet> \<inter>\<^sub>\<circ> s\<inverse>\<^sub>\<bullet>
[PROOF STEP]
by auto


[STATEMENT]
lemma induced_arrow:
    assumes "seq t u" and "t \<cdot> u = t' \<cdot> u'"
    shows "(t' \\ t) \<cdot> (u \\ (t' \\ t)) = u"
    and "(t \\ t') \<cdot> (u \\ (t' \\ t)) = u'"
    and "(t' \\ t) \<cdot> v = u \<Longrightarrow> v = u \\ (t' \\ t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t' \ t \<cdot> u \ (t' \ t) = u &&& t \ t' \<cdot> u \ (t' \ t) = u' &&& (t' \ t \<cdot> v = u \<Longrightarrow> v = u \ (t' \ t))
[PROOF STEP]
apply (metis assms comp_eqI arr_compE\<^sub>E\<^sub>C prfx_comp resid_comp(1) arr_resid_iff_con
                   seq_implies_arr_comp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. t \ t' \<cdot> u \ (t' \ t) = u'
 2. t' \ t \<cdot> v = u \<Longrightarrow> v = u \ (t' \ t)
[PROOF STEP]
apply (metis assms comp_resid_prfx arr_compE\<^sub>E\<^sub>C resid_comp(2) arr_resid_iff_con
                    seq_implies_arr_comp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t' \ t \<cdot> v = u \<Longrightarrow> v = u \ (t' \ t)
[PROOF STEP]
by (metis assms(1) comp_resid_prfx seq_def)


[STATEMENT]
lemma merge1_childdeg_gt1_if_fcard_gt1_sub:
  "\<lbrakk>is_subtree (Node r xs) (merge1 t1); fcard xs > 1\<rbrakk>
    \<Longrightarrow> \<exists>ys. merge1 (Node r ys) = Node r xs \<and> is_subtree (Node r ys) t1
          \<and> (\<exists>t \<in> fst ` fset ys. max_deg t > 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>is_subtree (Node r xs) (merge1 t1); 1 < fcard xs\<rbrakk> \<Longrightarrow> \<exists>ys. merge1 (Node r ys) = Node r xs \<and> is_subtree (Node r ys) t1 \<and> (\<exists>t\<in>fst ` fset ys. 1 < max_deg t)
[PROOF STEP]
using merge1_subtree_if_fcard_gt1 merge1_childdeg_gt1_if_fcard_gt1 dtree.sel(2)
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>is_subtree (Node ?r ?xs) (merge1 ?t1.0); 1 < fcard ?xs\<rbrakk> \<Longrightarrow> \<exists>ys. merge1 (Node ?r ys) = Node ?r ?xs \<and> is_subtree (Node ?r ys) ?t1.0 \<and> fcard ?xs \<le> fcard ys
1 < fcard (sucs (merge1 ?t1.0)) \<Longrightarrow> \<exists>t\<in>fst ` fset (sucs ?t1.0). 1 < max_deg t
sucs (Node ?x1.0 ?x2.0) = ?x2.0

goal (1 subgoal):
 1. \<lbrakk>is_subtree (Node r xs) (merge1 t1); 1 < fcard xs\<rbrakk> \<Longrightarrow> \<exists>ys. merge1 (Node r ys) = Node r xs \<and> is_subtree (Node r ys) t1 \<and> (\<exists>t\<in>fst ` fset ys. 1 < max_deg t)
[PROOF STEP]
by metis


[STATEMENT]
lemma MN_eq_nextl: "MyhillNerode language eq_nextl"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. MyhillNerode language eq_nextl
[PROOF STEP]
unfolding MyhillNerode_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. equiv UNIV eq_nextl \<and> right_invariant eq_nextl \<and> finite (UNIV // eq_nextl) \<and> (\<exists>A. language = eq_nextl `` A)
[PROOF STEP]
using language_eq_nextl
[PROOF STATE]
proof (prove)
using this:
language = eq_nextl `` \<Union> (left_lang ` final M)

goal (1 subgoal):
 1. equiv UNIV eq_nextl \<and> right_invariant eq_nextl \<and> finite (UNIV // eq_nextl) \<and> (\<exists>A. language = eq_nextl `` A)
[PROOF STEP]
by (blast intro: equiv_eq_nextl right_invariant_eq_nextl finite_index_eq_nextl)


[STATEMENT]
lemma erf_converges: "(\<lambda>n. of_real (erf_coeffs n) * z ^ n) sums erf z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. of_real (erf_coeffs n) * z ^ n) sums erf z
[PROOF STEP]
using summable_erf
[PROOF STATE]
proof (prove)
using this:
summable (\<lambda>n. of_real (erf_coeffs n) * ?z ^ n)

goal (1 subgoal):
 1. (\<lambda>n. of_real (erf_coeffs n) * z ^ n) sums erf z
[PROOF STEP]
by (simp add: sums_iff erf_def)


[STATEMENT]
lemma rexp_empty_iff [code_abbrev]: "rexp_empty r \<longleftrightarrow> lang r = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rexp_empty r = (lang r = {})
[PROOF STEP]
by (induction r) auto


[STATEMENT]
lemma clop_closure_prop_var: "clop (\<lambda>x::'a::complete_lattice. \<Sqinter>{y. x \<le> y})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. clop (\<lambda>x. \<Sqinter> {y. x \<le> y})
[PROOF STEP]
unfolding clop_def comp_def le_fun_def mono_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x. id x \<le> \<Sqinter> Collect ((\<le>) x)) \<and> (\<forall>x y. x \<le> y \<longrightarrow> \<Sqinter> Collect ((\<le>) x) \<le> \<Sqinter> Collect ((\<le>) y)) \<and> (\<forall>x. \<Sqinter> Collect ((\<le>) (\<Sqinter> Collect ((\<le>) x))) \<le> \<Sqinter> Collect ((\<le>) x))
[PROOF STEP]
by (simp add: Inf_lower le_Inf_iff)


[STATEMENT]
lemma (in Group) rcs_subset:"\<lbrakk>G \<guillemotright> H; a \<in> carrier G\<rbrakk> \<Longrightarrow> H \<bullet> a \<subseteq> carrier G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>G \<guillemotright> H ; a \<in> carrier G\<rbrakk> \<Longrightarrow> H \<bullet> a \<subseteq> carrier G
[PROOF STEP]
apply (rule subsetI,
       simp add:rcs_def, erule bexE,
       frule_tac h = h in sg_mult_closedl[of "H" "a"], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x h. \<lbrakk>G \<guillemotright> H ; a \<in> carrier G; h \<in> H; h \<cdot> a = x; h \<cdot> a \<in> carrier G\<rbrakk> \<Longrightarrow> x \<in> carrier G
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma "filterlim (\<lambda>x::real. (x^2 + 3*x - 10) / (7*x^2 - 5*x + 4)) (at_right (1/7)) at_top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LIM x at_top. (x\<^sup>2 + 3 * x - 10) / (7 * x\<^sup>2 - 5 * x + 4) :> at_right (1 / 7)
[PROOF STEP]
by real_asymp


[STATEMENT]
lemma join_self_below[iff]:
  "x = x \<squnion> y \<longleftrightarrow> y \<sqsubseteq> (x::'a::Finite_Join_cpo)"
  "x = y \<squnion> x \<longleftrightarrow> y \<sqsubseteq> (x::'a::Finite_Join_cpo)"
  "x \<squnion> y = x \<longleftrightarrow> y \<sqsubseteq> (x::'a::Finite_Join_cpo)"
  "y \<squnion> x = x \<longleftrightarrow> y \<sqsubseteq> (x::'a::Finite_Join_cpo)"
  "x \<squnion> y \<sqsubseteq> x \<longleftrightarrow> y \<sqsubseteq> (x::'a::Finite_Join_cpo)"
  "y \<squnion> x \<sqsubseteq> x \<longleftrightarrow> y \<sqsubseteq> (x::'a::Finite_Join_cpo)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((x = x \<squnion> y) = (y \<sqsubseteq> x) &&& (x = y \<squnion> x) = (y \<sqsubseteq> x) &&& (x \<squnion> y = x) = (y \<sqsubseteq> x)) &&& (y \<squnion> x = x) = (y \<sqsubseteq> x) &&& (x \<squnion> y \<sqsubseteq> x) = (y \<sqsubseteq> x) &&& (y \<squnion> x \<sqsubseteq> x) = (y \<sqsubseteq> x)
[PROOF STEP]
apply (metis join_above2 larger_is_join1)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. (x = y \<squnion> x) = (y \<sqsubseteq> x)
 2. (x \<squnion> y = x) = (y \<sqsubseteq> x)
 3. (y \<squnion> x = x) = (y \<sqsubseteq> x)
 4. (x \<squnion> y \<sqsubseteq> x) = (y \<sqsubseteq> x)
 5. (y \<squnion> x \<sqsubseteq> x) = (y \<sqsubseteq> x)
[PROOF STEP]
apply (metis join_above1 larger_is_join2)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. (x \<squnion> y = x) = (y \<sqsubseteq> x)
 2. (y \<squnion> x = x) = (y \<sqsubseteq> x)
 3. (x \<squnion> y \<sqsubseteq> x) = (y \<sqsubseteq> x)
 4. (y \<squnion> x \<sqsubseteq> x) = (y \<sqsubseteq> x)
[PROOF STEP]
apply (metis join_above2 larger_is_join1)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. (y \<squnion> x = x) = (y \<sqsubseteq> x)
 2. (x \<squnion> y \<sqsubseteq> x) = (y \<sqsubseteq> x)
 3. (y \<squnion> x \<sqsubseteq> x) = (y \<sqsubseteq> x)
[PROOF STEP]
apply (metis join_above1 larger_is_join2)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. (x \<squnion> y \<sqsubseteq> x) = (y \<sqsubseteq> x)
 2. (y \<squnion> x \<sqsubseteq> x) = (y \<sqsubseteq> x)
[PROOF STEP]
apply (metis join_above1 join_above2 below_antisym larger_is_join1)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (y \<squnion> x \<sqsubseteq> x) = (y \<sqsubseteq> x)
[PROOF STEP]
apply (metis join_above2 join_above1 below_antisym larger_is_join2)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma "[| (x::nat) < y; y < z |] ==> x < z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x < y; y < z\<rbrakk> \<Longrightarrow> x < z
[PROOF STEP]
by linarith


[STATEMENT]
lemma vec_mod_unit: "vec_mod (unit_vec n i) = (unit_vec n i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vec_mod (unit_vec n i) = unit_vec n i
[PROOF STEP]
by (intro eq_vecI, simp_all add: unit_vec_def vec_mod_def non_triv_m)


[STATEMENT]
lemma inverse_3: "real_of_3 (inverse_3 x) = inverse (real_of_3 x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_of_3 (inverse_3 x) = inverse (real_of_3 x)
[PROOF STEP]
by (transfer, auto simp: inverse_2)


[STATEMENT]
lemma C2O_replicate:
  "C2O (C (replicate i n)) = mulO (exp\<omega> (C2O n)) ((S ^^ i) Z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. C2O (C (replicate i n)) = mulO (exp\<omega> (C2O n)) ((S ^^ i) Z)
[PROOF STEP]
by (induct i) auto


[STATEMENT]
lemma val2formFormulaTrue:
  fixes valuation1 :: Valuation and valuation2 :: Valuation
  shows "formulaTrue (val2form valuation1) valuation2 = (\<forall> (literal :: Literal). literal el valuation1 \<longrightarrow> literal el valuation2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. formulaTrue (val2form valuation1) valuation2 = (\<forall>literal. literal el valuation1 \<longrightarrow> literal el valuation2)
[PROOF STEP]
by (induct valuation1) auto


[STATEMENT]
lemma spmf_sample_uniform: "spmf (sample_uniform n) x = indicator {..<n} x / n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. spmf (sample_uniform n) x = indicat_real {..<n} x / real n
[PROOF STEP]
by(simp add: sample_uniform_def spmf_of_set)


[STATEMENT]
lemma mu_diagonal_2:
  "\<forall>x . isotone (\<lambda>y . f x y) \<and> isotone (\<lambda>y . f y x) \<and> has_least_prefixpoint (\<lambda>y . f x y) \<Longrightarrow> has_least_prefixpoint (\<lambda>x . \<mu> (\<lambda>y . f x y)) \<Longrightarrow> \<mu> (\<lambda>x . f x x) = \<mu> (\<lambda>x . \<mu> (\<lambda>y . f x y))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>x. isotone (f x) \<and> isotone (\<lambda>y. f y x) \<and> has_least_prefixpoint (f x); has_least_prefixpoint (\<lambda>x. \<mu> f x)\<rbrakk> \<Longrightarrow> \<mu> (\<lambda>x. f x x) = \<mu> (\<lambda>x. \<mu> f x)
[PROOF STEP]
apply (rule mu_diagonal_1)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>\<forall>x. isotone (f x) \<and> isotone (\<lambda>y. f y x) \<and> has_least_prefixpoint (f x); has_least_prefixpoint (\<lambda>x. \<mu> f x)\<rbrakk> \<Longrightarrow> isotone (\<lambda>x. \<mu> f x)
 2. \<lbrakk>\<forall>x. isotone (f x) \<and> isotone (\<lambda>y. f y x) \<and> has_least_prefixpoint (f x); has_least_prefixpoint (\<lambda>x. \<mu> f x)\<rbrakk> \<Longrightarrow> \<forall>x. has_least_fixpoint (f x)
 3. \<lbrakk>\<forall>x. isotone (f x) \<and> isotone (\<lambda>y. f y x) \<and> has_least_prefixpoint (f x); has_least_prefixpoint (\<lambda>x. \<mu> f x)\<rbrakk> \<Longrightarrow> has_least_prefixpoint (\<lambda>x. \<mu> f x)
[PROOF STEP]
using isotone_def lifted_less_eq_def mu_isotone
[PROOF STATE]
proof (prove)
using this:
isotone ?f \<equiv> \<forall>x y. x \<le> y \<longrightarrow> ?f x \<le> ?f y
?f \<le>\<le> ?g \<equiv> \<forall>x. ?f x \<le> ?g x
\<lbrakk>has_least_prefixpoint ?f; has_least_prefixpoint ?g; isotone ?f; isotone ?g; ?f \<le>\<le> ?g\<rbrakk> \<Longrightarrow> \<mu> ?f \<le> \<mu> ?g

goal (3 subgoals):
 1. \<lbrakk>\<forall>x. isotone (f x) \<and> isotone (\<lambda>y. f y x) \<and> has_least_prefixpoint (f x); has_least_prefixpoint (\<lambda>x. \<mu> f x)\<rbrakk> \<Longrightarrow> isotone (\<lambda>x. \<mu> f x)
 2. \<lbrakk>\<forall>x. isotone (f x) \<and> isotone (\<lambda>y. f y x) \<and> has_least_prefixpoint (f x); has_least_prefixpoint (\<lambda>x. \<mu> f x)\<rbrakk> \<Longrightarrow> \<forall>x. has_least_fixpoint (f x)
 3. \<lbrakk>\<forall>x. isotone (f x) \<and> isotone (\<lambda>y. f y x) \<and> has_least_prefixpoint (f x); has_least_prefixpoint (\<lambda>x. \<mu> f x)\<rbrakk> \<Longrightarrow> has_least_prefixpoint (\<lambda>x. \<mu> f x)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>\<forall>x. isotone (f x) \<and> isotone (\<lambda>y. f y x) \<and> has_least_prefixpoint (f x); has_least_prefixpoint (\<lambda>x. \<mu> f x)\<rbrakk> \<Longrightarrow> \<forall>x. has_least_fixpoint (f x)
 2. \<lbrakk>\<forall>x. isotone (f x) \<and> isotone (\<lambda>y. f y x) \<and> has_least_prefixpoint (f x); has_least_prefixpoint (\<lambda>x. \<mu> f x)\<rbrakk> \<Longrightarrow> has_least_prefixpoint (\<lambda>x. \<mu> f x)
[PROOF STEP]
using has_least_fixpoint_def least_prefixpoint_fixpoint
[PROOF STATE]
proof (prove)
using this:
has_least_fixpoint ?f \<equiv> \<exists>x. is_least_fixpoint ?f x
\<lbrakk>has_least_prefixpoint ?f; isotone ?f\<rbrakk> \<Longrightarrow> is_least_fixpoint ?f (p\<mu> ?f)

goal (2 subgoals):
 1. \<lbrakk>\<forall>x. isotone (f x) \<and> isotone (\<lambda>y. f y x) \<and> has_least_prefixpoint (f x); has_least_prefixpoint (\<lambda>x. \<mu> f x)\<rbrakk> \<Longrightarrow> \<forall>x. has_least_fixpoint (f x)
 2. \<lbrakk>\<forall>x. isotone (f x) \<and> isotone (\<lambda>y. f y x) \<and> has_least_prefixpoint (f x); has_least_prefixpoint (\<lambda>x. \<mu> f x)\<rbrakk> \<Longrightarrow> has_least_prefixpoint (\<lambda>x. \<mu> f x)
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>x. isotone (f x) \<and> isotone (\<lambda>y. f y x) \<and> has_least_prefixpoint (f x); has_least_prefixpoint (\<lambda>x. \<mu> f x)\<rbrakk> \<Longrightarrow> has_least_prefixpoint (\<lambda>x. \<mu> f x)
[PROOF STEP]
by simp


[STATEMENT]
lemma fls_times_conv_base_factor_times:
  fixes f g :: "'a::{comm_monoid_add, mult_zero} fls"
  shows
    "f * g =
      fls_shift (-(fls_subdegree f + fls_subdegree g)) (fls_base_factor f * fls_base_factor g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f * g = fls_shift (- (fls_subdegree f + fls_subdegree g)) (fls_base_factor f * fls_base_factor g)
[PROOF STEP]
by (simp add: fls_times_both_shifted_simp)


[STATEMENT]
lemma NSLIM_mult: "f \<midarrow>x\<rightarrow>\<^sub>N\<^sub>S l \<Longrightarrow> g \<midarrow>x\<rightarrow>\<^sub>N\<^sub>S m \<Longrightarrow> (\<lambda>x. f x * g x) \<midarrow>x\<rightarrow>\<^sub>N\<^sub>S (l * m)"
  for l m :: "'a::real_normed_algebra"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<midarrow>x\<rightarrow>\<^sub>N\<^sub>S l; g \<midarrow>x\<rightarrow>\<^sub>N\<^sub>S m\<rbrakk> \<Longrightarrow> (\<lambda>x. f x * g x) \<midarrow>x\<rightarrow>\<^sub>N\<^sub>S l * m
[PROOF STEP]
by (auto simp add: NSLIM_def intro!: approx_mult_HFinite)


[STATEMENT]
lemma Arg_cnj_eq_inverse: "z\<noteq>0 \<Longrightarrow> Arg (cnj z) = Arg (inverse z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z \<noteq> 0 \<Longrightarrow> Arg (cnj z) = Arg (inverse z)
[PROOF STEP]
using Arg2pi_cnj_eq_inverse Arg2pi_eq_iff Arg_eq_iff
[PROOF STATE]
proof (prove)
using this:
?z \<noteq> 0 \<Longrightarrow> Arg2pi (cnj ?z) = Arg2pi (inverse ?z)
\<lbrakk>?w \<noteq> 0; ?z \<noteq> 0\<rbrakk> \<Longrightarrow> (Arg2pi ?w = Arg2pi ?z) = (\<exists>x>0. ?w = complex_of_real x * ?z)
\<lbrakk>?w \<noteq> 0; ?z \<noteq> 0\<rbrakk> \<Longrightarrow> (Arg ?w = Arg ?z) = (\<exists>x>0. ?w = complex_of_real x * ?z)

goal (1 subgoal):
 1. z \<noteq> 0 \<Longrightarrow> Arg (cnj z) = Arg (inverse z)
[PROOF STEP]
by auto


[STATEMENT]
lemma meet_bot [simp]: "x \<in> carrier L \<Longrightarrow> x \<sqinter> \<bottom> = \<bottom>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> carrier L \<Longrightarrow> x \<sqinter> \<bottom> = \<bottom>
[PROOF STEP]
by (metis bot_meet meet_comm)


[STATEMENT]
lemma Infinitesimal_hRe: "x \<in> Infinitesimal \<Longrightarrow> hRe x \<in> Infinitesimal"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> Infinitesimal \<Longrightarrow> hRe x \<in> Infinitesimal
[PROOF STEP]
using Infinitesimal_hcmod_iff abs_hRe_le_hcmod hrabs_le_Infinitesimal
[PROOF STATE]
proof (prove)
using this:
(?z \<in> Infinitesimal) = (hcmod ?z \<in> Infinitesimal)
\<bar>hRe ?x\<bar> \<le> hcmod ?x
\<lbrakk>?e \<in> Infinitesimal; \<bar>?x\<bar> \<le> ?e\<rbrakk> \<Longrightarrow> ?x \<in> Infinitesimal

goal (1 subgoal):
 1. x \<in> Infinitesimal \<Longrightarrow> hRe x \<in> Infinitesimal
[PROOF STEP]
by blast


[STATEMENT]
lemma Lindelof_space_quotient_map_image:
   "\<lbrakk>quotient_map X Y q; Lindelof_space X\<rbrakk> \<Longrightarrow> Lindelof_space Y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>quotient_map X Y q; Lindelof_space X\<rbrakk> \<Longrightarrow> Lindelof_space Y
[PROOF STEP]
by (meson Lindelof_space_continuous_map_image quotient_imp_continuous_map quotient_imp_surjective_map)


[STATEMENT]
lemma (in graph)  init_set2: "x \<in> reach root \<Longrightarrow> x \<notin> path {root} {root} \<Longrightarrow> x = root"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> reach root; x \<notin> path {root} {root}\<rbrakk> \<Longrightarrow> x = root
[PROOF STEP]
apply (case_tac "root \<noteq> x")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>x \<in> reach root; x \<notin> path {root} {root}; root \<noteq> x\<rbrakk> \<Longrightarrow> x = root
 2. \<lbrakk>x \<in> reach root; x \<notin> path {root} {root}; \<not> root \<noteq> x\<rbrakk> \<Longrightarrow> x = root
[PROOF STEP]
apply (drule init_set)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>x \<notin> path {root} {root}; root \<noteq> x\<rbrakk> \<Longrightarrow> x \<noteq> root
 2. \<lbrakk>x \<notin> path {root} {root}; root \<noteq> x; x \<in> path {root} {root}\<rbrakk> \<Longrightarrow> x = root
 3. \<lbrakk>x \<in> reach root; x \<notin> path {root} {root}; \<not> root \<noteq> x\<rbrakk> \<Longrightarrow> x = root
[PROOF STEP]
by simp_all


[STATEMENT]
lemma ereal_minus_less_iff:
  fixes x y z :: ereal
  shows "x - y < z \<longleftrightarrow> y \<noteq> -\<infinity> \<and> (y = \<infinity> \<longrightarrow> x \<noteq> \<infinity> \<and> z \<noteq> -\<infinity>) \<and> (y \<noteq> \<infinity> \<longrightarrow> x < z + y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x - y < z) = (y \<noteq> - \<infinity> \<and> (y = \<infinity> \<longrightarrow> x \<noteq> \<infinity> \<and> z \<noteq> - \<infinity>) \<and> (y \<noteq> \<infinity> \<longrightarrow> x < z + y))
[PROOF STEP]
by (cases rule: ereal3_cases[of x y z]) auto


[STATEMENT]
lemma insert_inter:
  "\<lbrakk> a \<notin> A; (A \<inter> B) = {} \<rbrakk> \<Longrightarrow> (A \<inter> (insert a B)) = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<notin> A; A \<inter> B = {}\<rbrakk> \<Longrightarrow> A \<inter> insert a B = {}
[PROOF STEP]
by auto


[STATEMENT]
lemma swap_o_Fst: "swap o Fst = Snd"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. swap \<circ> Fst = Snd
[PROOF STEP]
by (auto simp add: Fst_def Snd_def)


[STATEMENT]
lemma beta_l_Suc_l_derive:
  "2 * (alpha_l l * ccos (\<theta> / 2) - (beta_l l) * csin (\<theta> / 2)) * csin (\<theta> / 2) + beta_l l = beta_l (l + 1)"
  (is "?lhs = ?rhs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 * (alpha_l l * complex_of_real (cos (\<theta> / 2)) - beta_l l * complex_of_real (sin (\<theta> / 2))) * complex_of_real (sin (\<theta> / 2)) + beta_l l = beta_l (l + 1)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 2 * (alpha_l l * complex_of_real (cos (\<theta> / 2)) - beta_l l * complex_of_real (sin (\<theta> / 2))) * complex_of_real (sin (\<theta> / 2)) + beta_l l = beta_l (l + 1)
[PROOF STEP]
have "2 * ((alpha_l l) * ccos (\<theta> / 2) - (beta_l l) * csin (\<theta> / 2)) * csin (\<theta> / 2)
    = (alpha_l l) * (2 * csin (\<theta> / 2)* ccos (\<theta> / 2)) - (beta_l l) * (2 * csin (\<theta> / 2) * csin (\<theta> / 2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 * (alpha_l l * complex_of_real (cos (\<theta> / 2)) - beta_l l * complex_of_real (sin (\<theta> / 2))) * complex_of_real (sin (\<theta> / 2)) = alpha_l l * (2 * complex_of_real (sin (\<theta> / 2)) * complex_of_real (cos (\<theta> / 2))) - beta_l l * (2 * complex_of_real (sin (\<theta> / 2)) * complex_of_real (sin (\<theta> / 2)))
[PROOF STEP]
by (simp add: left_diff_distrib)
[PROOF STATE]
proof (state)
this:
2 * (alpha_l l * complex_of_real (cos (\<theta> / 2)) - beta_l l * complex_of_real (sin (\<theta> / 2))) * complex_of_real (sin (\<theta> / 2)) = alpha_l l * (2 * complex_of_real (sin (\<theta> / 2)) * complex_of_real (cos (\<theta> / 2))) - beta_l l * (2 * complex_of_real (sin (\<theta> / 2)) * complex_of_real (sin (\<theta> / 2)))

goal (1 subgoal):
 1. 2 * (alpha_l l * complex_of_real (cos (\<theta> / 2)) - beta_l l * complex_of_real (sin (\<theta> / 2))) * complex_of_real (sin (\<theta> / 2)) + beta_l l = beta_l (l + 1)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
2 * (alpha_l l * complex_of_real (cos (\<theta> / 2)) - beta_l l * complex_of_real (sin (\<theta> / 2))) * complex_of_real (sin (\<theta> / 2)) = alpha_l l * (2 * complex_of_real (sin (\<theta> / 2)) * complex_of_real (cos (\<theta> / 2))) - beta_l l * (2 * complex_of_real (sin (\<theta> / 2)) * complex_of_real (sin (\<theta> / 2)))

goal (1 subgoal):
 1. 2 * (alpha_l l * complex_of_real (cos (\<theta> / 2)) - beta_l l * complex_of_real (sin (\<theta> / 2))) * complex_of_real (sin (\<theta> / 2)) + beta_l l = beta_l (l + 1)
[PROOF STEP]
have "\<dots> = (alpha_l l) * (csin \<theta>) - (beta_l l) * (1 - ccos (\<theta>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. alpha_l l * (2 * complex_of_real (sin (\<theta> / 2)) * complex_of_real (cos (\<theta> / 2))) - beta_l l * (2 * complex_of_real (sin (\<theta> / 2)) * complex_of_real (sin (\<theta> / 2))) = alpha_l l * complex_of_real (sin \<theta>) - beta_l l * (1 - complex_of_real (cos \<theta>))
[PROOF STEP]
using double_csin_square csin_double
[PROOF STATE]
proof (prove)
using this:
2 * complex_of_real (sin ?a) * complex_of_real (sin ?a) = 1 - complex_of_real (cos (2 * ?a))
2 * complex_of_real (sin ?a) * complex_of_real (cos ?a) = complex_of_real (sin (2 * ?a))

goal (1 subgoal):
 1. alpha_l l * (2 * complex_of_real (sin (\<theta> / 2)) * complex_of_real (cos (\<theta> / 2))) - beta_l l * (2 * complex_of_real (sin (\<theta> / 2)) * complex_of_real (sin (\<theta> / 2))) = alpha_l l * complex_of_real (sin \<theta>) - beta_l l * (1 - complex_of_real (cos \<theta>))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
alpha_l l * (2 * complex_of_real (sin (\<theta> / 2)) * complex_of_real (cos (\<theta> / 2))) - beta_l l * (2 * complex_of_real (sin (\<theta> / 2)) * complex_of_real (sin (\<theta> / 2))) = alpha_l l * complex_of_real (sin \<theta>) - beta_l l * (1 - complex_of_real (cos \<theta>))

goal (1 subgoal):
 1. 2 * (alpha_l l * complex_of_real (cos (\<theta> / 2)) - beta_l l * complex_of_real (sin (\<theta> / 2))) * complex_of_real (sin (\<theta> / 2)) + beta_l l = beta_l (l + 1)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
2 * (alpha_l l * complex_of_real (cos (\<theta> / 2)) - beta_l l * complex_of_real (sin (\<theta> / 2))) * complex_of_real (sin (\<theta> / 2)) = alpha_l l * complex_of_real (sin \<theta>) - beta_l l * (1 - complex_of_real (cos \<theta>))
[PROOF STEP]
have "2 * ((alpha_l l) * ccos (\<theta> / 2) - (beta_l l) * csin (\<theta> / 2)) * csin (\<theta> / 2)
    = (alpha_l l) * (csin \<theta>) - (beta_l l) * (1 - ccos (\<theta>))"
[PROOF STATE]
proof (prove)
using this:
2 * (alpha_l l * complex_of_real (cos (\<theta> / 2)) - beta_l l * complex_of_real (sin (\<theta> / 2))) * complex_of_real (sin (\<theta> / 2)) = alpha_l l * complex_of_real (sin \<theta>) - beta_l l * (1 - complex_of_real (cos \<theta>))

goal (1 subgoal):
 1. 2 * (alpha_l l * complex_of_real (cos (\<theta> / 2)) - beta_l l * complex_of_real (sin (\<theta> / 2))) * complex_of_real (sin (\<theta> / 2)) = alpha_l l * complex_of_real (sin \<theta>) - beta_l l * (1 - complex_of_real (cos \<theta>))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
2 * (alpha_l l * complex_of_real (cos (\<theta> / 2)) - beta_l l * complex_of_real (sin (\<theta> / 2))) * complex_of_real (sin (\<theta> / 2)) = alpha_l l * complex_of_real (sin \<theta>) - beta_l l * (1 - complex_of_real (cos \<theta>))

goal (1 subgoal):
 1. 2 * (alpha_l l * complex_of_real (cos (\<theta> / 2)) - beta_l l * complex_of_real (sin (\<theta> / 2))) * complex_of_real (sin (\<theta> / 2)) + beta_l l = beta_l (l + 1)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
2 * (alpha_l l * complex_of_real (cos (\<theta> / 2)) - beta_l l * complex_of_real (sin (\<theta> / 2))) * complex_of_real (sin (\<theta> / 2)) = alpha_l l * complex_of_real (sin \<theta>) - beta_l l * (1 - complex_of_real (cos \<theta>))
[PROOF STEP]
have "?lhs = (alpha_l l) * (csin \<theta>) + (beta_l l) * ccos \<theta>"
[PROOF STATE]
proof (prove)
using this:
2 * (alpha_l l * complex_of_real (cos (\<theta> / 2)) - beta_l l * complex_of_real (sin (\<theta> / 2))) * complex_of_real (sin (\<theta> / 2)) = alpha_l l * complex_of_real (sin \<theta>) - beta_l l * (1 - complex_of_real (cos \<theta>))

goal (1 subgoal):
 1. 2 * (alpha_l l * complex_of_real (cos (\<theta> / 2)) - beta_l l * complex_of_real (sin (\<theta> / 2))) * complex_of_real (sin (\<theta> / 2)) + beta_l l = alpha_l l * complex_of_real (sin \<theta>) + beta_l l * complex_of_real (cos \<theta>)
[PROOF STEP]
by (simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
2 * (alpha_l l * complex_of_real (cos (\<theta> / 2)) - beta_l l * complex_of_real (sin (\<theta> / 2))) * complex_of_real (sin (\<theta> / 2)) + beta_l l = alpha_l l * complex_of_real (sin \<theta>) + beta_l l * complex_of_real (cos \<theta>)

goal (1 subgoal):
 1. 2 * (alpha_l l * complex_of_real (cos (\<theta> / 2)) - beta_l l * complex_of_real (sin (\<theta> / 2))) * complex_of_real (sin (\<theta> / 2)) + beta_l l = beta_l (l + 1)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
2 * (alpha_l l * complex_of_real (cos (\<theta> / 2)) - beta_l l * complex_of_real (sin (\<theta> / 2))) * complex_of_real (sin (\<theta> / 2)) + beta_l l = alpha_l l * complex_of_real (sin \<theta>) + beta_l l * complex_of_real (cos \<theta>)

goal (1 subgoal):
 1. 2 * (alpha_l l * complex_of_real (cos (\<theta> / 2)) - beta_l l * complex_of_real (sin (\<theta> / 2))) * complex_of_real (sin (\<theta> / 2)) + beta_l l = beta_l (l + 1)
[PROOF STEP]
have "\<dots> = (beta_l (l + 1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. alpha_l l * complex_of_real (sin \<theta>) + beta_l l * complex_of_real (cos \<theta>) = beta_l (l + 1)
[PROOF STEP]
unfolding alpha_l_def beta_l_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real (cos ((real l + 1 / 2) * \<theta>)) * complex_of_real (sin \<theta>) + complex_of_real (sin ((real l + 1 / 2) * \<theta>)) * complex_of_real (cos \<theta>) = complex_of_real (sin ((real (l + 1) + 1 / 2) * \<theta>))
[PROOF STEP]
apply (subst csin_add[of "(real l + 1 / 2) * \<theta>" "\<theta>", symmetric])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real (sin ((real l + 1 / 2) * \<theta> + \<theta>)) = complex_of_real (sin ((real (l + 1) + 1 / 2) * \<theta>))
[PROOF STEP]
by (simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
alpha_l l * complex_of_real (sin \<theta>) + beta_l l * complex_of_real (cos \<theta>) = beta_l (l + 1)

goal (1 subgoal):
 1. 2 * (alpha_l l * complex_of_real (cos (\<theta> / 2)) - beta_l l * complex_of_real (sin (\<theta> / 2))) * complex_of_real (sin (\<theta> / 2)) + beta_l l = beta_l (l + 1)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
2 * (alpha_l l * complex_of_real (cos (\<theta> / 2)) - beta_l l * complex_of_real (sin (\<theta> / 2))) * complex_of_real (sin (\<theta> / 2)) + beta_l l = beta_l (l + 1)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
2 * (alpha_l l * complex_of_real (cos (\<theta> / 2)) - beta_l l * complex_of_real (sin (\<theta> / 2))) * complex_of_real (sin (\<theta> / 2)) + beta_l l = beta_l (l + 1)

goal (1 subgoal):
 1. 2 * (alpha_l l * complex_of_real (cos (\<theta> / 2)) - beta_l l * complex_of_real (sin (\<theta> / 2))) * complex_of_real (sin (\<theta> / 2)) + beta_l l = beta_l (l + 1)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
2 * (alpha_l l * complex_of_real (cos (\<theta> / 2)) - beta_l l * complex_of_real (sin (\<theta> / 2))) * complex_of_real (sin (\<theta> / 2)) + beta_l l = beta_l (l + 1)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma dist_lemmas:
  assumes "finite C"
      and "C \<noteq> {}"
  shows "finite (dist s ` C)"
    and "distance C s \<in> dist s ` C"
    and "\<exists>c \<in> C. dist s c = distance C s"
    and "distance C s \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (finite (dist s ` C) &&& distance C s \<in> dist s ` C) &&& \<exists>c\<in>C. dist s c = distance C s &&& 0 \<le> distance C s
[PROOF STEP]
using dist_lemmas_aux assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>finite ?C; ?C \<noteq> {}\<rbrakk> \<Longrightarrow> finite (dist ?s ` ?C)
\<lbrakk>finite ?C; ?C \<noteq> {}; finite (dist ?s ` ?C)\<rbrakk> \<Longrightarrow> distance ?C ?s \<in> dist ?s ` ?C
\<lbrakk>finite ?C; ?C \<noteq> {}; distance ?C ?s \<in> dist ?s ` ?C\<rbrakk> \<Longrightarrow> \<exists>c\<in>?C. dist ?s c = distance ?C ?s
\<lbrakk>finite ?C; ?C \<noteq> {}; \<exists>c\<in>?C. dist ?s c = distance ?C ?s\<rbrakk> \<Longrightarrow> 0 \<le> distance ?C ?s
finite C
C \<noteq> {}

goal (1 subgoal):
 1. (finite (dist s ` C) &&& distance C s \<in> dist s ` C) &&& \<exists>c\<in>C. dist s c = distance C s &&& 0 \<le> distance C s
[PROOF STEP]
by auto


[STATEMENT]
lemma onorm_scalarC:
  fixes f :: \<open>'a::complex_normed_vector \<Rightarrow> 'b::complex_normed_vector\<close>
  assumes a1: \<open>bounded_clinear f\<close>
  shows  \<open>onorm (\<lambda> x. r *\<^sub>C (f x)) = (cmod r) * onorm f\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. onorm (\<lambda>x. r *\<^sub>C f x) = cmod r * onorm f
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. onorm (\<lambda>x. r *\<^sub>C f x) = cmod r * onorm f
[PROOF STEP]
have \<open>(norm (f x)) / norm x \<le> onorm f\<close>
    for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (f x) / norm x \<le> onorm f
[PROOF STEP]
using a1
[PROOF STATE]
proof (prove)
using this:
bounded_clinear f

goal (1 subgoal):
 1. norm (f x) / norm x \<le> onorm f
[PROOF STEP]
by (simp add: bounded_clinear.bounded_linear le_onorm)
[PROOF STATE]
proof (state)
this:
norm (f ?x) / norm ?x \<le> onorm f

goal (1 subgoal):
 1. onorm (\<lambda>x. r *\<^sub>C f x) = cmod r * onorm f
[PROOF STEP]
hence t2: \<open>bdd_above {(norm (f x)) / norm x | x. True}\<close>
[PROOF STATE]
proof (prove)
using this:
norm (f ?x) / norm ?x \<le> onorm f

goal (1 subgoal):
 1. bdd_above {norm (f x) / norm x |x. True}
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
bdd_above {norm (f x) / norm x |x. True}

goal (1 subgoal):
 1. onorm (\<lambda>x. r *\<^sub>C f x) = cmod r * onorm f
[PROOF STEP]
have \<open>continuous_on UNIV ( (*) w ) \<close>
    for w::real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on UNIV ((*) w)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
continuous_on UNIV ((*) ?w)

goal (1 subgoal):
 1. onorm (\<lambda>x. r *\<^sub>C f x) = cmod r * onorm f
[PROOF STEP]
hence \<open>isCont ( ((*) (cmod r)) ) x\<close>
    for x
[PROOF STATE]
proof (prove)
using this:
continuous_on UNIV ((*) ?w)

goal (1 subgoal):
 1. isCont ((*) (cmod r)) x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
isCont ((*) (cmod r)) ?x

goal (1 subgoal):
 1. onorm (\<lambda>x. r *\<^sub>C f x) = cmod r * onorm f
[PROOF STEP]
hence t3: \<open>continuous (at_left (Sup {(norm (f x)) / norm x | x. True})) ((*) (cmod r))\<close>
[PROOF STATE]
proof (prove)
using this:
isCont ((*) (cmod r)) ?x

goal (1 subgoal):
 1. continuous (at_left (\<Squnion> {norm (f x) / norm x |x. True})) ((*) (cmod r))
[PROOF STEP]
using Elementary_Topology.continuous_at_imp_continuous_within
[PROOF STATE]
proof (prove)
using this:
isCont ((*) (cmod r)) ?x
isCont ?f ?x \<Longrightarrow> continuous (at ?x within ?s) ?f

goal (1 subgoal):
 1. continuous (at_left (\<Squnion> {norm (f x) / norm x |x. True})) ((*) (cmod r))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
continuous (at_left (\<Squnion> {norm (f x) / norm x |x. True})) ((*) (cmod r))

goal (1 subgoal):
 1. onorm (\<lambda>x. r *\<^sub>C f x) = cmod r * onorm f
[PROOF STEP]
have \<open>{(norm (f x)) / norm x | x. True} \<noteq> {}\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {norm (f x) / norm x |x. True} \<noteq> {}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
{norm (f x) / norm x |x. True} \<noteq> {}

goal (1 subgoal):
 1. onorm (\<lambda>x. r *\<^sub>C f x) = cmod r * onorm f
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
{norm (f x) / norm x |x. True} \<noteq> {}

goal (1 subgoal):
 1. onorm (\<lambda>x. r *\<^sub>C f x) = cmod r * onorm f
[PROOF STEP]
have \<open>mono ((*) (cmod r))\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mono ((*) (cmod r))
[PROOF STEP]
by (simp add: monoI ordered_comm_semiring_class.comm_mult_left_mono)
[PROOF STATE]
proof (state)
this:
mono ((*) (cmod r))

goal (1 subgoal):
 1. onorm (\<lambda>x. r *\<^sub>C f x) = cmod r * onorm f
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
{norm (f x) / norm x |x. True} \<noteq> {}
mono ((*) (cmod r))
[PROOF STEP]
have \<open>Sup {((*) (cmod r)) ((norm (f x)) / norm x) | x. True}
         = ((*) (cmod r)) (Sup {(norm (f x)) / norm x | x. True})\<close>
[PROOF STATE]
proof (prove)
using this:
{norm (f x) / norm x |x. True} \<noteq> {}
mono ((*) (cmod r))

goal (1 subgoal):
 1. \<Squnion> {cmod r * (norm (f x) / norm x) |x. True} = cmod r * \<Squnion> {norm (f x) / norm x |x. True}
[PROOF STEP]
using t2 t3
[PROOF STATE]
proof (prove)
using this:
{norm (f x) / norm x |x. True} \<noteq> {}
mono ((*) (cmod r))
bdd_above {norm (f x) / norm x |x. True}
continuous (at_left (\<Squnion> {norm (f x) / norm x |x. True})) ((*) (cmod r))

goal (1 subgoal):
 1. \<Squnion> {cmod r * (norm (f x) / norm x) |x. True} = cmod r * \<Squnion> {norm (f x) / norm x |x. True}
[PROOF STEP]
by (simp add:  continuous_at_Sup_mono full_SetCompr_eq image_image)
[PROOF STATE]
proof (state)
this:
\<Squnion> {cmod r * (norm (f x) / norm x) |x. True} = cmod r * \<Squnion> {norm (f x) / norm x |x. True}

goal (1 subgoal):
 1. onorm (\<lambda>x. r *\<^sub>C f x) = cmod r * onorm f
[PROOF STEP]
hence  \<open>Sup {(cmod r) * ((norm (f x)) / norm x) | x. True}
         = (cmod r) * (Sup {(norm (f x)) / norm x | x. True})\<close>
[PROOF STATE]
proof (prove)
using this:
\<Squnion> {cmod r * (norm (f x) / norm x) |x. True} = cmod r * \<Squnion> {norm (f x) / norm x |x. True}

goal (1 subgoal):
 1. \<Squnion> {cmod r * (norm (f x) / norm x) |x. True} = cmod r * \<Squnion> {norm (f x) / norm x |x. True}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<Squnion> {cmod r * (norm (f x) / norm x) |x. True} = cmod r * \<Squnion> {norm (f x) / norm x |x. True}

goal (1 subgoal):
 1. onorm (\<lambda>x. r *\<^sub>C f x) = cmod r * onorm f
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<Squnion> {cmod r * (norm (f x) / norm x) |x. True} = cmod r * \<Squnion> {norm (f x) / norm x |x. True}

goal (1 subgoal):
 1. onorm (\<lambda>x. r *\<^sub>C f x) = cmod r * onorm f
[PROOF STEP]
have \<open>Sup {(cmod r) * ((norm (f x)) / norm x) | x. True}
                = (SUP x. cmod r * norm (f x) / norm x)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Squnion> {cmod r * (norm (f x) / norm x) |x. True} = (\<Squnion>x. cmod r * norm (f x) / norm x)
[PROOF STEP]
by (simp add: full_SetCompr_eq)
[PROOF STATE]
proof (state)
this:
\<Squnion> {cmod r * (norm (f x) / norm x) |x. True} = (\<Squnion>x. cmod r * norm (f x) / norm x)

goal (1 subgoal):
 1. onorm (\<lambda>x. r *\<^sub>C f x) = cmod r * onorm f
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<Squnion> {cmod r * (norm (f x) / norm x) |x. True} = (\<Squnion>x. cmod r * norm (f x) / norm x)

goal (1 subgoal):
 1. onorm (\<lambda>x. r *\<^sub>C f x) = cmod r * onorm f
[PROOF STEP]
have \<open>(Sup {(norm (f x)) / norm x | x. True})
                = (SUP x. norm (f x) / norm x)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Squnion> {norm (f x) / norm x |x. True} = (\<Squnion>x. norm (f x) / norm x)
[PROOF STEP]
by (simp add: full_SetCompr_eq)
[PROOF STATE]
proof (state)
this:
\<Squnion> {norm (f x) / norm x |x. True} = (\<Squnion>x. norm (f x) / norm x)

goal (1 subgoal):
 1. onorm (\<lambda>x. r *\<^sub>C f x) = cmod r * onorm f
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<Squnion> {cmod r * (norm (f x) / norm x) |x. True} = cmod r * \<Squnion> {norm (f x) / norm x |x. True}
\<Squnion> {cmod r * (norm (f x) / norm x) |x. True} = (\<Squnion>x. cmod r * norm (f x) / norm x)
\<Squnion> {norm (f x) / norm x |x. True} = (\<Squnion>x. norm (f x) / norm x)
[PROOF STEP]
have t1: "(SUP x. cmod r * norm (f x) / norm x)
      = cmod r * (SUP x. norm (f x) / norm x)"
[PROOF STATE]
proof (prove)
using this:
\<Squnion> {cmod r * (norm (f x) / norm x) |x. True} = cmod r * \<Squnion> {norm (f x) / norm x |x. True}
\<Squnion> {cmod r * (norm (f x) / norm x) |x. True} = (\<Squnion>x. cmod r * norm (f x) / norm x)
\<Squnion> {norm (f x) / norm x |x. True} = (\<Squnion>x. norm (f x) / norm x)

goal (1 subgoal):
 1. (\<Squnion>x. cmod r * norm (f x) / norm x) = cmod r * (\<Squnion>x. norm (f x) / norm x)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Squnion>x. cmod r * norm (f x) / norm x) = cmod r * (\<Squnion>x. norm (f x) / norm x)

goal (1 subgoal):
 1. onorm (\<lambda>x. r *\<^sub>C f x) = cmod r * onorm f
[PROOF STEP]
have \<open>onorm (\<lambda> x. r *\<^sub>C (f x)) = (SUP x. norm ( (\<lambda> t. r *\<^sub>C (f t)) x) / norm x)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. onorm (\<lambda>x. r *\<^sub>C f x) = (\<Squnion>x. norm (r *\<^sub>C f x) / norm x)
[PROOF STEP]
by (simp add: onorm_def)
[PROOF STATE]
proof (state)
this:
onorm (\<lambda>x. r *\<^sub>C f x) = (\<Squnion>x. norm (r *\<^sub>C f x) / norm x)

goal (1 subgoal):
 1. onorm (\<lambda>x. r *\<^sub>C f x) = cmod r * onorm f
[PROOF STEP]
hence \<open>onorm (\<lambda> x. r *\<^sub>C (f x)) = (SUP x. (cmod r) * (norm (f x)) / norm x)\<close>
[PROOF STATE]
proof (prove)
using this:
onorm (\<lambda>x. r *\<^sub>C f x) = (\<Squnion>x. norm (r *\<^sub>C f x) / norm x)

goal (1 subgoal):
 1. onorm (\<lambda>x. r *\<^sub>C f x) = (\<Squnion>x. cmod r * norm (f x) / norm x)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
onorm (\<lambda>x. r *\<^sub>C f x) = (\<Squnion>x. cmod r * norm (f x) / norm x)

goal (1 subgoal):
 1. onorm (\<lambda>x. r *\<^sub>C f x) = cmod r * onorm f
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
onorm (\<lambda>x. r *\<^sub>C f x) = (\<Squnion>x. cmod r * norm (f x) / norm x)

goal (1 subgoal):
 1. onorm (\<lambda>x. r *\<^sub>C f x) = cmod r * onorm f
[PROOF STEP]
have \<open>... = (cmod r) * (SUP x. (norm (f x)) / norm x)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion>x. cmod r * norm (f x) / norm x) = cmod r * (\<Squnion>x. norm (f x) / norm x)
[PROOF STEP]
using t1
[PROOF STATE]
proof (prove)
using this:
(\<Squnion>x. cmod r * norm (f x) / norm x) = cmod r * (\<Squnion>x. norm (f x) / norm x)

goal (1 subgoal):
 1. (\<Squnion>x. cmod r * norm (f x) / norm x) = cmod r * (\<Squnion>x. norm (f x) / norm x)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<Squnion>x. cmod r * norm (f x) / norm x) = cmod r * (\<Squnion>x. norm (f x) / norm x)

goal (1 subgoal):
 1. onorm (\<lambda>x. r *\<^sub>C f x) = cmod r * onorm f
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
onorm (\<lambda>x. r *\<^sub>C f x) = cmod r * (\<Squnion>x. norm (f x) / norm x)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
onorm (\<lambda>x. r *\<^sub>C f x) = cmod r * (\<Squnion>x. norm (f x) / norm x)

goal (1 subgoal):
 1. onorm (\<lambda>x. r *\<^sub>C f x) = cmod r * onorm f
[PROOF STEP]
by (simp add: onorm_def)
[PROOF STATE]
proof (state)
this:
onorm (\<lambda>x. r *\<^sub>C f x) = cmod r * onorm f

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma continuous_closedin_preimage_eq:
   "continuous_on S f \<longleftrightarrow>
    (\<forall>T. closed T \<longrightarrow> closedin (top_of_set S) (S \<inter> f -` T))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on S f = (\<forall>T. closed T \<longrightarrow> closedin (top_of_set S) (S \<inter> f -` T))
[PROOF STEP]
by (metis Int_commute closedin_closed continuous_on_closed_invariant)


[STATEMENT]
lemma star_omega_absorb:
  "y\<^sup>\<star> * (y\<^sup>\<star> * x)\<^sup>\<star> * y\<^sup>\<omega> = (y\<^sup>\<star> * x)\<^sup>\<star> * y\<^sup>\<omega>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y\<^sup>\<star> * (y\<^sup>\<star> * x)\<^sup>\<star> * y\<^sup>\<omega> = (y\<^sup>\<star> * x)\<^sup>\<star> * y\<^sup>\<omega>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. y\<^sup>\<star> * (y\<^sup>\<star> * x)\<^sup>\<star> * y\<^sup>\<omega> = (y\<^sup>\<star> * x)\<^sup>\<star> * y\<^sup>\<omega>
[PROOF STEP]
have "y\<^sup>\<star> * (y\<^sup>\<star> * x)\<^sup>\<star> * y\<^sup>\<omega> = y\<^sup>\<star> * y\<^sup>\<star> * x * (y\<^sup>\<star> * x)\<^sup>\<star> * y\<^sup>\<omega> \<squnion> y\<^sup>\<star> * y\<^sup>\<omega>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y\<^sup>\<star> * (y\<^sup>\<star> * x)\<^sup>\<star> * y\<^sup>\<omega> = y\<^sup>\<star> * y\<^sup>\<star> * x * (y\<^sup>\<star> * x)\<^sup>\<star> * y\<^sup>\<omega> \<squnion> y\<^sup>\<star> * y\<^sup>\<omega>
[PROOF STEP]
by (metis sup_commute mult_assoc mult_right_dist_sup star.circ_back_loop_fixpoint star.circ_plus_same)
[PROOF STATE]
proof (state)
this:
y\<^sup>\<star> * (y\<^sup>\<star> * x)\<^sup>\<star> * y\<^sup>\<omega> = y\<^sup>\<star> * y\<^sup>\<star> * x * (y\<^sup>\<star> * x)\<^sup>\<star> * y\<^sup>\<omega> \<squnion> y\<^sup>\<star> * y\<^sup>\<omega>

goal (1 subgoal):
 1. y\<^sup>\<star> * (y\<^sup>\<star> * x)\<^sup>\<star> * y\<^sup>\<omega> = (y\<^sup>\<star> * x)\<^sup>\<star> * y\<^sup>\<omega>
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
y\<^sup>\<star> * (y\<^sup>\<star> * x)\<^sup>\<star> * y\<^sup>\<omega> = y\<^sup>\<star> * y\<^sup>\<star> * x * (y\<^sup>\<star> * x)\<^sup>\<star> * y\<^sup>\<omega> \<squnion> y\<^sup>\<star> * y\<^sup>\<omega>

goal (1 subgoal):
 1. y\<^sup>\<star> * (y\<^sup>\<star> * x)\<^sup>\<star> * y\<^sup>\<omega> = (y\<^sup>\<star> * x)\<^sup>\<star> * y\<^sup>\<omega>
[PROOF STEP]
by (metis mult_assoc star.circ_loop_fixpoint star.circ_transitive_equal star_mult_omega)
[PROOF STATE]
proof (state)
this:
y\<^sup>\<star> * (y\<^sup>\<star> * x)\<^sup>\<star> * y\<^sup>\<omega> = (y\<^sup>\<star> * x)\<^sup>\<star> * y\<^sup>\<omega>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in module) submoduleI :
  assumes subset: "H \<subseteq> carrier M"
    and zero: "\<zero>\<^bsub>M\<^esub> \<in> H"
    and a_inv: "!!a. a \<in> H \<Longrightarrow> \<ominus>\<^bsub>M\<^esub> a \<in> H"
    and add : "\<And> a b. \<lbrakk>a \<in> H ; b \<in> H\<rbrakk> \<Longrightarrow> a \<oplus>\<^bsub>M\<^esub> b \<in> H"
    and smult_closed : "\<And> a x. \<lbrakk>a \<in> carrier R; x \<in> H\<rbrakk> \<Longrightarrow> a \<odot>\<^bsub>M\<^esub> x \<in> H"
  shows "submodule H R M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. submodule H R M
[PROOF STEP]
apply (intro submodule.intro subgroup.intro)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. H \<subseteq> carrier (add_monoid M)
 2. \<And>x y. \<lbrakk>x \<in> H; y \<in> H\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>add_monoid M\<^esub> y \<in> H
 3. \<one>\<^bsub>add_monoid M\<^esub> \<in> H
 4. \<And>x. x \<in> H \<Longrightarrow> inv\<^bsub>add_monoid M\<^esub> x \<in> H
 5. submodule_axioms H R M
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
H \<subseteq> carrier M
\<zero>\<^bsub>M\<^esub> \<in> H
?a \<in> H \<Longrightarrow> \<ominus>\<^bsub>M\<^esub> ?a \<in> H
\<lbrakk>?a \<in> H; ?b \<in> H\<rbrakk> \<Longrightarrow> ?a \<oplus>\<^bsub>M\<^esub> ?b \<in> H
\<lbrakk>?a \<in> carrier R; ?x \<in> H\<rbrakk> \<Longrightarrow> ?a \<odot>\<^bsub>M\<^esub> ?x \<in> H

goal (5 subgoals):
 1. H \<subseteq> carrier (add_monoid M)
 2. \<And>x y. \<lbrakk>x \<in> H; y \<in> H\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>add_monoid M\<^esub> y \<in> H
 3. \<one>\<^bsub>add_monoid M\<^esub> \<in> H
 4. \<And>x. x \<in> H \<Longrightarrow> inv\<^bsub>add_monoid M\<^esub> x \<in> H
 5. submodule_axioms H R M
[PROOF STEP]
unfolding submodule_axioms_def
[PROOF STATE]
proof (prove)
using this:
H \<subseteq> carrier M
\<zero>\<^bsub>M\<^esub> \<in> H
?a \<in> H \<Longrightarrow> \<ominus>\<^bsub>M\<^esub> ?a \<in> H
\<lbrakk>?a \<in> H; ?b \<in> H\<rbrakk> \<Longrightarrow> ?a \<oplus>\<^bsub>M\<^esub> ?b \<in> H
\<lbrakk>?a \<in> carrier R; ?x \<in> H\<rbrakk> \<Longrightarrow> ?a \<odot>\<^bsub>M\<^esub> ?x \<in> H

goal (5 subgoals):
 1. H \<subseteq> carrier (add_monoid M)
 2. \<And>x y. \<lbrakk>x \<in> H; y \<in> H\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>add_monoid M\<^esub> y \<in> H
 3. \<one>\<^bsub>add_monoid M\<^esub> \<in> H
 4. \<And>x. x \<in> H \<Longrightarrow> inv\<^bsub>add_monoid M\<^esub> x \<in> H
 5. \<forall>a x. a \<in> carrier R \<longrightarrow> x \<in> H \<longrightarrow> a \<odot>\<^bsub>M\<^esub> x \<in> H
[PROOF STEP]
by (simp_all add : a_inv_def)


[STATEMENT]
lemma gfp_Fix:
  fixes f :: "'a::complete_lattice_with_dual \<Rightarrow> 'a"
  shows "mono f \<Longrightarrow> gfp f = \<Squnion>(Fix f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mono f \<Longrightarrow> gfp f = \<Squnion> Fix f
[PROOF STEP]
by (simp add: iso_map_dual gfp_to_lfp lfp_Fix Fix_map_dual_var Sup_to_Inf_var)


[STATEMENT]
lemma NSCLIM_NSCRLIM_iff2: "f \<midarrow>x\<rightarrow>\<^sub>N\<^sub>S L \<longleftrightarrow> (\<lambda>y. cmod (f y - L)) \<midarrow>x\<rightarrow>\<^sub>N\<^sub>S 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<midarrow>x\<rightarrow>\<^sub>N\<^sub>S L = (\<lambda>y. cmod (f y - L)) \<midarrow>x\<rightarrow>\<^sub>N\<^sub>S 0
[PROOF STEP]
by (simp add: LIM_NSLIM_iff [symmetric] CLIM_CRLIM_iff)


[STATEMENT]
lemma piecewise_differentiable_diff:
    "\<lbrakk>f piecewise_differentiable_on S;  g piecewise_differentiable_on S\<rbrakk>
     \<Longrightarrow> (\<lambda>x. f x - g x) piecewise_differentiable_on S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f piecewise_differentiable_on S; g piecewise_differentiable_on S\<rbrakk> \<Longrightarrow> (\<lambda>x. f x - g x) piecewise_differentiable_on S
[PROOF STEP]
unfolding diff_conv_add_uminus
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f piecewise_differentiable_on S; g piecewise_differentiable_on S\<rbrakk> \<Longrightarrow> (\<lambda>x. f x + - g x) piecewise_differentiable_on S
[PROOF STEP]
by (metis piecewise_differentiable_add piecewise_differentiable_neg)


[STATEMENT]
lemma (in sigma_finite_measure) density_unique2:
  assumes [measurable]: "f \<in> borel_measurable M" "f' \<in> borel_measurable M"
  assumes density_eq: "\<And>A. A \<in> sets M \<Longrightarrow> (\<integral>\<^sup>+ x \<in> A. f x \<partial>M) = (\<integral>\<^sup>+ x \<in> A. f' x \<partial>M)"
  shows "AE x in M. f x = f' x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. AE x in M. f x = f' x
[PROOF STEP]
proof (rule density_unique)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. f \<in> borel_measurable M
 2. f' \<in> borel_measurable M
 3. density M f = density M f'
[PROOF STEP]
show "density M f = density M f'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. density M f = density M f'
[PROOF STEP]
by (intro measure_eqI) (auto simp: emeasure_density intro!: density_eq)
[PROOF STATE]
proof (state)
this:
density M f = density M f'

goal (2 subgoals):
 1. f \<in> borel_measurable M
 2. f' \<in> borel_measurable M
[PROOF STEP]
qed (auto simp add: assms)


[STATEMENT]
lemma lex_pp_plus_monotone: "lex_pp s t \<Longrightarrow> lex_pp (s + u) (t + u)"
  for s t::"(_, _::{ordered_comm_monoid_add, ordered_ab_semigroup_add_imp_le}) pp"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lex_pp s t \<Longrightarrow> lex_pp (s + u) (t + u)
[PROOF STEP]
by (transfer, intro lex_pm_plus_monotone)


[STATEMENT]
lemma bitlen_1: "bitlen 1 = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bitlen 1 = 1
[PROOF STEP]
by (simp add: bitlen_alt_def)


[STATEMENT]
lemma length_drop_bl: "length (dropWhile Not (to_bl (of_bl bs))) \<le> length bs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (dropWhile Not (to_bl (of_bl bs))) \<le> length bs
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. length (dropWhile Not (to_bl (of_bl bs))) \<le> length bs
[PROOF STEP]
have length_takeWhile_Not_replicate_False:
    "length (takeWhile Not (replicate n False @ ls)) = n + length (takeWhile Not ls)"
  for n ls
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (takeWhile Not (replicate n False @ ls)) = n + length (takeWhile Not ls)
[PROOF STEP]
by(subst takeWhile_append2) simp+
[PROOF STATE]
proof (state)
this:
length (takeWhile Not (replicate ?n False @ ?ls)) = ?n + length (takeWhile Not ?ls)

goal (1 subgoal):
 1. length (dropWhile Not (to_bl (of_bl bs))) \<le> length bs
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (dropWhile Not (to_bl (of_bl bs))) \<le> length bs
[PROOF STEP]
by(simp add: word_rep_drop dropWhile_eq_drop length_takeWhile_Not_replicate_False)
[PROOF STATE]
proof (state)
this:
length (dropWhile Not (to_bl (of_bl bs))) \<le> length bs

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma oexp_Well_order: "Well_order oexp"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Well_order oexp
[PROOF STEP]
unfolding well_order_on_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Linear_order oexp \<and> wf (oexp - Id)
[PROOF STEP]
using oexp_Linear_order oexp_wf_Id
[PROOF STATE]
proof (prove)
using this:
Linear_order oexp
wf (oexp - Id)

goal (1 subgoal):
 1. Linear_order oexp \<and> wf (oexp - Id)
[PROOF STEP]
by blast


[STATEMENT]
lemma "(\<lambda>n. dist (vi v (Suc n)) (vi v n)) \<longlonglongrightarrow> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. dist ((\<L>\<^sub>b ^^ Suc n) v) ((\<L>\<^sub>b ^^ n) v)) \<longlonglongrightarrow> 0
[PROOF STEP]
using thm_6_3_1_b_aux[of v]
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. dist ((\<L>\<^sub>b ^^ n) v) ((\<L>\<^sub>b ^^ Suc n) v)) \<longlonglongrightarrow> 0

goal (1 subgoal):
 1. (\<lambda>n. dist ((\<L>\<^sub>b ^^ Suc n) v) ((\<L>\<^sub>b ^^ n) v)) \<longlonglongrightarrow> 0
[PROOF STEP]
by (auto simp only: dist_commute[of "((\<L>\<^sub>b ^^ Suc _) v)"])


[STATEMENT]
lemma vebt_succ_code[code]:
    "vebt_succ (Leaf a b) x = (if b\<and> x = 0 then Some 1 else None)"
    "vebt_succ (Node info  deg treeList summary) x = (if deg \<le> 1 then None else
    (case info of None \<Rightarrow> None |
    (Some mima) \<Rightarrow> (case mima of (mi, ma) \<Rightarrow> (
                   if x < mi then (Some mi)
                   else (let l = low x (deg div 2); h = high x (deg div 2) in(
                        if h < length treeList then
                                let maxlow = vebt_maxt (treeList ! h) in
                                (if maxlow \<noteq> None \<and> (Some l <\<^sub>o  maxlow) then
                                                        Some (2^(deg div 2)) *\<^sub>o Some h +\<^sub>o vebt_succ (treeList ! h) l
                                 else let sc = vebt_succ summary h in
                                 if sc = None then None
                                 else Some (2^(deg div 2)) *\<^sub>o sc +\<^sub>o vebt_mint (treeList ! the sc) )

                         else None))))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vebt_succ (Leaf a b) x = (if b \<and> x = 0 then Some 1 else None) &&& vebt_succ (Node info deg treeList summary) x = (if deg \<le> 1 then None else case info of None \<Rightarrow> None | Some (mi, ma) \<Rightarrow> if x < mi then Some mi else let l = low x (deg div 2); h = high x (deg div 2) in if h < length treeList then let maxlow = vebt_maxt (treeList ! h) in if maxlow \<noteq> None \<and> Some l <\<^sub>o maxlow then Some (2 ^ (deg div 2)) *\<^sub>o Some h +\<^sub>o vebt_succ (treeList ! h) l else let sc = vebt_succ summary h in if sc = None then None else Some (2 ^ (deg div 2)) *\<^sub>o sc +\<^sub>o vebt_mint (treeList ! the sc) else None)
[PROOF STEP]
apply (cases "(Leaf a b,x)" rule: vebt_succ.cases; simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vebt_succ (Node info deg treeList summary) x = (if deg \<le> 1 then None else case info of None \<Rightarrow> None | Some (mi, ma) \<Rightarrow> if x < mi then Some mi else let l = low x (deg div 2); h = high x (deg div 2) in if h < length treeList then let maxlow = vebt_maxt (treeList ! h) in if maxlow \<noteq> None \<and> Some l <\<^sub>o maxlow then Some (2 ^ (deg div 2)) *\<^sub>o Some h +\<^sub>o vebt_succ (treeList ! h) l else let sc = vebt_succ summary h in if sc = None then None else Some (2 ^ (deg div 2)) *\<^sub>o sc +\<^sub>o vebt_mint (treeList ! the sc) else None)
[PROOF STEP]
apply (cases "(Node info  deg treeList summary,x)" rule: vebt_succ.cases; simp add: Let_def)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma function_one_as_constant:
"\<one>\<^bsub>Fun\<^bsub>n\<^esub> Q\<^sub>p\<^esub> = Qp_const n \<one>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<one>\<^bsub>function_ring (carrier (Q\<^sub>p\<^bsup>n\<^esup>)) Q\<^sub>p\<^esub> = constant_function (carrier (Q\<^sub>p\<^bsup>n\<^esup>)) \<one>
[PROOF STEP]
unfolding constant_function_def  function_ring_def[of "carrier (Q\<^sub>p\<^bsup>n\<^esup>)" Q\<^sub>p] function_one_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<one>\<^bsub>\<lparr>carrier = carrier (Q\<^sub>p\<^bsup>n\<^esup>) \<rightarrow>\<^sub>E carrier Q\<^sub>p, monoid.mult = function_mult (carrier (Q\<^sub>p\<^bsup>n\<^esup>)) Q\<^sub>p, one = \<lambda>x\<in>carrier (Q\<^sub>p\<^bsup>n\<^esup>). \<one>, zero = function_zero (carrier (Q\<^sub>p\<^bsup>n\<^esup>)) Q\<^sub>p, add = function_add (carrier (Q\<^sub>p\<^bsup>n\<^esup>)) Q\<^sub>p, smult = function_scalar_mult (carrier (Q\<^sub>p\<^bsup>n\<^esup>)) Q\<^sub>p\<rparr>\<^esub> = (\<lambda>x\<in>carrier (Q\<^sub>p\<^bsup>n\<^esup>). \<one>)
[PROOF STEP]
by simp


[STATEMENT]
lemma echelon_form_of_euclidean_invertible':
 fixes A::"int mat"
  assumes "A \<in> carrier_mat m n"
  and "1 < m" and "1 < n" (*Required from the mod_type restrictions*)
  shows "\<exists>P. invertible_mat P \<and>
        P \<in> carrier_mat m m \<and> P * A = echelon_form_of_JNF A euclid_ext2
        \<and> echelon_form_JNF (echelon_form_of_JNF A euclid_ext2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>P. invertible_mat P \<and> P \<in> carrier_mat m m \<and> P * A = echelon_form_of_JNF A euclid_ext2 \<and> echelon_form_JNF (echelon_form_of_JNF A euclid_ext2)
[PROOF STEP]
using echelon_form_of_euclidean_invertible_cancelled_both assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>1 < ?m; 1 < ?n; ?A \<in> carrier_mat ?m ?n\<rbrakk> \<Longrightarrow> \<exists>P. invertible_mat P \<and> P \<in> carrier_mat ?m ?m \<and> P * ?A = echelon_form_of_JNF ?A euclid_ext2 \<and> echelon_form_JNF (echelon_form_of_JNF ?A euclid_ext2)
A \<in> carrier_mat m n
1 < m
1 < n

goal (1 subgoal):
 1. \<exists>P. invertible_mat P \<and> P \<in> carrier_mat m m \<and> P * A = echelon_form_of_JNF A euclid_ext2 \<and> echelon_form_JNF (echelon_form_of_JNF A euclid_ext2)
[PROOF STEP]
by auto


[STATEMENT]
lemma abs_ccache_union: "|c1 \<union> c2| \<lessapprox> |c1| \<union> |c2|"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. |c1 \<union> c2| \<lessapprox> |c1| \<union> |c2|
[PROOF STEP]
unfolding ccache_approx_def abs_ccache_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Union>((c, \<beta>), d)\<in>c1 \<union> c2. {((c, |\<beta>|), p) |p. p \<in> |d|}) \<subseteq> (\<Union>((c, \<beta>), d)\<in>c1. {((c, |\<beta>|), p) |p. p \<in> |d|}) \<union> (\<Union>((c, \<beta>), d)\<in>c2. {((c, |\<beta>|), p) |p. p \<in> |d|})
[PROOF STEP]
by auto


[STATEMENT]
lemma convex_with_affine_domain_is_lsc:
  fixes f :: "'a::euclidean_space \<Rightarrow> ereal"
  assumes "convex_on UNIV f"
  assumes "affine (domain f)"
  shows "lsc f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lsc f
[PROOF STEP]
by (metis assms affine_no_rel_frontier emptyE lsc_def lsc_hull_liminf_at
          lsc_hull_of_convex_agrees lsc_liminf_at_eq)