Documentation

Mathlib.NumberTheory.Chebyshev

Chebyshev functions #

This file defines the Chebyshev functions theta and psi. These give logarithmically weighted sums of primes and prime powers.

Main definitions #

Main results #

Notation #

We introduce the scoped notations θ and ψ in the Chebyshev namespace for the Chebyshev functions.

References #

Parts of this file were upstreamed from the PrimeNumberTheoremAnd project by Kontorovich et al, https://github.com/alexKontorovich/PrimeNumberTheoremAnd.

noncomputable def Chebyshev.psi (x : ) :

The sum of ArithmeticFunction.vonMangoldt over integers n ≤ x.

Equations
Instances For

    The sum of ArithmeticFunction.vonMangoldt over integers n ≤ x.

    Equations
    Instances For
      noncomputable def Chebyshev.theta (x : ) :

      The sum of log p over primes p ≤ x.

      Equations
      Instances For

        The sum of log p over primes p ≤ x.

        Equations
        Instances For
          theorem Chebyshev.theta_pos {x : } (hy : 2 x) :
          0 < theta x
          theorem Chebyshev.psi_eq_zero_of_lt_two {x : } (hx : x < 2) :
          psi x = 0
          @[simp]
          theorem Chebyshev.psi_zero :
          psi 0 = 0
          @[simp]
          theorem Chebyshev.psi_one :
          psi 1 = 0
          theorem Chebyshev.theta_eq_zero_of_lt_two {x : } (hx : x < 2) :
          theta x = 0
          @[simp]
          @[simp]

          θ x is the log of the product of the primes up to x.

          theorem Chebyshev.theta_le_log4_mul_x {x : } (hx : 0 x) :

          Chebyshev's upper bound: θ x ≤ c x with the constant c = log 4.

          Least common multiple of {1,...,n} #

          Basic facts about the least common multiple of the first n natural numbers

          def Nat.lcmUpto (n : ) :

          Least common multiple of Icc 1 n.

          Equations
          Instances For
            theorem Nat.lcmUpto_pos (n : ) :
            theorem Nat.factorization_lcmUpto (n : ) {p : } (hp : Prime p) :
            theorem Nat.lcmUpto_eq_prod_pow_log (n : ) :
            n.lcmUpto = pn.primesLE, p ^ log p n
            theorem Chebyshev.psi_eq_sum_mul_log_prime (n : ) :
            psi n = pn.primesLE, (Nat.log p n) * Real.log p

            ψ n is the logarithm of lcmUpto n.

            theorem Chebyshev.choose_dvd_lcmUpto {n k : } (hkn : k n) :

            lcmUpto n is divisible by choose n k for all k ≤ n

            Relating ψ and θ #

            We isolate the contributions of different prime powers to ψ and use this to show that ψ and θ are close.

            theorem Chebyshev.sum_PrimePow_eq_sum_sum {R : Type u_1} [AddCommMonoid R] (f : R) {x : } (hx : 0 x) :
            nFinset.Ioc 0 x⌋₊ with IsPrimePow n, f n = kFinset.Icc 1 Real.log x / Real.log 2⌋₊, pFinset.Ioc 0 x ^ (1 / k)⌋₊ with Nat.Prime p, f (p ^ k)

            A sum over prime powers may be written as a double sum over exponents and then primes.

            theorem Chebyshev.psi_eq_sum_theta {x : } (hx : 0 x) :
            psi x = nFinset.Icc 1 Real.log x / Real.log 2⌋₊, theta (x ^ (1 / n))
            theorem Chebyshev.psi_eq_theta_add_sum_theta {x : } (hx : 2 x) :
            psi x = theta x + nFinset.Icc 2 Real.log x / Real.log 2⌋₊, theta (x ^ (1 / n))

            |ψ x - θ x| ≤ c √ x log x with an explicit constant c.

            theorem Chebyshev.psi_le {x : } (hx : 1 x) :

            Explicit upper bound on ψ.

            theorem Chebyshev.psi_le_const_mul_self {x : } (hx : 0 x) :
            psi x (Real.log 4 + 4) * x

            Chebyshev's bound ψ x ≤ c x with an explicit constant. Note that Chebyshev.psi_le gives a sharper bound with a better main term.

            ψ - θ is the sum of Λ over non-primes.

            theorem Chebyshev.psi_ge (n : ) :
            n * Real.log 2 - Real.log (n + 1) psi n

            The Chebyshev lower bound for ψ.

            theorem Chebyshev.psi_ge' {x : } (hx : 0 x) :
            (x - 1) * Real.log 2 - Real.log (x + 2) psi x
            theorem Chebyshev.psi_sub_theta_le {x : } (hx : 1 x) :
            theorem Chebyshev.theta_ge (n : ) :
            n * Real.log 2 - Real.log (n + 1) - 2 * n * Real.log n theta n

            The Chebyshev lower bound for θ.

            theorem Chebyshev.theta_ge' {x : } (hx : 1 x) :
            (x - 1) * Real.log 2 - Real.log (x + 2) - 2 * x * Real.log x theta x

            Relation to prime counting #

            We relate θ to the prime counting function π.

            Expresses the prime counting function π in terms of θ by using Abel summation.

            Expresses the Chebyshev theta function ϑ in terms of π by using Abel summation.

            theorem Chebyshev.intervalIntegrable_one_div_log_sq {a b : } (one_lt_a : 1 < a) (one_lt_b : 1 < b) :
            theorem Chebyshev.integral_one_div_log_sq_isBigO :
            (fun (x : ) => (t : ) in 2..x, 1 / Real.log t ^ 2) =O[Filter.atTop] fun (x : ) => x / Real.log x ^ 2
            theorem Chebyshev.integral_theta_div_log_sq_isLittleO :
            (fun (x : ) => (t : ) in 2..x, theta t / (t * Real.log t ^ 2)) =o[Filter.atTop] fun (x : ) => x / Real.log x

            Chebyshev's upper bound on the prime counting function

            theorem Chebyshev.pi_ge (n : ) :
            (n * Real.log 2 - Real.log (n + 1)) / Real.log n n.primeCounting
            theorem Chebyshev.pi_ge' {x : } (hx : 1 < x) :

            A weak but completely explicit upper bound on $\pi(x)$.