Documentation

PrimeNumberTheoremAnd.Consequences

theorem Set.Ico_subset_Ico_of_Icc_subset_Icc {a b c d : ℝ} (h : Icc a b ⊆ Icc c d) :
Ico a b ⊆ Ico c d
Inspect dependencies

Set.Ico_subset_Ico_of_Icc_subset_Icc · compiled type and proof/definition references.

theorem th43_b (x : ℝ) (hx : 2 ≤ x) :
Inspect dependencies

th43_b · compiled type and proof/definition references.

theorem finsum_range_eq_sum_range {R : Type u_1} [AddCommMonoid R] {f : ArithmeticFunction R} (x : ℝ) :
∑ᶠ (n : ℕ) (_ : ↑n < x), f n = ∑ n ∈ Finset.range ⌈x⌉₊, f n
Inspect dependencies

finsum_range_eq_sum_range · compiled type and proof/definition references.

theorem finsum_range_eq_sum_range' {R : Type u_1} [AddCommMonoid R] {f : ArithmeticFunction R} (x : ℝ) :
∑ᶠ (n : ℕ) (_ : ↑n ≤ x), f n = ∑ n ≤ ⌊x⌋₊, f n
Inspect dependencies

finsum_range_eq_sum_range' · compiled type and proof/definition references.

Inspect dependencies

log2_pos · compiled type and proof/definition references.

theorem Asymptotics.IsEquivalent.add_isLittleO' {α : Type u_1} {β : Type u_2} [NormedAddCommGroup β] {u v w : α → β} {l : Filter α} (huv : IsEquivalent l u v) (hwu : (w - u) =o[l] v) :

If u v and w-u = o(v) then w v.

Inspect dependencies

Asymptotics.IsEquivalent.add_isLittleO' · compiled type and proof/definition references.

theorem Asymptotics.IsEquivalent.add_isLittleO'' {α : Type u_1} {β : Type u_2} [NormedAddCommGroup β] {u v w : α → β} {l : Filter α} (huv : IsEquivalent l u v) (hwu : (u - w) =o[l] v) :

If u v and u-w = o(v) then w v.

Inspect dependencies

Asymptotics.IsEquivalent.add_isLittleO'' · compiled type and proof/definition references.

theorem WeakPNT' :
Filter.Tendsto (fun (N : ℕ) => (∑ n ≤ N, ArithmeticFunction.vonMangoldt n) / ↑N) Filter.atTop (nhds 1)
Inspect dependencies

WeakPNT' · compiled type and proof/definition references.

An alternate form of the Weak PNT.

Inspect dependencies

WeakPNT'' · compiled type and proof/definition references.

√x · log x = o(x) as x → ∞.

Inspect dependencies

isLittleO_sqrt_mul_log · compiled type and proof/definition references.

(⌊x⌋₊ + 1) / x → 1 as x → ∞.

Inspect dependencies

tendsto_floor_add_one_div_self · compiled type and proof/definition references.

theorem isTheta_self_div_const {c : ℝ} (hc : c ≠ 0) :
(fun (x : ℝ) => x) =Θ[Filter.atTop] fun (x : ℝ) => x / c

x =Θ x / c for nonzero constant c.

Inspect dependencies

isTheta_self_div_const · compiled type and proof/definition references.

Filtered sum over Iic n equals filtered sum over Icc 1 n for primes.

Inspect dependencies

filter_prime_Iic_eq_Icc · compiled type and proof/definition references.

theorem Icc_zero_eq_insert (n : ℕ) :

Icc 0 n = insert 0 (Icc 1 n)

Inspect dependencies

Icc_zero_eq_insert · compiled type and proof/definition references.

Inspect dependencies

chebyshev_asymptotic · compiled type and proof/definition references.

theorem chebyshev_asymptotic_finsum :
Asymptotics.IsEquivalent Filter.atTop (fun (x : ℕ) => ∑ᶠ (p : ℕ) (_ : p ≤ x) (_ : Nat.Prime p), Real.log ↑p) fun (x : ℕ) => ↑x
Inspect dependencies

