Documentation

LeanPool.SelbergSieve4.Applications.PrimeCountingUpperBound

LeanPool.SelbergSieve4.Applications.PrimeCountingUpperBound #

theorem PrimeUpperBound.prodDistinctPrimes_squarefree (s : Finset ℕ) (h : ∀ p ∈ s, Nat.Prime p) :
Squarefree (∏ p ∈ s, p)
noncomputable def PrimeUpperBound.primeSieve (N : ℕ) (y : ℝ) (hy : 1 ≤ y) :

Selberg sieve specialized to primes at most the real level y.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    theorem PrimeUpperBound.siftedSum_eq (s : SelbergSieve) (hw : ∀ i ∈ s.support, s.weights i = 1) (z : ℝ) (hz : 1 ≤ z) (hP : s.prodPrimes = primorial ⌊z⌋₊) :
    s.siftedSum = ↑{d ∈ s.support | ∀ (p : ℕ), Nat.Prime p → ↑p ≤ z → ¬p ∣ d}.card
    theorem PrimeUpperBound.primeSieve_siftedSum_eq (N : ℕ) (y : ℝ) (hy : 1 ≤ y) :
    (primeSieve N y hy).siftedSum = ↑{d ∈ Finset.range (N + 1) | ∀ (p : ℕ), Nat.Prime p → ↑p ≤ y → ¬p ∣ d}.card
    theorem PrimeUpperBound.prime_subset (N : ℕ) (y : ℝ) :
    Finset.filter Nat.Prime (Finset.range (N + 1)) ⊆ {d ∈ Finset.range (N + 1) | ∀ (p : ℕ), Nat.Prime p → ↑p ≤ y → ¬p ∣ d} ∪ Finset.Icc 1 ⌊y⌋₊
    theorem PrimeUpperBound.pi_le_siftedSum (N : ℕ) (y : ℝ) (hy : 1 ≤ y) :

    Predicate asserting that an arithmetic function is completely multiplicative.

    Equations
    Instances For
      theorem PrimeUpperBound.prod_factors_one_div_compMult_ge (M : ℕ) (f : ArithmeticFunction ℝ) (hf : CompletelyMultiplicative f) (hf_nonneg : ∀ (n : ℕ), 0 ≤ f n) (d : ℕ) (hd : Squarefree d) (hf_size : ∀ (n : ℕ), Nat.Prime n → n ∣ d → f n < 1) :
      f d * ∏ p ∈ d.primeFactors, 1 / (1 - f p) ≥ ∏ p ∈ d.primeFactors, ∑ n ∈ Finset.Icc 1 M, f (p ^ n)
      theorem PrimeUpperBound.prod_factors_sum_pow_compMult (M : ℕ) (hM : M ≠ 0) (f : ArithmeticFunction ℝ) (hf : CompletelyMultiplicative f) (d : ℕ) (hd : Squarefree d) :
      ∏ p ∈ d.primeFactors, ∑ n ∈ Finset.Icc 1 M, f (p ^ n) = ∑ m ∈ (d ^ M).divisors with d ∣ m, f m
      theorem PrimeUpperBound.lem0 (P : ℕ) {s : Finset ℕ} (h : ∀ p ∈ s, p ∣ P) (h' : ∀ p ∈ s, Nat.Prime p) :
      ∏ p ∈ s, p ∣ P
      theorem PrimeUpperBound.sqrt_le_self (x : ℝ) (hx : 1 ≤ x) :
      √x ≤ x
      theorem PrimeUpperBound.nat_squarefree_dvd_pow (a b N : ℕ) (ha : Squarefree a) (hab : a ∣ b ^ N) :
      a ∣ b
      theorem PrimeUpperBound.selbergBoundingSum_ge_sum_div (s : SelbergSieve) (hP : ∀ (p : ℕ), Nat.Prime p → ↑p ≤ s.level → p ∣ s.prodPrimes) (hnu : CompletelyMultiplicative s.nu) (hnu_nonneg : ∀ (n : ℕ), 0 ≤ s.nu n) (hnu_lt : ∀ (p : ℕ), Nat.Prime p → p ∣ s.prodPrimes → s.nu p < 1) :
      theorem PrimeUpperBound.card_range_filter_dvd (N d : ℕ) (hd : d ≠ 0) :
      {x ∈ Finset.range N | d ∣ x}.card = ⌈↑N / ↑d⌉₊
      theorem PrimeUpperBound.primeSieve_multSum_eq (N : ℕ) (y : ℝ) (hy : 1 ≤ y) (d : ℕ) (hd : d ≠ 0) :
      (primeSieve N y hy).multSum d = ↑⌈↑(N + 1) / ↑d⌉₊
      theorem PrimeUpperBound.primeSieve_rem_eq (N : ℕ) (y : ℝ) (hy : 1 ≤ y) (d : ℕ) (hd : d ≠ 0) :
      (primeSieve N y hy).rem d = ↑⌈↑(N + 1) / ↑d⌉₊ - ↑N / ↑d
      theorem PrimeUpperBound.primeSieve_abs_rem_eq (N : ℕ) (y : ℝ) (hy : 1 ≤ y) (d : ℕ) (hd : d ≠ 0) :
      |(primeSieve N y hy).rem d| ≤ 2
      theorem PrimeUpperBound.rem_sum_le_of_const (s : SelbergSieve) (C : ℝ) (hrem : ∀ d > 0, |s.rem d| ≤ C) :
      theorem PrimeUpperBound.primeSieve_rem_sum_le (N : ℕ) (y : ℝ) (hy : 1 ≤ y) :
      (∑ d ∈ (primeSieve N y hy).prodPrimes.divisors, if ↑d ≤ y then 3 ^ ArithmeticFunction.cardDistinctFactors d * |(primeSieve N y hy).rem d| else 0) ≤ ↑2 * y * (1 + Real.log y) ^ 3
      theorem PrimeUpperBound.pi_le_of_y (N : ℕ) (y : ℝ) (hy_lt : 1 < y) :
      ↑N.primeCounting ≤ ↑2 * ↑N / Real.log y + ↑3 * y * (1 + Real.log y) ^ 3
      theorem PrimeUpperBound.pi_le_id_div_log_of_eps (N : ℕ) (ε : ℝ) (_hε_pos : ε > 0) (hε : ε < 1) :
      ↑N.primeCounting ≤ ↑2 / (↑1 - ε) * ↑N / Real.log ↑N + ↑3 * ↑N ^ (1 - ε) * (1 + (1 - ε) * Real.log ↑N) ^ 3
      theorem PrimeUpperBound.pi_le_id_div_log (N : ℕ) :
      ↑N.primeCounting ≤ 4 * ↑N / Real.log ↑N + 3 * ↑N ^ (1 / 2) * (1 + 1 / 2 * Real.log ↑N) ^ 3
      theorem PrimeUpperBound.pi_ll :
      (fun (N : ℕ) => ↑N.primeCounting) =O[Filter.atTop] fun (N : ℕ) => ↑N / Real.log ↑N
      theorem PrimeUpperBound.pi_le_mul :
      ∃ (N : ℕ) (C : ℝ), ∀ n ≥ N, ↑n.primeCounting ≤ C * ↑n / Real.log ↑n