[STATEMENT]
theorem f0_asymptotic_space_complexity:
  "f0_space_usage \<in> O[at_top \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / of_rat \<epsilon>) *
  (ln (real n) + 1 / (of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / of_rat \<delta>))))"
  (is "_ \<in> O[?F](?rhs)")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
define n_of :: "nat \<times> rat \<times> rat \<Rightarrow> nat" where "n_of = (\<lambda>(n, \<epsilon>, \<delta>). n)"
[PROOF STATE]
proof (state)
this:
n_of = (\<lambda>(n, \<epsilon>, \<delta>). n)

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
define \<epsilon>_of :: "nat \<times> rat \<times> rat \<Rightarrow> rat" where "\<epsilon>_of = (\<lambda>(n, \<epsilon>, \<delta>). \<epsilon>)"
[PROOF STATE]
proof (state)
this:
\<epsilon>_of = (\<lambda>(n, \<epsilon>, \<delta>). \<epsilon>)

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
define \<delta>_of :: "nat \<times> rat \<times> rat \<Rightarrow> rat" where "\<delta>_of = (\<lambda>(n, \<epsilon>, \<delta>). \<delta>)"
[PROOF STATE]
proof (state)
this:
\<delta>_of = (\<lambda>(n, \<epsilon>, \<delta>). \<delta>)

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
define t_of where "t_of = (\<lambda>x. nat \<lceil>80 / (real_of_rat (\<delta>_of x))\<^sup>2\<rceil>)"
[PROOF STATE]
proof (state)
this:
t_of = (\<lambda>x. nat \<lceil>80 / (real_of_rat (\<delta>_of x))\<^sup>2\<rceil>)

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
define s_of where "s_of = (\<lambda>x. nat \<lceil>-(18 * ln (real_of_rat (\<epsilon>_of x)))\<rceil>)"
[PROOF STATE]
proof (state)
this:
s_of = (\<lambda>x. nat \<lceil>- (18 * ln (real_of_rat (\<epsilon>_of x)))\<rceil>)

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
define r_of where "r_of = (\<lambda>x. nat (4 * \<lceil>log 2 (1 / real_of_rat (\<delta>_of x))\<rceil> + 23))"
[PROOF STATE]
proof (state)
this:
r_of = (\<lambda>x. nat (4 * \<lceil>log 2 (1 / real_of_rat (\<delta>_of x))\<rceil> + 23))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
define g where "g = (\<lambda>x. ln (1 / of_rat (\<epsilon>_of x)) * (ln (real (n_of x)) +
    1 / (of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / of_rat (\<delta>_of x)))))"
[PROOF STATE]
proof (state)
this:
g = (\<lambda>x. ln (1 / real_of_rat (\<epsilon>_of x)) * (ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
have evt: "(\<And>x.
    0 < real_of_rat (\<delta>_of x) \<and> 0 < real_of_rat (\<epsilon>_of x) \<and>
    1/real_of_rat (\<delta>_of x) \<ge> \<delta> \<and> 1/real_of_rat (\<epsilon>_of x) \<ge> \<epsilon> \<and>
    real (n_of x) \<ge> n \<Longrightarrow> P x) \<Longrightarrow> eventually P ?F"  (is "(\<And>x. ?prem x \<Longrightarrow> _) \<Longrightarrow> _")
    for \<delta> \<epsilon> n P
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x. 0 < real_of_rat (\<delta>_of x) \<and> 0 < real_of_rat (\<epsilon>_of x) \<and> \<delta> \<le> 1 / real_of_rat (\<delta>_of x) \<and> \<epsilon> \<le> 1 / real_of_rat (\<epsilon>_of x) \<and> n \<le> real (n_of x) \<Longrightarrow> P x) \<Longrightarrow> eventually P (sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0)
[PROOF STEP]
apply (rule eventually_mono[where P="?prem" and Q="P"])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. (\<And>x. 0 < real_of_rat (\<delta>_of x) \<and> 0 < real_of_rat (\<epsilon>_of x) \<and> \<delta> \<le> 1 / real_of_rat (\<delta>_of x) \<and> \<epsilon> \<le> 1 / real_of_rat (\<epsilon>_of x) \<and> n \<le> real (n_of x) \<Longrightarrow> P x) \<Longrightarrow> \<forall>\<^sub>F x in sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0. 0 < real_of_rat (\<delta>_of x) \<and> 0 < real_of_rat (\<epsilon>_of x) \<and> \<delta> \<le> 1 / real_of_rat (\<delta>_of x) \<and> \<epsilon> \<le> 1 / real_of_rat (\<epsilon>_of x) \<and> n \<le> real (n_of x)
 2. \<And>x. \<lbrakk>\<And>x. 0 < real_of_rat (\<delta>_of x) \<and> 0 < real_of_rat (\<epsilon>_of x) \<and> \<delta> \<le> 1 / real_of_rat (\<delta>_of x) \<and> \<epsilon> \<le> 1 / real_of_rat (\<epsilon>_of x) \<and> n \<le> real (n_of x) \<Longrightarrow> P x; 0 < real_of_rat (\<delta>_of x) \<and> 0 < real_of_rat (\<epsilon>_of x) \<and> \<delta> \<le> 1 / real_of_rat (\<delta>_of x) \<and> \<epsilon> \<le> 1 / real_of_rat (\<epsilon>_of x) \<and> n \<le> real (n_of x)\<rbrakk> \<Longrightarrow> P x
