[STATEMENT]
lemma limit_mat_scale:
  fixes X :: "nat \<Rightarrow> complex mat" and A :: "complex mat"
  assumes limX: "limit_mat X A m"
  shows "limit_mat (\<lambda>n. c \<cdot>\<^sub>m X n) (c \<cdot>\<^sub>m A) m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. limit_mat (\<lambda>n. c \<cdot>\<^sub>m X n) (c \<cdot>\<^sub>m A) m
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. limit_mat (\<lambda>n. c \<cdot>\<^sub>m X n) (c \<cdot>\<^sub>m A) m
[PROOF STEP]
have dimA: "A \<in> carrier_mat m m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<in> carrier_mat m m
[PROOF STEP]
using limX limit_mat_def
[PROOF STATE]
proof (prove)
using this:
limit_mat X A m
limit_mat ?X ?A ?m = (\<forall>n. ?X n \<in> carrier_mat ?m ?m \<and> ?A \<in> carrier_mat ?m ?m \<and> (\<forall>i<?m. \<forall>j<?m. (\<lambda>n. ?X n $$ (i, j)) \<longlonglongrightarrow> ?A $$ (i, j)))

goal (1 subgoal):
 1. A \<in> carrier_mat m m
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
A \<in> carrier_mat m m

goal (1 subgoal):
 1. limit_mat (\<lambda>n. c \<cdot>\<^sub>m X n) (c \<cdot>\<^sub>m A) m
[PROOF STEP]
have dimX: "\<And>n. X n \<in> carrier_mat m m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n. X n \<in> carrier_mat m m
[PROOF STEP]
using limX
[PROOF STATE]
proof (prove)
using this:
limit_mat X A m

goal (1 subgoal):
 1. \<And>n. X n \<in> carrier_mat m m
[PROOF STEP]
unfolding limit_mat_def
[PROOF STATE]
proof (prove)
using this:
\<forall>n. X n \<in> carrier_mat m m \<and> A \<in> carrier_mat m m \<and> (\<forall>i<m. \<forall>j<m. (\<lambda>n. X n $$ (i, j)) \<longlonglongrightarrow> A $$ (i, j))

goal (1 subgoal):
 1. \<And>n. X n \<in> carrier_mat m m
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
X ?n \<in> carrier_mat m m

goal (1 subgoal):
 1. limit_mat (\<lambda>n. c \<cdot>\<^sub>m X n) (c \<cdot>\<^sub>m A) m
[PROOF STEP]
have "\<And>i j. i < m \<Longrightarrow> j < m \<Longrightarrow> (\<lambda>n. (c \<cdot>\<^sub>m X n) $$ (i, j)) \<longlonglongrightarrow> (c \<cdot>\<^sub>m A) $$ (i, j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i j. \<lbrakk>i < m; j < m\<rbrakk> \<Longrightarrow> (\<lambda>n. (c \<cdot>\<^sub>m X n) $$ (i, j)) \<longlonglongrightarrow> (c \<cdot>\<^sub>m A) $$ (i, j)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i j. \<lbrakk>i < m; j < m\<rbrakk> \<Longrightarrow> (\<lambda>n. (c \<cdot>\<^sub>m X n) $$ (i, j)) \<longlonglongrightarrow> (c \<cdot>\<^sub>m A) $$ (i, j)
[PROOF STEP]
fix i j
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i j. \<lbrakk>i < m; j < m\<rbrakk> \<Longrightarrow> (\<lambda>n. (c \<cdot>\<^sub>m X n) $$ (i, j)) \<longlonglongrightarrow> (c \<cdot>\<^sub>m A) $$ (i, j)
[PROOF STEP]
assume i: "i < m" and j: "j < m"
[PROOF STATE]
proof (state)
this:
i < m
j < m

goal (1 subgoal):
 1. \<And>i j. \<lbrakk>i < m; j < m\<rbrakk> \<Longrightarrow> (\<lambda>n. (c \<cdot>\<^sub>m X n) $$ (i, j)) \<longlonglongrightarrow> (c \<cdot>\<^sub>m A) $$ (i, j)
[PROOF STEP]
have "(\<lambda>n. (X n) $$ (i, j)) \<longlonglongrightarrow> A$$(i, j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. X n $$ (i, j)) \<longlonglongrightarrow> A $$ (i, j)
[PROOF STEP]
using limX limit_mat_def i j
[PROOF STATE]
proof (prove)
using this:
limit_mat X A m
limit_mat ?X ?A ?m = (\<forall>n. ?X n \<in> carrier_mat ?m ?m \<and> ?A \<in> carrier_mat ?m ?m \<and> (\<forall>i<?m. \<forall>j<?m. (\<lambda>n. ?X n $$ (i, j)) \<longlonglongrightarrow> ?A $$ (i, j)))
i < m
j < m

goal (1 subgoal):
 1. (\<lambda>n. X n $$ (i, j)) \<longlonglongrightarrow> A $$ (i, j)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<lambda>n. X n $$ (i, j)) \<longlonglongrightarrow> A $$ (i, j)

