Documentation

LeanPool.DeadEnds.RelevantPrimes

Bounding the finite set of primes relevant to square-divisibility violations.

Convert Nat.primesBelow to a finset of bundled primes.

Equations
Instances For

    The set of primes q with q ≤ √(bX+b) that are not in S. Any violation by q ∉ S must have q² ≤ bX+b, so q ≤ √(bX+b) < √(bX+b)+1. Either q² | N (so q² ≤ X ≤ bX+b) or q² | bN+d with d < b (so q² ≤ bX + b - 1 < bX+b).

    Equations
    Instances For
      theorem LeanPool.DeadEnds.not_in_S_implies_gt_y (S : Finset Nat.Primes) (y : ) (hy : ∀ (p : Nat.Primes), p yp S) (q : Nat.Primes) (hq : qS) :
      q > y
      theorem LeanPool.DeadEnds.relevantNotInS_gt_y (b X : ) (S : Finset Nat.Primes) (y : ) (hy : ∀ (p : Nat.Primes), p yp S) (q : Nat.Primes) (hq : q relevantNotInS b X S) :
      q > y
      theorem LeanPool.DeadEnds.relevantNotInS_gt_b (b X : ) (S : Finset Nat.Primes) (y : ) (hy : ∀ (p : Nat.Primes), p yp S) (hyb : y b) (q : Nat.Primes) (hq : q relevantNotInS b X S) :
      q > b
      theorem LeanPool.DeadEnds.prime_sq_bound_from_N_dvd (b X N : ) (hb : 2 b) (q : Nat.Primes) (hN : N Finset.Icc 1 X) (hdvd : q ^ 2 N) :
      q < (b * X + b).sqrt + 1
      theorem LeanPool.DeadEnds.prime_sq_bound_from_shifted_dvd (b X N d : ) (hb : 2 b) (q : Nat.Primes) (hN : N Finset.Icc 1 X) (hd : d Finset.range b) (hdvd : q ^ 2 b * N + d) :
      q < (b * X + b).sqrt + 1
      theorem LeanPool.DeadEnds.violation_subset_biUnion (b : ) (hb : 2 b) (T : Finset ) (hT : T Finset.range b) (S : Finset Nat.Primes) (X : ) :
      {NFinset.Icc 1 X | qS, q ^ 2 N dT, q ^ 2 b * N + d} (relevantNotInS b X S).biUnion fun (q : Nat.Primes) => {NFinset.Icc 1 X | q ^ 2 N dT, q ^ 2 b * N + d}
      theorem LeanPool.DeadEnds.union_card_bound (b : ) (hb : 2 b) (T : Finset ) (hT : T Finset.range b) (S : Finset Nat.Primes) (y : ) (hy : ∀ (p : Nat.Primes), p yp S) (hyb : y b) (X : ) :
      {NFinset.Icc 1 X | qS, q ^ 2 N dT, q ^ 2 b * N + d}.card qrelevantNotInS b X S, (T.card + 1) * (X / q ^ 2 + 1)

      Union bound: card(V) ≤ ∑_{q ∈ relevantNotInS} card(V_q). Combines violation_subset_biUnion with Finset.card_le_card and Finset.card_biUnion_le. Uses Finset.card_biUnion_le : (s.biUnion t).card ≤ ∑ a ∈ s, (t a).card.

      theorem LeanPool.DeadEnds.finsum_le_tsum_tail (y : ) (Q : Finset Nat.Primes) (hQ : qQ, q > y) :
      qQ, 1 / q ^ 2 ∑' (p : { q : Nat.Primes // q > y }), 1 / p ^ 2

      The finite sum ∑{q∈Q} 1/q² over primes in Q is ≤ the tsum ∑'{p>y} 1/p² where all primes q in Q satisfy q > y. This uses that Q (as a subset of {primes p > y}) contributes to the infinite sum. Since 1/q² ≥ 0 for all primes q, and the sum over primes converges, the finite partial sum is bounded by the full tail sum. Uses Summable.sum_le_tsum : ∀ {ι : Type*} {f : ι → ℝ} (s : Finset ι), (∀ i ∉ s, 0 ≤ f i) → Summable f → ∑ i ∈ s, f i ≤ ∑' i, f i.

      theorem LeanPool.DeadEnds.sum_expand (c : ) (X : ) (Q : Finset Nat.Primes) :
      qQ, c * (X / q ^ 2 + 1) = c * X * qQ, 1 / q ^ 2 + c * Q.card
      theorem LeanPool.DeadEnds.sum_bound_real (T : Finset ) (y X : ) (Q : Finset Nat.Primes) (hQ : qQ, q > y) :
      qQ, (T.card + 1) * (X / q ^ 2 + 1) (T.card + 1) * X * ∑' (p : { q : Nat.Primes // q > y }), 1 / p ^ 2 + (T.card + 1) * Q.card
      theorem LeanPool.DeadEnds.nat_div_floor_le_real_div (X : ) (q : Nat.Primes) :
      ↑(X / q ^ 2) X / q ^ 2
      theorem LeanPool.DeadEnds.nat_sum_le_real_sum (T : Finset ) (X : ) (Q : Finset Nat.Primes) :
      (∑ qQ, (T.card + 1) * (X / q ^ 2 + 1)) qQ, (T.card + 1) * (X / q ^ 2 + 1)
      theorem LeanPool.DeadEnds.violation_count_bound (b : ) (hb : 2 b) (T : Finset ) (hT : T Finset.range b) (S : Finset Nat.Primes) (y : ) (hy : ∀ (p : Nat.Primes), p yp S) (hyb : y b) (X : ) :
      {NFinset.Icc 1 X | qS, q ^ 2 N dT, q ^ 2 b * N + d}.card (T.card + 1) * X * ∑' (p : { q : Nat.Primes // q > y }), 1 / p ^ 2 + (T.card + 1) * (b * X + b).sqrt

      Violation count is bounded by the prime-square tail term plus a square-root count term.