[PROOF STEP]
apply (simp add:\<epsilon>_of_def case_prod_beta' \<delta>_of_def n_of_def)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. (\<And>x. 0 < snd (snd x) \<and> 0 < fst (snd x) \<and> \<delta> \<le> 1 / real_of_rat (snd (snd x)) \<and> \<epsilon> \<le> 1 / real_of_rat (fst (snd x)) \<and> n \<le> real (fst x) \<Longrightarrow> P x) \<Longrightarrow> \<forall>\<^sub>F x in sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0. 0 < snd (snd x) \<and> 0 < fst (snd x) \<and> \<delta> \<le> 1 / real_of_rat (snd (snd x)) \<and> \<epsilon> \<le> 1 / real_of_rat (fst (snd x)) \<and> n \<le> real (fst x)
 2. \<And>x. \<lbrakk>\<And>x. 0 < real_of_rat (\<delta>_of x) \<and> 0 < real_of_rat (\<epsilon>_of x) \<and> \<delta> \<le> 1 / real_of_rat (\<delta>_of x) \<and> \<epsilon> \<le> 1 / real_of_rat (\<epsilon>_of x) \<and> n \<le> real (n_of x) \<Longrightarrow> P x; 0 < real_of_rat (\<delta>_of x) \<and> 0 < real_of_rat (\<epsilon>_of x) \<and> \<delta> \<le> 1 / real_of_rat (\<delta>_of x) \<and> \<epsilon> \<le> 1 / real_of_rat (\<epsilon>_of x) \<and> n \<le> real (n_of x)\<rbrakk> \<Longrightarrow> P x
[PROOF STEP]
apply (intro eventually_conj eventually_prod1' eventually_prod2'
        sequentially_inf eventually_at_right_less inv_at_right_0_inf)
[PROOF STATE]
proof (prove)
goal (10 subgoals):
 1. (\<And>x. 0 < snd (snd x) \<and> 0 < fst (snd x) \<and> \<delta> \<le> 1 / real_of_rat (snd (snd x)) \<and> \<epsilon> \<le> 1 / real_of_rat (fst (snd x)) \<and> n \<le> real (fst x) \<Longrightarrow> P x) \<Longrightarrow> sequentially \<noteq> bot
 2. (\<And>x. 0 < snd (snd x) \<and> 0 < fst (snd x) \<and> \<delta> \<le> 1 / real_of_rat (snd (snd x)) \<and> \<epsilon> \<le> 1 / real_of_rat (fst (snd x)) \<and> n \<le> real (fst x) \<Longrightarrow> P x) \<Longrightarrow> at_right 0 \<noteq> bot
 3. (\<And>x. 0 < snd (snd x) \<and> 0 < fst (snd x) \<and> \<delta> \<le> 1 / real_of_rat (snd (snd x)) \<and> \<epsilon> \<le> 1 / real_of_rat (fst (snd x)) \<and> n \<le> real (fst x) \<Longrightarrow> P x) \<Longrightarrow> sequentially \<noteq> bot
 4. (\<And>x. 0 < snd (snd x) \<and> 0 < fst (snd x) \<and> \<delta> \<le> 1 / real_of_rat (snd (snd x)) \<and> \<epsilon> \<le> 1 / real_of_rat (fst (snd x)) \<and> n \<le> real (fst x) \<Longrightarrow> P x) \<Longrightarrow> at_right 0 \<noteq> bot
 5. (\<And>x. 0 < snd (snd x) \<and> 0 < fst (snd x) \<and> \<delta> \<le> 1 / real_of_rat (snd (snd x)) \<and> \<epsilon> \<le> 1 / real_of_rat (fst (snd x)) \<and> n \<le> real (fst x) \<Longrightarrow> P x) \<Longrightarrow> sequentially \<noteq> bot
 6. (\<And>x. 0 < snd (snd x) \<and> 0 < fst (snd x) \<and> \<delta> \<le> 1 / real_of_rat (snd (snd x)) \<and> \<epsilon> \<le> 1 / real_of_rat (fst (snd x)) \<and> n \<le> real (fst x) \<Longrightarrow> P x) \<Longrightarrow> at_right 0 \<noteq> bot
 7. (\<And>x. 0 < snd (snd x) \<and> 0 < fst (snd x) \<and> \<delta> \<le> 1 / real_of_rat (snd (snd x)) \<and> \<epsilon> \<le> 1 / real_of_rat (fst (snd x)) \<and> n \<le> real (fst x) \<Longrightarrow> P x) \<Longrightarrow> sequentially \<noteq> bot
 8. (\<And>x. 0 < snd (snd x) \<and> 0 < fst (snd x) \<and> \<delta> \<le> 1 / real_of_rat (snd (snd x)) \<and> \<epsilon> \<le> 1 / real_of_rat (fst (snd x)) \<and> n \<le> real (fst x) \<Longrightarrow> P x) \<Longrightarrow> at_right 0 \<noteq> bot
 9. (\<And>x. 0 < snd (snd x) \<and> 0 < fst (snd x) \<and> \<delta> \<le> 1 / real_of_rat (snd (snd x)) \<and> \<epsilon> \<le> 1 / real_of_rat (fst (snd x)) \<and> n \<le> real (fst x) \<Longrightarrow> P x) \<Longrightarrow> at_right 0 \<times>\<^sub>F at_right 0 \<noteq> bot
 10. \<And>x. \<lbrakk>\<And>x. 0 < real_of_rat (\<delta>_of x) \<and> 0 < real_of_rat (\<epsilon>_of x) \<and> \<delta> \<le> 1 / real_of_rat (\<delta>_of x) \<and> \<epsilon> \<le> 1 / real_of_rat (\<epsilon>_of x) \<and> n \<le> real (n_of x) \<Longrightarrow> P x; 0 < real_of_rat (\<delta>_of x) \<and> 0 < real_of_rat (\<epsilon>_of x) \<and> \<delta> \<le> 1 / real_of_rat (\<delta>_of x) \<and> \<epsilon> \<le> 1 / real_of_rat (\<epsilon>_of x) \<and> n \<le> real (n_of x)\<rbrakk> \<Longrightarrow> P x
[PROOF STEP]
by (auto simp add:prod_filter_eq_bot)
[PROOF STATE]
proof (state)
this:
(\<And>x. 0 < real_of_rat (\<delta>_of x) \<and> 0 < real_of_rat (\<epsilon>_of x) \<and> ?\<delta> \<le> 1 / real_of_rat (\<delta>_of x) \<and> ?\<epsilon> \<le> 1 / real_of_rat (\<epsilon>_of x) \<and> ?n \<le> real (n_of x) \<Longrightarrow> ?P x) \<Longrightarrow> eventually ?P (sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0)

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
have exp_pos: "exp k \<le> real x \<Longrightarrow> x > 0" for k x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. exp k \<le> real x \<Longrightarrow> 0 < x
[PROOF STEP]
using exp_gt_zero gr0I
[PROOF STATE]
proof (prove)
using this:
0 < exp ?x
(?n = 0 \<Longrightarrow> False) \<Longrightarrow> 0 < ?n

goal (1 subgoal):
 1. exp k \<le> real x \<Longrightarrow> 0 < x
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
exp ?k \<le> real ?x \<Longrightarrow> 0 < ?x

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
have exp_gt_1: "exp 1 \<ge> (1::real)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 \<le> exp 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
1 \<le> exp 1

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
have 1: "(\<lambda>_. 1) \<in> O[?F](\<lambda>x. ln (1 / real_of_rat (\<epsilon>_of x)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>_. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<epsilon>_of x)))
[PROOF STEP]
by (auto intro!:landau_o.big_mono evt[where \<epsilon>="exp 1"] iffD2[OF ln_ge_iff] simp add:abs_ge_iff)
[PROOF STATE]
proof (state)
this:
(\<lambda>_. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<epsilon>_of x)))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
have 2: "(\<lambda>_. 1) \<in> O[?F](\<lambda>x. ln (1 / real_of_rat (\<delta>_of x)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>_. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<delta>_of x)))
[PROOF STEP]
by (auto intro!:landau_o.big_mono evt[where \<delta>="exp 1"] iffD2[OF ln_ge_iff] simp add:abs_ge_iff)
[PROOF STATE]
proof (state)
this:
(\<lambda>_. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<delta>_of x)))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
have 3: " (\<lambda>x. 1) \<in> O[?F](\<lambda>x. ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))
[PROOF STEP]
using exp_pos
[PROOF STATE]
proof (prove)
using this:
exp ?k \<le> real ?x \<Longrightarrow> 0 < ?x

goal (1 subgoal):
 1. (\<lambda>x. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))
[PROOF STEP]
by (intro landau_sum_2 2 evt[where n="exp 1" and \<delta>="1"] ln_ge_zero  iffD2[OF ln_ge_iff], auto)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
have 4: "(\<lambda>_. 1) \<in> O[?F](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>_. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)
[PROOF STEP]
using one_le_power
[PROOF STATE]
proof (prove)
using this:
(1::?'a) \<le> ?a \<Longrightarrow> (1::?'a) \<le> ?a ^ ?n

goal (1 subgoal):
 1. (\<lambda>_. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)
[PROOF STEP]
by (intro landau_o.big_mono evt[where \<delta>="1"], auto simp add:power_one_over[symmetric])
[PROOF STATE]
proof (state)
this:
(\<lambda>_. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
have "(\<lambda>x. 80 * (1 / (real_of_rat (\<delta>_of x))\<^sup>2)) \<in> O[?F](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. 80 * (1 / (real_of_rat (\<delta>_of x))\<^sup>2)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)
[PROOF STEP]
by (subst landau_o.big.cmult_in_iff, auto)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. 80 * (1 / (real_of_rat (\<delta>_of x))\<^sup>2)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
hence 5: "(\<lambda>x. real (t_of x)) \<in> O[?F](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. 80 * (1 / (real_of_rat (\<delta>_of x))\<^sup>2)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)

goal (1 subgoal):
 1. (\<lambda>x. real (t_of x)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)
[PROOF STEP]
unfolding  t_of_def
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. 80 * (1 / (real_of_rat (\<delta>_of x))\<^sup>2)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)

goal (1 subgoal):
 1. (\<lambda>x. real (nat \<lceil>80 / (real_of_rat (\<delta>_of x))\<^sup>2\<rceil>)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)