goal (1 subgoal):
 1. \<And>i j. \<lbrakk>i < m; j < m\<rbrakk> \<Longrightarrow> (\<lambda>n. (c \<cdot>\<^sub>m X n) $$ (i, j)) \<longlonglongrightarrow> (c \<cdot>\<^sub>m A) $$ (i, j)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(\<lambda>n. X n $$ (i, j)) \<longlonglongrightarrow> A $$ (i, j)

goal (1 subgoal):
 1. \<And>i j. \<lbrakk>i < m; j < m\<rbrakk> \<Longrightarrow> (\<lambda>n. (c \<cdot>\<^sub>m X n) $$ (i, j)) \<longlonglongrightarrow> (c \<cdot>\<^sub>m A) $$ (i, j)
[PROOF STEP]
have "(\<lambda>n. c) \<longlonglongrightarrow> c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. c) \<longlonglongrightarrow> c
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<lambda>n. c) \<longlonglongrightarrow> c

goal (1 subgoal):
 1. \<And>i j. \<lbrakk>i < m; j < m\<rbrakk> \<Longrightarrow> (\<lambda>n. (c \<cdot>\<^sub>m X n) $$ (i, j)) \<longlonglongrightarrow> (c \<cdot>\<^sub>m A) $$ (i, j)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. X n $$ (i, j)) \<longlonglongrightarrow> A $$ (i, j)
(\<lambda>n. c) \<longlonglongrightarrow> c
[PROOF STEP]
have "(\<lambda>n. c * (X n) $$ (i, j)) \<longlonglongrightarrow> c * A$$(i, j)"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. X n $$ (i, j)) \<longlonglongrightarrow> A $$ (i, j)
(\<lambda>n. c) \<longlonglongrightarrow> c

goal (1 subgoal):
 1. (\<lambda>n. c * X n $$ (i, j)) \<longlonglongrightarrow> c * A $$ (i, j)
[PROOF STEP]
using tendsto_mult[of "\<lambda>n. c" c] limX limit_mat_def
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. X n $$ (i, j)) \<longlonglongrightarrow> A $$ (i, j)
(\<lambda>n. c) \<longlonglongrightarrow> c
\<lbrakk>((\<lambda>n. c) \<longlongrightarrow> c) ?F; (?g \<longlongrightarrow> ?b) ?F\<rbrakk> \<Longrightarrow> ((\<lambda>x. c * ?g x) \<longlongrightarrow> c * ?b) ?F
limit_mat X A m
limit_mat ?X ?A ?m = (\<forall>n. ?X n \<in> carrier_mat ?m ?m \<and> ?A \<in> carrier_mat ?m ?m \<and> (\<forall>i<?m. \<forall>j<?m. (\<lambda>n. ?X n $$ (i, j)) \<longlonglongrightarrow> ?A $$ (i, j)))

goal (1 subgoal):
 1. (\<lambda>n. c * X n $$ (i, j)) \<longlonglongrightarrow> c * A $$ (i, j)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<lambda>n. c * X n $$ (i, j)) \<longlonglongrightarrow> c * A $$ (i, j)

goal (1 subgoal):
 1. \<And>i j. \<lbrakk>i < m; j < m\<rbrakk> \<Longrightarrow> (\<lambda>n. (c \<cdot>\<^sub>m X n) $$ (i, j)) \<longlonglongrightarrow> (c \<cdot>\<^sub>m A) $$ (i, j)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(\<lambda>n. c * X n $$ (i, j)) \<longlonglongrightarrow> c * A $$ (i, j)

goal (1 subgoal):
 1. \<And>i j. \<lbrakk>i < m; j < m\<rbrakk> \<Longrightarrow> (\<lambda>n. (c \<cdot>\<^sub>m X n) $$ (i, j)) \<longlonglongrightarrow> (c \<cdot>\<^sub>m A) $$ (i, j)
[PROOF STEP]
have "(c \<cdot>\<^sub>m X n) $$ (i, j) = c * (X n) $$ (i, j)" for n
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (c \<cdot>\<^sub>m X n) $$ (i, j) = c * X n $$ (i, j)
[PROOF STEP]
using index_smult_mat(1)[of i "X n" j c] i j dimX[of n]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>i < dim_row (X n); j < dim_col (X n)\<rbrakk> \<Longrightarrow> (c \<cdot>\<^sub>m X n) $$ (i, j) = c * X n $$ (i, j)
i < m
j < m
X n \<in> carrier_mat m m

goal (1 subgoal):
 1. (c \<cdot>\<^sub>m X n) $$ (i, j) = c * X n $$ (i, j)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(c \<cdot>\<^sub>m X ?n) $$ (i, j) = c * X ?n $$ (i, j)

goal (1 subgoal):
 1. \<And>i j. \<lbrakk>i < m; j < m\<rbrakk> \<Longrightarrow> (\<lambda>n. (c \<cdot>\<^sub>m X n) $$ (i, j)) \<longlonglongrightarrow> (c \<cdot>\<^sub>m A) $$ (i, j)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(c \<cdot>\<^sub>m X ?n) $$ (i, j) = c * X ?n $$ (i, j)

