[STATEMENT]
lemma banach':
  fixes C :: "'b :: complete_space \<Rightarrow> 'b"
  assumes "is_contraction C"
  shows "\<exists>!v. C v = v" "\<And>v. (\<lambda>n. (C ^^ n) v) \<longlonglongrightarrow> (THE v. C v = v)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>!v. C v = v &&& (\<And>v. (\<lambda>n. (C ^^ n) v) \<longlonglongrightarrow> (THE v. C v = v))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<exists>!v. C v = v
 2. \<And>v. (\<lambda>n. (C ^^ n) v) \<longlonglongrightarrow> (THE v. C v = v)
[PROOF STEP]
obtain v where C: "C v = v" "\<forall>v'. C v' = v' \<longrightarrow> v' = v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>v. \<lbrakk>C v = v; \<forall>v'. C v' = v' \<longrightarrow> v' = v\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis assms is_contraction_def banach_fix_type)
[PROOF STATE]
proof (state)
this:
C v = v
\<forall>v'. C v' = v' \<longrightarrow> v' = v

goal (2 subgoals):
 1. \<exists>!v. C v = v
 2. \<And>v. (\<lambda>n. (C ^^ n) v) \<longlonglongrightarrow> (THE v. C v = v)
[PROOF STEP]
obtain l where cont: "dist (C v) (C u) \<le> l * dist v u" "0 \<le> l" "l < 1" for v u
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>l. \<lbrakk>\<And>v u. dist (C v) (C u) \<le> l * dist v u; 0 \<le> l; l < 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms is_contraction_def
[PROOF STATE]
proof (prove)
using this:
is_contraction C
is_contraction ?C \<equiv> \<exists>l\<ge>0. l < 1 \<and> (\<forall>v u. dist (?C v) (?C u) \<le> l * dist v u)

goal (1 subgoal):
 1. (\<And>l. \<lbrakk>\<And>v u. dist (C v) (C u) \<le> l * dist v u; 0 \<le> l; l < 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
dist (C ?v) (C ?u) \<le> l * dist ?v ?u
0 \<le> l
l < 1

goal (2 subgoals):
 1. \<exists>!v. C v = v
 2. \<And>v. (\<lambda>n. (C ^^ n) v) \<longlonglongrightarrow> (THE v. C v = v)
[PROOF STEP]
have *: "\<And>n v0. dist ((C ^^ n) v0) v \<le> l ^ n * dist v0 v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n v0. dist ((C ^^ n) v0) v \<le> l ^ n * dist v0 v
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n v0. dist ((C ^^ n) v0) v \<le> l ^ n * dist v0 v
[PROOF STEP]
fix n v0
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n v0. dist ((C ^^ n) v0) v \<le> l ^ n * dist v0 v
[PROOF STEP]
show "dist ((C ^^ n) v0) v \<le> l ^ n * dist v0 v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dist ((C ^^ n) v0) v \<le> l ^ n * dist v0 v
[PROOF STEP]
proof (induction n)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. dist ((C ^^ 0) v0) v \<le> l ^ 0 * dist v0 v
 2. \<And>n. dist ((C ^^ n) v0) v \<le> l ^ n * dist v0 v \<Longrightarrow> dist ((C ^^ Suc n) v0) v \<le> l ^ Suc n * dist v0 v
[PROOF STEP]
case (Suc n)
[PROOF STATE]
proof (state)
this:
dist ((C ^^ n) v0) v \<le> l ^ n * dist v0 v

goal (2 subgoals):
 1. dist ((C ^^ 0) v0) v \<le> l ^ 0 * dist v0 v
 2. \<And>n. dist ((C ^^ n) v0) v \<le> l ^ n * dist v0 v \<Longrightarrow> dist ((C ^^ Suc n) v0) v \<le> l ^ Suc n * dist v0 v
[PROOF STEP]
thus "dist ((C ^^ Suc n) v0) v \<le> l ^ Suc n * dist v0 v"
[PROOF STATE]
proof (prove)
using this:
dist ((C ^^ n) v0) v \<le> l ^ n * dist v0 v

goal (1 subgoal):
 1. dist ((C ^^ Suc n) v0) v \<le> l ^ Suc n * dist v0 v
[PROOF STEP]
using \<open>0 \<le> l\<close>
[PROOF STATE]
proof (prove)
using this:
dist ((C ^^ n) v0) v \<le> l ^ n * dist v0 v
0 \<le> l

goal (1 subgoal):
 1. dist ((C ^^ Suc n) v0) v \<le> l ^ Suc n * dist v0 v
[PROOF STEP]
by (subst C(1)[symmetric])
          (auto simp: algebra_simps intro!: order_trans[OF cont(1)] mult_left_mono)
[PROOF STATE]
proof (state)
this:
dist ((C ^^ Suc n) v0) v \<le> l ^ Suc n * dist v0 v

goal (1 subgoal):
 1. dist ((C ^^ 0) v0) v \<le> l ^ 0 * dist v0 v
[PROOF STEP]
qed simp
[PROOF STATE]
proof (state)
this:
dist ((C ^^ n) v0) v \<le> l ^ n * dist v0 v

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
dist ((C ^^ ?n) ?v0.0) v \<le> l ^ ?n * dist ?v0.0 v

goal (2 subgoals):
 1. \<exists>!v. C v = v
 2. \<And>v. (\<lambda>n. (C ^^ n) v) \<longlonglongrightarrow> (THE v. C v = v)
[PROOF STEP]
have "(\<lambda>n. l ^ n) \<longlonglongrightarrow> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (^) l \<longlonglongrightarrow> 0
[PROOF STEP]
by (simp add: LIMSEQ_realpow_zero \<open>0 \<le> l\<close> \<open>l < 1\<close>)
[PROOF STATE]
proof (state)
this:
(^) l \<longlonglongrightarrow> 0

goal (2 subgoals):
 1. \<exists>!v. C v = v
 2. \<And>v. (\<lambda>n. (C ^^ n) v) \<longlonglongrightarrow> (THE v. C v = v)
[PROOF STEP]
hence "\<And>v0. (\<lambda>n. l ^ n * dist v0 v) \<longlonglongrightarrow> 0"
[PROOF STATE]
proof (prove)
using this:
(^) l \<longlonglongrightarrow> 0

goal (1 subgoal):
 1. \<And>v0. (\<lambda>n. l ^ n * dist v0 v) \<longlonglongrightarrow> 0
[PROOF STEP]
by (simp add: tendsto_mult_left_zero)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. l ^ n * dist ?v0.0 v) \<longlonglongrightarrow> 0

goal (2 subgoals):
 1. \<exists>!v. C v = v
 2. \<And>v. (\<lambda>n. (C ^^ n) v) \<longlonglongrightarrow> (THE v. C v = v)
[PROOF STEP]
hence "(\<lambda>n. dist ((C ^^ n) v0) v) \<longlonglongrightarrow> 0" for v0
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. l ^ n * dist ?v0.0 v) \<longlonglongrightarrow> 0

goal (1 subgoal):
 1. (\<lambda>n. dist ((C ^^ n) v0) v) \<longlonglongrightarrow> 0
[PROOF STEP]
using * order_trans abs_ge_self
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. l ^ n * dist ?v0.0 v) \<longlonglongrightarrow> 0
dist ((C ^^ ?n) ?v0.0) v \<le> l ^ ?n * dist ?v0.0 v
\<lbrakk>?x \<le> ?y; ?y \<le> ?z\<rbrakk> \<Longrightarrow> ?x \<le> ?z
?a \<le> \<bar>?a\<bar>

goal (1 subgoal):
 1. (\<lambda>n. dist ((C ^^ n) v0) v) \<longlonglongrightarrow> 0
[PROOF STEP]
by (subst Limits.tendsto_0_le[of "(\<lambda>n. l ^ n * dist v0 v)" _ _ 1])
        (fastforce intro!: eventuallyI)+
[PROOF STATE]
proof (state)
this:
(\<lambda>n. dist ((C ^^ n) ?v0.0) v) \<longlonglongrightarrow> 0

goal (2 subgoals):
 1. \<exists>!v. C v = v
 2. \<And>v. (\<lambda>n. (C ^^ n) v) \<longlonglongrightarrow> (THE v. C v = v)
[PROOF STEP]
hence "\<And>v0. (\<lambda>n. (C ^^ n) v0) \<longlonglongrightarrow> v"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. dist ((C ^^ n) ?v0.0) v) \<longlonglongrightarrow> 0

goal (1 subgoal):
 1. \<And>v0. (\<lambda>n. (C ^^ n) v0) \<longlonglongrightarrow> v
[PROOF STEP]
using tendsto_dist_iff
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. dist ((C ^^ n) ?v0.0) v) \<longlonglongrightarrow> 0
(?f \<longlongrightarrow> ?l) ?F = ((\<lambda>x. dist (?f x) ?l) \<longlongrightarrow> 0) ?F

goal (1 subgoal):
 1. \<And>v0. (\<lambda>n. (C ^^ n) v0) \<longlonglongrightarrow> v
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<lambda>n. (C ^^ n) ?v0.0) \<longlonglongrightarrow> v

goal (2 subgoals):
 1. \<exists>!v. C v = v
 2. \<And>v. (\<lambda>n. (C ^^ n) v) \<longlonglongrightarrow> (THE v. C v = v)
[PROOF STEP]
thus "\<And>v0. (\<lambda>n. (C ^^ n) v0) \<longlonglongrightarrow> (THE v. C v = v)"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. (C ^^ n) ?v0.0) \<longlonglongrightarrow> v

goal (1 subgoal):
 1. \<And>v0. (\<lambda>n. (C ^^ n) v0) \<longlonglongrightarrow> (THE v. C v = v)
[PROOF STEP]
by (metis (mono_tags, lifting) C theI')
[PROOF STATE]
proof (state)
this:
(\<lambda>n. (C ^^ n) ?v0.0) \<longlonglongrightarrow> (THE v. C v = v)

goal (1 subgoal):
 1. \<exists>!v. C v = v
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>!v. C v = v
[PROOF STEP]
show "\<exists>!v. C v = v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>!v. C v = v
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
is_contraction C

goal (1 subgoal):
 1. \<exists>!v. C v = v
[PROOF STEP]
unfolding is_contraction_def
[PROOF STATE]
proof (prove)
using this:
\<exists>l\<ge>0. l < 1 \<and> (\<forall>v u. dist (C v) (C u) \<le> l * dist v u)

goal (1 subgoal):
 1. \<exists>!v. C v = v
[PROOF STEP]
using banach_fix_type
[PROOF STATE]
proof (prove)
using this:
\<exists>l\<ge>0. l < 1 \<and> (\<forall>v u. dist (C v) (C u) \<le> l * dist v u)
\<lbrakk>0 \<le> ?c; ?c < 1; \<forall>x y. dist (?f x) (?f y) \<le> ?c * dist x y\<rbrakk> \<Longrightarrow> \<exists>!x. ?f x = x

goal (1 subgoal):
 1. \<exists>!v. C v = v
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>!v. C v = v

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma prv_cnj_mono:
assumes "\<phi>1 \<in> fmla" and "\<phi>2 \<in> fmla" and "\<chi>1 \<in> fmla" and "\<chi>2 \<in> fmla"
assumes "prv (imp \<phi>1 \<chi>1)" and "prv (imp \<phi>2 \<chi>2)"
shows "prv (imp (cnj \<phi>1 \<phi>2) (cnj \<chi>1 \<chi>2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prv (imp (cnj \<phi>1 \<phi>2) (cnj \<chi>1 \<chi>2))
[PROOF STEP]
using assms prv_cnj_imp_mono prv_imp_mp
[PROOF STATE]
proof (prove)
using this:
\<phi>1 \<in> fmla
\<phi>2 \<in> fmla
\<chi>1 \<in> fmla
\<chi>2 \<in> fmla
prv (imp \<phi>1 \<chi>1)
prv (imp \<phi>2 \<chi>2)
\<lbrakk>?\<phi>1.0 \<in> fmla; ?\<phi>2.0 \<in> fmla; ?\<chi>1.0 \<in> fmla; ?\<chi>2.0 \<in> fmla\<rbrakk> \<Longrightarrow> prv (imp (imp ?\<phi>1.0 ?\<chi>1.0) (imp (imp ?\<phi>2.0 ?\<chi>2.0) (imp (cnj ?\<phi>1.0 ?\<phi>2.0) (cnj ?\<chi>1.0 ?\<chi>2.0))))
\<lbrakk>?\<phi> \<in> fmla; ?\<chi> \<in> fmla; prv (imp ?\<phi> ?\<chi>); prv ?\<phi>\<rbrakk> \<Longrightarrow> prv ?\<chi>

goal (1 subgoal):
 1. prv (imp (cnj \<phi>1 \<phi>2) (cnj \<chi>1 \<chi>2))
[PROOF STEP]
by (metis (mono_tags) cnj prv_prv_imp_trans prv_imp_cnj prv_imp_cnjL prv_imp_cnjR)


[STATEMENT]
lemma sum_negf:
  "sum (%x. - (f x)::'a) A = - sum f A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>x\<in>A. - f x) = - sum f A
[PROOF STEP]
proof (cases "finite A")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. finite A \<Longrightarrow> (\<Sum>x\<in>A. - f x) = - sum f A
 2. infinite A \<Longrightarrow> (\<Sum>x\<in>A. - f x) = - sum f A
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
finite A

goal (2 subgoals):
 1. finite A \<Longrightarrow> (\<Sum>x\<in>A. - f x) = - sum f A
 2. infinite A \<Longrightarrow> (\<Sum>x\<in>A. - f x) = - sum f A
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
finite A

goal (1 subgoal):
 1. (\<Sum>x\<in>A. - f x) = - sum f A
[PROOF STEP]
by (induct set: finite) auto
[PROOF STATE]
proof (state)
this:
(\<Sum>x\<in>A. - f x) = - sum f A

goal (1 subgoal):
 1. infinite A \<Longrightarrow> (\<Sum>x\<in>A. - f x) = - sum f A
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. infinite A \<Longrightarrow> (\<Sum>x\<in>A. - f x) = - sum f A
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
infinite A

goal (1 subgoal):
 1. infinite A \<Longrightarrow> (\<Sum>x\<in>A. - f x) = - sum f A
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
infinite A

goal (1 subgoal):
 1. (\<Sum>x\<in>A. - f x) = - sum f A
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>x\<in>A. - f x) = - sum f A

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma notTerminalNforms: "\<not> terminal subs (f n) \<Longrightarrow> nforms (f n) \<noteq> []"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> terminal subs (f n) \<Longrightarrow> nforms (f n) \<noteq> []
[PROOF STEP]
apply(erule contrapos_nn)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nforms (f n) = [] \<Longrightarrow> terminal subs (f n)
[PROOF STEP]
apply(erule nformsTerminal)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma remove_vertex_E: "E\<^bsub>remove_vertex x\<^esub> = Restr E (V - {x})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. E\<^bsub>remove_vertex x\<^esub> = Restr E (V - {x})
[PROOF STEP]
unfolding remove_vertex_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. E\<^bsub>G\<lparr>verts := V - {x}, arcs := Restr E (V - {x})\<rparr>\<^esub> = Restr E (V - {x})
[PROOF STEP]
by simp


