[STATEMENT]
lemma append_Cons_nth_not_middle:
  assumes "i \<noteq> length xs"
  shows "(xs @ u # ys) ! i = (xs @ z # ys) ! i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (xs @ u # ys) ! i = (xs @ z # ys) ! i
[PROOF STEP]
proof (cases "i < length xs")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. i < length xs \<Longrightarrow> (xs @ u # ys) ! i = (xs @ z # ys) ! i
 2. \<not> i < length xs \<Longrightarrow> (xs @ u # ys) ! i = (xs @ z # ys) ! i
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
i < length xs

goal (2 subgoals):
 1. i < length xs \<Longrightarrow> (xs @ u # ys) ! i = (xs @ z # ys) ! i
 2. \<not> i < length xs \<Longrightarrow> (xs @ u # ys) ! i = (xs @ z # ys) ! i
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
i < length xs

goal (1 subgoal):
 1. (xs @ u # ys) ! i = (xs @ z # ys) ! i
[PROOF STEP]
by (simp add: append_Cons_nth_left)
[PROOF STATE]
proof (state)
this:
(xs @ u # ys) ! i = (xs @ z # ys) ! i

goal (1 subgoal):
 1. \<not> i < length xs \<Longrightarrow> (xs @ u # ys) ! i = (xs @ z # ys) ! i
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> i < length xs \<Longrightarrow> (xs @ u # ys) ! i = (xs @ z # ys) ! i
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> i < length xs

goal (1 subgoal):
 1. \<not> i < length xs \<Longrightarrow> (xs @ u # ys) ! i = (xs @ z # ys) ! i
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
i \<noteq> length xs
\<not> i < length xs
[PROOF STEP]
have "i > length xs"
[PROOF STATE]
proof (prove)
using this:
i \<noteq> length xs
\<not> i < length xs

goal (1 subgoal):
 1. length xs < i
[PROOF STEP]
by arith
[PROOF STATE]
proof (state)
this:
length xs < i

goal (1 subgoal):
 1. \<not> i < length xs \<Longrightarrow> (xs @ u # ys) ! i = (xs @ z # ys) ! i
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
length xs < i

goal (1 subgoal):
 1. (xs @ u # ys) ! i = (xs @ z # ys) ! i
[PROOF STEP]
by (rule append_Cons_nth_right)
[PROOF STATE]
proof (state)
this:
(xs @ u # ys) ! i = (xs @ z # ys) ! i

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem fiter_induct: "x \<sqsubseteq> d \<sqinter> c;x \<Longrightarrow> x \<sqsubseteq> c\<^sup>\<star>;d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<sqsubseteq> d \<sqinter> c ; x \<Longrightarrow> x \<sqsubseteq> c\<^sup>\<star> ; d
variables:
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
c, d, nil, x :: 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x \<sqsubseteq> d \<sqinter> c ; x \<Longrightarrow> x \<sqsubseteq> c\<^sup>\<star> ; d
variables:
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
c, d, nil, x :: 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
assume "x \<sqsubseteq> d \<sqinter> c;x"
[PROOF STATE]
proof (state)
this:
(x::'a::refinement_lattice) \<sqsubseteq> (d::'a::refinement_lattice) \<sqinter> (c::'a::refinement_lattice) ; x

goal (1 subgoal):
 1. x \<sqsubseteq> d \<sqinter> c ; x \<Longrightarrow> x \<sqsubseteq> c\<^sup>\<star> ; d
variables:
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
c, d, nil, x :: 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(x::'a::refinement_lattice) \<sqsubseteq> (d::'a::refinement_lattice) \<sqinter> (c::'a::refinement_lattice) ; x
[PROOF STEP]
have "x \<sqsubseteq> c;x \<sqinter> d"
[PROOF STATE]
proof (prove)
using this:
(x::'a::refinement_lattice) \<sqsubseteq> (d::'a::refinement_lattice) \<sqinter> (c::'a::refinement_lattice) ; x

goal (1 subgoal):
 1. x \<sqsubseteq> c ; x \<sqinter> d
variables:
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
c, d, x :: 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
using inf_commute
[PROOF STATE]
proof (prove)
using this:
(x::'a::refinement_lattice) \<sqsubseteq> (d::'a::refinement_lattice) \<sqinter> (c::'a::refinement_lattice) ; x
(?x::?'a::semilattice_inf) \<sqinter> (?y::?'a::semilattice_inf) = ?y \<sqinter> ?x

goal (1 subgoal):
 1. x \<sqsubseteq> c ; x \<sqinter> d
variables:
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
c, d, x :: 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(x::'a::refinement_lattice) \<sqsubseteq> (c::'a::refinement_lattice) ; x \<sqinter> (d::'a::refinement_lattice)

goal (1 subgoal):
 1. x \<sqsubseteq> d \<sqinter> c ; x \<Longrightarrow> x \<sqsubseteq> c\<^sup>\<star> ; d
variables:
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
c, d, nil, x :: 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(x::'a::refinement_lattice) \<sqsubseteq> (c::'a::refinement_lattice) ; x \<sqinter> (d::'a::refinement_lattice)
[PROOF STEP]
have "x \<sqsubseteq> gfp (\<lambda> x. c;x \<sqinter> d)"
[PROOF STATE]
proof (prove)
using this:
(x::'a::refinement_lattice) \<sqsubseteq> (c::'a::refinement_lattice) ; x \<sqinter> (d::'a::refinement_lattice)

goal (1 subgoal):
 1. x \<sqsubseteq> gfp (\<lambda>x::'a. c ; x \<sqinter> d)
variables:
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
c, d, x :: 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
by (simp add: gfp_upperbound)
[PROOF STATE]
proof (state)
this:
(x::'a::refinement_lattice) \<sqsubseteq> gfp (\<lambda>x::'a::refinement_lattice. (c::'a::refinement_lattice) ; x \<sqinter> (d::'a::refinement_lattice))

goal (1 subgoal):
 1. x \<sqsubseteq> d \<sqinter> c ; x \<Longrightarrow> x \<sqsubseteq> c\<^sup>\<star> ; d
variables:
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
c, d, nil, x :: 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(x::'a::refinement_lattice) \<sqsubseteq> gfp (\<lambda>x::'a::refinement_lattice. (c::'a::refinement_lattice) ; x \<sqinter> (d::'a::refinement_lattice))

goal (1 subgoal):
 1. x \<sqsubseteq> c\<^sup>\<star> ; d
variables:
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
c, d, nil, x :: 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
by (metis (full_types) fiter_induct_eq)
[PROOF STATE]
proof (state)
this:
(x::'a::refinement_lattice) \<sqsubseteq> (c::'a::refinement_lattice)\<^sup>\<star> ; (d::'a::refinement_lattice)

goal:
No subgoals!
variables:
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
c, d, nil, x :: 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
qed


[STATEMENT]
lemma ltake_lappend:
  "ltake n (lappend xs ys) = lappend (ltake n xs) (ltake (n - llength xs) ys)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ltake n (lappend xs ys) = lappend (ltake n xs) (ltake (n - llength xs) ys)
[PROOF STEP]
by(coinduction arbitrary: n xs ys rule: llist.coinduct_strong)(auto intro!: exI simp add: llength_ltl ltl_ltake)


[STATEMENT]
lemma apply_bfun_one [simp]: "apply_bfun (1 :: _ \<Rightarrow>\<^sub>b real) x = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. apply_bfun 1 x = 1
[PROOF STEP]
using one_bfun.rep_eq
[PROOF STATE]
proof (prove)
using this:
apply_bfun 1 = (\<lambda>x. 1)

goal (1 subgoal):
 1. apply_bfun 1 x = 1
[PROOF STEP]
by auto


[STATEMENT]
lemma closed_Collect_disj:
  assumes "closed {x. P x}" "closed {x. Q x}"
  shows "closed {x. P x \<or> Q x}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. closed {x. P x \<or> Q x}
[PROOF STEP]
using closed_Un[OF assms]
[PROOF STATE]
proof (prove)
using this:
closed ({x. P x} \<union> {x. Q x})

goal (1 subgoal):
 1. closed {x. P x \<or> Q x}
[PROOF STEP]
by (simp add: Un_def)


[STATEMENT]
lemma fold_min_triv:
  fixes k :: "_ :: linorder"
  shows "(\<forall>x\<in>set xs. k \<le> x) \<Longrightarrow> List.fold min xs k = k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<in>set xs. k \<le> x \<Longrightarrow> fold min xs k = k
[PROOF STEP]
by (induct xs) (auto simp add: min_def)


[STATEMENT]
lemma set_integral_at_point:
  fixes a :: real
  assumes "set_integrable M {a} f"
  and [simp]: "{a} \<in> sets M" and "(emeasure M) {a} \<noteq> \<infinity>"
  shows "(LINT x:{a} | M. f x) = f a * measure M {a}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set_lebesgue_integral M {a} f = f a * Sigma_Algebra.measure M {a}
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. set_lebesgue_integral M {a} f = f a * Sigma_Algebra.measure M {a}
[PROOF STEP]
have "set_lebesgue_integral M {a} f = set_lebesgue_integral M {a} (%x. f a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set_lebesgue_integral M {a} f = LINT x:{a}|M. f a
[PROOF STEP]
by (intro set_lebesgue_integral_cong) simp_all
[PROOF STATE]
proof (state)
this:
set_lebesgue_integral M {a} f = LINT x:{a}|M. f a

goal (1 subgoal):
 1. set_lebesgue_integral M {a} f = f a * Sigma_Algebra.measure M {a}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
set_lebesgue_integral M {a} f = LINT x:{a}|M. f a
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
set_lebesgue_integral M {a} f = LINT x:{a}|M. f a

goal (1 subgoal):
 1. set_lebesgue_integral M {a} f = f a * Sigma_Algebra.measure M {a}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
set_lebesgue_integral M {a} f = LINT x:{a}|M. f a
set_integrable M {a} f
{a} \<in> sets M
emeasure M {a} \<noteq> \<infinity>

goal (1 subgoal):
 1. set_lebesgue_integral M {a} f = f a * Sigma_Algebra.measure M {a}
[PROOF STEP]
unfolding set_lebesgue_integral_def
[PROOF STATE]
proof (prove)
using this:
LINT x|M. indicat_real {a} x *\<^sub>R f x = LINT x|M. indicat_real {a} x *\<^sub>R f a
set_integrable M {a} f
{a} \<in> sets M
emeasure M {a} \<noteq> \<infinity>

goal (1 subgoal):
 1. LINT x|M. indicat_real {a} x *\<^sub>R f x = f a * Sigma_Algebra.measure M {a}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
set_lebesgue_integral M {a} f = f a * Sigma_Algebra.measure M {a}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in idom) poly_mult_not_eq_poly_Nil[simp]:
  "poly (p *** q) x \<noteq> poly [] x \<longleftrightarrow> poly p x \<noteq> poly [] x \<and> poly q x \<noteq> poly [] x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (poly (p *** q) x \<noteq> poly [] x) = (poly p x \<noteq> poly [] x \<and> poly q x \<noteq> poly [] x)
[PROOF STEP]
by (auto simp add: poly_mult)


[STATEMENT]
lemma ZFfunComp:
  assumes "\<forall> x . x |\<in>| A \<longrightarrow> f x |\<in>| B"
  shows   "(ZFfun A B f) |o| (ZFfun B C g) = ZFfun A C (g o f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ZFfun A B f |o| ZFfun B C g = ZFfun A C (g \<circ> f)
[PROOF STEP]
proof (simp add: ZFfunComp_def ZFfunDom ZFfunCod)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ZFfun A C (\<lambda>x. ZFfun B C g |@| (ZFfun A B f |@| x)) = ZFfun A C (g \<circ> f)
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ZFfun A C (\<lambda>x. ZFfun B C g |@| (ZFfun A B f |@| x)) = ZFfun A C (g \<circ> f)
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ZFfun A C (\<lambda>x. ZFfun B C g |@| (ZFfun A B f |@| x)) = ZFfun A C (g \<circ> f)
[PROOF STEP]
assume a: "x |\<in>| A"
[PROOF STATE]
proof (state)
this:
x |\<in>| A

goal (1 subgoal):
 1. ZFfun A C (\<lambda>x. ZFfun B C g |@| (ZFfun A B f |@| x)) = ZFfun A C (g \<circ> f)
[PROOF STEP]
have "ZFfun B C g  |@| (ZFfun A B f |@| x) = (g o f) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ZFfun B C g |@| (ZFfun A B f |@| x) = (g \<circ> f) x
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ZFfun B C g |@| (ZFfun A B f |@| x) = (g \<circ> f) x
[PROOF STEP]
have "(ZFfun A B f |@| x) = f x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ZFfun A B f |@| x = f x
[PROOF STEP]
using a
[PROOF STATE]
proof (prove)
using this:
x |\<in>| A

goal (1 subgoal):
 1. ZFfun A B f |@| x = f x
[PROOF STEP]
by (simp add: ZFfunApp)
[PROOF STATE]
proof (state)
this:
ZFfun A B f |@| x = f x

goal (1 subgoal):
 1. ZFfun B C g |@| (ZFfun A B f |@| x) = (g \<circ> f) x
[PROOF STEP]
hence "ZFfun B C g  |@| (ZFfun A B f |@| x) = g (f x)"
[PROOF STATE]
proof (prove)
using this:
ZFfun A B f |@| x = f x

goal (1 subgoal):
 1. ZFfun B C g |@| (ZFfun A B f |@| x) = g (f x)
[PROOF STEP]
using assms a
[PROOF STATE]
proof (prove)
using this:
ZFfun A B f |@| x = f x
\<forall>x. x |\<in>| A \<longrightarrow> f x |\<in>| B
x |\<in>| A

goal (1 subgoal):
 1. ZFfun B C g |@| (ZFfun A B f |@| x) = g (f x)
[PROOF STEP]
by (simp add: ZFfunApp)
[PROOF STATE]
proof (state)
this:
ZFfun B C g |@| (ZFfun A B f |@| x) = g (f x)

goal (1 subgoal):
 1. ZFfun B C g |@| (ZFfun A B f |@| x) = (g \<circ> f) x
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
ZFfun B C g |@| (ZFfun A B f |@| x) = g (f x)

goal (1 subgoal):
 1. ZFfun B C g |@| (ZFfun A B f |@| x) = (g \<circ> f) x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
ZFfun B C g |@| (ZFfun A B f |@| x) = (g \<circ> f) x

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
ZFfun B C g |@| (ZFfun A B f |@| x) = (g \<circ> f) x

goal (1 subgoal):
 1. ZFfun A C (\<lambda>x. ZFfun B C g |@| (ZFfun A B f |@| x)) = ZFfun A C (g \<circ> f)
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
?x2 |\<in>| A \<Longrightarrow> ZFfun B C g |@| (ZFfun A B f |@| ?x2) = (g \<circ> f) ?x2

goal (1 subgoal):
 1. ZFfun A C (\<lambda>x. ZFfun B C g |@| (ZFfun A B f |@| x)) = ZFfun A C (g \<circ> f)
[PROOF STEP]
thus "ZFfun A C (\<lambda>x. ZFfun B C g |@| (ZFfun A B f |@| x)) = ZFfun A C (g \<circ> f)"
[PROOF STATE]
proof (prove)
using this:
?x2 |\<in>| A \<Longrightarrow> ZFfun B C g |@| (ZFfun A B f |@| ?x2) = (g \<circ> f) ?x2

goal (1 subgoal):
 1. ZFfun A C (\<lambda>x. ZFfun B C g |@| (ZFfun A B f |@| x)) = ZFfun A C (g \<circ> f)
[PROOF STEP]
by (simp add: ZFfun_ext)
[PROOF STATE]
proof (state)
this:
ZFfun A C (\<lambda>x. ZFfun B C g |@| (ZFfun A B f |@| x)) = ZFfun A C (g \<circ> f)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem psubst_eval:
  \<open>eval e f g (psubst h p) = eval e (\<lambda>p. f (h p)) g p\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eval e f g (psubst h p) = eval e (\<lambda>p. f (h p)) g p
[PROOF STEP]
by (induct p arbitrary: e) simp_all


[STATEMENT]
lemma continuous_on_pochhammer [continuous_intros]: "continuous_on A (\<lambda>z. pochhammer z n)"
  for A :: "'a::real_normed_field set"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on A (\<lambda>z. pochhammer z n)
[PROOF STEP]
by (intro continuous_at_imp_continuous_on ballI isCont_pochhammer)


[STATEMENT]
lemma length_shuffles: "zs \<in> shuffles xs ys \<Longrightarrow> length zs = length xs + length ys"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. zs \<in> shuffles xs ys \<Longrightarrow> length zs = length xs + length ys
[PROOF STEP]
by (induction xs ys arbitrary: zs rule: shuffles.induct) auto


[STATEMENT]
lemma sq_mtx_minus_diag_diag[simp]: "sq_mtx_diag f - sq_mtx_diag g = (\<d>\<i>\<a>\<g> i. f i - g i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sq_mtx_diag f - sq_mtx_diag g = (\<d>\<i>\<a>\<g> i. f i - g i)
[PROOF STEP]
by (subst sq_mtx_eq_iff) (simp add: axis_def)


[STATEMENT]
lemma LIMSEQ_Suc: "f \<longlonglongrightarrow> l \<Longrightarrow> (\<lambda>n. f (Suc n)) \<longlonglongrightarrow> l"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<longlonglongrightarrow> l \<Longrightarrow> (\<lambda>n. f (Suc n)) \<longlonglongrightarrow> l
[PROOF STEP]
by (drule LIMSEQ_ignore_initial_segment [where k="Suc 0"]) simp


[STATEMENT]
theorem "t \<in> B h \<Longrightarrow> fib (h + 2) \<le> size t + 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t \<in> B h \<Longrightarrow> fib (h + 2) \<le> size t + 1
[PROOF STEP]
using size_bounded
[PROOF STATE]
proof (prove)
using this:
?t \<in> B ?h \<Longrightarrow> size (fib_tree ?h) \<le> size ?t

goal (1 subgoal):
 1. t \<in> B h \<Longrightarrow> fib (h + 2) \<le> size t + 1
[PROOF STEP]
by (simp add: size_fib' fibfib[symmetric] del: fib.simps)


[STATEMENT]
lemma cos_lt_zero_on_pi2_pi [simp]:
  assumes "x > pi/2" and "x \<le> pi"
  shows "cos x < 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cos x < 0
[PROOF STEP]
using cos_gt_zero_pi[of "pi - x"] assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>- (pi / 2) < pi - x; pi - x < pi / 2\<rbrakk> \<Longrightarrow> 0 < cos (pi - x)
pi / 2 < x
x \<le> pi

goal (1 subgoal):
 1. cos x < 0
[PROOF STEP]
by simp


[STATEMENT]
lemma rtranclp_transp_reflp: "R\<^sup>*\<^sup>* = R" if "transp R" "reflp R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. R\<^sup>*\<^sup>* = R
[PROOF STEP]
apply(rule ext iffI)+
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x xa. R\<^sup>*\<^sup>* x xa \<Longrightarrow> R x xa
 2. \<And>x xa. R x xa \<Longrightarrow> R\<^sup>*\<^sup>* x xa
[PROOF STEP]
subgoal premises prems for x y
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. R x y
[PROOF STEP]
using prems
[PROOF STATE]
proof (prove)
using this:
R\<^sup>*\<^sup>* x y

goal (1 subgoal):
 1. R x y
[PROOF STEP]
by(induction)(use that in \<open>auto intro: reflpD transpD\<close>)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x xa. R x xa \<Longrightarrow> R\<^sup>*\<^sup>* x xa
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. R x_ xa_ \<Longrightarrow> R\<^sup>*\<^sup>* x_ xa_
[PROOF STEP]
by(rule r_into_rtranclp)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
theorem sturm_tarski_interval:
  assumes "a<b" "poly p a\<noteq>0" "poly p b\<noteq>0"
  shows "taq {x. poly p x=0 \<and> a<x \<and> x<b} q = changes_itv_smods a b p (pderiv p * q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. taq {x. poly p x = 0 \<and> a < x \<and> x < b} q = changes_itv_smods a b p (pderiv p * q)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. taq {x. poly p x = 0 \<and> a < x \<and> x < b} q = changes_itv_smods a b p (pderiv p * q)
[PROOF STEP]
have "p\<noteq>0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p \<noteq> 0
[PROOF STEP]
using \<open>poly p a\<noteq>0\<close>
[PROOF STATE]
proof (prove)
using this:
poly p a \<noteq> 0

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

goal (1 subgoal):
 1. taq {x. poly p x = 0 \<and> a < x \<and> x < b} q = changes_itv_smods a b p (pderiv p * q)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
p \<noteq> 0

goal (1 subgoal):
 1. taq {x. poly p x = 0 \<and> a < x \<and> x < b} q = changes_itv_smods a b p (pderiv p * q)
[PROOF STEP]
using cindex_poly_taq cindex_poly_changes_itv_mods[OF assms]
[PROOF STATE]
proof (prove)
using this:
p \<noteq> 0
taq {x. poly ?p x = 0 \<and> ?a < x \<and> x < ?b} ?q = cindex_poly ?a ?b (pderiv ?p * ?q) ?p
cindex_poly a b ?q p = changes_itv_smods a b p ?q

goal (1 subgoal):
 1. taq {x. poly p x = 0 \<and> a < x \<and> x < b} q = changes_itv_smods a b p (pderiv p * q)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
taq {x. poly p x = 0 \<and> a < x \<and> x < b} q = changes_itv_smods a b p (pderiv p * q)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem (in group_hom) solvable_imp_solvable_img:
  assumes "solvable_seq G K" shows "solvable_seq H (h ` K)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. solvable_seq H (h ` K)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. solvable_seq H (h ` K)
[PROOF STEP]
obtain n where "(derived G ^^ n) K = { \<one> }"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>n. (derived G ^^ n) K = {\<one>} \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using G.solvable_imp_trivial_derived_seq[OF assms]
[PROOF STATE]
proof (prove)
using this:
\<exists>n. (derived G ^^ n) K = {\<one>}

goal (1 subgoal):
 1. (\<And>n. (derived G ^^ n) K = {\<one>} \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(derived G ^^ n) K = {\<one>}

goal (1 subgoal):
 1. solvable_seq H (h ` K)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(derived G ^^ n) K = {\<one>}

goal (1 subgoal):
 1. solvable_seq H (h ` K)
[PROOF STEP]
using trivial_derived_seq_imp_solvable[OF subgroup_img_is_subgroup, of _ n]
          exp_of_derived_img[OF subgroup.subset, of _ n] G.solvable_imp_subgroup[OF assms]
[PROOF STATE]
proof (prove)
using this:
(derived G ^^ n) K = {\<one>}
\<lbrakk>subgroup ?I1 G; (derived H ^^ n) (h ` ?I1) = {\<one>\<^bsub>H\<^esub>}\<rbrakk> \<Longrightarrow> solvable_seq H (h ` ?I1)
subgroup ?K G \<Longrightarrow> (derived H ^^ n) (h ` ?K) = h ` (derived G ^^ n) ?K
subgroup K G

goal (1 subgoal):
 1. solvable_seq H (h ` K)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
solvable_seq H (h ` K)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma "finite (A:: nat set) \<Longrightarrow> A \<noteq> {}\<Longrightarrow> Min A \<in> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite A; A \<noteq> {}\<rbrakk> \<Longrightarrow> Min A \<in> A
[PROOF STEP]
by(induction A rule: finite.induct)(blast | meson Min_in finite_insert)+


[STATEMENT]
lemma space'_bound: assumes "invar_vebt t n" "u = 2^n"
  shows "space' t \<le> 12 * u"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. space' t \<le> 12 * u
[PROOF STEP]
using  space_2_pow_bound[of t n]
[PROOF STATE]
proof (prove)
using this:
invar_vebt t n \<Longrightarrow> real (space' t) \<le> 12 * (2 ^ n - 1)

goal (1 subgoal):
 1. space' t \<le> 12 * u
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (invar_vebt t n \<Longrightarrow> real (space' t) \<le> 12 * (2 ^ n - 1)) \<Longrightarrow> space' t \<le> 12 * u
[PROOF STEP]
have "real u - 1 = real (u - 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real u - 1 = real (u - 1)
[PROOF STEP]
by (simp add: assms(2) of_nat_diff)
[PROOF STATE]
proof (state)
this:
real u - 1 = real (u - 1)

goal (1 subgoal):
 1. (invar_vebt t n \<Longrightarrow> real (space' t) \<le> 12 * (2 ^ n - 1)) \<Longrightarrow> space' t \<le> 12 * u
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
real u - 1 = real (u - 1)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
real u - 1 = real (u - 1)

goal (1 subgoal):
 1. space' t \<le> 12 * u
[PROOF STEP]
using \<open>invar_vebt t n \<Longrightarrow> real (space' t) \<le> 12 * (2 ^ n - 1)\<close> assms(1) assms(2)
[PROOF STATE]
proof (prove)
using this:
real u - 1 = real (u - 1)
invar_vebt t n \<Longrightarrow> real (space' t) \<le> 12 * (2 ^ n - 1)
invar_vebt t n
u = 2 ^ n

goal (1 subgoal):
 1. space' t \<le> 12 * u
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
space' t \<le> 12 * u

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Norm_zero [simp]:
  "Norm N 0 = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Norm N (0::'a) = 0
[PROOF STEP]
unfolding Norm_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. enn2real (eNorm N (0::'a)) = 0
[PROOF STEP]
by auto


[STATEMENT]
lemma scale_ms_aux_MSLCons:
  "scale_ms_aux c (MSLCons (c', e) xs) = MSLCons (scale_ms c c', e) (scale_ms_aux c xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. scale_ms_aux c (MSLCons (c', e) xs) = MSLCons (scale_ms c c', e) (scale_ms_aux c xs)
[PROOF STEP]
by (simp add: scale_ms_aux_def scale_shift_ms_aux_MSLCons scale_ms_def)


[STATEMENT]
lemma rel_option_option_rel_eq[pred_set_conv]:
    "rel_option (\<lambda> x y. (x, y) \<in> A) = (\<lambda> f g. (f, g) \<in> \<langle>A\<rangle> option_rel)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rel_option (\<lambda>x y. (x, y) \<in> A) = (\<lambda>f g. (f, g) \<in> \<langle>A\<rangle>option_rel)
[PROOF STEP]
by (force simp: option_rel_def elim: option.rel_cases)


[STATEMENT]
lemma contractible_imp_holomorphic_sqrt:
  assumes holf: "f holomorphic_on S"
      and S: "contractible S"
      and fnz: "\<And>z. z \<in> S \<Longrightarrow> f z \<noteq> 0"
  obtains g where "g holomorphic_on S" "\<And>z. z \<in> S \<Longrightarrow> f z = g z ^ 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>g. \<lbrakk>g holomorphic_on S; \<And>z. z \<in> S \<Longrightarrow> f z = (g z)\<^sup>2\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<And>g. \<lbrakk>g holomorphic_on S; \<And>z. z \<in> S \<Longrightarrow> f z = (g z)\<^sup>2\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
obtain g where holg: "g holomorphic_on S" and feq: "\<And>z. z \<in> S \<Longrightarrow> f z = exp(g z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>g. \<lbrakk>g holomorphic_on S; \<And>z. z \<in> S \<Longrightarrow> f z = exp (g z)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using contractible_imp_holomorphic_log [OF assms]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>z. z \<in> S \<Longrightarrow> z \<in> S; \<And>g. \<lbrakk>g holomorphic_on S; \<And>z. z \<in> S \<Longrightarrow> f z = exp (g z)\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (\<And>g. \<lbrakk>g holomorphic_on S; \<And>z. z \<in> S \<Longrightarrow> f z = exp (g z)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
g holomorphic_on S
?z \<in> S \<Longrightarrow> f ?z = exp (g ?z)

goal (1 subgoal):
 1. (\<And>g. \<lbrakk>g holomorphic_on S; \<And>z. z \<in> S \<Longrightarrow> f z = (g z)\<^sup>2\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. thesis
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?g holomorphic_on S
 2. \<And>z. z \<in> S \<Longrightarrow> f z = (?g z)\<^sup>2
[PROOF STEP]
show "exp \<circ> (\<lambda>z. z / 2) \<circ> g holomorphic_on S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. exp \<circ> (\<lambda>z. z / 2) \<circ> g holomorphic_on S
[PROOF STEP]
by (intro holomorphic_on_compose holg holomorphic_intros) auto
[PROOF STATE]
proof (state)
this:
exp \<circ> (\<lambda>z. z / 2) \<circ> g holomorphic_on S

goal (1 subgoal):
 1. \<And>z. z \<in> S \<Longrightarrow> f z = ((exp \<circ> (\<lambda>z. z / 2) \<circ> g) z)\<^sup>2
[PROOF STEP]
show "\<And>z. z \<in> S \<Longrightarrow> f z = ((exp \<circ> (\<lambda>z. z / 2) \<circ> g) z)\<^sup>2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>z. z \<in> S \<Longrightarrow> f z = ((exp \<circ> (\<lambda>z. z / 2) \<circ> g) z)\<^sup>2
[PROOF STEP]
by (simp add: feq flip: exp_double)
[PROOF STATE]
proof (state)
this:
?z \<in> S \<Longrightarrow> f ?z = ((exp \<circ> (\<lambda>z. z / 2) \<circ> g) ?z)\<^sup>2

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
thesis

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma permutation_of_list_id: "x \<notin> set (map fst xs) \<Longrightarrow> permutation_of_list xs x = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<notin> set (map fst xs) \<Longrightarrow> permutation_of_list xs x = x
[PROOF STEP]
by (induct xs) (auto simp: permutation_of_list_Cons)


[STATEMENT]
lemma inj_on_image_lepoll_2 [simp]:
  assumes "inj_on f B" shows "A \<lesssim> f ` B \<longleftrightarrow> A \<lesssim> B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (A \<lesssim> f ` B) = (A \<lesssim> B)
[PROOF STEP]
by (meson assms eq_iff image_lepoll lepoll_def lepoll_trans)


[STATEMENT]
lemma monotone_case_prod_iff [simp]:
  "monotone (rel_prod orda ordb) ordc (case_prod f) \<longleftrightarrow>
   (\<forall>a. monotone ordb ordc (f a)) \<and> (\<forall>b. monotone orda ordc (\<lambda>a. f a b))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. monotone (rel_prod orda ordb) ordc (\<lambda>(x, y). f x y) = ((\<forall>a. monotone ordb ordc (f a)) \<and> (\<forall>b. monotone orda ordc (\<lambda>a. f a b)))
[PROOF STEP]
by(simp add: monotone_rel_prod_iff)


[STATEMENT]
lemma phi_inverse_right:
  assumes "g \<in> G"
  shows "quot_comp_alt g (\<phi> (inverse g \<cdot>| K)) = \<phi> K"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. quot_comp_alt g (\<phi> (local.inverse g \<cdot>| K)) = \<phi> K
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. quot_comp_alt g (\<phi> (local.inverse g \<cdot>| K)) = \<phi> K
[PROOF STEP]
have "g \<cdot> (\<phi> (inverse g \<cdot>| K)) \<in> (g \<cdot> (inverse g) \<cdot>| K)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g \<cdot> \<phi> (local.inverse g \<cdot>| K) \<in> g \<cdot> local.inverse g \<cdot>| K
[PROOF STEP]
using phi_coset_mem assms
[PROOF STATE]
proof (prove)
using this:
?a \<in> G \<Longrightarrow> \<phi> (?a \<cdot>| K) \<in> ?a \<cdot>| K
g \<in> G

goal (1 subgoal):
 1. g \<cdot> \<phi> (local.inverse g \<cdot>| K) \<in> g \<cdot> local.inverse g \<cdot>| K
[PROOF STEP]
by (smt (z3) Left_Coset_memE factor_unit invertible invertible_right_inverse
    invertible_inverse_closed invertible_inverse_inverse sub invertible_left_inverse2)
[PROOF STATE]
proof (state)
this:
g \<cdot> \<phi> (local.inverse g \<cdot>| K) \<in> g \<cdot> local.inverse g \<cdot>| K

goal (1 subgoal):
 1. quot_comp_alt g (\<phi> (local.inverse g \<cdot>| K)) = \<phi> K
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
g \<cdot> \<phi> (local.inverse g \<cdot>| K) \<in> g \<cdot> local.inverse g \<cdot>| K
[PROOF STEP]
have "g \<cdot> (\<phi> (inverse g \<cdot>| K)) \<cdot>| K = K"
[PROOF STATE]
proof (prove)
using this:
g \<cdot> \<phi> (local.inverse g \<cdot>| K) \<in> g \<cdot> local.inverse g \<cdot>| K

goal (1 subgoal):
 1. g \<cdot> \<phi> (local.inverse g \<cdot>| K) \<cdot>| K = K
[PROOF STEP]
using Block_self Left_Coset_Class_unit Normal_def quotient.unit_closed sub
[PROOF STATE]
proof (prove)
using this:
g \<cdot> \<phi> (local.inverse g \<cdot>| K) \<in> g \<cdot> local.inverse g \<cdot>| K
\<lbrakk>?a \<in> ?A; ?A \<in> Partition\<rbrakk> \<Longrightarrow> Class ?a = ?A
?g \<in> G \<Longrightarrow> ?g \<cdot>| K = Class ?g
K = Class \<one>
Class \<one> \<in> Partition
?a \<in> K \<Longrightarrow> ?a \<in> G

goal (1 subgoal):
 1. g \<cdot> \<phi> (local.inverse g \<cdot>| K) \<cdot>| K = K
[PROOF STEP]
by (metis assms composition_closed invertible invertible_inverse_closed invertible_right_inverse)
[PROOF STATE]
proof (state)
this:
g \<cdot> \<phi> (local.inverse g \<cdot>| K) \<cdot>| K = K

goal (1 subgoal):
 1. quot_comp_alt g (\<phi> (local.inverse g \<cdot>| K)) = \<phi> K
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
g \<cdot> \<phi> (local.inverse g \<cdot>| K) \<cdot>| K = K
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
g \<cdot> \<phi> (local.inverse g \<cdot>| K) \<cdot>| K = K

goal (1 subgoal):
 1. quot_comp_alt g (\<phi> (local.inverse g \<cdot>| K)) = \<phi> K
[PROOF STEP]
using quot_comp_alt_def
[PROOF STATE]
proof (prove)
using this:
g \<cdot> \<phi> (local.inverse g \<cdot>| K) \<cdot>| K = K
quot_comp_alt ?a ?b = \<phi> (?a \<cdot> ?b \<cdot>| K)

goal (1 subgoal):
 1. quot_comp_alt g (\<phi> (local.inverse g \<cdot>| K)) = \<phi> K
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
quot_comp_alt g (\<phi> (local.inverse g \<cdot>| K)) = \<phi> K

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma continuous_image_subset_rel_interior:
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
  assumes contf: "continuous_on S f" and injf: "inj_on f S" and fim: "f ` S \<subseteq> T"
      and TS: "aff_dim T \<le> aff_dim S"
  shows "f ` (rel_interior S) \<subseteq> rel_interior(f ` S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` rel_interior S \<subseteq> rel_interior (f ` S)
[PROOF STEP]
proof (rule rel_interior_maximal)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. f ` rel_interior S \<subseteq> f ` S
 2. openin (top_of_set (affine hull f ` S)) (f ` rel_interior S)
[PROOF STEP]
show "f ` rel_interior S \<subseteq> f ` S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` rel_interior S \<subseteq> f ` S
[PROOF STEP]
by(simp add: image_mono rel_interior_subset)
[PROOF STATE]
proof (state)
this:
f ` rel_interior S \<subseteq> f ` S

goal (1 subgoal):
 1. openin (top_of_set (affine hull f ` S)) (f ` rel_interior S)
[PROOF STEP]
show "openin (top_of_set (affine hull f ` S)) (f ` rel_interior S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. openin (top_of_set (affine hull f ` S)) (f ` rel_interior S)
[PROOF STEP]
proof (rule invariance_of_domain_affine_sets)
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. openin (top_of_set ?U) (rel_interior S)
 2. affine ?U
 3. affine (affine hull f ` S)
 4. aff_dim (affine hull f ` S) \<le> aff_dim ?U
 5. continuous_on (rel_interior S) f
 6. f ` rel_interior S \<subseteq> affine hull f ` S
 7. inj_on f (rel_interior S)
[PROOF STEP]
show "openin (top_of_set (affine hull S)) (rel_interior S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. openin (top_of_set (affine hull S)) (rel_interior S)
[PROOF STEP]
by (simp add: openin_rel_interior)
[PROOF STATE]
proof (state)
this:
openin (top_of_set (affine hull S)) (rel_interior S)

goal (6 subgoals):
 1. affine (affine hull S)
 2. affine (affine hull f ` S)
 3. aff_dim (affine hull f ` S) \<le> aff_dim (affine hull S)
 4. continuous_on (rel_interior S) f
 5. f ` rel_interior S \<subseteq> affine hull f ` S
 6. inj_on f (rel_interior S)
[PROOF STEP]
show "aff_dim (affine hull f ` S) \<le> aff_dim (affine hull S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. aff_dim (affine hull f ` S) \<le> aff_dim (affine hull S)
[PROOF STEP]
by (metis aff_dim_affine_hull aff_dim_subset fim TS order_trans)
[PROOF STATE]
proof (state)
this:
aff_dim (affine hull f ` S) \<le> aff_dim (affine hull S)

goal (5 subgoals):
 1. affine (affine hull S)
 2. affine (affine hull f ` S)
 3. continuous_on (rel_interior S) f
 4. f ` rel_interior S \<subseteq> affine hull f ` S
 5. inj_on f (rel_interior S)
[PROOF STEP]
show "f ` rel_interior S \<subseteq> affine hull f ` S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` rel_interior S \<subseteq> affine hull f ` S
[PROOF STEP]
by (meson \<open>f ` rel_interior S \<subseteq> f ` S\<close> hull_subset order_trans)
[PROOF STATE]
proof (state)
this:
f ` rel_interior S \<subseteq> affine hull f ` S

goal (4 subgoals):
 1. affine (affine hull S)
 2. affine (affine hull f ` S)
 3. continuous_on (rel_interior S) f
 4. inj_on f (rel_interior S)
[PROOF STEP]
show "continuous_on (rel_interior S) f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on (rel_interior S) f
[PROOF STEP]
using contf continuous_on_subset rel_interior_subset
[PROOF STATE]
proof (prove)
using this:
continuous_on S f
\<lbrakk>continuous_on ?s ?f; ?t \<subseteq> ?s\<rbrakk> \<Longrightarrow> continuous_on ?t ?f
rel_interior ?S \<subseteq> ?S

goal (1 subgoal):
 1. continuous_on (rel_interior S) f
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
continuous_on (rel_interior S) f

goal (3 subgoals):
 1. affine (affine hull S)
 2. affine (affine hull f ` S)
 3. inj_on f (rel_interior S)
[PROOF STEP]
show "inj_on f (rel_interior S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on f (rel_interior S)
[PROOF STEP]
using inj_on_subset injf rel_interior_subset
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>inj_on ?f ?A; ?B \<subseteq> ?A\<rbrakk> \<Longrightarrow> inj_on ?f ?B
inj_on f S
rel_interior ?S \<subseteq> ?S

goal (1 subgoal):
 1. inj_on f (rel_interior S)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
inj_on f (rel_interior S)

goal (2 subgoals):
 1. affine (affine hull S)
 2. affine (affine hull f ` S)
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
openin (top_of_set (affine hull f ` S)) (f ` rel_interior S)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma closed_Collect_disj:
  assumes "closed {x. P x}" "closed {x. Q x}"
  shows "closed {x. P x \<or> Q x}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. closed {x. P x \<or> Q x}
[PROOF STEP]
using closed_Un[OF assms]
[PROOF STATE]
proof (prove)
using this:
closed ({x. P x} \<union> {x. Q x})

goal (1 subgoal):
 1. closed {x. P x \<or> Q x}
[PROOF STEP]
by (simp add: Un_def)


[STATEMENT]
lemma position_augment:
  assumes "position ((augment_list f ^^ n) p)"
  shows "position p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. position p
[PROOF STEP]
using assms length_augment_list[of n f p]
[PROOF STATE]
proof (prove)
using this:
position ((augment_list f ^^ n) p)
length ((augment_list f ^^ n) p) = n + length p

goal (1 subgoal):
 1. position p
[PROOF STEP]
unfolding position_def
[PROOF STATE]
proof (prove)
using this:
enat (length ((augment_list f ^^ n) p)) \<le> 2 * N
length ((augment_list f ^^ n) p) = n + length p

goal (1 subgoal):
 1. enat (length p) \<le> 2 * N
[PROOF STEP]
by fastforce


[STATEMENT]
lemma coeffs_uminus [code abstract]:
  "coeffs (- p) = map uminus (coeffs p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. coeffs (- p) = map uminus (coeffs p)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. coeffs (- p) = map uminus (coeffs p)
[PROOF STEP]
have eq_0: "HOL.eq 0 \<circ> uminus = HOL.eq (0::'a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (=) (0::'a) \<circ> uminus = (=) (0::'a)
[PROOF STEP]
by (simp add: fun_eq_iff)
[PROOF STATE]
proof (state)
this:
(=) (0::'a) \<circ> uminus = (=) (0::'a)

goal (1 subgoal):
 1. coeffs (- p) = map uminus (coeffs p)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. coeffs (- p) = map uminus (coeffs p)
[PROOF STEP]
by (rule coeffs_eqI) (simp_all add: nth_default_map_eq nth_default_coeffs_eq no_trailing_map eq_0)
[PROOF STATE]
proof (state)
this:
coeffs (- p) = map uminus (coeffs p)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma measurable_distr_prob_space2[measurable (raw)]:
  assumes f: "g \<in> L \<rightarrow>\<^sub>M prob_algebra M" "(\<lambda>(x, y). f x y) \<in> L \<Otimes>\<^sub>M M \<rightarrow>\<^sub>M N"
  shows "(\<lambda>x. distr (g x) N (f x)) \<in> L \<rightarrow>\<^sub>M prob_algebra N"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. distr (g x) N (f x)) \<in> L \<rightarrow>\<^sub>M prob_algebra N
[PROOF STEP]
unfolding prob_algebra_def measurable_restrict_space2_iff
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. distr (g x) N (f x)) \<in> L \<rightarrow>\<^sub>M subprob_algebra N \<and> (\<lambda>x. distr (g x) N (f x)) \<in> space L \<rightarrow> Collect prob_space
[PROOF STEP]
proof (intro conjI measurable_restrict_space1 measurable_distr2[where M=M] f measurable_prob_algebraD)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>x. distr (g x) N (f x)) \<in> space L \<rightarrow> Collect prob_space
[PROOF STEP]
show "(\<lambda>x. distr (g x) N (f x)) \<in> space L \<rightarrow> Collect prob_space"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. distr (g x) N (f x)) \<in> space L \<rightarrow> Collect prob_space
[PROOF STEP]
using f subprob_measurableD[OF measurable_prob_algebraD[OF f(1)]]
[PROOF STATE]
proof (prove)
using this:
g \<in> L \<rightarrow>\<^sub>M prob_algebra M
(\<lambda>(x, y). f x y) \<in> L \<Otimes>\<^sub>M M \<rightarrow>\<^sub>M N
?x \<in> space L \<Longrightarrow> space (g ?x) = space M
?x \<in> space L \<Longrightarrow> sets (g ?x) = sets M
?x \<in> space L \<Longrightarrow> g ?x \<rightarrow>\<^sub>M ?K = M \<rightarrow>\<^sub>M ?K
?x \<in> space L \<Longrightarrow> ?K \<rightarrow>\<^sub>M g ?x = ?K \<rightarrow>\<^sub>M M

goal (1 subgoal):
 1. (\<lambda>x. distr (g x) N (f x)) \<in> space L \<rightarrow> Collect prob_space
[PROOF STEP]
by (auto simp: measurable_restrict_space2_iff prob_algebra_def
             intro!: prob_space.prob_space_distr)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. distr (g x) N (f x)) \<in> space L \<rightarrow> Collect prob_space

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma disjoint_darcs_img:
  assumes "disjoint_darcs xs" and "\<forall>(t,e) \<in> fset xs. darcs (f t) \<subseteq> darcs t"
  shows "disjoint_darcs ((\<lambda>(t,e). (f t,e)) |`| xs)" (is "disjoint_darcs ?xs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. disjoint_darcs ((\<lambda>(t, e). (f t, e)) |`| xs)
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> disjoint_darcs ((\<lambda>(t, e). (f t, e)) |`| xs) \<Longrightarrow> False
[PROOF STEP]
assume "\<not> disjoint_darcs ?xs"
[PROOF STATE]
proof (state)
this:
\<not> disjoint_darcs ((\<lambda>(t, e). (f t, e)) |`| xs)

goal (1 subgoal):
 1. \<not> disjoint_darcs ((\<lambda>(t, e). (f t, e)) |`| xs) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> disjoint_darcs ((\<lambda>(t, e). (f t, e)) |`| xs)
[PROOF STEP]
obtain x1 e1 y1 e2 where asm: "(x1,e1) \<in> fset ?xs" "(y1,e2) \<in> fset ?xs"
      "e1 \<in> darcs x1 \<or> (darcs x1 \<union> {e1}) \<inter> (darcs y1 \<union> {e2}) \<noteq> {} \<and> (x1,e1)\<noteq>(y1,e2)"
[PROOF STATE]
proof (prove)
using this:
\<not> disjoint_darcs ((\<lambda>(t, e). (f t, e)) |`| xs)

goal (1 subgoal):
 1. (\<And>x1 e1 y1 e2. \<lbrakk>(x1, e1) \<in> fset ((\<lambda>(t, e). (f t, e)) |`| xs); (y1, e2) \<in> fset ((\<lambda>(t, e). (f t, e)) |`| xs); e1 \<in> darcs x1 \<or> (darcs x1 \<union> {e1}) \<inter> (darcs y1 \<union> {e2}) \<noteq> {} \<and> (x1, e1) \<noteq> (y1, e2)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(x1, e1) \<in> fset ((\<lambda>(t, e). (f t, e)) |`| xs)
(y1, e2) \<in> fset ((\<lambda>(t, e). (f t, e)) |`| xs)
e1 \<in> darcs x1 \<or> (darcs x1 \<union> {e1}) \<inter> (darcs y1 \<union> {e2}) \<noteq> {} \<and> (x1, e1) \<noteq> (y1, e2)

goal (1 subgoal):
 1. \<not> disjoint_darcs ((\<lambda>(t, e). (f t, e)) |`| xs) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(x1, e1) \<in> fset ((\<lambda>(t, e). (f t, e)) |`| xs)
(y1, e2) \<in> fset ((\<lambda>(t, e). (f t, e)) |`| xs)
e1 \<in> darcs x1 \<or> (darcs x1 \<union> {e1}) \<inter> (darcs y1 \<union> {e2}) \<noteq> {} \<and> (x1, e1) \<noteq> (y1, e2)
[PROOF STEP]
obtain x2 where x2_def: "f x2 = x1" "(x2,e1) \<in> fset xs"
[PROOF STATE]
proof (prove)
using this:
(x1, e1) \<in> fset ((\<lambda>(t, e). (f t, e)) |`| xs)
(y1, e2) \<in> fset ((\<lambda>(t, e). (f t, e)) |`| xs)
e1 \<in> darcs x1 \<or> (darcs x1 \<union> {e1}) \<inter> (darcs y1 \<union> {e2}) \<noteq> {} \<and> (x1, e1) \<noteq> (y1, e2)

goal (1 subgoal):
 1. (\<And>x2. \<lbrakk>f x2 = x1; (x2, e1) \<in> fset xs\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f x2 = x1
(x2, e1) \<in> fset xs

goal (1 subgoal):
 1. \<not> disjoint_darcs ((\<lambda>(t, e). (f t, e)) |`| xs) \<Longrightarrow> False
[PROOF STEP]
obtain y2 where y2_def: "f y2 = y1" "(y2,e2) \<in> fset xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>y2. \<lbrakk>f y2 = y1; (y2, e2) \<in> fset xs\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using asm(2)
[PROOF STATE]
proof (prove)
using this:
(y1, e2) \<in> fset ((\<lambda>(t, e). (f t, e)) |`| xs)

goal (1 subgoal):
 1. (\<And>y2. \<lbrakk>f y2 = y1; (y2, e2) \<in> fset xs\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f y2 = y1
(y2, e2) \<in> fset xs

goal (1 subgoal):
 1. \<not> disjoint_darcs ((\<lambda>(t, e). (f t, e)) |`| xs) \<Longrightarrow> False
[PROOF STEP]
have "darcs x1 \<subseteq> darcs x2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. darcs x1 \<subseteq> darcs x2
[PROOF STEP]
using assms(2) x2_def
[PROOF STATE]
proof (prove)
using this:
\<forall>(t, e)\<in>fset xs. darcs (f t) \<subseteq> darcs t
f x2 = x1
(x2, e1) \<in> fset xs

goal (1 subgoal):
 1. darcs x1 \<subseteq> darcs x2
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
darcs x1 \<subseteq> darcs x2

goal (1 subgoal):
 1. \<not> disjoint_darcs ((\<lambda>(t, e). (f t, e)) |`| xs) \<Longrightarrow> False
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
darcs x1 \<subseteq> darcs x2

goal (1 subgoal):
 1. \<not> disjoint_darcs ((\<lambda>(t, e). (f t, e)) |`| xs) \<Longrightarrow> False
[PROOF STEP]
have "darcs y1 \<subseteq> darcs y2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. darcs y1 \<subseteq> darcs y2
[PROOF STEP]
using assms(2) y2_def
[PROOF STATE]
proof (prove)
using this:
\<forall>(t, e)\<in>fset xs. darcs (f t) \<subseteq> darcs t
f y2 = y1
(y2, e2) \<in> fset xs

goal (1 subgoal):
 1. darcs y1 \<subseteq> darcs y2
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
darcs y1 \<subseteq> darcs y2

goal (1 subgoal):
 1. \<not> disjoint_darcs ((\<lambda>(t, e). (f t, e)) |`| xs) \<Longrightarrow> False
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
darcs x1 \<subseteq> darcs x2
darcs y1 \<subseteq> darcs y2
[PROOF STEP]
have "\<not> disjoint_darcs xs"
[PROOF STATE]
proof (prove)
using this:
darcs x1 \<subseteq> darcs x2
darcs y1 \<subseteq> darcs y2

goal (1 subgoal):
 1. \<not> disjoint_darcs xs
[PROOF STEP]
using asm(3) x2_def y2_def
[PROOF STATE]
proof (prove)
using this:
darcs x1 \<subseteq> darcs x2
darcs y1 \<subseteq> darcs y2
e1 \<in> darcs x1 \<or> (darcs x1 \<union> {e1}) \<inter> (darcs y1 \<union> {e2}) \<noteq> {} \<and> (x1, e1) \<noteq> (y1, e2)
f x2 = x1
(x2, e1) \<in> fset xs
f y2 = y1
(y2, e2) \<in> fset xs

goal (1 subgoal):
 1. \<not> disjoint_darcs xs
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
\<not> disjoint_darcs xs

goal (1 subgoal):
 1. \<not> disjoint_darcs ((\<lambda>(t, e). (f t, e)) |`| xs) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> disjoint_darcs xs
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
\<not> disjoint_darcs xs

goal (1 subgoal):
 1. False
[PROOF STEP]
using assms(1)
[PROOF STATE]
proof (prove)
using this:
\<not> disjoint_darcs xs
disjoint_darcs xs

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma has_sum_uminus:
  fixes f :: \<open>'a \<Rightarrow> 'b::topological_ab_group_add\<close>
  shows \<open>has_sum (\<lambda>x. - f x) A a \<longleftrightarrow> has_sum f A (- a)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. has_sum (\<lambda>x. - f x) A a = has_sum f A (- a)
[PROOF STEP]
by (auto simp add: sum_negf[abs_def] tendsto_minus_cancel_left has_sum_def)


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

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


[STATEMENT]
lemma open_Collect_conj:
  assumes "open {x. P x}" "open {x. Q x}"
  shows "open {x. P x \<and> Q x}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. open {x. P x \<and> Q x}
[PROOF STEP]
using open_Int[OF assms]
[PROOF STATE]
proof (prove)
using this:
open ({x. P x} \<inter> {x. Q x})

goal (1 subgoal):
 1. open {x. P x \<and> Q x}
[PROOF STEP]
by (simp add: Int_def)


[STATEMENT]
lemma norm_fds_nth_newman:
  "norm (fds_nth fds_newman n) = \<MM> n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmod (fds_nth fds_newman n) = \<MM> (real n)
[PROOF STEP]
unfolding fds_nth_newman norm_of_real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>\<MM> (real n)\<bar> = \<MM> (real n)
[PROOF STEP]
by (intro abs_of_nonneg sum_nonneg divide_nonneg_pos) (auto dest: prime_ge_1_nat)


[STATEMENT]
lemma gcd_diff_r: "m\<le>n \<Longrightarrow> gcd m n = gcd m (n-m)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m \<le> n \<Longrightarrow> Arith2.gcd m n = Arith2.gcd m (n - m)
[PROOF STEP]
apply (unfold gcd_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m \<le> n \<Longrightarrow> (SOME x. cd x m n \<and> (\<forall>y. cd y m n \<longrightarrow> y \<le> x)) = (SOME x. cd x m (n - m) \<and> (\<forall>y. cd y m (n - m) \<longrightarrow> y \<le> x))
[PROOF STEP]
apply (subgoal_tac "m\<le>n \<Longrightarrow> \<forall>x. cd x m n = cd x m (n-m) ")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>m \<le> n; m \<le> n \<Longrightarrow> \<forall>x. cd x m n = cd x m (n - m)\<rbrakk> \<Longrightarrow> (SOME x. cd x m n \<and> (\<forall>y. cd y m n \<longrightarrow> y \<le> x)) = (SOME x. cd x m (n - m) \<and> (\<forall>y. cd y m (n - m) \<longrightarrow> y \<le> x))
 2. \<lbrakk>m \<le> n; m \<le> n\<rbrakk> \<Longrightarrow> \<forall>x. cd x m n = cd x m (n - m)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>m \<le> n; m \<le> n\<rbrakk> \<Longrightarrow> \<forall>x. cd x m n = cd x m (n - m)
[PROOF STEP]
apply (rule allI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>m \<le> n; m \<le> n\<rbrakk> \<Longrightarrow> cd x m n = cd x m (n - m)
[PROOF STEP]
apply (erule cd_diff_r)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma lub_belowI[intro, simp]:
  fixes x :: "'a :: Join_cpo"
  shows  "(\<And> y. y \<in> S \<Longrightarrow> y \<sqsubseteq> x) \<Longrightarrow> lub S \<sqsubseteq> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>y. y \<in> S \<Longrightarrow> y \<sqsubseteq> x) \<Longrightarrow> lub S \<sqsubseteq> x
[PROOF STEP]
by (metis exists_lub is_lub_thelub_ex is_ub_def)


[STATEMENT]
lemma fds_nth_mult_const_left [simp]: "fds_nth (fds_const c * f) n = c * fds_nth f n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds_nth (fds_const c * f) n = c * fds_nth f n
[PROOF STEP]
by (cases "n = 0") (simp_all add: fds_nth_mult fds_const_def)


[STATEMENT]
lemma finite_identity_rules[intro]:
  assumes "finite L"
  shows "finite (identity_rules L)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (identity_rules L)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite L

goal (1 subgoal):
 1. finite (identity_rules L)
[PROOF STEP]
unfolding identity_rules_def
[PROOF STATE]
proof (prove)
using this:
finite L

goal (1 subgoal):
 1. finite ({reflexivity_rule S_Idt, transitive_rule S_Idt, symmetry_rule S_Idt} \<union> congruence_rules S_Idt L)
[PROOF STEP]
by auto


[STATEMENT]
lemma finite_two_chain_vertical_boundary:
  assumes "finite two_chain"
  shows "finite (two_chain_vertical_boundary two_chain)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (two_chain_vertical_boundary two_chain)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite two_chain

goal (1 subgoal):
 1. finite (two_chain_vertical_boundary two_chain)
[PROOF STEP]
by (simp add: two_chain_vertical_boundary_def vertical_boundary_def)


[STATEMENT]
lemma lift_sup_distrib: "lift x (a \<squnion> b) = lift x a \<squnion> lift x b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lift x (a \<squnion> b) = lift x a \<squnion> lift x b
[PROOF STEP]
by (simp add: image_Un lift_def sup_V_def)


[STATEMENT]
lemma nodes_of_component[simp]: "nodes (component_of g r) = reachable_nodes g r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nodes (component_of g r) = reachable_nodes g r
[PROOF STEP]
apply (rule equalityI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. nodes (component_of g r) \<subseteq> reachable_nodes g r
 2. reachable_nodes g r \<subseteq> nodes (component_of g r)
[PROOF STEP]
unfolding component_of_def reachable_nodes_def
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. nodes (ins_node r (restrict_nodes g ((edges g)\<^sup>* `` {r}))) \<subseteq> (edges g)\<^sup>* `` {r}
 2. (edges g)\<^sup>* `` {r} \<subseteq> nodes (ins_node r (restrict_nodes g ((edges g)\<^sup>* `` {r})))
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nodes (ins_node r (restrict_nodes g ((edges g)\<^sup>* `` {r}))) \<subseteq> (edges g)\<^sup>* `` {r}
[PROOF STEP]
by auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (edges g)\<^sup>* `` {r} \<subseteq> nodes (ins_node r (restrict_nodes g ((edges g)\<^sup>* `` {r})))
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (edges g)\<^sup>* `` {r} \<subseteq> nodes (ins_node r (restrict_nodes g ((edges g)\<^sup>* `` {r})))
[PROOF STEP]
by clarsimp (metis nodesI(2) rtranclE)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma sym_mod_code[code]: "sym_mod x y = (let m = x mod y
   in if m + m \<le> y then m else m - y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x symmod y = (let m = x mod y in if m + m \<le> y then m else m - y)
[PROOF STEP]
unfolding sym_mod_def poly_mod.inv_M_def Let_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (if x mod y + x mod y \<le> y then x mod y else x mod y - y) = (if x mod y + x mod y \<le> y then x mod y else x mod y - y)
[PROOF STEP]
..


[STATEMENT]
lemma f_flow_continuous_on: "continuous_on (Sigma X existence_ivl0) (\<lambda>(x0, t). f (flow0 x0 t))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on (Sigma X existence_ivl0) (\<lambda>(x0, t). f (flow0 x0 t))
[PROOF STEP]
using flow_continuous_on_state_space
[PROOF STATE]
proof (prove)
using this:
continuous_on (Sigma X existence_ivl0) (\<lambda>(x, y). flow0 x y)

goal (1 subgoal):
 1. continuous_on (Sigma X existence_ivl0) (\<lambda>(x0, t). f (flow0 x0 t))
[PROOF STEP]
by (auto intro!: continuous_on_f flow_in_domain simp: split_beta')


[STATEMENT]
lemma trg_join_of:
    assumes "join_of t u v"
    shows "trg (t \\ u) = trg v" and "trg (u \\ t) = trg v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. trg (t \ u) = trg v &&& trg (u \ t) = trg v
[PROOF STEP]
by (metis assms join_of_def trg_composite_of)+


[STATEMENT]
lemma head_minus_poly_rev_list:
  "length d \<le> length r \<Longrightarrow> d \<noteq> [] \<Longrightarrow>
    hd (minus_poly_rev_list (map ((*) (last d)) r) (map ((*) (hd r)) (rev d))) = 0"
  for d r :: "'a::comm_ring list"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>length d \<le> length r; d \<noteq> []\<rbrakk> \<Longrightarrow> hd (minus_poly_rev_list (map ((*) (last d)) r) (map ((*) (hd r)) (rev d))) = (0::'a)
[PROOF STEP]
proof (induct r)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>length d \<le> length []; d \<noteq> []\<rbrakk> \<Longrightarrow> hd (minus_poly_rev_list (map ((*) (last d)) []) (map ((*) (hd [])) (rev d))) = (0::'a)
 2. \<And>a r. \<lbrakk>\<lbrakk>length d \<le> length r; d \<noteq> []\<rbrakk> \<Longrightarrow> hd (minus_poly_rev_list (map ((*) (last d)) r) (map ((*) (hd r)) (rev d))) = (0::'a); length d \<le> length (a # r); d \<noteq> []\<rbrakk> \<Longrightarrow> hd (minus_poly_rev_list (map ((*) (last d)) (a # r)) (map ((*) (hd (a # r))) (rev d))) = (0::'a)
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:
length d \<le> length []
d \<noteq> []

goal (2 subgoals):
 1. \<lbrakk>length d \<le> length []; d \<noteq> []\<rbrakk> \<Longrightarrow> hd (minus_poly_rev_list (map ((*) (last d)) []) (map ((*) (hd [])) (rev d))) = (0::'a)
 2. \<And>a r. \<lbrakk>\<lbrakk>length d \<le> length r; d \<noteq> []\<rbrakk> \<Longrightarrow> hd (minus_poly_rev_list (map ((*) (last d)) r) (map ((*) (hd r)) (rev d))) = (0::'a); length d \<le> length (a # r); d \<noteq> []\<rbrakk> \<Longrightarrow> hd (minus_poly_rev_list (map ((*) (last d)) (a # r)) (map ((*) (hd (a # r))) (rev d))) = (0::'a)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
length d \<le> length []
d \<noteq> []
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
length d \<le> length []
d \<noteq> []

goal (1 subgoal):
 1. hd (minus_poly_rev_list (map ((*) (last d)) []) (map ((*) (hd [])) (rev d))) = (0::'a)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
hd (minus_poly_rev_list (map ((*) (last d)) []) (map ((*) (hd [])) (rev d))) = (0::'a)

goal (1 subgoal):
 1. \<And>a r. \<lbrakk>\<lbrakk>length d \<le> length r; d \<noteq> []\<rbrakk> \<Longrightarrow> hd (minus_poly_rev_list (map ((*) (last d)) r) (map ((*) (hd r)) (rev d))) = (0::'a); length d \<le> length (a # r); d \<noteq> []\<rbrakk> \<Longrightarrow> hd (minus_poly_rev_list (map ((*) (last d)) (a # r)) (map ((*) (hd (a # r))) (rev d))) = (0::'a)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a r. \<lbrakk>\<lbrakk>length d \<le> length r; d \<noteq> []\<rbrakk> \<Longrightarrow> hd (minus_poly_rev_list (map ((*) (last d)) r) (map ((*) (hd r)) (rev d))) = (0::'a); length d \<le> length (a # r); d \<noteq> []\<rbrakk> \<Longrightarrow> hd (minus_poly_rev_list (map ((*) (last d)) (a # r)) (map ((*) (hd (a # r))) (rev d))) = (0::'a)
[PROOF STEP]
case (Cons a rs)
[PROOF STATE]
proof (state)
this:
\<lbrakk>length d \<le> length rs; d \<noteq> []\<rbrakk> \<Longrightarrow> hd (minus_poly_rev_list (map ((*) (last d)) rs) (map ((*) (hd rs)) (rev d))) = (0::'a)
length d \<le> length (a # rs)
d \<noteq> []

goal (1 subgoal):
 1. \<And>a r. \<lbrakk>\<lbrakk>length d \<le> length r; d \<noteq> []\<rbrakk> \<Longrightarrow> hd (minus_poly_rev_list (map ((*) (last d)) r) (map ((*) (hd r)) (rev d))) = (0::'a); length d \<le> length (a # r); d \<noteq> []\<rbrakk> \<Longrightarrow> hd (minus_poly_rev_list (map ((*) (last d)) (a # r)) (map ((*) (hd (a # r))) (rev d))) = (0::'a)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>length d \<le> length rs; d \<noteq> []\<rbrakk> \<Longrightarrow> hd (minus_poly_rev_list (map ((*) (last d)) rs) (map ((*) (hd rs)) (rev d))) = (0::'a)
length d \<le> length (a # rs)
d \<noteq> []
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>length d \<le> length rs; d \<noteq> []\<rbrakk> \<Longrightarrow> hd (minus_poly_rev_list (map ((*) (last d)) rs) (map ((*) (hd rs)) (rev d))) = (0::'a)
length d \<le> length (a # rs)
d \<noteq> []

goal (1 subgoal):
 1. hd (minus_poly_rev_list (map ((*) (last d)) (a # rs)) (map ((*) (hd (a # rs))) (rev d))) = (0::'a)
[PROOF STEP]
by (cases "rev d") (simp_all add: ac_simps)
[PROOF STATE]
proof (state)
this:
hd (minus_poly_rev_list (map ((*) (last d)) (a # rs)) (map ((*) (hd (a # rs))) (rev d))) = (0::'a)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma \<nu>\<^sub>b_vec: "policy_eval' (vec_to_fun d) = vec_to_bfun (matrix_inv (mat 1 - l *\<^sub>R (P_mat (vec_to_fun d))) *v (r_vec' (vec_to_fun d)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. policy_eval' (vec_to_fun d) = vec_to_bfun (matrix_inv (mat 1 - l *\<^sub>R P_mat (vec_to_fun d)) *v r_vec' (vec_to_fun d))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. policy_eval' (vec_to_fun d) = vec_to_bfun (matrix_inv (mat 1 - l *\<^sub>R P_mat (vec_to_fun d)) *v r_vec' (vec_to_fun d))
[PROOF STEP]
let ?d = "Rep_Fun (vec_to_fun d)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. policy_eval' (vec_to_fun d) = vec_to_bfun (matrix_inv (mat 1 - l *\<^sub>R P_mat (vec_to_fun d)) *v r_vec' (vec_to_fun d))
[PROOF STEP]
have "vec_to_bfun (matrix_inv (mat 1 - l *\<^sub>R (P_mat (vec_to_fun d))) *v (r_vec' (vec_to_fun d))) = matrix_to_blinfun (matrix_inv (mat 1 - l *\<^sub>R (P_mat (vec_to_fun d)))) (vec_to_bfun (r_vec' (vec_to_fun d)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vec_to_bfun (matrix_inv (mat 1 - l *\<^sub>R P_mat (vec_to_fun d)) *v r_vec' (vec_to_fun d)) = blinfun_apply (matrix_to_blinfun (matrix_inv (mat 1 - l *\<^sub>R P_mat (vec_to_fun d)))) (vec_to_bfun (r_vec' (vec_to_fun d)))
[PROOF STEP]
by (auto simp: matrix_to_blinfun_mult vec_to_bfun_def r_vec'_def)
[PROOF STATE]
proof (state)
this:
vec_to_bfun (matrix_inv (mat 1 - l *\<^sub>R P_mat (vec_to_fun d)) *v r_vec' (vec_to_fun d)) = blinfun_apply (matrix_to_blinfun (matrix_inv (mat 1 - l *\<^sub>R P_mat (vec_to_fun d)))) (vec_to_bfun (r_vec' (vec_to_fun d)))

goal (1 subgoal):
 1. policy_eval' (vec_to_fun d) = vec_to_bfun (matrix_inv (mat 1 - l *\<^sub>R P_mat (vec_to_fun d)) *v r_vec' (vec_to_fun d))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
vec_to_bfun (matrix_inv (mat 1 - l *\<^sub>R P_mat (vec_to_fun d)) *v r_vec' (vec_to_fun d)) = blinfun_apply (matrix_to_blinfun (matrix_inv (mat 1 - l *\<^sub>R P_mat (vec_to_fun d)))) (vec_to_bfun (r_vec' (vec_to_fun d)))

goal (1 subgoal):
 1. policy_eval' (vec_to_fun d) = vec_to_bfun (matrix_inv (mat 1 - l *\<^sub>R P_mat (vec_to_fun d)) *v r_vec' (vec_to_fun d))
[PROOF STEP]
have "\<dots> = matrix_to_blinfun (matrix_inv (blinfun_to_matrix (id_blinfun - l *\<^sub>R \<P>\<^sub>1 (mk_dec_det ?d)))) (r_dec\<^sub>b (mk_dec_det ?d))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. blinfun_apply (matrix_to_blinfun (matrix_inv (mat 1 - l *\<^sub>R P_mat (vec_to_fun d)))) (vec_to_bfun (r_vec' (vec_to_fun d))) = blinfun_apply (matrix_to_blinfun (matrix_inv (blinfun_to_matrix (id_blinfun - l *\<^sub>R \<P>\<^sub>1 (mk_dec_det (Rep_Fun (vec_to_fun d))))))) (r_det\<^sub>b (Rep_Fun (vec_to_fun d)))
[PROOF STEP]
unfolding mat_eq_blinfun
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. blinfun_apply (matrix_to_blinfun (matrix_inv (blinfun_to_matrix (id_blinfun - l *\<^sub>R \<P>\<^sub>1 (mk_dec_det (($) d)))))) (vec_to_bfun (r_vec' (vec_to_fun d))) = blinfun_apply (matrix_to_blinfun (matrix_inv (blinfun_to_matrix (id_blinfun - l *\<^sub>R \<P>\<^sub>1 (mk_dec_det (Rep_Fun (vec_to_fun d))))))) (r_det\<^sub>b (Rep_Fun (vec_to_fun d)))
[PROOF STEP]
by (auto simp:  r_vec'_def vec_to_bfun_def vec_lambda_inverse r_dec\<^sub>b_def vec_to_fun_def)
[PROOF STATE]
proof (state)
this:
blinfun_apply (matrix_to_blinfun (matrix_inv (mat 1 - l *\<^sub>R P_mat (vec_to_fun d)))) (vec_to_bfun (r_vec' (vec_to_fun d))) = blinfun_apply (matrix_to_blinfun (matrix_inv (blinfun_to_matrix (id_blinfun - l *\<^sub>R \<P>\<^sub>1 (mk_dec_det (Rep_Fun (vec_to_fun d))))))) (r_det\<^sub>b (Rep_Fun (vec_to_fun d)))

goal (1 subgoal):
 1. policy_eval' (vec_to_fun d) = vec_to_bfun (matrix_inv (mat 1 - l *\<^sub>R P_mat (vec_to_fun d)) *v r_vec' (vec_to_fun d))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
blinfun_apply (matrix_to_blinfun (matrix_inv (mat 1 - l *\<^sub>R P_mat (vec_to_fun d)))) (vec_to_bfun (r_vec' (vec_to_fun d))) = blinfun_apply (matrix_to_blinfun (matrix_inv (blinfun_to_matrix (id_blinfun - l *\<^sub>R \<P>\<^sub>1 (mk_dec_det (Rep_Fun (vec_to_fun d))))))) (r_det\<^sub>b (Rep_Fun (vec_to_fun d)))

goal (1 subgoal):
 1. policy_eval' (vec_to_fun d) = vec_to_bfun (matrix_inv (mat 1 - l *\<^sub>R P_mat (vec_to_fun d)) *v r_vec' (vec_to_fun d))
[PROOF STEP]
have "\<dots> = inv\<^sub>L (id_blinfun - l *\<^sub>R \<P>\<^sub>1 (mk_dec_det ?d)) (r_dec\<^sub>b (mk_dec_det ?d))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. blinfun_apply (matrix_to_blinfun (matrix_inv (blinfun_to_matrix (id_blinfun - l *\<^sub>R \<P>\<^sub>1 (mk_dec_det (Rep_Fun (vec_to_fun d))))))) (r_det\<^sub>b (Rep_Fun (vec_to_fun d))) = blinfun_apply (inv\<^sub>L (id_blinfun - l *\<^sub>R \<P>\<^sub>1 (mk_dec_det (Rep_Fun (vec_to_fun d))))) (r_det\<^sub>b (Rep_Fun (vec_to_fun d)))
[PROOF STEP]
by (auto simp: blinfun_to_matrix_inverse(2)[symmetric] invertible\<^sub>L_inf_sum matrix_to_blinfun_inv)
[PROOF STATE]
proof (state)
this:
blinfun_apply (matrix_to_blinfun (matrix_inv (blinfun_to_matrix (id_blinfun - l *\<^sub>R \<P>\<^sub>1 (mk_dec_det (Rep_Fun (vec_to_fun d))))))) (r_det\<^sub>b (Rep_Fun (vec_to_fun d))) = blinfun_apply (inv\<^sub>L (id_blinfun - l *\<^sub>R \<P>\<^sub>1 (mk_dec_det (Rep_Fun (vec_to_fun d))))) (r_det\<^sub>b (Rep_Fun (vec_to_fun d)))

goal (1 subgoal):
 1. policy_eval' (vec_to_fun d) = vec_to_bfun (matrix_inv (mat 1 - l *\<^sub>R P_mat (vec_to_fun d)) *v r_vec' (vec_to_fun d))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
vec_to_bfun (matrix_inv (mat 1 - l *\<^sub>R P_mat (vec_to_fun d)) *v r_vec' (vec_to_fun d)) = blinfun_apply (inv\<^sub>L (id_blinfun - l *\<^sub>R \<P>\<^sub>1 (mk_dec_det (Rep_Fun (vec_to_fun d))))) (r_det\<^sub>b (Rep_Fun (vec_to_fun d)))
[PROOF STEP]
have "vec_to_bfun (matrix_inv (mat 1 - l *\<^sub>R (P_mat (vec_to_fun d))) *v (r_vec' (vec_to_fun d))) = inv\<^sub>L (id_blinfun - l *\<^sub>R \<P>\<^sub>1 (mk_dec_det ?d)) (r_dec\<^sub>b (mk_dec_det ?d))"
[PROOF STATE]
proof (prove)
using this:
vec_to_bfun (matrix_inv (mat 1 - l *\<^sub>R P_mat (vec_to_fun d)) *v r_vec' (vec_to_fun d)) = blinfun_apply (inv\<^sub>L (id_blinfun - l *\<^sub>R \<P>\<^sub>1 (mk_dec_det (Rep_Fun (vec_to_fun d))))) (r_det\<^sub>b (Rep_Fun (vec_to_fun d)))

goal (1 subgoal):
 1. vec_to_bfun (matrix_inv (mat 1 - l *\<^sub>R P_mat (vec_to_fun d)) *v r_vec' (vec_to_fun d)) = blinfun_apply (inv\<^sub>L (id_blinfun - l *\<^sub>R \<P>\<^sub>1 (mk_dec_det (Rep_Fun (vec_to_fun d))))) (r_det\<^sub>b (Rep_Fun (vec_to_fun d)))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
vec_to_bfun (matrix_inv (mat 1 - l *\<^sub>R P_mat (vec_to_fun d)) *v r_vec' (vec_to_fun d)) = blinfun_apply (inv\<^sub>L (id_blinfun - l *\<^sub>R \<P>\<^sub>1 (mk_dec_det (Rep_Fun (vec_to_fun d))))) (r_det\<^sub>b (Rep_Fun (vec_to_fun d)))

goal (1 subgoal):
 1. policy_eval' (vec_to_fun d) = vec_to_bfun (matrix_inv (mat 1 - l *\<^sub>R P_mat (vec_to_fun d)) *v r_vec' (vec_to_fun d))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
vec_to_bfun (matrix_inv (mat 1 - l *\<^sub>R P_mat (vec_to_fun d)) *v r_vec' (vec_to_fun d)) = blinfun_apply (inv\<^sub>L (id_blinfun - l *\<^sub>R \<P>\<^sub>1 (mk_dec_det (Rep_Fun (vec_to_fun d))))) (r_det\<^sub>b (Rep_Fun (vec_to_fun d)))

goal (1 subgoal):
 1. policy_eval' (vec_to_fun d) = vec_to_bfun (matrix_inv (mat 1 - l *\<^sub>R P_mat (vec_to_fun d)) *v r_vec' (vec_to_fun d))
[PROOF STEP]
by (auto simp: \<nu>_stationary policy_eval'.rep_eq policy_eval_def inv\<^sub>L_inf_sum blincomp_scaleR_right)
[PROOF STATE]
proof (state)
this:
policy_eval' (vec_to_fun d) = vec_to_bfun (matrix_inv (mat 1 - l *\<^sub>R P_mat (vec_to_fun d)) *v r_vec' (vec_to_fun d))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma real_div_sqrt: "0 \<le> x \<Longrightarrow> x / sqrt x = sqrt x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> x \<Longrightarrow> x / sqrt x = sqrt x
[PROOF STEP]
by (cases "x = 0") (simp_all add: sqrt_divide_self_eq [of x] field_simps)


[STATEMENT]
lemma Lp_D:
  assumes "p>0" "f \<in> space\<^sub>N (\<LL> p M)"
  shows "f \<in> borel_measurable M"
        "integrable M (\<lambda>x. \<bar>f x\<bar> powr p)"
        "Norm (\<LL> p M) f = (\<integral>x. \<bar>f x\<bar> powr p \<partial>M) powr (1/p)"
        "eNorm (\<LL> p M) f = (\<integral>x. \<bar>f x\<bar> powr p \<partial>M) powr (1/p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<in> borel_measurable M &&& integrable M (\<lambda>x. \<bar>f x\<bar> powr p)) &&& Norm (\<LL> (ennreal p) M) f = (LINT x|M. \<bar>f x\<bar> powr p) powr (1 / p) &&& eNorm (\<LL> (ennreal p) M) f = ennreal ((LINT x|M. \<bar>f x\<bar> powr p) powr (1 / p))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. f \<in> borel_measurable M
 2. integrable M (\<lambda>x. \<bar>f x\<bar> powr p)
 3. Norm (\<LL> (ennreal p) M) f = (LINT x|M. \<bar>f x\<bar> powr p) powr (1 / p)
 4. eNorm (\<LL> (ennreal p) M) f = ennreal ((LINT x|M. \<bar>f x\<bar> powr p) powr (1 / p))
[PROOF STEP]
show *: "f \<in> borel_measurable M"
          "integrable M (\<lambda>x. \<bar>f x\<bar> powr p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<in> borel_measurable M &&& integrable M (\<lambda>x. \<bar>f x\<bar> powr p)
[PROOF STEP]
using Lp_space[OF \<open>p > 0\<close>] assms(2)
[PROOF STATE]
proof (prove)
using this:
space\<^sub>N (\<LL> (ennreal p) ?M) = {f \<in> borel_measurable ?M. integrable ?M (\<lambda>x. \<bar>f x\<bar> powr p)}
f \<in> space\<^sub>N (\<LL> (ennreal p) M)

goal (1 subgoal):
 1. f \<in> borel_measurable M &&& integrable M (\<lambda>x. \<bar>f x\<bar> powr p)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f \<in> borel_measurable M
integrable M (\<lambda>x. \<bar>f x\<bar> powr p)

goal (2 subgoals):
 1. Norm (\<LL> (ennreal p) M) f = (LINT x|M. \<bar>f x\<bar> powr p) powr (1 / p)
 2. eNorm (\<LL> (ennreal p) M) f = ennreal ((LINT x|M. \<bar>f x\<bar> powr p) powr (1 / p))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
f \<in> borel_measurable M
integrable M (\<lambda>x. \<bar>f x\<bar> powr p)
[PROOF STEP]
show "Norm (\<LL> p M) f = (\<integral>x. \<bar>f x\<bar> powr p \<partial>M) powr (1/p)"
            "eNorm (\<LL> p M) f = (\<integral>x. \<bar>f x\<bar> powr p \<partial>M) powr (1/p)"
[PROOF STATE]
proof (prove)
using this:
f \<in> borel_measurable M
integrable M (\<lambda>x. \<bar>f x\<bar> powr p)

goal (1 subgoal):
 1. Norm (\<LL> (ennreal p) M) f = (LINT x|M. \<bar>f x\<bar> powr p) powr (1 / p) &&& eNorm (\<LL> (ennreal p) M) f = ennreal ((LINT x|M. \<bar>f x\<bar> powr p) powr (1 / p))
[PROOF STEP]
using Lp_I[OF \<open>p > 0\<close>]
[PROOF STATE]
proof (prove)
using this:
f \<in> borel_measurable M
integrable M (\<lambda>x. \<bar>f x\<bar> powr p)
\<lbrakk>?f \<in> borel_measurable ?M; integrable ?M (\<lambda>x. \<bar>?f x\<bar> powr p)\<rbrakk> \<Longrightarrow> ?f \<in> space\<^sub>N (\<LL> (ennreal p) ?M)
\<lbrakk>?f \<in> borel_measurable ?M; integrable ?M (\<lambda>x. \<bar>?f x\<bar> powr p)\<rbrakk> \<Longrightarrow> Norm (\<LL> (ennreal p) ?M) ?f = (LINT x|?M. \<bar>?f x\<bar> powr p) powr (1 / p)
\<lbrakk>?f \<in> borel_measurable ?M; integrable ?M (\<lambda>x. \<bar>?f x\<bar> powr p)\<rbrakk> \<Longrightarrow> eNorm (\<LL> (ennreal p) ?M) ?f = ennreal ((LINT x|?M. \<bar>?f x\<bar> powr p) powr (1 / p))

goal (1 subgoal):
 1. Norm (\<LL> (ennreal p) M) f = (LINT x|M. \<bar>f x\<bar> powr p) powr (1 / p) &&& eNorm (\<LL> (ennreal p) M) f = ennreal ((LINT x|M. \<bar>f x\<bar> powr p) powr (1 / p))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Norm (\<LL> (ennreal p) M) f = (LINT x|M. \<bar>f x\<bar> powr p) powr (1 / p)
eNorm (\<LL> (ennreal p) M) f = ennreal ((LINT x|M. \<bar>f x\<bar> powr p) powr (1 / p))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lipschitz_on_transfer[transfer_rule]:
  "((=) ===> (rel_set A) ===> (A ===> B) ===> (=)) lipschitz_on lipschitz_on"
  if [transfer_rule]: "(B ===> B ===> (=)) dist dist" "(A ===> A ===> (=)) dist dist"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((=) ===> rel_set A ===> (A ===> B) ===> (=)) lipschitz_on lipschitz_on
[PROOF STEP]
unfolding lipschitz_on_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((=) ===> rel_set A ===> (A ===> B) ===> (=)) (\<lambda>C U f. 0 \<le> C \<and> (\<forall>x\<in>U. \<forall>y\<in>U. dist (f x) (f y) \<le> C * dist x y)) (\<lambda>C U f. 0 \<le> C \<and> (\<forall>x\<in>U. \<forall>y\<in>U. dist (f x) (f y) \<le> C * dist x y))
[PROOF STEP]
by transfer_prover