goal (1 subgoal):
 1. \<And>i j. \<lbrakk>i < m; j < m\<rbrakk> \<Longrightarrow> (\<lambda>n. (c \<cdot>\<^sub>m X n) $$ (i, j)) \<longlonglongrightarrow> (c \<cdot>\<^sub>m A) $$ (i, j)
[PROOF STEP]
have "(c \<cdot>\<^sub>m A) $$ (i, j) = c * A $$ (i, j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (c \<cdot>\<^sub>m A) $$ (i, j) = c * A $$ (i, j)
[PROOF STEP]
using index_smult_mat(1)[of i "A" j c] i j dimA
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>i < dim_row A; j < dim_col A\<rbrakk> \<Longrightarrow> (c \<cdot>\<^sub>m A) $$ (i, j) = c * A $$ (i, j)
i < m
j < m
A \<in> carrier_mat m m

goal (1 subgoal):
 1. (c \<cdot>\<^sub>m A) $$ (i, j) = c * A $$ (i, j)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(c \<cdot>\<^sub>m A) $$ (i, j) = c * A $$ (i, j)

goal (1 subgoal):
 1. \<And>i j. \<lbrakk>i < m; j < m\<rbrakk> \<Longrightarrow> (\<lambda>n. (c \<cdot>\<^sub>m X n) $$ (i, j)) \<longlonglongrightarrow> (c \<cdot>\<^sub>m A) $$ (i, j)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. c * X n $$ (i, j)) \<longlonglongrightarrow> c * A $$ (i, j)
(c \<cdot>\<^sub>m X ?n) $$ (i, j) = c * X ?n $$ (i, j)
(c \<cdot>\<^sub>m A) $$ (i, j) = c * A $$ (i, j)
[PROOF STEP]
show "(\<lambda>n. (c \<cdot>\<^sub>m X n) $$ (i, j)) \<longlonglongrightarrow> (c \<cdot>\<^sub>m A) $$ (i, j)"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. c * X n $$ (i, j)) \<longlonglongrightarrow> c * A $$ (i, j)
(c \<cdot>\<^sub>m X ?n) $$ (i, j) = c * X ?n $$ (i, j)
(c \<cdot>\<^sub>m A) $$ (i, j) = c * A $$ (i, j)

goal (1 subgoal):
 1. (\<lambda>n. (c \<cdot>\<^sub>m X n) $$ (i, j)) \<longlonglongrightarrow> (c \<cdot>\<^sub>m A) $$ (i, j)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<lambda>n. (c \<cdot>\<^sub>m X n) $$ (i, j)) \<longlonglongrightarrow> (c \<cdot>\<^sub>m A) $$ (i, j)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>?i < m; ?j < m\<rbrakk> \<Longrightarrow> (\<lambda>n. (c \<cdot>\<^sub>m X n) $$ (?i, ?j)) \<longlonglongrightarrow> (c \<cdot>\<^sub>m A) $$ (?i, ?j)

goal (1 subgoal):
 1. limit_mat (\<lambda>n. c \<cdot>\<^sub>m X n) (c \<cdot>\<^sub>m A) m
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?i < m; ?j < m\<rbrakk> \<Longrightarrow> (\<lambda>n. (c \<cdot>\<^sub>m X n) $$ (?i, ?j)) \<longlonglongrightarrow> (c \<cdot>\<^sub>m A) $$ (?i, ?j)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?i < m; ?j < m\<rbrakk> \<Longrightarrow> (\<lambda>n. (c \<cdot>\<^sub>m X n) $$ (?i, ?j)) \<longlonglongrightarrow> (c \<cdot>\<^sub>m A) $$ (?i, ?j)

goal (1 subgoal):
 1. limit_mat (\<lambda>n. c \<cdot>\<^sub>m X n) (c \<cdot>\<^sub>m A) m
[PROOF STEP]
unfolding limit_mat_def
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?i < m; ?j < m\<rbrakk> \<Longrightarrow> (\<lambda>n. (c \<cdot>\<^sub>m X n) $$ (?i, ?j)) \<longlonglongrightarrow> (c \<cdot>\<^sub>m A) $$ (?i, ?j)

goal (1 subgoal):
 1. \<forall>n. c \<cdot>\<^sub>m X n \<in> carrier_mat m m \<and> c \<cdot>\<^sub>m A \<in> carrier_mat m m \<and> (\<forall>i<m. \<forall>j<m. (\<lambda>n. (c \<cdot>\<^sub>m X n) $$ (i, j)) \<longlonglongrightarrow> (c \<cdot>\<^sub>m A) $$ (i, j))
[PROOF STEP]
using dimA dimX
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?i < m; ?j < m\<rbrakk> \<Longrightarrow> (\<lambda>n. (c \<cdot>\<^sub>m X n) $$ (?i, ?j)) \<longlonglongrightarrow> (c \<cdot>\<^sub>m A) $$ (?i, ?j)
A \<in> carrier_mat m m
X ?n \<in> carrier_mat m m

goal (1 subgoal):
 1. \<forall>n. c \<cdot>\<^sub>m X n \<in> carrier_mat m m \<and> c \<cdot>\<^sub>m A \<in> carrier_mat m m \<and> (\<forall>i<m. \<forall>j<m. (\<lambda>n. (c \<cdot>\<^sub>m X n) $$ (i, j)) \<longlonglongrightarrow> (c \<cdot>\<^sub>m A) $$ (i, j))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