chebyshev_asymptotic_finsum · compiled type and proof/definition references.

theorem chebyshev_asymptotic' :
∃ (f : ℝ → ℝ), (∀ ε > 0, f =o[Filter.atTop] fun (t : ℝ) => ε * t) ∧ (∀ (x : ℝ), 2 ≤ x → MeasureTheory.IntegrableOn f (Set.Icc 2 x) MeasureTheory.volume) ∧ ∀ (x : ℝ), Chebyshev.theta x = x + f x
Inspect dependencies

chebyshev_asymptotic' · compiled type and proof/definition references.

theorem chebyshev_asymptotic'' :
∃ (f : ℝ → ℝ), (∀ ε > 0, f =o[Filter.atTop] fun (x : ℝ) => ε) ∧ (∀ (x : ℝ), 2 ≤ x → MeasureTheory.IntegrableOn f (Set.Icc 2 x) MeasureTheory.volume) ∧ ∀ x > 0, Chebyshev.theta x = x + x * f x
Inspect dependencies

chebyshev_asymptotic'' · compiled type and proof/definition references.

theorem primorial_bounds :
∃ (E : ℝ → ℝ), (E =o[Filter.atTop] fun (x : ℝ) => x) ∧ ∀ (x : ℝ), ↑(∏ p ≤ ⌊x⌋₊ with Nat.Prime p, p) = Real.exp (x + E x)
Inspect dependencies

primorial_bounds · compiled type and proof/definition references.

theorem primorial_bounds_finprod :
∃ (E : ℝ → ℝ), (E =o[Filter.atTop] fun (x : ℝ) => x) ∧ ∀ (x : ℝ), ↑(∏ᶠ (p : ℕ) (_ : ↑p ≤ x) (_ : Nat.Prime p), p) = Real.exp (x + E x)
Inspect dependencies

primorial_bounds_finprod · compiled type and proof/definition references.

theorem continuousOn_log0 :
ContinuousOn (fun (x : ℝ) => -1 / (x * Real.log x ^ 2)) {0, 1, -1}ᶜ
Inspect dependencies

continuousOn_log0 · compiled type and proof/definition references.

theorem continuousOn_log1 :
ContinuousOn (fun (x : ℝ) => (Real.log x ^ 2)⁻¹ * x⁻¹) {0, 1, -1}ᶜ
Inspect dependencies

continuousOn_log1 · compiled type and proof/definition references.

theorem integral_log_inv (a b : ℝ) (ha : 2 ≤ a) (hb : a ≤ b) :
∫ (t : ℝ) in a..b, (Real.log t)⁻¹ = (Real.log b)⁻¹ * b - (Real.log a)⁻¹ * a + ∫ (t : ℝ) in a..b, (Real.log t ^ 2)⁻¹
Inspect dependencies

integral_log_inv · compiled type and proof/definition references.

theorem integral_log_inv' (a b : ℝ) (ha : 2 ≤ a) (hb : a ≤ b) :
Inspect dependencies

integral_log_inv' · compiled type and proof/definition references.

theorem integral_log_inv'' (a b : ℝ) (ha : 2 ≤ a) (hb : a ≤ b) :
Inspect dependencies

integral_log_inv'' · compiled type and proof/definition references.

theorem integral_log_inv_pos (x : ℝ) (hx : 2 < x) :
0 < ∫ (t : ℝ) in Set.Icc 2 x, (Real.log t)⁻¹
Inspect dependencies

integral_log_inv_pos · compiled type and proof/definition references.

theorem integral_log_inv_ne_zero (x : ℝ) (hx : 2 < x) :
Inspect dependencies

integral_log_inv_ne_zero · compiled type and proof/definition references.

Inspect dependencies

pi_asymp_aux · compiled type and proof/definition references.

theorem div_log_sq_isLittleO :
(fun (x : ℝ) => x / Real.log x ^ 2) =o[Filter.atTop] fun (x : ℝ) => x / Real.log x

The extra logarithm makes the quadratic-log scale negligible.

Inspect dependencies