[PROOF STEP]
by (intro landau_real_nat landau_ceil 4, auto)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. real (t_of x)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
have "(\<lambda>x. ln (real_of_rat (\<epsilon>_of x))) \<in> O[?F](\<lambda>x. ln (1 / real_of_rat (\<epsilon>_of x)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. ln (real_of_rat (\<epsilon>_of x))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<epsilon>_of x)))
[PROOF STEP]
by (intro landau_o.big_mono evt[where \<epsilon>="1"], auto simp add:ln_div)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. ln (real_of_rat (\<epsilon>_of x))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<epsilon>_of x)))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
hence 6: "(\<lambda>x. real (s_of x)) \<in> O[?F](\<lambda>x. ln (1 / real_of_rat (\<epsilon>_of x)))"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. ln (real_of_rat (\<epsilon>_of x))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<epsilon>_of x)))

goal (1 subgoal):
 1. (\<lambda>x. real (s_of x)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<epsilon>_of x)))
[PROOF STEP]
unfolding s_of_def
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. ln (real_of_rat (\<epsilon>_of x))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<epsilon>_of x)))

goal (1 subgoal):
 1. (\<lambda>x. real (nat \<lceil>- (18 * ln (real_of_rat (\<epsilon>_of x)))\<rceil>)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<epsilon>_of x)))
[PROOF STEP]
by (intro landau_nat_ceil 1, simp)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. real (s_of x)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<epsilon>_of x)))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
have 7: " (\<lambda>x. 1) \<in> O[?F](\<lambda>x. ln (real (n_of x)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)))
[PROOF STEP]
using exp_pos
[PROOF STATE]
proof (prove)
using this:
exp ?k \<le> real ?x \<Longrightarrow> 0 < ?x

goal (1 subgoal):
 1. (\<lambda>x. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)))
[PROOF STEP]
by (auto intro!: landau_o.big_mono evt[where n="exp 1"] iffD2[OF ln_ge_iff] simp: abs_ge_iff)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
have 8:" (\<lambda>_. 1) \<in>
    O[?F](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>_. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))
[PROOF STEP]
using order_trans[OF exp_gt_1] exp_pos
[PROOF STATE]
proof (prove)
using this:
exp 1 \<le> ?z \<Longrightarrow> 1 \<le> ?z
exp ?k \<le> real ?x \<Longrightarrow> 0 < ?x

goal (1 subgoal):
 1. (\<lambda>_. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))
[PROOF STEP]
by (intro landau_sum_1 7 evt[where n="exp 1" and \<delta>="1"] ln_ge_zero  iffD2[OF ln_ge_iff]
        mult_nonneg_nonneg add_nonneg_nonneg) auto
[PROOF STATE]
proof (state)
this:
(\<lambda>_. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
have "(\<lambda>x. ln (real (s_of x) + 1)) \<in> O[?F](\<lambda>x. ln (1 / real_of_rat (\<epsilon>_of x)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. ln (real (s_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<epsilon>_of x)))
[PROOF STEP]
by (intro landau_ln_3 sum_in_bigo 6 1, simp)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. ln (real (s_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<epsilon>_of x)))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
hence 9: "(\<lambda>x. log 2 (real (s_of x) + 1)) \<in> O[?F](g)"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. ln (real (s_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<epsilon>_of x)))

goal (1 subgoal):
 1. (\<lambda>x. log 2 (real (s_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](g)
[PROOF STEP]
unfolding g_def
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. ln (real (s_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<epsilon>_of x)))

goal (1 subgoal):
 1. (\<lambda>x. log 2 (real (s_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<epsilon>_of x)) * (ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))))
[PROOF STEP]
by (intro landau_o.big_mult_1 8, auto simp:log_def)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. log 2 (real (s_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](g)

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
have 10: "(\<lambda>x. 1) \<in> O[?F](g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](g)
[PROOF STEP]
unfolding g_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<epsilon>_of x)) * (ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))))
[PROOF STEP]
by (intro landau_o.big_mult_1 8 1)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](g)

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
have "(\<lambda>x. ln (real (t_of x) + 1)) \<in>
    O[?F](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. ln (real (t_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))
[PROOF STEP]
using 5
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. real (t_of x)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)

goal (1 subgoal):
 1. (\<lambda>x. ln (real (t_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))
[PROOF STEP]
by (intro landau_o.big_mult_1 3 landau_ln_3 sum_in_bigo 4, simp_all)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. ln (real (t_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
hence " (\<lambda>x. log 2 (real (t_of x) + 1)) \<in>
  O[?F](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. ln (real (t_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))

goal (1 subgoal):
 1. (\<lambda>x. log 2 (real (t_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))
[PROOF STEP]
using order_trans[OF exp_gt_1] exp_pos
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. ln (real (t_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))
exp 1 \<le> ?z \<Longrightarrow> 1 \<le> ?z
exp ?k \<le> real ?x \<Longrightarrow> 0 < ?x

goal (1 subgoal):
 1. (\<lambda>x. log 2 (real (t_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))
[PROOF STEP]
by (intro landau_sum_2  evt[where n="exp 1" and \<delta>="1"] ln_ge_zero  iffD2[OF ln_ge_iff]
        mult_nonneg_nonneg add_nonneg_nonneg) (auto simp add:log_def)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. log 2 (real (t_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
hence 11: "(\<lambda>x. log 2 (real (t_of x) + 1)) \<in> O[?F](g)"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. log 2 (real (t_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))

goal (1 subgoal):
 1. (\<lambda>x. log 2 (real (t_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](g)
[PROOF STEP]
unfolding g_def
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. log 2 (real (t_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))

goal (1 subgoal):
 1. (\<lambda>x. log 2 (real (t_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<epsilon>_of x)) * (ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))))
[PROOF STEP]
by (intro landau_o.big_mult_1' 1, auto)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. log 2 (real (t_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](g)

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
have " (\<lambda>x. 1) \<in> O[?F](\<lambda>x. real (n_of x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. real (n_of x))
[PROOF STEP]
by (intro landau_o.big_mono evt[where n="1"], auto)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. real (n_of x))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
hence "(\<lambda>x. ln (real (n_of x) + 21)) \<in> O[?F](\<lambda>x. ln (real (n_of x)))"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. real (n_of x))

goal (1 subgoal):
 1. (\<lambda>x. ln (real (n_of x) + 21)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)))
[PROOF STEP]
by (intro landau_ln_2[where a="2"] evt[where n="2"] sum_in_bigo, auto)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. ln (real (n_of x) + 21)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
hence 12: "(\<lambda>x. log 2 (real (n_of x) + 21)) \<in> O[?F](g)"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. ln (real (n_of x) + 21)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)))

goal (1 subgoal):
 1. (\<lambda>x. log 2 (real (n_of x) + 21)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](g)
[PROOF STEP]
unfolding g_def
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. ln (real (n_of x) + 21)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)))

goal (1 subgoal):
 1. (\<lambda>x. log 2 (real (n_of x) + 21)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<epsilon>_of x)) * (ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))))
[PROOF STEP]
using exp_pos order_trans[OF exp_gt_1]
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. ln (real (n_of x) + 21)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)))
exp ?k \<le> real ?x \<Longrightarrow> 0 < ?x
exp 1 \<le> ?z \<Longrightarrow> 1 \<le> ?z

goal (1 subgoal):
 1. (\<lambda>x. log 2 (real (n_of x) + 21)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<epsilon>_of x)) * (ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))))
[PROOF STEP]
by (intro landau_o.big_mult_1' 1 landau_sum_1  evt[where n="exp 1" and \<delta>="1"]
        ln_ge_zero  iffD2[OF ln_ge_iff] mult_nonneg_nonneg add_nonneg_nonneg)  (auto simp add:log_def)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. log 2 (real (n_of x) + 21)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](g)

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
have "(\<lambda>x. ln (1 / real_of_rat (\<delta>_of x))) \<in> O[?F](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. ln (1 / real_of_rat (\<delta>_of x))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)
[PROOF STEP]
by (intro landau_ln_3 evt[where \<delta>="1"] landau_o.big_mono)
      (auto simp add:power_one_over[symmetric] self_le_power)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. ln (1 / real_of_rat (\<delta>_of x))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