limit_mat (\<lambda>n. c \<cdot>\<^sub>m X n) (c \<cdot>\<^sub>m A) m

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem (in prime_number_theorem)
  limsup_primes_omega: "limsup (\<lambda>n. primes_omega n / (ln n / ln (ln n))) = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. limsup (\<lambda>x. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x))))) = 1
[PROOF STEP]
proof (intro antisym)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. limsup (\<lambda>x. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x))))) \<le> 1
 2. 1 \<le> limsup (\<lambda>x. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x)))))
[PROOF STEP]
have "(\<lambda>k. primes_omega (primorial' k) / (ln (primorial' k) / ln (ln (primorial' k)))) \<longlonglongrightarrow> 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>k. real (primes_omega (primorial' k)) / (ln (real (primorial' k)) / ln (ln (real (primorial' k))))) \<longlonglongrightarrow> 1
[PROOF STEP]
using primes_omega_primorial'_asymp_equiv
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. real (primes_omega (primorial' x))) \<sim>[sequentially] (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k))))

goal (1 subgoal):
 1. (\<lambda>k. real (primes_omega (primorial' k)) / (ln (real (primorial' k)) / ln (ln (real (primorial' k))))) \<longlonglongrightarrow> 1
[PROOF STEP]
by (intro asymp_equivD_strong eventually_mono[OF eventually_gt_at_top[of 1]]) auto
[PROOF STATE]
proof (state)
this:
(\<lambda>k. real (primes_omega (primorial' k)) / (ln (real (primorial' k)) / ln (ln (real (primorial' k))))) \<longlonglongrightarrow> 1

goal (2 subgoals):
 1. limsup (\<lambda>x. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x))))) \<le> 1
 2. 1 \<le> limsup (\<lambda>x. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x)))))
[PROOF STEP]
hence "limsup ((\<lambda>n. primes_omega n / (ln n / ln (ln n))) \<circ> primorial') = ereal 1"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>k. real (primes_omega (primorial' k)) / (ln (real (primorial' k)) / ln (ln (real (primorial' k))))) \<longlonglongrightarrow> 1

goal (1 subgoal):
 1. limsup (\<lambda>x. ereal (((\<lambda>n. real (primes_omega n) / (ln (real n) / ln (ln (real n)))) \<circ> primorial') x)) = ereal 1
[PROOF STEP]
by (intro lim_imp_Limsup tendsto_ereal) simp_all
[PROOF STATE]
proof (state)
this:
limsup (\<lambda>x. ereal (((\<lambda>n. real (primes_omega n) / (ln (real n) / ln (ln (real n)))) \<circ> primorial') x)) = ereal 1

goal (2 subgoals):
 1. limsup (\<lambda>x. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x))))) \<le> 1
 2. 1 \<le> limsup (\<lambda>x. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x)))))
[PROOF STEP]
hence "1 = limsup ((\<lambda>n. ereal (primes_omega n / (ln n / ln (ln n)))) \<circ> primorial')"
[PROOF STATE]
proof (prove)
using this:
limsup (\<lambda>x. ereal (((\<lambda>n. real (primes_omega n) / (ln (real n) / ln (ln (real n)))) \<circ> primorial') x)) = ereal 1

goal (1 subgoal):
 1. 1 = limsup ((\<lambda>n. ereal (real (primes_omega n) / (ln (real n) / ln (ln (real n))))) \<circ> primorial')
[PROOF STEP]
by (simp add: o_def)
[PROOF STATE]
proof (state)
this:
1 = limsup ((\<lambda>n. ereal (real (primes_omega n) / (ln (real n) / ln (ln (real n))))) \<circ> primorial')

goal (2 subgoals):
 1. limsup (\<lambda>x. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x))))) \<le> 1
 2. 1 \<le> limsup (\<lambda>x. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x)))))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
1 = limsup ((\<lambda>n. ereal (real (primes_omega n) / (ln (real n) / ln (ln (real n))))) \<circ> primorial')

goal (2 subgoals):
 1. limsup (\<lambda>x. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x))))) \<le> 1
 2. 1 \<le> limsup (\<lambda>x. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x)))))
[PROOF STEP]
have "\<dots> \<le> limsup (\<lambda>n. primes_omega n / (ln n / ln (ln n)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. limsup ((\<lambda>n. ereal (real (primes_omega n) / (ln (real n) / ln (ln (real n))))) \<circ> primorial') \<le> limsup (\<lambda>x. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x)))))
[PROOF STEP]
using strict_mono_primorial'
[PROOF STATE]
proof (prove)
using this:
strict_mono primorial'

goal (1 subgoal):
 1. limsup ((\<lambda>n. ereal (real (primes_omega n) / (ln (real n) / ln (ln (real n))))) \<circ> primorial') \<le> limsup (\<lambda>x. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x)))))
[PROOF STEP]
by (rule limsup_subseq_mono)
[PROOF STATE]
proof (state)
this:
limsup ((\<lambda>n. ereal (real (primes_omega n) / (ln (real n) / ln (ln (real n))))) \<circ> primorial') \<le> limsup (\<lambda>x. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x)))))

goal (2 subgoals):
 1. limsup (\<lambda>x. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x))))) \<le> 1
 2. 1 \<le> limsup (\<lambda>x. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x)))))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
