Certified Chebyshev psi(N) Upper Bounds #
This module provides computable upper bounds on the Chebyshev function
psi(N) = sum_{n in Ioc 0 N} vonMangoldt(n).
The core checker is generalized by a rational slope slope:
checkPsiLeMulWith N slope depthcheckspsiUB(N) <= slope * NcheckAllPsiLeMulWith bound slope depthchecks allN = 1..bound
The original 1.11-specific API is kept as thin wrappers:
checkPsiBound,allPsiBoundsHold, and their bridge theorems.
Computable upper bound on vonMangoldt(n) #
Computable upper bound on the von Mangoldt function vonMangoldt(n).
Returns (logPointComputable (minFac n) depth).hi when IsPrimePow n,
and 0 otherwise.
Equations
- LeanCert.Engine.ChebyshevPsi.vonMangoldtUB n depth = if IsPrimePow n then (LeanCert.Core.IntervalRat.logPointComputable (↑n.minFac) depth).hi else 0
Instances For
Computable upper bound on psi(N):
psiUB N depth = sum n in Ioc 0 N, vonMangoldtUB n depth.
Equations
- LeanCert.Engine.ChebyshevPsi.psiUB N depth = ∑ n ∈ Finset.Ioc 0 N, LeanCert.Engine.ChebyshevPsi.vonMangoldtUB n depth
Instances For
Correctness theorems #
The von Mangoldt function is bounded above by our computable bound.
The Chebyshev function psi(N) is bounded above by psiUB(N).
Decidable comparison infrastructure #
Generic slope checker: psi(N) <= slope * N #
Computable check: does psiUB(N) <= slope * N hold?
Equations
- LeanCert.Engine.ChebyshevPsi.checkPsiLeMulWith N slope depth = decide (LeanCert.Engine.ChebyshevPsi.psiUB N depth ≤ slope * ↑N)
Instances For
If checkPsiLeMulWith N slope depth holds, then psi(N) <= slope * N.
Real-variable form:
if checkPsiLeMulWith floor(x) slope depth holds and slope >= 0,
then psi(x) <= slope*x.
Backwards-compatible wrappers for slope = 111/100 #
Legacy check used by downstream code: psiUB(N) <= 1.11 * N.
Equations
- LeanCert.Engine.ChebyshevPsi.checkPsiBound N depth = LeanCert.Engine.ChebyshevPsi.checkPsiLeMulWith N (111 / 100) depth
Instances For
Legacy theorem used by downstream code: psi(N) <= 1.11 * N.
Real-variable legacy theorem:
psi(x) <= 1.11 * x, given checkPsiBound floor(x) depth.
Efficient incremental checker (for #eval / native_decide testing) #
Helper: accumulate vonMangoldtUB from 1 to n-1.
Equations
- LeanCert.Engine.ChebyshevPsi.psiUBPrefix n depth = ∑ i ∈ Finset.Ioc 0 (n - 1), LeanCert.Engine.ChebyshevPsi.vonMangoldtUB i depth
Instances For
Efficient O(N) check that psiUB(N) <= slope * N for all N = 1..bound.
Uses incremental accumulation instead of recomputing psiUB from scratch.
Equations
- LeanCert.Engine.ChebyshevPsi.checkAllPsiLeMulWith bound slope depth = LeanCert.Engine.ChebyshevPsi.checkAllPsiLeMulWith.go bound slope depth 1 0
Instances For
Legacy O(N) checker for slope = 111/100.
Equations
- LeanCert.Engine.ChebyshevPsi.allPsiBoundsHold bound depth = LeanCert.Engine.ChebyshevPsi.checkAllPsiLeMulWith bound (111 / 100) depth
Instances For
Bridge: checkAllPsiLeMulWith.go -> checkPsiLeMulWith #
If checkAllPsiLeMulWith bound slope depth returns true, then
checkPsiLeMulWith N slope depth is true for all N in {1, ..., bound}.
Legacy bridge theorem for slope = 111/100.