hence " (\<lambda>x. real (nat (4*\<lceil>log 2 (1 / real_of_rat (\<delta>_of x))\<rceil>+23))) \<in> O[?F](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. ln (1 / real_of_rat (\<delta>_of x))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)

goal (1 subgoal):
 1. (\<lambda>x. real (nat (4 * \<lceil>log 2 (1 / real_of_rat (\<delta>_of x))\<rceil> + 23))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)
[PROOF STEP]
using 4
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. ln (1 / real_of_rat (\<delta>_of x))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)
(\<lambda>_. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)

goal (1 subgoal):
 1. (\<lambda>x. real (nat (4 * \<lceil>log 2 (1 / real_of_rat (\<delta>_of x))\<rceil> + 23))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)
[PROOF STEP]
by (auto intro!: landau_real_nat sum_in_bigo landau_ceil simp:log_def)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. real (nat (4 * \<lceil>log 2 (1 / real_of_rat (\<delta>_of x))\<rceil> + 23))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
hence " (\<lambda>x. ln (real (r_of x) + 1)) \<in> O[?F](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. real (nat (4 * \<lceil>log 2 (1 / real_of_rat (\<delta>_of x))\<rceil> + 23))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)

goal (1 subgoal):
 1. (\<lambda>x. ln (real (r_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)
[PROOF STEP]
unfolding r_of_def
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. real (nat (4 * \<lceil>log 2 (1 / real_of_rat (\<delta>_of x))\<rceil> + 23))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)

goal (1 subgoal):
 1. (\<lambda>x. ln (real (nat (4 * \<lceil>log 2 (1 / real_of_rat (\<delta>_of x))\<rceil> + 23)) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)
[PROOF STEP]
by (intro landau_ln_3 sum_in_bigo 4, auto)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. ln (real (r_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
hence " (\<lambda>x. log 2 (real (r_of x) + 1)) \<in>
    O[?F](\<lambda>x. (1 / (real_of_rat (\<delta>_of x))\<^sup>2) * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. ln (real (r_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)

goal (1 subgoal):
 1. (\<lambda>x. log 2 (real (r_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))
[PROOF STEP]
by (intro landau_o.big_mult_1 3, simp add:log_def)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. log 2 (real (r_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
hence " (\<lambda>x. log 2 (real (r_of x) + 1)) \<in>
    O[?F](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. log 2 (real (r_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))

goal (1 subgoal):
 1. (\<lambda>x. log 2 (real (r_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))
[PROOF STEP]
using exp_pos order_trans[OF exp_gt_1]
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. log 2 (real (r_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))
exp ?k \<le> real ?x \<Longrightarrow> 0 < ?x
exp 1 \<le> ?z \<Longrightarrow> 1 \<le> ?z

goal (1 subgoal):
 1. (\<lambda>x. log 2 (real (r_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))
[PROOF STEP]
by (intro landau_sum_2 evt[where n="exp 1" and \<delta>="1"] ln_ge_zero
        iffD2[OF ln_ge_iff] add_nonneg_nonneg mult_nonneg_nonneg) (auto)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. log 2 (real (r_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
hence 13: "(\<lambda>x. log 2 (real (r_of x) + 1)) \<in> O[?F](g)"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. log 2 (real (r_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))

goal (1 subgoal):
 1. (\<lambda>x. log 2 (real (r_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](g)
[PROOF STEP]
unfolding g_def
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. log 2 (real (r_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))

goal (1 subgoal):
 1. (\<lambda>x. log 2 (real (r_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<epsilon>_of x)) * (ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))))
[PROOF STEP]
by (intro landau_o.big_mult_1' 1, auto)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. log 2 (real (r_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](g)

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
have 14: "(\<lambda>x. 1) \<in> O[?F](\<lambda>x. real (n_of x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. real (n_of x))
[PROOF STEP]
by (intro landau_o.big_mono evt[where n="1"], auto)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. real (n_of x))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
have "(\<lambda>x. ln (real (n_of x) + 13)) \<in> O[?F](\<lambda>x. ln (real (n_of x)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. ln (real (n_of x) + 13)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)))
[PROOF STEP]
using 14
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. real (n_of x))

goal (1 subgoal):
 1. (\<lambda>x. ln (real (n_of x) + 13)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)))
[PROOF STEP]
by (intro landau_ln_2[where a="2"]  evt[where n="2"] sum_in_bigo, auto)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. ln (real (n_of x) + 13)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
hence "(\<lambda>x. ln (log 2 (real (n_of x) + 13))) \<in> O[?F](\<lambda>x. ln (ln (real (n_of x))))"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. ln (real (n_of x) + 13)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)))

goal (1 subgoal):
 1. (\<lambda>x. ln (log 2 (real (n_of x) + 13))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (ln (real (n_of x))))
[PROOF STEP]
using exp_pos
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. ln (real (n_of x) + 13)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)))
exp ?k \<le> real ?x \<Longrightarrow> 0 < ?x

goal (1 subgoal):
 1. (\<lambda>x. ln (log 2 (real (n_of x) + 13))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (ln (real (n_of x))))
[PROOF STEP]
by (intro landau_ln_2[where a="2"] iffD2[OF ln_ge_iff] evt[where n="exp 2"])
        (auto simp add:log_def)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. ln (log 2 (real (n_of x) + 13))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (ln (real (n_of x))))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
hence "(\<lambda>x. log 2 (log 2 (real (n_of x) + 13))) \<in> O[?F](\<lambda>x. ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. ln (log 2 (real (n_of x) + 13))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (ln (real (n_of x))))

goal (1 subgoal):
 1. (\<lambda>x. log 2 (log 2 (real (n_of x) + 13))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))
[PROOF STEP]
using exp_pos
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. ln (log 2 (real (n_of x) + 13))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (ln (real (n_of x))))
exp ?k \<le> real ?x \<Longrightarrow> 0 < ?x

goal (1 subgoal):
 1. (\<lambda>x. log 2 (log 2 (real (n_of x) + 13))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))
[PROOF STEP]
by (intro landau_sum_1 evt[where n="exp 1" and \<delta>="1"] ln_ge_zero  iffD2[OF ln_ge_iff])
     (auto simp add:log_def)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. log 2 (log 2 (real (n_of x) + 13))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(\<lambda>x. log 2 (log 2 (real (n_of x) + 13))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
have  "(\<lambda>x. real (r_of x)) \<in> O[?F](\<lambda>x. ln (1 / real_of_rat (\<delta>_of x)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. real (r_of x)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<delta>_of x)))
[PROOF STEP]
unfolding r_of_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. real (nat (4 * \<lceil>log 2 (1 / real_of_rat (\<delta>_of x))\<rceil> + 23))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<delta>_of x)))
[PROOF STEP]
using 2
[PROOF STATE]
proof (prove)
using this:
(\<lambda>_. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<delta>_of x)))

goal (1 subgoal):
 1. (\<lambda>x. real (nat (4 * \<lceil>log 2 (1 / real_of_rat (\<delta>_of x))\<rceil> + 23))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<delta>_of x)))
[PROOF STEP]
by (auto intro!: landau_real_nat sum_in_bigo landau_ceil simp:log_def)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. real (r_of x)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<delta>_of x)))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
hence "(\<lambda>x. real (r_of x)) \<in> O[?F](\<lambda>x. ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. real (r_of x)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<delta>_of x)))

goal (1 subgoal):
 1. (\<lambda>x. real (r_of x)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))
[PROOF STEP]
using exp_pos
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. real (r_of x)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<delta>_of x)))
exp ?k \<le> real ?x \<Longrightarrow> 0 < ?x