div_log_sq_isLittleO · compiled type and proof/definition references.

Integration by parts and the quadratic-log bound give the logarithmic integral's scale.

Inspect dependencies

integral_log_inv_isEquivalent · compiled type and proof/definition references.

theorem pi_asymp'' :
(fun (x : ℝ) => (↑⌊x⌋₊.primeCounting / ∫ (t : ℝ) in Set.Icc 2 x, 1 / Real.log t) - 1) =o[Filter.atTop] fun (x : ℝ) => 1
Inspect dependencies

pi_asymp'' · compiled type and proof/definition references.

theorem pi_asymp :
∃ (c : ℝ → ℝ), (c =o[Filter.atTop] fun (x : ℝ) => 1) ∧ ∀ᶠ (x : ℝ) in Filter.atTop, ↑⌊x⌋₊.primeCounting = (1 + c x) * ∫ (t : ℝ) in 2..x, 1 / Real.log t
Inspect dependencies

pi_asymp · compiled type and proof/definition references.

theorem inv_div_log_asy :
∃ (c : ℝ), ∀ᶠ (x : ℝ) in Filter.atTop, ∫ (t : ℝ) in Set.Icc 2 x, 1 / Real.log t ^ 2 ≤ c * (x / Real.log x ^ 2)
Inspect dependencies

inv_div_log_asy · compiled type and proof/definition references.

theorem integral_log_inv_pialt (x : ℝ) (hx : 4 ≤ x) :
∫ (t : ℝ) in Set.Icc 2 x, 1 / Real.log t = x / Real.log x - 2 / Real.log 2 + ∫ (t : ℝ) in Set.Icc 2 x, 1 / Real.log t ^ 2
Inspect dependencies

integral_log_inv_pialt · compiled type and proof/definition references.

theorem integral_div_log_asymptotic :
∃ (c : ℝ → ℝ), (c =o[Filter.atTop] fun (x : ℝ) => 1) ∧ ∀ᶠ (x : ℝ) in Filter.atTop, ∫ (t : ℝ) in Set.Icc 2 x, 1 / Real.log t = (1 + c x) * x / Real.log x
Inspect dependencies

integral_div_log_asymptotic · compiled type and proof/definition references.

theorem pi_alt :
∃ (c : ℝ → ℝ), (c =o[Filter.atTop] fun (x : ℝ) => 1) ∧ ∀ (x : ℝ), ↑⌊x⌋₊.primeCounting = (1 + c x) * x / Real.log x
Inspect dependencies

pi_alt · compiled type and proof/definition references.

Inspect dependencies

pi_alt' · compiled type and proof/definition references.

Inspect dependencies

pi_nth_prime · compiled type and proof/definition references.

Inspect dependencies

tendsto_nth_prime_atTop · compiled type and proof/definition references.

theorem pi_nth_prime_asymp :
Asymptotics.IsEquivalent Filter.atTop (fun (n : ℕ) => ↑(nth_prime n) / Real.log ↑(nth_prime n)) fun (n : ℕ) => ↑n
Inspect dependencies

pi_nth_prime_asymp · compiled type and proof/definition references.

Inspect dependencies

log_nth_prime_asymp · compiled type and proof/definition references.

theorem nth_prime_asymp :
Asymptotics.IsEquivalent Filter.atTop (fun (n : ℕ) => ↑(nth_prime n)) fun (n : ℕ) => ↑n * Real.log ↑n
Inspect dependencies

nth_prime_asymp · compiled type and proof/definition references.

theorem pn_asymptotic :
∃ (c : ℕ → ℝ), (c =o[Filter.atTop] fun (x : ℕ) => 1) ∧ ∀ n > 1, ↑(nth_prime n) = (1 + c n) * ↑n * Real.log ↑n
Inspect dependencies

pn_asymptotic · compiled type and proof/definition references.

theorem pn_pn_plus_one :
∃ (c : ℕ → ℝ), (c =o[Filter.atTop] fun (x : ℕ) => 1) ∧ ∀ (n : ℕ), ↑(nth_prime (n + 1)) - ↑(nth_prime n) = c n * ↑(nth_prime n)
Inspect dependencies

