Documentation

LeanPool.Erdos137.SquarefreeCapacity

Erdős Problem #137: the deterministic squarefree-capacity reduction #

This file isolates the deterministic half of the squarefree-counting argument for very bad intervals. It contains no analytic number theory — no Pandey squarefree-counting theorem, no Baker–Harman–Pintz prime-in-interval input, no Mertens estimate. Everything below is a finite valuation computation checked on the standard Mathlib axioms, building on the elementary TaoPoint mechanism.

The mechanism #

Suppose the block [n, n+k-1] is very bad, i.e. F k n = ∏_{i<k} (n+i) is powerful. Consider the squarefree terms of the block, those n + i with Squarefree (n + i). We claim:

So every squarefree term is (k-1)-smooth: its prime support lies in Nat.primesBelow k.

Hence pointwise on factorizations the squarefree product divides the small-prime capacity ∏_{p < k} p^{⌊k/p⌋+1}, and Nat.le_of_dvd yields the size form.

Note on the exponent #

We use k/p + 1 (= ⌊k/p⌋ + 1), not a ceiling, because Ioc_dvd_le proves exactly the bound ⌊L/p⌋ + 1 on the number of multiples of p in an interval of length L = k.

Deterministic companion #

This is the deterministic companion to an external, unformalized squarefree-counting theorem (Pandey) bounding the number of squarefree terms in a block. That analytic input is not formalized here; only the deterministic capacity bound for the product of the squarefree terms is.

Counting obstruction #

Bounding each squarefree term below by n turns the product bound into a count bound. With SqfreeBlockCount k n := #{i < k | Squarefree (n+i)} we have n ^ SqfreeBlockCount k n ≤ SqfreeBlockProduct k n ≤ SmoothCapacity k, and the capacity factors as SmoothCapacity k = L k * P k ≤ k! · 4^k ≤ (4k)^k (Legendre's first layer L ∣ k! plus the primorial bound P ≤ 4^k). Hence enough squarefree terms forces non-powerfulness: not_powerful_of_sqfree_count_beats_fourk says (4k)^k < n ^ SqfreeBlockCount k n ⟹ ¬ Powerful. This is the deterministic interface to an external squarefree-count lower bound (Pandey, not formalized here): supply any n and a count exceeding log_n ((4k)^k) and the block cannot be powerful.

Main results (Mathlib's three axioms only) #

The squarefree-term index set, its product, and the smooth capacity #

The indices i < k whose block term n + i is squarefree.

Equations
Instances For

    The product of the squarefree block terms ∏_{i : Squarefree (n+i)} (n + i).

    Equations
    Instances For

      The small-prime capacity ∏_{p < k} p^{⌊k/p⌋+1}. The exponent is k/p + 1 (not a ceiling), matching exactly what Ioc_dvd_le proves about the count of multiples of p in a length-k interval.

      Equations
      Instances For

        The deterministic obstruction: squarefree terms have no large prime #

        theorem Erdos137.sqfree_term_no_large_prime {k n i p : } (hn : 1 n) (hPow : Powerful (F k n)) (hi : i < k) (hsq : Squarefree (n + i)) (hp : Nat.Prime p) (hkp : k p) :
        ¬p n + i

        No large prime in a squarefree term. If F k n is powerful, i < k, n + i is squarefree, and p ≥ k is prime, then p ∤ n + i. Otherwise veryBad_large_prime_sq forces p^2 ∣ n + i, contradicting squarefreeness (Squarefree.natFactorization_le_one).

        Per-prime valuation bound #

        The set of squarefree-term indices whose term is divisible by p.

        Equations
        Instances For
          theorem Erdos137.blockDvdIndices_card_le {k n p : } (hn : 1 n) (hp : 1 p) :
          (BlockDvdIndices k n p).card k / p + 1

          Per-prime capacity count. For p ≥ 1, the number of squarefree-term indices i with p ∣ n + i is at most ⌊k/p⌋ + 1. The squarefree-divisible index set is a subset of all indices i < k with p ∣ n + i, which biject (via i ↦ n + i) onto {x ∈ (n-1, n-1+k] | p ∣ x}, counted by Ioc_dvd_le (the same idiom as div_le_factorization_F).

          Valuation of the squarefree product at p is bounded by the count. Each squarefree term contributes valuation ≤ 1 at p (and 0 if p ∤ n+i), so summing over the squarefree indices gives v_p(∏) ≤ #{i : Squarefree ∧ p ∣ n+i} = #(BlockDvdIndices k n p).

          Factorization of the capacity. For prime p < k, v_p(SmoothCapacity k) = ⌊k/p⌋ + 1; for p ∉ primesBelow k, it is 0.

          Main results #

          The squarefree product divides the small-prime capacity. If F k n is powerful, then ∏_{i : Squarefree (n+i)} (n+i) divides ∏_{p < k} p^{⌊k/p⌋+1}. Pointwise on factorizations: a prime p ≥ k cannot divide any squarefree term (sqfree_term_no_large_prime), so its valuation in the product is 0 ≤ the capacity's; a prime p < k has valuation ≤ #(divisible squarefree terms) ≤ ⌊k/p⌋ + 1 (sqfreeBlockProduct_factorization_le_count, blockDvdIndices_card_le); a non-prime contributes 0.

          Size form. If F k n is powerful, the product of the squarefree block terms is at most the small-prime capacity ∏_{p < k} p^{⌊k/p⌋+1}. Immediate from the divisibility form via Nat.le_of_dvd.

          Counting form of the obstruction and explicit capacity bound #

          Number of squarefree terms in the block.

          Equations
          Instances For

            The product of the squarefree block terms is at least n ^ SqfreeBlockCount.

            Counting form of the squarefree-capacity obstruction.

            If the squarefree count is large enough to beat capacity, the block is not powerful.

            The squarefree-capacity product is exactly L k * P k.

            L k divides k! (Legendre's first layer).

            Coarse explicit capacity bound: SmoothCapacity k ≤ (4*k)^k.

            theorem Erdos137.not_powerful_of_sqfree_count_beats_fourk {k n : } (hn : 1 n) (hbeat : (4 * k) ^ k < n ^ SqfreeBlockCount k n) :

            Fully explicit squarefree-count obstruction.

            theorem Erdos137.not_powerful_of_sqfree_term_large_prime {k n i p : } (hn : 1 n) (hi : i < k) (hsq : Squarefree (n + i)) (hp : Nat.Prime p) (hkp : k p) (hpdvd : p n + i) :

            A squarefree term with a prime factor p ≥ k rules out powerfulness.

            theorem Erdos137.not_powerful_of_exists_sqfree_term_large_prime {k n : } (hn : 1 n) (h : i < k, Squarefree (n + i) ∃ (p : ), Nat.Prime p k p p n + i) :

            Existential version.

            Abstract squarefree-splice template #

            A range predicate on which the squarefree count beats the deterministic capacity. This is the external interface for a squarefree-counting input (e.g. Pandey's): it is not proved here, only consumed. Mirrors the PrimeInBlockOnRange pattern of the abstract BHP splice.

            Equations
            Instances For
              theorem Erdos137.squarefree_range_not_powerful {Range : Prop} (hRange : SqfreeCapacityBeatenOnRange Range) {k n : } (hk : 3 k) (hn : 1 n) (hR : Range k n) :

              Abstract squarefree splice. On any range where the squarefree count beats the capacity, no powerful block exists. The external squarefree-counting input enters only as the premise hRange; no analytic number theory is formalized here.