goal (1 subgoal):
 1. (\<lambda>x. real (r_of x)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))
[PROOF STEP]
by (intro landau_sum_2 evt[where n="exp 1" and \<delta>="1"] ln_ge_zero  iffD2[OF ln_ge_iff], auto)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. real (r_of x)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x. log 2 (log 2 (real (n_of x) + 13))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))
(\<lambda>x. real (r_of x)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))
[PROOF STEP]
have 15:" (\<lambda>x. real (t_of x) * (13 + 4 * real (r_of x) + 2 * log 2 (log 2 (real (n_of x) + 13))))
      \<in> O[?F](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. log 2 (log 2 (real (n_of x) + 13))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))
(\<lambda>x. real (r_of x)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))

goal (1 subgoal):
 1. (\<lambda>x. real (t_of x) * (13 + 4 * real (r_of x) + 2 * log 2 (log 2 (real (n_of x) + 13)))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))
[PROOF STEP]
using 5 3
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. log 2 (log 2 (real (n_of x) + 13))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))
(\<lambda>x. real (r_of x)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))
(\<lambda>x. real (t_of x)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2)
(\<lambda>x. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))

goal (1 subgoal):
 1. (\<lambda>x. real (t_of x) * (13 + 4 * real (r_of x) + 2 * log 2 (log 2 (real (n_of x) + 13)))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))
[PROOF STEP]
by (intro landau_o.mult sum_in_bigo, auto)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. real (t_of x) * (13 + 4 * real (r_of x) + 2 * log 2 (log 2 (real (n_of x) + 13)))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
have "(\<lambda>x. 5 + 2 * log 2 (21 + real (n_of x)) + real (t_of x) * (13 + 4 * real (r_of x) + 2 * log 2 (log 2 (real (n_of x) + 13))))
      \<in> O[?F](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. 5 + 2 * log 2 (21 + real (n_of x)) + real (t_of x) * (13 + 4 * real (r_of x) + 2 * log 2 (log 2 (real (n_of x) + 13)))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>x. 5 + 2 * log 2 (21 + real (n_of x)) + real (t_of x) * (13 + 4 * real (r_of x) + 2 * log 2 (log 2 (real (n_of x) + 13)))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))
[PROOF STEP]
have "\<forall>\<^sub>F x in ?F. 0 \<le> ln (real (n_of x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0. 0 \<le> ln (real (n_of x))
[PROOF STEP]
by (intro evt[where n="1"] ln_ge_zero, auto)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0. 0 \<le> ln (real (n_of x))

goal (1 subgoal):
 1. (\<lambda>x. 5 + 2 * log 2 (21 + real (n_of x)) + real (t_of x) * (13 + 4 * real (r_of x) + 2 * log 2 (log 2 (real (n_of x) + 13)))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0. 0 \<le> ln (real (n_of x))

goal (1 subgoal):
 1. (\<lambda>x. 5 + 2 * log 2 (21 + real (n_of x)) + real (t_of x) * (13 + 4 * real (r_of x) + 2 * log 2 (log 2 (real (n_of x) + 13)))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))
[PROOF STEP]
have "\<forall>\<^sub>F x in ?F. 0 \<le> 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0. 0 \<le> 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))
[PROOF STEP]
using exp_pos
[PROOF STATE]
proof (prove)
using this:
exp ?k \<le> real ?x \<Longrightarrow> 0 < ?x

goal (1 subgoal):
 1. \<forall>\<^sub>F x in sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0. 0 \<le> 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))
[PROOF STEP]
by (intro evt[where n="exp 1" and \<delta>="1"] mult_nonneg_nonneg add_nonneg_nonneg
          ln_ge_zero iffD2[OF ln_ge_iff]) auto
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0. 0 \<le> 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))

goal (1 subgoal):
 1. (\<lambda>x. 5 + 2 * log 2 (21 + real (n_of x)) + real (t_of x) * (13 + 4 * real (r_of x) + 2 * log 2 (log 2 (real (n_of x) + 13)))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0. 0 \<le> 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))

goal (1 subgoal):
 1. (\<lambda>x. 5 + 2 * log 2 (21 + real (n_of x)) + real (t_of x) * (13 + 4 * real (r_of x) + 2 * log 2 (log 2 (real (n_of x) + 13)))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))
[PROOF STEP]
have " (\<lambda>x. ln (21 + real (n_of x))) \<in> O[?F](\<lambda>x. ln (real (n_of x)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. ln (21 + real (n_of x))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)))
[PROOF STEP]
using 14
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. real (n_of x))

goal (1 subgoal):
 1. (\<lambda>x. ln (21 + real (n_of x))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)))
[PROOF STEP]
by (intro landau_ln_2[where a="2"] sum_in_bigo evt[where n="2"], auto)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. ln (21 + real (n_of x))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)))

goal (1 subgoal):
 1. (\<lambda>x. 5 + 2 * log 2 (21 + real (n_of x)) + real (t_of x) * (13 + 4 * real (r_of x) + 2 * log 2 (log 2 (real (n_of x) + 13)))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))
[PROOF STEP]
hence "(\<lambda>x. 5 + 2 * log 2 (21 + real (n_of x))) \<in> O[?F](\<lambda>x. ln (real (n_of x)))"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. ln (21 + real (n_of x))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)))

goal (1 subgoal):
 1. (\<lambda>x. 5 + 2 * log 2 (21 + real (n_of x))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)))
[PROOF STEP]
using 7
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. ln (21 + real (n_of x))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)))
(\<lambda>x. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)))

goal (1 subgoal):
 1. (\<lambda>x. 5 + 2 * log 2 (21 + real (n_of x))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)))
[PROOF STEP]
by (intro sum_in_bigo, auto simp add:log_def)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. 5 + 2 * log 2 (21 + real (n_of x))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)))

goal (1 subgoal):
 1. (\<lambda>x. 5 + 2 * log 2 (21 + real (n_of x)) + real (t_of x) * (13 + 4 * real (r_of x) + 2 * log 2 (log 2 (real (n_of x) + 13)))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F x in sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0. 0 \<le> ln (real (n_of x))
\<forall>\<^sub>F x in sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0. 0 \<le> 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))
(\<lambda>x. 5 + 2 * log 2 (21 + real (n_of x))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0. 0 \<le> ln (real (n_of x))
\<forall>\<^sub>F x in sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0. 0 \<le> 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))
(\<lambda>x. 5 + 2 * log 2 (21 + real (n_of x))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)))

goal (1 subgoal):
 1. (\<lambda>x. 5 + 2 * log 2 (21 + real (n_of x)) + real (t_of x) * (13 + 4 * real (r_of x) + 2 * log 2 (log 2 (real (n_of x) + 13)))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))
[PROOF STEP]
using 15
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0. 0 \<le> ln (real (n_of x))
\<forall>\<^sub>F x in sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0. 0 \<le> 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))
(\<lambda>x. 5 + 2 * log 2 (21 + real (n_of x))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)))
(\<lambda>x. real (t_of x) * (13 + 4 * real (r_of x) + 2 * log 2 (log 2 (real (n_of x) + 13)))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))

goal (1 subgoal):
 1. (\<lambda>x. 5 + 2 * log 2 (21 + real (n_of x)) + real (t_of x) * (13 + 4 * real (r_of x) + 2 * log 2 (log 2 (real (n_of x) + 13)))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))
[PROOF STEP]
by (rule landau_sum)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. 5 + 2 * log 2 (21 + real (n_of x)) + real (t_of x) * (13 + 4 * real (r_of x) + 2 * log 2 (log 2 (real (n_of x) + 13)))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>x. 5 + 2 * log 2 (21 + real (n_of x)) + real (t_of x) * (13 + 4 * real (r_of x) + 2 * log 2 (log 2 (real (n_of x) + 13)))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
hence 16: "(\<lambda>x. real (s_of x) * (5 + 2 * log 2 (21 + real (n_of x)) + real (t_of x) *
    (13 + 4 * real (r_of x) + 2 * log 2 (log 2 (real (n_of x) + 13)))))  \<in> O[?F](g)"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. 5 + 2 * log 2 (21 + real (n_of x)) + real (t_of x) * (13 + 4 * real (r_of x) + 2 * log 2 (log 2 (real (n_of x) + 13)))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))

