Skip to content

Chebyshev Certificates

LeanCert includes specialized certificate engines for finite Chebyshev function bounds. These engines use computable rational upper/lower envelopes for logarithmic summands, then expose Golden Theorems that turn successful boolean checks into real-number bounds.

Imports

import LeanCert.Engine.ChebyshevPsi
import LeanCert.Engine.ChebyshevTheta

or use the aggregate import:

import LeanCert

Psi Bounds

LeanCert.Engine.ChebyshevPsi certifies upper bounds for the second Chebyshev function ψ.

Core checkers:

checkPsiLeMulWith (N : Nat) (slope : ) (depth : Nat)
checkAllPsiLeMulWith (bound : Nat) (slope : ) (depth : Nat)

Golden Theorems:

theorem verify_psi_le_mul (N depth : Nat) (slope : )
    (hcheck : checkPsiLeMulWith N slope depth = true) :
    Chebyshev.psi (N : )  (slope : ) * N

theorem verify_all_psi_le_mul
    (bound depth : Nat) (slope : )
    (hcheck : checkAllPsiLeMulWith bound slope depth = true) :
     N : Nat, 0 < N  N  bound 
      Chebyshev.psi (N : )  (slope : ) * N

Real-variable form:

theorem verify_all_psi_le_mul_real
    (bound depth : Nat) (slope : )
    (hslope : 0  slope)
    (hcheck : checkAllPsiLeMulWith bound slope depth = true) :
     x : , 0 < x  x  (bound : ) 
      Chebyshev.psi x  (slope : ) * x

Theta Bounds

LeanCert.Engine.ChebyshevTheta certifies upper, absolute-error, and relative-error bounds for the first Chebyshev function θ.

Core checkers:

checkThetaLeMulWith
checkAllThetaLeMulWith
checkThetaAbsError
checkAllThetaAbsError
checkThetaRelError
checkAllThetaRelError
checkThetaRelErrorReal
checkAllThetaRelErrorReal

Golden Theorems:

theorem verify_theta_le_mul (N depth : Nat) (slope : )
    (hcheck : checkThetaLeMulWith N slope depth = true) :
    Chebyshev.theta (N : )  (slope : ) * N

theorem verify_theta_abs_error (N depth : Nat) (bound : )
    (hcheck : checkThetaAbsError N bound depth = true) :
    |Chebyshev.theta (N : ) - N|  (bound : )

theorem verify_theta_rel_error (N depth : Nat) (bound : )
    (hcheck : checkThetaRelError N bound depth = true) :
    |Chebyshev.theta (N : ) - N|  (bound : ) * N

Range checkers have corresponding range Golden Theorems:

theorem verify_all_theta_le_mul
theorem verify_all_theta_abs_error
theorem verify_all_theta_rel_error

For real x ∈ [N, N+1), use the strengthened interval certificate:

theorem verify_theta_rel_error_real (N depth : Nat) (bound : )
    (hbound : 0  bound) (hbound1 : bound  1)
    (hcheck : checkThetaRelErrorReal N bound depth = true)
    (x : ) (hxlo : (N : )  x) (hxhi : x < (N : ) + 1) :
    |Chebyshev.theta x - x|  (bound : ) * x

Example

import LeanCert.Engine.ChebyshevPsi

open Chebyshev (psi)
open LeanCert.Engine.ChebyshevPsi

example :
     N : Nat, 0 < N  N  20 
      psi (N : )  (3 : ) * N := by
  exact verify_all_psi_le_mul 20 20 3 (by native_decide)

Notes

The older theorem names such as psi_le_of_checkPsiLeMulWith and abs_theta_sub_le_mul_of_checkThetaRelError remain available. The verify_* names are thin public aliases matching the rest of LeanCert's Golden Theorem style.