[STATEMENT]
lemma Bex_alts: "(\<exists>x\<in>alts. P x) \<longleftrightarrow> P a \<or> P b \<or> P c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>x\<in>alts. P x) = (P a \<or> P b \<or> P c)
[PROOF STEP]
by (simp add: alts_eq)


[STATEMENT]
lemma zimage_id[simp]: "zimage id A = A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. zimage id A = A
[PROOF STEP]
by (simp add: zet_ext_eq zimage_iff)


[STATEMENT]
lemma while_mult_top:
  "(x * top) \<star> z = z \<squnion> x * top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x * top \<star> z = z \<squnion> x * top
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x * top \<star> z = z \<squnion> x * top
[PROOF STEP]
have 1: "z \<squnion> x * top \<le> (x * top) \<star> z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z \<squnion> x * top \<le> x * top \<star> z
[PROOF STEP]
by (metis le_supI sup_ge1 while_def while_increasing tarski_top_omega)
[PROOF STATE]
proof (state)
this:
z \<squnion> x * top \<le> x * top \<star> z

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

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

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

goal (1 subgoal):
 1. x * top \<star> z = z \<squnion> x * top
[PROOF STEP]
have "... \<le> z \<squnion> x * top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z \<squnion> x * top * (x * top \<star> z) \<le> z \<squnion> x * top
[PROOF STEP]
using mult_right_isotone sup_right_isotone top_greatest mult_assoc
[PROOF STATE]
proof (prove)
using this:
?x \<le> ?y \<Longrightarrow> ?z * ?x \<le> ?z * ?y
?x \<le> ?y \<Longrightarrow> ?z \<squnion> ?x \<le> ?z \<squnion> ?y
?x \<le> top
?a * ?b * ?c = ?a * (?b * ?c)

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

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

goal (1 subgoal):
 1. x * top \<star> z = z \<squnion> x * top
[PROOF STEP]
using 1 order.antisym
[PROOF STATE]
proof (prove)
using this:
x * top \<star> z \<le> z \<squnion> x * top
z \<squnion> x * top \<le> x * top \<star> z
\<lbrakk>?a \<le> ?b; ?b \<le> ?a\<rbrakk> \<Longrightarrow> ?a = ?b

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma upset_set_downset_set_dual: "(`) \<partial> \<circ> \<Up> = \<Down> \<circ> (`) \<partial>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (`) \<partial> \<circ> \<Up> = \<Down> \<circ> (`) \<partial>
[PROOF STEP]
using downset_set_upset_set_dual
[PROOF STATE]
proof (prove)
using this:
(`) \<partial> \<circ> \<Down> = \<Up> \<circ> (`) \<partial>

goal (1 subgoal):
 1. (`) \<partial> \<circ> \<Up> = \<Down> \<circ> (`) \<partial>
[PROOF STEP]
by (metis (no_types, opaque_lifting) comp_id id_comp image_dual o_assoc)


[STATEMENT]
lemma sqrt_piecewise_C1_differentiable [simp, derivative_intros]:
  assumes f: "f piecewise_C1_differentiable_on S" and fim: "f ` S \<subseteq> {0<..}"
  shows "(\<lambda>x. sqrt (f x)) piecewise_C1_differentiable_on S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. sqrt (f x)) piecewise_C1_differentiable_on S
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
f piecewise_C1_differentiable_on S
f ` S \<subseteq> {0<..}

goal (1 subgoal):
 1. (\<lambda>x. sqrt (f x)) piecewise_C1_differentiable_on S
[PROOF STEP]
unfolding piecewise_C1_differentiable_on_def
[PROOF STATE]
proof (prove)
using this:
continuous_on S f \<and> (\<exists>Sa. finite Sa \<and> f C1_differentiable_on S - Sa)
f ` S \<subseteq> {0<..}

goal (1 subgoal):
 1. continuous_on S (\<lambda>x. sqrt (f x)) \<and> (\<exists>Sa. finite Sa \<and> (\<lambda>x. sqrt (f x)) C1_differentiable_on S - Sa)
[PROOF STEP]
by (fastforce intro!: continuous_intros derivative_intros)


[STATEMENT]
lemma inverse_Real:
  "cauchy X \<Longrightarrow> inverse (Real X) = (if vanishes X then 0 else Real (\<lambda>n. inverse (X n)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cauchy X \<Longrightarrow> inverse (Real X) = (if vanishes X then 0 else Real (\<lambda>n. inverse (X n)))
[PROOF STEP]
using inverse_real.transfer zero_real.transfer
[PROOF STATE]
proof (prove)
using this:
rel_fun pcr_real pcr_real (\<lambda>X. if vanishes X then \<lambda>n. 0 else (\<lambda>n. inverse (X n))) inverse
pcr_real (\<lambda>n. 0) 0

goal (1 subgoal):
 1. cauchy X \<Longrightarrow> inverse (Real X) = (if vanishes X then 0 else Real (\<lambda>n. inverse (X n)))
[PROOF STEP]
unfolding cr_real_eq rel_fun_def
[PROOF STATE]
proof (prove)
using this:
\<forall>x y. cauchy x \<and> Real x = y \<longrightarrow> cauchy (if vanishes x then \<lambda>n. 0 else (\<lambda>n. inverse (x n))) \<and> Real (if vanishes x then \<lambda>n. 0 else (\<lambda>n. inverse (x n))) = inverse y
cauchy (\<lambda>n. 0) \<and> Real (\<lambda>n. 0) = 0

goal (1 subgoal):
 1. cauchy X \<Longrightarrow> inverse (Real X) = (if vanishes X then 0 else Real (\<lambda>n. inverse (X n)))
[PROOF STEP]
by (simp split: if_split_asm, metis)


[STATEMENT]
lemma bet2_le2__le2356:
  assumes "Bet A B C" and
    "Bet A' B' C'" and
    "A B Le A' B'" and
    "A' C' Le A C"
  shows "B' C' Le B C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. B' C' Le B C
[PROOF STEP]
proof (cases)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> B' C' Le B C
 2. \<not> ?P \<Longrightarrow> B' C' Le B C
[PROOF STEP]
assume "A = B"
[PROOF STATE]
proof (state)
this:
A = B

goal (2 subgoals):
 1. ?P \<Longrightarrow> B' C' Le B C
 2. \<not> ?P \<Longrightarrow> B' C' Le B C
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
A = B
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
A = B

goal (1 subgoal):
 1. B' C' Le B C
[PROOF STEP]
using assms(1) assms(2) assms(3) assms(4) bet2_le2__le2356_R1
[PROOF STATE]
proof (prove)
using this:
A = B
Bet A B C
Bet A' B' C'
A B Le A' B'
A' C' Le A C
\<lbrakk>Bet ?A ?A ?C; Bet ?A' ?B' ?C'; ?A ?A Le ?A' ?B'; ?A' ?C' Le ?A ?C\<rbrakk> \<Longrightarrow> ?B' ?C' Le ?A ?C

goal (1 subgoal):
 1. B' C' Le B C
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
B' C' Le B C

goal (1 subgoal):
 1. A \<noteq> B \<Longrightarrow> B' C' Le B C
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. A \<noteq> B \<Longrightarrow> B' C' Le B C
[PROOF STEP]
assume "\<not> A = B"
[PROOF STATE]
proof (state)
this:
A \<noteq> B

goal (1 subgoal):
 1. A \<noteq> B \<Longrightarrow> B' C' Le B C
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
A \<noteq> B
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
A \<noteq> B

goal (1 subgoal):
 1. B' C' Le B C
[PROOF STEP]
using assms(1) assms(2) assms(3) assms(4) bet2_le2__le2356_R2
[PROOF STATE]
proof (prove)
using this:
A \<noteq> B
Bet A B C
Bet A' B' C'
A B Le A' B'
A' C' Le A C
\<lbrakk>?A \<noteq> ?B; Bet ?A ?B ?C; Bet ?A' ?B' ?C'; ?A ?B Le ?A' ?B'; ?A' ?C' Le ?A ?C\<rbrakk> \<Longrightarrow> ?B' ?C' Le ?B ?C