goal (1 subgoal):
 1. (\<lambda>x. real (s_of x) * (5 + 2 * log 2 (21 + real (n_of x)) + real (t_of x) * (13 + 4 * real (r_of x) + 2 * log 2 (log 2 (real (n_of x) + 13))))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](g)
[PROOF STEP]
unfolding g_def
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. 5 + 2 * log 2 (21 + real (n_of x)) + real (t_of x) * (13 + 4 * real (r_of x) + 2 * log 2 (log 2 (real (n_of x) + 13)))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x))))

goal (1 subgoal):
 1. (\<lambda>x. real (s_of x) * (5 + 2 * log 2 (21 + real (n_of x)) + real (t_of x) * (13 + 4 * real (r_of x) + 2 * log 2 (log 2 (real (n_of x) + 13))))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>x. ln (1 / real_of_rat (\<epsilon>_of x)) * (ln (real (n_of x)) + 1 / (real_of_rat (\<delta>_of x))\<^sup>2 * (ln (ln (real (n_of x))) + ln (1 / real_of_rat (\<delta>_of x)))))
[PROOF STEP]
by (intro landau_o.mult 6, auto)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. real (s_of x) * (5 + 2 * log 2 (21 + real (n_of x)) + real (t_of x) * (13 + 4 * real (r_of x) + 2 * log 2 (log 2 (real (n_of x) + 13))))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](g)

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
have "f0_space_usage = (\<lambda>x. f0_space_usage (n_of x, \<epsilon>_of x, \<delta>_of x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f0_space_usage = (\<lambda>x. f0_space_usage (n_of x, \<epsilon>_of x, \<delta>_of x))
[PROOF STEP]
by (simp add:case_prod_beta' n_of_def \<epsilon>_of_def \<delta>_of_def)
[PROOF STATE]
proof (state)
this:
f0_space_usage = (\<lambda>x. f0_space_usage (n_of x, \<epsilon>_of x, \<delta>_of x))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
f0_space_usage = (\<lambda>x. f0_space_usage (n_of x, \<epsilon>_of x, \<delta>_of x))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
have "... \<in>  O[?F](g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. f0_space_usage (n_of x, \<epsilon>_of x, \<delta>_of x)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](g)
[PROOF STEP]
using 9 10 11 12 13 16
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. log 2 (real (s_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](g)
(\<lambda>x. 1) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](g)
(\<lambda>x. log 2 (real (t_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](g)
(\<lambda>x. log 2 (real (n_of x) + 21)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](g)
(\<lambda>x. log 2 (real (r_of x) + 1)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](g)
(\<lambda>x. real (s_of x) * (5 + 2 * log 2 (21 + real (n_of x)) + real (t_of x) * (13 + 4 * real (r_of x) + 2 * log 2 (log 2 (real (n_of x) + 13))))) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](g)

goal (1 subgoal):
 1. (\<lambda>x. f0_space_usage (n_of x, \<epsilon>_of x, \<delta>_of x)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](g)
[PROOF STEP]
by (simp add:fun_cong[OF s_of_def[symmetric]] fun_cong[OF t_of_def[symmetric]]
        fun_cong[OF r_of_def[symmetric]] Let_def) (intro sum_in_bigo, auto)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. f0_space_usage (n_of x, \<epsilon>_of x, \<delta>_of x)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](g)

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>x. f0_space_usage (n_of x, \<epsilon>_of x, \<delta>_of x)) \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](g)

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
have "... = O[?F](?rhs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](g) = O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
by (simp add:case_prod_beta' g_def n_of_def \<epsilon>_of_def \<delta>_of_def)
[PROOF STATE]
proof (state)
this:
O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](g) = O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))

goal (1 subgoal):
 1. f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
f0_space_usage \<in> O[sequentially \<times>\<^sub>F at_right 0 \<times>\<^sub>F at_right 0](\<lambda>(n, \<epsilon>, \<delta>). ln (1 / real_of_rat \<epsilon>) * (ln (real n) + 1 / (real_of_rat \<delta>)\<^sup>2 * (ln (ln (real n)) + ln (1 / real_of_rat \<delta>))))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma continuous_attains_sup:
  fixes f :: "'a::topological_space \<Rightarrow> 'b::linorder_topology"
  shows "compact s \<Longrightarrow> s \<noteq> {} \<Longrightarrow> continuous_on s f \<Longrightarrow> (\<exists>x\<in>s. \<forall>y\<in>s.  f y \<le> f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>compact s; s \<noteq> {}; continuous_on s f\<rbrakk> \<Longrightarrow> \<exists>x\<in>s. \<forall>y\<in>s. f y \<le> f x
