[STATEMENT]
lemma closure_unique:
  assumes "S \<subseteq> T"
    and "closed T"
    and "\<And>T'. S \<subseteq> T' \<Longrightarrow> closed T' \<Longrightarrow> T \<subseteq> T'"
  shows "closure S = T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. closure S = T
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
S \<subseteq> T
closed T
\<lbrakk>S \<subseteq> ?T'; closed ?T'\<rbrakk> \<Longrightarrow> T \<subseteq> ?T'

goal (1 subgoal):
 1. closure S = T
[PROOF STEP]
unfolding closure_hull
[PROOF STATE]
proof (prove)
using this:
S \<subseteq> T
closed T
\<lbrakk>S \<subseteq> ?T'; closed ?T'\<rbrakk> \<Longrightarrow> T \<subseteq> ?T'

goal (1 subgoal):
 1. closed hull S = T
[PROOF STEP]
by (rule hull_unique)


[STATEMENT]
lemma map_poly_homo_polymul:
  "map_poly f (p1 *\<^sub>p p2) = map_poly f p1 *\<^sub>p map_poly f p2"
  if [simp]: "\<And>x y. f (x + y) = f x + f y" "\<And>x. f x = 0 \<longleftrightarrow> x = 0" "\<And>x y. f (x * y) = f x * f y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_poly f (p1 *\<^sub>p p2) = map_poly f p1 *\<^sub>p map_poly f p2
[PROOF STEP]
by (induction p1 p2 rule: polymul.induct)
    (auto simp: zero_iffD[OF that(2)] map_poly_homo_polyadd)


[STATEMENT]
lemma fds_converges_scale [simp]:
  fixes z :: "'a :: {banach, nat_power_field, real_normed_field}"
  assumes c: "c > 0"
  shows   "fds_converges (fds_scale c f) z \<longleftrightarrow> fds_converges f (of_nat c * z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds_converges (fds_scale c f) z = fds_converges f (of_nat c * z)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. fds_converges (fds_scale c f) z = fds_converges f (of_nat c * z)
[PROOF STEP]
have "fds_converges (fds_scale c f) z \<longleftrightarrow>
          summable (\<lambda>n. fds_nth (fds_scale c f) (n ^ c) / nat_power (n ^ c) z)"
    (is "_ = summable ?g")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds_converges (fds_scale c f) z = summable (\<lambda>n. fds_nth (fds_scale c f) (n ^ c) / nat_power (n ^ c) z)
[PROOF STEP]
unfolding fds_converges_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. summable (\<lambda>n. fds_nth (fds_scale c f) n / nat_power n z) = summable (\<lambda>n. fds_nth (fds_scale c f) (n ^ c) / nat_power (n ^ c) z)
[PROOF STEP]
by (rule summable_mono_reindex [symmetric])
       (insert c, auto simp: fds_nth_scale is_nth_power_def strict_mono_def power_strict_mono)
[PROOF STATE]
proof (state)
this:
fds_converges (fds_scale c f) z = summable (\<lambda>n. fds_nth (fds_scale c f) (n ^ c) / nat_power (n ^ c) z)

goal (1 subgoal):
 1. fds_converges (fds_scale c f) z = fds_converges f (of_nat c * z)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
fds_converges (fds_scale c f) z = summable (\<lambda>n. fds_nth (fds_scale c f) (n ^ c) / nat_power (n ^ c) z)

goal (1 subgoal):
 1. fds_converges (fds_scale c f) z = fds_converges f (of_nat c * z)
[PROOF STEP]
have "?g = (\<lambda>n. fds_nth f n / nat_power n (of_nat c * z))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. fds_nth (fds_scale c f) (n ^ c) / nat_power (n ^ c) z) = (\<lambda>n. fds_nth f n / nat_power n (of_nat c * z))
[PROOF STEP]
proof (intro ext, goal_cases)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. fds_nth (fds_scale c f) (n ^ c) / nat_power (n ^ c) z = fds_nth f n / nat_power n (of_nat c * z)
[PROOF STEP]
case (1 n)
[PROOF STATE]
proof (state)
this:

goal (1 subgoal):
 1. \<And>n. fds_nth (fds_scale c f) (n ^ c) / nat_power (n ^ c) z = fds_nth f n / nat_power n (of_nat c * z)
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds_nth (fds_scale c f) (n ^ c) / nat_power (n ^ c) z = fds_nth f n / nat_power n (of_nat c * z)
[PROOF STEP]
using c
[PROOF STATE]
proof (prove)
using this:
0 < c

goal (1 subgoal):
 1. fds_nth (fds_scale c f) (n ^ c) / nat_power (n ^ c) z = fds_nth f n / nat_power n (of_nat c * z)
[PROOF STEP]
by (cases "n = 0") (simp_all add: nat_power_power_left nat_power_power [symmetric] mult_ac)
[PROOF STATE]
proof (state)
this:
fds_nth (fds_scale c f) (n ^ c) / nat_power (n ^ c) z = fds_nth f n / nat_power n (of_nat c * z)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>n. fds_nth (fds_scale c f) (n ^ c) / nat_power (n ^ c) z) = (\<lambda>n. fds_nth f n / nat_power n (of_nat c * z))

goal (1 subgoal):
 1. fds_converges (fds_scale c f) z = fds_converges f (of_nat c * z)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
fds_converges (fds_scale c f) z = summable (\<lambda>n. fds_nth f n / nat_power n (of_nat c * z))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
fds_converges (fds_scale c f) z = summable (\<lambda>n. fds_nth f n / nat_power n (of_nat c * z))

goal (1 subgoal):
 1. fds_converges (fds_scale c f) z = fds_converges f (of_nat c * z)
[PROOF STEP]
by (simp add: fds_converges_def)
[PROOF STATE]
proof (state)
this:
fds_converges (fds_scale c f) z = fds_converges f (of_nat c * z)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sqrt_lower_bound_1:
  assumes "x \<ge> 0" shows "4*x*(x+1) / (x^2+6*x+1) \<le> sqrt x" (is "?lhs \<le> _")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 4 * x * (x + 1) / (x\<^sup>2 + 6 * x + 1) \<le> sqrt x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 4 * x * (x + 1) / (x\<^sup>2 + 6 * x + 1) \<le> sqrt x
[PROOF STEP]
have "?lhs = sqrtl x 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 4 * x * (x + 1) / (x\<^sup>2 + 6 * x + 1) = sqrtl x 1
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 \<le> x

goal (1 subgoal):
 1. 4 * x * (x + 1) / (x\<^sup>2 + 6 * x + 1) = sqrtl x 1
[PROOF STEP]
by (simp add: sqrtl_def power_eq_if algebra_simps divide_simps)
[PROOF STATE]
proof (state)
this:
4 * x * (x + 1) / (x\<^sup>2 + 6 * x + 1) = sqrtl x 1

goal (1 subgoal):
 1. 4 * x * (x + 1) / (x\<^sup>2 + 6 * x + 1) \<le> sqrt x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
4 * x * (x + 1) / (x\<^sup>2 + 6 * x + 1) = sqrtl x 1

goal (1 subgoal):
 1. 4 * x * (x + 1) / (x\<^sup>2 + 6 * x + 1) \<le> sqrt x
[PROOF STEP]
have "... \<le> sqrt x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sqrtl x 1 \<le> sqrt x
[PROOF STEP]
by (metis assms gen_sqrt_lower)
[PROOF STATE]
proof (state)
this:
sqrtl x 1 \<le> sqrt x

goal (1 subgoal):
 1. 4 * x * (x + 1) / (x\<^sup>2 + 6 * x + 1) \<le> sqrt x
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
4 * x * (x + 1) / (x\<^sup>2 + 6 * x + 1) \<le> sqrt x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
4 * x * (x + 1) / (x\<^sup>2 + 6 * x + 1) \<le> sqrt x

goal (1 subgoal):
 1. 4 * x * (x + 1) / (x\<^sup>2 + 6 * x + 1) \<le> sqrt x
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
4 * x * (x + 1) / (x\<^sup>2 + 6 * x + 1) \<le> sqrt x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem sum_complement_is_complements_product:
  "x \<oplus> y \<noteq> u \<Longrightarrow> \<midarrow>(x \<oplus> y) = (\<midarrow>x \<otimes> \<midarrow>y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<oplus> y \<noteq> u \<Longrightarrow> \<midarrow> (x \<oplus> y) = \<midarrow> x \<otimes> \<midarrow> y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x \<oplus> y \<noteq> u \<Longrightarrow> \<midarrow> (x \<oplus> y) = \<midarrow> x \<otimes> \<midarrow> y
[PROOF STEP]
assume "x \<oplus> y \<noteq> u"
[PROOF STATE]
proof (state)
this:
x \<oplus> y \<noteq> u

goal (1 subgoal):
 1. x \<oplus> y \<noteq> u \<Longrightarrow> \<midarrow> (x \<oplus> y) = \<midarrow> x \<otimes> \<midarrow> y
[PROOF STEP]
show "\<midarrow>(x \<oplus> y) = (\<midarrow>x \<otimes> \<midarrow>y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<midarrow> (x \<oplus> y) = \<midarrow> x \<otimes> \<midarrow> y
[PROOF STEP]
proof (rule part_antisymmetry)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. P (\<midarrow> (x \<oplus> y)) (\<midarrow> x \<otimes> \<midarrow> y)
 2. P (\<midarrow> x \<otimes> \<midarrow> y) (\<midarrow> (x \<oplus> y))
[PROOF STEP]
show "P (\<midarrow> (x \<oplus> y)) (\<midarrow> x \<otimes> \<midarrow> y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P (\<midarrow> (x \<oplus> y)) (\<midarrow> x \<otimes> \<midarrow> y)
[PROOF STEP]
using  \<open>x \<oplus> y \<noteq> u\<close>
[PROOF STATE]
proof (prove)
using this:
x \<oplus> y \<noteq> u

goal (1 subgoal):
 1. P (\<midarrow> (x \<oplus> y)) (\<midarrow> x \<otimes> \<midarrow> y)
[PROOF STEP]
by (rule sum_complement_in_complement_product)
[PROOF STATE]
proof (state)
this:
P (\<midarrow> (x \<oplus> y)) (\<midarrow> x \<otimes> \<midarrow> y)

goal (1 subgoal):
 1. P (\<midarrow> x \<otimes> \<midarrow> y) (\<midarrow> (x \<oplus> y))
[PROOF STEP]
show "P (\<midarrow> x \<otimes> \<midarrow> y) (\<midarrow> (x \<oplus> y))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P (\<midarrow> x \<otimes> \<midarrow> y) (\<midarrow> (x \<oplus> y))
[PROOF STEP]
using \<open>x \<oplus> y \<noteq> u\<close>
[PROOF STATE]
proof (prove)
using this:
x \<oplus> y \<noteq> u

goal (1 subgoal):
 1. P (\<midarrow> x \<otimes> \<midarrow> y) (\<midarrow> (x \<oplus> y))