pn_pn_plus_one · compiled type and proof/definition references.

theorem prime_in_gap' (a b : ℕ) (h : a.primeCounting < b.primeCounting) :
∃ (p : ℕ), Nat.Prime p ∧ a + 1 ≤ p ∧ p < b + 1
Inspect dependencies

prime_in_gap' · compiled type and proof/definition references.

theorem prime_in_gap (a b : ℝ) (ha : 0 < a) (h : ⌊a⌋₊.primeCounting < ⌊b⌋₊.primeCounting) :
∃ (p : ℕ), Nat.Prime p ∧ a < ↑p ∧ ↑p ≤ b
Inspect dependencies

prime_in_gap · compiled type and proof/definition references.

theorem bound_f_second_term (f : ℝ → ℝ) (hf : Filter.Tendsto f Filter.atTop (nhds 0)) (δ : ℝ) (hδ : δ > 0) :
∀ᶠ (x : ℝ) in Filter.atTop, 1 + f x < 1 + δ
Inspect dependencies

bound_f_second_term · compiled type and proof/definition references.

theorem bound_f_first_term {ε : ℝ} (hε : 0 < ε) (f : ℝ → ℝ) (hf : Filter.Tendsto f Filter.atTop (nhds 0)) (δ : ℝ) (hδ : δ > 0) :
∀ᶠ (x : ℝ) in Filter.atTop, 1 + f ((1 + ε) * x) > 1 - δ
Inspect dependencies

bound_f_first_term · compiled type and proof/definition references.

theorem smaller_terms {ε : ℝ} (hε : 0 < ε) (f : ℝ → ℝ) (hf : Filter.Tendsto f Filter.atTop (nhds 0)) (δ : ℝ) (hδ : δ > 0) :
∀ᶠ (x : ℝ) in Filter.atTop, (1 - δ) * ((1 + ε) * x / Real.log ((1 + ε) * x)) < (1 + f ((1 + ε) * x)) * ((1 + ε) * x / Real.log ((1 + ε) * x))
Inspect dependencies

smaller_terms · compiled type and proof/definition references.

theorem second_smaller_terms (f : ℝ → ℝ) (hf : Filter.Tendsto f Filter.atTop (nhds 0)) (δ : ℝ) (hδ : δ > 0) :
∀ᶠ (x : ℝ) in Filter.atTop, (1 + δ) * (x / Real.log x) > (1 + f x) * (x / Real.log x)
Inspect dependencies

second_smaller_terms · compiled type and proof/definition references.

Inspect dependencies

x_log_x_atTop · compiled type and proof/definition references.

Inspect dependencies

tendsto_by_squeeze · compiled type and proof/definition references.

theorem prime_between {ε : ℝ} (hε : 0 < ε) :
∀ᶠ (x : ℝ) in Filter.atTop, ∃ (p : ℕ), Nat.Prime p ∧ x < ↑p ∧ ↑p < (1 + ε) * x
Inspect dependencies

prime_between · compiled type and proof/definition references.

Inspect dependencies

sum_mobius_div_self_le · compiled type and proof/definition references.

theorem sum_mobius_mul_floor (x : ℝ) (hx : 1 ≤ x) :
∑ n ≤ ⌊x⌋₊, ↑(ArithmeticFunction.moebius n) * ↑⌊x / ↑n⌋ = 1
Inspect dependencies

sum_mobius_mul_floor · compiled type and proof/definition references.