1 \<le> limsup (\<lambda>x. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x)))))
[PROOF STEP]
show "limsup (\<lambda>n. primes_omega n / (ln n / ln (ln n))) \<ge> 1"
[PROOF STATE]
proof (prove)
using this:
1 \<le> limsup (\<lambda>x. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x)))))

goal (1 subgoal):
 1. 1 \<le> limsup (\<lambda>x. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x)))))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
1 \<le> limsup (\<lambda>x. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x)))))

goal (1 subgoal):
 1. limsup (\<lambda>x. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x))))) \<le> 1
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. limsup (\<lambda>x. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x))))) \<le> 1
[PROOF STEP]
show "limsup (\<lambda>n. primes_omega n / (ln n / ln (ln n))) \<le> 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. limsup (\<lambda>x. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x))))) \<le> 1
[PROOF STEP]
unfolding Limsup_le_iff
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>y>1. \<forall>\<^sub>F x in sequentially. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x)))) < y
[PROOF STEP]
proof safe
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. 1 < y \<Longrightarrow> \<forall>\<^sub>F x in sequentially. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x)))) < y
[PROOF STEP]
fix C' :: ereal
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. 1 < y \<Longrightarrow> \<forall>\<^sub>F x in sequentially. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x)))) < y
[PROOF STEP]
assume C': "C' > 1"
[PROOF STATE]
proof (state)
this:
1 < C'

goal (1 subgoal):
 1. \<And>y. 1 < y \<Longrightarrow> \<forall>\<^sub>F x in sequentially. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x)))) < y
[PROOF STEP]
from ereal_dense2[OF this]
[PROOF STATE]
proof (chain)
picking this:
\<exists>z. 1 < ereal z \<and> ereal z < C'
[PROOF STEP]
obtain C where C: "C > 1" "ereal C < C'"
[PROOF STATE]
proof (prove)
using this:
\<exists>z. 1 < ereal z \<and> ereal z < C'

goal (1 subgoal):
 1. (\<And>C. \<lbrakk>1 < C; ereal C < C'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
1 < C
ereal C < C'

goal (1 subgoal):
 1. \<And>y. 1 < y \<Longrightarrow> \<forall>\<^sub>F x in sequentially. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x)))) < y