[PROOF STEP]
by (rule complement_product_in_sum_complement)
[PROOF STATE]
proof (state)
this:
P (\<midarrow> x \<otimes> \<midarrow> y) (\<midarrow> (x \<oplus> y))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<midarrow> (x \<oplus> y) = \<midarrow> x \<otimes> \<midarrow> y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma GS_rec_eq_fold: "GS_rec v = foldl (\<lambda>v s. (vec_upd v s (GS_iter_max v s))) v (sorted_list_of_set UNIV)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. GS_rec v = foldl (\<lambda>v s. vec_upd v s (GS_iter_max v s)) v (sorted_list_of_set UNIV)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. GS_rec v = foldl (\<lambda>v s. vec_upd v s (GS_iter_max v s)) v (sorted_list_of_set UNIV)
[PROOF STEP]
have "vec_lambda (foldl (\<lambda>v s. v(s := GS_rec_iter v s)) (($) v) xs) = foldl (\<lambda>v s. vec_upd v s (GS_iter_max v s)) v xs" for xs
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vec_lambda (foldl (\<lambda>v s. v(s := GS_rec_iter v s)) (($) v) xs) = foldl (\<lambda>v s. vec_upd v s (GS_iter_max v s)) v xs
[PROOF STEP]
proof (induction xs arbitrary: v)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>v. vec_lambda (foldl (\<lambda>v s. v(s := GS_rec_iter v s)) (($) v) []) = foldl (\<lambda>v s. vec_upd v s (GS_iter_max v s)) v []
 2. \<And>a xs v. (\<And>v. vec_lambda (foldl (\<lambda>v s. v(s := GS_rec_iter v s)) (($) v) xs) = foldl (\<lambda>v s. vec_upd v s (GS_iter_max v s)) v xs) \<Longrightarrow> vec_lambda (foldl (\<lambda>v s. v(s := GS_rec_iter v s)) (($) v) (a # xs)) = foldl (\<lambda>v s. vec_upd v s (GS_iter_max v s)) v (a # xs)
[PROOF STEP]
case (Cons a xs)
[PROOF STATE]
proof (state)
this:
(\<chi>a. foldl (\<lambda>v s. v(s := GS_rec_iter v s)) (($) ?v4) xs a) = foldl (\<lambda>v s. vec_upd v s (GS_iter_max v s)) ?v4 xs

goal (2 subgoals):
 1. \<And>v. vec_lambda (foldl (\<lambda>v s. v(s := GS_rec_iter v s)) (($) v) []) = foldl (\<lambda>v s. vec_upd v s (GS_iter_max v s)) v []
 2. \<And>a xs v. (\<And>v. vec_lambda (foldl (\<lambda>v s. v(s := GS_rec_iter v s)) (($) v) xs) = foldl (\<lambda>v s. vec_upd v s (GS_iter_max v s)) v xs) \<Longrightarrow> vec_lambda (foldl (\<lambda>v s. v(s := GS_rec_iter v s)) (($) v) (a # xs)) = foldl (\<lambda>v s. vec_upd v s (GS_iter_max v s)) v (a # xs)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<chi>b. foldl (\<lambda>v s. v(s := GS_rec_iter v s)) (($) v) (a # xs) b) = foldl (\<lambda>v s. vec_upd v s (GS_iter_max v s)) v (a # xs)
[PROOF STEP]
by (auto simp: vec_upd_def[of v] Cons[symmetric] eq_commute GS_rec_iter_eq_iter_max cong: if_cong)
[PROOF STATE]
proof (state)
this:
(\<chi>b. foldl (\<lambda>v s. v(s := GS_rec_iter v s)) (($) v) (a # xs) b) = foldl (\<lambda>v s. vec_upd v s (GS_iter_max v s)) v (a # xs)

goal (1 subgoal):
 1. \<And>v. vec_lambda (foldl (\<lambda>v s. v(s := GS_rec_iter v s)) (($) v) []) = foldl (\<lambda>v s. vec_upd v s (GS_iter_max v s)) v []
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
vec_lambda (foldl (\<lambda>v s. v(s := GS_rec_iter v s)) (($) v) ?xs4) = foldl (\<lambda>v s. vec_upd v s (GS_iter_max v s)) v ?xs4

goal (1 subgoal):
 1. GS_rec v = foldl (\<lambda>v s. vec_upd v s (GS_iter_max v s)) v (sorted_list_of_set UNIV)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
vec_lambda (foldl (\<lambda>v s. v(s := GS_rec_iter v s)) (($) v) ?xs4) = foldl (\<lambda>v s. vec_upd v s (GS_iter_max v s)) v ?xs4

goal (1 subgoal):
 1. GS_rec v = foldl (\<lambda>v s. vec_upd v s (GS_iter_max v s)) v (sorted_list_of_set UNIV)
[PROOF STEP]
unfolding GS_rec_def GS_rec_fun_code'
[PROOF STATE]
proof (prove)
using this:
vec_lambda (foldl (\<lambda>v s. v(s := GS_rec_iter v s)) (($) v) ?xs4) = foldl (\<lambda>v s. vec_upd v s (GS_iter_max v s)) v ?xs4

goal (1 subgoal):
 1. vec_lambda (foldl (\<lambda>v s. v(s := GS_rec_iter v s)) (($) v) (sorted_list_of_set UNIV)) = foldl (\<lambda>v s. vec_upd v s (GS_iter_max v s)) v (sorted_list_of_set UNIV)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
GS_rec v = foldl (\<lambda>v s. vec_upd v s (GS_iter_max v s)) v (sorted_list_of_set UNIV)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma foreachc_preorder:
    fixes g :: "'a \<Rightarrow> 'b :: preorder"
    assumes "foreach\<^sub>C c f S a\<^sub>1 a\<^sub>2"
    assumes "\<And> x a\<^sub>1 a\<^sub>2. x \<in> S \<Longrightarrow> f x a\<^sub>1 a\<^sub>2 \<Longrightarrow> g a\<^sub>1 \<le> g a\<^sub>2"
    shows "g a\<^sub>1 \<le> g a\<^sub>2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g a\<^sub>1 \<le> g a\<^sub>2
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. g a\<^sub>1 \<le> g a\<^sub>2
[PROOF STEP]
have 0: "reflp (\<lambda> a\<^sub>1 a\<^sub>2. g a\<^sub>1 \<le> g a\<^sub>2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. reflp (\<lambda>a\<^sub>1 a\<^sub>2. g a\<^sub>1 \<le> g a\<^sub>2)
[PROOF STEP]
by (rule reflpI, rule order_refl)
[PROOF STATE]
proof (state)
this:
reflp (\<lambda>a\<^sub>1 a\<^sub>2. g a\<^sub>1 \<le> g a\<^sub>2)

goal (1 subgoal):
 1. g a\<^sub>1 \<le> g a\<^sub>2
[PROOF STEP]
have 1: "transp (\<lambda> a\<^sub>1 a\<^sub>2. g a\<^sub>1 \<le> g a\<^sub>2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. transp (\<lambda>a\<^sub>1 a\<^sub>2. g a\<^sub>1 \<le> g a\<^sub>2)
[PROOF STEP]
by (rule transpI, rule order_trans)
[PROOF STATE]
proof (state)
this:
transp (\<lambda>a\<^sub>1 a\<^sub>2. g a\<^sub>1 \<le> g a\<^sub>2)

goal (1 subgoal):
 1. g a\<^sub>1 \<le> g a\<^sub>2
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g a\<^sub>1 \<le> g a\<^sub>2
[PROOF STEP]
using foreachc_reflexive_transitive 0 1 assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>reflp ?r; transp ?r; foreach\<^sub>C ?c ?f ?S ?a\<^sub>1 ?a\<^sub>2; \<And>x a\<^sub>1 a\<^sub>2. \<lbrakk>x \<in> ?S; ?f x a\<^sub>1 a\<^sub>2\<rbrakk> \<Longrightarrow> ?r a\<^sub>1 a\<^sub>2\<rbrakk> \<Longrightarrow> ?r ?a\<^sub>1 ?a\<^sub>2
reflp (\<lambda>a\<^sub>1 a\<^sub>2. g a\<^sub>1 \<le> g a\<^sub>2)
transp (\<lambda>a\<^sub>1 a\<^sub>2. g a\<^sub>1 \<le> g a\<^sub>2)
foreach\<^sub>C c f S a\<^sub>1 a\<^sub>2
\<lbrakk>?x \<in> S; f ?x ?a\<^sub>1 ?a\<^sub>2\<rbrakk> \<Longrightarrow> g ?a\<^sub>1 \<le> g ?a\<^sub>2

goal (1 subgoal):
 1. g a\<^sub>1 \<le> g a\<^sub>2
[PROOF STEP]
by this
[PROOF STATE]
proof (state)
this:
g a\<^sub>1 \<le> g a\<^sub>2

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Inf_Sup_var: "\<Squnion>(\<Inter>x \<in> X. \<down>x) = \<Sqinter>X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Squnion> \<Inter> (\<down> ` X) = \<Sqinter> X
[PROOF STEP]
unfolding downset_prop
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Squnion> (\<Inter>x\<in>X. {y. y \<le> x}) = \<Sqinter> X
[PROOF STEP]
by (simp add: Collect_ball_eq Inf_eq_Sup)


[STATEMENT]
lemma sum_insert [simp]:
  assumes "finite (A :: 'a::join_semilattice_zero set)"
  shows "\<Sum>(insert x A) = x + \<Sum>A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Sum> (insert x A) = x + \<Sum> A
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<Sum> (insert x A) = x + \<Sum> A
[PROOF STEP]
have "\<Sum>(insert x A) = \<Sum>{x} + \<Sum>A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Sum> (insert x A) = \<Sum> {x} + \<Sum> A
[PROOF STEP]
by (metis insert_is_Un assms finite.emptyI finite.insertI sum_union)
[PROOF STATE]
proof (state)
this:
\<Sum> (insert x A) = \<Sum> {x} + \<Sum> A

goal (1 subgoal):
 1. \<Sum> (insert x A) = x + \<Sum> A
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<Sum> (insert x A) = \<Sum> {x} + \<Sum> A

goal (1 subgoal):
 1. \<Sum> (insert x A) = x + \<Sum> A
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<Sum> (insert x A) = x + \<Sum> A

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem LT15: "\<turnstile> ((F \<or> G) \<leadsto> H) \<longrightarrow> (G \<leadsto> H)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> (F \<or> G \<leadsto> H) \<longrightarrow> G \<leadsto> H
[PROOF STEP]
unfolding leadsto_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> \<box>(F \<or> G \<longrightarrow> \<diamond>H) \<longrightarrow> \<box>(G \<longrightarrow> \<diamond>H)
[PROOF STEP]
by (rule STL4) auto


[STATEMENT]
lemma (in monoid_add) sum_list_0 [simp]:
  "(\<Sum>x\<leftarrow>xs. 0) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>x\<leftarrow>xs. (0::'a)) = (0::'a)
[PROOF STEP]
by (induct xs) (simp_all add: distrib_right)


[STATEMENT]
lemma matrix_mult_1_left [simp]:
  "1 *\<^sub>M (A::('a::{semiring_0,monoid_mult},'m::len,'n::len) matrix) = A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 *\<^sub>M A = A
[PROOF STEP]
by (cases A, simp add: one_matrix_def)


[STATEMENT]
lemma measure_subadditive_finite:
  assumes A: "finite I" "A`I \<subseteq> sets M" and fin: "\<And>i. i \<in> I \<Longrightarrow> emeasure M (A i) \<noteq> \<infinity>"
  shows "measure M (\<Union>i\<in>I. A i) \<le> (\<Sum>i\<in>I. measure M (A i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sigma_Algebra.measure M (\<Union> (A ` I)) \<le> (\<Sum>i\<in>I. Sigma_Algebra.measure M (A i))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Sigma_Algebra.measure M (\<Union> (A ` I)) \<le> (\<Sum>i\<in>I. Sigma_Algebra.measure M (A i))
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Sigma_Algebra.measure M (\<Union> (A ` I)) \<le> (\<Sum>i\<in>I. Sigma_Algebra.measure M (A i))
[PROOF STEP]
have "emeasure M (\<Union>i\<in>I. A i) \<le> (\<Sum>i\<in>I. emeasure M (A i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure M (\<Union> (A ` I)) \<le> (\<Sum>i\<in>I. emeasure M (A i))
[PROOF STEP]
using emeasure_subadditive_finite[OF A]
[PROOF STATE]
proof (prove)
using this:
emeasure M (\<Union> (A ` I)) \<le> (\<Sum>i\<in>I. emeasure M (A i))

goal (1 subgoal):
 1. emeasure M (\<Union> (A ` I)) \<le> (\<Sum>i\<in>I. emeasure M (A i))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
emeasure M (\<Union> (A ` I)) \<le> (\<Sum>i\<in>I. emeasure M (A i))

goal (1 subgoal):
 1. Sigma_Algebra.measure M (\<Union> (A ` I)) \<le> (\<Sum>i\<in>I. Sigma_Algebra.measure M (A i))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
emeasure M (\<Union> (A ` I)) \<le> (\<Sum>i\<in>I. emeasure M (A i))

goal (1 subgoal):
 1. Sigma_Algebra.measure M (\<Union> (A ` I)) \<le> (\<Sum>i\<in>I. Sigma_Algebra.measure M (A i))
[PROOF STEP]
have "\<dots> < \<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i\<in>I. emeasure M (A i)) < \<infinity>
[PROOF STEP]
using fin
[PROOF STATE]
proof (prove)
using this:
?i \<in> I \<Longrightarrow> emeasure M (A ?i) \<noteq> \<infinity>

goal (1 subgoal):
 1. (\<Sum>i\<in>I. emeasure M (A i)) < \<infinity>
[PROOF STEP]
by (simp add: less_top A)
[PROOF STATE]
proof (state)
this:
(\<Sum>i\<in>I. emeasure M (A i)) < \<infinity>

goal (1 subgoal):
 1. Sigma_Algebra.measure M (\<Union> (A ` I)) \<le> (\<Sum>i\<in>I. Sigma_Algebra.measure M (A i))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
emeasure M (\<Union> (A ` I)) < \<infinity>
[PROOF STEP]
have "emeasure M (\<Union>i\<in>I. A i) \<noteq> top"
[PROOF STATE]
proof (prove)
using this:
emeasure M (\<Union> (A ` I)) < \<infinity>

goal (1 subgoal):
 1. emeasure M (\<Union> (A ` I)) \<noteq> top
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
emeasure M (\<Union> (A ` I)) \<noteq> top

goal (1 subgoal):
 1. Sigma_Algebra.measure M (\<Union> (A ` I)) \<le> (\<Sum>i\<in>I. Sigma_Algebra.measure M (A i))
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
emeasure M (\<Union> (A ` I)) \<noteq> top

goal (1 subgoal):
 1. Sigma_Algebra.measure M (\<Union> (A ` I)) \<le> (\<Sum>i\<in>I. Sigma_Algebra.measure M (A i))
[PROOF STEP]
note * = this
[PROOF STATE]
proof (state)
this:
emeasure M (\<Union> (A ` I)) \<noteq> top

goal (1 subgoal):
 1. Sigma_Algebra.measure M (\<Union> (A ` I)) \<le> (\<Sum>i\<in>I. Sigma_Algebra.measure M (A i))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sigma_Algebra.measure M (\<Union> (A ` I)) \<le> (\<Sum>i\<in>I. Sigma_Algebra.measure M (A i))
[PROOF STEP]
using emeasure_subadditive_finite[OF A] fin
[PROOF STATE]
proof (prove)
using this:
emeasure M (\<Union> (A ` I)) \<le> (\<Sum>i\<in>I. emeasure M (A i))
?i \<in> I \<Longrightarrow> emeasure M (A ?i) \<noteq> \<infinity>

goal (1 subgoal):
 1. Sigma_Algebra.measure M (\<Union> (A ` I)) \<le> (\<Sum>i\<in>I. Sigma_Algebra.measure M (A i))
[PROOF STEP]
unfolding emeasure_eq_ennreal_measure[OF *]
[PROOF STATE]
proof (prove)
using this:
ennreal (Sigma_Algebra.measure M (\<Union> (A ` I))) \<le> (\<Sum>i\<in>I. emeasure M (A i))
?i \<in> I \<Longrightarrow> emeasure M (A ?i) \<noteq> \<infinity>

goal (1 subgoal):
 1. Sigma_Algebra.measure M (\<Union> (A ` I)) \<le> (\<Sum>i\<in>I. Sigma_Algebra.measure M (A i))
[PROOF STEP]
by (simp_all add: sum_nonneg emeasure_eq_ennreal_measure)
[PROOF STATE]
proof (state)
this:
Sigma_Algebra.measure M (\<Union> (A ` I)) \<le> (\<Sum>i\<in>I. Sigma_Algebra.measure M (A i))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma real_root_strict_decreasing:
  assumes "0 < n" "n < N" "1 < x"
  shows "root N x < root n x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. root N x < root n x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. root N x < root n x
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
0 < n
n < N
1 < x
[PROOF STEP]
have "root n (root N x) ^ n < root N (root n x) ^ N"
[PROOF STATE]
proof (prove)
using this:
0 < n
n < N
1 < x

goal (1 subgoal):
 1. root n (root N x) ^ n < root N (root n x) ^ N
[PROOF STEP]
by (simp add: real_root_commute power_strict_increasing del: real_root_pow_pos2)
[PROOF STATE]
proof (state)
this:
root n (root N x) ^ n < root N (root n x) ^ N

goal (1 subgoal):
 1. root N x < root n x
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
0 < n
n < N
1 < x
root n (root N x) ^ n < root N (root n x) ^ N
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
0 < n
n < N
1 < x
root n (root N x) ^ n < root N (root n x) ^ N

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma measure_diff_le_measure_setdiff:
  assumes "S \<in> fmeasurable M" "T \<in> fmeasurable M"
  shows "measure M S - measure M T \<le> measure M (S - T)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sigma_Algebra.measure M S - Sigma_Algebra.measure M T \<le> Sigma_Algebra.measure M (S - T)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Sigma_Algebra.measure M S - Sigma_Algebra.measure M T \<le> Sigma_Algebra.measure M (S - T)
[PROOF STEP]
have "measure M S \<le> measure M ((S - T) \<union> T)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sigma_Algebra.measure M S \<le> Sigma_Algebra.measure M (S - T \<union> T)
[PROOF STEP]
by (simp add: assms fmeasurable.Un fmeasurableD measure_mono_fmeasurable)
[PROOF STATE]
proof (state)
this:
Sigma_Algebra.measure M S \<le> Sigma_Algebra.measure M (S - T \<union> T)

goal (1 subgoal):
 1. Sigma_Algebra.measure M S - Sigma_Algebra.measure M T \<le> Sigma_Algebra.measure M (S - T)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Sigma_Algebra.measure M S \<le> Sigma_Algebra.measure M (S - T \<union> T)

goal (1 subgoal):
 1. Sigma_Algebra.measure M S - Sigma_Algebra.measure M T \<le> Sigma_Algebra.measure M (S - T)
[PROOF STEP]
have "\<dots> \<le> measure M (S - T) + measure M T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sigma_Algebra.measure M (S - T \<union> T) \<le> Sigma_Algebra.measure M (S - T) + Sigma_Algebra.measure M T
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
S \<in> fmeasurable M
T \<in> fmeasurable M

goal (1 subgoal):
 1. Sigma_Algebra.measure M (S - T \<union> T) \<le> Sigma_Algebra.measure M (S - T) + Sigma_Algebra.measure M T
[PROOF STEP]
by (blast intro: measure_Un_le)
[PROOF STATE]
proof (state)
this:
Sigma_Algebra.measure M (S - T \<union> T) \<le> Sigma_Algebra.measure M (S - T) + Sigma_Algebra.measure M T

goal (1 subgoal):
 1. Sigma_Algebra.measure M S - Sigma_Algebra.measure M T \<le> Sigma_Algebra.measure M (S - T)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
Sigma_Algebra.measure M S \<le> Sigma_Algebra.measure M (S - T) + Sigma_Algebra.measure M T
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Sigma_Algebra.measure M S \<le> Sigma_Algebra.measure M (S - T) + Sigma_Algebra.measure M T

goal (1 subgoal):
 1. Sigma_Algebra.measure M S - Sigma_Algebra.measure M T \<le> Sigma_Algebra.measure M (S - T)
[PROOF STEP]
by (simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
Sigma_Algebra.measure M S - Sigma_Algebra.measure M T \<le> Sigma_Algebra.measure M (S - T)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma edom_join[simp]: "edom (f \<squnion> (g::('a::type \<Rightarrow> 'b::{Finite_Join_cpo,pcpo}))) = edom f \<union> edom g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. edom (f \<squnion> g) = edom f \<union> edom g
[PROOF STEP]
unfolding edom_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x. (f \<squnion> g) x \<noteq> \<bottom>} = {x. f x \<noteq> \<bottom>} \<union> {x. g x \<noteq> \<bottom>}
[PROOF STEP]
by auto


[STATEMENT]
lemma sum_list_mono_const: assumes "\<And> x. x \<in> set xs \<Longrightarrow> f x \<le> c"
  and "n = length xs"
shows "sum_list (map f xs) \<le> n * c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum_list (map f xs) \<le> n * c
[PROOF STEP]
unfolding assms(2)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum_list (map f xs) \<le> length xs * c
[PROOF STEP]
using assms(1)
[PROOF STATE]
proof (prove)
using this:
?x \<in> set xs \<Longrightarrow> f ?x \<le> c

goal (1 subgoal):
 1. sum_list (map f xs) \<le> length xs * c
[PROOF STEP]
by (induct xs; force)


[STATEMENT]
lemma enum_prod_nth_tensor_unpack:
  assumes \<open>i < CARD('a) * CARD('b)\<close>
  shows "(Enum.enum ! i :: 'a::enum\<times>'b::enum) =
        (let (i1,i2) = tensor_unpack CARD('a) CARD('b) i in
              (Enum.enum ! i1, Enum.enum ! i2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. enum_class.enum ! i = (let (i1, i2) = tensor_unpack CARD('a) CARD('b) i in (enum_class.enum ! i1, enum_class.enum ! i2))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
i < CARD('a) * CARD('b)

goal (1 subgoal):
 1. enum_class.enum ! i = (let (i1, i2) = tensor_unpack CARD('a) CARD('b) i in (enum_class.enum ! i1, enum_class.enum ! i2))
[PROOF STEP]
by (simp add: enum_prod_def card_UNIV_length_enum product_nth tensor_unpack_def)


[STATEMENT]
lemma row_col: assumes "mat nr nc m"
  and "i < nr" and "j < nc"
  shows "row m i ! j = col m j ! i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. row m i ! j = col m j ! i
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
mat nr nc m
i < nr
j < nc

goal (1 subgoal):
 1. row m i ! j = col m j ! i
[PROOF STEP]
unfolding mat_def row_def col_def
[PROOF STATE]
proof (prove)
using this:
length m = nc \<and> Ball (set m) (vec nr)
i < nr
j < nc

goal (1 subgoal):
 1. map (\<lambda>w. w ! i) m ! j = m ! j ! i
[PROOF STEP]
by auto


[STATEMENT]
theorem Helly_selection:
  fixes f :: "nat \<Rightarrow> real \<Rightarrow> real"
  assumes rcont: "\<And>n x. continuous (at_right x) (f n)"
  assumes mono: "\<And>n. mono (f n)"
  assumes bdd: "\<And>n x. \<bar>f n x\<bar> \<le> M"
  shows "\<exists>s. strict_mono (s::nat \<Rightarrow> nat) \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and>
    (\<forall>x. continuous (at x) F \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
obtain m :: "real \<Rightarrow> nat" where "bij_betw m \<rat> UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>m. bij_betw m \<rat> UNIV \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using countable_rat Rats_infinite
[PROOF STATE]
proof (prove)
using this:
countable \<rat>
infinite \<rat>

goal (1 subgoal):
 1. (\<And>m. bij_betw m \<rat> UNIV \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (erule countableE_infinite)
[PROOF STATE]
proof (state)
this:
bij_betw m \<rat> UNIV

goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
bij_betw m \<rat> UNIV
[PROOF STEP]
obtain r :: "nat \<Rightarrow> real" where bij: "bij_betw r UNIV \<rat>"
[PROOF STATE]
proof (prove)
using this:
bij_betw m \<rat> UNIV

goal (1 subgoal):
 1. (\<And>r. bij_betw r UNIV \<rat> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using bij_betw_inv
[PROOF STATE]
proof (prove)
using this:
bij_betw m \<rat> UNIV
bij_betw ?f ?A ?B \<Longrightarrow> \<exists>g. bij_betw g ?B ?A

goal (1 subgoal):
 1. (\<And>r. bij_betw r UNIV \<rat> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
bij_betw r UNIV \<rat>

goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
have dense_r: "\<And>x y. x < y \<Longrightarrow> \<exists>n. x < r n \<and> r n < y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y. x < y \<Longrightarrow> \<exists>n. x < r n \<and> r n < y
[PROOF STEP]
by (metis Rats_dense_in_real bij f_the_inv_into_f bij_betw_def)
[PROOF STATE]
proof (state)
this:
?x < ?y \<Longrightarrow> \<exists>n. ?x < r n \<and> r n < ?y

goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
let ?P = "\<lambda>n. \<lambda>s. convergent (\<lambda>k. f (s k) (r n))"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
interpret nat: subseqs ?P
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Diagonal_Subsequence.subseqs (\<lambda>n s. convergent (\<lambda>k. f (s k) (r n)))
[PROOF STEP]
proof (unfold convergent_def, unfold subseqs_def, auto)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n s. strict_mono s \<Longrightarrow> \<exists>r'. strict_mono r' \<and> (\<exists>L. (\<lambda>k. f (s (r' k)) (r n)) \<longlonglongrightarrow> L)
[PROOF STEP]
fix n :: nat and s :: "nat \<Rightarrow> nat"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n s. strict_mono s \<Longrightarrow> \<exists>r'. strict_mono r' \<and> (\<exists>L. (\<lambda>k. f (s (r' k)) (r n)) \<longlonglongrightarrow> L)
[PROOF STEP]
assume s: "strict_mono s"
[PROOF STATE]
proof (state)
this:
strict_mono s

goal (1 subgoal):
 1. \<And>n s. strict_mono s \<Longrightarrow> \<exists>r'. strict_mono r' \<and> (\<exists>L. (\<lambda>k. f (s (r' k)) (r n)) \<longlonglongrightarrow> L)
[PROOF STEP]
have "bounded {-M..M}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bounded {- M..M}
[PROOF STEP]
using bounded_closed_interval
[PROOF STATE]
proof (prove)
using this:
bounded {?a..?b}

goal (1 subgoal):
 1. bounded {- M..M}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
bounded {- M..M}

goal (1 subgoal):
 1. \<And>n s. strict_mono s \<Longrightarrow> \<exists>r'. strict_mono r' \<and> (\<exists>L. (\<lambda>k. f (s (r' k)) (r n)) \<longlonglongrightarrow> L)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
bounded {- M..M}

goal (1 subgoal):
 1. \<And>n s. strict_mono s \<Longrightarrow> \<exists>r'. strict_mono r' \<and> (\<exists>L. (\<lambda>k. f (s (r' k)) (r n)) \<longlonglongrightarrow> L)
[PROOF STEP]
have "\<And>k. f (s k) (r n) \<in> {-M..M}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>k. f (s k) (r n) \<in> {- M..M}
[PROOF STEP]
using bdd
[PROOF STATE]
proof (prove)
using this:
\<bar>f ?n ?x\<bar> \<le> M

goal (1 subgoal):
 1. \<And>k. f (s k) (r n) \<in> {- M..M}
[PROOF STEP]
by (simp add: abs_le_iff minus_le_iff)
[PROOF STATE]
proof (state)
this:
f (s ?k) (r n) \<in> {- M..M}

goal (1 subgoal):
 1. \<And>n s. strict_mono s \<Longrightarrow> \<exists>r'. strict_mono r' \<and> (\<exists>L. (\<lambda>k. f (s (r' k)) (r n)) \<longlonglongrightarrow> L)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
bounded {- M..M}
f (s ?k) (r n) \<in> {- M..M}
[PROOF STEP]
have "\<exists>l s'. strict_mono s' \<and> ((\<lambda>k. f (s k) (r n)) \<circ> s') \<longlonglongrightarrow> l"
[PROOF STATE]
proof (prove)
using this:
bounded {- M..M}
f (s ?k) (r n) \<in> {- M..M}

goal (1 subgoal):
 1. \<exists>l s'. strict_mono s' \<and> ((\<lambda>k. f (s k) (r n)) \<circ> s') \<longlonglongrightarrow> l
[PROOF STEP]
using compact_Icc compact_imp_seq_compact seq_compactE
[PROOF STATE]
proof (prove)
using this:
bounded {- M..M}
f (s ?k) (r n) \<in> {- M..M}
compact {?a..?b}
compact ?U \<Longrightarrow> seq_compact ?U
\<lbrakk>seq_compact ?S; \<forall>n. ?f n \<in> ?S; \<And>l r. \<lbrakk>l \<in> ?S; strict_mono r; (?f \<circ> r) \<longlonglongrightarrow> l\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. \<exists>l s'. strict_mono s' \<and> ((\<lambda>k. f (s k) (r n)) \<circ> s') \<longlonglongrightarrow> l
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
\<exists>l s'. strict_mono s' \<and> ((\<lambda>k. f (s k) (r n)) \<circ> s') \<longlonglongrightarrow> l

goal (1 subgoal):
 1. \<And>n s. strict_mono s \<Longrightarrow> \<exists>r'. strict_mono r' \<and> (\<exists>L. (\<lambda>k. f (s (r' k)) (r n)) \<longlonglongrightarrow> L)
[PROOF STEP]
thus "\<exists>s'. strict_mono (s'::nat\<Rightarrow>nat) \<and> (\<exists>l. (\<lambda>k. f (s (s' k)) (r n)) \<longlonglongrightarrow> l)"
[PROOF STATE]
proof (prove)
using this:
\<exists>l s'. strict_mono s' \<and> ((\<lambda>k. f (s k) (r n)) \<circ> s') \<longlonglongrightarrow> l

goal (1 subgoal):
 1. \<exists>s'. strict_mono s' \<and> (\<exists>l. (\<lambda>k. f (s (s' k)) (r n)) \<longlonglongrightarrow> l)
[PROOF STEP]
by (auto simp: comp_def)
[PROOF STATE]
proof (state)
this:
\<exists>s'. strict_mono s' \<and> (\<exists>l. (\<lambda>k. f (s (s' k)) (r n)) \<longlonglongrightarrow> l)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
define d where "d = nat.diagseq"
[PROOF STATE]
proof (state)
this:
d = nat.diagseq

goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
have subseq: "strict_mono d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. strict_mono d
[PROOF STEP]
unfolding d_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. strict_mono nat.diagseq
[PROOF STEP]
using nat.subseq_diagseq
[PROOF STATE]
proof (prove)
using this:
strict_mono nat.diagseq

goal (1 subgoal):
 1. strict_mono nat.diagseq
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
strict_mono d

goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
have rat_cnv: "?P n d" for n
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. convergent (\<lambda>k. f (d k) (r n))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. convergent (\<lambda>k. f (d k) (r n))
[PROOF STEP]
have Pn_seqseq: "?P n (nat.seqseq (Suc n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. convergent (\<lambda>k. f (nat.seqseq (Suc n) k) (r n))
[PROOF STEP]
by (rule nat.seqseq_holds)
[PROOF STATE]
proof (state)
this:
convergent (\<lambda>k. f (nat.seqseq (Suc n) k) (r n))

goal (1 subgoal):
 1. convergent (\<lambda>k. f (d k) (r n))
[PROOF STEP]
have 1: "(\<lambda>k. f ((nat.seqseq (Suc n) \<circ> (\<lambda>k. nat.fold_reduce (Suc n) k
      (Suc n + k))) k) (r n)) = (\<lambda>k. f (nat.seqseq (Suc n) k) (r n)) \<circ>
      (\<lambda>k. nat.fold_reduce (Suc n) k (Suc n + k))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>k. f ((nat.seqseq (Suc n) \<circ> (\<lambda>k. nat.fold_reduce (Suc n) k (Suc n + k))) k) (r n)) = (\<lambda>k. f (nat.seqseq (Suc n) k) (r n)) \<circ> (\<lambda>k. nat.fold_reduce (Suc n) k (Suc n + k))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<lambda>k. f ((nat.seqseq (Suc n) \<circ> (\<lambda>k. nat.fold_reduce (Suc n) k (Suc n + k))) k) (r n)) = (\<lambda>k. f (nat.seqseq (Suc n) k) (r n)) \<circ> (\<lambda>k. nat.fold_reduce (Suc n) k (Suc n + k))

goal (1 subgoal):
 1. convergent (\<lambda>k. f (d k) (r n))
[PROOF STEP]
have 2: "?P n (d \<circ> ((+) (Suc n)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. convergent (\<lambda>k. f ((d \<circ> (+) (Suc n)) k) (r n))
[PROOF STEP]
unfolding d_def nat.diagseq_seqseq 1
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. convergent ((\<lambda>k. f (nat.seqseq (Suc n) k) (r n)) \<circ> (\<lambda>k. nat.fold_reduce (Suc n) k (Suc n + k)))
[PROOF STEP]
by (intro convergent_subseq_convergent Pn_seqseq nat.subseq_diagonal_rest)
[PROOF STATE]
proof (state)
this:
convergent (\<lambda>k. f ((d \<circ> (+) (Suc n)) k) (r n))

goal (1 subgoal):
 1. convergent (\<lambda>k. f (d k) (r n))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
convergent (\<lambda>k. f ((d \<circ> (+) (Suc n)) k) (r n))
[PROOF STEP]
obtain L where 3: "(\<lambda>na. f (d (na + Suc n)) (r n)) \<longlonglongrightarrow> L"
[PROOF STATE]
proof (prove)
using this:
convergent (\<lambda>k. f ((d \<circ> (+) (Suc n)) k) (r n))

goal (1 subgoal):
 1. (\<And>L. (\<lambda>na. f (d (na + Suc n)) (r n)) \<longlonglongrightarrow> L \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: add.commute dest: convergentD)
[PROOF STATE]
proof (state)
this:
(\<lambda>na. f (d (na + Suc n)) (r n)) \<longlonglongrightarrow> L

goal (1 subgoal):
 1. convergent (\<lambda>k. f (d k) (r n))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>na. f (d (na + Suc n)) (r n)) \<longlonglongrightarrow> L
[PROOF STEP]
have "(\<lambda>k. f (d k) (r n)) \<longlonglongrightarrow> L"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>na. f (d (na + Suc n)) (r n)) \<longlonglongrightarrow> L

goal (1 subgoal):
 1. (\<lambda>k. f (d k) (r n)) \<longlonglongrightarrow> L
[PROOF STEP]
by (rule LIMSEQ_offset)
[PROOF STATE]
proof (state)
this:
(\<lambda>k. f (d k) (r n)) \<longlonglongrightarrow> L

goal (1 subgoal):
 1. convergent (\<lambda>k. f (d k) (r n))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>k. f (d k) (r n)) \<longlonglongrightarrow> L
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>k. f (d k) (r n)) \<longlonglongrightarrow> L

goal (1 subgoal):
 1. convergent (\<lambda>k. f (d k) (r n))
[PROOF STEP]
by (auto simp: convergent_def)
[PROOF STATE]
proof (state)
this:
convergent (\<lambda>k. f (d k) (r n))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
convergent (\<lambda>k. f (d k) (r ?n))

goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
let ?f = "\<lambda>n. \<lambda>k. f (d k) (r n)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
have lim_f: "?f n \<longlonglongrightarrow> lim (?f n)" for n
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>k. f (d k) (r n)) \<longlonglongrightarrow> lim (\<lambda>k. f (d k) (r n))
[PROOF STEP]
using rat_cnv convergent_LIMSEQ_iff
[PROOF STATE]
proof (prove)
using this:
convergent (\<lambda>k. f (d k) (r ?n))
convergent ?X = ?X \<longlonglongrightarrow> lim ?X

goal (1 subgoal):
 1. (\<lambda>k. f (d k) (r n)) \<longlonglongrightarrow> lim (\<lambda>k. f (d k) (r n))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<lambda>k. f (d k) (r ?n)) \<longlonglongrightarrow> lim (\<lambda>k. f (d k) (r ?n))

goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
have lim_bdd: "lim (?f n) \<in> {-M..M}" for n
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lim (\<lambda>k. f (d k) (r n)) \<in> {- M..M}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. lim (\<lambda>k. f (d k) (r n)) \<in> {- M..M}
[PROOF STEP]
have "closed {-M..M}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. closed {- M..M}
[PROOF STEP]
using closed_real_atLeastAtMost
[PROOF STATE]
proof (prove)
using this:
closed {?a..?b}

goal (1 subgoal):
 1. closed {- M..M}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
closed {- M..M}

goal (1 subgoal):
 1. lim (\<lambda>k. f (d k) (r n)) \<in> {- M..M}
[PROOF STEP]
hence "(\<forall>i. ?f n i \<in> {-M..M}) \<and> ?f n \<longlonglongrightarrow> lim (?f n) \<longrightarrow> lim (?f n) \<in> {-M..M}"
[PROOF STATE]
proof (prove)
using this:
closed {- M..M}

goal (1 subgoal):
 1. (\<forall>i. f (d i) (r n) \<in> {- M..M}) \<and> (\<lambda>k. f (d k) (r n)) \<longlonglongrightarrow> lim (\<lambda>k. f (d k) (r n)) \<longrightarrow> lim (\<lambda>k. f (d k) (r n)) \<in> {- M..M}
[PROOF STEP]
unfolding closed_sequential_limits
[PROOF STATE]
proof (prove)
using this:
\<forall>x l. (\<forall>n. x n \<in> {- M..M}) \<and> x \<longlonglongrightarrow> l \<longrightarrow> l \<in> {- M..M}

goal (1 subgoal):
 1. (\<forall>i. f (d i) (r n) \<in> {- M..M}) \<and> (\<lambda>k. f (d k) (r n)) \<longlonglongrightarrow> lim (\<lambda>k. f (d k) (r n)) \<longrightarrow> lim (\<lambda>k. f (d k) (r n)) \<in> {- M..M}
[PROOF STEP]
by (drule_tac x = "\<lambda>k. f (d k) (r n)" in spec) blast
[PROOF STATE]
proof (state)
this:
(\<forall>i. f (d i) (r n) \<in> {- M..M}) \<and> (\<lambda>k. f (d k) (r n)) \<longlonglongrightarrow> lim (\<lambda>k. f (d k) (r n)) \<longrightarrow> lim (\<lambda>k. f (d k) (r n)) \<in> {- M..M}

goal (1 subgoal):
 1. lim (\<lambda>k. f (d k) (r n)) \<in> {- M..M}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(\<forall>i. f (d i) (r n) \<in> {- M..M}) \<and> (\<lambda>k. f (d k) (r n)) \<longlonglongrightarrow> lim (\<lambda>k. f (d k) (r n)) \<longrightarrow> lim (\<lambda>k. f (d k) (r n)) \<in> {- M..M}

goal (1 subgoal):
 1. lim (\<lambda>k. f (d k) (r n)) \<in> {- M..M}
[PROOF STEP]
have "\<forall>i. ?f n i \<in> {-M..M}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i. f (d i) (r n) \<in> {- M..M}
[PROOF STEP]
using bdd
[PROOF STATE]
proof (prove)
using this:
\<bar>f ?n ?x\<bar> \<le> M

goal (1 subgoal):
 1. \<forall>i. f (d i) (r n) \<in> {- M..M}
[PROOF STEP]
by (simp add: abs_le_iff minus_le_iff)
[PROOF STATE]
proof (state)
this:
\<forall>i. f (d i) (r n) \<in> {- M..M}

goal (1 subgoal):
 1. lim (\<lambda>k. f (d k) (r n)) \<in> {- M..M}
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(\<forall>i. f (d i) (r n) \<in> {- M..M}) \<and> (\<lambda>k. f (d k) (r n)) \<longlonglongrightarrow> lim (\<lambda>k. f (d k) (r n)) \<longrightarrow> lim (\<lambda>k. f (d k) (r n)) \<in> {- M..M}
\<forall>i. f (d i) (r n) \<in> {- M..M}
[PROOF STEP]
show "lim (?f n) \<in> {-M..M}"
[PROOF STATE]
proof (prove)
using this:
(\<forall>i. f (d i) (r n) \<in> {- M..M}) \<and> (\<lambda>k. f (d k) (r n)) \<longlonglongrightarrow> lim (\<lambda>k. f (d k) (r n)) \<longrightarrow> lim (\<lambda>k. f (d k) (r n)) \<in> {- M..M}
\<forall>i. f (d i) (r n) \<in> {- M..M}

goal (1 subgoal):
 1. lim (\<lambda>k. f (d k) (r n)) \<in> {- M..M}
[PROOF STEP]
using lim_f
[PROOF STATE]
proof (prove)
using this:
(\<forall>i. f (d i) (r n) \<in> {- M..M}) \<and> (\<lambda>k. f (d k) (r n)) \<longlonglongrightarrow> lim (\<lambda>k. f (d k) (r n)) \<longrightarrow> lim (\<lambda>k. f (d k) (r n)) \<in> {- M..M}
\<forall>i. f (d i) (r n) \<in> {- M..M}
(\<lambda>k. f (d k) (r ?n)) \<longlonglongrightarrow> lim (\<lambda>k. f (d k) (r ?n))

goal (1 subgoal):
 1. lim (\<lambda>k. f (d k) (r n)) \<in> {- M..M}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
lim (\<lambda>k. f (d k) (r n)) \<in> {- M..M}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
lim (\<lambda>k. f (d k) (r ?n)) \<in> {- M..M}

goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
lim (\<lambda>k. f (d k) (r ?n)) \<in> {- M..M}
[PROOF STEP]
have limset_bdd: "\<And>x. {lim (?f n) |n. x < r n} \<subseteq> {-M..M}"
[PROOF STATE]
proof (prove)
using this:
lim (\<lambda>k. f (d k) (r ?n)) \<in> {- M..M}

goal (1 subgoal):
 1. \<And>x. {lim (\<lambda>k. f (d k) (r n)) |n. x < r n} \<subseteq> {- M..M}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{lim (\<lambda>k. f (d k) (r n)) |n. ?x < r n} \<subseteq> {- M..M}

goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
{lim (\<lambda>k. f (d k) (r n)) |n. ?x < r n} \<subseteq> {- M..M}
[PROOF STEP]
have bdd_below: "bdd_below {lim (?f n) |n. x < r n}" for x
[PROOF STATE]
proof (prove)
using this:
{lim (\<lambda>k. f (d k) (r n)) |n. ?x < r n} \<subseteq> {- M..M}

goal (1 subgoal):
 1. bdd_below {lim (\<lambda>k. f (d k) (r n)) |n. x < r n}
[PROOF STEP]
by (metis (mono_tags) bdd_below_Icc bdd_below_mono)
[PROOF STATE]
proof (state)
this:
bdd_below {lim (\<lambda>k. f (d k) (r n)) |n. ?x < r n}

goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
have r_unbdd: "\<exists>n. x < r n" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>n. x < r n
[PROOF STEP]
using dense_r[OF less_add_one, of x]
[PROOF STATE]
proof (prove)
using this:
\<exists>n. x < r n \<and> r n < x + 1

goal (1 subgoal):
 1. \<exists>n. x < r n
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>n. ?x < r n

goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>n. ?x < r n
[PROOF STEP]
have nonempty: "{lim (?f n) |n. x < r n} \<noteq> {}" for x
[PROOF STATE]
proof (prove)
using this:
\<exists>n. ?x < r n

goal (1 subgoal):
 1. {lim (\<lambda>k. f (d k) (r n)) |n. x < r n} \<noteq> {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{lim (\<lambda>k. f (d k) (r n)) |n. ?x < r n} \<noteq> {}

goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
define F where "F x = Inf {lim (?f n) |n. x < r n}" for x
[PROOF STATE]
proof (state)
this:
F ?x = Inf {lim (\<lambda>k. f (d k) (r n)) |n. ?x < r n}

goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
have F_eq: "ereal (F x) = (INF n\<in>{n. x < r n}. ereal (lim (?f n)))" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ereal (F x) = (INF n\<in>{n. x < r n}. ereal (lim (\<lambda>k. f (d k) (r n))))
[PROOF STEP]
unfolding F_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ereal (Inf {lim (\<lambda>k. f (d k) (r n)) |n. x < r n}) = (INF n\<in>{n. x < r n}. ereal (lim (\<lambda>k. f (d k) (r n))))
[PROOF STEP]
by (subst ereal_Inf'[OF bdd_below nonempty]) (simp add: setcompr_eq_image image_comp)
[PROOF STATE]
proof (state)
this:
ereal (F ?x) = (INF n\<in>{n. ?x < r n}. ereal (lim (\<lambda>k. f (d k) (r n))))

goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
have mono_F: "mono F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mono F
[PROOF STEP]
using nonempty
[PROOF STATE]
proof (prove)
using this:
{lim (\<lambda>k. f (d k) (r n)) |n. ?x < r n} \<noteq> {}

goal (1 subgoal):
 1. mono F
[PROOF STEP]
by (auto intro!: cInf_superset_mono simp: F_def bdd_below mono_def)
[PROOF STATE]
proof (state)
this:
mono F

goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
mono F

goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
have "\<And>x. continuous (at_right x) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. continuous (at_right x) F
[PROOF STEP]
unfolding continuous_within order_tendsto_iff eventually_at_right[OF less_add_one]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. (\<forall>l<F x. \<exists>b>x. \<forall>y>x. y < b \<longrightarrow> l < F y) \<and> (\<forall>u>F x. \<exists>b>x. \<forall>y>x. y < b \<longrightarrow> F y < u)
[PROOF STEP]
proof safe
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x l. l < F x \<Longrightarrow> \<exists>b>x. \<forall>y>x. y < b \<longrightarrow> l < F y
 2. \<And>x u. F x < u \<Longrightarrow> \<exists>b>x. \<forall>y>x. y < b \<longrightarrow> F y < u
[PROOF STEP]
show "F x < u \<Longrightarrow> \<exists>b>x. \<forall>y>x. y < b \<longrightarrow> F y < u" for x u
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F x < u \<Longrightarrow> \<exists>b>x. \<forall>y>x. y < b \<longrightarrow> F y < u
[PROOF STEP]
unfolding F_def cInf_less_iff[OF nonempty bdd_below]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x\<in>{lim (\<lambda>k. f (d k) (r n)) |n. x < r n}. x < u \<Longrightarrow> \<exists>b>x. \<forall>y>x. y < b \<longrightarrow> (\<exists>x\<in>{lim (\<lambda>k. f (d k) (r n)) |n. y < r n}. x < u)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
F ?x < ?u \<Longrightarrow> \<exists>b>?x. \<forall>y>?x. y < b \<longrightarrow> F y < ?u

goal (1 subgoal):
 1. \<And>x l. l < F x \<Longrightarrow> \<exists>b>x. \<forall>y>x. y < b \<longrightarrow> l < F y
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x l. l < F x \<Longrightarrow> \<exists>b>x. \<forall>y>x. y < b \<longrightarrow> l < F y
[PROOF STEP]
show "\<exists>b>x. \<forall>y>x. y < b \<longrightarrow> l < F y" if l: "l < F x" for x l
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>b>x. \<forall>y>x. y < b \<longrightarrow> l < F y
[PROOF STEP]
using less_le_trans[OF l mono_F[THEN monoD, of x]]
[PROOF STATE]
proof (prove)
using this:
x \<le> ?y1 \<Longrightarrow> l < F ?y1

goal (1 subgoal):
 1. \<exists>b>x. \<forall>y>x. y < b \<longrightarrow> l < F y
[PROOF STEP]
by (auto intro: less_add_one)
[PROOF STATE]
proof (state)
this:
?l < F ?x \<Longrightarrow> \<exists>b>?x. \<forall>y>?x. y < b \<longrightarrow> ?l < F y

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
continuous (at_right ?x) F

goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
continuous (at_right ?x) F

goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
continuous (at_right ?x) F

goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
have "F x \<in> {-M..M}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F x \<in> {- M..M}
[PROOF STEP]
unfolding F_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Inf {lim (\<lambda>k. f (d k) (r n)) |n. x < r n} \<in> {- M..M}
[PROOF STEP]
using limset_bdd bdd_below r_unbdd
[PROOF STATE]
proof (prove)
using this:
{lim (\<lambda>k. f (d k) (r n)) |n. ?x < r n} \<subseteq> {- M..M}
bdd_below {lim (\<lambda>k. f (d k) (r n)) |n. ?x < r n}
\<exists>n. ?x < r n

goal (1 subgoal):
 1. Inf {lim (\<lambda>k. f (d k) (r n)) |n. x < r n} \<in> {- M..M}
[PROOF STEP]
by (intro closed_subset_contains_Inf) auto
[PROOF STATE]
proof (state)
this:
F x \<in> {- M..M}

goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
F x \<in> {- M..M}
[PROOF STEP]
have "\<bar>F x\<bar> \<le> M"
[PROOF STATE]
proof (prove)
using this:
F x \<in> {- M..M}

goal (1 subgoal):
 1. \<bar>F x\<bar> \<le> M
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<bar>F x\<bar> \<le> M

goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<bar>F ?x2\<bar> \<le> M

goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<bar>F ?x2\<bar> \<le> M

goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
have "(\<lambda>n. f (d n) x) \<longlonglongrightarrow> F x" if cts: "continuous (at x) F" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. f (d n) x) \<longlonglongrightarrow> F x
[PROOF STEP]
proof (rule limsup_le_liminf_real)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. limsup (\<lambda>xa. ereal (f (d xa) x)) \<le> ereal (F x)
 2. ereal (F x) \<le> liminf (\<lambda>xa. ereal (f (d xa) x))
[PROOF STEP]
show "limsup (\<lambda>n. f (d n) x) \<le> F x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. limsup (\<lambda>xa. ereal (f (d xa) x)) \<le> ereal (F x)
[PROOF STEP]
proof (rule tendsto_lowerbound)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. (?f \<longlongrightarrow> ereal (F x)) ?F
 2. \<forall>\<^sub>F i in ?F. limsup (\<lambda>xa. ereal (f (d xa) x)) \<le> ?f i
 3. ?F \<noteq> bot
[PROOF STEP]
show "(F \<longlongrightarrow> ereal (F x)) (at_right x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. ereal (F x)) \<longlongrightarrow> ereal (F x)) (at_right x)
[PROOF STEP]
using cts
[PROOF STATE]
proof (prove)
using this:
isCont F x

goal (1 subgoal):
 1. ((\<lambda>x. ereal (F x)) \<longlongrightarrow> ereal (F x)) (at_right x)
[PROOF STEP]
unfolding continuous_at_split
[PROOF STATE]
proof (prove)
using this:
continuous (at_left x) F \<and> continuous (at_right x) F

goal (1 subgoal):
 1. ((\<lambda>x. ereal (F x)) \<longlongrightarrow> ereal (F x)) (at_right x)
[PROOF STEP]
by (auto simp: continuous_within)
[PROOF STATE]
proof (state)
this:
((\<lambda>x. ereal (F x)) \<longlongrightarrow> ereal (F x)) (at_right x)

goal (2 subgoals):
 1. \<forall>\<^sub>F i in at_right x. limsup (\<lambda>xa. ereal (f (d xa) x)) \<le> ereal (F i)
 2. at_right x \<noteq> bot
[PROOF STEP]
show "\<forall>\<^sub>F i in at_right x. limsup (\<lambda>n. f (d n) x) \<le> F i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F i in at_right x. limsup (\<lambda>xa. ereal (f (d xa) x)) \<le> ereal (F i)
[PROOF STEP]
unfolding eventually_at_right[OF less_add_one]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>b>x. \<forall>y>x. y < b \<longrightarrow> limsup (\<lambda>xa. ereal (f (d xa) x)) \<le> ereal (F y)
[PROOF STEP]
proof (rule, rule, rule less_add_one, safe)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. \<lbrakk>x < y; y < x + 1\<rbrakk> \<Longrightarrow> limsup (\<lambda>xa. ereal (f (d xa) x)) \<le> ereal (F y)
[PROOF STEP]
fix y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. \<lbrakk>x < y; y < x + 1\<rbrakk> \<Longrightarrow> limsup (\<lambda>xa. ereal (f (d xa) x)) \<le> ereal (F y)
[PROOF STEP]
assume y: "x < y"
[PROOF STATE]
proof (state)
this:
x < y

goal (1 subgoal):
 1. \<And>y. \<lbrakk>x < y; y < x + 1\<rbrakk> \<Longrightarrow> limsup (\<lambda>xa. ereal (f (d xa) x)) \<le> ereal (F y)
[PROOF STEP]
with dense_r
[PROOF STATE]
proof (chain)
picking this:
?x < ?y \<Longrightarrow> \<exists>n. ?x < r n \<and> r n < ?y
x < y
[PROOF STEP]
obtain N where "x < r N" "r N < y"
[PROOF STATE]
proof (prove)
using this:
?x < ?y \<Longrightarrow> \<exists>n. ?x < r n \<and> r n < ?y
x < y

goal (1 subgoal):
 1. (\<And>N. \<lbrakk>x < r N; r N < y\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x < r N
r N < y

goal (1 subgoal):
 1. \<And>y. \<lbrakk>x < y; y < x + 1\<rbrakk> \<Longrightarrow> limsup (\<lambda>xa. ereal (f (d xa) x)) \<le> ereal (F y)
[PROOF STEP]
have *: "y < r n' \<Longrightarrow> lim (?f N) \<le> lim (?f n')" for n'
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y < r n' \<Longrightarrow> lim (\<lambda>k. f (d k) (r N)) \<le> lim (\<lambda>k. f (d k) (r n'))
[PROOF STEP]
using \<open>r N < y\<close>
[PROOF STATE]
proof (prove)
using this:
r N < y

goal (1 subgoal):
 1. y < r n' \<Longrightarrow> lim (\<lambda>k. f (d k) (r N)) \<le> lim (\<lambda>k. f (d k) (r n'))
[PROOF STEP]
by (intro LIMSEQ_le[OF lim_f lim_f]) (auto intro!: mono[THEN monoD])
[PROOF STATE]
proof (state)
this:
y < r ?n' \<Longrightarrow> lim (\<lambda>k. f (d k) (r N)) \<le> lim (\<lambda>k. f (d k) (r ?n'))

goal (1 subgoal):
 1. \<And>y. \<lbrakk>x < y; y < x + 1\<rbrakk> \<Longrightarrow> limsup (\<lambda>xa. ereal (f (d xa) x)) \<le> ereal (F y)
[PROOF STEP]
have "limsup (\<lambda>n. f (d n) x) \<le> limsup (?f N)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. limsup (\<lambda>xa. ereal (f (d xa) x)) \<le> limsup (\<lambda>x. ereal (f (d x) (r N)))
[PROOF STEP]
using \<open>x < r N\<close>
[PROOF STATE]
proof (prove)
using this:
x < r N

goal (1 subgoal):
 1. limsup (\<lambda>xa. ereal (f (d xa) x)) \<le> limsup (\<lambda>x. ereal (f (d x) (r N)))
[PROOF STEP]
by (auto intro!: Limsup_mono always_eventually mono[THEN monoD])
[PROOF STATE]
proof (state)
this:
limsup (\<lambda>xa. ereal (f (d xa) x)) \<le> limsup (\<lambda>x. ereal (f (d x) (r N)))

goal (1 subgoal):
 1. \<And>y. \<lbrakk>x < y; y < x + 1\<rbrakk> \<Longrightarrow> limsup (\<lambda>xa. ereal (f (d xa) x)) \<le> ereal (F y)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
limsup (\<lambda>xa. ereal (f (d xa) x)) \<le> limsup (\<lambda>x. ereal (f (d x) (r N)))

goal (1 subgoal):
 1. \<And>y. \<lbrakk>x < y; y < x + 1\<rbrakk> \<Longrightarrow> limsup (\<lambda>xa. ereal (f (d xa) x)) \<le> ereal (F y)
[PROOF STEP]
have "\<dots> = lim (\<lambda>n. ereal (?f N n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. limsup (\<lambda>x. ereal (f (d x) (r N))) = lim (\<lambda>n. ereal (f (d n) (r N)))
[PROOF STEP]
using rat_cnv[of N]
[PROOF STATE]
proof (prove)
using this:
convergent (\<lambda>k. f (d k) (r N))

goal (1 subgoal):
 1. limsup (\<lambda>x. ereal (f (d x) (r N))) = lim (\<lambda>n. ereal (f (d n) (r N)))
[PROOF STEP]
by (force intro!: convergent_limsup_cl simp: convergent_def)
[PROOF STATE]
proof (state)
this:
limsup (\<lambda>x. ereal (f (d x) (r N))) = lim (\<lambda>n. ereal (f (d n) (r N)))

goal (1 subgoal):
 1. \<And>y. \<lbrakk>x < y; y < x + 1\<rbrakk> \<Longrightarrow> limsup (\<lambda>xa. ereal (f (d xa) x)) \<le> ereal (F y)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
limsup (\<lambda>x. ereal (f (d x) (r N))) = lim (\<lambda>n. ereal (f (d n) (r N)))

goal (1 subgoal):
 1. \<And>y. \<lbrakk>x < y; y < x + 1\<rbrakk> \<Longrightarrow> limsup (\<lambda>xa. ereal (f (d xa) x)) \<le> ereal (F y)
[PROOF STEP]
have "\<dots> \<le> F y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lim (\<lambda>n. ereal (f (d n) (r N))) \<le> ereal (F y)
[PROOF STEP]
by (auto intro!: INF_greatest * simp: convergent_real_imp_convergent_ereal rat_cnv F_eq)
[PROOF STATE]
proof (state)
this:
lim (\<lambda>n. ereal (f (d n) (r N))) \<le> ereal (F y)

goal (1 subgoal):
 1. \<And>y. \<lbrakk>x < y; y < x + 1\<rbrakk> \<Longrightarrow> limsup (\<lambda>xa. ereal (f (d xa) x)) \<le> ereal (F y)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
limsup (\<lambda>xa. ereal (f (d xa) x)) \<le> ereal (F y)
[PROOF STEP]
show "limsup (\<lambda>n. f (d n) x) \<le> F y"
[PROOF STATE]
proof (prove)
using this:
limsup (\<lambda>xa. ereal (f (d xa) x)) \<le> ereal (F y)

goal (1 subgoal):
 1. limsup (\<lambda>xa. ereal (f (d xa) x)) \<le> ereal (F y)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
limsup (\<lambda>xa. ereal (f (d xa) x)) \<le> ereal (F y)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F i in at_right x. limsup (\<lambda>xa. ereal (f (d xa) x)) \<le> ereal (F i)

goal (1 subgoal):
 1. at_right x \<noteq> bot
[PROOF STEP]
qed simp
[PROOF STATE]
proof (state)
this:
limsup (\<lambda>xa. ereal (f (d xa) x)) \<le> ereal (F x)

goal (1 subgoal):
 1. ereal (F x) \<le> liminf (\<lambda>xa. ereal (f (d xa) x))
[PROOF STEP]
show "F x \<le> liminf (\<lambda>n. f (d n) x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ereal (F x) \<le> liminf (\<lambda>xa. ereal (f (d xa) x))
[PROOF STEP]
proof (rule tendsto_upperbound)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. (?f \<longlongrightarrow> ereal (F x)) ?F
 2. \<forall>\<^sub>F i in ?F. ?f i \<le> liminf (\<lambda>xa. ereal (f (d xa) x))
 3. ?F \<noteq> bot
[PROOF STEP]
show "(F \<longlongrightarrow> ereal (F x)) (at_left x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. ereal (F x)) \<longlongrightarrow> ereal (F x)) (at_left x)
[PROOF STEP]
using cts
[PROOF STATE]
proof (prove)
using this:
isCont F x

goal (1 subgoal):
 1. ((\<lambda>x. ereal (F x)) \<longlongrightarrow> ereal (F x)) (at_left x)
[PROOF STEP]
unfolding continuous_at_split
[PROOF STATE]
proof (prove)
using this:
continuous (at_left x) F \<and> continuous (at_right x) F

goal (1 subgoal):
 1. ((\<lambda>x. ereal (F x)) \<longlongrightarrow> ereal (F x)) (at_left x)
[PROOF STEP]
by (auto simp: continuous_within)
[PROOF STATE]
proof (state)
this:
((\<lambda>x. ereal (F x)) \<longlongrightarrow> ereal (F x)) (at_left x)

goal (2 subgoals):
 1. \<forall>\<^sub>F i in at_left x. ereal (F i) \<le> liminf (\<lambda>xa. ereal (f (d xa) x))
 2. at_left x \<noteq> bot
[PROOF STEP]
show "\<forall>\<^sub>F i in at_left x. F i \<le> liminf (\<lambda>n. f (d n) x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F i in at_left x. ereal (F i) \<le> liminf (\<lambda>xa. ereal (f (d xa) x))
[PROOF STEP]
unfolding eventually_at_left[OF minus_one_less]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>b<x. \<forall>y>b. y < x \<longrightarrow> ereal (F y) \<le> liminf (\<lambda>xa. ereal (f (d xa) x))
[PROOF STEP]
proof (rule, rule, rule minus_one_less, safe)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. \<lbrakk>x - 1 < y; y < x\<rbrakk> \<Longrightarrow> ereal (F y) \<le> liminf (\<lambda>xa. ereal (f (d xa) x))
[PROOF STEP]
fix y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. \<lbrakk>x - 1 < y; y < x\<rbrakk> \<Longrightarrow> ereal (F y) \<le> liminf (\<lambda>xa. ereal (f (d xa) x))
[PROOF STEP]
assume y: "y < x"
[PROOF STATE]
proof (state)
this:
y < x

goal (1 subgoal):
 1. \<And>y. \<lbrakk>x - 1 < y; y < x\<rbrakk> \<Longrightarrow> ereal (F y) \<le> liminf (\<lambda>xa. ereal (f (d xa) x))
[PROOF STEP]
with dense_r
[PROOF STATE]
proof (chain)
picking this:
?x < ?y \<Longrightarrow> \<exists>n. ?x < r n \<and> r n < ?y
y < x
[PROOF STEP]
obtain N where "y < r N" "r N < x"
[PROOF STATE]
proof (prove)
using this:
?x < ?y \<Longrightarrow> \<exists>n. ?x < r n \<and> r n < ?y
y < x

goal (1 subgoal):
 1. (\<And>N. \<lbrakk>y < r N; r N < x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
y < r N
r N < x

goal (1 subgoal):
 1. \<And>y. \<lbrakk>x - 1 < y; y < x\<rbrakk> \<Longrightarrow> ereal (F y) \<le> liminf (\<lambda>xa. ereal (f (d xa) x))
[PROOF STEP]
have "F y \<le> liminf (?f N)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ereal (F y) \<le> liminf (\<lambda>x. ereal (f (d x) (r N)))
[PROOF STEP]
using \<open>y < r N\<close>
[PROOF STATE]
proof (prove)
using this:
y < r N

goal (1 subgoal):
 1. ereal (F y) \<le> liminf (\<lambda>x. ereal (f (d x) (r N)))
[PROOF STEP]
by (auto simp: F_eq convergent_real_imp_convergent_ereal
            rat_cnv convergent_liminf_cl intro!: INF_lower2)
[PROOF STATE]
proof (state)
this:
ereal (F y) \<le> liminf (\<lambda>x. ereal (f (d x) (r N)))

goal (1 subgoal):
 1. \<And>y. \<lbrakk>x - 1 < y; y < x\<rbrakk> \<Longrightarrow> ereal (F y) \<le> liminf (\<lambda>xa. ereal (f (d xa) x))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
ereal (F y) \<le> liminf (\<lambda>x. ereal (f (d x) (r N)))

goal (1 subgoal):
 1. \<And>y. \<lbrakk>x - 1 < y; y < x\<rbrakk> \<Longrightarrow> ereal (F y) \<le> liminf (\<lambda>xa. ereal (f (d xa) x))
[PROOF STEP]
have "\<dots> \<le> liminf (\<lambda>n. f (d n) x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. liminf (\<lambda>x. ereal (f (d x) (r N))) \<le> liminf (\<lambda>xa. ereal (f (d xa) x))
[PROOF STEP]
using \<open>r N < x\<close>
[PROOF STATE]
proof (prove)
using this:
r N < x

goal (1 subgoal):
 1. liminf (\<lambda>x. ereal (f (d x) (r N))) \<le> liminf (\<lambda>xa. ereal (f (d xa) x))
[PROOF STEP]
by (auto intro!: Liminf_mono monoD[OF mono] always_eventually)
[PROOF STATE]
proof (state)
this:
liminf (\<lambda>x. ereal (f (d x) (r N))) \<le> liminf (\<lambda>xa. ereal (f (d xa) x))

goal (1 subgoal):
 1. \<And>y. \<lbrakk>x - 1 < y; y < x\<rbrakk> \<Longrightarrow> ereal (F y) \<le> liminf (\<lambda>xa. ereal (f (d xa) x))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
ereal (F y) \<le> liminf (\<lambda>xa. ereal (f (d xa) x))
[PROOF STEP]
show "F y \<le> liminf (\<lambda>n. f (d n) x)"
[PROOF STATE]
proof (prove)
using this:
ereal (F y) \<le> liminf (\<lambda>xa. ereal (f (d xa) x))

goal (1 subgoal):
 1. ereal (F y) \<le> liminf (\<lambda>xa. ereal (f (d xa) x))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
ereal (F y) \<le> liminf (\<lambda>xa. ereal (f (d xa) x))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F i in at_left x. ereal (F i) \<le> liminf (\<lambda>xa. ereal (f (d xa) x))

goal (1 subgoal):
 1. at_left x \<noteq> bot
[PROOF STEP]
qed simp
[PROOF STATE]
proof (state)
this:
ereal (F x) \<le> liminf (\<lambda>xa. ereal (f (d xa) x))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
isCont F ?x \<Longrightarrow> (\<lambda>n. f (d n) ?x) \<longlonglongrightarrow> F ?x

goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
mono F
continuous (at_right ?x) F
\<bar>F ?x2\<bar> \<le> M
isCont F ?x \<Longrightarrow> (\<lambda>n. f (d n) ?x) \<longlonglongrightarrow> F ?x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
mono F
continuous (at_right ?x) F
\<bar>F ?x2\<bar> \<le> M
isCont F ?x \<Longrightarrow> (\<lambda>n. f (d n) ?x) \<longlonglongrightarrow> F ?x

goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
using subseq
[PROOF STATE]
proof (prove)
using this:
mono F
continuous (at_right ?x) F
\<bar>F ?x2\<bar> \<le> M
isCont F ?x \<Longrightarrow> (\<lambda>n. f (d n) ?x) \<longlonglongrightarrow> F ?x
strict_mono d

goal (1 subgoal):
 1. \<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>s. strict_mono s \<and> (\<exists>F. (\<forall>x. continuous (at_right x) F) \<and> mono F \<and> (\<forall>x. \<bar>F x\<bar> \<le> M) \<and> (\<forall>x. isCont F x \<longrightarrow> (\<lambda>n. f (s n) x) \<longlonglongrightarrow> F x))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma proj2_set_Col_expand:
  assumes "proj2_set_Col S" and "{p,q,r} \<subseteq> S" and "p \<noteq> q" and "r \<noteq> p"
  shows "\<exists> k. r = proj2_abs (k *\<^sub>R proj2_rep p + proj2_rep q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>k. r = proj2_abs (k *\<^sub>R proj2_rep p + proj2_rep q)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>k. r = proj2_abs (k *\<^sub>R proj2_rep p + proj2_rep q)
[PROOF STEP]
from \<open>proj2_set_Col S\<close>
[PROOF STATE]
proof (chain)
picking this:
proj2_set_Col S
[PROOF STEP]
obtain l where "\<forall> t\<in>S. proj2_incident t l"
[PROOF STATE]
proof (prove)
using this:
proj2_set_Col S

goal (1 subgoal):
 1. (\<And>l. \<forall>t\<in>S. proj2_incident t l \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding proj2_set_Col_def
[PROOF STATE]
proof (prove)
using this:
\<exists>l. \<forall>p\<in>S. proj2_incident p l

goal (1 subgoal):
 1. (\<And>l. \<forall>t\<in>S. proj2_incident t l \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
\<forall>t\<in>S. proj2_incident t l

goal (1 subgoal):
 1. \<exists>k. r = proj2_abs (k *\<^sub>R proj2_rep p + proj2_rep q)
[PROOF STEP]
with \<open>{p,q,r} \<subseteq> S\<close> and \<open>p \<noteq> q\<close> and \<open>r \<noteq> p\<close> and proj2_incident_iff [of p q l r]
[PROOF STATE]
proof (chain)
picking this:
{p, q, r} \<subseteq> S
p \<noteq> q
r \<noteq> p
\<lbrakk>p \<noteq> q; proj2_incident p l; proj2_incident q l\<rbrakk> \<Longrightarrow> proj2_incident r l = (r = p \<or> (\<exists>k. r = proj2_abs (k *\<^sub>R proj2_rep p + proj2_rep q)))
\<forall>t\<in>S. proj2_incident t l
[PROOF STEP]
show "\<exists> k. r = proj2_abs (k *\<^sub>R proj2_rep p + proj2_rep q)"
[PROOF STATE]
proof (prove)
using this:
{p, q, r} \<subseteq> S
p \<noteq> q
r \<noteq> p
\<lbrakk>p \<noteq> q; proj2_incident p l; proj2_incident q l\<rbrakk> \<Longrightarrow> proj2_incident r l = (r = p \<or> (\<exists>k. r = proj2_abs (k *\<^sub>R proj2_rep p + proj2_rep q)))
\<forall>t\<in>S. proj2_incident t l

goal (1 subgoal):
 1. \<exists>k. r = proj2_abs (k *\<^sub>R proj2_rep p + proj2_rep q)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<exists>k. r = proj2_abs (k *\<^sub>R proj2_rep p + proj2_rep q)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma csv_length_same_as_qlist:
  fixes p:: "real poly"
  assumes nonzero: "p\<noteq>0"
  fixes qs:: "real poly list"
  fixes sign:: "rat list"
  fixes x:: "real"
  assumes root_p: "x \<in> {x. poly p x = 0}"
  assumes sign_fix: "sign = consistent_sign_vec qs x"
  shows "length sign = length qs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length sign = length qs
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
p \<noteq> 0
x \<in> {x. poly p x = 0}
sign = consistent_sign_vec qs x

goal (1 subgoal):
 1. length sign = length qs
[PROOF STEP]
unfolding consistent_sign_vec_def
[PROOF STATE]
proof (prove)
using this:
p \<noteq> 0
x \<in> {x. poly p x = 0}
sign = map (\<lambda>q. if 0 < poly q x then 1 else if poly q x = 0 then 0 else - 1) qs

goal (1 subgoal):
 1. length sign = length qs
[PROOF STEP]
by auto


[STATEMENT]
theorem "~ (\<exists>(x::int) (y::int) (z::int). 4*x + (-6::int)*y = 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<nexists>x y z. 4 * x + - 6 * y = 1
[PROOF STEP]
by presburger


[STATEMENT]
lemma "filterlim (\<lambda>x::real. (3 powr x + 3 powr (2*x)) powr (1/x)) (nhds 9) at_top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. (3 powr x + 3 powr (2 * x)) powr (1 / x)) \<longlongrightarrow> 9) at_top
[PROOF STEP]
using powr_def[of 3 "2::real"]
[PROOF STATE]
proof (prove)
using this:
3 powr 2 \<equiv> if 3 = 0 then 0 else exp (2 * ln 3)

goal (1 subgoal):
 1. ((\<lambda>x. (3 powr x + 3 powr (2 * x)) powr (1 / x)) \<longlongrightarrow> 9) at_top
[PROOF STEP]
by real_asymp


[STATEMENT]
theorem equiv_list_exprel: "equiv UNIV (listrel exprel)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. equiv UNIV (listrel exprel)
[PROOF STEP]
using equiv_listrel [OF equiv_exprel]
[PROOF STATE]
proof (prove)
using this:
equiv (lists UNIV) (listrel exprel)

goal (1 subgoal):
 1. equiv UNIV (listrel exprel)
[PROOF STEP]
by simp


[STATEMENT]
lemma weak_ranking_permute:
  assumes "f permutes carrier"
  shows   "weak_ranking (map_relation (inv f) le) = map ((`) f) (weak_ranking le)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. weak_ranking (map_relation (inv f) le) = map ((`) f) (weak_ranking le)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. weak_ranking (map_relation (inv f) le) = map ((`) f) (weak_ranking le)
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
f permutes carrier
[PROOF STEP]
have "inv f -` carrier = carrier"
[PROOF STATE]
proof (prove)
using this:
f permutes carrier

goal (1 subgoal):
 1. inv f -` carrier = carrier
[PROOF STEP]
by (simp add: permutes_vimage permutes_inv)
[PROOF STATE]
proof (state)
this:
inv f -` carrier = carrier

goal (1 subgoal):
 1. weak_ranking (map_relation (inv f) le) = map ((`) f) (weak_ranking le)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
inv f -` carrier = carrier
[PROOF STEP]
interpret R: finite_total_preorder_on "inv f -` carrier" "map_relation (inv f) le"
[PROOF STATE]
proof (prove)
using this:
inv f -` carrier = carrier

goal (1 subgoal):
 1. finite_total_preorder_on (inv f -` carrier) (map_relation (inv f) le)
[PROOF STEP]
by (intro finite_total_preorder_on_map) (simp_all add: finite_carrier)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. weak_ranking (map_relation (inv f) le) = map ((`) f) (weak_ranking le)
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
f permutes carrier
[PROOF STEP]
have "is_weak_ranking (map ((`) f) (weak_ranking le))"
[PROOF STATE]
proof (prove)
using this:
f permutes carrier

goal (1 subgoal):
 1. is_weak_ranking (map ((`) f) (weak_ranking le))
[PROOF STEP]
by (intro is_weak_ranking_map_inj)
       (simp_all add: weak_ranking_total_preorder permutes_inj_on)
[PROOF STATE]
proof (state)
this:
is_weak_ranking (map ((`) f) (weak_ranking le))

goal (1 subgoal):
 1. weak_ranking (map_relation (inv f) le) = map ((`) f) (weak_ranking le)
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
f permutes carrier
is_weak_ranking (map ((`) f) (weak_ranking le))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
f permutes carrier
is_weak_ranking (map ((`) f) (weak_ranking le))

goal (1 subgoal):
 1. weak_ranking (map_relation (inv f) le) = map ((`) f) (weak_ranking le)
[PROOF STEP]
by (intro sym[OF R.weak_ranking_unique])
       (simp_all add: of_weak_ranking_permute weak_ranking_Union weak_ranking_total_preorder)
[PROOF STATE]
proof (state)
this:
weak_ranking (map_relation (inv f) le) = map ((`) f) (weak_ranking le)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma forall_simp [simp]: "(\<forall>a b. \<forall>x\<in>A. (a = (t x)) \<longrightarrow> (h x) \<or> b \<noteq> u x) = (\<forall>x\<in> A . h x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>a b. \<forall>x\<in>A. a = t x \<longrightarrow> h x \<or> b \<noteq> u x) = (\<forall>x\<in>A. h x)
[PROOF STEP]
by auto


[STATEMENT]
lemma homotopy_eqv_sing:
  fixes S :: "'a::real_normed_vector set" and a :: "'b::real_normed_vector"
  shows "S homotopy_eqv {a} \<longleftrightarrow> S \<noteq> {} \<and> contractible S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (S homotopy_eqv {a}) = (S \<noteq> {} \<and> contractible S)
[PROOF STEP]
proof (cases "S = {}")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. S = {} \<Longrightarrow> (S homotopy_eqv {a}) = (S \<noteq> {} \<and> contractible S)
 2. S \<noteq> {} \<Longrightarrow> (S homotopy_eqv {a}) = (S \<noteq> {} \<and> contractible S)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
S \<noteq> {}

goal (2 subgoals):
 1. S = {} \<Longrightarrow> (S homotopy_eqv {a}) = (S \<noteq> {} \<and> contractible S)
 2. S \<noteq> {} \<Longrightarrow> (S homotopy_eqv {a}) = (S \<noteq> {} \<and> contractible S)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
S \<noteq> {}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
S \<noteq> {}

goal (1 subgoal):
 1. (S homotopy_eqv {a}) = (S \<noteq> {} \<and> contractible S)
[PROOF STEP]
by (metis contractible_sing empty_not_insert homotopy_eqv_contractibility homotopy_eqv_contractible_sets)
[PROOF STATE]
proof (state)
this:
(S homotopy_eqv {a}) = (S \<noteq> {} \<and> contractible S)

goal (1 subgoal):
 1. S = {} \<Longrightarrow> (S homotopy_eqv {a}) = (S \<noteq> {} \<and> contractible S)
[PROOF STEP]
qed simp


[STATEMENT]
lemma divide_fract [simp]: "Fract a b div Fract c d = Fract (a * d) (b * c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Fract a b div Fract c d = Fract (a * d) (b * c)
[PROOF STEP]
by (simp add: divide_fract_def)


[STATEMENT]
lemma E_linear_sum2: "finite (set_pmf D) \<Longrightarrow> E(map_pmf (\<lambda>x. (\<Sum>i<up. f i x)) D)
      = (\<Sum>i<(up::nat). E(map_pmf (f i) D))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (set_pmf D) \<Longrightarrow> E (map_pmf (\<lambda>x. \<Sum>i<up. f i x) D) = (\<Sum>i<up. E (map_pmf (f i) D))
[PROOF STEP]
unfolding E_def integral_map_pmf
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (set_pmf D) \<Longrightarrow> measure_pmf.expectation D (\<lambda>x. \<Sum>i<up. f i x) = (\<Sum>i<up. measure_pmf.expectation D (f i))
[PROOF STEP]
apply(rule Bochner_Integration.integral_sum)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. \<lbrakk>finite (set_pmf D); i \<in> {..<up}\<rbrakk> \<Longrightarrow> integrable (measure_pmf D) (f i)
[PROOF STEP]
by (simp add: integrable_measure_pmf_finite)


[STATEMENT]
lemma coproduct_qbs_space[simp]: "qbs_space (coprod_qbs I X) = (SIGMA i:I. qbs_space (X i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. qbs_space (coprod_qbs I X) = (SIGMA i:I. qbs_space (X i))
[PROOF STEP]
by(simp add: coprod_qbs_correct qbs_space_def)


[STATEMENT]
lemma out_in_arcs_reflexive: "v \<in> verts G \<Longrightarrow> (e \<in> (out_arcs G v) \<Longrightarrow>
    \<exists> e' . (e' \<in> (in_arcs G v) \<and> tail G e' = head G e))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>v \<in> verts G; e \<in> out_arcs G v\<rbrakk> \<Longrightarrow> \<exists>e'. e' \<in> in_arcs G v \<and> tail G e' = head G e
[PROOF STEP]
using symmetric_conv sym_arcs
[PROOF STATE]
proof (prove)
using this:
symmetric ?G = (\<forall>e1\<in>arcs ?G. \<exists>e2\<in>arcs ?G. tail ?G e1 = head ?G e2 \<and> head ?G e1 = tail ?G e2)
symmetric G

goal (1 subgoal):
 1. \<lbrakk>v \<in> verts G; e \<in> out_arcs G v\<rbrakk> \<Longrightarrow> \<exists>e'. e' \<in> in_arcs G v \<and> tail G e' = head G e
[PROOF STEP]
by fastforce


[STATEMENT]
lemma root_nat_floor_upper: assumes p0: "p \<noteq> 0"
  shows "(root_nat_floor p x + 1) ^ p > x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int x < (root_nat_floor p x + 1) ^ p
[PROOF STEP]
using root_int_floor_pos_upper[OF p0, of x]
[PROOF STATE]
proof (prove)
using this:
0 \<le> int x \<Longrightarrow> int x < (root_int_floor_pos p (int x) + 1) ^ p

goal (1 subgoal):
 1. int x < (root_nat_floor p x + 1) ^ p
[PROOF STEP]
unfolding root_nat_floor_def
[PROOF STATE]
proof (prove)
using this:
0 \<le> int x \<Longrightarrow> int x < (root_int_floor_pos p (int x) + 1) ^ p

goal (1 subgoal):
 1. int x < (root_int_floor_pos p (int x) + 1) ^ p
[PROOF STEP]
by auto


[STATEMENT]
lemma sinh_field_def: "sinh z = (exp z - exp (-z)) / (2 :: 'a :: {banach, real_normed_field})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sinh z = (exp z - exp (- z)) / (2::'a)
[PROOF STEP]
by (simp add: sinh_def scaleR_conv_of_real)


[STATEMENT]
lemma path_component_maximal:
     "\<lbrakk>x \<in> T; path_connected T; T \<subseteq> S\<rbrakk> \<Longrightarrow> T \<subseteq> (path_component_set S x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> T; path_connected T; T \<subseteq> S\<rbrakk> \<Longrightarrow> T \<subseteq> path_component_set S x
[PROOF STEP]
by (metis path_component_mono path_connected_component_set)