noncomputable def mu_log :
Equations
Instances For
    Inspect dependencies

    mu_log · compiled type and proof/definition references.

    Inspect dependencies

    mu_log_apply · compiled type and proof/definition references.

    Inspect dependencies

    mu_log_mul_zeta · compiled type and proof/definition references.

    Inspect dependencies

    mu_log_eq_mu_mul_neg_lambda · compiled type and proof/definition references.

    theorem sum_mu_Lambda (x : ℝ) :
    ∑ n ≤ ⌊x⌋₊, ↑(ArithmeticFunction.moebius n) * Real.log ↑n = -∑ k ≤ ⌊x⌋₊, ↑(ArithmeticFunction.moebius k) * Psi (x / ↑k)
    Inspect dependencies

    sum_mu_Lambda · compiled type and proof/definition references.

    theorem M_log_identity (x : ℝ) (hx : 1 ≤ x) :
    M x * Real.log x = ∑ k ≤ ⌊x⌋₊, ↑(ArithmeticFunction.moebius k) * (Real.log (x / ↑k) - Psi (x / ↑k))
    Inspect dependencies

    M_log_identity · compiled type and proof/definition references.

    noncomputable def R (x : ℝ) :
    Equations
    Instances For
      Inspect dependencies

      R · compiled type and proof/definition references.

      Inspect dependencies

      R_isLittleO · compiled type and proof/definition references.

      theorem sum_mobius_div_isBigO :
      (fun (x : ℝ) => ∑ k ≤ ⌊x⌋₊, ↑(ArithmeticFunction.moebius k) * (x / ↑k)) =O[Filter.atTop] id
      Inspect dependencies

      sum_mobius_div_isBigO · compiled type and proof/definition references.

      theorem sum_log_div_isBigO :
      (fun (x : ℝ) => ∑ k ≤ ⌊x⌋₊, Real.log (x / ↑k)) =O[Filter.atTop] id
      Inspect dependencies

      sum_log_div_isBigO · compiled type and proof/definition references.

      theorem R_locally_bounded (K : ℝ) (hK : 0 ≤ K) :
      ∃ (C : ℝ), ∀ y ∈ Set.Icc 0 K, |R y| ≤ C
      Inspect dependencies

      R_locally_bounded · compiled type and proof/definition references.

      theorem sum_bounded_of_linear_bound {f : ℝ → ℝ} {ε C : ℝ} (hε : 0 ≤ ε) (hC : 0 ≤ C) (h : ∀ (y : ℝ), 1 ≤ y → |f y| ≤ ε * y + C) (x : ℝ) (hx : 1 ≤ x) :
      ∑ k ∈ Finset.Icc 1 ⌊x⌋₊, |f (x / ↑k)| ≤ ε * x * (Real.log x + 1) + C * x
      Inspect dependencies

      sum_bounded_of_linear_bound · compiled type and proof/definition references.

      theorem sum_abs_R_isLittleO :
      (fun (x : ℝ) => ∑ k ≤ ⌊x⌋₊, |R (x / ↑k)|) =o[Filter.atTop] fun (x : ℝ) => x * Real.log x
      Inspect dependencies

      sum_abs_R_isLittleO · compiled type and proof/definition references.

      theorem R_linear_bound (ε : ℝ) (hε : 0 < ε) :
      ∃ (C : ℝ), 0 ≤ C ∧ ∀ (y : ℝ), 1 ≤ y → |R y| ≤ ε * y + C
      Inspect dependencies

      R_linear_bound · compiled type and proof/definition references.

      theorem sum_abs_R_isLittleO' :
      (fun (x : ℝ) => ∑ k ≤ ⌊x⌋₊, |R (x / ↑k)|) =o[Filter.atTop] fun (x : ℝ) => x * Real.log x
      Inspect dependencies

      sum_abs_R_isLittleO' · compiled type and proof/definition references.

      Inspect dependencies

      M_isLittleO · compiled type and proof/definition references.

      Inspect dependencies

      M_isLittleO' · compiled type and proof/definition references.

      theorem mu_pnt :
      (fun (x : ℝ) => ∑ n ∈ Finset.range ⌊x⌋₊, ArithmeticFunction.moebius n) =o[Filter.atTop] fun (x : ℝ) => x
      Inspect dependencies

      mu_pnt · compiled type and proof/definition references.

      theorem lambda_eq_sum_sq_dvd_mu (n : ℕ) (hn : n ≠ 0) :
      (-1) ^ ArithmeticFunction.cardFactors n = ∑ d ∈ Finset.Icc 1 n with d ^ 2 ∣ n, ↑(ArithmeticFunction.moebius (n / d ^ 2))
      Inspect dependencies

      lambda_eq_sum_sq_dvd_mu · compiled type and proof/definition references.

      theorem sum_lambda_eq_sum_mu_div_sq (N : ℕ) :
      ∑ n ∈ Finset.Icc 1 N, (-1) ^ ArithmeticFunction.cardFactors n = ∑ d ∈ Finset.Icc 1 N.sqrt, ∑ k ∈ Finset.Icc 1 (N / d ^ 2), ↑(ArithmeticFunction.moebius k)
      Inspect dependencies

      sum_lambda_eq_sum_mu_div_sq · compiled type and proof/definition references.

      theorem sum_mu_div_sq_isLittleO :
      (fun (N : ℕ) => ∑ d ∈ Finset.Icc 1 N.sqrt, ∑ k ∈ Finset.Icc 1 (N / d ^ 2), ↑(ArithmeticFunction.moebius k)) =o[Filter.atTop] fun (N : ℕ) => ↑N
      Inspect dependencies

      sum_mu_div_sq_isLittleO · compiled type and proof/definition references.

      theorem lambda_pnt :
      (fun (x : ℝ) => ∑ n ∈ Finset.range ⌊x⌋₊, (-1) ^ ArithmeticFunction.cardFactors n) =o[Filter.atTop] fun (x : ℝ) => x
      Inspect dependencies

      lambda_pnt · compiled type and proof/definition references.

      theorem sum_mobius_floor (x : ℝ) (hx : 1 ≤ x) :
      ∑ n ∈ Finset.Icc 1 ⌊x⌋₊, ↑(ArithmeticFunction.moebius n) * ↑⌊x / ↑n⌋ = 1
      Inspect dependencies

      sum_mobius_floor · compiled type and proof/definition references.

      theorem sum_mobius_floor_tail_isLittleO (K : ℕ) (hK : 0 < K) :
      (fun (x : ℝ) => ∑ n ∈ Finset.Ioc ⌊x / ↑K⌋₊ ⌊x⌋₊, ↑(ArithmeticFunction.moebius n) * ↑⌊x / ↑n⌋) =o[Filter.atTop] fun (x : ℝ) => x
      Inspect dependencies

      sum_mobius_floor_tail_isLittleO · compiled type and proof/definition references.

      theorem sum_mobius_div_approx (x : ℝ) (K : ℕ) (hK : 0 < K) (hx : 1 ≤ x) :
      |x * ∑ n ∈ Finset.Icc 1 ⌊x / ↑K⌋₊, ↑(ArithmeticFunction.moebius n) / ↑n - 1| ≤ x / ↑K + |∑ n ∈ Finset.Ioc ⌊x / ↑K⌋₊ ⌊x⌋₊, ↑(ArithmeticFunction.moebius n) * ↑⌊x / ↑n⌋|
      Inspect dependencies

      sum_mobius_div_approx · compiled type and proof/definition references.

      theorem mu_pnt_alt :
      (fun (x : ℝ) => ∑ n ∈ Finset.range ⌊x⌋₊, ↑(ArithmeticFunction.moebius n) / ↑n) =o[Filter.atTop] fun (x : ℝ) => 1
      Inspect dependencies

      mu_pnt_alt · compiled type and proof/definition references.

      theorem chebyshev_asymptotic_pnt {q a : ℕ} (hq : q ≥ 1) (ha : a.Coprime q) (ha' : a < q) :
      Asymptotics.IsEquivalent Filter.atTop (fun (x : ℝ) => ∑ p ≤ ⌊x⌋₊ with Nat.Prime p, if p % q = a then Real.log ↑p else 0) fun (x : ℝ) => x / ↑q.totient
      Inspect dependencies

      chebyshev_asymptotic_pnt · compiled type and proof/definition references.

      theorem dirichlet_thm {q a : ℕ} (hq : q ≥ 1) (ha : a.Coprime q) (ha' : a < q) :
      Inspect dependencies

      dirichlet_thm · compiled type and proof/definition references.