[PROOF STEP]
using compact_attains_sup[of "f ` s"] compact_continuous_image[of s f]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>compact (f ` s); f ` s \<noteq> {}\<rbrakk> \<Longrightarrow> \<exists>sa\<in>f ` s. \<forall>t\<in>f ` s. t \<le> sa
\<lbrakk>continuous_on s f; compact s\<rbrakk> \<Longrightarrow> compact (f ` s)

goal (1 subgoal):
 1. \<lbrakk>compact s; s \<noteq> {}; continuous_on s f\<rbrakk> \<Longrightarrow> \<exists>x\<in>s. \<forall>y\<in>s. f y \<le> f x
[PROOF STEP]
by auto


[STATEMENT]
lemma emeasure_spmf_of_set:
  "emeasure (measure_spmf (spmf_of_set S)) A = card (S \<inter> A) / card S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure (measure_spmf (spmf_of_set S)) A = ennreal (real (card (S \<inter> A)) / real (card S))
[PROOF STEP]
by(auto simp add: measure_spmf_spmf_of_set emeasure_pmf_of_set)


[STATEMENT]
lemma zero_hermitian:
  shows "hermitian (0\<^sub>m n n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hermitian (0\<^sub>m n n)
[PROOF STEP]
unfolding hermitian_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Complex_Matrix.adjoint (0\<^sub>m n n) = 0\<^sub>m n n
[PROOF STEP]
by (metis adjoint_minus hermitian_def hermitian_one minus_r_inv_mat one_carrier_mat)


[STATEMENT]
lemma onorm_bound: assumes "x \<in> X" shows "norm (f' x) \<le> onorm_bound"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (f' x) \<le> onorm_bound
[PROOF STEP]
unfolding onorm_bound_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (f' x) \<le> (SOME B. \<forall>x\<in>X. norm (f' x) \<le> B)
[PROOF STEP]
using someI_ex[OF ex_onorm_bound] assms
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>X. norm (f' x) \<le> (SOME x. \<forall>xa\<in>X. norm (f' xa) \<le> x)
x \<in> X

goal (1 subgoal):
 1. norm (f' x) \<le> (SOME B. \<forall>x\<in>X. norm (f' x) \<le> B)
[PROOF STEP]
by blast


[STATEMENT]
lemma norm_blinfunpow_le: "norm ((f :: 'b :: real_normed_vector \<Rightarrow>\<^sub>L 'b) ^^ n) \<le> norm f ^ n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (f ^^ n) \<le> norm f ^ n
[PROOF STEP]
by (induction n) (auto simp: norm_blinfun_id_le intro!: order.trans[OF norm_blinfun_compose] mult_left_mono)


[STATEMENT]
lemma valof_denormal_of_Float: "valof (denormal_of_Float x::('e, 'f)float) = x"
  if "is_denormal_Float TYPE(('e, 'f)float) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valof (denormal_of_Float x) = real_of_float x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. valof (denormal_of_Float x) = real_of_float x
[PROOF STEP]
have less: "0 < Float.exponent x + (int (bias TYPE(('e, 'f) IEEE.float)) + int LENGTH('f))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < Float.exponent x + (int (bias TYPE(('e, 'f) IEEE.float)) + int LENGTH('f))
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
is_denormal_Float TYPE(('e, 'f) IEEE.float) x

goal (1 subgoal):
 1. 0 < Float.exponent x + (int (bias TYPE(('e, 'f) IEEE.float)) + int LENGTH('f))
[PROOF STEP]
by (auto simp: is_denormal_Float_def bias_def of_nat_diff mask_eq_exp_minus_1)
[PROOF STATE]
proof (state)
this:
0 < Float.exponent x + (int (bias TYPE(('e, 'f) IEEE.float)) + int LENGTH('f))

goal (1 subgoal):
 1. valof (denormal_of_Float x) = real_of_float x
[PROOF STEP]
have "valof (denormal_of_Float x::('e, 'f)float) =
    ((- 1) ^ sign (denormal_of_Float x::('e, 'f)float) * \<bar>real_of_int (mantissa x)\<bar>) *
    (2 powr real (nat (Float.exponent x + int (bias TYPE(('e, 'f) IEEE.float)) + int LENGTH('f) - 1)) /
      (2 powr real (bias TYPE(('e, 'f) IEEE.float)) * 2 powr LENGTH('f)) * 2)"
    (is "_ = ?m * ?e")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valof (denormal_of_Float x) = (- 1) ^ sign (denormal_of_Float x) * \<bar>real_of_int (mantissa x)\<bar> * (2 powr real (nat (Float.exponent x + int (bias TYPE(('e, 'f) IEEE.float)) + int LENGTH('f) - 1)) / (2 powr real (bias TYPE(('e, 'f) IEEE.float)) * 2 powr real LENGTH('f)) * 2)
[PROOF STEP]
by (auto simp: valof_eq exponent_denormal_of_Float fraction_denormal_of_Float that
        mantissa_exponent powr_realpow[symmetric])
[PROOF STATE]
proof (state)
this:
valof (denormal_of_Float x) = (- 1) ^ sign (denormal_of_Float x) * \<bar>real_of_int (mantissa x)\<bar> * (2 powr real (nat (Float.exponent x + int (bias TYPE(('e, 'f) IEEE.float)) + int LENGTH('f) - 1)) / (2 powr real (bias TYPE(('e, 'f) IEEE.float)) * 2 powr real LENGTH('f)) * 2)

goal (1 subgoal):
 1. valof (denormal_of_Float x) = real_of_float x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
valof (denormal_of_Float x) = (- 1) ^ sign (denormal_of_Float x) * \<bar>real_of_int (mantissa x)\<bar> * (2 powr real (nat (Float.exponent x + int (bias TYPE(('e, 'f) IEEE.float)) + int LENGTH('f) - 1)) / (2 powr real (bias TYPE(('e, 'f) IEEE.float)) * 2 powr real LENGTH('f)) * 2)

goal (1 subgoal):
 1. valof (denormal_of_Float x) = real_of_float x
[PROOF STEP]
have "?m = mantissa x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (- 1) ^ sign (denormal_of_Float x) * \<bar>real_of_int (mantissa x)\<bar> = real_of_int (mantissa x)
[PROOF STEP]
by (auto simp: sign_denormal_of_Float abs_real_def mantissa_neg_iff)
[PROOF STATE]
proof (state)
this:
(- 1) ^ sign (denormal_of_Float x) * \<bar>real_of_int (mantissa x)\<bar> = real_of_int (mantissa x)

goal (1 subgoal):
 1. valof (denormal_of_Float x) = real_of_float x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(- 1) ^ sign (denormal_of_Float x) * \<bar>real_of_int (mantissa x)\<bar> = real_of_int (mantissa x)

goal (1 subgoal):
 1. valof (denormal_of_Float x) = real_of_float x
[PROOF STEP]
have "?e = 2 powr Float.exponent x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 powr real (nat (Float.exponent x + int (bias TYPE(('e, 'f) IEEE.float)) + int LENGTH('f) - 1)) / (2 powr real (bias TYPE(('e, 'f) IEEE.float)) * 2 powr real LENGTH('f)) * 2 = 2 powr real_of_int (Float.exponent x)
[PROOF STEP]
by (auto simp: powr_add[symmetric] divide_simps powr_mult_base less ac_simps)
[PROOF STATE]
proof (state)
this:
2 powr real (nat (Float.exponent x + int (bias TYPE(('e, 'f) IEEE.float)) + int LENGTH('f) - 1)) / (2 powr real (bias TYPE(('e, 'f) IEEE.float)) * 2 powr real LENGTH('f)) * 2 = 2 powr real_of_int (Float.exponent x)

goal (1 subgoal):
 1. valof (denormal_of_Float x) = real_of_float x
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
valof (denormal_of_Float x) = real_of_int (mantissa x) * 2 powr real_of_int (Float.exponent x)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
valof (denormal_of_Float x) = real_of_int (mantissa x) * 2 powr real_of_int (Float.exponent x)

goal (1 subgoal):
 1. valof (denormal_of_Float x) = real_of_float x
[PROOF STEP]
by (simp add: mantissa_exponent)
[PROOF STATE]
proof (state)
this:
valof (denormal_of_Float x) = real_of_float x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem framed_linkrel_inv:"framed_linkrel w1 w2 \<Longrightarrow> (kauff_mat w1)= (kauff_mat w2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. framed_linkrel w1 w2 \<Longrightarrow> kauff_mat w1 = kauff_mat w2
[PROOF STEP]
unfolding framed_linkrel_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. framed_uncross w1 w2 \<or> pull w1 w2 \<or> straighten w1 w2 \<or> swing w1 w2 \<or> Tangle_Moves.rotate w1 w2 \<or> compress w1 w2 \<or> slide w1 w2 \<Longrightarrow> kauff_mat w1 = kauff_mat w2
[PROOF STEP]
apply(auto)
[PROOF STATE]
proof (prove)
goal (7 subgoals):
 1. framed_uncross w1 w2 \<Longrightarrow> kauff_mat w1 = kauff_mat w2
 2. pull w1 w2 \<Longrightarrow> kauff_mat w1 = kauff_mat w2
 3. straighten w1 w2 \<Longrightarrow> kauff_mat w1 = kauff_mat w2
 4. swing w1 w2 \<Longrightarrow> kauff_mat w1 = kauff_mat w2
 5. Tangle_Moves.rotate w1 w2 \<Longrightarrow> kauff_mat w1 = kauff_mat w2
 6. compress w1 w2 \<Longrightarrow> kauff_mat w1 = kauff_mat w2
 7. slide w1 w2 \<Longrightarrow> kauff_mat w1 = kauff_mat w2
[PROOF STEP]
using framed_uncross_inv pull_inv straighten_inv  swing_inv rotate_inv compress_inv slide_inv
[PROOF STATE]
proof (prove)
using this:
framed_uncross ?w1.0 ?w2.0 \<Longrightarrow> kauff_mat ?w1.0 = kauff_mat ?w2.0
pull ?w1.0 ?w2.0 \<Longrightarrow> kauff_mat ?w1.0 = kauff_mat ?w2.0
straighten ?w1.0 ?w2.0 \<Longrightarrow> kauff_mat ?w1.0 = kauff_mat ?w2.0
swing ?w1.0 ?w2.0 \<Longrightarrow> kauff_mat ?w1.0 = kauff_mat ?w2.0
Tangle_Moves.rotate ?w1.0 ?w2.0 \<Longrightarrow> kauff_mat ?w1.0 = kauff_mat ?w2.0
compress ?w1.0 ?w2.0 \<Longrightarrow> kauff_mat ?w1.0 = kauff_mat ?w2.0
slide ?w1.0 ?w2.0 \<Longrightarrow> kauff_mat ?w1.0 = kauff_mat ?w2.0

goal (7 subgoals):
 1. framed_uncross w1 w2 \<Longrightarrow> kauff_mat w1 = kauff_mat w2
 2. pull w1 w2 \<Longrightarrow> kauff_mat w1 = kauff_mat w2
 3. straighten w1 w2 \<Longrightarrow> kauff_mat w1 = kauff_mat w2
 4. swing w1 w2 \<Longrightarrow> kauff_mat w1 = kauff_mat w2
 5. Tangle_Moves.rotate w1 w2 \<Longrightarrow> kauff_mat w1 = kauff_mat w2
 6. compress w1 w2 \<Longrightarrow> kauff_mat w1 = kauff_mat w2
 7. slide w1 w2 \<Longrightarrow> kauff_mat w1 = kauff_mat w2
[PROOF STEP]
by auto


[STATEMENT]
lemma of_int_qr_eq_of_int_iff:
  "of_int n = (of_int m :: 'a :: qr_spec qr) \<longleftrightarrow>
    [n = m] (mod (int (CARD('a))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (of_int n = of_int m) = [n = m] (mod int CARD('a))
[PROOF STEP]
using of_int_qr_eq_0_iff[of "n - m", where ?'a = 'a]
[PROOF STATE]
proof (prove)
using this:
(of_int (n - m) = 0) = (int CARD('a) dvd n - m)

goal (1 subgoal):
 1. (of_int n = of_int m) = [n = m] (mod int CARD('a))
[PROOF STEP]
by (simp del: of_int_qr_eq_0_iff add: cong_iff_dvd_diff)


[STATEMENT]
lemma infsum_cblinfun_apply:
  assumes \<open>g summable_on S\<close>
  shows \<open>infsum (\<lambda>x. A *\<^sub>V g x) S = A *\<^sub>V (infsum g S)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>\<^sub>\<infinity>x\<in>S. A *\<^sub>V g x) = A *\<^sub>V infsum g S
[PROOF STEP]
apply (rule infsum_bounded_linear[unfolded o_def, of \<open>cblinfun_apply A\<close>])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. bounded_linear ((*\<^sub>V) A)
 2. g summable_on S
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
g summable_on S

goal (2 subgoals):
 1. bounded_linear ((*\<^sub>V) A)
 2. g summable_on S
[PROOF STEP]
by (auto simp add: bounded_clinear.bounded_linear bounded_cbilinear.bounded_clinear_right
      bounded_cbilinear_cblinfun_apply)


[STATEMENT]
lemma filter_bool_list_exist_length_card_True: "\<lbrakk>distinct xs; A \<subseteq> set xs; n = card A\<rbrakk>
   \<Longrightarrow> \<exists>bs. length bs = length xs \<and> count_list bs True = card A \<and> A = set (filter_bool_list bs xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>distinct xs; A \<subseteq> set xs; n = card A\<rbrakk> \<Longrightarrow> \<exists>bs. length bs = length xs \<and> count_list bs True = card A \<and> A = set (filter_bool_list bs xs)
[PROOF STEP]
by (metis filter_bool_list_card filter_bool_list_exist_length)


[STATEMENT]
lemma list_sel_revorder_eq_inorder_x: "list_sel f (revorder l) ys = list_sel f (inorder l) ys"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list_sel f (revorder l) ys = list_sel f (inorder l) ys
[PROOF STEP]
unfolding revorder_eq_rev_inorder
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list_sel f (rev (inorder l)) ys = list_sel f (inorder l) ys
[PROOF STEP]
using mset_x_eq_list_sel_eq mset_rev
[PROOF STATE]
proof (prove)
using this:
mset ?x = mset ?z \<Longrightarrow> list_sel ?f ?x ?y = list_sel ?f ?z ?y
mset (rev ?xs) = mset ?xs

goal (1 subgoal):
 1. list_sel f (rev (inorder l)) ys = list_sel f (inorder l) ys
[PROOF STEP]
by blast


[STATEMENT]
lemma fps_right_inverse_idempotent_comm_ring1:
  fixes   f :: "'a::comm_ring_1 fps"
  assumes "f$0 * x = 1"
  shows   "fps_right_inverse (fps_right_inverse f x) (f$0) = f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fps_right_inverse (fps_right_inverse f x) (f $ 0) = f
[PROOF STEP]
using   assms fps_right_inverse_idempotent_ring1[of f x "f$0"]
[PROOF STATE]
proof (prove)
using this:
f $ 0 * x = (1::'a)
\<lbrakk>f $ 0 * x = (1::'a); x * f $ 0 = (1::'a)\<rbrakk> \<Longrightarrow> fps_right_inverse (fps_right_inverse f x) (f $ 0) = f

goal (1 subgoal):
 1. fps_right_inverse (fps_right_inverse f x) (f $ 0) = f
[PROOF STEP]
by      (simp add: mult.commute)


[STATEMENT]
lemma strict_mono_on_imp_less_iff:
  assumes "strict_mono_on A f" "x \<in> A" "y \<in> A"
  shows   "f x < (f y :: 'b :: linorder) \<longleftrightarrow> x < (y :: 'a :: linorder)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f x < f y) = (x < y)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
strict_mono_on A f
x \<in> A
y \<in> A

goal (1 subgoal):
 1. (f x < f y) = (x < y)
[PROOF STEP]
by (cases x y rule: linorder_cases; force simp: strict_mono_on_def)+


[STATEMENT]
lemma padr_inj:
  shows "inj_on (padr m) (carrier_vec n :: 'a vec set)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on (\<lambda>v. v @\<^sub>v 0\<^sub>v m) (carrier_vec n)
[PROOF STEP]
apply(intro inj_onI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier_vec n; y \<in> carrier_vec n; x @\<^sub>v 0\<^sub>v m = y @\<^sub>v 0\<^sub>v m\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
using append_vec_eq
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?v \<in> carrier_vec ?n; ?v' \<in> carrier_vec ?n\<rbrakk> \<Longrightarrow> (?v @\<^sub>v ?w = ?v' @\<^sub>v ?w') = (?v = ?v' \<and> ?w = ?w')

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier_vec n; y \<in> carrier_vec n; x @\<^sub>v 0\<^sub>v m = y @\<^sub>v 0\<^sub>v m\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
by auto


[STATEMENT]
lemma div2_even_ext_nat:
  fixes x y :: nat
  assumes "x div 2 = y div 2"
    and "even x \<longleftrightarrow> even y"
  shows "x = y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x = y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x = y
[PROOF STEP]
from \<open>even x \<longleftrightarrow> even y\<close>
[PROOF STATE]
proof (chain)
picking this:
even x = even y
[PROOF STEP]
have "x mod 2 = y mod 2"
[PROOF STATE]
proof (prove)
using this:
even x = even y

goal (1 subgoal):
 1. x mod 2 = y mod 2
[PROOF STEP]
by (simp only: even_iff_mod_2_eq_zero) auto
[PROOF STATE]
proof (state)
this:
x mod 2 = y mod 2

goal (1 subgoal):
 1. x = y
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
x div 2 = y div 2
even x = even y
x mod 2 = y mod 2
[PROOF STEP]
have "x div 2 * 2 + x mod 2 = y div 2 * 2 + y mod 2"
[PROOF STATE]
proof (prove)
using this:
x div 2 = y div 2
even x = even y
x mod 2 = y mod 2

goal (1 subgoal):
 1. x div 2 * 2 + x mod 2 = y div 2 * 2 + y mod 2
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x div 2 * 2 + x mod 2 = y div 2 * 2 + y mod 2

goal (1 subgoal):
 1. x = y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x div 2 * 2 + x mod 2 = y div 2 * 2 + y mod 2
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x div 2 * 2 + x mod 2 = y div 2 * 2 + y mod 2

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

goal:
No subgoals!
[PROOF STEP]
qed