[PROOF STEP]
have "(\<lambda>k. primes_omega (primorial' k) / (ln (primorial' k) / ln (ln (primorial' k)))) \<longlonglongrightarrow> 1"
      (is "filterlim ?f _ _")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>k. real (primes_omega (primorial' k)) / (ln (real (primorial' k)) / ln (ln (real (primorial' k))))) \<longlonglongrightarrow> 1
[PROOF STEP]
using primes_omega_primorial'_asymp_equiv
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. real (primes_omega (primorial' x))) \<sim>[sequentially] (\<lambda>k. ln (real (primorial' k)) / ln (ln (real (primorial' k))))

goal (1 subgoal):
 1. (\<lambda>k. real (primes_omega (primorial' k)) / (ln (real (primorial' k)) / ln (ln (real (primorial' k))))) \<longlonglongrightarrow> 1
[PROOF STEP]
by (intro asymp_equivD_strong eventually_mono[OF eventually_gt_at_top[of 1]]) auto
[PROOF STATE]
proof (state)
this:
(\<lambda>k. real (primes_omega (primorial' k)) / (ln (real (primorial' k)) / ln (ln (real (primorial' k))))) \<longlonglongrightarrow> 1

goal (1 subgoal):
 1. \<And>y. 1 < y \<Longrightarrow> \<forall>\<^sub>F x in sequentially. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x)))) < y
[PROOF STEP]
from order_tendstoD(2)[OF this C(1)]
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F x in sequentially. real (primes_omega (primorial' x)) / (ln (real (primorial' x)) / ln (ln (real (primorial' x)))) < C
[PROOF STEP]
have "eventually (\<lambda>k. ?f k < C) at_top"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in sequentially. real (primes_omega (primorial' x)) / (ln (real (primorial' x)) / ln (ln (real (primorial' x)))) < C

goal (1 subgoal):
 1. \<forall>\<^sub>F k in sequentially. real (primes_omega (primorial' k)) / (ln (real (primorial' k)) / ln (ln (real (primorial' k)))) < C
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F k in sequentially. real (primes_omega (primorial' k)) / (ln (real (primorial' k)) / ln (ln (real (primorial' k)))) < C

goal (1 subgoal):
 1. \<And>y. 1 < y \<Longrightarrow> \<forall>\<^sub>F x in sequentially. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x)))) < y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F k in sequentially. real (primes_omega (primorial' k)) / (ln (real (primorial' k)) / ln (ln (real (primorial' k)))) < C
[PROOF STEP]
obtain k0 where k0: "\<And>k. k \<ge> k0 \<Longrightarrow> ?f k < C"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F k in sequentially. real (primes_omega (primorial' k)) / (ln (real (primorial' k)) / ln (ln (real (primorial' k)))) < C

goal (1 subgoal):
 1. (\<And>k0. (\<And>k. k0 \<le> k \<Longrightarrow> real (primes_omega (primorial' k)) / (ln (real (primorial' k)) / ln (ln (real (primorial' k)))) < C) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: eventually_at_top_linorder)
[PROOF STATE]
proof (state)
this:
k0 \<le> ?k \<Longrightarrow> real (primes_omega (primorial' ?k)) / (ln (real (primorial' ?k)) / ln (ln (real (primorial' ?k)))) < C

goal (1 subgoal):
 1. \<And>y. 1 < y \<Longrightarrow> \<forall>\<^sub>F x in sequentially. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x)))) < y
[PROOF STEP]
have "eventually (\<lambda>n::nat. max 3 k0 / (ln n / ln (ln n)) < C) at_top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. real (max 3 k0) / (ln (real n) / ln (ln (real n))) < C
[PROOF STEP]
using \<open>C > 1\<close>
[PROOF STATE]
proof (prove)
using this:
1 < C

goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. real (max 3 k0) / (ln (real n) / ln (ln (real n))) < C
[PROOF STEP]
by real_asymp
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in sequentially. real (max 3 k0) / (ln (real n) / ln (ln (real n))) < C

goal (1 subgoal):
 1. \<And>y. 1 < y \<Longrightarrow> \<forall>\<^sub>F x in sequentially. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x)))) < y
[PROOF STEP]
hence "eventually (\<lambda>n. primes_omega n / (ln n / ln (ln n)) \<le> C) at_top"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F n in sequentially. real (max 3 k0) / (ln (real n) / ln (ln (real n))) < C

goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
using eventually_gt_at_top[of "primorial' (max k0 3)"]
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F n in sequentially. real (max 3 k0) / (ln (real n) / ln (ln (real n))) < C
eventually ((<) (primorial' (max k0 3))) sequentially

goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
proof eventually_elim
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. \<lbrakk>real (max 3 k0) / (ln (real n) / ln (ln (real n))) < C; primorial' (max k0 3) < n\<rbrakk> \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
case (elim n)
[PROOF STATE]
proof (state)
this:
real (max 3 k0) / (ln (real n) / ln (ln (real n))) < C
primorial' (max k0 3) < n

goal (1 subgoal):
 1. \<And>n. \<lbrakk>real (max 3 k0) / (ln (real n) / ln (ln (real n))) < C; primorial' (max k0 3) < n\<rbrakk> \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
define k where "k = primes_omega n"
[PROOF STATE]
proof (state)
this:
k = primes_omega n

goal (1 subgoal):
 1. \<And>n. \<lbrakk>real (max 3 k0) / (ln (real n) / ln (ln (real n))) < C; primorial' (max k0 3) < n\<rbrakk> \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
define m where "m = primorial' k"
[PROOF STATE]
proof (state)
this:
m = primorial' k

goal (1 subgoal):
 1. \<And>n. \<lbrakk>real (max 3 k0) / (ln (real n) / ln (ln (real n))) < C; primorial' (max k0 3) < n\<rbrakk> \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
have "primorial' 3 \<le> primorial' (max k0 3)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. primorial' 3 \<le> primorial' (max k0 3)
[PROOF STEP]
by (subst strict_mono_less_eq[OF strict_mono_primorial']) auto
[PROOF STATE]
proof (state)
this:
primorial' 3 \<le> primorial' (max k0 3)

goal (1 subgoal):
 1. \<And>n. \<lbrakk>real (max 3 k0) / (ln (real n) / ln (ln (real n))) < C; primorial' (max k0 3) < n\<rbrakk> \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
primorial' 3 \<le> primorial' (max k0 3)

goal (1 subgoal):
 1. \<And>n. \<lbrakk>real (max 3 k0) / (ln (real n) / ln (ln (real n))) < C; primorial' (max k0 3) < n\<rbrakk> \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
have "\<dots> < n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. primorial' (max k0 3) < n
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
primorial' (max k0 3) < n

goal (1 subgoal):
 1. \<And>n. \<lbrakk>real (max 3 k0) / (ln (real n) / ln (ln (real n))) < C; primorial' (max k0 3) < n\<rbrakk> \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
primorial' 3 < n
[PROOF STEP]
have "n > 30"
[PROOF STATE]
proof (prove)
using this:
primorial' 3 < n

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

goal (1 subgoal):
 1. \<And>n. \<lbrakk>real (max 3 k0) / (ln (real n) / ln (ln (real n))) < C; primorial' (max k0 3) < n\<rbrakk> \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
proof (cases "k \<ge> max 3 k0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
 2. \<not> max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
max 3 k0 \<le> k

goal (2 subgoals):
 1. max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
 2. \<not> max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
hence "m \<ge> 30"
[PROOF STATE]
proof (prove)
using this:
max 3 k0 \<le> k

goal (1 subgoal):
 1. 30 \<le> m
[PROOF STEP]
using strict_mono_less_eq[OF strict_mono_primorial', of 3 k]
[PROOF STATE]
proof (prove)
using this:
max 3 k0 \<le> k
(primorial' 3 \<le> primorial' k) = (3 \<le> k)

goal (1 subgoal):
 1. 30 \<le> m
[PROOF STEP]
by (simp add: m_def k_def)
[PROOF STATE]
proof (state)
this:
30 \<le> m

goal (2 subgoals):
 1. max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
 2. \<not> max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
have "exp 1 ^ 3 \<le> (3 ^ 3 :: real)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. exp 1 ^ 3 \<le> 3 ^ 3
[PROOF STEP]
using exp_le
[PROOF STATE]
proof (prove)
using this:
exp 1 \<le> 3

goal (1 subgoal):
 1. exp 1 ^ 3 \<le> 3 ^ 3
[PROOF STEP]
by (intro power_mono) auto
[PROOF STATE]
proof (state)
this:
exp 1 ^ 3 \<le> 3 ^ 3

goal (2 subgoals):
 1. max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
 2. \<not> max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
exp 1 ^ 3 \<le> 3 ^ 3

goal (2 subgoals):
 1. max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
 2. \<not> max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
have "\<dots> < m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 3 ^ 3 < real m
[PROOF STEP]
using \<open>m \<ge> 30\<close>
[PROOF STATE]
proof (prove)
using this:
30 \<le> m

goal (1 subgoal):
 1. 3 ^ 3 < real m
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
3 ^ 3 < real m

goal (2 subgoals):
 1. max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
 2. \<not> max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
exp 1 ^ 3 < real m
[PROOF STEP]
have "ln (exp 1 ^ 3) < ln m"
[PROOF STATE]
proof (prove)
using this:
exp 1 ^ 3 < real m

goal (1 subgoal):
 1. ln (exp 1 ^ 3) < ln (real m)
[PROOF STEP]
using \<open>m \<ge> 30\<close>
[PROOF STATE]
proof (prove)
using this:
exp 1 ^ 3 < real m
30 \<le> m

goal (1 subgoal):
 1. ln (exp 1 ^ 3) < ln (real m)
[PROOF STEP]
by (subst ln_less_cancel_iff) auto
[PROOF STATE]
proof (state)
this:
ln (exp 1 ^ 3) < ln (real m)

goal (2 subgoals):
 1. max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
 2. \<not> max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
hence "ln m > 3"
[PROOF STATE]
proof (prove)
using this:
ln (exp 1 ^ 3) < ln (real m)

goal (1 subgoal):
 1. 3 < ln (real m)
[PROOF STEP]
by (subst (asm) ln_realpow) auto
[PROOF STATE]
proof (state)
this:
3 < ln (real m)

goal (2 subgoals):
 1. max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
 2. \<not> max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
have "primorial' (primes_omega n) \<le> n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. primorial' (primes_omega n) \<le> n
[PROOF STEP]
using \<open>n > 30\<close>
[PROOF STATE]
proof (prove)
using this:
30 < n

goal (1 subgoal):
 1. primorial' (primes_omega n) \<le> n
[PROOF STEP]
by (intro primorial'_primes_omega_le) auto
[PROOF STATE]
proof (state)
this:
primorial' (primes_omega n) \<le> n

goal (2 subgoals):
 1. max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
 2. \<not> max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
hence "m \<le> n"
[PROOF STATE]
proof (prove)
using this:
primorial' (primes_omega n) \<le> n

goal (1 subgoal):
 1. m \<le> n
[PROOF STEP]
unfolding m_def k_def
[PROOF STATE]
proof (prove)
using this:
primorial' (primes_omega n) \<le> n

goal (1 subgoal):
 1. primorial' (primes_omega n) \<le> n
[PROOF STEP]
using elim
[PROOF STATE]
proof (prove)
using this:
primorial' (primes_omega n) \<le> n
real (max 3 k0) / (ln (real n) / ln (ln (real n))) < C
primorial' (max k0 3) < n

goal (1 subgoal):
 1. primorial' (primes_omega n) \<le> n
[PROOF STEP]
by (auto simp: max_def)
[PROOF STATE]
proof (state)
this:
m \<le> n

goal (2 subgoals):
 1. max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
 2. \<not> max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
hence "primes_omega n / (ln n / ln (ln n)) \<le> k / (ln m / ln (ln m))"
[PROOF STATE]
proof (prove)
using this:
m \<le> n

goal (1 subgoal):
 1. real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> real k / (ln (real m) / ln (ln (real m)))
[PROOF STEP]
unfolding k_def
[PROOF STATE]
proof (prove)
using this:
m \<le> n

goal (1 subgoal):
 1. real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> real (primes_omega n) / (ln (real m) / ln (ln (real m)))
[PROOF STEP]
using elim \<open>m \<ge> 30\<close> ln_gt_1[of n] \<open>ln m > 3\<close>
[PROOF STATE]
proof (prove)
using this:
m \<le> n
real (max 3 k0) / (ln (real n) / ln (ln (real n))) < C
primorial' (max k0 3) < n
30 \<le> m
3 < real n \<Longrightarrow> 1 < ln (real n)
3 < ln (real m)

goal (1 subgoal):
 1. real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> real (primes_omega n) / (ln (real m) / ln (ln (real m)))
[PROOF STEP]
by (intro frac_le[of "primes_omega n"] divide_ln_mono mult_pos_pos divide_pos_pos) auto
[PROOF STATE]
proof (state)
this:
real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> real k / (ln (real m) / ln (ln (real m)))

goal (2 subgoals):
 1. max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
 2. \<not> max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> real k / (ln (real m) / ln (ln (real m)))

goal (2 subgoals):
 1. max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
 2. \<not> max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
have "\<dots> = ?f k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real k / (ln (real m) / ln (ln (real m))) = real (primes_omega (primorial' k)) / (ln (real (primorial' k)) / ln (ln (real (primorial' k))))
[PROOF STEP]
by (simp add: k_def m_def)
[PROOF STATE]
proof (state)
this:
real k / (ln (real m) / ln (ln (real m))) = real (primes_omega (primorial' k)) / (ln (real (primorial' k)) / ln (ln (real (primorial' k))))

goal (2 subgoals):
 1. max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
 2. \<not> max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
real k / (ln (real m) / ln (ln (real m))) = real (primes_omega (primorial' k)) / (ln (real (primorial' k)) / ln (ln (real (primorial' k))))

goal (2 subgoals):
 1. max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
 2. \<not> max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
have "\<dots> < C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real (primes_omega (primorial' k)) / (ln (real (primorial' k)) / ln (ln (real (primorial' k)))) < C
[PROOF STEP]
by (intro k0) (use True in \<open>auto simp: k_def\<close>)
[PROOF STATE]
proof (state)
this:
real (primes_omega (primorial' k)) / (ln (real (primorial' k)) / ln (ln (real (primorial' k)))) < C

goal (2 subgoals):
 1. max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
 2. \<not> max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
real (primes_omega n) / (ln (real n) / ln (ln (real n))) < C
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
real (primes_omega n) / (ln (real n) / ln (ln (real n))) < C

goal (1 subgoal):
 1. real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C

goal (1 subgoal):
 1. \<not> max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> max 3 k0 \<le> k

goal (1 subgoal):
 1. \<not> max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
hence "primes_omega n / (ln n / ln (ln n)) \<le> max 3 k0 / (ln n / ln (ln n))"
[PROOF STATE]
proof (prove)
using this:
\<not> max 3 k0 \<le> k

goal (1 subgoal):
 1. real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> real (max 3 k0) / (ln (real n) / ln (ln (real n)))
[PROOF STEP]
using elim ln_gt_1[of n] \<open>n > 30\<close>
[PROOF STATE]
proof (prove)
using this:
\<not> max 3 k0 \<le> k
real (max 3 k0) / (ln (real n) / ln (ln (real n))) < C
primorial' (max k0 3) < n
3 < real n \<Longrightarrow> 1 < ln (real n)
30 < n

goal (1 subgoal):
 1. real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> real (max 3 k0) / (ln (real n) / ln (ln (real n)))
[PROOF STEP]
by (intro divide_right_mono divide_nonneg_pos) (auto simp: k_def)
[PROOF STATE]
proof (state)
this:
real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> real (max 3 k0) / (ln (real n) / ln (ln (real n)))

goal (1 subgoal):
 1. \<not> max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> real (max 3 k0) / (ln (real n) / ln (ln (real n)))

goal (1 subgoal):
 1. \<not> max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
have "\<dots> < C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real (max 3 k0) / (ln (real n) / ln (ln (real n))) < C
[PROOF STEP]
using elim
[PROOF STATE]
proof (prove)
using this:
real (max 3 k0) / (ln (real n) / ln (ln (real n))) < C
primorial' (max k0 3) < n

goal (1 subgoal):
 1. real (max 3 k0) / (ln (real n) / ln (ln (real n))) < C
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
real (max 3 k0) / (ln (real n) / ln (ln (real n))) < C

goal (1 subgoal):
 1. \<not> max 3 k0 \<le> k \<Longrightarrow> real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
real (primes_omega n) / (ln (real n) / ln (ln (real n))) < C
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
real (primes_omega n) / (ln (real n) / ln (ln (real n))) < C

goal (1 subgoal):
 1. real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in sequentially. real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C

goal (1 subgoal):
 1. \<And>y. 1 < y \<Longrightarrow> \<forall>\<^sub>F x in sequentially. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x)))) < y
[PROOF STEP]
thus "eventually (\<lambda>n. ereal (primes_omega n / (ln n / ln (ln n))) < C') at_top"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F n in sequentially. real (primes_omega n) / (ln (real n) / ln (ln (real n))) \<le> C

goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. ereal (real (primes_omega n) / (ln (real n) / ln (ln (real n)))) < C'
[PROOF STEP]
by eventually_elim (rule le_less_trans[OF _ C(2)], auto)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in sequentially. ereal (real (primes_omega n) / (ln (real n) / ln (ln (real n)))) < C'

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
limsup (\<lambda>x. ereal (real (primes_omega x) / (ln (real x) / ln (ln (real x))))) \<le> 1

goal:
No subgoals!
[PROOF STEP]
qed