goal (1 subgoal):
 1. B' C' Le B C
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
B' C' Le B C

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma star_rtc_2: "1 + y \<cdot> y + x \<le> y \<Longrightarrow> x\<^sup>\<star> \<le> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1::'a) + y \<cdot> y + x \<le> y \<Longrightarrow> x\<^sup>\<star> \<le> y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (1::'a) + y \<cdot> y + x \<le> y \<Longrightarrow> x\<^sup>\<star> \<le> y
[PROOF STEP]
assume "1 + y \<cdot> y + x \<le> y"
[PROOF STATE]
proof (state)
this:
(1::'a) + y \<cdot> y + x \<le> y

goal (1 subgoal):
 1. (1::'a) + y \<cdot> y + x \<le> y \<Longrightarrow> x\<^sup>\<star> \<le> y
[PROOF STEP]
hence "1 \<le> y" and "x \<le> y" and "y \<cdot> y \<le> y"
[PROOF STATE]
proof (prove)
using this:
(1::'a) + y \<cdot> y + x \<le> y

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

goal (1 subgoal):
 1. (1::'a) + y \<cdot> y + x \<le> y \<Longrightarrow> x\<^sup>\<star> \<le> y
[PROOF STEP]
hence "y \<le> y \<rightarrow> y" and "x \<le> y \<rightarrow> y"
[PROOF STATE]
proof (prove)
using this:
(1::'a) \<le> y
x \<le> y
y \<cdot> y \<le> y

goal (1 subgoal):
 1. y \<le> y \<rightarrow> y &&& x \<le> y \<rightarrow> y
[PROOF STEP]
using local.order_trans
[PROOF STATE]
proof (prove)
using this:
(1::'a) \<le> y
x \<le> y
y \<cdot> y \<le> y
\<lbrakk>?x \<le> ?y; ?y \<le> ?z\<rbrakk> \<Longrightarrow> ?x \<le> ?z

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

goal (1 subgoal):
 1. (1::'a) + y \<cdot> y + x \<le> y \<Longrightarrow> x\<^sup>\<star> \<le> y
[PROOF STEP]
hence "x\<^sup>\<star> \<le> (y \<rightarrow> y)\<^sup>\<star>"
[PROOF STATE]
proof (prove)
using this:
y \<le> y \<rightarrow> y
x \<le> y \<rightarrow> y

goal (1 subgoal):
 1. x\<^sup>\<star> \<le> (y \<rightarrow> y)\<^sup>\<star>
[PROOF STEP]
by (metis local.join.sup.absorb2 local.star_subdist)
[PROOF STATE]
proof (state)
this:
x\<^sup>\<star> \<le> (y \<rightarrow> y)\<^sup>\<star>

goal (1 subgoal):
 1. (1::'a) + y \<cdot> y + x \<le> y \<Longrightarrow> x\<^sup>\<star> \<le> y
[PROOF STEP]
hence "x\<^sup>\<star> \<le> y \<rightarrow> y"
[PROOF STATE]
proof (prove)
using this:
x\<^sup>\<star> \<le> (y \<rightarrow> y)\<^sup>\<star>

goal (1 subgoal):
 1. x\<^sup>\<star> \<le> y \<rightarrow> y
[PROOF STEP]
by (metis order_trans right_pure_induction)
[PROOF STATE]
proof (state)
this:
x\<^sup>\<star> \<le> y \<rightarrow> y

goal (1 subgoal):
 1. (1::'a) + y \<cdot> y + x \<le> y \<Longrightarrow> x\<^sup>\<star> \<le> y
[PROOF STEP]
hence "y \<cdot> x\<^sup>\<star> \<le> y"
[PROOF STATE]
proof (prove)
using this:
x\<^sup>\<star> \<le> y \<rightarrow> y

goal (1 subgoal):
 1. y \<cdot> x\<^sup>\<star> \<le> y
[PROOF STEP]
by (simp add: local.resr_galois)
[PROOF STATE]
proof (state)
this:
y \<cdot> x\<^sup>\<star> \<le> y

goal (1 subgoal):
 1. (1::'a) + y \<cdot> y + x \<le> y \<Longrightarrow> x\<^sup>\<star> \<le> y
[PROOF STEP]
thus "x\<^sup>\<star> \<le> y"
[PROOF STATE]
proof (prove)
using this:
y \<cdot> x\<^sup>\<star> \<le> y

goal (1 subgoal):
 1. x\<^sup>\<star> \<le> y
[PROOF STEP]
by (metis \<open>1 \<le> y\<close> local.dual_order.trans local.mult_onel local.resl_galois)
[PROOF STATE]
proof (state)
this:
x\<^sup>\<star> \<le> y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma expands_to_squeeze:
  assumes "eventually (\<lambda>x. l x \<le> f x) at_top" "eventually (\<lambda>x. f x \<le> g x) at_top"
          "(l expands_to L) bs" "(g expands_to L) bs"
  shows   "(f expands_to L) bs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f expands_to L) bs
[PROOF STEP]
proof (rule expands_to_cong[OF assms(3)])
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. l x = f x
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F x in at_top. l x \<le> f x
\<forall>\<^sub>F x in at_top. f x \<le> g x
(l expands_to L) bs
(g expands_to L) bs
[PROOF STEP]
have "eventually (\<lambda>x. eval L x = l x) at_top" "eventually (\<lambda>x. eval L x = g x) at_top"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in at_top. l x \<le> f x
\<forall>\<^sub>F x in at_top. f x \<le> g x
(l expands_to L) bs
(g expands_to L) bs

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. eval L x = l x &&& \<forall>\<^sub>F x in at_top. eval L x = g x
[PROOF STEP]
by (simp_all add: expands_to.simps)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_top. eval L x = l x
\<forall>\<^sub>F x in at_top. eval L x = g x

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. l x = f x
[PROOF STEP]
with assms(1,2)
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F x in at_top. l x \<le> f x
\<forall>\<^sub>F x in at_top. f x \<le> g x
\<forall>\<^sub>F x in at_top. eval L x = l x
\<forall>\<^sub>F x in at_top. eval L x = g x
[PROOF STEP]
show "eventually (\<lambda>x. l x = f x) at_top"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in at_top. l x \<le> f x
\<forall>\<^sub>F x in at_top. f x \<le> g x
\<forall>\<^sub>F x in at_top. eval L x = l x
\<forall>\<^sub>F x in at_top. eval L x = g x

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. l x = f x
[PROOF STEP]
by eventually_elim simp
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_top. l x = f x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma bigo_imp_conv_radius_ge:
  fixes f g :: "nat \<Rightarrow> 'a :: {banach, real_normed_field}"
  assumes "f \<in> O(g)"
  shows   "conv_radius f \<ge> conv_radius g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. conv_radius g \<le> conv_radius f
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. conv_radius g \<le> conv_radius f
[PROOF STEP]
have "conv_radius g = Sup {r. \<forall>z. ereal (norm z) < r \<longrightarrow> summable (\<lambda>n. norm (g n * z ^ n))}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. conv_radius g = Sup {r. \<forall>z. ereal (norm z) < r \<longrightarrow> summable (\<lambda>n. norm (g n * z ^ n))}
[PROOF STEP]
by (simp add: conv_radius_conv_Sup')
[PROOF STATE]
proof (state)
this:
conv_radius g = Sup {r. \<forall>z. ereal (norm z) < r \<longrightarrow> summable (\<lambda>n. norm (g n * z ^ n))}

goal (1 subgoal):
 1. conv_radius g \<le> conv_radius f
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
conv_radius g = Sup {r. \<forall>z. ereal (norm z) < r \<longrightarrow> summable (\<lambda>n. norm (g n * z ^ n))}

goal (1 subgoal):
 1. conv_radius g \<le> conv_radius f
[PROOF STEP]
have "\<dots> \<le> Sup {r. \<forall>z. ereal (norm z) < r \<longrightarrow> summable (\<lambda>n. f n * z ^ n)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sup {r. \<forall>z. ereal (norm z) < r \<longrightarrow> summable (\<lambda>n. norm (g n * z ^ n))} \<le> Sup {r. \<forall>z. ereal (norm z) < r \<longrightarrow> summable (\<lambda>n. f n * z ^ n)}
[PROOF STEP]
proof (rule Sup_subset_mono, safe)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x z. \<lbrakk>\<forall>z. ereal (norm z) < x \<longrightarrow> summable (\<lambda>n. norm (g n * z ^ n)); ereal (norm z) < x\<rbrakk> \<Longrightarrow> summable (\<lambda>n. f n * z ^ n)
[PROOF STEP]
fix r :: ereal and z :: 'a
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x z. \<lbrakk>\<forall>z. ereal (norm z) < x \<longrightarrow> summable (\<lambda>n. norm (g n * z ^ n)); ereal (norm z) < x\<rbrakk> \<Longrightarrow> summable (\<lambda>n. f n * z ^ n)
[PROOF STEP]
assume g: "\<forall>z. ereal (norm z) < r \<longrightarrow> summable (\<lambda>n. norm (g n * z ^ n))"
[PROOF STATE]
proof (state)
this:
\<forall>z. ereal (norm z) < r \<longrightarrow> summable (\<lambda>n. norm (g n * z ^ n))

goal (1 subgoal):
 1. \<And>x z. \<lbrakk>\<forall>z. ereal (norm z) < x \<longrightarrow> summable (\<lambda>n. norm (g n * z ^ n)); ereal (norm z) < x\<rbrakk> \<Longrightarrow> summable (\<lambda>n. f n * z ^ n)
[PROOF STEP]
assume z: "ereal (norm z) < r"
[PROOF STATE]
proof (state)
this:
ereal (norm z) < r

goal (1 subgoal):
 1. \<And>x z. \<lbrakk>\<forall>z. ereal (norm z) < x \<longrightarrow> summable (\<lambda>n. norm (g n * z ^ n)); ereal (norm z) < x\<rbrakk> \<Longrightarrow> summable (\<lambda>n. f n * z ^ n)
[PROOF STEP]
from g z
[PROOF STATE]
proof (chain)
picking this:
\<forall>z. ereal (norm z) < r \<longrightarrow> summable (\<lambda>n. norm (g n * z ^ n))
ereal (norm z) < r
[PROOF STEP]
have "summable (\<lambda>n. norm (g n * z ^ n))"
[PROOF STATE]
proof (prove)
using this:
\<forall>z. ereal (norm z) < r \<longrightarrow> summable (\<lambda>n. norm (g n * z ^ n))
ereal (norm z) < r

goal (1 subgoal):
 1. summable (\<lambda>n. norm (g n * z ^ n))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
summable (\<lambda>n. norm (g n * z ^ n))

goal (1 subgoal):
 1. \<And>x z. \<lbrakk>\<forall>z. ereal (norm z) < x \<longrightarrow> summable (\<lambda>n. norm (g n * z ^ n)); ereal (norm z) < x\<rbrakk> \<Longrightarrow> summable (\<lambda>n. f n * z ^ n)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
summable (\<lambda>n. norm (g n * z ^ n))

goal (1 subgoal):
 1. \<And>x z. \<lbrakk>\<forall>z. ereal (norm z) < x \<longrightarrow> summable (\<lambda>n. norm (g n * z ^ n)); ereal (norm z) < x\<rbrakk> \<Longrightarrow> summable (\<lambda>n. f n * z ^ n)
[PROOF STEP]
have "(\<lambda>n. norm (f n * z ^ n)) \<in> O(\<lambda>n. norm (g n * z ^ n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. norm (f n * z ^ n)) \<in> O(\<lambda>n. norm (g n * z ^ n))
[PROOF STEP]
unfolding landau_o.big.norm_iff
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. f n * z ^ n) \<in> O(\<lambda>n. g n * z ^ n)
[PROOF STEP]
by (intro landau_o.big.mult assms) auto
[PROOF STATE]
proof (state)
this:
(\<lambda>n. norm (f n * z ^ n)) \<in> O(\<lambda>n. norm (g n * z ^ n))

goal (1 subgoal):
 1. \<And>x z. \<lbrakk>\<forall>z. ereal (norm z) < x \<longrightarrow> summable (\<lambda>n. norm (g n * z ^ n)); ereal (norm z) < x\<rbrakk> \<Longrightarrow> summable (\<lambda>n. f n * z ^ n)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
summable (\<lambda>n. norm (g n * z ^ n))
(\<lambda>n. norm (f n * z ^ n)) \<in> O(\<lambda>n. norm (g n * z ^ n))
[PROOF STEP]
show "summable (\<lambda>n. f n * z ^ n)"
[PROOF STATE]
proof (prove)
using this:
summable (\<lambda>n. norm (g n * z ^ n))
(\<lambda>n. norm (f n * z ^ n)) \<in> O(\<lambda>n. norm (g n * z ^ n))

goal (1 subgoal):
 1. summable (\<lambda>n. f n * z ^ n)
[PROOF STEP]
by (rule summable_comparison_test_bigo')
[PROOF STATE]
proof (state)
this:
summable (\<lambda>n. f n * z ^ n)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Sup {r. \<forall>z. ereal (norm z) < r \<longrightarrow> summable (\<lambda>n. norm (g n * z ^ n))} \<le> Sup {r. \<forall>z. ereal (norm z) < r \<longrightarrow> summable (\<lambda>n. f n * z ^ n)}

goal (1 subgoal):
 1. conv_radius g \<le> conv_radius f
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Sup {r. \<forall>z. ereal (norm z) < r \<longrightarrow> summable (\<lambda>n. norm (g n * z ^ n))} \<le> Sup {r. \<forall>z. ereal (norm z) < r \<longrightarrow> summable (\<lambda>n. f n * z ^ n)}

goal (1 subgoal):
 1. conv_radius g \<le> conv_radius f
[PROOF STEP]
have "\<dots> = conv_radius f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sup {r. \<forall>z. ereal (norm z) < r \<longrightarrow> summable (\<lambda>n. f n * z ^ n)} = conv_radius f
[PROOF STEP]
by (simp add: conv_radius_conv_Sup)
[PROOF STATE]
proof (state)
this:
Sup {r. \<forall>z. ereal (norm z) < r \<longrightarrow> summable (\<lambda>n. f n * z ^ n)} = conv_radius f

goal (1 subgoal):
 1. conv_radius g \<le> conv_radius f
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
conv_radius g \<le> conv_radius f
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
conv_radius g \<le> conv_radius f

goal (1 subgoal):
 1. conv_radius g \<le> conv_radius f
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
conv_radius g \<le> conv_radius f

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma tensor_mkarr [simp]:
    assumes "Arr t" and "Arr u"
    shows "mkarr t \<otimes> mkarr u = mkarr (t \<^bold>\<otimes> u)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mkarr t \<otimes> mkarr u = mkarr (t \<^bold>\<otimes> u)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
Arr t
Arr u

goal (1 subgoal):
 1. mkarr t \<otimes> mkarr u = mkarr (t \<^bold>\<otimes> u)
[PROOF STEP]
by (meson Tensor_in_tensor arr_char Arr_in_mkarr arr_mkarr arr_tensor)


[STATEMENT]
lemma in_set_suffixes [simp]: "xs \<in> set (suffixes ys) \<longleftrightarrow> suffix xs ys"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (xs \<in> set (suffixes ys)) = suffix xs ys
[PROOF STEP]
by (induction ys) (auto simp: suffix_def Cons_eq_append_conv)


[STATEMENT]
lemma plus_MP_oalist [code]: "MP_oalist xs + MP_oalist ys = MP_oalist (OAlist_map2_val_neutr_ntm (\<lambda>_. (+)) xs ys)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. MP_oalist xs + MP_oalist ys = MP_oalist (OAlist_map2_val_neutr_ntm (\<lambda>_. (+)) xs ys)
[PROOF STEP]
by (rule poly_mapping_eqI, simp add: lookup_plus_fun, rule oa_ntm.lookup_map2_val_neutr[symmetric], simp_all)


[STATEMENT]
lemma size_mset_SucE: "size A = Suc n \<Longrightarrow> (\<And>a B. A = {#a#} + B \<Longrightarrow> size B = n \<Longrightarrow> P) \<Longrightarrow> P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>size A = Suc n; \<And>a B. \<lbrakk>A = {#a#} + B; size B = n\<rbrakk> \<Longrightarrow> P\<rbrakk> \<Longrightarrow> P
[PROOF STEP]
by (cases A) (auto simp add: ac_simps)


[STATEMENT]
lemma compare_lists_induct [consumes 1, case_names Nil Eq Neq]:
  fixes as bs :: "real list"
  assumes "length as = length bs"
  assumes "P [] []"
  assumes "\<And>a as bs. P as bs \<Longrightarrow> P (a # as) (a # bs)"
  assumes "\<And>a as b bs. a \<noteq> b \<Longrightarrow> P (a # as) (b # bs)"
  shows   "P as bs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P as bs
[PROOF STEP]
using assms(1)
[PROOF STATE]
proof (prove)
using this:
length as = length bs

goal (1 subgoal):
 1. P as bs
[PROOF STEP]
proof (induction as bs rule: list_induct2)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. P [] []
 2. \<And>x xs y ys. \<lbrakk>length xs = length ys; P xs ys\<rbrakk> \<Longrightarrow> P (x # xs) (y # ys)
[PROOF STEP]
case (Cons a as b bs)
[PROOF STATE]
proof (state)
this:
length as = length bs
P as bs

goal (2 subgoals):
 1. P [] []
 2. \<And>x xs y ys. \<lbrakk>length xs = length ys; P xs ys\<rbrakk> \<Longrightarrow> P (x # xs) (y # ys)
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
length as = length bs
P as bs

goal (1 subgoal):
 1. P (a # as) (b # bs)
[PROOF STEP]
by (cases "a < b") (auto intro: assms)
[PROOF STATE]
proof (state)
this:
P (a # as) (b # bs)

goal (1 subgoal):
 1. P [] []
[PROOF STEP]
qed (simp_all add: assms)


[STATEMENT]
lemma asymp_equiv_powr_real [asymp_equiv_intros]:
  fixes f g :: "'a \<Rightarrow> real"
  assumes "f \<sim>[F] g" "eventually (\<lambda>x. f x \<ge> 0) F" "eventually (\<lambda>x. g x \<ge> 0) F"
  shows   "(\<lambda>x. f x powr y) \<sim>[F] (\<lambda>x. g x powr y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. f x powr y) \<sim>[F] (\<lambda>x. g x powr y)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>x. f x powr y) \<sim>[F] (\<lambda>x. g x powr y)
[PROOF STEP]
let ?T = "\<lambda>f g x. if f x = 0 \<and> g x = 0 then 1 else f x / g x"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>x. f x powr y) \<sim>[F] (\<lambda>x. g x powr y)
[PROOF STEP]
have "((\<lambda>x. ?T f g x powr y) \<longlongrightarrow> 1 powr y) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. (if f x = 0 \<and> g x = 0 then 1 else f x / g x) powr y) \<longlongrightarrow> 1 powr y) F
[PROOF STEP]
by (intro tendsto_intros asymp_equivD[OF assms(1)]) simp_all
[PROOF STATE]
proof (state)
this:
((\<lambda>x. (if f x = 0 \<and> g x = 0 then 1 else f x / g x) powr y) \<longlongrightarrow> 1 powr y) F

goal (1 subgoal):
 1. (\<lambda>x. f x powr y) \<sim>[F] (\<lambda>x. g x powr y)
[PROOF STEP]
hence "((\<lambda>x. ?T f g x powr y) \<longlongrightarrow> 1) F"
[PROOF STATE]
proof (prove)
using this:
((\<lambda>x. (if f x = 0 \<and> g x = 0 then 1 else f x / g x) powr y) \<longlongrightarrow> 1 powr y) F

goal (1 subgoal):
 1. ((\<lambda>x. (if f x = 0 \<and> g x = 0 then 1 else f x / g x) powr y) \<longlongrightarrow> 1) F
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
((\<lambda>x. (if f x = 0 \<and> g x = 0 then 1 else f x / g x) powr y) \<longlongrightarrow> 1) F

goal (1 subgoal):
 1. (\<lambda>x. f x powr y) \<sim>[F] (\<lambda>x. g x powr y)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
((\<lambda>x. (if f x = 0 \<and> g x = 0 then 1 else f x / g x) powr y) \<longlongrightarrow> 1) F

goal (1 subgoal):
 1. (\<lambda>x. f x powr y) \<sim>[F] (\<lambda>x. g x powr y)
[PROOF STEP]
have "eventually (\<lambda>x. ?T f g x powr y = ?T (\<lambda>x. f x powr y) (\<lambda>x. g x powr y) x) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in F. (if f x = 0 \<and> g x = 0 then 1 else f x / g x) powr y = (if f x powr y = 0 \<and> g x powr y = 0 then 1 else f x powr y / g x powr y)
[PROOF STEP]
using asymp_equiv_eventually_zeros[OF assms(1)] assms(2,3)
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in F. (f x = 0) = (g x = 0)
\<forall>\<^sub>F x in F. 0 \<le> f x
\<forall>\<^sub>F x in F. 0 \<le> g x

goal (1 subgoal):
 1. \<forall>\<^sub>F x in F. (if f x = 0 \<and> g x = 0 then 1 else f x / g x) powr y = (if f x powr y = 0 \<and> g x powr y = 0 then 1 else f x powr y / g x powr y)
[PROOF STEP]
by eventually_elim (auto simp: powr_divide)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in F. (if f x = 0 \<and> g x = 0 then 1 else f x / g x) powr y = (if f x powr y = 0 \<and> g x powr y = 0 then 1 else f x powr y / g x powr y)

goal (1 subgoal):
 1. (\<lambda>x. f x powr y) \<sim>[F] (\<lambda>x. g x powr y)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>x. (if f x = 0 \<and> g x = 0 then 1 else f x / g x) powr y) \<longlongrightarrow> 1) F
\<forall>\<^sub>F x in F. (if f x = 0 \<and> g x = 0 then 1 else f x / g x) powr y = (if f x powr y = 0 \<and> g x powr y = 0 then 1 else f x powr y / g x powr y)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
((\<lambda>x. (if f x = 0 \<and> g x = 0 then 1 else f x / g x) powr y) \<longlongrightarrow> 1) F
\<forall>\<^sub>F x in F. (if f x = 0 \<and> g x = 0 then 1 else f x / g x) powr y = (if f x powr y = 0 \<and> g x powr y = 0 then 1 else f x powr y / g x powr y)

goal (1 subgoal):
 1. (\<lambda>x. f x powr y) \<sim>[F] (\<lambda>x. g x powr y)
[PROOF STEP]
unfolding asymp_equiv_def
[PROOF STATE]
proof (prove)
using this:
((\<lambda>x. (if f x = 0 \<and> g x = 0 then 1 else f x / g x) powr y) \<longlongrightarrow> 1) F
\<forall>\<^sub>F x in F. (if f x = 0 \<and> g x = 0 then 1 else f x / g x) powr y = (if f x powr y = 0 \<and> g x powr y = 0 then 1 else f x powr y / g x powr y)

goal (1 subgoal):
 1. ((\<lambda>x. if f x powr y = 0 \<and> g x powr y = 0 then 1 else f x powr y / g x powr y) \<longlongrightarrow> 1) F
[PROOF STEP]
by (rule Lim_transform_eventually)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. f x powr y) \<sim>[F] (\<lambda>x. g x powr y)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma shuffle_subset_lists:
  assumes "A \<subseteq> lists S" "B \<subseteq> lists S"
  shows "A \<parallel> B \<subseteq> lists S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<parallel> B \<subseteq> lists S
[PROOF STEP]
unfolding Shuffle_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> {shuffles xs ys |xs ys. xs \<in> A \<and> ys \<in> B} \<subseteq> lists S
[PROOF STEP]
proof safe
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x X xa xs ys. \<lbrakk>x \<in> shuffles xs ys; xa \<in> set x; xs \<in> A; ys \<in> B\<rbrakk> \<Longrightarrow> xa \<in> S
[PROOF STEP]
fix x and zs xs ys :: "'a list"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x X xa xs ys. \<lbrakk>x \<in> shuffles xs ys; xa \<in> set x; xs \<in> A; ys \<in> B\<rbrakk> \<Longrightarrow> xa \<in> S
[PROOF STEP]
assume zs: "zs \<in> shuffles xs ys" "x \<in> set zs" and "xs \<in> A" "ys \<in> B"
[PROOF STATE]
proof (state)
this:
zs \<in> shuffles xs ys
x \<in> set zs
xs \<in> A
ys \<in> B

goal (1 subgoal):
 1. \<And>x X xa xs ys. \<lbrakk>x \<in> shuffles xs ys; xa \<in> set x; xs \<in> A; ys \<in> B\<rbrakk> \<Longrightarrow> xa \<in> S
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
A \<subseteq> lists S
B \<subseteq> lists S
zs \<in> shuffles xs ys
x \<in> set zs
xs \<in> A
ys \<in> B
[PROOF STEP]
have "xs \<in> lists S" "ys \<in> lists S"
[PROOF STATE]
proof (prove)
using this:
A \<subseteq> lists S
B \<subseteq> lists S
zs \<in> shuffles xs ys
x \<in> set zs
xs \<in> A
ys \<in> B

goal (1 subgoal):
 1. xs \<in> lists S &&& ys \<in> lists S
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
xs \<in> lists S
ys \<in> lists S

goal (1 subgoal):
 1. \<And>x X xa xs ys. \<lbrakk>x \<in> shuffles xs ys; xa \<in> set x; xs \<in> A; ys \<in> B\<rbrakk> \<Longrightarrow> xa \<in> S
[PROOF STEP]
with zs
[PROOF STATE]
proof (chain)
picking this:
zs \<in> shuffles xs ys
x \<in> set zs
xs \<in> lists S
ys \<in> lists S
[PROOF STEP]
show "x \<in> S"
[PROOF STATE]
proof (prove)
using this:
zs \<in> shuffles xs ys
x \<in> set zs
xs \<in> lists S
ys \<in> lists S

goal (1 subgoal):
 1. x \<in> S
[PROOF STEP]
by (induct xs ys arbitrary: zs rule: shuffles.induct) auto
[PROOF STATE]
proof (state)
this:
x \<in> S

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fps_unit_factor_mult':
  fixes   f g :: "'a::{comm_monoid_add,mult_zero} fps"
  assumes "f $ subdegree f * g $ subdegree g \<noteq> 0"
  shows   "unit_factor (f * g) = unit_factor f * unit_factor g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unit_factor (f * g) = unit_factor f * unit_factor g
[PROOF STEP]
using   assms
[PROOF STATE]
proof (prove)
using this:
f $ subdegree f * g $ subdegree g \<noteq> (0::'a)

goal (1 subgoal):
 1. unit_factor (f * g) = unit_factor f * unit_factor g
[PROOF STEP]
by      (simp add: subdegree_mult' fps_shift_mult_both)


[STATEMENT]
lemma univalent_d_in_forest_modulo_equivalence:
  assumes "forest_modulo_equivalence x d"
  shows "univalent d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. coreflexive (d[[d]])
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. coreflexive (d[[d]])
[PROOF STEP]
have "d\<^sup>T * d \<le> d\<^sup>T * x\<^sup>T * x * d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d[[d]] \<le> (d[[x\<^sup>T]]) * x * d
[PROOF STEP]
using assms(1) forest_modulo_equivalence_def comp_isotone comp_right_one mult_sub_right_one
[PROOF STATE]
proof (prove)
using this:
forest_modulo_equivalence x d
forest_modulo_equivalence ?x ?d \<equiv> equivalence ?x \<and> coreflexive (?x * ?d[[?x * ?d]]) \<and> coreflexive (?x \<sqinter> ?d * ?d\<^sup>T) \<and> (?x * ?d)\<^sup>+ \<sqinter> ?x \<le> bot
\<lbrakk>?x \<le> ?y; ?w \<le> ?z\<rbrakk> \<Longrightarrow> ?x * ?w \<le> ?y * ?z
?x * (1::'a) = ?x
?x \<le> ?x * (1::'a)

goal (1 subgoal):
 1. d[[d]] \<le> (d[[x\<^sup>T]]) * x * d
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
d[[d]] \<le> (d[[x\<^sup>T]]) * x * d

goal (1 subgoal):
 1. coreflexive (d[[d]])
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
d[[d]] \<le> (d[[x\<^sup>T]]) * x * d

goal (1 subgoal):
 1. coreflexive (d[[d]])
[PROOF STEP]
have "... \<le> 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. coreflexive ((d[[x\<^sup>T]]) * x * d)
[PROOF STEP]
using assms(1) forest_modulo_equivalence_def comp_associative conv_dist_comp
[PROOF STATE]
proof (prove)
using this:
forest_modulo_equivalence x d
forest_modulo_equivalence ?x ?d \<equiv> equivalence ?x \<and> coreflexive (?x * ?d[[?x * ?d]]) \<and> coreflexive (?x \<sqinter> ?d * ?d\<^sup>T) \<and> (?x * ?d)\<^sup>+ \<sqinter> ?x \<le> bot
?x * ?y * ?z = ?x * (?y * ?z)
(?x * ?y)\<^sup>T = ?y[[?x\<^sup>T]]

goal (1 subgoal):
 1. coreflexive ((d[[x\<^sup>T]]) * x * d)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
coreflexive ((d[[x\<^sup>T]]) * x * d)

goal (1 subgoal):
 1. coreflexive (d[[d]])
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
coreflexive (d[[d]])
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
coreflexive (d[[d]])

goal (1 subgoal):
 1. coreflexive (d[[d]])
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
coreflexive (d[[d]])

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma rtos_rs_Tr1:"\<lbrakk>(0::nat) < r; 0 < s \<rbrakk> \<Longrightarrow> rtos r s (r * s) = r * s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < r; 0 < s\<rbrakk> \<Longrightarrow> rtos r s (r * s) = r * s
[PROOF STEP]
apply (simp add:rtos_def)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma matching_rels_if_no_cross: "\<lbrakk>\<forall>r. t \<noteq> Relation r; no_cross_products t\<rbrakk> \<Longrightarrow> matching_rels t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>r. t \<noteq> Relation r; no_cross_products t\<rbrakk> \<Longrightarrow> matching_rels t
[PROOF STEP]
unfolding matching_rels_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>r. t \<noteq> Relation r; no_cross_products t\<rbrakk> \<Longrightarrow> relations t \<subseteq> verts G
[PROOF STEP]
by(induction t) fastforce+


[STATEMENT]
lemma measurable_on_compose_continuous_0:
   assumes f: "f measurable_on S" and g: "continuous_on UNIV g" and "g 0 = 0"
   shows "(g \<circ> f) measurable_on S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g \<circ> f measurable_on S
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. g \<circ> f measurable_on S
[PROOF STEP]
have f': "(\<lambda>x. if x \<in> S then f x else 0) measurable_on UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. if x \<in> S then f x else (0::'b)) measurable_on UNIV
[PROOF STEP]
using f measurable_on_UNIV
[PROOF STATE]
proof (prove)
using this:
f measurable_on S
((\<lambda>x. if x \<in> ?S then ?f x else (0::?'b)) measurable_on UNIV) = (?f measurable_on ?S)

goal (1 subgoal):
 1. (\<lambda>x. if x \<in> S then f x else (0::'b)) measurable_on UNIV
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<lambda>x. if x \<in> S then f x else (0::'b)) measurable_on UNIV

goal (1 subgoal):
 1. g \<circ> f measurable_on S
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g \<circ> f measurable_on S
[PROOF STEP]
using measurable_on_compose_continuous [OF f' g]
[PROOF STATE]
proof (prove)
using this:
g \<circ> (\<lambda>x. if x \<in> S then f x else (0::'b)) measurable_on UNIV

goal (1 subgoal):
 1. g \<circ> f measurable_on S
[PROOF STEP]
by (simp add: measurable_on_UNIV o_def if_distrib \<open>g 0 = 0\<close> cong: if_cong)
[PROOF STATE]
proof (state)
this:
g \<circ> f measurable_on S

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem bound_main_lemma_reachability_s:
  fixes PROB :: "'a problem" and s
  assumes "finite PROB" "s \<in> valid_states PROB"
  shows "(problem_plan_bound_s PROB s < card (reachable_s PROB s))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. problem_plan_bound_s PROB s < card (reachable_s PROB s)
[PROOF STEP]
proof -
  \<comment> \<open>NOTE derive premise for MP of 'bound\_child\_parent\_lemma\_s\_2'.\<close>
  \<comment> \<open>NOTE type of `s` had to be fixed (warning in assumption declaration).\<close>
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. problem_plan_bound_s PROB s < card (reachable_s PROB s)
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. problem_plan_bound_s PROB s < card (reachable_s PROB s)
[PROOF STEP]
fix PROB :: "'a problem" and s :: "'a state" and as
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. problem_plan_bound_s PROB s < card (reachable_s PROB s)
[PROOF STEP]
assume P1: "finite PROB" "s \<in> valid_states PROB" "as \<in> valid_plans PROB"
[PROOF STATE]
proof (state)
this:
finite PROB
s \<in> valid_states PROB
as \<in> valid_plans PROB

goal (1 subgoal):
 1. problem_plan_bound_s PROB s < card (reachable_s PROB s)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite PROB
s \<in> valid_states PROB
as \<in> valid_plans PROB
[PROOF STEP]
obtain as' where a: "exec_plan s as = exec_plan s as'" "subseq as' as"
      "length as' \<le> card (reachable_s PROB s) - 1"
[PROOF STATE]
proof (prove)
using this:
finite PROB
s \<in> valid_states PROB
as \<in> valid_plans PROB

goal (1 subgoal):
 1. (\<And>as'. \<lbrakk>exec_plan s as = exec_plan s as'; subseq as' as; length as' \<le> card (reachable_s PROB s) - 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using P1 main_lemma_reachability_s
[PROOF STATE]
proof (prove)
using this:
finite PROB
s \<in> valid_states PROB
as \<in> valid_plans PROB
finite PROB
s \<in> valid_states PROB
as \<in> valid_plans PROB
\<lbrakk>finite ?PROB; ?s \<in> valid_states ?PROB; ?as \<in> valid_plans ?PROB\<rbrakk> \<Longrightarrow> \<exists>as'. exec_plan ?s ?as = exec_plan ?s as' \<and> subseq as' ?as \<and> length as' \<le> card (reachable_s ?PROB ?s) - 1

goal (1 subgoal):
 1. (\<And>as'. \<lbrakk>exec_plan s as = exec_plan s as'; subseq as' as; length as' \<le> card (reachable_s PROB s) - 1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
exec_plan s as = exec_plan s as'
subseq as' as
length as' \<le> card (reachable_s PROB s) - 1

goal (1 subgoal):
 1. problem_plan_bound_s PROB s < card (reachable_s PROB s)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
exec_plan s as = exec_plan s as'
subseq as' as
length as' \<le> card (reachable_s PROB s) - 1
[PROOF STEP]
have "length as' < card (reachable_s PROB s)"
[PROOF STATE]
proof (prove)
using this:
exec_plan s as = exec_plan s as'
subseq as' as
length as' \<le> card (reachable_s PROB s) - 1

goal (1 subgoal):
 1. length as' < card (reachable_s PROB s)
[PROOF STEP]
using P1(1, 2) card_reachable_s_non_zero
[PROOF STATE]
proof (prove)
using this:
exec_plan s as = exec_plan s as'
subseq as' as
length as' \<le> card (reachable_s PROB s) - 1
finite PROB
s \<in> valid_states PROB
\<lbrakk>finite ?PROB; ?s \<in> valid_states ?PROB\<rbrakk> \<Longrightarrow> 0 < card (reachable_s ?PROB ?s)

goal (1 subgoal):
 1. length as' < card (reachable_s PROB s)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
length as' < card (reachable_s PROB s)

goal (1 subgoal):
 1. problem_plan_bound_s PROB s < card (reachable_s PROB s)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
length as' < card (reachable_s PROB s)
[PROOF STEP]
have "(\<exists>as'.
      exec_plan s as = exec_plan s as' \<and> subseq as' as \<and> length as' < card (reachable_s PROB s))
    "
[PROOF STATE]
proof (prove)
using this:
length as' < card (reachable_s PROB s)

goal (1 subgoal):
 1. \<exists>as'. exec_plan s as = exec_plan s as' \<and> subseq as' as \<and> length as' < card (reachable_s PROB s)
[PROOF STEP]
using a
[PROOF STATE]
proof (prove)
using this:
length as' < card (reachable_s PROB s)
exec_plan s as = exec_plan s as'
subseq as' as
length as' \<le> card (reachable_s PROB s) - 1

goal (1 subgoal):
 1. \<exists>as'. exec_plan s as = exec_plan s as' \<and> subseq as' as \<and> length as' < card (reachable_s PROB s)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>as'. exec_plan s as = exec_plan s as' \<and> subseq as' as \<and> length as' < card (reachable_s PROB s)

goal (1 subgoal):
 1. problem_plan_bound_s PROB s < card (reachable_s PROB s)
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<lbrakk>finite ?PROBa2; ?sa2 \<in> valid_states ?PROBa2; ?as2 \<in> valid_plans ?PROBa2\<rbrakk> \<Longrightarrow> \<exists>as'. exec_plan ?sa2 ?as2 = exec_plan ?sa2 as' \<and> subseq as' ?as2 \<and> length as' < card (reachable_s ?PROBa2 ?sa2)

goal (1 subgoal):
 1. problem_plan_bound_s PROB s < card (reachable_s PROB s)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>finite ?PROBa2; ?sa2 \<in> valid_states ?PROBa2; ?as2 \<in> valid_plans ?PROBa2\<rbrakk> \<Longrightarrow> \<exists>as'. exec_plan ?sa2 ?as2 = exec_plan ?sa2 as' \<and> subseq as' ?as2 \<and> length as' < card (reachable_s ?PROBa2 ?sa2)
[PROOF STEP]
have "
    finite PROB \<and> True \<and> s \<in> valid_states PROB
    \<longrightarrow> problem_plan_bound_s PROB s < card (reachable_s PROB s)
  "
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>finite ?PROBa2; ?sa2 \<in> valid_states ?PROBa2; ?as2 \<in> valid_plans ?PROBa2\<rbrakk> \<Longrightarrow> \<exists>as'. exec_plan ?sa2 ?as2 = exec_plan ?sa2 as' \<and> subseq as' ?as2 \<and> length as' < card (reachable_s ?PROBa2 ?sa2)

goal (1 subgoal):
 1. finite PROB \<and> True \<and> s \<in> valid_states PROB \<longrightarrow> problem_plan_bound_s PROB s < card (reachable_s PROB s)
[PROOF STEP]
using bound_child_parent_lemma_s_2[where PROB = PROB and P = "\<lambda>_. True" and s = s
        and f = "\<lambda>PROB s. card (reachable_s PROB s)"]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>finite ?PROBa2; ?sa2 \<in> valid_states ?PROBa2; ?as2 \<in> valid_plans ?PROBa2\<rbrakk> \<Longrightarrow> \<exists>as'. exec_plan ?sa2 ?as2 = exec_plan ?sa2 as' \<and> subseq as' ?as2 \<and> length as' < card (reachable_s ?PROBa2 ?sa2)
\<forall>PROB as s. finite PROB \<and> True \<and> s \<in> valid_states PROB \<and> as \<in> valid_plans PROB \<longrightarrow> (\<exists>as'. exec_plan s as = exec_plan s as' \<and> subseq as' as \<and> length as' < card (reachable_s PROB s)) \<Longrightarrow> finite PROB \<and> True \<and> s \<in> valid_states PROB \<longrightarrow> problem_plan_bound_s PROB s < card (reachable_s PROB s)

goal (1 subgoal):
 1. finite PROB \<and> True \<and> s \<in> valid_states PROB \<longrightarrow> problem_plan_bound_s PROB s < card (reachable_s PROB s)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
finite PROB \<and> True \<and> s \<in> valid_states PROB \<longrightarrow> problem_plan_bound_s PROB s < card (reachable_s PROB s)

goal (1 subgoal):
 1. problem_plan_bound_s PROB s < card (reachable_s PROB s)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite PROB \<and> True \<and> s \<in> valid_states PROB \<longrightarrow> problem_plan_bound_s PROB s < card (reachable_s PROB s)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
finite PROB \<and> True \<and> s \<in> valid_states PROB \<longrightarrow> problem_plan_bound_s PROB s < card (reachable_s PROB s)

goal (1 subgoal):
 1. problem_plan_bound_s PROB s < card (reachable_s PROB s)
[PROOF STEP]
using assms(1, 2)
[PROOF STATE]
proof (prove)
using this:
finite PROB \<and> True \<and> s \<in> valid_states PROB \<longrightarrow> problem_plan_bound_s PROB s < card (reachable_s PROB s)
finite PROB
s \<in> valid_states PROB

goal (1 subgoal):
 1. problem_plan_bound_s PROB s < card (reachable_s PROB s)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
problem_plan_bound_s PROB s < card (reachable_s PROB s)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma irreducible_multD:
  assumes l: "irreducible (a*b)"
  shows "a dvd 1 \<and> irreducible b \<or> b dvd 1 \<and> irreducible a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a dvd (1::'a) \<and> irreducible b \<or> b dvd (1::'a) \<and> irreducible a
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. a dvd (1::'a) \<and> irreducible b \<or> b dvd (1::'a) \<and> irreducible a
[PROOF STEP]
from l
[PROOF STATE]
proof (chain)
picking this:
irreducible (a * b)
[PROOF STEP]
have "a dvd 1 \<or> b dvd 1"
[PROOF STATE]
proof (prove)
using this:
irreducible (a * b)

goal (1 subgoal):
 1. a dvd (1::'a) \<or> b dvd (1::'a)
[PROOF STEP]
using irreducibleD
[PROOF STATE]
proof (prove)
using this:
irreducible (a * b)
\<lbrakk>irreducible ?p; ?p = ?a * ?b\<rbrakk> \<Longrightarrow> ?a dvd (1::'a) \<or> ?b dvd (1::'a)

goal (1 subgoal):
 1. a dvd (1::'a) \<or> b dvd (1::'a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a dvd (1::'a) \<or> b dvd (1::'a)

goal (1 subgoal):
 1. a dvd (1::'a) \<and> irreducible b \<or> b dvd (1::'a) \<and> irreducible a
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a dvd (1::'a) \<or> b dvd (1::'a)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
a dvd (1::'a) \<or> b dvd (1::'a)

goal (1 subgoal):
 1. a dvd (1::'a) \<and> irreducible b \<or> b dvd (1::'a) \<and> irreducible a
[PROOF STEP]
proof(elim disjE)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. a dvd (1::'a) \<Longrightarrow> a dvd (1::'a) \<and> irreducible b \<or> b dvd (1::'a) \<and> irreducible a
 2. b dvd (1::'a) \<Longrightarrow> a dvd (1::'a) \<and> irreducible b \<or> b dvd (1::'a) \<and> irreducible a
[PROOF STEP]
assume a: "a dvd 1"
[PROOF STATE]
proof (state)
this:
a dvd (1::'a)

goal (2 subgoals):
 1. a dvd (1::'a) \<Longrightarrow> a dvd (1::'a) \<and> irreducible b \<or> b dvd (1::'a) \<and> irreducible a
 2. b dvd (1::'a) \<Longrightarrow> a dvd (1::'a) \<and> irreducible b \<or> b dvd (1::'a) \<and> irreducible a
[PROOF STEP]
with l
[PROOF STATE]
proof (chain)
picking this:
irreducible (a * b)
a dvd (1::'a)
[PROOF STEP]
have "irreducible b"
[PROOF STATE]
proof (prove)
using this:
irreducible (a * b)
a dvd (1::'a)

goal (1 subgoal):
 1. irreducible b
[PROOF STEP]
unfolding irreducible_def
[PROOF STATE]
proof (prove)
using this:
a * b \<noteq> (0::'a) \<and> \<not> a * b dvd (1::'a) \<and> (\<forall>aa ba. a * b = aa * ba \<longrightarrow> aa dvd (1::'a) \<or> ba dvd (1::'a))
a dvd (1::'a)

goal (1 subgoal):
 1. b \<noteq> (0::'a) \<and> \<not> b dvd (1::'a) \<and> (\<forall>a ba. b = a * ba \<longrightarrow> a dvd (1::'a) \<or> ba dvd (1::'a))
[PROOF STEP]
by (metis is_unit_mult_iff mult.left_commute mult_not_zero)
[PROOF STATE]
proof (state)
this:
irreducible b

goal (2 subgoals):
 1. a dvd (1::'a) \<Longrightarrow> a dvd (1::'a) \<and> irreducible b \<or> b dvd (1::'a) \<and> irreducible a
 2. b dvd (1::'a) \<Longrightarrow> a dvd (1::'a) \<and> irreducible b \<or> b dvd (1::'a) \<and> irreducible a
[PROOF STEP]
with a
[PROOF STATE]
proof (chain)
picking this:
a dvd (1::'a)
irreducible b
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
a dvd (1::'a)
irreducible b

goal (1 subgoal):
 1. a dvd (1::'a) \<and> irreducible b \<or> b dvd (1::'a) \<and> irreducible a
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a dvd (1::'a) \<and> irreducible b \<or> b dvd (1::'a) \<and> irreducible a

goal (1 subgoal):
 1. b dvd (1::'a) \<Longrightarrow> a dvd (1::'a) \<and> irreducible b \<or> b dvd (1::'a) \<and> irreducible a
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. b dvd (1::'a) \<Longrightarrow> a dvd (1::'a) \<and> irreducible b \<or> b dvd (1::'a) \<and> irreducible a
[PROOF STEP]
assume a: "b dvd 1"
[PROOF STATE]
proof (state)
this:
b dvd (1::'a)

goal (1 subgoal):
 1. b dvd (1::'a) \<Longrightarrow> a dvd (1::'a) \<and> irreducible b \<or> b dvd (1::'a) \<and> irreducible a
[PROOF STEP]
with l
[PROOF STATE]
proof (chain)
picking this:
irreducible (a * b)
b dvd (1::'a)
[PROOF STEP]
have "irreducible a"
[PROOF STATE]
proof (prove)
using this:
irreducible (a * b)
b dvd (1::'a)

goal (1 subgoal):
 1. irreducible a
[PROOF STEP]
unfolding irreducible_def
[PROOF STATE]
proof (prove)
using this:
a * b \<noteq> (0::'a) \<and> \<not> a * b dvd (1::'a) \<and> (\<forall>aa ba. a * b = aa * ba \<longrightarrow> aa dvd (1::'a) \<or> ba dvd (1::'a))
b dvd (1::'a)

goal (1 subgoal):
 1. a \<noteq> (0::'a) \<and> \<not> a dvd (1::'a) \<and> (\<forall>aa b. a = aa * b \<longrightarrow> aa dvd (1::'a) \<or> b dvd (1::'a))
[PROOF STEP]
by (meson is_unit_mult_iff mult_not_zero semiring_normalization_rules(16))
[PROOF STATE]
proof (state)
this:
irreducible a

goal (1 subgoal):
 1. b dvd (1::'a) \<Longrightarrow> a dvd (1::'a) \<and> irreducible b \<or> b dvd (1::'a) \<and> irreducible a
[PROOF STEP]
with a
[PROOF STATE]
proof (chain)
picking this:
b dvd (1::'a)
irreducible a
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
b dvd (1::'a)
irreducible a

goal (1 subgoal):
 1. a dvd (1::'a) \<and> irreducible b \<or> b dvd (1::'a) \<and> irreducible a
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a dvd (1::'a) \<and> irreducible b \<or> b dvd (1::'a) \<and> irreducible a

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
a dvd (1::'a) \<and> irreducible b \<or> b dvd (1::'a) \<and> irreducible a

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma le_replicateI: "\<forall>x\<in>set xs. x \<le> b \<Longrightarrow> xs \<le>\<^sub>v replicate (length xs) b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<in>set xs. x \<le> b \<Longrightarrow> xs \<le>\<^sub>v replicate (length xs) b
[PROOF STEP]
by (induct xs) (auto simp: le_Cons)


[STATEMENT]
lemma rev_path_eq: "rev_path p = rev_path q \<longleftrightarrow> p = q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (rev_path p = rev_path q) = (p = q)
[PROOF STEP]
by (metis rev_path_rev_path)


[STATEMENT]
lemma inverse_Real:
  "cauchy X \<Longrightarrow> inverse (Real X) = (if vanishes X then 0 else Real (\<lambda>n. inverse (X n)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cauchy X \<Longrightarrow> inverse (Real X) = (if vanishes X then 0 else Real (\<lambda>n. inverse (X n)))
[PROOF STEP]
using inverse_real.transfer zero_real.transfer
[PROOF STATE]
proof (prove)
using this:
rel_fun pcr_real pcr_real (\<lambda>X. if vanishes X then \<lambda>n. 0 else (\<lambda>n. inverse (X n))) inverse
pcr_real (\<lambda>n. 0) 0

goal (1 subgoal):
 1. cauchy X \<Longrightarrow> inverse (Real X) = (if vanishes X then 0 else Real (\<lambda>n. inverse (X n)))
[PROOF STEP]
unfolding cr_real_eq rel_fun_def
[PROOF STATE]
proof (prove)
using this:
\<forall>x y. cauchy x \<and> Real x = y \<longrightarrow> cauchy (if vanishes x then \<lambda>n. 0 else (\<lambda>n. inverse (x n))) \<and> Real (if vanishes x then \<lambda>n. 0 else (\<lambda>n. inverse (x n))) = inverse y
cauchy (\<lambda>n. 0) \<and> Real (\<lambda>n. 0) = 0

goal (1 subgoal):
 1. cauchy X \<Longrightarrow> inverse (Real X) = (if vanishes X then 0 else Real (\<lambda>n. inverse (X n)))
[PROOF STEP]
by (simp split: if_split_asm, metis)


[STATEMENT]
lemma fill_holes_arbitrary:
  assumes lCs: "length Cs = length ts"
    and lss: "length ss = length ts"
    and rec: "\<And> i. i < length ts \<Longrightarrow> num_holes (Cs ! i) = length (ss ! i) \<and> f (Cs ! i) (ss ! i) = ts ! i"
  shows "map (\<lambda>i. f (Cs ! i) (partition_holes (concat ss) Cs ! i)) [0 ..< length Cs] = ts"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map (\<lambda>i. f (Cs ! i) (partition_holes (concat ss) Cs ! i)) [0..<length Cs] = ts
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. map (\<lambda>i. f (Cs ! i) (partition_holes (concat ss) Cs ! i)) [0..<length Cs] = ts
[PROOF STEP]
have "sum_list (map num_holes Cs) = length (concat ss)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum_list (map num_holes Cs) = length (concat ss)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
length Cs = length ts
length ss = length ts
?i < length ts \<Longrightarrow> num_holes (Cs ! ?i) = length (ss ! ?i) \<and> f (Cs ! ?i) (ss ! ?i) = ts ! ?i

goal (1 subgoal):
 1. sum_list (map num_holes Cs) = length (concat ss)
[PROOF STEP]
by (auto simp: length_concat map_nth_eq_conv intro: arg_cong[of _ _ "sum_list"])
[PROOF STATE]
proof (state)
this:
sum_list (map num_holes Cs) = length (concat ss)

goal (1 subgoal):
 1. map (\<lambda>i. f (Cs ! i) (partition_holes (concat ss) Cs ! i)) [0..<length Cs] = ts
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
sum_list (map num_holes Cs) = length (concat ss)

goal (1 subgoal):
 1. map (\<lambda>i. f (Cs ! i) (partition_holes (concat ss) Cs ! i)) [0..<length Cs] = ts
[PROOF STEP]
have "partition_holes (concat ss) Cs = ss"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. partition_holes (concat ss) Cs = ss
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
length Cs = length ts
length ss = length ts
?i < length ts \<Longrightarrow> num_holes (Cs ! ?i) = length (ss ! ?i) \<and> f (Cs ! ?i) (ss ! ?i) = ts ! ?i

goal (1 subgoal):
 1. partition_holes (concat ss) Cs = ss
[PROOF STEP]
by (auto intro: partition_by_concat_id)
[PROOF STATE]
proof (state)
this:
partition_holes (concat ss) Cs = ss

goal (1 subgoal):
 1. map (\<lambda>i. f (Cs ! i) (partition_holes (concat ss) Cs ! i)) [0..<length Cs] = ts
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
sum_list (map num_holes Cs) = length (concat ss)
partition_holes (concat ss) Cs = ss
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
sum_list (map num_holes Cs) = length (concat ss)
partition_holes (concat ss) Cs = ss

goal (1 subgoal):
 1. map (\<lambda>i. f (Cs ! i) (partition_holes (concat ss) Cs ! i)) [0..<length Cs] = ts
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
sum_list (map num_holes Cs) = length (concat ss)
partition_holes (concat ss) Cs = ss
length Cs = length ts
length ss = length ts
?i < length ts \<Longrightarrow> num_holes (Cs ! ?i) = length (ss ! ?i) \<and> f (Cs ! ?i) (ss ! ?i) = ts ! ?i

goal (1 subgoal):
 1. map (\<lambda>i. f (Cs ! i) (partition_holes (concat ss) Cs ! i)) [0..<length Cs] = ts
[PROOF STEP]
by (auto intro: nth_equalityI)
[PROOF STATE]
proof (state)
this:
map (\<lambda>i. f (Cs ! i) (partition_holes (concat ss) Cs ! i)) [0..<length Cs] = ts

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma mem_interior_convex_shrink:
  fixes S :: "'a::euclidean_space set"
  assumes "convex S"
    and "c \<in> interior S"
    and "x \<in> S"
    and "0 < e"
    and "e \<le> 1"
  shows "x - e *\<^sub>R (x - c) \<in> interior S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x - e *\<^sub>R (x - c) \<in> interior S
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x - e *\<^sub>R (x - c) \<in> interior S
[PROOF STEP]
obtain d where "d > 0" and d: "ball c d \<subseteq> S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>d. \<lbrakk>0 < d; ball c d \<subseteq> S\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms(2)
[PROOF STATE]
proof (prove)
using this:
c \<in> interior S

goal (1 subgoal):
 1. (\<And>d. \<lbrakk>0 < d; ball c d \<subseteq> S\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding mem_interior
[PROOF STATE]
proof (prove)
using this:
\<exists>e>0. ball c e \<subseteq> S

goal (1 subgoal):
 1. (\<And>d. \<lbrakk>0 < d; ball c d \<subseteq> S\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 < d
ball c d \<subseteq> S

goal (1 subgoal):
 1. x - e *\<^sub>R (x - c) \<in> interior S
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x - e *\<^sub>R (x - c) \<in> interior S
[PROOF STEP]
unfolding mem_interior
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>ea>0. ball (x - e *\<^sub>R (x - c)) ea \<subseteq> S
[PROOF STEP]
proof (intro exI subsetI conjI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. 0 < ?e
 2. \<And>xa. xa \<in> ball (x - e *\<^sub>R (x - c)) ?e \<Longrightarrow> xa \<in> S
[PROOF STEP]
fix y
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. 0 < ?e
 2. \<And>xa. xa \<in> ball (x - e *\<^sub>R (x - c)) ?e \<Longrightarrow> xa \<in> S
[PROOF STEP]
assume "y \<in> ball (x - e *\<^sub>R (x - c)) (e*d)"
[PROOF STATE]
proof (state)
this:
y \<in> ball (x - e *\<^sub>R (x - c)) (e * d)

goal (2 subgoals):
 1. 0 < ?e
 2. \<And>xa. xa \<in> ball (x - e *\<^sub>R (x - c)) ?e \<Longrightarrow> xa \<in> S
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
y \<in> ball (x - e *\<^sub>R (x - c)) (e * d)
[PROOF STEP]
have as: "dist (x - e *\<^sub>R (x - c)) y < e * d"
[PROOF STATE]
proof (prove)
using this:
y \<in> ball (x - e *\<^sub>R (x - c)) (e * d)

goal (1 subgoal):
 1. dist (x - e *\<^sub>R (x - c)) y < e * d
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
dist (x - e *\<^sub>R (x - c)) y < e * d

goal (2 subgoals):
 1. 0 < ?e
 2. \<And>xa. xa \<in> ball (x - e *\<^sub>R (x - c)) ?e \<Longrightarrow> xa \<in> S
[PROOF STEP]
have *: "y = (1 - (1 - e)) *\<^sub>R ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) + (1 - e) *\<^sub>R x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y = (1 - (1 - e)) *\<^sub>R ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) + (1 - e) *\<^sub>R x
[PROOF STEP]
using \<open>e > 0\<close>
[PROOF STATE]
proof (prove)
using this:
0 < e

goal (1 subgoal):
 1. y = (1 - (1 - e)) *\<^sub>R ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) + (1 - e) *\<^sub>R x
[PROOF STEP]
by (auto simp add: scaleR_left_diff_distrib scaleR_right_diff_distrib)
[PROOF STATE]
proof (state)
this:
y = (1 - (1 - e)) *\<^sub>R ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) + (1 - e) *\<^sub>R x

goal (2 subgoals):
 1. 0 < ?e
 2. \<And>xa. xa \<in> ball (x - e *\<^sub>R (x - c)) ?e \<Longrightarrow> xa \<in> S
[PROOF STEP]
have "c - ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) = (1 / e) *\<^sub>R (e *\<^sub>R c - y + (1 - e) *\<^sub>R x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c - ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) = (1 / e) *\<^sub>R (e *\<^sub>R c - y + (1 - e) *\<^sub>R x)
[PROOF STEP]
using \<open>e > 0\<close>
[PROOF STATE]
proof (prove)
using this:
0 < e

goal (1 subgoal):
 1. c - ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) = (1 / e) *\<^sub>R (e *\<^sub>R c - y + (1 - e) *\<^sub>R x)
[PROOF STEP]
by (auto simp add: euclidean_eq_iff[where 'a='a] field_simps inner_simps)
[PROOF STATE]
proof (state)
this:
c - ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) = (1 / e) *\<^sub>R (e *\<^sub>R c - y + (1 - e) *\<^sub>R x)

goal (2 subgoals):
 1. 0 < ?e
 2. \<And>xa. xa \<in> ball (x - e *\<^sub>R (x - c)) ?e \<Longrightarrow> xa \<in> S
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
c - ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) = (1 / e) *\<^sub>R (e *\<^sub>R c - y + (1 - e) *\<^sub>R x)
[PROOF STEP]
have "dist c ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) = \<bar>1/e\<bar> * norm (e *\<^sub>R c - y + (1 - e) *\<^sub>R x)"
[PROOF STATE]
proof (prove)
using this:
c - ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) = (1 / e) *\<^sub>R (e *\<^sub>R c - y + (1 - e) *\<^sub>R x)

goal (1 subgoal):
 1. dist c ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) = \<bar>1 / e\<bar> * norm (e *\<^sub>R c - y + (1 - e) *\<^sub>R x)
[PROOF STEP]
by (simp add: dist_norm)
[PROOF STATE]
proof (state)
this:
dist c ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) = \<bar>1 / e\<bar> * norm (e *\<^sub>R c - y + (1 - e) *\<^sub>R x)

goal (2 subgoals):
 1. 0 < ?e
 2. \<And>xa. xa \<in> ball (x - e *\<^sub>R (x - c)) ?e \<Longrightarrow> xa \<in> S
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
dist c ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) = \<bar>1 / e\<bar> * norm (e *\<^sub>R c - y + (1 - e) *\<^sub>R x)

goal (2 subgoals):
 1. 0 < ?e
 2. \<And>xa. xa \<in> ball (x - e *\<^sub>R (x - c)) ?e \<Longrightarrow> xa \<in> S
[PROOF STEP]
have "\<dots> = \<bar>1/e\<bar> * norm (x - e *\<^sub>R (x - c) - y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>1 / e\<bar> * norm (e *\<^sub>R c - y + (1 - e) *\<^sub>R x) = \<bar>1 / e\<bar> * norm (x - e *\<^sub>R (x - c) - y)
[PROOF STEP]
by (auto intro!:arg_cong[where f=norm] simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
\<bar>1 / e\<bar> * norm (e *\<^sub>R c - y + (1 - e) *\<^sub>R x) = \<bar>1 / e\<bar> * norm (x - e *\<^sub>R (x - c) - y)

goal (2 subgoals):
 1. 0 < ?e
 2. \<And>xa. xa \<in> ball (x - e *\<^sub>R (x - c)) ?e \<Longrightarrow> xa \<in> S
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<bar>1 / e\<bar> * norm (e *\<^sub>R c - y + (1 - e) *\<^sub>R x) = \<bar>1 / e\<bar> * norm (x - e *\<^sub>R (x - c) - y)

goal (2 subgoals):
 1. 0 < ?e
 2. \<And>xa. xa \<in> ball (x - e *\<^sub>R (x - c)) ?e \<Longrightarrow> xa \<in> S
[PROOF STEP]
have "\<dots> < d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>1 / e\<bar> * norm (x - e *\<^sub>R (x - c) - y) < d
[PROOF STEP]
using as[unfolded dist_norm] and \<open>e > 0\<close>
[PROOF STATE]
proof (prove)
using this:
norm (x - e *\<^sub>R (x - c) - y) < e * d
0 < e

goal (1 subgoal):
 1. \<bar>1 / e\<bar> * norm (x - e *\<^sub>R (x - c) - y) < d
[PROOF STEP]
by (auto simp add:pos_divide_less_eq[OF \<open>e > 0\<close>] mult.commute)
[PROOF STATE]
proof (state)
this:
\<bar>1 / e\<bar> * norm (x - e *\<^sub>R (x - c) - y) < d

goal (2 subgoals):
 1. 0 < ?e
 2. \<And>xa. xa \<in> ball (x - e *\<^sub>R (x - c)) ?e \<Longrightarrow> xa \<in> S
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
dist c ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) < d
[PROOF STEP]
have "(1 - (1 - e)) *\<^sub>R ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) + (1 - e) *\<^sub>R x \<in> S"
[PROOF STATE]
proof (prove)
using this:
dist c ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) < d

goal (1 subgoal):
 1. (1 - (1 - e)) *\<^sub>R ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) + (1 - e) *\<^sub>R x \<in> S
[PROOF STEP]
using assms(3-5) d
[PROOF STATE]
proof (prove)
using this:
dist c ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) < d
x \<in> S
0 < e
e \<le> 1
ball c d \<subseteq> S

goal (1 subgoal):
 1. (1 - (1 - e)) *\<^sub>R ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) + (1 - e) *\<^sub>R x \<in> S
[PROOF STEP]
by (intro convexD_alt [OF \<open>convex S\<close>]) (auto intro: convexD_alt [OF \<open>convex S\<close>])
[PROOF STATE]
proof (state)
this:
(1 - (1 - e)) *\<^sub>R ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) + (1 - e) *\<^sub>R x \<in> S

goal (2 subgoals):
 1. 0 < ?e
 2. \<And>xa. xa \<in> ball (x - e *\<^sub>R (x - c)) ?e \<Longrightarrow> xa \<in> S
[PROOF STEP]
with \<open>e > 0\<close>
[PROOF STATE]
proof (chain)
picking this:
0 < e
(1 - (1 - e)) *\<^sub>R ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) + (1 - e) *\<^sub>R x \<in> S
[PROOF STEP]
show "y \<in> S"
[PROOF STATE]
proof (prove)
using this:
0 < e
(1 - (1 - e)) *\<^sub>R ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) + (1 - e) *\<^sub>R x \<in> S

goal (1 subgoal):
 1. y \<in> S
[PROOF STEP]
by (auto simp add: scaleR_left_diff_distrib scaleR_right_diff_distrib)
[PROOF STATE]
proof (state)
this:
y \<in> S

goal (1 subgoal):
 1. 0 < e * d
[PROOF STEP]
qed (use \<open>e>0\<close> \<open>d>0\<close> in auto)
[PROOF STATE]
proof (state)
this:
x - e *\<^sub>R (x - c) \<in> interior S

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma open_existence_ivl0:
  assumes x : "x \<in> X"
  shows "\<exists>a b. a < 0 \<and> 0 < b \<and> {a..b} \<subseteq> existence_ivl0 x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>a b. a < 0 \<and> 0 < b \<and> {a..b} \<subseteq> existence_ivl0 x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>a b. a < 0 \<and> 0 < b \<and> {a..b} \<subseteq> existence_ivl0 x
[PROOF STEP]
have a1:"0 \<in> existence_ivl0 x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<in> existence_ivl0 x
[PROOF STEP]
by (simp add: x)
[PROOF STATE]
proof (state)
this:
0 \<in> existence_ivl0 x

goal (1 subgoal):
 1. \<exists>a b. a < 0 \<and> 0 < b \<and> {a..b} \<subseteq> existence_ivl0 x
[PROOF STEP]
have a2: "open (existence_ivl0 x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. open (existence_ivl0 x)
[PROOF STEP]
by (simp add: x)
[PROOF STATE]
proof (state)
this:
open (existence_ivl0 x)

goal (1 subgoal):
 1. \<exists>a b. a < 0 \<and> 0 < b \<and> {a..b} \<subseteq> existence_ivl0 x
[PROOF STEP]
from a1 a2
[PROOF STATE]
proof (chain)
picking this:
0 \<in> existence_ivl0 x
open (existence_ivl0 x)
[PROOF STEP]
obtain d where "d > 0" "ball 0 d \<subseteq> existence_ivl0 x"
[PROOF STATE]
proof (prove)
using this:
0 \<in> existence_ivl0 x
open (existence_ivl0 x)

goal (1 subgoal):
 1. (\<And>d. \<lbrakk>0 < d; ball 0 d \<subseteq> existence_ivl0 x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using openE
[PROOF STATE]
proof (prove)
using this:
0 \<in> existence_ivl0 x
open (existence_ivl0 x)
\<lbrakk>open ?S; ?x \<in> ?S; \<And>e. \<lbrakk>0 < e; ball ?x e \<subseteq> ?S\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (\<And>d. \<lbrakk>0 < d; ball 0 d \<subseteq> existence_ivl0 x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
0 < d
ball 0 d \<subseteq> existence_ivl0 x

goal (1 subgoal):
 1. \<exists>a b. a < 0 \<and> 0 < b \<and> {a..b} \<subseteq> existence_ivl0 x
[PROOF STEP]
have "{-d/2..d/2} \<subseteq> ball 0 d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {- d / 2..d / 2} \<subseteq> ball 0 d
[PROOF STEP]
using \<open>0 < d\<close> dist_norm mem_ball
[PROOF STATE]
proof (prove)
using this:
0 < d
dist ?x ?y = norm (?x - ?y)
(?y \<in> ball ?x ?e) = (dist ?x ?y < ?e)

goal (1 subgoal):
 1. {- d / 2..d / 2} \<subseteq> ball 0 d
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{- d / 2..d / 2} \<subseteq> ball 0 d

goal (1 subgoal):
 1. \<exists>a b. a < 0 \<and> 0 < b \<and> {a..b} \<subseteq> existence_ivl0 x
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
{- d / 2..d / 2} \<subseteq> ball 0 d

goal (1 subgoal):
 1. \<exists>a b. a < 0 \<and> 0 < b \<and> {a..b} \<subseteq> existence_ivl0 x
[PROOF STEP]
by (smt \<open>0 < d\<close> \<open>ball 0 d \<subseteq> existence_ivl0 x\<close> divide_minus_left half_gt_zero order_trans)
[PROOF STATE]
proof (state)
this:
\<exists>a b. a < 0 \<and> 0 < b \<and> {a..b} \<subseteq> existence_ivl0 x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma vangle_scaleR:
  "vangle (k *\<^sub>R v) w = vangle v w" "vangle w (k *\<^sub>R v) = vangle w v" if "k > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vangle (k *\<^sub>R v) w = vangle v w &&& vangle w (k *\<^sub>R v) = vangle w v
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
0 < k

goal (1 subgoal):
 1. vangle (k *\<^sub>R v) w = vangle v w &&& vangle w (k *\<^sub>R v) = vangle w v
[PROOF STEP]
by (auto simp: vangle_def)


[STATEMENT]
lemma fpairs_iff: "x \<in>\<^sub>\<circ> fpairs r \<longleftrightarrow> x \<in>\<^sub>\<circ> r \<and> (\<exists>a b. x = [a, b]\<^sub>\<circ>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<in>\<^sub>\<circ> fpairs r) = (x \<in>\<^sub>\<circ> r \<and> (\<exists>a b. x = [a, b]\<^sub>\<circ>))
[PROOF STEP]
by auto


[STATEMENT]
lemma H_compose_smooth_on: "k-smooth_on S (\<lambda>x. H (g x))" if "k-smooth_on S g" "open S"
  for g :: "_ \<Rightarrow> _::euclidean_space"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k-smooth_on S (\<lambda>x. H (g x))
[PROOF STEP]
using smooth_on_compose[OF H_smooth_on that]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>open UNIV; g ` S \<subseteq> UNIV\<rbrakk> \<Longrightarrow> k-smooth_on S (H \<circ> g)

goal (1 subgoal):
 1. k-smooth_on S (\<lambda>x. H (g x))
[PROOF STEP]
by (auto simp: o_def)


[STATEMENT]
lemma uniqueness_poly_equality:
  fixes f g :: "'a :: {factorial_ring_gcd,semiring_gcd_mult_normalize} poly"
  assumes cop: "coprime f g"
  and deg: "B = 0 \<or> degree B < degree f" "B' = 0 \<or> degree B' < degree f"
  and f: "f \<noteq> 0" and eq: "A * f + B * g = A' * f + B' * g"
  shows "A = A'" "B = B'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A = A' &&& B = B'
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. A = A'
 2. B = B'
[PROOF STEP]
from eq
[PROOF STATE]
proof (chain)
picking this:
A * f + B * g = A' * f + B' * g
[PROOF STEP]
have *: "(A - A') * f = (B' - B) * g"
[PROOF STATE]
proof (prove)
using this:
A * f + B * g = A' * f + B' * g

goal (1 subgoal):
 1. (A - A') * f = (B' - B) * g
[PROOF STEP]
by (simp add: field_simps)
[PROOF STATE]
proof (state)
this:
(A - A') * f = (B' - B) * g

goal (2 subgoals):
 1. A = A'
 2. B = B'
[PROOF STEP]
hence "f dvd (B' - B) * g"
[PROOF STATE]
proof (prove)
using this:
(A - A') * f = (B' - B) * g

goal (1 subgoal):
 1. f dvd (B' - B) * g
[PROOF STEP]
unfolding dvd_def
[PROOF STATE]
proof (prove)
using this:
(A - A') * f = (B' - B) * g

goal (1 subgoal):
 1. \<exists>k. (B' - B) * g = f * k
[PROOF STEP]
by (intro exI[of _ "A - A'"], auto simp: field_simps)
[PROOF STATE]
proof (state)
this:
f dvd (B' - B) * g

goal (2 subgoals):
 1. A = A'
 2. B = B'
[PROOF STEP]
with cop[simplified]
[PROOF STATE]
proof (chain)
picking this:
algebraic_semidom_class.coprime f g
f dvd (B' - B) * g
[PROOF STEP]
have dvd: "f dvd (B' - B)"
[PROOF STATE]
proof (prove)
using this:
algebraic_semidom_class.coprime f g
f dvd (B' - B) * g

goal (1 subgoal):
 1. f dvd B' - B
[PROOF STEP]
by (simp add: coprime_dvd_mult_right_iff ac_simps)
[PROOF STATE]
proof (state)
this:
f dvd B' - B

goal (2 subgoals):
 1. A = A'
 2. B = B'
[PROOF STEP]
from divides_degree[OF this]
[PROOF STATE]
proof (chain)
picking this:
degree f \<le> degree (B' - B) \<or> B' - B = 0
[PROOF STEP]
have "degree f \<le> degree (B' - B) \<or> B = B'"
[PROOF STATE]
proof (prove)
using this:
degree f \<le> degree (B' - B) \<or> B' - B = 0

goal (1 subgoal):
 1. degree f \<le> degree (B' - B) \<or> B = B'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
degree f \<le> degree (B' - B) \<or> B = B'

goal (2 subgoals):
 1. A = A'
 2. B = B'
[PROOF STEP]
with degree_diff_le_max[of B' B] deg
[PROOF STATE]
proof (chain)
picking this:
degree (B' - B) \<le> max (degree B') (degree B)
B = 0 \<or> degree B < degree f
B' = 0 \<or> degree B' < degree f
degree f \<le> degree (B' - B) \<or> B = B'
[PROOF STEP]
show "B = B'"
[PROOF STATE]
proof (prove)
using this:
degree (B' - B) \<le> max (degree B') (degree B)
B = 0 \<or> degree B < degree f
B' = 0 \<or> degree B' < degree f
degree f \<le> degree (B' - B) \<or> B = B'

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

goal (1 subgoal):
 1. A = A'
[PROOF STEP]
with * f
[PROOF STATE]
proof (chain)
picking this:
(A - A') * f = (B' - B) * g
f \<noteq> 0
B = B'
[PROOF STEP]
show "A = A'"
[PROOF STATE]
proof (prove)
using this:
(A - A') * f = (B' - B) * g
f \<noteq> 0
B = B'

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma quantale_hom_closed_map:
  fixes f :: "'a::quantale_with_dual \<Rightarrow> 'b::quantale_with_dual"
  shows "(f \<in> quantale_homset) \<Longrightarrow> (radj f \<in> quantale_closed_maps)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<in> quantale_homset \<Longrightarrow> radj f \<in> quantale_closed_maps
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. f \<in> quantale_homset \<Longrightarrow> radj f \<in> quantale_closed_maps
[PROOF STEP]
assume h: "f \<in> quantale_homset"
[PROOF STATE]
proof (state)
this:
f \<in> quantale_homset

goal (1 subgoal):
 1. f \<in> quantale_homset \<Longrightarrow> radj f \<in> quantale_closed_maps
[PROOF STEP]
have "\<forall>x y. f (radj f x) \<cdot> f (radj f y) \<le> x \<cdot> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x y. f (radj f x) \<cdot> f (radj f y) \<le> x \<cdot> y
[PROOF STEP]
by (metis adj_def h order_refl psrpq.mult_isol_var quantale_hom_radj)
[PROOF STATE]
proof (state)
this:
\<forall>x y. f (radj f x) \<cdot> f (radj f y) \<le> x \<cdot> y

goal (1 subgoal):
 1. f \<in> quantale_homset \<Longrightarrow> radj f \<in> quantale_closed_maps
[PROOF STEP]
hence "\<forall>x y. f (radj f x \<cdot> radj f y) \<le> x \<cdot> y"
[PROOF STATE]
proof (prove)
using this:
\<forall>x y. f (radj f x) \<cdot> f (radj f y) \<le> x \<cdot> y

goal (1 subgoal):
 1. \<forall>x y. f (radj f x \<cdot> radj f y) \<le> x \<cdot> y
[PROOF STEP]
by (metis h quantale_homset_iff)
[PROOF STATE]
proof (state)
this:
\<forall>x y. f (radj f x \<cdot> radj f y) \<le> x \<cdot> y

goal (1 subgoal):
 1. f \<in> quantale_homset \<Longrightarrow> radj f \<in> quantale_closed_maps
[PROOF STEP]
hence "\<forall>x y. radj f x \<cdot> radj f y \<le> radj f (x \<cdot> y)"
[PROOF STATE]
proof (prove)
using this:
\<forall>x y. f (radj f x \<cdot> radj f y) \<le> x \<cdot> y

goal (1 subgoal):
 1. \<forall>x y. radj f x \<cdot> radj f y \<le> radj f (x \<cdot> y)
[PROOF STEP]
using adj_def h quantale_hom_radj
[PROOF STATE]
proof (prove)
using this:
\<forall>x y. f (radj f x \<cdot> radj f y) \<le> x \<cdot> y
?f \<stileturn> ?g = (\<forall>x y. (?f x \<le> y) = (x \<le> ?g y))
f \<in> quantale_homset
?f \<in> quantale_homset \<Longrightarrow> ?f \<stileturn> radj ?f

goal (1 subgoal):
 1. \<forall>x y. radj f x \<cdot> radj f y \<le> radj f (x \<cdot> y)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>x y. radj f x \<cdot> radj f y \<le> radj f (x \<cdot> y)

goal (1 subgoal):
 1. f \<in> quantale_homset \<Longrightarrow> radj f \<in> quantale_closed_maps
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>x y. radj f x \<cdot> radj f y \<le> radj f (x \<cdot> y)

goal (1 subgoal):
 1. radj f \<in> quantale_closed_maps
[PROOF STEP]
by (simp add: quantale_closed_maps_iff)
[PROOF STATE]
proof (state)
this:
radj f \<in> quantale_closed_maps

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma in_mset_fold_plus_iff[iff]: "x \<in># fold_mset (+) M NN \<longleftrightarrow> x \<in># M \<or> (\<exists>N. N \<in># NN \<and> x \<in># N)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<in># fold_mset (+) M NN) = (x \<in># M \<or> (\<exists>N. N \<in># NN \<and> x \<in># N))
[PROOF STEP]
by (induct NN) auto


[STATEMENT]
lemma ereal_sums_minus:
  fixes f::"nat \<Rightarrow> ereal"
  assumes "f sums a"
    and "\<And>n. \<bar>f n\<bar> \<noteq> \<infinity>"
  shows "(\<lambda>n. - f n) sums -a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. - f n) sums - a
[PROOF STEP]
proof (cases "\<bar>a\<bar> = \<infinity>")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<bar>a\<bar> = \<infinity> \<Longrightarrow> (\<lambda>n. - f n) sums - a
 2. \<bar>a\<bar> \<noteq> \<infinity> \<Longrightarrow> (\<lambda>n. - f n) sums - a
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<bar>a\<bar> \<noteq> \<infinity>

goal (2 subgoals):
 1. \<bar>a\<bar> = \<infinity> \<Longrightarrow> (\<lambda>n. - f n) sums - a
 2. \<bar>a\<bar> \<noteq> \<infinity> \<Longrightarrow> (\<lambda>n. - f n) sums - a
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<bar>a\<bar> \<noteq> \<infinity>

goal (1 subgoal):
 1. (\<lambda>n. - f n) sums - a
[PROOF STEP]
using assms ereal_sums_not_infty_minus
[PROOF STATE]
proof (prove)
using this:
\<bar>a\<bar> \<noteq> \<infinity>
f sums a
\<bar>f ?n\<bar> \<noteq> \<infinity>
\<lbrakk>?f sums ?a; \<bar>?a\<bar> \<noteq> \<infinity>\<rbrakk> \<Longrightarrow> (\<lambda>n. - ?f n) sums - ?a

goal (1 subgoal):
 1. (\<lambda>n. - f n) sums - a
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<lambda>n. - f n) sums - a

goal (1 subgoal):
 1. \<bar>a\<bar> = \<infinity> \<Longrightarrow> (\<lambda>n. - f n) sums - a
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<bar>a\<bar> = \<infinity> \<Longrightarrow> (\<lambda>n. - f n) sums - a
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
\<bar>a\<bar> = \<infinity>

goal (1 subgoal):
 1. \<bar>a\<bar> = \<infinity> \<Longrightarrow> (\<lambda>n. - f n) sums - a
[PROOF STEP]
hence "a = \<infinity> \<or> a = - \<infinity>"
[PROOF STATE]
proof (prove)
using this:
\<bar>a\<bar> = \<infinity>

goal (1 subgoal):
 1. a = \<infinity> \<or> a = - \<infinity>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a = \<infinity> \<or> a = - \<infinity>

goal (1 subgoal):
 1. \<bar>a\<bar> = \<infinity> \<Longrightarrow> (\<lambda>n. - f n) sums - a
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
a = \<infinity> \<or> a = - \<infinity>

goal (1 subgoal):
 1. (\<lambda>n. - f n) sums - a
[PROOF STEP]
using assms ereal_sums_Pinfty ereal_sums_Minfty
[PROOF STATE]
proof (prove)
using this:
a = \<infinity> \<or> a = - \<infinity>
f sums a
\<bar>f ?n\<bar> \<noteq> \<infinity>
\<lbrakk>?f sums \<infinity>; \<And>n. \<bar>?f n\<bar> \<noteq> \<infinity>\<rbrakk> \<Longrightarrow> (\<lambda>n. - ?f n) sums - \<infinity>
\<lbrakk>?f sums - \<infinity>; \<And>n. \<bar>?f n\<bar> \<noteq> \<infinity>\<rbrakk> \<Longrightarrow> (\<lambda>n. - ?f n) sums \<infinity>

goal (1 subgoal):
 1. (\<lambda>n. - f n) sums - a
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<lambda>n. - f n) sums - a

goal:
No subgoals!
[PROOF STEP]
qed